Log in

View Full Version : Chroma-shift error when weaving YV12


nhope
4th May 2011, 10:16
Here is 2 seconds of 720x240 60p Lagarith video in YV12 format (http://www.mediafire.com/?0on4805k4w5jql3) and YUY2 format (http://www.mediafire.com/?sbqgy46cdtxcqme) that was bobbed (QTGMC) and resized from interlaced 1080-60i material. They are nearly visually identical, with no obvious errors.

I then interlace them with a script like this:

AviSource("YV12-720x240-60p.avi")
AssumeFieldBased()
Weave()

This is fine for the YUY2 clip, but results in a chroma shift problem during very fast motion in the YV12 clip, as seen by the ghosting when I take screenshots of the re-interlaced video after putting it on a 60p Vegas Pro timeline (which bobs it back to progressive):

http://dl.dropbox.com/u/21489814/dancer.jpg
http://dl.dropbox.com/u/21489814/car.jpg

The problem has been found in AviSynth 2.5.8 ST, 2.58 MT and 2.6 MT.

Is this a known issue with weave() and YV12? Any solution?

Didée
4th May 2011, 11:06
The (to me) unknown variable is "Vegas Pro".

The same workflow, just that bobbing is also done by Avisynth ...

avisource("YV12-720x240-60p.avi")
assumefieldbased()
weave()
#--------
bob()
return(last)

does not exhibit that problem. It is fine.

nhope
4th May 2011, 11:54
Thanks Didée. That's interesting. I also get no ghosting if I bob it in AviSynth. But if I bob it in VirtualDub, TMPGEnc Xpress 4, or Sony Vegas Pro, or encode it with CinemaCraft Encoder Basic, I get the red ghosting. I was hoping to use SmoothLevels (which currently doesn't have YUY2 support) and enjoy the extra speed of YV12, but it looks like a bad idea to feed interlaced YV12 into another program.

Didée
4th May 2011, 12:45
Speaking for VirtualDub: VD does all its processing in RGB (historically. Newer versions also ca filter in VUV colospace, but I've no experience with that in VD). But Vdub does the YV12->RGB conversion in progressive style, and that's where the chroma issue is created. If you add "ConvertToYUY2(interlaced=true)" or ConvertToRGB(interlaced=true) to the end of your Avisynth script, you'll find that bobbing in Vdub then is correct.

Probably it's a similar issue in Vegas, but I can't tell. Try and see.

nhope
4th May 2011, 13:13
Sony Vegas also does its internal processing in RGB. Yes, adding ConvertToYUY2(interlaced=true) or ConvertToRGB(interlaced=true) fixes the problem, but I was trying to keep the number of colorspace conversions to a minimum. I'll ask LaTo about YUY2 support for SmoothLevels.

Edit: TheSkiller also replied to this issue here (http://forum.doom9.org/showthread.php?p=1572179#post1572179).