Log in

View Full Version : Placement Of Filters In A Script...


EpheMeroN
18th September 2005, 01:58
AddBorders() Question:
-----------------------------------------------------------------
Does using AddBorders() right after a resize, or at the very end of a script make any bit of difference whatsoever to the video?

EXAMPLE #1:
AVISource("C:\Video\movie.avi",audio=false)
FunkyDeblock()
LimitedSharpen(strength=130)
BicubicResize(704,480).AddBorders(8,0,8,0)
HQDering()
Levels(0,1,255,16,235)
EXAMPLE #2:
AVISource("C:\Video\movie.avi",audio=false)
FunkyDeblock()
LimitedSharpen(strength=130)
BicubicResize(704,480)
HQDering()
Levels(0,1,255,16,235)
AddBorders(8,0,8,0)

Levels() Question:
-----------------------------------------------------------------
I just read in a very recent thread here that said if you want to change the levels for TV range (16-235) AND use a sharpening filter in the same script, you need to put the Levels() command after the sharpener because it can screw up Levels() somehow. As you can see from my script examples, I had the Levels() command at the end of the script, but when previewing it in Vdub, the levels were still off a bit (min-low was around 9-10 instead of 16). Why is this?

Also, for some reason Limiter() and ColorYUV("levels=PC->TV") didn't work whatsoever. When previewing them in Vdub, the color range was still 0-255. I have no idea why that is.

stickboy
18th September 2005, 02:03
Does using AddBorders() right after a resize, or at the very end of a script make any bit of difference whatsoever to the video?Yes. If you apply other filters after calling AddBorders, you're filtering the borders. If you're applying spatial filters, you're blurring your borders into your picture. If nothing else you're wasting processing time.

foxyshadis
18th September 2005, 04:53
Are you sure you're talking about Y levels, and not RGB? Remember that a conversion to RGB, which virtualdub does in order to preview, already involves running Limiter() on the input, and a 16-235 y range translates to a 0-255 RGB range.

EpheMeroN
18th September 2005, 06:48
Yes. If you apply other filters after calling AddBorders, you're filtering the borders. If you're applying spatial filters, you're blurring your borders into your picture. If nothing else you're wasting processing time.
Good to know! I was thinking something like that, just wasn't sure. Thanks.

Are you sure you're talking about Y levels, and not RGB? Remember that a conversion to RGB, which virtualdub does in order to preview, already involves running Limiter() on the input, and a 16-235 y range translates to a 0-255 RGB range.
I am unsure actually. I'm just learning about levels. So, VirtualDub automatically converts the video to RGB upon loading? Is there a proper method to finding out what the real Y levels are then? What I'm doing now is after loading the levels command, opening up its properties, clicking on Show Preview, then Sample Frame, and looking at the video histogram.

squid_80
18th September 2005, 07:26
coloryuv(analyze=true) will show some information including the maximum and minimum values for chroma and luma.