PDA

View Full Version : ColorYUV two-pass analysis?


Velocity 7
13th October 2006, 05:05
Is it possible to do the following with ColorYUV:

1. Get the absolute minimum/maximum Y, U and V values on a first pass of a video using ColorYUV(analyze=true)
2. On second pass, tweak ranges so that Y, U, and V values are stretched to PC values (ala a ColorYUV("TV->PC") effect) but do not clip?

I've found that the ColorYUV("TV->PC") works wonders for the most part, but it actually loses a bit of information (since values aren't actually between 16 to 235, but rather "around" that area).

Original image:
http://naomi.thewafflehouse.net/before.png

ColorYUV(levels="TV->PC") applied:
http://naomi.thewafflehouse.net/after.png

ColorYUV(levels="PC->TV") applied, followed by comparison with original image + difference, auto-leveled to make it easier to see:
http://naomi.thewafflehouse.net/diff.png

Of course, without auto-leveling the differences, the actual loss when viewed by a human eye is practically < 0.001% or something. That isn't saying much if one does lossy encoding, but in the interest of "scientific" advancement I'd like to see a lossless way of doing a ColorYUV("TV->PC"). And vice versa. :)

foxyshadis
13th October 2006, 08:56
You could probably build it out of autocrop. The only reason I suggest that is you already have the framework to make it test a certain % of the movie, like 1 or 2, which would easily be enough to find a min/max, and then do something with it.

I remember thinking about doing this and then letting it die a while back, maybe I'll look at it again.

Velocity 7
13th October 2006, 15:00
If you've already done something in regards to this, it'd be great if you looked over your original notes. :)