summaryrefslogtreecommitdiff
path: root/libavcodec/vc1.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-08-31 23:44:21 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-09-01 00:01:21 +0200
commit0ed7bc49a3f7accc4952372b914eb584b1201c86 (patch)
tree48bd1d573e6acc909a9a5c26e94701da489e3184 /libavcodec/vc1.c
parenta9c69362ea930b15cc42fa9f25c5201d370ff156 (diff)
parent5d06f15235c2fa1b6ed2c5af3bc0e3750df4291c (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: (31 commits) libx264: set default thread count to 0 (auto) lavc: cosmetics, group deprecated codec flags mpeg12: add 'scan_offset' private option. h263/p encoder: add 'structured_slices' private option. h263/p encoder: add 'obmc' private option. h263p encoder: add 'aiv' private option. h263p encoder: add 'umv' private option. mpeg12enc/mpeg4videoenc: add 'alternate_scan' private option. mjpegdec: add 'extern_huff' private option. mpeg4enc: add 'data_partitioning' private option. snow: add 'memc_only' private option. libx264: add 'mbtree' private option. libx264: add 'psy' private option. libmp3lame: add 'reservoir' private option. mpeg2enc: add 'non_linear_quant' private option mpeg12enc: add drop_frame_timecode private option. mpeg12enc: add intra_vlc private option. VC1: Support dynamic dimension changes mjpeg: treat external huffman table setup failure as codec init failure if external huffman table use requested lavc: deprecate CODEC_FLAG2_BRDO ... Conflicts: avconv.c libavcodec/libmp3lame.c libavcodec/libx264.c libavcodec/mjpegdec.c libavcodec/mpeg12enc.c libavcodec/mpegvideo.h libavcodec/vc1.c libavcodec/vc1dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vc1.c')
-rw-r--r--libavcodec/vc1.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index 621f33bf62..268ceb3c82 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -454,9 +454,6 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb)
v->finterpflag = get_bits1(gb);
skip_bits1(gb); // reserved
- v->s.h_edge_pos = w;
- v->s.v_edge_pos = h;
-
av_log(v->s.avctx, AV_LOG_DEBUG,
"Advanced Profile level %i:\nfrmrtq_postproc=%i, bitrtq_postproc=%i\n"
"LoopFilter=%i, ChromaFormat=%i, Pulldown=%i, Interlace: %i\n"
@@ -475,10 +472,9 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb)
if(get_bits1(gb)) { //Display Info - decoding is not affected by it
int dw, dh, ar = 0;
av_log(v->s.avctx, AV_LOG_DEBUG, "Display extended info:\n");
- dw = get_bits(gb, 14) + 1;
- dh = get_bits(gb, 14) + 1;
- v->s.avctx->sample_aspect_ratio = av_div_q((AVRational){dw, dh}, (AVRational){w, h});
- av_log(v->s.avctx, AV_LOG_DEBUG, "Display dimensions: %ix%i\n", dw, dh);
+ w = get_bits(gb, 14) + 1;
+ h = get_bits(gb, 14) + 1;
+ av_log(v->s.avctx, AV_LOG_DEBUG, "Display dimensions: %ix%i\n", w, h);
if(get_bits1(gb))
ar = get_bits(gb, 4);
if(ar && ar < 14){
@@ -487,6 +483,12 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb)
w = get_bits(gb, 8) + 1;
h = get_bits(gb, 8) + 1;
v->s.avctx->sample_aspect_ratio = (AVRational){w, h};
+ } else {
+ av_reduce(&v->s.avctx->sample_aspect_ratio.num,
+ &v->s.avctx->sample_aspect_ratio.den,
+ v->s.avctx->height * w,
+ v->s.avctx->width * h,
+ 1<<30);
}
av_log(v->s.avctx, AV_LOG_DEBUG, "Aspect: %i:%i\n", v->s.avctx->sample_aspect_ratio.num, v->s.avctx->sample_aspect_ratio.den);