Log in

View Full Version : Tune Grain Psy-Trellis, Trellis, Deadzone inconsistency?


video_magic
12th February 2012, 06:27
According to some webpages I have read, when looking at better preserving some grain/detail in my videos, if I were to set tune-grain in my videos it would put:

psy-trellis to 0.25,which according to Mewiki x264 settings 'requires trellis>=1 to activate'

but tune grain also sets deadzone-inter & deadzone-intra to 6 ,which according to Mewiki x264 settings and a post by akupenguin 'deadzone is incompatible with Trellis'

Just like to know if Mewiki or some other sources of this information are wrong? Or some thoughts from the x264 team and experts what is the right or preferred usage between Trellis, Psy-Trellis and maybe Deadzone (to 'preserve' detail/grain - or at least the look of doing that when playing back my video).

Thanks in advance.

J_Darnley
12th February 2012, 10:48
--tune grain tries to ensure that regardless of your chosen encoding settings x264 will attempt to preserve grain. The deadzone settings are altered in case you encode without trellis or without RD meaning the deadzone method will be used.

Didée
12th February 2012, 13:33
In this context, you shouldn't over-interpret the word "incompatible".

Deadzone and Trellis are two different ways to do the same task (which coefficients to keep or to drop). Deadzone is a simple "hard threshold" principle, Trellis is a "smart decision" principle. Only either method can be used for a given partition.

With trellis=1, trellis is only used when encoding the final MB. During motion search trellis is not used, so deadzone is active during motion search.

With trellis=2, trellis is used full-fledged during motionsearch, so deadzone has no effect. However even with trellis=2 there are parts that don't use trellis (subsampled pre-motion // frametype decision), so deadzone still is used in those parts.

Also, there's the possibility a user calls a contradicting mix of preset/tune settings (--tune grain --preset veryfast). Since -veryfast disables trellis, it makes sense to have deadzone set by the tune settings, so there still is some effect on film grain.