Myrsloik
30th May 2011, 20:47
What it is:
A function that generates a clip where the frames have a varying pitch.
What to do with it:
Use it as input to filters to expose bugs in that would otherwise be missed. Specifically the case where a filter assumes pitch is constant between frames.
Why:
To show that the decomb package is broken in all versions of avisynth. At first I was just trying to figure out why chroma got corrupted in avisynth 2.6 when telecide() was used after crop(), but after looking at the source I saw it both assumes pitchuv = pitchy / 2 and constant pitch between frames.
(other minor nitpicks: comes with an ancient avisynth.h which requires internal.h too, the abs() function is used on unsigned ints which newer versions of visual studio rejects, inconsistent linebreaks, broken metrics output in decimate() when cycle!=5)
Suggestions on what to use this thread for:
Naming and shaming other filters with this issue
Pointing out how stupid this post is
Fun
function TestPitchHandling(int "width", int "height", string "pixel_type", bool "destructive") {
pixel_type = Default(pixel_type, "YV12")
destructive = Default(destructive, false)
ColorBars(width, height, pixel_type=pixel_type)
destr = ScriptClip("BilinearResize( \
(Int((Width() + 1) * (2 + Sin(current_frame))) / 2) * 2, \
(Int((Height() + 1)* (2 + Sin(current_frame))) / 2) * 2).Crop(0, 0, Width(), Height())")
plain = ScriptClip("AddBorders(0, 0, \
(Int(Width() * (1 + Sin(current_frame))) / 2) * 2, \
(Int(Height() * (1 + Sin(current_frame))) / 2) * 2).Crop(0, 0, Width(), Height())")
return (destructive ? destr : plain)
}
To break Telecide() simply do:
TestPitchHandling()
Telecide()
A function that generates a clip where the frames have a varying pitch.
What to do with it:
Use it as input to filters to expose bugs in that would otherwise be missed. Specifically the case where a filter assumes pitch is constant between frames.
Why:
To show that the decomb package is broken in all versions of avisynth. At first I was just trying to figure out why chroma got corrupted in avisynth 2.6 when telecide() was used after crop(), but after looking at the source I saw it both assumes pitchuv = pitchy / 2 and constant pitch between frames.
(other minor nitpicks: comes with an ancient avisynth.h which requires internal.h too, the abs() function is used on unsigned ints which newer versions of visual studio rejects, inconsistent linebreaks, broken metrics output in decimate() when cycle!=5)
Suggestions on what to use this thread for:
Naming and shaming other filters with this issue
Pointing out how stupid this post is
Fun
function TestPitchHandling(int "width", int "height", string "pixel_type", bool "destructive") {
pixel_type = Default(pixel_type, "YV12")
destructive = Default(destructive, false)
ColorBars(width, height, pixel_type=pixel_type)
destr = ScriptClip("BilinearResize( \
(Int((Width() + 1) * (2 + Sin(current_frame))) / 2) * 2, \
(Int((Height() + 1)* (2 + Sin(current_frame))) / 2) * 2).Crop(0, 0, Width(), Height())")
plain = ScriptClip("AddBorders(0, 0, \
(Int(Width() * (1 + Sin(current_frame))) / 2) * 2, \
(Int(Height() * (1 + Sin(current_frame))) / 2) * 2).Crop(0, 0, Width(), Height())")
return (destructive ? destr : plain)
}
To break Telecide() simply do:
TestPitchHandling()
Telecide()