Log in

View Full Version : Subtract - Same sources, large difference


Backwoods
26th August 2005, 21:53
Subtract Script
LoadPlugin("C:\Program Files\AviSynth 2.5\yea\DGDecode.dll")
v1=MPEG2Source("00.d2v")
v2=AVISource("descending_plain.avs").ConvertToYV12(interlaced=true)

Subtract(v1,v2)
#Levels(127,1,129,0,255)

"descending_plain.avs" Script
LoadPlugin("C:\Program Files\AviSynth 2.5\yea\DGDecode.dll")
Mpeg2Source("00.d2v")

The difference without Levels on
http://img262.imageshack.us/img262/2061/ctyv12nol4tj.th.jpg (http://img262.imageshack.us/my.php?image=ctyv12nol4tj.jpg)

The difference with Levels on
http://img262.imageshack.us/img262/5778/ctyv12l9tv.th.jpg (http://img262.imageshack.us/my.php?image=ctyv12l9tv.jpg)

Without the "ConvertToYV12(interlaced=true)" line the Subtract.avs script returns an error saying the image formats do not match, that is why I added that. Should there be this much of a difference with the same source?

The original file is from a Sony HDV camera.

Now another example:

Subtract.avs with "ConvertToRGB24(interlaced=true)" added
LoadPlugin("C:\Program Files\AviSynth 2.5\yea\DGDecode.dll")
v1=MPEG2Source("00.d2v").ConvertToRGB24(interlaced=true)
v2=AVISource("descending_plain.avs")#.ConvertToYV12(interlaced=true)

Subtract(v1,v2)
#Levels(127,1,129,0,255)

The difference without Levels on
http://img262.imageshack.us/img262/1776/ctrgb24nol4ou.th.jpg (http://img262.imageshack.us/my.php?image=ctrgb24nol4ou.jpg)

The difference with Levels on
http://img262.imageshack.us/img262/3131/ctrgb24l8ev.th.jpg (http://img262.imageshack.us/my.php?image=ctrgb24l8ev.jpg)

I'm sure there is something I am missing about color space conversions. I didn't think this much of a change would happen considering the original source is (should be) 4:2:0.

esby
27th August 2005, 20:32
I think that is pretty normal.

Colorspace conversions introduce distorsion in the picture.

When you use substract, you isolate the distorsion.
And when you level, you magnify it.

Your initial source is probably not decoded in yv12, that's why there are differences.

esby