View Single Post
Old 26th April 2012, 09:45   #40  |  Link
AMSS0815
Registered User
 
Join Date: Aug 2006
Posts: 29
OK, I just skimmed your response and I hope I understand you correctly.
Quote:
Originally Posted by shark000X View Post
but the AnalizeLogo operates the inner-restricted 128 range for Chroma -- the same way as a simple YUV->RGB convertion does (Ymax=255, Umax=128, Vmax=128) -- resulting all the U and V values out of 128 range to be clipped by the AnalizeLogo itself
Short response: No, and: a simple YUV->RGB conversion clips U and V values?? Maybe there is some shifting going on, like [0,255]-->[-128,127] or similar, but I cannot imagine that YUV wastes halve of its color range.

Anyway, up to programming bugs (which might always exist), AnalyzeLogo does not clip any color range. I suspect that your analysis refers to this part of the docs:
Quote:
To prevent overflow of the sum of squares, all pixel values are reduced by 128 prior to computation.
This means that all color channels that get analyzed (R,G,B, maybe A, or Y,U,V) get shifted [0,255]-->[-128,127]. The reason for this is that AnalyzeLogo sums up the squares of the channels pixel values until the end of the movie clip or until the 32-bit buffer runs full (a 32-bit integer for each pixel and each channel). This shift keeps the squares a bit smaller and allows more frames to be summed up before the buffer runs full. No information is lost here, no clipping occurs. And the shift is reversed before the color part of the logo is returned to the user.

I cannot test this right now, only at weekend, but maybe you can: Apply AnalyzeLogo+Deblend to YourClip.Grayscale.Levels(0,1,255,0,127). This clip should have all pixel values in permitted ranges, and I expect you to observe the same (glass-like) problem. On the other hand, if this works well (and you have thus solved your problem at least for a Grayscale'd version of your clip), you have a point and I will have a closer look at my code.

-- AMSS0815
AMSS0815 is offline   Reply With Quote