stickboy
25th September 2002, 11:40
The Levels documentation (http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/avisynth2/avisynth/docs/filters/levels.html) indicates that the Levels filter should be compatible with the one from VirtualDub, but I'm not getting the same results.
I made the following script:
ColorBars(640, 480)I loaded it in VirtualDub and applied VirtualDub's Levels filter with the following settings: 5, 1.0, 25, 0, 255, luma mode
Then I opened another instance of VirtualDub and loaded the following script:
ColorBars(640, 480) # ColorBars produces an RGB32 clip
ConvertToYUY2() # make sure levels operates on luma only
Levels(5, 1.0, 25, 0, 255)
ConvertToRGB32()The two cases above produce significantly different results.
In RGB mode, however, Levels seems to produce the same results in Avisynth as in VirtualDub for all practical purposes (not exact, but very, very close).
The docs also indicate that Levels should behave the same in RGB mode as in YUY2 mode if gamma == 1.0. However, the following script seems to demonstrate that not to be the case:
a=ColorBars(640, 480)
b=a.ConvertToYUY2().Levels(5, 1.0, 25, 0, 255).ConvertToRGB32()
c=a.Levels(5, 1.0, 25, 0, 255)
Subtract(b, c)The differences are significant enough that I don't think that they're the results of colorspace conversion artifacts, although I could be wrong...
(I'm using Avisynth 2.0.5 (2002-09-18 build from dividee (http://forum.doom9.org/showthread.php?s=&threadid=33742&pagenumber=2)) and VirtualDub 1.4.10.)
I made the following script:
ColorBars(640, 480)I loaded it in VirtualDub and applied VirtualDub's Levels filter with the following settings: 5, 1.0, 25, 0, 255, luma mode
Then I opened another instance of VirtualDub and loaded the following script:
ColorBars(640, 480) # ColorBars produces an RGB32 clip
ConvertToYUY2() # make sure levels operates on luma only
Levels(5, 1.0, 25, 0, 255)
ConvertToRGB32()The two cases above produce significantly different results.
In RGB mode, however, Levels seems to produce the same results in Avisynth as in VirtualDub for all practical purposes (not exact, but very, very close).
The docs also indicate that Levels should behave the same in RGB mode as in YUY2 mode if gamma == 1.0. However, the following script seems to demonstrate that not to be the case:
a=ColorBars(640, 480)
b=a.ConvertToYUY2().Levels(5, 1.0, 25, 0, 255).ConvertToRGB32()
c=a.Levels(5, 1.0, 25, 0, 255)
Subtract(b, c)The differences are significant enough that I don't think that they're the results of colorspace conversion artifacts, although I could be wrong...
(I'm using Avisynth 2.0.5 (2002-09-18 build from dividee (http://forum.doom9.org/showthread.php?s=&threadid=33742&pagenumber=2)) and VirtualDub 1.4.10.)