Log in

View Full Version : using crop produces yellow "wash" in the video


jarthel
22nd March 2003, 13:20
Here's the script I've used
-----------
LoadPlugin("D:\downloads\windows\utilities\divx\avisynth\plugins25\MPEG2Dec3.dll")
LoadPlugin("D:\downloads\windows\utilities\divx\avisynth\plugins25\Convolution3DYV12.dll")
LoadPlugin("D:\downloads\windows\utilities\divx\avisynth\plugins25\Decomb.dll")
LoadPlugin("D:\downloads\windows\utilities\divx\avisynth\plugins25\asharp.dll")

body=mpeg2source("e:\dvdrips\escaflowne5\escaflowne5.d2v",idct=5,cpu=6,iPP=true).crop(10,2,696,476).Telecide().Decimate(cycle=5).lanczosresize(640,480)

return body

#Please note the width is mod4 for Decomb compatibility
-----------

Here's the screenshot of the above stated script.

click here to see a screenshot of the problem (http://photos.yahoo.com/bc/jarthel/vwp?.dir=/divx&.src=ph&.dnm=escaflowne.jpg&.view=t)
---------------

Here's the screenshot of the same script without crop

click here to see a screenshot (http://photos.yahoo.com/bc/jarthel/vwp?.dir=/divx&.src=ph&.dnm=escaflowne5++without+crop.jpg&.view=t)
----------------


According to dvd2avi, the video is a mixed of interlace and progressive frames.

I have tried both avs2.5 (6-March release) and avs2.51 (13-March release).

I've tested the same script with crop in avs207 and the problem is not present. Of course I was using avs2 filters. :)

As can be seen in the 1st screenshot, the face and the clothing is full of yellow "wash".Removing crop eliminates the problems as can be seen from the 2nd screenshot.

Thanks:)

Jayel

ps.

Guest
22nd March 2003, 13:41
What happens with each of these crops:

crop(12,2,696,476)
crop(10,4,696,476)
crop(12,4,696,476)

jarthel
22nd March 2003, 13:53
crop(12,2,696,476) with yellow wash
crop(10,4,696,476) no yellow wash
crop(12,4,696,476) no yellow wash
----------------
For me, all three crop settings are legal values.

any explanation? Thanks :)

Jayel

Guest
22nd March 2003, 14:03
Originally posted by jarthel
any explanation? Yes, of course. It's obvious. :)

When you have YV12 interlaced chroma sampling, you can crop the Y axis only by multiples of 4 lines. If you sketch the lines and chroma samples, you can see that cropping by 2 mangles the chroma alignment.

jarthel
22nd March 2003, 14:07
from my previous threads, Shodan mentioned that height and width needs to be mod4. Also Avisynth2.5 will throw an error in the crop parameters use is not even numbers.

Maybe this error message needs to change to reflect the need for mod4 values in the left and top parameters for crop.

thanks Donald. :)

jayel

Guest
22nd March 2003, 14:14
Originally posted by jarthel
Maybe this error message needs to change to reflect the need for mod4 values in the left and top parameters for crop.
You have entered the domain of YV12, from which no one emerges alive. :)

Cropping the Y axis by multiples of 2 is fine for progessive chroma sampling, but not fine for interlaced chroma sampling. The Crop() function has no reliable way to ascertain the type of chroma sampling. Avisynth 3.0 may include it as a frame property which can be defaulted using an appropriate script command. This is still being worked out by the Avisynth 3.0 team. See the sticky thread on video properties if you want to get trapped even deeper in the YV12 quicksand. :)