View Single Post
Old 20th November 2019, 20:36   #7214  |  Link
markiemarcus
Registered User
 
Join Date: May 2018
Posts: 49
Quote:
Originally Posted by benwaggoner View Post
Grain is essentially uncompressible random noise. It's random spatially and temporally, includes chroma, and is typically very high frequency. So it can use the vast majority of bits encoding a frame, is sensitive to QP differences between I, P, B, and b frames, and is otherwise a worst-case nightmare.

While encoding 4K content might take only 2x the bitrate as 1080p, doing grain is much more linear. 80 Mbps 4K is only twice that of Blu-ray 1080p. There are cases of grain that is quite literally impossible to encode without perceptible artifacts. Heck, just encoding a flat gray slide with JUST grain on it can be very challenging.
I hadn't really considered the HDR component, that makes sense! Grain compressibility is definitely something I've run into when playing around with x265 on very grainy animation. Assuming semi-transparency as a goal, you're lucky to see a 30-40% reduction at 1080p over x264. That's still pretty good (on the otherwise flat cells the difficulties with grain retention are more obvious). I find live action easier in that regard. You can definitely get there, it just requires some care. I've started leaning towards slightly elevated Psy-rd values (in the range of 2.5 to 3.0), but greatly reduced Psy-RDOQ values (typically below 0.5). I discovered that by accident, but reading through the documentation, it seems that RDOQ by design is less accurate.

With very grainy animated sources, it's quite apparent that RDOQ exaggerates grain coarseness even at the default value of 1.0. It serves a purpose for sure (it's great at maintaining/approximating the motion), I'm just careful with it; it can make a right mess of flat scenes if the grain is intermittent. I've had really good results with CTU 64 and QG 64 in most animated content, grainy or otherwise. I can absolutely see why CTU 64 is the default; I don't find it to cause any difficulties whatsoever with grain retention. Quite the opposite.

The curious thing with The Fog is that the bit rate falls drastically in the troublesome scenes. Seems like an authoring error.
markiemarcus is offline   Reply With Quote