PDA

View Full Version : New fast DeBanding filter


Soulhunter
14th March 2006, 22:14
GradFun2db: A new fast debanding filter made for realtime post-processing...

Source:
http://img20.imageshack.us/img20/5271/banding1zp.png

Filtered:
http://img20.imageshack.us/img20/9710/filtered6rv.png

-> The binary... (http://kosmos.kawaii-shoujo.net/gradfun2db/gradfun2db-v1.0.zip)

Please post feedback regarding its debanding abilitys and speed!


Tia n' Bye

Fizick
15th March 2006, 06:04
what is banding? Abrupt level gradation instead of smooth transition?

MfA
15th March 2006, 06:26
Had to turn up my brightness to max to even see it in that image.

HOLiC
15th March 2006, 07:07
wow, the filtered image looks great! But do we just use like this, gradfun2db()? anyway, this is how I used in my script ^^.. I can't wait to see the result.

foxyshadis
15th March 2006, 09:40
It seems that show has become the poster child of painful banding, hasn't it? :p Thanks! I'll test as soon as I crank through my next filter session, too busy atm.

Soulhunter
15th March 2006, 15:07
@ Fizick

No banding:
http://img124.imageshack.us/img124/9458/source24az.th.png (http://img124.imageshack.us/img124/9458/source24az.png)

Strong banding:
http://img124.imageshack.us/img124/3313/broken21db.th.png (http://img124.imageshack.us/img124/3313/broken21db.png)


@ HOLiC

Nooo! As I wrote in my first post, this filter is meant for post-processing... If you use it for pre-processing, the encoder will destroy most of the fine gradients again (well, except if you'd use a "all 8" CQM at fixed Quantizer 1, lol). So, simply put this filter in ffdshows AviSynth section and use it while playback!


@ MfA

If you watch it in fullscreen (or with a black background) its much more visible... ;)


@ foxyshadis

Thx! :)


Bye

Daodan
15th March 2006, 15:49
I'll check it also. I hope that 'fast' is not a misleading name, considering your last filter.:thanks:

Soulhunter
15th March 2006, 16:01
Not mine! But anyway, I guess the fps will please ya... ^^


Bye

Zarxrax
15th March 2006, 20:44
This is a nice filter. How does it work?

Soulhunter
15th March 2006, 21:56
Uhm, it averages gradients to increase bitdepth...


Bye

Soulhunter
15th March 2006, 22:41
Update: Optimized version by Manao + Source... (http://www.sendspace.com/file/59n0t4) ^^


Bye

Manao
15th March 2006, 23:05
I didn't actually optimized it. I cleaned it up to make it portable, and speed was increased in the process.

guada 2
15th March 2006, 23:07
Hello Soulhunter and Manao, :)

Is it efficient on all types of scenes?
What are the privileged sources?

HOLiC
15th March 2006, 23:17
Nooo! As I wrote in my first post, this filter is meant for post-processing... If you use it for pre-processing, the encoder will destroy most of the fine gradients again (well, except if you'd use a "all 8" CQM at fixed Quantizer 1, lol). So, simply put this filter in ffdshows AviSynth section and use it while playback!

Oopse.. ○=_=○ 13hr encoding time loss for not paying attention..(hehe) Thanks for the great filter!!

Soulhunter
15th March 2006, 23:31
@ guada 2

It should work for nearly all stuff that contains banding!

So far I tested it with 1 anime and 2 movies...


Bye

foxyshadis
15th March 2006, 23:44
If it's so bad that it's like Ergo Proxy, pre-encoding could help, otherwise you have to use a high-bitrate matrix or add a little ripple/noise to low-contrast areas. Having a highspeed playback filter makes that less important though. =D

Dreassica
16th March 2006, 00:24
Care to upload it to a host that doesn't give me a "too many users downloading" msg every time?

Soulhunter
16th March 2006, 00:54
1 (http://www.sendspace.com/file/jmz09j) <(^^<)

(>^^)> 2 (http://www.sendspace.com/file/ydexo4)

3 (http://www.sendspace.com/file/sa7dc7) <(^^<)

(>^^)> 4 (http://www.sendspace.com/file/xc4wwp)

5 (http://www.sendspace.com/file/9eejzp) <(^^<)


Bye

dbzgundam
16th March 2006, 00:59
Holy crap!

This actually is JUST the filter I've been looking for! :D Great work, Soulhunter, and it's fast too (a great change from Broadsword...).

Didée
16th March 2006, 01:19
>> Great work, Soulhunter

The summoner's fate ... the news are good, he gets praised ... the news are bad, he looses a head.

What a luck it's a good filter ... :D
___

Anyone else could imagine this one becoming a built-in into ffdshow?

Could also have a positive effect on blocking, possibly. Depending on how things are done, DB perhaps should be adjustable. (?)

Soulhunter
16th March 2006, 01:43
@ dbzgundam

Thanks! But Im not the author, I just posts for him... :)


@ Didée

Already wrote a requested to milan... ;)


Bye

DeathWolf
16th March 2006, 07:27
for those that need an alternate url for the 1.0(since sendspace is inneficient):

gradfun2db-v1.0.zip (http://kosmos.kawaii-shoujo.net/gradfun2db/gradfun2db-v1.0.zip)

Scarfac3
18th March 2006, 16:41
Thanks DeathWolf ^^

Inc
19th March 2006, 02:50
I also know this banding fiasko from Photoshop.
Exactly on those smooth gradients where Image contrast/saturation manipulations where done on 8bit/channel RGB images instead on 16bit/channel.

So if you want to also use it as preprocessor, after the postprocessing do apply a "minimal" touch of noise spray on such areas. Thats why in Photoshop in the gradient tool the option "dither" exists.

mla0
28th March 2006, 02:53
is there a documentation for this? or at least something that would tell the required things for this filter to work?

DeathWolf
28th March 2006, 03:34
is there a documentation for this? or at least something that would tell the required things for this filter to work?
It's made to be used in the avisynth section of ffdshow.
Go in there and just write grad2funb() after placing the filter in the avisynth plugins directory and it should auto-apply.
Technically you could use it normally in avisynth too but the effects get cancelled by any typical compressions. It's made to be used when viewing(and is optimized for speed in that optic)

Alain2
28th March 2006, 11:52
Technically you could use it normally in avisynth too but the effects get cancelled by any typical compressions.
Is this for sure? (Meaning is the effect completely canceled when encoding in yv12 in x264 for instance?)

Foxyshadis said in his thread we could replace the last addgrain of his deband script with this GradFun2db...

Soulhunter
28th March 2006, 12:12
Is this for sure? (Meaning is the effect completely canceled when encoding in yv12 in x264 for instance?)
Yes, quantization (destroys the fine +/-1 differences) + in-loop filtering (smoothing) = banding!


Bye

foxyshadis
28th March 2006, 12:46
It's only for high bitrate matrices, where such fine details would be kept, not for normal compression where it gets eaten for lunch. It makes some noticeable difference at mid-high bitrates but it's not really good until exorborantly high. Or at playback, of course. (At the time I thought it was more of a dither+grain filter, but it's dither-only.) Since I'm not working on that show now, I haven't had the incentive to improve the last step of the filter (which I think is quite suboptimal).

Really, YV16/YV24 is the only way to truly remove visible banding in encodes. (If lavc could decode to YV24 and convert straight to RGB that would be awesome.)

CruNcher
29th March 2006, 02:41
Something is strange it looks like the filter misses regions of the right and left side btw overused you get a really nice (Dream Effect) :)

Didée
29th March 2006, 09:10
True. Try gradfun2db(str=255) to "see" how&where it processes, and where not. ;)

Soulhunter
29th March 2006, 09:46
Yeah, it leaves a 16pix border on each side... :\


Bye

Mug Funky
29th March 2006, 10:28
quick and hacky workaround (hope you like black edges)

function gradfunk (clip c, float "strength")
{
strength=default(strength,1.2)

c.addborders(16,16,16,16)
gradfun2db(strength)
crop(16,16,-16,-16)
}

btw, this is a very fast filter. perhaps it could form the basis of a rewrite of spatialsoften, which is very very slow in comparison.

[edit]

strength is a float, not an int. d'oh

mimage
30th March 2006, 00:11
Thanks a bunch for this filter! It is so awesome and is very helpful for me. :D

I hope it's ok to ask here.. is there any filter like this for Vdub?

Jeremy Duncan
30th March 2006, 05:37
I tried it a few days ago, and my Celeron M 1.4 Ghz Notebook could not play it without stutter. And I saw a bit of banding still. If only it could be optimized to play on my Notebook.

Jeremy Duncan
30th March 2006, 05:39
{
strength=default(strength,1.2)

c.addborders(16,16,16,16)
gradfun2db(strength)
crop(16,16,-16,-16)
}[/code]


Is this added to the .dll, or in the avisynth section of ffdshow ?

Mug Funky
30th March 2006, 06:21
it goes in your avs script, then you call "gradfunk" instead of "gradfun2b".

actually, it just occured to me that that workaround will not do anything unless you have a very dark frame.

reason - the black on the edges gets blurred exactly 16 pixels, making the first 16 pixels very likely to be over the threshold, and not used. you can confirm this by using it on some grainy footage with a high threshold.

i think edge mirror-ing will make it a lot better, but that might just slow it down such that it's not as useful.

Jeremy Duncan
11th April 2006, 12:43
it goes in your avs script, then you call "gradfunk" instead of "gradfun2b".

Can somebody Please post the notepad script with the changes Mug Funky made.

I want to copy and paste it into a notepad file called gradfunk.avs

:thanks:

DeathWolf
11th April 2006, 14:23
http://kosmos.kawaii-shoujo.net/gradfunk.avsi
there you go

the function to use with mirroring is: gradfunkmirror

Jeremy Duncan
11th April 2006, 15:25
http://kosmos.kawaii-shoujo.net/gradfunk.avsi
there you go

the function to use with mirroring is: gradfunkmirror

This is what I'm doing. I'm putting this in FFDShow:
Import("G:\Program Files\AviSynth 2.5\plugins\gradfunkmirror.avs")

And opening Media Player Classic to play X-men 2.
As soon as I open Media player Classic and open the dvd, it closes.

And I doing it right ?

:thanks:

foxyshadis
11th April 2006, 16:05
You don't need this filter for DVDs. Or at least, I've never seen a DVD without some film grain, and almost always lots of it, and it slows playback WAY down.

As for why it crashes, it's really hard to say since there's no error message.

Alain2
12th April 2006, 00:34
Corrected version:
Function gradfunkmirror( clip c, int "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
}

It does work realtime on my computer (xp3700+), but takes a bit more cpu (mpc+gradfun2db = ~13%, mpc+gradfunkmirror=~25%)

DeathWolf
12th April 2006, 00:52
isnt that the same though?
it does look proper on my original script iirc
from h-16 to 0 or starting from h-16 with a 16 offset is the same
at least it was in the quick test i just did

Alain2
12th April 2006, 02:55
I think you should have put -0 if you wanted to get the same than (h-16)->+16, but i may be wrong

Jeremy Duncan
12th April 2006, 04:04
##Standard gradfunk
function gradfunk(clip c, int strength) {
strength=default(strength,1.2)
return c.addborders(16,16,16,16).gradfun2db(strength).crop(16,16,-16,-16)
}
##Corners will be ignored
function gradfunkmirror(clip c, int strength) {
strength=default(strength,1.2)
vflip = c.FlipVertical()
hflip = c.FlipHorizontal()
return stackhorizontal(hflip.crop(c.width-16,0,16,c.height).addborders(0,16,0,16),stackvertical(vflip.crop(0,c.height-16,c.width,16),c,vflip.crop(0,0,c.width,16)),hflip.crop(0,0,16,c.height).addborders(0,16,0,16)).gradfun2db(strength).crop(16,16,-16,-16)
}
http://img81.imageshack.us/img81/8438/15yd2.jpg

Above the picture is what I'm using.
The picture shows the problem I'm having.
It also shows my ffdshow avisynth setting, and the file.

What am I doing wrong ?

Jeremy Duncan
12th April 2006, 04:11
I think you should have put -0 if you wanted to get the same than (h-16)->+16, but i may be wrong

Are you talking about here ?
(vflip.crop(0,c.height-16,c.width,16)

Xicor
12th April 2006, 17:08
Your script might be called "script.avs.txt" instead of the correct "script.avs".

Alain2
12th April 2006, 23:57
Are you talking about here ?
(vflip.crop(0,c.height-16,c.width,16)
The function you posted is incorporating the correction I made, but original DeathWolf's function contains:
vflip.crop(0,c.height-16,c.width,0)

It is this zero I was talking about.

Oh btw in the function you have you started with
function gradfunkmirror(clip c, int strength)

but then in ffdshow you don't specify a strength... You should write the header as i did (Function gradfunkmirror( clip c, int "strength" )) if you want to be able to omit the strength parameter when calling the function

Jeremy Duncan
13th April 2006, 04:27
http://img153.imageshack.us/img153/6940/16cs1.jpg

Same script I posted before with the other picture.

Jeremy Duncan
13th April 2006, 04:30
Here's my setup so you can try it.

http://www.avsforum.com/avs-vb/showthread.php?p=7476913#post7476913

foxyshadis
13th April 2006, 05:54
you want "strength" not strength. If it's unquoted it becomes a required argument.

Jeremy Duncan
13th April 2006, 06:41
"strength" creates a error.

Soulhunter
5th May 2006, 12:36
http://img100.imageshack.us/img100/2597/newsnap002541ro.gif

Bye

hartford
4th July 2006, 03:34
I tried this filter using defaults, ie, "gradfun2db()"

The result was a very screwed-up frame:

http://img56.imageshack.us/my.php?image=gradfun7hz.png

hartford
4th July 2006, 03:39
Nevermind, _I_ screwed-up; input must be YV12.

adrianmak
6th July 2006, 16:36
it is for playback ? instead of using in video encoding e.g. dvd -> xvid/divx

Daodan
6th July 2006, 16:59
I think the original purpose was for encoding (?). But since basically the crappy 12 bit color after encoding the bending will appear there again (a bit less though I would say). But it acts also as a spatial denoiser a bit so it can have some uses in the encoding process, but his great strength is at playback.

Leak
9th July 2006, 14:26
I think the original purpose was for encoding (?). But since basically the crappy 12 bit color after encoding the bending will appear there again
What 12 bit color are you talking about? YV12 uses a whopping 8 bit per channel...

np: New Order - Hey Now What You Doing (Waiting For The Sirens' Call)

Soulhunter
9th July 2006, 18:20
YV12 uses a whopping 8 bit per channel...
Dont you mean normal [non subsampled] YUV? >.>


Bye

scharfis_brain
9th July 2006, 18:54
every YUV colourspace supported by AVS has 8 bits/channel.

but due to subsampling the average amount of data is 12 bits/pixel. But this doesn't say anything about bits/channel!

gatekeeper_007
30th August 2006, 13:10
...from what I understand that this filter is being made only for viewing and not for processing.

I' searching for a filter that helps with 'banding' when compressing! (in YV12 mostly)...

any advice ?

:thanks:

Manao
30th August 2006, 13:46
Banding is best fought during post processing. Whatever method you'll try to use in preprocessing, it's more than likely that the effects will get lost during the compression, unless you're using a very high bitrate.

Egh
30th August 2006, 13:53
@ Manao: it still helps however. And, most important, this filter doesn't reallly destroy details in picture.

I use this filter for HD content which I transcode to avc. I can't see more banding added compared with filtered but not yet encoded video. Maybe AVC has less chance to create banding, dunno :)

gatekeeper_007
30th August 2006, 13:56
yes you're right..,
most of the time I get it when I'm compressing to much,
but sometimes I get banding even when all i/p/b-frames are 2 and 3 quant. with(H263/MPEG)... so I guess in that case it's not about the bitrate... and I try to found out why and how to fix this/if I can .

Thx 4 the reaply
and Keep up the good work
respect

Hurricane Neddy
30th August 2006, 17:52
yes you're right..,
but sometimes I get banding even when all i/p/b-frames are 2 and 3 quant. with(H263/MPEG)... so I guess in that case it's not about the bitrate...

Just cause a frame is a quant 2 or 3 doesn't mean it's high bitrate.

gatekeeper_007
31st August 2006, 10:57
Just cause a frame is a quant 2 or 3 doesn't mean it's high bitrate.

yes, I know that with differend settings and/or scripts you can mess a lot with the compressability of a clip, and you can get frames 2/3 quant which will need a low bitrate...
(but they wont look much like 2/3 quant)

...but when you're compressing at a 640x480 res. without using a denoiser, - costum matrix, or settings like 'lumi masking', trelis ... and others that can be helpfull with the compressabilyty , -without Bvop's or with but never higer than 1/1.0/1.0... etc. the bitate can't be so low...
to go higher with the bitate it wouldn't be smart as it won't be much of a compression anymore...
after all this way the clip is almost perfect:
-no blocks
-no artifacts
-no mosquito noise
-the only thing is the 'banding' I get (hoping to fix that to)

anyway...
I'm really sorry to post my question here, I didn't meen to mess much with the thread.
:thanks: 4 the replys

mrcubehead
8th September 2006, 05:36
I just wanted to say thanks, this solved a problem for me! :thanks:

akupenguin
18th September 2006, 22:35
Really, YV16/YV24 is the only way to truly remove visible banding in encodes. (If lavc could decode to YV24 and convert straight to RGB that would be awesome.)
That's not possible in inter-predicted codecs. No matter whether you meant higher colordepth or less chroma subsampling ("YV24" is ambiguous), any attempt to do that within the decoder will introduce encoder/decoder desync, thus adding way more artifacts than you save in reduced banding. OK, so you could decode B-frames with higher colordepth than the format specified, but that wouldn't really help if they're predicted from a banded P-frame.
The only way it will work is if the encoder and bitstream also use the higher colordepth, i.e. h264 hp.

Comatose
5th February 2008, 21:47
Two examples of gradfun2db in action (preprocessing, but it has a very nice effect when banding is this visible, even after encoding):

http://xs124.xs.to/xs124/08062/gradfun2db558.png

(this image is actually after a few scene changes from the last one)
http://xs124.xs.to/xs124/08062/gradfun2db2838.png

Adub
6th February 2008, 02:32
Here is a question, how do you deal with the color residue leftover after a debanding filter has been applied?

Sure, the hard edges have been removed, but often times there is still a soft band of color lingering in its wake.

This only happens on some sources I know, mainly any with strong banding, but I am wondering how to deal with those select few.

foxyshadis
6th February 2008, 05:27
Raise the strength, then add noise. That's about it.

Adub
6th February 2008, 06:09
So, say that I have gradfundb(1.4) and it removes the hardedges, but it leaves the color.

If I raise it to (1.5) or (1.6) and use AddGrain(), then that should take care of it? Wouldn't that hurt compressibility? Or is it negligible?

foxyshadis
6th February 2008, 08:57
Well, you might want to apply separately to luma and chroma.
l = gradfundb(1.4)
c = gradfundb(2.2).addgrainc(0.0,1.0)
mt_merge(l,c,c,y=2,chroma="copy second")

Adub
6th February 2008, 09:14
Cool. Thanks for that.

I was under the assumption that banding was a chroma artifact only. I guess to assume makes an Ass out of U and Me.

I will give that code a try and see how it goes.

Undead Sega
8th February 2008, 17:04
although i havent tried it, but this filter would work great to help hide decoding artifacts from Divx videos and as such to provide a much cleaner source which doesnt appear to have much compression in the video file, like MPEG 2 and lossless (to be prefered, as there isnt any:D).

vaioslar
24th March 2008, 04:34
Hello. I am trying to figure out what to do to get rid of banding (actually almost everybody in this thread)..

So I have this after encoding (Banding is mainly visible in the sky) : http://thumbnails5.imagebam.com/415/ba7e904141804.gif (http://www.imagebam.com/image/ba7e904141804/)http://thumbnails3.imagebam.com/415/2e38314141805.gif (http://www.imagebam.com/image/2e38314141805/)

What do you think I should try?

rfmmars
24th March 2008, 07:22
I simply can't see it, is your display the problem?

Richard

vaioslar
24th March 2008, 16:29
I simply can't see it, is your display the problem?

Richard

It is like some pixels are darker than others and these ones seem to be moving...i can upload a video sample..

rfmmars
24th March 2008, 18:15
Yes a clip that would help...........looking at your samples I see no banding that why I thought you may not have your monitor set at 32 bit resolution. Does this show on a DVD?

Richard

vaioslar
24th March 2008, 18:31
Yes a clip that would help...........looking at your samples I see no banding that why I thought you may not have your monitor set at 32 bit resolution. Does this show on a DVD?

Richard

I will now upload a sample. It is not actually a DVD. It is a BluRay

--->http://rapidshare.de/files/38916572/herritage_mono_lsf-muxed.rar.html

burfadel
24th March 2008, 19:37
Hello. I am trying to figure out what to do to get rid of banding (actually almost everybody in this thread)..

So I have this after encoding (Banding is mainly visible in the sky) : http://thumbnails5.imagebam.com/415/ba7e904141804.gif (http://www.imagebam.com/image/ba7e904141804/)http://thumbnails3.imagebam.com/415/2e38314141805.gif (http://www.imagebam.com/image/2e38314141805/)

What do you think I should try?

There's no banding that I can see. However, I can see slight borders of the macroblocks in the sky which is a different issue! If you have a CRT monitor you might be seeing a slight moire pattern than can happen sometimes.

vaioslar
24th March 2008, 19:52
There's no banding that I can see. However, I can see slight borders of the macroblocks in the sky which is a different issue! If you have a CRT monitor you might be seeing a slight moire pattern than can happen sometimes.

I don't use CRT monitor. I have a LCD-TFT 20''. It is ovious that something happens with the sky.. I supposed it was banding..I still believe it. If you use CoreAVC you might not see it that much... I don't know what exactly to do with that.

rfmmars
25th March 2008, 00:13
I ran your clip processed with HDRagc and only then could I see any blocking, still see no banding. The problem must be in your software/hardware driver, give us more detailes please.

http://img223.imageshack.us/img223/4199/cantseebandingyh9.th.png (http://img223.imageshack.us/my.php?image=cantseebandingyh9.png)

Richard
photorecall.net

vaioslar
25th March 2008, 00:54
I ran your clip processed with HDRagc and only then could I see any blocking, still see no banding. The problem must be in your software/hardware driver, give us more detailes please.

http://img223.imageshack.us/img223/4199/cantseebandingyh9.th.png (http://img223.imageshack.us/my.php?image=cantseebandingyh9.png)

Richard
photorecall.net

I have a BluRay and i am encoding it to mkv. After the encoding this think becomes visible in not only me. I am trying to find a filter that will remove as much is possible to.

http://thumbnails5.imagebam.com/419/a30fbd4180557.gif (http://www.imagebam.com/image/a30fbd4180557/)

paparoachh
25th March 2008, 01:51
hi ...
i have the same problem with vaiosLar ... and i cant deal with it .. can anyone help ? i post the biggest problem .. only on water and sky .. and not anytime ...
http://thumbnails5.imagebam.com/419/691e284182138.gif (http://www.imagebam.com/image/691e284182138) http://thumbnails5.imagebam.com/419/b9ec764182140.gif (http://www.imagebam.com/image/b9ec764182140)

what could i do .... ?

Ranguvar
25th March 2008, 01:53
Encoding causes banding. Sorry, it's a fact of life.

Running one of these filters on the video after encoding, while watching can help, but obviously that won't work for hardware players.

What codec are you using?

And as a note, I just see very slight banding and slight macroblocking... very slight. Watching this video at any normal frame rate, I'd be shocked if you can pinpoint those.

paparoachh
25th March 2008, 02:16
Ranguvar... its on encoding.. i am using ffdshow ... with kmplayer.. and VLC .. i can give you a sample...where you can see the problem ..the frames are 29.97 ...

burfadel
25th March 2008, 02:24
I can see very slight banding in the sunset pic, but still in the blue sky pic I can only see macroblocking, even when running brightness/contrast/gamma on it. In both cases they are very slight. LCD monitors are naturally limited in their capabilities particularly when it comes to colour ranges and producing 'black' black images, not to mention the response time of the monitor. I'd be much more concerned in my opinion of monitors with a response time of 5ms or more. I also hope that you're not sitting as close as 1 foot (around 30cm) from the screen to see the macroblock/banding issues!

nautilus7
25th March 2008, 02:26
@paparoachh, this isn't banding... or at least it's minimal. Can you post a source sceen as well? And provide us the bitrate your are encoding at.

paparoachh
25th March 2008, 02:39
lol no .. i am 50 cm away ..or ever 2 feet ...HD is for close things ..:P otherwise SD would be ok .. !i have an LCD 5ms ... 24" ..
nautilws..i cant post source stuff right now...i have to transfer it form my laptop ... bitrate is 4476 ... for the video ..

nautilus7
25th March 2008, 02:52
You're doing x264, right? Most probably the source has these issues, or your settings are very bad. But unless you post a source screen, we will speculating.

What/which is the source?

paparoachh
25th March 2008, 02:55
You're doing x264, right? Most probably the source has these issues, or your settings are very bad. But unless you post a source screen, we will speculating.

What/which is the source?

yeah 720p x264 ...
The World Natural Heritage-Europe I & Europe II 2007 Blu-ray 1080P AVC DD2.0

i dont think that my settings are very bad...because i encoded it once... and it was pretty nice..but in some points..like that ,i had a problem ...

scharfis_brain
25th March 2008, 04:06
I guess you guys are using cheapo LCDs.
The internal processing of these LCDs often causes banding which is not fixable.
I am using a 24" CRT (Sony FW-900) and it dosn't show any excessive banding.

burfadel
25th March 2008, 06:07
I agree with the above statement, especially since most monitors are only 700:1 contrast ratio. Even the '5000:1' monitors are really 1000:1. The full colour gamut monitors are easily 50 percent at least more expensive for the same thing. For instance, Samsung 226cw compared to the Samsung 226bw.

The 226bw is good enough that you probably won't have any problems despite it belonging to the budget LCD monitors, it was just an example!

vaioslar
25th March 2008, 06:41
Well, I've got Samsung 206 BW...This phenomenon is not only seen in my monitor but also when viewing the encode in the projector..

In addition screenshots do not show the problem that much

paparoachh
25th March 2008, 11:23
i have the LG L246WH ... so i dont think that my monitor has a problem...changing a few things in the avis, the situation now is a bit better ...but nothing special ...

Soulhunter
25th March 2008, 16:50
I cant see much banding either on this images!

But I have a CRTs as well... ;]


Bye

scharfis_brain
26th March 2008, 03:32
I guess some Cheapo LCDs are fooling their owners with excessive banding...

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

*.mp4 guy
23rd April 2008, 09:50
I can see Banding in all of the images posted (accept the rescaled HDRagc images, they have different problems, some sort of odd horizontal stripes), without even looking at them fullscreen in mpc, I'm using a trinitron crt, btw; granted, its slight banding, and there is also blocking, but its still there. watching at full speed or not doesn't really impact how obvious banding is, since banding usually is worse on skies, and other objects that are often stationary. I can't even begin to understand why people are so quick to ignore issues like this, there is a problem, and even if its not a HUGE glaring flaw, its still there and sticking your head in the sand and blaming it on LCD's (which I will admit, often cause such problems, at least among cheaper models) doesn't help anyone.

AQ works quite well for reducing, or, at high bitrates, eliminating banding, search for VAQ, and get a build of X264 with version 0.48, or check out the new version 2.0, which is iirc is still being tested. If VAQ alone isn't enough, you can also add a cqm to the mix, many people report good results with the prestige matrix, though it can cause artifacts at times, Sharktooth and I also have cqms which may be able to help you. Beyond these suggestons, preporcessing in avisynth (usually mvtools denoising of some kind, followed by ttempsmooth then gradfun2db works very well) can also help reduce the amount of banding in a final encode. As a last resort, raising your video bitrate, always helps, though when dealing with banding, increasing your bitrate without doing anything else is surprisingly ineffective.

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.

Dark Shikari
23rd April 2008, 10: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, 10: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, 17: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, 18: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, 19: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, 20:29
Ok, sorry. My mistake.

*.mp4 guy
25th April 2008, 14: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, 10:57
does anyone know if these artifacts in the back wall count as banding?
http://maxupload.com/img/444CB593.jpg

Adub
13th June 2008, 19: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, 23:39
That's called blocking, though. :)

Mystery Keeper
15th July 2008, 16: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, 02: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, 03:53
How about using DeHalo_Alpha to eliminate those halos?

Mystery Keeper
16th July 2008, 04: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, 05: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, 22: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
16th September 2009, 00: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, 01: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, 17:03
Ok.
Thank you for your feedbacks :)

thewebchat
16th September 2009, 17: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, 09: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, 08: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, 13:18
Lato, you're absolutely right (for name and output).

So, my proposition is obsolete...