diff options
author | James Almer <jamrial@gmail.com> | 2017-03-23 15:41:09 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-03-23 15:53:00 -0300 |
commit | 4a5810b6592db74b9c345ea74c4f08f5f490874c (patch) | |
tree | 1cafa314ac13d3be87eb3348edc5ab442a57d2ff /libavcodec/hevc_ps.c | |
parent | b29c8c995f17156204eb074e12b781a94b02c2a9 (diff) | |
parent | f6e2f8a9ffda2247bffba991450990d075ea68e3 (diff) | |
download | ffmpeg-4a5810b6592db74b9c345ea74c4f08f5f490874c.tar.gz |
Merge commit 'f6e2f8a9ffda2247bffba991450990d075ea68e3'
* commit 'f6e2f8a9ffda2247bffba991450990d075ea68e3':
hevcdec: move parameter set parsing into a separate header
Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/hevc_ps.c')
-rw-r--r-- | libavcodec/hevc_ps.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index 53ff8b2278..287b24e832 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -25,8 +25,8 @@ #include "libavutil/imgutils.h" #include "golomb.h" -#include "hevcdec.h" #include "hevc_data.h" +#include "hevc_ps.h" static const uint8_t default_scaling_list_intra[] = { 16, 16, 16, 16, 17, 18, 21, 24, @@ -208,8 +208,8 @@ int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx, rps->num_negative_pics = get_ue_golomb_long(gb); nb_positive_pics = get_ue_golomb_long(gb); - if (rps->num_negative_pics >= MAX_REFS || - nb_positive_pics >= MAX_REFS) { + if (rps->num_negative_pics >= HEVC_MAX_REFS || + nb_positive_pics >= HEVC_MAX_REFS) { av_log(avctx, AV_LOG_ERROR, "Too many refs in a short term RPS.\n"); return AVERROR_INVALIDDATA; } @@ -458,7 +458,7 @@ int ff_hevc_decode_nal_vps(GetBitContext *gb, AVCodecContext *avctx, vps->vps_num_reorder_pics[i] = get_ue_golomb_long(gb); vps->vps_max_latency_increase[i] = get_ue_golomb_long(gb) - 1; - if (vps->vps_max_dec_pic_buffering[i] > MAX_DPB_SIZE || !vps->vps_max_dec_pic_buffering[i]) { + if (vps->vps_max_dec_pic_buffering[i] > HEVC_MAX_DPB_SIZE || !vps->vps_max_dec_pic_buffering[i]) { av_log(avctx, AV_LOG_ERROR, "vps_max_dec_pic_buffering_minus1 out of range: %d\n", vps->vps_max_dec_pic_buffering[i] - 1); goto err; @@ -933,7 +933,7 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, sps->temporal_layer[i].max_dec_pic_buffering = get_ue_golomb_long(gb) + 1; sps->temporal_layer[i].num_reorder_pics = get_ue_golomb_long(gb); sps->temporal_layer[i].max_latency_increase = get_ue_golomb_long(gb) - 1; - if (sps->temporal_layer[i].max_dec_pic_buffering > MAX_DPB_SIZE) { + if (sps->temporal_layer[i].max_dec_pic_buffering > HEVC_MAX_DPB_SIZE) { av_log(avctx, AV_LOG_ERROR, "sps_max_dec_pic_buffering_minus1 out of range: %d\n", sps->temporal_layer[i].max_dec_pic_buffering - 1); return AVERROR_INVALIDDATA; @@ -942,7 +942,7 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, av_log(avctx, AV_LOG_WARNING, "sps_max_num_reorder_pics out of range: %d\n", sps->temporal_layer[i].num_reorder_pics); if (avctx->err_recognition & AV_EF_EXPLODE || - sps->temporal_layer[i].num_reorder_pics > MAX_DPB_SIZE - 1) { + sps->temporal_layer[i].num_reorder_pics > HEVC_MAX_DPB_SIZE - 1) { return AVERROR_INVALIDDATA; } sps->temporal_layer[i].max_dec_pic_buffering = sps->temporal_layer[i].num_reorder_pics + 1; @@ -1123,7 +1123,7 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, sps->log2_diff_max_min_coding_block_size; sps->log2_min_pu_size = sps->log2_min_cb_size - 1; - if (sps->log2_ctb_size > MAX_LOG2_CTB_SIZE) { + if (sps->log2_ctb_size > HEVC_MAX_LOG2_CTB_SIZE) { av_log(avctx, AV_LOG_ERROR, "CTB size out of range: 2^%d\n", sps->log2_ctb_size); return AVERROR_INVALIDDATA; } |