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.

 

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

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th December 2014, 19:21   #1  |  Link
Stormborec
Registered User
 
Join Date: Feb 2013
Posts: 161
Color space conversions

Which color space do you use, when you need convert from YV12 to RGB, due to some plugin (e.g. virtualdubplugin)?
- RGB24 or RGB32 ?
Stormborec is offline   Reply With Quote
Old 15th December 2014, 19:26   #2  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,666
VDub plugins require RGB32; more info here: http://avisynth.nl/index.php/FAQ_usi...ualdub_plugins
Reel.Deel is offline   Reply With Quote
Old 15th December 2014, 19:34   #3  |  Link
Stormborec
Registered User
 
Join Date: Feb 2013
Posts: 161
OK.
And specifically this Avisynth plugin: http://avisynth.nl/index.php/ColorBalance ? What adventages and disadvantages have using RGB24 vs. RGB32?
Speed vs. rounding errors?
Stormborec is offline   Reply With Quote
Old 15th December 2014, 19:55   #4  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,666
I have never done any speed test with RGB24 vs RGB32 and I've never worked with any true RGB32 material in Avisynth.

RGB32 contains an alpha channel which most filters that accept this colorspace usually do not process or just copy the alpha channel from the input clip. Having said that speed will probably will be similar. When converting YUV to RGB24/32 rounding errors will be the same so this shouldn't be of any concern. The best thing to do is to try, compare, and make a decision based on the results.

Ok, found something useful:
Quote:
http://avisynth.nl/index.php/Color_spaces

RGB24 and RGB32 are both an interleaved image format. The only difference between the two are that RGB32 contains an extra byte for each pixel.

The extra byte RGB32 contains is known as an alpha pixel, but it is actually quite seldom used. The reason RGB32 is considered the "best" format is purely from a programmers view. Handling RGB32 material is much easier than RGB24 material, because most processors operate on 32bits at the time, and not 24.
Reel.Deel is offline   Reply With Quote
Old 15th December 2014, 20:20   #5  |  Link
Stormborec
Registered User
 
Join Date: Feb 2013
Posts: 161
If I understand you well - better is avoid conversions YUV >>> RGB (to choose plugin/script, which uses YV12)
Stormborec is offline   Reply With Quote
Old 15th December 2014, 20:32   #6  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,666
Avoiding YUV to RGB colorspace conversion is indeed is the best route but sometimes is a necessary evil. For native YUV color adjustment give SmoothAdjust a try.
Reel.Deel is offline   Reply With Quote
Old 15th December 2014, 21:14   #7  |  Link
Stormborec
Registered User
 
Join Date: Feb 2013
Posts: 161
Yes. I'm trying now http://avisynth.nl/index.php/WhiteBalance

It seems, it does what I need, but maybe exist something better ... The SmoothAdjust can do also something like white balance?
Stormborec is offline   Reply With Quote
Old 15th December 2014, 21:43   #8  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,666
With some ingenuity it may be possible to do white balance correction with SmoothAdjust, I'm sure it'll be cumbersome though. WhiteBalance is tailored for that specific purpose so it may be easier to achieve better results.
Another plugin that comes to minds is AutoAdjust, again, this may or may not work as well as WhiteBalance but may be worth a shot.

Here are some scripts that are specifically designed for white balance correction.
Reel.Deel is offline   Reply With Quote
Old 15th December 2014, 23:25   #9  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
At some point, it's always better to filter under rgb if ur gonna encode at 4:4:4
feisty2 is offline   Reply With Quote
Old 15th December 2014, 23:33   #10  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
Filter under rgb = about 2bits more precision than the same bitdepth ycbcr
Filter under high bitdepth linear rgb = gamma aware filtering, more correct results theoretically
feisty2 is offline   Reply With Quote
Old 16th December 2014, 18:57   #11  |  Link
Stormborec
Registered User
 
Join Date: Feb 2013
Posts: 161
Thanks
The Gray balance looks interesting. I'll try it, if the White balance fails for me.
Stormborec 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 05:01.


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