View Full Version : In-loop deblocking, should it ever be disabled?
MatLz
19th August 2009, 13:54
Hi guys, I have just noticed today dgavcdec had an in-loop deblocking filter, but without adjusts. What are the default values? Same as dgdecode?
neuron2
19th August 2009, 13:56
It does not have its own filter. There is just the capability to disable the AVC standard in-loop deblocking. It's not a good idea to disable it, I should not have included that option.
MatLz
19th August 2009, 14:11
It does not have its own filter. There is just the capability to disable the AVC standard in-loop deblocking. It's not a good idea to disable it, I should not have included that option.
Yes you are right, there are some very bad artifacts without it!
Thanks.
Revgen
19th August 2009, 20:31
Yes you are right, there are some very bad artifacts without it!
Thanks.
I asked for it 2 years ago because inloop looked awful. It blured way too much and it was just better not having it and just using avisynths deblockers. I don't know if it was x264 or ffdshow, but it just didn't look right back then.
Things change quite a bit in 2 years.
MatLz
19th August 2009, 21:19
Look at this.
Setting are defaults (on,0,0).
It blurs just a little. Artifacts are gone.
neuron2
19th August 2009, 21:22
Please use a hosting site for large attachments in the future.
MatLz
19th August 2009, 21:36
Please use a hosting site for large attachments in the future.
I can't. I'm on a phone. I saw many pics displayed on posts, but I can't do that.
MatLz
20th August 2009, 23:48
There is just the capability to disable the AVC standard in-loop deblocking. It's not a good idea to disable it... .
Ok. But if an encoding has better quality without. If it's bluring a little with no need of that, is possible to extract the stream without the in-loop deblocking?
neuron2
20th August 2009, 23:51
I don't know what you mean by "extract the stream".
As already mentioned, you can disable the deblocking when serving with a script.
If you mean when demuxing the video, then the answer is no.
You should not disable it, because the deblocked frames are used for reference and so artifacts will get progressively worse until the next IDR.
MatLz
21st August 2009, 00:11
If you mean when demuxing the video, then the answer is no.
Yes I meaned that. I've noticed with some of my recent encoding a little return of some details since the preview with deblocking disabled, and without more artifacts. (I do good job ;-) )
Anyway...
Thanks.
LoRd_MuldeR
21st August 2009, 00:48
MatLz, if you encoded a H.264 stream with Deblocking enabled, then all P-Frames and B-Frames will reference to the deblocked frames. That's why it's called "In-Loop" deblocking. You can force the decoder to skip the deblocking part, yes. But this is not recommended at all, because this will result in corrupted output! The image will not only be more "blocky", there will also be additional artifacts. These artifacts appear because the frames that were originally encoded with reference to the deblocked frames will now reference to non-deblocked frames. Decoding P- and B-Frames with "wrong" reference data will result in bad output for obvious reasons. Even worse: These errors will sum up, until the next IDR-Frame is reached! So the one and only proper way to "remove" the H.264 Inloop-Deblocking is re-encoding from your original source, this time with deblocking disabled. But I recommend that you try to lower the deblocking alpha/beta values to -1:-1 or -2:-2 before you completely disable the deblocking...
(BTW: Some decoders offer the option to skip the Deblocking only on frames that are not referenced by other frames to avoid display errors. But this is mainly intended as a speed-up trick, I think)
MatLz
21st August 2009, 01:33
I understand.
I think I will can try to reencode my sources directly without the deblocking cause it's just animes with a nice little grain. The precedent result was very good, limit excellent, but we search always the perfection...it's same as addiction...(can I say that?)
With a qf of 0.14, I think x264 can do that. Let's go!
Thanks.
LoRd_MuldeR
21st August 2009, 01:52
I think I will can try to reencode my sources directly without the deblocking cause it's just animes with a nice little grain.
Well, this is getting off-topic, but actually Anime/Cartoon should be the kind of source that benefits most from Inloop-Deblocking, because there usually is few texture in Anime.
x264's "--tune animation" parameter raises the deblocking to 1:1 for a reason, while "--tune film" will lower deblocking to -1:-1 (and "--tune grain" even lowers deblocking to -2:-2).
Anyway, before you completely disable deblocking, you may try reasonable negative alpha/beta values first...
With a qf of 0.14, I think x264 can do that. Let's go!
Sorry, qf?
MatLz
21st August 2009, 03:05
For "qf" I meaned quality factor ( bits/(pixels*frame) ).
Anime yes, but really grainy, lot of details, lot of colors, not like as actual animes. It's between film and anime,...so...I will try to disable it.
Blue_MiSfit
21st August 2009, 03:50
It's been said a billion times on this forum, but I'll do the copypasta anyway :) bits / (pixel * frame) isn't really a good way to evaluate how well a source will compress, because it has nothing to do with the complexity of the source.
I can understand your frustration with deblocking, but I assure you (from my experience, anyway) that leaving deblocking on, at reduced settings (-1,-1 or -2,-2 work well for me) usually produces more pleasing results than encoding with deblocking disabled.
It's all up to you, of course!
~MiSfit
MatLz
21st August 2009, 05:15
[For b/pf, I agree, Blue_Misfit. But, only for people who don't know their sources I think]
The best way to obtain good results is tests and tests. I will begin without, then if no good happens, I will increase progressively the values...but I think about it...threshold and strenght are independant... Lot of combinaisons are possible.
PS: previously "deblock.zip" posted isn't in rapport with new needed.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.