Skip to content

Commit

Permalink
avcodec/vvc/dec: support removing film grain params from side data
Browse files Browse the repository at this point in the history
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
  • Loading branch information
QSXW committed Aug 6, 2024
1 parent 9e189c8 commit 7023f9f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libavcodec/vvc/refs.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ int ff_vvc_output_frame(VVCContext *s, VVCFrameContext *fc, AVFrame *out, const
if (frame->needs_fg && (ret = av_frame_copy_props(frame->frame_grain, frame->frame)) < 0)
return ret;

if (!(s->avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN))
av_frame_remove_side_data(out, AV_FRAME_DATA_FILM_GRAIN_PARAMS);

if (frame->flags & VVC_FRAME_FLAG_BUMPING)
ff_vvc_unref_frame(fc, frame, VVC_FRAME_FLAG_OUTPUT | VVC_FRAME_FLAG_BUMPING);
else
Expand Down

0 comments on commit 7023f9f

Please sign in to comment.