summaryrefslogtreecommitdiff
path: root/libavcodec/cbs_av1_syntax_template.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2020-11-25 16:56:51 -0300
committerJames Almer <jamrial@gmail.com>2020-11-30 19:12:39 -0300
commitaea80e227327da2f275e9fb14821eac2b57df930 (patch)
tree6e3908b08c1f4012164bb8a5a81a7fb4b92fb09b /libavcodec/cbs_av1_syntax_template.c
parente4c3ec3e00e77e7717a8d081d5e9e4289a44ca58 (diff)
downloadffmpeg-aea80e227327da2f275e9fb14821eac2b57df930.tar.gz
avcodec/cbs_av1: split film grain param fields into their own struct
Cosmetic change in preparation for the following patches. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/cbs_av1_syntax_template.c')
-rw-r--r--libavcodec/cbs_av1_syntax_template.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c
index f866dc7b2e..6fe6e9a4f3 100644
--- a/libavcodec/cbs_av1_syntax_template.c
+++ b/libavcodec/cbs_av1_syntax_template.c
@@ -1194,7 +1194,8 @@ static int FUNC(global_motion_params)(CodedBitstreamContext *ctx, RWContext *rw,
}
static int FUNC(film_grain_params)(CodedBitstreamContext *ctx, RWContext *rw,
- AV1RawFrameHeader *current)
+ AV1RawFilmGrainParams *current,
+ AV1RawFrameHeader *frame_header)
{
CodedBitstreamAV1Context *priv = ctx->priv_data;
const AV1RawSequenceHeader *seq = priv->sequence_header;
@@ -1202,7 +1203,7 @@ static int FUNC(film_grain_params)(CodedBitstreamContext *ctx, RWContext *rw,
int i, err;
if (!seq->film_grain_params_present ||
- (!current->show_frame && !current->showable_frame))
+ (!frame_header->show_frame && !frame_header->showable_frame))
return 0;
flag(apply_grain);
@@ -1212,7 +1213,7 @@ static int FUNC(film_grain_params)(CodedBitstreamContext *ctx, RWContext *rw,
fb(16, grain_seed);
- if (current->frame_type == AV1_FRAME_INTER)
+ if (frame_header->frame_type == AV1_FRAME_INTER)
flag(update_grain);
else
infer(update_grain, 1);
@@ -1635,7 +1636,7 @@ static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, RWContext *rw,
CHECK(FUNC(global_motion_params)(ctx, rw, current));
- CHECK(FUNC(film_grain_params)(ctx, rw, current));
+ CHECK(FUNC(film_grain_params)(ctx, rw, &current->film_grain, current));
av_log(ctx->log_ctx, AV_LOG_DEBUG, "Frame %d: size %dx%d "
"upscaled %d render %dx%d subsample %dx%d "