From 07596e45c5a0195b6e4e57597497ec7066817739 Mon Sep 17 00:00:00 2001 From: James Almer Date: Mon, 8 May 2017 15:46:24 -0300 Subject: avcodec/h264dec: export cropping information instead of handling it internally This merges commit c3e84820d67cb1d8cfb4196f9b43971308a81571 from libav, originally written by Anton Khirnov and skipped in fc63d5ceb357c4b760cb02772de0b50d0557140f. libavcodec/h264_picture.c | 3 --- libavcodec/h264_ps.c | 9 --------- libavcodec/h264_slice.c | 25 +++++++++++++++++++------ libavcodec/h264dec.c | 13 +------------ libavcodec/h264dec.h | 9 +++++---- 5 files changed, 25 insertions(+), 34 deletions(-) --- libavcodec/h264_ps.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'libavcodec/h264_ps.c') diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c index 785836123e..b7d5f65d32 100644 --- a/libavcodec/h264_ps.c +++ b/libavcodec/h264_ps.c @@ -533,15 +533,6 @@ int ff_h264_decode_seq_parameter_set(GetBitContext *gb, AVCodecContext *avctx, int step_x = 1 << hsub; int step_y = (2 - sps->frame_mbs_only_flag) << vsub; - if (crop_left & (0x1F >> (sps->bit_depth_luma > 8)) && - !(avctx->flags & AV_CODEC_FLAG_UNALIGNED)) { - crop_left &= ~(0x1F >> (sps->bit_depth_luma > 8)); - av_log(avctx, AV_LOG_WARNING, - "Reducing left cropping to %d " - "chroma samples to preserve alignment.\n", - crop_left); - } - if (crop_left > (unsigned)INT_MAX / 4 / step_x || crop_right > (unsigned)INT_MAX / 4 / step_x || crop_top > (unsigned)INT_MAX / 4 / step_y || -- cgit v1.2.3