Log in

View Full Version : Huffyuv and YV12 using AviSynth


flipdon
29th January 2003, 10:00
Ok, I'm using AviSynth v2.5 which works in YV12 (its the default colorspace, right? correct me if im getting it wrong). Now, i read http://forum.doom9.org/showthread.php?s=&threadid=38389 (here) that there isn't a version of Huffyuv codec for YV12.

Would that mean i need the line YV12toYUY2() at the end of my script, since Huffyuv can't work in YV12? Am i getting this wrong? I usually load my .avs into VirtualDub 1.4.13(P4 optimized veedubp4.exe) using Fast Recompress and Huffyuv v.2.1.1 CCESP Patch v0.2.2 as my compression. I tried both a script containing YV12toYUY2() and one without, and it made .avi's both times, with no noticable difference in speed (for a short clip at least). Is there an automatic conversion to YUY2 when loading into Virtualdub? Can someone explain what exactly is going on, and what i should be doing? I'm a little confused.

And are there certain settings for Huffy i need to be using? Right now i use a Field Threshold of 240, Predict median for YUY2 compression, and Predict gradient for RGB compression, with 'Always suggest RGB format for output' checked off.

hakko504
29th January 2003, 10:11
The difference is that with the YV12toYUY2 line in the script then AviSynth will do the conversion, and if you don't have it then VirtualDub (through your YV12 decoder, probably DivX5.0x or XviD) will do the conversion. You will end up with YUY2 in any case, but the files may not be identical due to slight differences in the code. Most likely they will only differ due to rounding errors.

sh0dan
29th January 2003, 11:55
Use ConvertToYUY2() - the differences will mostly only be in the handling of interlaced material, which is tricky with YV12 <-> YUY2. If you are not using interlacing, there is no need to worry.

flipdon
29th January 2003, 17:20
my source is interlaced and i've been using the following in my script:


telecide()
decimate(mode=3)
FieldDeinterlace()

should i still end up using ConvertToYUY2() instead? Or did u mean if my end result is interlaced?

sh0dan
29th January 2003, 18:22
Yes - it only matters at the point of the conversion, so you can safely use converttoyuy2.