Log in

View Full Version : Script to convert and "restore" color from YUV to RGB?


chilledinsanity
24th August 2015, 16:10
First off, I'll say I'm not an expert at all when it comes to color, but I want to attempt to improve it for some videos I make. I work a lot with computer game footage, which outputs at RGB, however most capture software is done using the YUV colorspace. Now this might not matter since Youtube displays at 4:2:0, so there's going to be some loss anyway. The thing is, if I record at RGB v. YUV, I can actually see the difference in the end video. Take a look at the red lantern at the top of the screen in these videos:

(Originally recorded in lossless RGB):
https://www.youtube.com/watch?v=DAK_thNnwIE

(Originally recorded in YUV):
https://www.youtube.com/watch?v=QYRQzp_PR3I

The difference is subtle, but it's definitely there. Now the obvious solution would be to just record everything in RGB to begin with before upload, but that's not always practical for some situations. So my question is, is there any sort of script out there that can take its "best guess" at restoring the color converting back to RGB in editing that was originally recorded at YUV? I'm not expecting miracles and realize this would just be guesswork, but I wanted to see if there was any method I could use to try and restore a little more of the color in post-production for YUV footage.



Short version: I'm looking for a script to convert YUV footage to RGB and take its "best guess" at trying to make the color a little more vibrant for RGB colorspace.

raffriff42
25th August 2015, 21:03
Unfortunately, in 4:2:0, color resolution is cut in half, both in width and height. This means three-fourths of the color information has been lost forever.

Long ago, I tried sharpening the color channels in different ways (here's one (http://forum.doom9.org/showthread.php?p=1647215#post1647215)), but it doesn't help much. I never bother with it anymore.

raffriff42
5th September 2015, 13:32
Good news:
http://forum.doom9.org/showthread.php?p=1737201#post1737201
This routine was written for antialiasing, and it works OK for that - but it also has a definite sharpening effect on color detail.