View Full Version : Why does ffdshow's deband significantly raise bitrate?
Chengbin
24th July 2009, 02:47
I've been using ffdshow's deband to clean up banding on dark videos. But one thing I noticed is the debanded video require significantly more bitrate in CRF (I know). Why does this happen?
LoRd_MuldeR
24th July 2009, 04:17
Maybe because smooth gradients are "harder" to encode than banding?
thewebchat
24th July 2009, 05:05
Except that DeBand does not make gradients any smoother?
@Chengbin: ffdshow DeBand is a clone of the filter GradFun2DB. It works by spamming lots of grain so that you can't see the banding anymore (but it's still there). Obviously grain wastes bits so your crf size goes up.
Dark Shikari
24th July 2009, 05:07
Except that DeBand does not make gradients any smoother?
@Chengbin: ffdshow DeBand is a clone of the filter GradFun2DB. It works by spamming lots of grain so that you can't see the banding anymore (but it's still there). Obviously grain wastes bits so your crf size goes up.gradfun2db has nothing to do with grain. The process is called dithering.
MadRat
24th July 2009, 13:26
Dithering adds noise at the edges of color bands to fool your eyes into thinking there are smooth color transitions. It doesn't have to be random noise, it can be very well organized, but the point is dither takes pixels of one color and sprinkles them into the adjoining color area. Most MPEG type video compression records only the changes from the pervious frame. More changes from frame to frame means more data has to be stored and the larger the file size. Adding noise to the image means there are more differences between frames so there has to be larger file sizes to make up for it. You have to find a balance between ugly video with small file size and beautiful video and gigantic file size. (Hope this make sense it's 5:30am and I haven't been to bed yet.)
Chengbin
24th July 2009, 14:31
Except that DeBand does not make gradients any smoother?
@Chengbin: ffdshow DeBand is a clone of the filter GradFun2DB. It works by spamming lots of grain so that you can't see the banding anymore (but it's still there). Obviously grain wastes bits so your crf size goes up.
Really? I get very terrible results with gradfun2db. I don't think it is a clone.
Dark Shikari
24th July 2009, 17:29
Really? I get very terrible results with gradfun2db. I don't think it is a clone.Isn't the placebo effect great? They're the exact same filter.
Chengbin
25th July 2009, 01:53
Hmm, they are the same. Why did my eyes disagree before?
lych_necross
25th July 2009, 07:31
Beer Goggles?
OvejaNegra
30th September 2009, 22:00
Oh, im confused here, maybe someone can help me with all this (remember i encode most of the time anime):
Grain is the noise we see on film because of the nature of the celuloid
BUT dithering is an intentional noise added to the clean material (like modern produced animation) to avoid banding during the color bits reduction
Also, dithering is intentional noise we can add with filters to reduce or hide banding.
i'm i rigth?
my problem:
Grain reduces compresibility.
dithering reduces compresibility.
If i filter the grain and the dithering of my DVD prior to encoding i'm in risk of create/ reveal banding (but compresibility will be better)
On the other hand, some settings on x264 can eats the grain / dithering and my encodes will have banding even if the source is not filtered.
So what can i do:
1 - dont filter grain/ dither and try to preserve grain/ dither with x264 (more bit rate needed) -> please reccomend settings for animation or general use
2 - filter grain / dither -> creates banding -> add dither (AGAIN?) to hide banding (more bit rate needed) and try to preserve that noise with x264 -> nonsense right?
3 - filter the grain / dither -> create banding (who cares) encode (less bit rate needed) -> add dithering during playback with ffdshow (more sense to me))
4 - Use grain-eating settings with x264 to clean the picture (faster encoding) ->add dithering during playback -> please reccomend settings if this makes sense
5-?
The thing is sometimes i see posts like:
a-> Hey i have banding after my using filter XXXXX!!! (hey i'm removing all this ugly noise to save bit rate)
b-> Dont worry just use GradFun2DB!! (just put the noise back)
a-> Thank you, it worked!! (and i need all the bit rate again) or (x264 eated all the noise and i have banding again)
This does not makes any sense to me, or maybe i'm missing something.
Thanks
LoRd_MuldeR
30th September 2009, 22:27
Oh, im confused here, maybe someone can help me with all this (remember i encode most of the time anime):
Grain is the noise we see on film because of the nature of the celuloid
BUT dithering is an intentional noise added to the clean material (like modern produced animation) to avoid banding during the color bits reduction
Also, dithering is intentional noise we can add with filters to reduce or hide banding.
i'm i rigth?
Not exactly. While adding "artificial" (random) noise to the clip before encoding is a technique sometimes used by people, that is not dithering!
Dithering is a technique used in image processing to "simulate" colors that can't be displayed/encoded natively, because of the limited color-depth.
So the "missing" color is generated by mixing pixels of different color in a certain pattern. Viewed from a distance, it looks like the desired color.
300 colors, no dithering:
http://upload.wikimedia.org/wikipedia/de/2/2f/NoDither300.png
16 colors, using dithering:
http://upload.wikimedia.org/wikipedia/de/6/66/Dither16.png
2 colors, using dithering:
http://upload.wikimedia.org/wikipedia/de/a/af/Dither2-2.png
Another sample:
http://upload.wikimedia.org/wikipedia/de/6/6d/Dither.jpg
OvejaNegra
1st October 2009, 18:37
Then why add artificial noise before encoding? Is not for avoid banding?
thewebchat
2nd October 2009, 01:01
Because a lot of people think that the only reason for HD is so that you can put more noise into your picture.
LoRd_MuldeR
4th October 2009, 22:56
Then why add artificial noise before encoding? Is not for avoid banding?
1. Noise pretends detail that isn't in the original source and thus makes the video appear more detailed, at least to some degree. It's also called "film effect" sometimes.
2. Some encoders can be convinced to produce fewer blocking artifacts in "flat" areas by adding some noise before the encode. Of course proper AQ is the better solution ;)
leeperry
4th October 2009, 23:09
adding grain is a also great way to deblock, whatever before or after encoding...better do it afterwards actually.
OvejaNegra
7th October 2009, 03:13
"Of course proper AQ is the better solution "
Well, for me AQ gives the best results for dark areas.
Until now i don't see any practical way of preserving grain or addin dithering or noise to avoid banding, because x264 eat it again :)
So i think i'm goin to the post-noising or post-dithering way :)
Yes, maybe using insane bit rate is possible, but not practical.
Vitaliy Gorbatenko
7th October 2009, 05:02
Banding strongly depends on the settings x264 options. Turn on "Adaptive Quantizers" and the "Weighted B-Prediction" (and possibly "Full Range") virtually removed this effect.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.