diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-10-20 04:51:04 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-10-20 04:51:04 +0400 |
commit | a616db285a1765f81887ed874cfa6ee95429ce0a (patch) | |
tree | 9cf8fd69085709794811792977c7f643b44e06a0 /libavcodec/cabac.h | |
parent | 13404b2e9813a70654ab26c661da501d91a8d2f9 (diff) |
reordering instructions a little in decode_significance_x86() -> 2 instructions less / 1% faster decode_residual on P3
Originally committed as revision 6741 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/cabac.h')
-rw-r--r-- | libavcodec/cabac.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/libavcodec/cabac.h b/libavcodec/cabac.h index 9bea58bbe0..5cf1a9e39d 100644 --- a/libavcodec/cabac.h +++ b/libavcodec/cabac.h @@ -684,11 +684,13 @@ static int decode_significance_x86(CABACContext *c, int max_coeff, uint8_t *sign "2: \n\t" - BRANCHLESS_GET_CABAC("%0", "%3", "(%1)", "%%ebx", "%%bx", "%%esi", "%%edx", "%%dl") + BRANCHLESS_GET_CABAC("%%edx", "%3", "(%1)", "%%ebx", "%%bx", "%%esi", "%%eax", "%%al") - "test $1, %0 \n\t" + "test $1, %%edx \n\t" " jz 3f \n\t" + BRANCHLESS_GET_CABAC("%%edx", "%3", "61(%1)", "%%ebx", "%%bx", "%%esi", "%%eax", "%%al") + "movl %2, %%eax \n\t" "movl %4, %%ecx \n\t" "addl %1, %%ecx \n\t" @@ -696,9 +698,7 @@ static int decode_significance_x86(CABACContext *c, int max_coeff, uint8_t *sign "addl $4, %%eax \n\t" "movl %%eax, %2 \n\t" - BRANCHLESS_GET_CABAC("%0", "%3", "61(%1)", "%%ebx", "%%bx", "%%esi", "%%edx", "%%dl") - - "test $1, %%eax \n\t" + "test $1, %%edx \n\t" " jnz 4f \n\t" "3: \n\t" @@ -710,9 +710,7 @@ static int decode_significance_x86(CABACContext *c, int max_coeff, uint8_t *sign "addl %1, %%ecx \n\t" "movl %%ecx, (%%eax) \n\t" "addl $4, %%eax \n\t" - "movl %%eax, %2 \n\t" "4: \n\t" - "movl %2, %%eax \n\t" "addl %6, %%eax \n\t" "shr $2, %%eax \n\t" |