summaryrefslogtreecommitdiff
path: root/libavcodec/hevc_ps.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-08-21 18:02:02 +0200
committerAnton Khirnov <anton@khirnov.net>2016-10-16 20:26:47 +0200
commitf6e2f8a9ffda2247bffba991450990d075ea68e3 (patch)
tree9493109957348fdc0069541e7c1762db61d503a3 /libavcodec/hevc_ps.c
parent150c896a9e46b23b97debb0a5f66fbaeaa32f153 (diff)
downloadffmpeg-f6e2f8a9ffda2247bffba991450990d075ea68e3.tar.gz
hevcdec: move parameter set parsing into a separate header
This code is independent from the decoder, so it makes more sense for it to to have its own header.
Diffstat (limited to 'libavcodec/hevc_ps.c')
-rw-r--r--libavcodec/hevc_ps.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index 44db326cf3..6a8cfebaf7 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -26,8 +26,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,
@@ -200,8 +200,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;
}
@@ -406,7 +406,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) {
+ if (vps->vps_max_dec_pic_buffering[i] > HEVC_MAX_DPB_SIZE) {
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;
@@ -794,7 +794,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);
ret = AVERROR_INVALIDDATA;
@@ -804,7 +804,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) {
ret = AVERROR_INVALIDDATA;
goto err;
}
@@ -955,7 +955,7 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
goto err;
}
- 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);
goto err;
}