comparison mpegvideo.c @ 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 b5c30624da37
children 638187aad3aa
comparison
equal deleted inserted replaced
9361:53e5c6a453e9 9362:fc417197fe11
442 */ 442 */
443 av_cold int MPV_common_init(MpegEncContext *s) 443 av_cold int MPV_common_init(MpegEncContext *s)
444 { 444 {
445 int y_size, c_size, yc_size, i, mb_array_size, mv_table_size, x, y, threads; 445 int y_size, c_size, yc_size, i, mb_array_size, mv_table_size, x, y, threads;
446 446
447 if(s->codec_id == CODEC_ID_MPEG2VIDEO && !s->progressive_sequence)
448 s->mb_height = (s->height + 31) / 32 * 2;
449 else
447 s->mb_height = (s->height + 15) / 16; 450 s->mb_height = (s->height + 15) / 16;
448 451
449 if(s->avctx->pix_fmt == PIX_FMT_NONE){ 452 if(s->avctx->pix_fmt == PIX_FMT_NONE){
450 av_log(s->avctx, AV_LOG_ERROR, "decoding to PIX_FMT_NONE is not supported.\n"); 453 av_log(s->avctx, AV_LOG_ERROR, "decoding to PIX_FMT_NONE is not supported.\n");
451 return -1; 454 return -1;