moving lps state transition code a little up in the branched asm code (1% faster on P3)

Originally committed as revision 6658 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Michael Niedermayer 18 years ago
parent b99f3cabed
commit 2b5269b51c
  1. 4
      libavcodec/cabac.h

@ -405,11 +405,11 @@ static int get_cabac(CABACContext *c, uint8_t * const state){
"subl %%edx, %%ebx \n\t" "subl %%edx, %%ebx \n\t"
"movl %%esi, %%edx \n\t" "movl %%esi, %%edx \n\t"
"shr $19, %%esi \n\t" "shr $19, %%esi \n\t"
"movzbl "MANGLE(ff_h264_lps_state)"(%%eax), %%ecx \n\t"
"movb %%cl, (%1) \n\t"
"movzbl " MANGLE(ff_h264_norm_shift) "(%%esi), %%ecx \n\t" "movzbl " MANGLE(ff_h264_norm_shift) "(%%esi), %%ecx \n\t"
"shll %%cl, %%ebx \n\t" "shll %%cl, %%ebx \n\t"
"shll %%cl, %%edx \n\t" "shll %%cl, %%edx \n\t"
"movzbl "MANGLE(ff_h264_lps_state)"(%%eax), %%ecx \n\t"
"movb %%cl, (%1) \n\t"
"addl $1, %%eax \n\t" "addl $1, %%eax \n\t"
"test %%bx, %%bx \n\t" "test %%bx, %%bx \n\t"
" jnz 2f \n\t" " jnz 2f \n\t"

Loading…
Cancel
Save