[MPlayer-users] Request for Bloom effect in Video Output

Каримов Родион RodionKarimov at yandex.ru
Sat Dec 19 18:38:13 CET 2009


> I didn't talk about absolute brightness. It depends on how much brighter
> the area is than the maximum representable value. And that information
> is lost.

So you don't agree that this effect depends on brightness of objects relative to middle level of the scene?

> Bijections in reals are fine, but in practice we're talking about just
> 256 discrete values. And the filter would have to assume some particular
> mapping.

Of course it will be not as precise, as with HDR input - and I wrote about it somewhere in the beginning. But if there is no other input than [ 0, 255 ] - why not to use that?
We will add bloomed texture with the original, so it will mask artifacts, that will occur when bluring texture with bright pixel. Of course saving of intermediate results must be done in float16 or better - in float32.

> Are you claiming all films use some mapping different from
> normal gamma that does preserve information about brightness values
> which cannot be represented on normal output devices? If so, then which
> one? If you still want to argue this then specify an exact mapping (from
> each value 0-255 to brightness) that you think should be assumed. 

By this I mean - that operators are taking exposure for each scene so - that brightnesses of majority of objects in scene - are in the representable range. If it would not be so - then - there will be simply large areas of white color on bright objects.
And I'm not speaking - that brightness of all objects, that was on scene, must be accounted in this process - no - we have a picture - and the brightest pixels on it represent the brightest objects on that scene. If human would looked on them in reality - they have enough light energy to force bloom effect in facets. But monitors don't have such an energy - if they would - then there will be very strong pain in eyes after some hour of reading text on white background. So if they don't have such energy - why not to simulate this effect - why not to show to eyes that they have such energy? And the result is believable, if you look on star on this image - http://rodionkarimov.narod.ru/images/news_images/2009/december/extra_solar_rocky_planets_close.jpg - some time your eyes will feel that it is too bright and you want to take off your eyes from it - at least I feel this. But the color of the star is somewhere over white and when you simply read text on pure white background - there is no such feeling. It is only illusion of energy - but believable - realistic - illusion. So I'm asking about creation of the same illusion when playing films - let it be not 100% precise, as with HDR - but let it be - and let it be optional and customizable. So that everybody will decide by themselves - do they want this effect or not, and how much, if they want. Especially if to account that there is ability to relatively easily implement it with FBO.

> It's not done that way because the dynamic range is insufficient. If a
> light source got the value 255 then trying to preserve relative
> brightnesses would make the rest of the picture too dark.

One more time - I'm not saying about 100% precise implementation - let it be approximate. We have information that color ( 1, 1, 1 ) is more bright and have more energy than color ( 0, 0.5, 1.0 ) and if we know that average brightness is represented - let it be simple - by 0.5 + 0.5 + 0.5 - than we can assume that colors with brightness more than 0.8 + 0.8 + 0.8 will cause bloom effect. Of course we must assume average brightness - if everything is bright - so there is no need to blur. We can take pixels, that have brightness - Avg + 0.5 - so if the image is almost equally brighten - nothing will be blurred. And we can use local average brightness - not to calculate it to full image - but only to parts of it - we can resize texture of brightnesses by 2 and average values of neighboring pixels when doing this. There is ability to downsample texture more than 2 times. And when we will render it on the screen - we will have for each pixel average brightnesses of surrounding pixels.


More information about the MPlayer-users mailing list