AVS Code Order: Does It Matter?

The old Video Software Help forum, left visible as an archive.

AVS Code Order: Does It Matter?

Postby Krisqo » Tue Sep 19, 2006 8:58 pm

I've heard people discuss this vaguely from thread to thread, but I was always wondering, does the order in which you write you AVS scrip code matter? I know the Deinterlacing goes after the call to the d2v file and most of the filters require ConvertToYV12() before them, but what about the filters themselves? Would moving something in a script like this cause any changes in the output?

mpeg2source("C:\Documents and Settings\Krisqo\Desktop\AMV Sources\CARDCAPTORSAKURA\sakuraop1.d2v",cpu=4, upconv=true)
TComb()
orig=last
loadTDeint()
Telecide(order=1,guide=1,hints=true,post=1)
Tdeint(order=1,clip2=orig)
Decimate(cycle=5,mode=2)
ConvertToYV12()
deen("w3d",4,10,10)
WarpSharp()
tweak(sat=1.3, bright=-1, hue=2)
ColorYUV(gain_u=3,gain_v=2)
Crop(8,8,-8,-8)
BiCubicResize(640,480)
ConvertToRGB32()

I'm just wondering because I cannot get some sources (above) to look good at all and I just want to be sure this is not a factor.
Image
User avatar
Krisqo
Cooking Oil
 
Joined: 07 Jul 2003
Location: Moderating the Adobe Forums
Status: W.O.A (Waiting on Aion)

Postby Zarxrax » Tue Sep 19, 2006 9:34 pm

The order can matter somewhat, but it seems like you have everything in a fairly logical order there. What exactly is the problem?
User avatar
Zarxrax
 
Joined: 01 Apr 2001
Location: Concord, NC

Postby Krisqo » Tue Sep 19, 2006 9:55 pm

I can't seem to get rid of some of this noise. The source does look a hell of a lot better, but I still have this noise.


Look at her hair that falls to her eye
Image

Lots of problems with this one. Mostly around the pink in her dress and hat.

Image

I've never worked with a source this old so I don't know of any special techniques to make it look nice.
Image
User avatar
Krisqo
Cooking Oil
 
Joined: 07 Jul 2003
Location: Moderating the Adobe Forums
Status: W.O.A (Waiting on Aion)

Postby Scintilla » Tue Sep 19, 2006 10:37 pm

Oof. You definitely need a derainbower.

Some to try are:

- Shodan's derainbower (included as SDDeRainbow in the AMVapp)
- Bifrost (included in the AMVapp, also available <a href="http://www.avisynth.org/warpenterprises/">here</a>)
- mfRainbow (included in the AMVapp, but slow as hell)
- DeDot, but only processing the chroma (available <a href="http://nullinfo.s21.xrea.com/#DeDot_YV12">here</a>; English documentation available <a href="http://www.aquilinestudios.org/scripts/">here</a>)
- TComb, but only processing the chroma (looks like you already have that one, but it's not quite cutting it at default settings)
- My two solutions, LUTDeRainbow (if your rainbows are fluctuating; use before IVTC) and DFMDeRainbow (if they're not), both available <a href="http://www.aquilinestudios.org/scripts/">here</a>
ImageImage
:pizza: :pizza: Image :pizza: :pizza:
User avatar
Scintilla
(for EXTREME)
 
Joined: 31 Mar 2003
Location: New Jersey
Status: Quo

Postby Keeper of Hellfire » Wed Sep 20, 2006 1:46 am

It doesn't help you with your problem, but the line
Code: Select all
ConvertToYV12()
shouldn't be necessary because it's the original colorspace of your source.

To answer your question in generell: Yes, the order of filters can influence the result. Imagine you want to clean and sharpen the footage and do the sharpening before the cleaning. Though sometimes it's hard to decide, not always it's that obvious as in my example.
User avatar
Keeper of Hellfire
 
Joined: 09 Jan 2005
Location: Germany

Postby Krisqo » Wed Sep 20, 2006 1:21 pm

Mybe it is the rainbowing. I'll try some of them out and post my results once I can keep VDubMod from crashing. (I'm using TComb to take care of dot crawl but I don't know any arguments I can add to it)

To Keeper of the Hellfire:

I don't really understand why switching a cleaning filter and a sharpening filter would alter the outcome. You are basically doing the same thing but reversed. (This is why I quit programming...)
Image
User avatar
Krisqo
Cooking Oil
 
Joined: 07 Jul 2003
Location: Moderating the Adobe Forums
Status: W.O.A (Waiting on Aion)

Postby Zarxrax » Wed Sep 20, 2006 2:29 pm

You definately want to do sharpening AFTER smoothing, not before. Warpsharp doesn't count as a real sharpening filter though, so it doesn't really matter in this case.

The reasoning there being that if you sharpen before smoothing, you are effectively sharpening the noise, making it even more difficult to remove.
User avatar
Zarxrax
 
Joined: 01 Apr 2001
Location: Concord, NC

Postby trythil » Wed Sep 20, 2006 5:45 pm

Krisqo wrote: You are basically doing the same thing but reversed.


Short answer, more general than the ones given above, and perhaps more applicable:

Noncommutative operations.
This is a block of text that can be added to posts you make. There is a 512 character limit.
trythil
is
 
Joined: 23 Jul 2002
Location: Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch

Postby Krisqo » Wed Sep 20, 2006 7:49 pm

Zarxrax wrote:The reasoning there being that if you sharpen before smoothing, you are effectively sharpening the noise, making it even more difficult to remove.


I guess that makes sense. Thanks.

tythil wrote:Short answer, more general than the ones given above, and perhaps more applicable:

Noncommutative operations.


???

Here is what I got after adding SDDeRainbow to my script before deen:

Still a little noise by her bow to the right of the line as well as where her back curves beside the wing
Image

This pic still looks ugly. I still have some dot crawl by her feet, hat, folds in dress, etc...
Image
Image
User avatar
Krisqo
Cooking Oil
 
Joined: 07 Jul 2003
Location: Moderating the Adobe Forums
Status: W.O.A (Waiting on Aion)

Postby Zarxrax » Wed Sep 20, 2006 8:03 pm

What I think you are describing probably cant be helped much. Sometimes sources like these go through an analogue transfer, and it does all sorts of stuff to the footage that is unreversable.
User avatar
Zarxrax
 
Joined: 01 Apr 2001
Location: Concord, NC

Postby Krisqo » Wed Sep 20, 2006 8:06 pm

Okay. I just didn't want this footage to stand out when I plug in clips from the cleaner third opening of CCS. I mean, it looks a helluva lot better, but I was afraid it would look weird. I'll tweak some more and see what the final product looks when the mep is released at some point.
Image
User avatar
Krisqo
Cooking Oil
 
Joined: 07 Jul 2003
Location: Moderating the Adobe Forums
Status: W.O.A (Waiting on Aion)

Postby trythil » Thu Sep 21, 2006 12:31 am

Krisqo wrote:
Zarxrax wrote:The reasoning there being that if you sharpen before smoothing, you are effectively sharpening the noise, making it even more difficult to remove.


I guess that makes sense. Thanks.

tythil wrote:Short answer, more general than the ones given above, and perhaps more applicable:

Noncommutative operations.


???


For any real numbers A, B where A, B nonzero, A - B != B - A.

Same idea, except that you substitute "real number" with "video clip" and "-" with "video filter". Just keep that in mind when you're trying to decide whether or not something is commutative.
This is a block of text that can be added to posts you make. There is a 512 character limit.
trythil
is
 
Joined: 23 Jul 2002
Location: Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch

Postby Keeper of Hellfire » Thu Sep 21, 2006 2:59 am

trythil wrote:For any real numbers A, B where A, B nonzero, A - B != B - A.
Wrong condition. Must be: where A, B not equal. Or, if you desperatly want to have nonzero in it: where A-B nonzero. :wink:
User avatar
Keeper of Hellfire
 
Joined: 09 Jan 2005
Location: Germany

Postby Krisqo » Thu Sep 21, 2006 9:26 am

So:

a-b!=b-a = Video Clip (filter) b! = b (filter) Video Clip

but what does b! stand for? Is it just there or some type of variable? I suck at math, btw.
Image
User avatar
Krisqo
Cooking Oil
 
Joined: 07 Jul 2003
Location: Moderating the Adobe Forums
Status: W.O.A (Waiting on Aion)

Postby Scintilla » Thu Sep 21, 2006 4:09 pm

Krisqo wrote:So:

a-b!=b-a = Video Clip (filter) b! = b (filter) Video Clip

but what does b! stand for? Is it just there or some type of variable? I suck at math, btw.

"!=" is a common notation for "is not equal to". The ! goes with the =, not with the b.
ImageImage
:pizza: :pizza: Image :pizza: :pizza:
User avatar
Scintilla
(for EXTREME)
 
Joined: 31 Mar 2003
Location: New Jersey
Status: Quo

Next

Return to Video Software Help Archive

Who is online

Users browsing this forum: No registered users and 0 guests