diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2011-08-16 17:05:44 +0200 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-10-21 01:00:41 -0700 |
commit | 76741b0e56bfbc74cfa32ff59e15cf420463569b (patch) | |
tree | e52409a6a6bf1b94c33e8c13fbb67f690f707c09 /libavcodec/h264_ps.c | |
parent | dc49bf127010fdff2c3282755407cedd429475f5 (diff) | |
download | ffmpeg-76741b0e56bfbc74cfa32ff59e15cf420463569b.tar.gz |
h264: 4:2:2 intra decoding support
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavcodec/h264_ps.c')
-rw-r--r-- | libavcodec/h264_ps.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c index 677ca80abb..76bf116a3f 100644 --- a/libavcodec/h264_ps.c +++ b/libavcodec/h264_ps.c @@ -396,7 +396,8 @@ 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; + int crop_vertical_limit = sps->chroma_format_idc & 2 ? 16 : 8; + int crop_horizontal_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); @@ -404,7 +405,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 >= crop_limit || sps->crop_bottom >= crop_limit){ + if(sps->crop_right >= crop_horizontal_limit || sps->crop_bottom >= crop_vertical_limit){ av_log(h->s.avctx, AV_LOG_ERROR, "brainfart cropping not supported, this could look slightly wrong ...\n"); } }else{ |