PDA

View Full Version : Color space advice, please.


videoFred
20th May 2005, 10:10
I'm not an expert in colorspace, and need good advice.

Lets begin with my camera: output of this machine vision camera is YUV(4:2:2).
Progressive and uncompressed, as far as I can see.
With the fire wire connection, I capture direct to harddisc.
As a codec for these AVI files, I use Huffyuv.
But how do I configure Huffy to begin with?
Huffy converts to YUY2, right?

Then, I load the Huffyuv files into my Avisynth script.

Here is my filter chain:

1) MVTools MVDenoise: requires YV12
2) Depan: requires YV12
3) MSharpen: works with RGB32, YUY12, YV12
4) Cropping and resizing
5) HDRAGC: requires RGB
6) Save the file again with Huffyuv: back to YUY2 again, right?

So my file is converted 4 times! from the original YUV to YUY2-YV12-RGB then back again to YUY2.

My questions are:

1) My source is 1024 x768, progressive. But at the point I use the HDRAGC filter, there is already a resizing 720x576. Should I use ConvertToRGB32("rec709", false)?

2) At the end of the script, should I use ConvertBackToYUY2 or should I leave this to Huffyuv?

3) How do I configure Huffyuv for capturing and at the end of the script, in my case?
My end target is Mpeg2, for DVD use.

4) Any other suggestions to improve quality?

Fred.

Wilbert
20th May 2005, 10:40
Lets begin with my camera: output of this machine vision camera is YUV(4:2:2).
So, that's just YUY2.

1) MVTools MVDenoise: YV12
2) Depan: YV12
3) MSharpen: use YV12
4) Cropping and resizing:
5) HDRAGC: RGB
6) Save the file again with Huffyuv: back to YUY2 again, right?

So that's two conversions here: YUY2->YV12->RGB.

You don't need convert back to huffyuv, just open the script in a mpeg-2 encoder. Of course this results in the conversion RGB->YV12, which i advice you to do in AviSynth.

1) My source is 1024 x768, progressive. But at the point I use the HDRAGC filter, there is already a resizing 720x576. Should I use ConvertToRGB32("rec709", false)?
Nope, just ConvertToRGB32().

videoFred
20th May 2005, 10:49
Originally posted by Wilbert
[B]So, that's just YUY2.

Ah! Good news, I did not know this.

So that's two conversions here: YUY2->YV12->RGB.

Yes!

You don't need convert back to huffyuv, just open the script in a mpeg-2 encoder. Of course this results in the conversion RGB->YV12, which i advice you to do in AviSynth.

Yes, but I must import these files first into an NLE program(Magix) to add music etc...
From there I make the Mpeg2.

However, thank you for the fast advice, in our langue: Dank je!;)

Fred.

Wilbert
20th May 2005, 11:32
Yes, but I must import these files first into an NLE program(Magix) to add music etc... From there I make the Mpeg2.
If that doesn't open avs scripts, you can try makeAVIS or vfapi (both are avi wrappers / vfapi needs RGB24 though). If those wrappers don't work, you are stuck with huffyuv.