gianni-rosato / svt-av1-psy

The Scalable Video Technology for AV1 (SVT-AV1 Encoder and Decoder) with perceptual enhancements for psychovisually optimal AV1 encoding
https://svt-av1-psy.com
BSD 3-Clause Clear License
251 stars 20 forks source link

Film grain/noise estimator #4

Open juliobbv-p opened 10 months ago

juliobbv-p commented 10 months ago

SVT-AV1 currently doesn't have a film grain/noise estimator in its code, so having one will help unlock working on these features:

ILOVEPIE commented 8 months ago

If this is added, another option should be added for inputting a manually de-grained input for encoding along with the original for grain estimation.

gitoss commented 1 month ago

Is this what --fga in VVenC does? https://github.com/fraunhoferhhi/vvenc/commits/master/

vvencapp: VVenC, the Fraunhofer H.266/VVC Encoder, version 1.12.0 [Windows][clang 18.1.8][64 bit][SIMD=AVX2]
#======== Film grain analysis ================
--fga [0] Experimental: Enable film grain analysis and generate FGC SEI message 

And if so, could the open-source code be re-used for SVT-AV1 - or is this part of the VVC code patented, too?

+1 for having such an estimator for a AV1 encoding chain. From all guides I've seen, the amount of denoising and respective noise generation is simply trial and error.

The optimal solution would be to enable automatic photon noise table generation (or at least selection). BlueSwordM's code 'photon_noise_table' is currently outside SVT-AV1.

silverbacknet commented 1 month ago

VVC's specific implementation is patented, but under a BSD license. More importantly, it's vastly different from AV1's method, there's already a perfectly good AV1 implementation, and the glue code to combine it all into a single option that denoises + adds grain tags is very particular to the way the reference encoder is organized; SVT encoders are set up VERY differently. vvenc's implementation would not be helpful.

It really just needs someone motivated enough to link together the right bits in the right spots throughout the codebase, without crowbarring it in too messily. I haven't looked into it enough to know how complex a project that would be.

BlueSwordM commented 1 week ago

Well Julio, we could perhaps port the aomenc-av1 grain synthesis strength estimator. This would specifically be good for all-intra, as it's been a very long while since I've tried it on full video when I worked on aom-av1-psy.

ILOVEPIE commented 1 week ago

Well Julio, we could perhaps port the aomenc-av1 grain synthesis strength estimator. This would specifically be good for all-intra, as it's been a very long while since I've tried it on full video when I worked on aom-av1-psy.

Uh, iirc the libaom grain synthesis stuff is underdeveloped and is kind of just a proof of concept.