Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > Capturing and Editing Video > Capturing Video
Register FAQ Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 15th April 2004, 15:38   #1  |  Link
Kalicrys
Registered User
 
Join Date: Oct 2003
Location: Seoul, South Korea
Posts: 23
Color Space Conversion during capture- what is lost?

I wonder how much is lost?
If anybody has done some tests on this matter, I would love to hear the results.

Capturing an NTSC stream at 720x480 uyvy 29.97fps and huffyuv,
I get approximately 10-15% reduction of file size by converting to RGB and then back to YUY2. So how much information am I losing?
Kalicrys is offline   Reply With Quote
Old 15th April 2004, 16:20   #2  |  Link
trevlac
budala
 
Join Date: Oct 2003
Location: U.S.
Posts: 545
Hard to say ...

I'm not clear on what you are comparing ....

Capture YUV -vs-

1) Capture RGB converted to YUV by Huffy
2) Capture YUV converted to RGB then to YUV

Anyway .... The bigest loss is when the conversion from YUV->RGB changes the range and clamps. YUV has headroom and footroom. PC RGB does not. Loss depends on what does the conversion and how. Huffy YUV->RGB changes the range. If your source has too high a gain, you will be in the headroom.

If there is not a range change, the conversion from YUV->RGB and back is subject to rounding errors mainly in the UV components. If this is done with reasonably accuracy and the same/reverse equations are used to go back, I believe the loss is minimal.

The big question to you is do you see a difference? Don't get stuck on this as a big evil. There are good things and bad things about both color spaces. When done the right way, the effect of a single conversion and back is a blip in what your video goes thru on it's way back out to your viewing device.

BTW: Generally speaking, YUV 4:2:2 is the best colorspace/subsampling for analog capture. YUY2 for example.
trevlac is offline   Reply With Quote
Old 16th April 2004, 14:20   #3  |  Link
Kalicrys
Registered User
 
Join Date: Oct 2003
Location: Seoul, South Korea
Posts: 23
Thanks trevlac
Actually I was speaking of case 2.

I tried using avisync's ConvertTo functions,
and full processing mode in vdub + huffyuv set to convert RGB to YUV before compressing.
The results are exactly the same.


I just tried using Subtract() in avisynth to see the difference,
and I can see the difference in vivid colors.
I was thinking in terms of;
a) YUV->RGB, smaller colorspace to larger colorspace conversion doesn't use colors that are not in YUV, no information to be lost in RGB->YUV (assuming proper YUV->RGB conversion, range adjustment etc...)
b) IxI^-1 = 1

But thinking about it the rounding errors do sound problematic, given the limit of floating point precision in computers.

However I really wasn't able to tell the difference by plain eye, due to the complexity of the scene. Maybe I'll check something with larger areas of solid color and see if I can notice any color shift.
If not this seems like an unobtrusive way of increasing compressibility, minimal though it may be, that will not create artifacts like smoothing filters.
Kalicrys is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 20:27.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.