[FFmpeg-devel] [PATCH] avcodec/h264_slice: compute and export film grain seed
Niklas Haas
ffmpeg at haasn.xyz
Thu Aug 12 15:08:56 EEST 2021
On Wed, 04 Aug 2021 19:00:48 +0200 Niklas Haas <ffmpeg at haasn.xyz> wrote:
> + if ((sd = av_frame_get_side_data(cur->f, AV_FRAME_DATA_FILM_GRAIN_PARAMS))) {
> + AVFilmGrainParams *fgp = (AVFilmGrainParams *) sd->data;
> + fgp->seed = cur->poc + h->poc_offset << 5;
> + }
The order on this is wrong, it must be be (h->poc_offset << 5).
I'll submit a new patch when I can verify that I actually get the
correct output. I'm not sure if my grain synthesis code is bugged or if
the seed value is just wrong. (The grain I get looks visually similar,
but completely different)
More information about the ffmpeg-devel
mailing list