Log in

View Full Version : Deblock settings correlation question


andiandi
2nd December 2021, 20:40
Hi,

I'm wondering if it's better to have the same two deblocking settings (e.g. -2,-2) rather than different values, because to me values like -2,0 look better (any change of the second value is worse to me, so I prefer not to touch it) but since x264 presets use two similar values (-1,-1 film / -2,-2 grain / 1,1 animation) and some guides give the same advise, as followed :

"Try to keep a positive correlation between the two settings. That is, if you want heavier deblocking, make sure to increase the threshold so that more gets deblocked, and vise versa (1,1; 2,2; -1,-1; etc). Recall the comparison with the clothes washing: you don't want to heavily wash a small area while the rest remains unwashed; the unwashed areas will stand out more in stark vividness and provide an ugly visual effect." source : http://komisar.gin.by/x264info.html

I'm still confused.

benwaggoner
2nd December 2021, 23:42
I've seen a few cases where people might have them offset by 1 and maybe 2. I've not seen much evidence where very different values are helpful, but I can sort of imagine scenarios like very sharp motion graphics. I don't know that anyone has done much comprehensive testing in years, though. I expect >>99% of x264 encoding uses either 0,0 (default), -1,-1 (tune film), or 2,2 (tune animation).

Gary Sullivan once told me he felt in retrospect that 0,0 was too strong by default, psychovisually. Lots of H.264 development testing was done targeting low bitrate QCIF.

One of the benefits of High Profile is that 8x8 blocks leave the center pixels untouched by the in-loop deblocking filter.

andiandi
4th December 2021, 21:16
I've seen a few cases where people might have them offset by 1 and maybe 2. I've not seen much evidence where very different values are helpful, but I can sort of imagine scenarios like very sharp motion graphics. I don't know that anyone has done much comprehensive testing in years, though. I expect >>99% of x264 encoding uses either 0,0 (default), -1,-1 (tune film), or 2,2 (tune animation).

Gary Sullivan once told me he felt in retrospect that 0,0 was too strong by default, psychovisually. Lots of H.264 development testing was done targeting low bitrate QCIF.

One of the benefits of High Profile is that 8x8 blocks leave the center pixels untouched by the in-loop deblocking filter.

Thank you,

So let's say I still use -2,0 (even if it's not that helpful), isn't there some predictable issues or known issues, such as some blocks being too sharp compared to the others being too blurry ? (as it seems to be argued in the guide I posted).

And can we consider such settings as reasonable values like -1,-1 ?

benwaggoner
7th December 2021, 19:54
So let's say I still use -2,0 (even if it's not that helpful), isn't there some predictable issues or known issues, such as some blocks being too sharp compared to the others being too blurry ? (as it seems to be argued in the guide I posted).

And can we consider such settings as reasonable values like -1,-1 ?
-1,-1 is the --tune film default, and very commonly used. Arguably it should have been the default strength.

I can imagine you'd see weird effects with a big divergence. Try -7,7 and 7,-7 and see what happens!

andiandi
8th December 2021, 18:19
-1,-1 is the --tune film default, and very commonly used. Arguably it should have been the default strength.

I can imagine you'd see weird effects with a big divergence. Try -7,7 and 7,-7 and see what happens!


I tested this and it was very interesting and it cleared things up.

I didn't particularly noticed any odd issues (apart from blocking of course) such as sharp blocks VS blurry blocks, but I rather noticed an effect on global details for the first value (alpha deblocking) and on flat areas for the second one (beta deblocking).

Before that, I was more confused if the second value (beta deblocking) had an effect on the amount of blocks to deblock or on details in flat areas (like this post suggests https://forum.doom9.org/showthread.php?p=1692393#post1692393). This test tends to show that it's the latter.

So I guess it's relevant to change the second value slightly (-1,-1...), rather than using -2,0 even though it seemed better to my eyes (correct me if I'm wrong).

benwaggoner
10th December 2021, 00:10
The ultimate test is how good it looks. If your content with your parameters looks better with -2,0, then it is better in the ways that matter.

Those settings might not be universal across content, parameters, and personal taste, of course.

andiandi
10th December 2021, 17:21
The ultimate test is how good it looks. If your content with your parameters looks better with -2,0, then it is better in the ways that matter.

Those settings might not be universal across content, parameters, and personal taste, of course.

Ok, I'll do further comparisons between -2,0 and -1,-1 (and maybe -2,-1) since the last test showed some benefits lowering beta deblocking, and I'll keep the best.

Thanks again for your help.