comparison cabac.h @ 3981:9854f686ba79 libavcodec

move the &1 out of the asm so gcc can optimize it away in inlined cases (yes this is slightly faster)
author michael
date Tue, 10 Oct 2006 01:17:39 +0000
parents 5afe4253a220
children af16271634c2
comparison
equal deleted inserted replaced
3980:5afe4253a220 3981:9854f686ba79
510 "shll %%cl , %%esi \n\t" 510 "shll %%cl , %%esi \n\t"
511 "addl %%esi, %%ebx \n\t" 511 "addl %%esi, %%ebx \n\t"
512 "1: \n\t" 512 "1: \n\t"
513 "movl %%edx, "RANGE "(%2) \n\t" 513 "movl %%edx, "RANGE "(%2) \n\t"
514 "movl %%ebx, "LOW "(%2) \n\t" 514 "movl %%ebx, "LOW "(%2) \n\t"
515 "andl $1, %%eax \n\t"
516 :"=&a"(bit) 515 :"=&a"(bit)
517 :"r"(state), "r"(c) 516 :"r"(state), "r"(c)
518 : "%ecx", "%ebx", "%edx", "%esi" 517 : "%ecx", "%ebx", "%edx", "%esi"
519 ); 518 );
519 bit&=1;
520 #endif 520 #endif
521 #else 521 #else
522 int s = *state; 522 int s = *state;
523 int RangeLPS= c->lps_range[s][c->range>>(CABAC_BITS+7)]<<(CABAC_BITS+1); 523 int RangeLPS= c->lps_range[s][c->range>>(CABAC_BITS+7)]<<(CABAC_BITS+1);
524 int bit, lps_mask attribute_unused; 524 int bit, lps_mask attribute_unused;