Mercurial > libavcodec.hg
changeset 9362:fc417197fe11 libavcodec
Fix mb_height for interlaced mpeg2.
This correctly fixes issue961, thanks to steven warren for spotting my mistake.
author | michael |
---|---|
date | Wed, 08 Apr 2009 20:48:44 +0000 |
parents | 53e5c6a453e9 |
children | 203dc1dc297c |
files | mpeg12.c mpegvideo.c |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mpeg12.c Wed Apr 08 20:26:18 2009 +0000 +++ b/mpeg12.c Wed Apr 08 20:48:44 2009 +0000 @@ -1160,7 +1160,7 @@ int slice_count; int swap_uv;//indicate VCR2 int save_aspect_info; - int save_width, save_height; + int save_width, save_height, save_progressive_seq; AVRational frame_rate_ext; ///< MPEG-2 specific framerate modificator } Mpeg1Context; @@ -1238,6 +1238,7 @@ s1->save_width != s->width || s1->save_height != s->height || s1->save_aspect_info != s->aspect_ratio_info|| + s1->save_progressive_seq != s->progressive_sequence || 0) { @@ -1256,6 +1257,7 @@ s1->save_aspect_info = s->aspect_ratio_info; s1->save_width = s->width; s1->save_height = s->height; + s1->save_progressive_seq = s->progressive_sequence; /* low_delay may be forced, in this case we will have B-frames * that behave like P-frames. */
--- a/mpegvideo.c Wed Apr 08 20:26:18 2009 +0000 +++ b/mpegvideo.c Wed Apr 08 20:48:44 2009 +0000 @@ -444,6 +444,9 @@ { int y_size, c_size, yc_size, i, mb_array_size, mv_table_size, x, y, threads; + if(s->codec_id == CODEC_ID_MPEG2VIDEO && !s->progressive_sequence) + s->mb_height = (s->height + 31) / 32 * 2; + else s->mb_height = (s->height + 15) / 16; if(s->avctx->pix_fmt == PIX_FMT_NONE){