mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Faster CAVLC decoding of trailing_ones. Based on a patch by dark shikari.
decode_residual is about 3.3% faster. Originally committed as revision 16219 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
93445d1617
commit
04824298a9
@ -4087,9 +4087,11 @@ static int decode_residual(H264Context *h, GetBitContext *gb, DCTELEM *block, in
|
||||
tprintf(h->s.avctx, "trailing:%d, total:%d\n", trailing_ones, total_coeff);
|
||||
assert(total_coeff<=16);
|
||||
|
||||
for(i=0; i<trailing_ones; i++){
|
||||
level[i]= 1 - 2*get_bits1(gb);
|
||||
}
|
||||
i = show_bits(gb, 3);
|
||||
skip_bits(gb, trailing_ones);
|
||||
level[0] = 1-((i&4)>>1);
|
||||
level[1] = 1-((i&2) );
|
||||
level[2] = 1-((i&1)<<1);
|
||||
|
||||
if(trailing_ones<total_coeff) {
|
||||
int level_code, mask;
|
||||
|
Loading…
Reference in New Issue
Block a user