Commit 5115d832 authored by John Cox's avatar John Cox Committed by Michael Niedermayer

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: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 48f80831
......@@ -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;
......
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