mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
cabac_functions: Count zeros with ctz if it is fast
When refilling the low bit buffer after get_cabac count the bits with ctz if the processor has a fast version. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
48f80831ba
commit
5115d8326e
@ -76,9 +76,12 @@ static inline void renorm_cabac_decoder_once(CABACContext *c){
|
||||
static void refill2(CABACContext *c){
|
||||
int i;
|
||||
unsigned x;
|
||||
|
||||
#if !HAVE_FAST_CLZ
|
||||
x= c->low ^ (c->low-1);
|
||||
i= 7 - ff_h264_norm_shift[x>>(CABAC_BITS-1)];
|
||||
#else
|
||||
i = ff_ctz(c->low) - CABAC_BITS;
|
||||
#endif
|
||||
|
||||
x= -CABAC_MASK;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user