diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-04-25 00:57:48 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-04-25 00:57:48 +0000 |
commit | dee6dde66928e427db32afd8730024fcf2a1ac35 (patch) | |
tree | 758c3e3fe71ae280380a170f1887dd50261667ae /libavcodec/h263.c | |
parent | f9e0f2a2065e4f6708a93891773fd5a18abefd47 (diff) | |
download | ffmpeg-dee6dde66928e427db32afd8730024fcf2a1ac35.tar.gz |
avoid unneeded clear_blocks()
Originally committed as revision 4157 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h263.c')
-rw-r--r-- | libavcodec/h263.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libavcodec/h263.c b/libavcodec/h263.c index 4cd2204b29..7561c518e1 100644 --- a/libavcodec/h263.c +++ b/libavcodec/h263.c @@ -3753,6 +3753,7 @@ static int mpeg4_decode_partitioned_mb(MpegEncContext *s, DCTELEM block[6][64]) if (!IS_SKIP(mb_type)) { int i; + s->dsp.clear_blocks(s->block[0]); /* decode each block */ for (i = 0; i < 6; i++) { if(mpeg4_decode_block(s, block[i], i, cbp&32, s->mb_intra, s->rvlc) < 0){ @@ -3921,6 +3922,8 @@ int ff_h263_decode_mb(MpegEncContext *s, } }while(cbpc == 20); + s->dsp.clear_blocks(s->block[0]); + dquant = cbpc & 8; s->mb_intra = ((cbpc & 4) != 0); if (s->mb_intra) goto intra; @@ -4024,6 +4027,7 @@ int ff_h263_decode_mb(MpegEncContext *s, s->mb_intra = IS_INTRA(mb_type); if(HAS_CBP(mb_type)){ + s->dsp.clear_blocks(s->block[0]); cbpc = get_vlc2(&s->gb, cbpc_b_vlc.table, CBPC_B_VLC_BITS, 1); if(s->mb_intra){ dquant = IS_QUANT(mb_type); @@ -4102,6 +4106,8 @@ int ff_h263_decode_mb(MpegEncContext *s, } }while(cbpc == 8); + s->dsp.clear_blocks(s->block[0]); + dquant = cbpc & 4; s->mb_intra = 1; intra: @@ -4193,6 +4199,7 @@ int ff_mpeg4_decode_mb(MpegEncContext *s, } }while(cbpc == 20); + s->dsp.clear_blocks(s->block[0]); dquant = cbpc & 8; s->mb_intra = ((cbpc & 4) != 0); if (s->mb_intra) goto intra; @@ -4324,7 +4331,10 @@ int ff_mpeg4_decode_mb(MpegEncContext *s, } mb_type= mb_type_b_map[ mb_type ]; if(modb2) cbp= 0; - else cbp= get_bits(&s->gb, 6); + else{ + s->dsp.clear_blocks(s->block[0]); + cbp= get_bits(&s->gb, 6); + } if ((!IS_DIRECT(mb_type)) && cbp) { if(get_bits1(&s->gb)){ @@ -4442,6 +4452,7 @@ intra: if(!s->progressive_sequence) s->interlaced_dct= get_bits1(&s->gb); + s->dsp.clear_blocks(s->block[0]); /* decode each block */ for (i = 0; i < 6; i++) { if (mpeg4_decode_block(s, block[i], i, cbp&32, 1, 0) < 0) |