mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-04-24 16:40:06 +08:00
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>
This commit is contained in:
@@ -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, ¤t->film_grain, current));
|
||||
|
||||
av_log(ctx->log_ctx, AV_LOG_DEBUG, "Frame %d: size %dx%d "
|
||||
"upscaled %d render %dx%d subsample %dx%d "
|
||||
|
||||
Reference in New Issue
Block a user