Commit fd297b1f authored by michael's avatar michael

factor out common subexprssion (gcc of course is too stupid to do this ...)

5% faster avg_h264_chroma_mc2_mmx2()
10% faster put_h264_chroma_mc2_mmx2()


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7898 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 33974f17
...@@ -265,8 +265,9 @@ static void H264_CHROMA_MC4_TMPL(uint8_t *dst/*align 4*/, uint8_t *src/*align 1* ...@@ -265,8 +265,9 @@ static void H264_CHROMA_MC4_TMPL(uint8_t *dst/*align 4*/, uint8_t *src/*align 1*
#ifdef H264_CHROMA_MC2_TMPL #ifdef H264_CHROMA_MC2_TMPL
static void H264_CHROMA_MC2_TMPL(uint8_t *dst/*align 2*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y) static void H264_CHROMA_MC2_TMPL(uint8_t *dst/*align 2*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y)
{ {
int CD=((1<<16)-1)*x*y + 8*y; int tmp = ((1<<16)-1)*x + 8;
int AB=((8<<16)-8)*x + 64 - CD; int CD= tmp*y;
int AB= (tmp<<3) - CD;
asm volatile( asm volatile(
/* mm5 = {A,B,A,B} */ /* mm5 = {A,B,A,B} */
/* mm6 = {C,D,C,D} */ /* mm6 = {C,D,C,D} */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment