Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd December 2021, 20:40   #1  |  Link
andiandi
Registered User
 
Join Date: Aug 2017
Posts: 58
Deblock settings correlation question

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.
andiandi is offline   Reply With Quote
Old 2nd December 2021, 23:42   #2  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
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.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 4th December 2021, 21:16   #3  |  Link
andiandi
Registered User
 
Join Date: Aug 2017
Posts: 58
Quote:
Originally Posted by benwaggoner View Post
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 ?

Last edited by andiandi; 4th December 2021 at 21:47.
andiandi is offline   Reply With Quote
Old 7th December 2021, 19:54   #4  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
Quote:
Originally Posted by andiandi View Post
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!
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 8th December 2021, 18:19   #5  |  Link
andiandi
Registered User
 
Join Date: Aug 2017
Posts: 58
Quote:
Originally Posted by benwaggoner View Post
-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.p...93#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).

Last edited by andiandi; 8th December 2021 at 18:52.
andiandi is offline   Reply With Quote
Old 10th December 2021, 00:10   #6  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
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.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 10th December 2021, 17:21   #7  |  Link
andiandi
Registered User
 
Join Date: Aug 2017
Posts: 58
Quote:
Originally Posted by benwaggoner View Post
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.
andiandi is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 22:33.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.