Support film grain
VVenC is now capable of producing bitstreams with FGC SEI messaging.
@6ws, could you provide a command line or clips for this? @QSXW, could you help implement SEI functions? We can start with this and implement all SEIs similarly to HEVC.
When compiled from the master branch, it can be enabled via vvencapp by --fga, or when linked against FFmpeg, by -vvenc-params "FGA=1".
@6ws, could you provide a command line or clips for this? @QSXW, could you help implement SEI functions? We can start with this and implement all SEIs similarly to HEVC.
Sure. I will help support this.
When compiled from the master branch, it can be enabled via vvencapp by
--fga, or when linked against FFmpeg, by-vvenc-params "FGA=1".
Hi. I cannot open the link. Can you help a check?
Try right clicking the link and "Save as". If that doesn't work, I uploaded the raw VVC stream instead.
Hi @6ws. I've added the ability to decode film grain characteristic SEI NAL for VVC. The final thing is to verify if it works like HEVC. Do you also have a sample of the HEVC clip with film grain SEI?
Maybe @nuomi2021 has conformance clips? HEVC with FGC is new and I am unaware of a way to generate streams outside the reference encoder.
not sure too. maybe you can refer to av1, I guess AV1 has this feature too
Hi, @nuomi2021. Where is the best location to apply the film grain filter, which should be used on the frame decoded? The hevc and h264 apply it when the frame end, but looks like we don't have a frame end.
in submit_frame before ff_vvc_frame_submit. is a good place. I guess hw codec will add some code there just like hevc.
in submit_frame before ff_vvc_frame_submit. is a good place. I guess hw codec will add some code there just like hevc.
Maybe not? It needs the frame that has been decoded. I tried and it doesn't work.
Hi @6ws. I've added the support for film grain !257 here. Would you have a try and help review the changes?
@QSXW I am getting build errors. Can you rebase against upstream FFmpeg? Thanks.
@6ws . Sure. Done!
[vvc @ 000001fb955b06c0] Unsupported film grain parameters. Ignoring film grain.
The film grain is still applied despite the warning. Unfortunately, the hashing of the decoded data does not match.
Hi @6ws. I've added the breakpoint and tried to decode station2_1080p25_VVC_FGA.mp4 and the film grain by decoder doesn't seem to be applied. Can you check again?
Unfortunately, the hashing of the decoded data does not match. Do you use the md5 to generate the hash? Is the hash generated after the film grain stage or before?
The film grain is still applied despite the warning. Unfortunately, the hashing of the decoded data does not match.
Film grain, much like a filter, is usually not defined in the spec. As a result, different implementations may produce varying outputs.
sorry for the long waiting @6ws