PDA

View Full Version : h264 encoding/decoding inloop filtering questions


SealTooGreat
12th March 2007, 12:08
if inloop was disabled when the video was encoded, it will NEVER be enabled during playback, no matter what the decoder preferences say :). Because of this, you should always leave the inloop deblocker in decoder prefs on, unless CPU limitations prevent you from doing so.
There are probably some cases where not using inloop makes sense, but there aren't many. What often does make sense is reducing the power of deblocking during encoding, the x264 defaults at least are often too strong for videos.
You've said that there aren't many cases where inloop(encoding) is not used, so why developers leave possibility to turn it OFF.
Could You give example for these rare cases?

akupenguin
12th March 2007, 16:27
If your CPU isn't fast enough to decode the full video, you have to disable something. And even though disabling loop filter looks bad, it's better than no video at all.

SealTooGreat
12th March 2007, 16:36
^I've meant disable inloop during encoding, not during decoding.

akupenguin
12th March 2007, 17:03
Then because I leave options for everything. x264's interface isn't meant to enforce high quality, it's meant to allow complete configurability. I need configurability for development purposes, and I don't want to maintain a separate branch that only removes features.

SealTooGreat
12th March 2007, 17:43
@akupenguin
I agree with you...but is there any case where inloop during encoding should be disabled?!
If your CPU isn't fast enough to decode the full video, you have to disable something. And even though disabling loop filter looks bad, it's better than no video at all.
For most h264 movies disabling decoder inloop filter looks bad (more bloks and weird few-second color disbalance ), but sometime is not. Why?!

foxyshadis
12th March 2007, 19:56
If the source is high enough quality, and blocking would be minimal and hard to see, or simply nonexistant. Just like MPEG-4 ASP can look fine without post-processing, after all. In fact, there's a formula by which inloop shuts off if a block's quantizer is low enough, because it'd be superfluous.

Time to shut it off, well, if you're aiming for a decoder that can't do inloop (I'm not sure if current PSP and iPod revs can, but they couldn't initially), or if you're using a high enough bitrate that it doesn't matter. Or if you just can't abide by the softening it causes.

Mug Funky
13th March 2007, 01:40
if you want to maintain grain (or at least give the impression of it) at a lower bitrate then turning loop filter off during encoding can help. and speeding things up is always a help (my brand new system can't handle 1080p in realtime just yet unless deblocking is off).

of course there comes a point where it may be better to use xvid. personally i still prefer x264, even with deblocking off, but if CPU is under strain xvid may be the more practical option.

SealTooGreat
13th March 2007, 02:18
Or if you just can't abide by the softening it causes.
So I'm not obligate to use inloop during encodig?!....I've thought that this is something what is "must".

*.mp4 guy
13th March 2007, 02:38
It is better to just lower inloop processing instead of disabling it 99% of the time, but there are specific cases where inloop does more harm then good, thanks to the X264 devs you have the choice whether to use it, or not, just like all of X264's other features.

SealTooGreat
13th March 2007, 04:47
It is better to just lower inloop processing instead of disabling it 99% of the time,
Why is it better(to leave inloop during encoding)?!
but there are specific cases where inloop does more harm then good,
Could you give example?
if inloop was disabled when the video was encoded, it will NEVER be enabled during playback, no matter what the decoder preferences say :).
How do decoder know that?...Is there any appropriate flag in container?

foxyshadis
13th March 2007, 20:14
Mug Funky already gave the most important example. Please, make your own encodings with inloop on and off, the differences should be fairly obvious and should answer your questions.

And yes, of course there's a flag in the header, or it'd be decoded wrong.

SealTooGreat
13th March 2007, 22:15
The reason I've asked those questions is that I don't have any problem disabling x264 encoder inloop(aiming 0.15-0.17bppx) - encode looks fine, but what bother me is that almost all MeGUI's (also Elecard, Recode, Apple, Sorenson etc) Video profiles have inloop enabled, so I've thought I might be doing something wrong. And it's very heartache, how h264 encodes, created by mentioned GUIs, behave while decoder inloop is off, there should be competition for biggest blocks :D(btw has anybody tested h264 encoders that way). Although inloop decoder filtering is part of the AVC standard I don't have this issue while keeping x264 encoder inloop off.
Anyway, thanx for the answers.