Log in

View Full Version : New fast DeBanding filter


Pages : 1 2 [3]

Dark Shikari
23rd April 2008, 09:02
AQ works quite well for reducing, or, at high bitrates, eliminating banding, search for VAQ, and get a build of X264 with version 0.48x264 has had VAQ in official builds for weeks...

McCauley
23rd April 2008, 09:48
Does anyone have Manao's "optimized" build lying around? The download link in the first page is dead.

I don't know if this is the modified one, but it's on Manao's page:
http://manao4.free.fr/

Regards
McCauley

Soulhunter
23rd April 2008, 16:15
Does anyone have Manao's "optimized" build lying around? The download link in the first page is dead.
Just click the link in my sign... ;]

The one on my page should be the right one!


I realise that inexperienced people often come here and complain of problems that don't exist, or are a case of PEBKAC blown out of proportion, but i think this leads the more experienced members of the forum to discount real problems that newer members may report without as much thought as they would put into it if someone who has been here longer had the same problem.
Nah, I really cant spot a mentionable value of banding in the images...

Blocking n' compression artifacts? Yes!

But banding? Not really... >.>


Bye

Adub
23rd April 2008, 17:43
Nope. The one on your page is bit for bit identical to the one in the OP, it just has an expanded readme and gradfunkmirror.avs. I even diff-ed the source. Same exact source.

And I already checked the one on Manao's page. Same as the OP.

Soulhunter
23rd April 2008, 18:12
Nope. The one on your page is bit for bit identical to the one in the OP, it just has an expanded readme and gradfunkmirror.avs. I even diff-ed the source. Same exact source.

And I already checked the one on Manao's page. Same as the OP.
Like I said...
Its the right one...
The one optimized by Manao...

The thing is:
I edited the 1st post and replaced the old link with a link to the new optimized version
[Note the "Last edited by Soulhunter : 5th May 2006 at 12:38"] ;]


Bye

Adub
23rd April 2008, 19:29
Ok, sorry. My mistake.

*.mp4 guy
25th April 2008, 13:02
x264 has had VAQ in official builds for weeks...

Well, I've been using one of the betas; I don't think I've used a vanilla X264 build in years, they are always too far behind, so I don't really keep track of where they are at. Anyway, thats good news about vaq, anything new with qns? or have you been working primarily on fgo?

canuckerfan
13th June 2008, 09:57
does anyone know if these artifacts in the back wall count as banding?
http://maxupload.com/img/444CB593.jpg

Adub
13th June 2008, 18:22
I don't know if it's my eyes, but I dont see any banding any where. Hell, the wall looks fine to me. But then again, I don't have a source image to compare to.

Stakiman
14th June 2008, 22:39
That's called blocking, though. :)

Mystery Keeper
15th July 2008, 15:20
I get strong banding after FFT3DGPU denoising, which is understandable. Several gradfun2db(1.1) lines remove the banding on gradients alright. But instead it creates large halos around objects standing out on those gradients. x2 supersampling before debanding helps, but not much. And if I supersample more, debanding doesn't work. Sorry, I can't upload a sample.

Soulhunter
16th July 2008, 01:11
I get strong banding after FFT3DGPU denoising, which is understandable. Several gradfun2db(1.1) lines remove the banding on gradients alright. But instead it creates large halos around objects standing out on those gradients. x2 supersampling before debanding helps, but not much. And if I supersample more, debanding doesn't work. Sorry, I can't upload a sample.
Then its probably beyond repair!?

Gradfun cant do magic... Live with it, or denoise less/differently! :]


Bye

Chainmax
16th July 2008, 02:53
How about using DeHalo_Alpha to eliminate those halos?

Mystery Keeper
16th July 2008, 03:49
Chainmax, doesn't work. Don't see how it could help. Either I misunderstand something, or what you call "halos" are actually Gibbs effect. The halos I get after gradfun2db are real halos - bands of clear color around the inner edges of gradients.

Chainmax
16th July 2008, 04:13
Yeah, I am talking about one of the manifestations of the Gibbs phenomenon. As "halo" is more of a colloquial word that I only saw used in that term, that's what I assumed it to be. The only other thing I can think of is to use AddGrainC as a complement to gradfun2db, but that probably won't be of much help.

leon1789
15th September 2009, 21:45
Corrected version:
Function gradfunkmirror( clip c, float "strength" )
{
strength = default( strength, 1.2 )
w = c.width()
h = c.height()
vflip = c.FlipVertical()
hflip = c.FlipHorizontal()

stackhorizontal( hflip.crop( w-16, 0, 16, h ).addborders( 0, 16, 0, 16 ),
\ stackvertical( vflip.crop( 0, h-16, w, 16 ), c, vflip.crop( 0, 0, w, 16 ) ),
\ hflip.crop( 0, 0, 16, h ).addborders( 0, 16, 0, 16 ) )
gradfun2db( strength )
crop( 16, 16, -16, -16 )

Return last
}



Hello,
for the same job, I propose this simpler code

Function GradFun2dbMod_Mod(clip c, float "strength")
{
strength = default( strength, 1.2 )
w = c.width+32
h = c.height+32
c = c.PointResize(w,h,-16,-16,w,h)
c = c.GradFun2db(strength)
return c.Crop(16,16,-16,-16)
}

What do you think about it ? (specially in the corners of the picture)

thewebchat
15th September 2009, 23:03
leon1789, your suggestion is good.

Mirrored performance: * Pass 1/1: Finished in 00:00:26.254 (159.29 FPS)
PointResize performance: * Pass 1/1: Finished in 00:00:22.803 (183.40 FPS)

Tested with avs2avi and NULL compressor. Of course, the real solution is to go fix GradFun2DB so that it doesn't have this bug.

Sapo84
16th September 2009, 00:20
Hello,
What do you think about it ? (specially in the corners of the picture)

Sometimes the added borders don't have the same color of the last useful pixel, so I'm not sure is very good.
I prefer something like

Function gradfunkmirrormodded( clip c, float "strength" )
{
strength = default( strength, 1.2 )
w = c.width()
h = c.height()
vflip = c.FlipVertical()
iter1 = stackvertical( vflip.crop( 0, h-16, w, 16 ), c, vflip.crop( 0, 0, w, 16 ) )
hflip = iter1.FlipHorizontal()

iter2 = stackhorizontal( hflip.crop( w-16, 0, 0, 0),
\ iter1,
\ hflip.crop( 0, 0, 16, 0) )
debanded = iter2.gradfun2db( strength )
cropped = debanded.crop( 16, 16, -16, -16 )

return cropped
}

Which should solve the problem in the corners (even if I'm not sure it was actually a problem).

leon1789
16th September 2009, 16:03
Ok.
Thank you for your feedbacks :)

thewebchat
16th September 2009, 16:36
http://img136.imageshack.us/img136/1469/dongs.png

leon1789's method seems to produce the same results as the traditional GFMirror.

leon1789
17th September 2009, 08:27
http://img136.imageshack.us/img136/1469/dongs.png

leon1789's method seems to produce the same results as the traditional GFMirror.

Hello,
I see two frames, with a problem in the top right corner of the second picture.

Can you explain a little bit more, please : where is the source? Which image is the result of which filter?

LaTo
4th October 2009, 07:53
Hello,
for the same job, I propose this simpler code

Function GradFun2dbMod(clip c, float "strength")
{
strength = default( strength, 1.2 )
w = c.width+32
h = c.height+32
c = c.PointResize(w,h,-16,-16,w,h)
c = c.GradFun2db(strength)
return c.Crop(16,16,-16,-16)
}

What do you think about it ? (specially in the corners of the picture)

Please, change the name of your function because this name is already used here:

http://forum.doom9.org/showthread.php?t=144537

Thanks :)


edit: On top of that, this pointresize method is already in my GF2mod...

If you want the same output as your mod:
GradFun2DBmod(str=0,mask=false)

str=0, disable adaptative grain
mask=false, disable selective debanding

leon1789
4th October 2009, 12:18
Lato, you're absolutely right (for name and output).

So, my proposition is obsolete...

benwaggoner
6th September 2012, 17:06
I tried to download today, and the link in the first post was bad. In fact, the whole http://kosmos.kawaii-shoujo.net/ subdomain appears to be down.

Anyone have an alternate location to download the .dll from?

ChaosKing
6th September 2012, 17:34
Here you go: http://chaosking.de/wp-content/uploads/avsfilters/Restoration_Filters/Debanding/GradFun2DB___(2006-05-05).7z

x64 version : http://chaosking.de/avisynth-filter?q=gradfun

sneaker_ger
6th September 2012, 18:05
You might also want to take a look at these:
flash3kyuu_deband (http://forum.doom9.org/showthread.php?t=161411)
GradFun3 (http://forum.doom9.org/showthread.php?p=1386559#post1386559)

benwaggoner
6th September 2012, 21:19
You might also want to take a look at these:
flash3kyuu_deband (http://forum.doom9.org/showthread.php?t=161411)
GradFun3 (http://forum.doom9.org/showthread.php?p=1386559#post1386559)
Thanks.

I'm trying to deal with relatively subtle banding that shows up in dark live-action underwater shots (frames of just blacks and dark blues). I've had reasonable success with GradFun2DBmod.v1.5 (which needed this plugin to work.

Are there other filters that are recommended these days? I can certainly imagine something faster; It's taking 8x real time on my 12-core monster box (using very few cores).

sneaker_ger
6th September 2012, 21:38
Flash3kyuu is pretty fast, should be faster than real-time. For specific tips for your source you should ask in the respective threads, as I cannot provide those.

kolak
7th September 2012, 00:17
Flash3kyuu is very good. I use it for dithering 10 to 8bit (with use of tweaked for 10bit support ffms2: http://forum.doom9.org/showthread.php?p=1585372#post1585372)- it should be way faster than RT on 12 core machine. Very powerful combination :)

sirt
15th January 2013, 15:24
Hi,

I have a question : should I denoise after using gradfun or before ? Also, is it suitable to denoise a frame that had been debanged ?

poisondeathray
15th January 2013, 16:49
Hi,

I have a question : should I denoise after using gradfun or before ? Also, is it suitable to denoise a frame that had been debanged ?

Usually debanding / dithering filters go last.

Debanding /dithering filters essentially add "noise"

If you apply denoise afterwards, it impairs the debanding effect

Are_
15th January 2013, 16:57
Denoising introduces banding or is very prone to, I think that answers it all.

sirt
15th January 2013, 17:28
Thanks for those answers. Another thing, could you clarify the difference between debanding and dithering ?

poisondeathray
15th January 2013, 17:40
Thanks for those answers. Another thing, could you clarify the difference between debanding and dithering ?

In this context (gradfun2dbmod) they mean the same thing

In the more general sense, "debanding" can denote several different approaches to removing "banding" (and there are different type of "banding"), one method of "debanding" is dithering

http://en.wikipedia.org/wiki/Dither#Digital_photography_and_image_processing

There are different types of dithering, different algorithms. Basically they all add noise that "covers up" banding. Noise impairs compression - it requires more bitrate to encode. Ordered dithering techniques have less fluctuations, thus require less bitrate. And example in avisynth of ordered dithering is gradfun3

Are_
15th January 2013, 19:13
Debanding is smoothing the gradients to make them uniform, like a blur filter does.

Dithering is downgrading de color palette (from 16 to 8 bit for example) while using patterns to make for the dinamic range loss without too much percieved quality loss, like gif does.

Then in the dithering process sometimes noise is added to give a more natural look.

sirt
15th January 2013, 19:25
Thanks for those detailed answers. Then, I've given a try to GradFun2DB and its variants but they are intended to debang as from I've read from the AVS External Filters page. But, in thise case, what would be a filter to dither assuming it is slightly something different according to your previous explanations ?

sneaker_ger
15th January 2013, 19:39
Around here we usually we only speak of dithering in the sense of a method of reducing the bit-depth - which is more in line with what Are_ said than with poisondeathray's post.

Filters like gradfun2db, gradfun3 and flask3kyuudeband do debanding in high bit-depth (i.e. try to create smooth gradients in an already banded source with e.g. 16 bit output) and as a last step do dithering to a lower bit-depth (e.g. 8 or 10 bit). Dithering is to be seen as opposed to simple rounding, which would re-introduce a lot of banding. Poisondeathray's wiki link explains it. Image 1 of the cat is the original high bit-depth image and image 2 would be how the lower bit-depth image would look if we simply rounded down. Image 3 is how the bit-depth reduction looks with dithering.

As poisondeathray said, we have an additional obstacle to overcome, as random noise is extremely hard to compress. If you use Floyd-Steinberg dithering the AviSynth preview might look very good, but after encoding to low bitrate 8 bit h.264 the banding will have re-appeared or originally not existing banding will have been introduced. Methods to limit this effect are:
- switch to 10 bit H.264
- use ordered dithering (gradfun3 or the appropriate parameter if f3kdb)
- increase bitrate (a lot)