comparison mpeg12.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 54bc8a2727b0
children 54f2b18af736
comparison
equal deleted inserted replaced
9361:53e5c6a453e9 9362:fc417197fe11
1158 int repeat_field; /* true if we must repeat the field */ 1158 int repeat_field; /* true if we must repeat the field */
1159 AVPanScan pan_scan; /** some temporary storage for the panscan */ 1159 AVPanScan pan_scan; /** some temporary storage for the panscan */
1160 int slice_count; 1160 int slice_count;
1161 int swap_uv;//indicate VCR2 1161 int swap_uv;//indicate VCR2
1162 int save_aspect_info; 1162 int save_aspect_info;
1163 int save_width, save_height; 1163 int save_width, save_height, save_progressive_seq;
1164 AVRational frame_rate_ext; ///< MPEG-2 specific framerate modificator 1164 AVRational frame_rate_ext; ///< MPEG-2 specific framerate modificator
1165 1165
1166 } Mpeg1Context; 1166 } Mpeg1Context;
1167 1167
1168 static av_cold int mpeg_decode_init(AVCodecContext *avctx) 1168 static av_cold int mpeg_decode_init(AVCodecContext *avctx)
1236 avctx->coded_width != s->width || 1236 avctx->coded_width != s->width ||
1237 avctx->coded_height != s->height|| 1237 avctx->coded_height != s->height||
1238 s1->save_width != s->width || 1238 s1->save_width != s->width ||
1239 s1->save_height != s->height || 1239 s1->save_height != s->height ||
1240 s1->save_aspect_info != s->aspect_ratio_info|| 1240 s1->save_aspect_info != s->aspect_ratio_info||
1241 s1->save_progressive_seq != s->progressive_sequence ||
1241 0) 1242 0)
1242 { 1243 {
1243 1244
1244 if (s1->mpeg_enc_ctx_allocated) { 1245 if (s1->mpeg_enc_ctx_allocated) {
1245 ParseContext pc= s->parse_context; 1246 ParseContext pc= s->parse_context;
1254 avcodec_set_dimensions(avctx, s->width, s->height); 1255 avcodec_set_dimensions(avctx, s->width, s->height);
1255 avctx->bit_rate = s->bit_rate; 1256 avctx->bit_rate = s->bit_rate;
1256 s1->save_aspect_info = s->aspect_ratio_info; 1257 s1->save_aspect_info = s->aspect_ratio_info;
1257 s1->save_width = s->width; 1258 s1->save_width = s->width;
1258 s1->save_height = s->height; 1259 s1->save_height = s->height;
1260 s1->save_progressive_seq = s->progressive_sequence;
1259 1261
1260 /* low_delay may be forced, in this case we will have B-frames 1262 /* low_delay may be forced, in this case we will have B-frames
1261 * that behave like P-frames. */ 1263 * that behave like P-frames. */
1262 avctx->has_b_frames = !(s->low_delay); 1264 avctx->has_b_frames = !(s->low_delay);
1263 1265