aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpeg12.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-07-29 02:09:12 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-07-29 02:09:12 +0000
commit7d1c3fc1d683d53982a1dec14f0f9749a07ae48d (patch)
tree23a9984eef372f9710641e2cb6f302ea9af1727f /libavcodec/mpeg12.c
parent80adda8efd35c920c7ba0c43d530102a2fd22bc3 (diff)
downloadffmpeg-7d1c3fc1d683d53982a1dec14f0f9749a07ae48d.tar.gz
rate distortion mb decision support
fix decoding of old %16!=0 divx fix assertion failure in motion_est.c Originally committed as revision 2094 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r--libavcodec/mpeg12.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 4f007ca3ca..f15b336d2b 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -1924,6 +1924,7 @@ static int mpeg_decode_slice(AVCodecContext *avctx,
s->resync_mb_x= s->mb_x;
s->resync_mb_y= s->mb_y = start_code;
s->mb_skip_run= 0;
+ ff_init_block_index(s);
for(;;) {
s->dsp.clear_blocks(s->block[0]);
@@ -1959,8 +1960,12 @@ static int mpeg_decode_slice(AVCodecContext *avctx,
s->motion_val[xy + 1 + wrap][1] = motion_y;
}
- MPV_decode_mb(s, s->block);
+ s->dest[0] += 16;
+ s->dest[1] += 8;
+ s->dest[2] += 8;
+ MPV_decode_mb(s, s->block);
+
if (++s->mb_x >= s->mb_width) {
if(s->avctx->codec_tag == ff_get_fourcc("VCR2"))
exchange_uv((AVFrame*)s->current_picture_ptr);
@@ -1983,6 +1988,8 @@ static int mpeg_decode_slice(AVCodecContext *avctx,
}else
goto eos;
}
+
+ ff_init_block_index(s);
}
/* skip mb handling */