aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h261.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-04-25 00:57:48 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-04-25 00:57:48 +0000
commitdee6dde66928e427db32afd8730024fcf2a1ac35 (patch)
tree758c3e3fe71ae280380a170f1887dd50261667ae /libavcodec/h261.c
parentf9e0f2a2065e4f6708a93891773fd5a18abefd47 (diff)
downloadffmpeg-dee6dde66928e427db32afd8730024fcf2a1ac35.tar.gz
avoid unneeded clear_blocks()
Originally committed as revision 4157 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h261.c')
-rw-r--r--libavcodec/h261.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/h261.c b/libavcodec/h261.c
index cc6d34fdc7..630cf8f580 100644
--- a/libavcodec/h261.c
+++ b/libavcodec/h261.c
@@ -531,7 +531,6 @@ static int h261_decode_mb_skipped(H261Context *h, int mba1, int mba2 )
xy = s->mb_x + s->mb_y * s->mb_stride;
ff_init_block_index(s);
ff_update_block_index(s);
- s->dsp.clear_blocks(s->block[0]);
for(j=0;j<6;j++)
s->block_last_index[j] = -1;
@@ -606,7 +605,6 @@ static int h261_decode_mb(H261Context *h){
xy = s->mb_x + s->mb_y * s->mb_stride;
ff_init_block_index(s);
ff_update_block_index(s);
- s->dsp.clear_blocks(s->block[0]);
// Read mtype
h->mtype = get_vlc2(&s->gb, h261_mtype_vlc.table, H261_MTYPE_VLC_BITS, 2);
@@ -661,12 +659,16 @@ static int h261_decode_mb(H261Context *h){
intra:
/* decode each block */
if(s->mb_intra || HAS_CBP(h->mtype)){
+ s->dsp.clear_blocks(s->block[0]);
for (i = 0; i < 6; i++) {
if (h261_decode_block(h, s->block[i], i, cbp&32) < 0){
return SLICE_ERROR;
}
cbp+=cbp;
}
+ }else{
+ for (i = 0; i < 6; i++)
+ s->block_last_index[i]= -1;
}
MPV_decode_mb(s, s->block);