comparison vc1.c @ 9541:7afd4f44c450 libavcodec

Display dimensions should not affect the real size of coded frame, thus set only avctx->{width,height} and don't touch coded_{width,height} when parsing them. This fixes the case when coded and display dimensions differ by more than one macroblock.
author kostya
date Thu, 23 Apr 2009 07:14:02 +0000
parents 654f5260a87d
children 2a52dd5a684a
comparison
equal deleted inserted replaced
9540:479e4d868038 9541:7afd4f44c450
973 } 973 }
974 v->s.max_b_frames = v->s.avctx->max_b_frames = 7; 974 v->s.max_b_frames = v->s.avctx->max_b_frames = 7;
975 if(get_bits1(gb)) { //Display Info - decoding is not affected by it 975 if(get_bits1(gb)) { //Display Info - decoding is not affected by it
976 int w, h, ar = 0; 976 int w, h, ar = 0;
977 av_log(v->s.avctx, AV_LOG_DEBUG, "Display extended info:\n"); 977 av_log(v->s.avctx, AV_LOG_DEBUG, "Display extended info:\n");
978 v->s.avctx->coded_width = w = get_bits(gb, 14) + 1; 978 v->s.avctx->width = w = get_bits(gb, 14) + 1;
979 v->s.avctx->coded_height = h = get_bits(gb, 14) + 1; 979 v->s.avctx->height = h = get_bits(gb, 14) + 1;
980 av_log(v->s.avctx, AV_LOG_DEBUG, "Display dimensions: %ix%i\n", w, h); 980 av_log(v->s.avctx, AV_LOG_DEBUG, "Display dimensions: %ix%i\n", w, h);
981 if(get_bits1(gb)) 981 if(get_bits1(gb))
982 ar = get_bits(gb, 4); 982 ar = get_bits(gb, 4);
983 if(ar && ar < 14){ 983 if(ar && ar < 14){
984 v->s.avctx->sample_aspect_ratio = ff_vc1_pixel_aspect[ar]; 984 v->s.avctx->sample_aspect_ratio = ff_vc1_pixel_aspect[ar];