diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-04-29 14:01:15 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-29 14:23:45 +0300 |
commit | ab7ad5e6a1b8359b169e7bcbe96ce7162d0c0002 (patch) | |
tree | 884b721a07e241495ab86a2317d929a8b71dbee8 /libavcodec/h264.c | |
parent | 580c86925ddf8c85d2e6f57ed55dd75853748b29 (diff) | |
parent | ee62b364be0c30cba83b5ff10a3ca8c3e866ade6 (diff) |
Merge commit 'ee62b364be0c30cba83b5ff10a3ca8c3e866ade6'
* commit 'ee62b364be0c30cba83b5ff10a3ca8c3e866ade6':
h264: eliminate ff_h264_set_parameter_from_sps()
Conflicts:
libavcodec/h264.c
libavcodec/h264.h
libavcodec/h264_slice.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index e2a2aec0be..61ad63733b 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1206,54 +1206,6 @@ int ff_h264_get_profile(SPS *sps) return profile; } -int ff_h264_set_parameter_from_sps(H264Context *h) -{ - if (h->flags & CODEC_FLAG_LOW_DELAY || - (h->sps.bitstream_restriction_flag && - !h->sps.num_reorder_frames)) { - if (h->avctx->has_b_frames > 1 || h->delayed_pic[0]) - av_log(h->avctx, AV_LOG_WARNING, "Delayed frames seen. " - "Reenabling low delay requires a codec flush.\n"); - else - h->low_delay = 1; - } - - if (h->avctx->has_b_frames < 2) - h->avctx->has_b_frames = !h->low_delay; - - if (h->cur_bit_depth_luma != h->sps.bit_depth_luma || - h->cur_chroma_format_idc != h->sps.chroma_format_idc) { - if (h->avctx->codec && - h->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU && - (h->sps.bit_depth_luma != 8 || h->sps.chroma_format_idc > 1)) { - av_log(h->avctx, AV_LOG_ERROR, - "VDPAU decoding does not support video colorspace.\n"); - return AVERROR_INVALIDDATA; - } - if (h->sps.bit_depth_luma >= 8 && h->sps.bit_depth_luma <= 14 && - h->sps.bit_depth_luma != 11 && h->sps.bit_depth_luma != 13) { - h->cur_bit_depth_luma = - h->avctx->bits_per_raw_sample = h->sps.bit_depth_luma; - h->cur_chroma_format_idc = h->sps.chroma_format_idc; - h->pixel_shift = h->sps.bit_depth_luma > 8; - - ff_h264dsp_init(&h->h264dsp, h->sps.bit_depth_luma, - h->sps.chroma_format_idc); - ff_h264chroma_init(&h->h264chroma, h->sps.bit_depth_chroma); - ff_h264qpel_init(&h->h264qpel, h->sps.bit_depth_luma); - ff_h264_pred_init(&h->hpc, h->avctx->codec_id, h->sps.bit_depth_luma, - h->sps.chroma_format_idc); - - ff_videodsp_init(&h->vdsp, h->sps.bit_depth_luma); - } else { - av_log(h->avctx, AV_LOG_ERROR, "Unsupported bit depth %d\n", - h->sps.bit_depth_luma); - return AVERROR_INVALIDDATA; - } - } - return 0; -} - int ff_set_ref_count(H264Context *h, H264SliceContext *sl) { int ref_count[2], list_count; |