diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-06-23 04:49:04 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-06-23 04:49:04 +0200 |
commit | 4b87a088bf5acad2a11e9f9c1dcec8f29bab3ec9 (patch) | |
tree | a42f2f7b366968658fcb1797faa5d46351416d09 /libavcodec/h264_ps.c | |
parent | 1af1b527727ccdfcfec8c02fa4e1ff291e9dd932 (diff) | |
parent | 9cd7b8549b71bcfced2062596fd9eecba092aeb1 (diff) | |
download | ffmpeg-4b87a088bf5acad2a11e9f9c1dcec8f29bab3ec9.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
configure: add --optflags option
build: move documentation rules to doc/Makefile
build: move test rules to tests/Makefile
ac3enc: remove unneeded local variable in asym_quant()
ac3enc: remove a branch in asym_quant() by doing 2 shifts
ac3enc: avoid masking output in asym_quant() by using signed values for quantized mantissas.
H.264: fix 4:4:4 + deblocking + 8x8dct + cavlc + MBAFF
H.264: fix 4:4:4 + deblocking + MBAFF
H.264: fix 4:4:4 cropping warning
H.264: reference the correct SPS in decode_scaling_matrices
H.264: fix bug in lossless 4:4:4 decoding
Conflicts:
Makefile
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_ps.c')
-rw-r--r-- | libavcodec/h264_ps.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c index ddfe1d2c64..61fb12ce0c 100644 --- a/libavcodec/h264_ps.c +++ b/libavcodec/h264_ps.c @@ -281,12 +281,12 @@ static void decode_scaling_matrices(H264Context *h, SPS *sps, PPS *pps, int is_s decode_scaling_list(h,scaling_matrix4[5],16,default_scaling4[1],scaling_matrix4[4]); // Inter, Cb if(is_sps || pps->transform_8x8_mode){ decode_scaling_list(h,scaling_matrix8[0],64,default_scaling8[0],fallback[2]); // Intra, Y - if(h->sps.chroma_format_idc == 3){ + if(sps->chroma_format_idc == 3){ decode_scaling_list(h,scaling_matrix8[1],64,default_scaling8[0],scaling_matrix8[0]); // Intra, Cr decode_scaling_list(h,scaling_matrix8[2],64,default_scaling8[0],scaling_matrix8[1]); // Intra, Cb } decode_scaling_list(h,scaling_matrix8[3],64,default_scaling8[1],fallback[3]); // Inter, Y - if(h->sps.chroma_format_idc == 3){ + if(sps->chroma_format_idc == 3){ decode_scaling_list(h,scaling_matrix8[4],64,default_scaling8[1],scaling_matrix8[3]); // Inter, Cr decode_scaling_list(h,scaling_matrix8[5],64,default_scaling8[1],scaling_matrix8[4]); // Inter, Cb } @@ -396,6 +396,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){ #endif sps->crop= get_bits1(&s->gb); if(sps->crop){ + int crop_limit = sps->chroma_format_idc == 3 ? 16 : 8; sps->crop_left = get_ue_golomb(&s->gb); sps->crop_right = get_ue_golomb(&s->gb); sps->crop_top = get_ue_golomb(&s->gb); @@ -403,7 +404,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){ if(sps->crop_left || sps->crop_top){ av_log(h->s.avctx, AV_LOG_ERROR, "insane cropping not completely supported, this could look slightly wrong ...\n"); } - if(sps->crop_right >= (8<<CHROMA444) || sps->crop_bottom >= (8<<CHROMA444)){ + if(sps->crop_right >= crop_limit || sps->crop_bottom >= crop_limit){ av_log(h->s.avctx, AV_LOG_ERROR, "brainfart cropping not supported, this could look slightly wrong ...\n"); } }else{ |