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 5th September 2011, 18:04   #1  |  Link
goldenpi
Registered User
 
Join Date: Jul 2011
Posts: 10
Experimental little deblock-tuning script.

I've been dabbling in a little project of late, and while I know it's probably worthless, I would like to hear the thoughts of some people more knowledgeable on video encoding than me.

http://birds-are-nice.me/programming/ponymath.shtml

It's a very basic script. You give it a video, and it encodes it lots of times with x264 - always at the same bitrate, each time varying just the deblocking parameters. Then it draws a graph showing how the SSIM changes with the deblocking, so you can see exactly which values are best for that particular video and settings.

Actually, it suggests 0,0 on almost all video. Turns out the defaults are actually pretty good in most cases. It's only if you're doing very low bitrates (streaming and such) or animation that this might come in handy, and even then the improvement in SSIM I've been able to achieve from fine-tuning deblocking alone is miniscule. It's just a research project, rather than a tool for serious use, but I thought some here might find it interesting or have some insights into other uses for it. If nothing else, anyone who knows even the tiniest bit of perl can easily modify this in order to graph the effect of varying other parameters. It even supports resuming if the many-hours-long task of multiple encodes is interrupted.
goldenpi is offline   Reply With Quote
Old 5th September 2011, 18:17   #2  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
so you can see exactly which values are best for that particular video and settings.
Tuning deblock values for metrics tends to be a fool's errand at best, though perhaps SSIM is less horrible than PSNR to tune for.
Dark Shikari is offline   Reply With Quote
Old 6th September 2011, 07:44   #3  |  Link
goldenpi
Registered User
 
Join Date: Jul 2011
Posts: 10
I know. It provides a good suggestion of what to use, but that's really about it. You'd still have to verify it by just comparing encodes to see what looks better.

It isn't a very useful program, but there is no way to be entirely sure the approach will fail without trying it. I've tried, and concluded that it works... but just barely, not enough to be practical.
goldenpi is offline   Reply With Quote
Old 12th September 2011, 07:44   #4  |  Link
Shevach
Video compressionist
 
Join Date: Jun 2009
Location: Israel
Posts: 126
I would like to arise an issue which is not directly related to the discussed topic but that issue has some practical value.

Deblocking filtering on a decoder side (as well as an encoder's side) is time-consuming process. Let's consider a situation when a decoder has a performance problem to keep real-time decoding. In such case the decoder can voluntarily desides to disable the deblocking filtering in order to improve performance, despite this act leads to asynchronization with the encoder.
If the deblocking filtering is disabled on non-reference pictures then viusal impairments is not temporarily propagated.
On the other hand when the deblocking filtering is disabled on reference pictures then visual distortion expected to be significant, especiall on smooth (flat) video material.

In some applications it's necessary to keep real-time decoding on account of some visual degradation.

In HVS there is a spatial masking (I suppose that this function is executed by cortex and not by eye). The spatial masking makes invisible visual distortions caused by voluntarily disabling of deblocking filter. The question is how to choose a metric to gauge spatial masking effect?
Shevach is offline   Reply With Quote
Reply

Tags
deblocking, ponymath

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 09:07.


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