Removing Grain and avoiding "colour stairs"? - help please

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
Locked
User avatar
Bauzi
Joined: Fri May 21, 2004 12:48 pm
Status: Under High Voltage
Location: Austria (uhm the other country without kangaroos^^)
Contact:
Org Profile

Removing Grain and avoiding "colour stairs"? - help please

Post by Bauzi » Sun Aug 23, 2009 5:28 pm

Hey there,

I have a big problem with proper cleaning of my video source. It's a x264 version of Perfect Blue in 720p. That's right! This awesome movie got "remasterd" in high definition.
Well sort of. The pictures are still shakeing and there is tons of grain to avoid. The grain really bugs me :| It makes it damn hard to compress it on a proper filesize/quality ratio and in HD the amv quality just sucks ass.

Ok let's get to the problem in detail. I use some degrain avisynth functiond. I wanted to try the filter TemporalDegrain(), but I have some .dll problems. My current solution removes the grain quite good, but it leaves "colour stairs". I just call it that way. It happens on radiant colour spaces.

Just have a look at this frame. It's with the turned on script. I made a red circle around the colour stairs. (Can anybody tell me the proper name of colour stairs: I highly apprecite it!):
Image

This is the same frame without the script:
Image


This is my script:

Code: Select all

DirectShowSource("Perfect_Blue_(1998)_720p_LAGS.avi, audio=false")

TemporalSoften(4,4,8,15,2)
deen("a2d",3,5,7)
#zWarpSharp(depth=4)

Lanczos4Resize(1280, 720)
Thx in advice
You can find me on YT under "Bauzi514". Subscribe to never miss my AMV releases. :amv:

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: Removing Grain and avoiding "colour stairs"? - help please

Post by mirkosp » Sun Aug 23, 2009 5:37 pm

Well, if you need to remove banding, you'll want to use the gradfun2dbmod. You'll need the gradfun2db and the addgrainc v1.4, along with the masktools 2.0 and the removegrain 1.0, which I think you already have.

On a side note, I'd change that deen into a ttempsmooth() or something else anyway... but that's just me.

Anyway, here's what I got after a gradfun2dbmod(1.5)

Image

Not perfectly restored cause the deen really killed the gradient, but it's improved.
Image

User avatar
Bauzi
Joined: Fri May 21, 2004 12:48 pm
Status: Under High Voltage
Location: Austria (uhm the other country without kangaroos^^)
Contact:
Org Profile

Re: Removing Grain and avoiding "colour stairs"? - help please

Post by Bauzi » Sun Aug 23, 2009 5:55 pm

Mhm I'm not sure if it's improved for me, but I think that I can play around with it. I would prefer an output with noise in the dark areas and clean main figures like the character in the cleaned pics. So I think playing around with deen and gradfun2dbmod can bring me close to a pleasent result.

However the server with the addgrainc file is offline and I can't find it with google. Could you upload version 1.4 for me if you have it? thx.
You can find me on YT under "Bauzi514". Subscribe to never miss my AMV releases. :amv:

User avatar
Bauzi
Joined: Fri May 21, 2004 12:48 pm
Status: Under High Voltage
Location: Austria (uhm the other country without kangaroos^^)
Contact:
Org Profile

Re: Removing Grain and avoiding "colour stairs"? - help please

Post by Bauzi » Sun Aug 23, 2009 6:02 pm

When there is gradfun2dbmod than there must be a gradfun2db, right?

I tried it and: WOAH!

gradfun2db(2.0) gives me a bad ass result. Sure this picture isn't perfect either, but the scenes with hardly dark areas (like only for hairs etc.) look great!

This is the scene with gradfun2db(2.0):
Image


Yep. gradfun2db(2.0) will bring me to my wished quality. Thank you for your help and for telling me the right name for "colour steps" ;) I've been struggling for years with this problem, but this time I was so much upset about it that I just had to fix it. I wish debanding would stand in the AVTech guide, because this is something that really ruins visual quality :|
You can find me on YT under "Bauzi514". Subscribe to never miss my AMV releases. :amv:

User avatar
Scintilla
(for EXTREME)
Joined: Mon Mar 31, 2003 8:47 pm
Status: Quo
Location: New Jersey
Contact:
Org Profile

Re: Removing Grain and avoiding "colour stairs"? - help please

Post by Scintilla » Sun Aug 23, 2009 8:40 pm

Bauzi wrote:I wish debanding would stand in the AVTech guide, because this is something that really ruins visual quality :|
Using Deen in "w2d" mode instead of "a2d" probably wouldn't have created the banding in the first place, you know... :wink:


(Do they still cover the W modes of Deen in EADFAG? I know Deen has fallen out of favour around here in the past few years due to abuse stemming from its endorsement in the first version, so they might not have detailed it as much as they used to, but I cover all the 2d modes in my guide...)
ImageImage
:pizza: :pizza: Image :pizza: :pizza:

User avatar
Bauzi
Joined: Fri May 21, 2004 12:48 pm
Status: Under High Voltage
Location: Austria (uhm the other country without kangaroos^^)
Contact:
Org Profile

Re: Removing Grain and avoiding "colour stairs"? - help please

Post by Bauzi » Mon Aug 24, 2009 3:38 am

http://www.animemusicvideos.org/guides/avtech3/post-qual.html wrote:The first parameter in deen is the mode. Deen offers a variety of modes, but I recommend using either "w2d" or "w3d". Some other modes are c2d/c3d and a2d/a3d. c2d and c3d are essentially limited versions of a2d and a3d, so they aren't particularly useful. The a2d and a3d modes aren't bad, but they are known to cause "banding" in sources. The w2d and w3d modes work very similar to a2d and a3d, but they can preserve gradients and don't cause banding.
Upps... Ok I was lazy in reading this article in details. I never thought that a different deen mode would save the gradient parts :|

I tried a2d and w2d. w2d worked better for the gradient part, but the banding was still too heavy.
You can find me on YT under "Bauzi514". Subscribe to never miss my AMV releases. :amv:

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: Removing Grain and avoiding "colour stairs"? - help please

Post by mirkosp » Mon Aug 24, 2009 8:19 pm

Bauzi wrote:Mhm I'm not sure if it's improved for me, but I think that I can play around with it. I would prefer an output with noise in the dark areas and clean main figures like the character in the cleaned pics. So I think playing around with deen and gradfun2dbmod can bring me close to a pleasent result.

However the server with the addgrainc file is offline and I can't find it with google. Could you upload version 1.4 for me if you have it? thx.
http://www.megaupload.com/?d=90EXJZGZ

It was in the same thread, sorry, I linked the post alone since I thought the link was working. :sweat:

Well, gradfun2dbmod can achieve better results since it also uses addgrain in the zones with the banding to better restore the gradients. Also, it fixes a bug in gradfun2db - the 16 border pixels from all the sides don't get filtered with the normal gradfun2db (you can easily notice this if you increase the filtering to insane values, though with low values it's generally hard to notice). If you happen to not like how the addgrainc works in the scene when using the gradfun2dbmod, you can disable it by specifying str=0 as a parameter.
Image

Locked

Return to “AviSynth Help”