View Full Version : YUY2 and RGB problems


iparout
7th October 2002, 13:12
Hi there.

I just created an avisynth script to open it in VDub in order to encode a captured AVI (Huffy) to divx. Amongst others, the script includes a FieldDeinterlace command and when I try to open the script in VDub I get the following message :

Avisynth open failure
FiledDeinterlace : YuY2 data only (no RGB); use ConvertToYUY2

What is weird though is that the input AVI file is in Huffy format. Isn't Huffy supposed to be YUY2 ?

The original captured AVI is in Uncompressed YUY2 format. I loaded it into VDub and re-encoded it to Huffy, which was afterwards served to VDub thorugh Avisynth, as described in the beginning of my post.

Can anyone help me out here ? Why isn't Huffy recognized as YUY2 ? Does the ConvertToYUY2 command in Avisynth result in quality loss ?

Thanks in advance

hakko504
7th October 2002, 13:23
Huffy can work in both RGB and YUY2 mode. If you used 'full processing' in VD then VD always converts the data to RGB as it is the only way VD can handle things in 'full processing mode'. If you started with YUY2 data the adding ConvertBackToYUY2() will not really add noise, just maybe some rounding errors, and if you do any filtering they will most likely not be visible.

iparout
7th October 2002, 13:40
Yes I used Full Processing in Vdub in order to encode the Uncompressed YUY2 file to Huffy.

However in Huffy codec configuration, there is an option under the RGB Compression Method tab that says <--- Convert to YUY2. If I enable this, will the output Huffy be YUY2 and load correctly in Avisynth ?

If yes, which is better in terms of quality : Use the "<-- Convert to YUY2" option in Huffy configuration or leave the RGB tab in Huffy configuration as it is ("RGB = Predict Gradient") and the use the ConvertBackToYUY2() command in avisynth ?

hakko504
7th October 2002, 13:54
Originally posted by iparout
Yes I used Full Processing in Vdub in order to encode the Uncompressed YUY2 file to Huffy.

However in Huffy codec configuration, there is an option under the RGB Compression Method tab that says <--- Convert to YUY2. If I enable this, will the output Huffy be YUY2 and load correctly in Avisynth ?

Yes.

If yes, which is better in terms of quality : Use the "<-- Convert to YUY2" option in Huffy configuration or leave the RGB tab in Huffy configuration as it is ("RGB = Predict Gradient") and the use the ConvertBackToYUY2() command in avisynth ? Best is of course to use 'fast recompress' in VD and don't convert to RGB at all. Unless you actually do some filtering in VD then there is no reason NOT to use it - it's faster and has better quality.
In terms of quality there is probably no visible difference between the options, in fact I'd put my money on ConvertBackToYUY2() as it has been optimized after Ben stopped development of AVIsynth. You will save quite a lot of storage space by letting huffy do the conversion before saving though.

iparout
7th October 2002, 14:03
Originally posted by hakko504

Best is of course to use 'fast recompress' in VD and don't convert to RGB at all. Unless you actually do some filtering in VD then there is no reason NOT to use it - it's faster and has better quality.
In terms of quality there is probably no visible difference between the options, in fact I'd put my money on ConvertBackToYUY2() as it has been optimized [b]after Ben stopped development of AVIsynth. You will save quite a lot of storage space by letting huffy do the conversion before saving though.

Fast recompress ?!? I hadn't noticed that option before !!! lol So by using fast recompress to encode from Uncompressed YUY2 to Huffy, the quality will be better than using Full Processing Mode for the same purpose (I don't do any filtering) ? How is that possible ? I mean shouldn't then Fast Recompress work for DivX encoding too ?

hakko504
7th October 2002, 14:32
Originally posted by iparout


Fast recompress ?!? I hadn't noticed that option before !!! lol So by using fast recompress to encode from Uncompressed YUY2 to Huffy, the quality will be better than using Full Processing Mode for the same purpose (I don't do any filtering) ? How is that possible ? I mean shouldn't then Fast Recompress work for DivX encoding too ? Yes, it does. There is no point at all in using Avisynth if you don't use 'fast recompress' when you do the final conversion to DivX.

Come to think about it: if you don't need the HD space, why not open the uncompressed AVI in AVISynth and do the conversion directly. (hint: trim might be useful.)

iparout
7th October 2002, 15:02
Originally posted by hakko504
Yes, it does. There is no point at all in using Avisynth if you don't use 'fast recompress' when you do the final conversion to DivX.

Come to think about it: if you don't need the HD space, why not open the uncompressed AVI in AVISynth and do the conversion directly. (hint: trim might be useful.)

I think I will be using VDub directly cause I don't se Fast Recompress in DivX encoding and Avisynth is a real pain to learn...

Thanks for the help nonetheless...

EDIT : I forgot to ask : In which colorspace does Premiere 6.0 work ?