View Full Version : What does luma offset mean?
ultimatebilly
9th May 2003, 12:07
I did searches with all parameters I could think of and read the really big lumimasking thread, but it still isn't clear to me what luminance offset really means/does...
Maybe someone who is a bit lumagain(+) than me could give a short explanation? :D
Wilbert
9th May 2003, 13:49
Adding a luma offset just means that you are making your clip brighter. Normally the luma is between 16 and 235. Adding a luma offset of 16, implies that the new luma is between 32 and 251.
ultimatebilly
9th May 2003, 15:17
Thank you for your answer, wilbert, seems to make sense...
But I thought that was what could be accomplished using lumgain?
Well, then I change my question:
In the mpeg2dec3.dll readme it says the following:
LumaFilter(clip, integer "lumoff", float "lumgain")
the transfomation is : yy = (y*lumgain)+lumoff
lumoff :
Luminosity offset.
default = -2 (for iago ^^)
lumgain :
Luminosity gain.
default = 1
Is it right then that lumoff -2 gives you a range from -2 to 253 (where the values under 0 are just 0)?
But what else does lumgain then?
And couldn't it be possible to just apply lumoff to values under lets say, 20, so dark blocks are minimized but the rest of the picture isn't compromised?
Wilbert
12th May 2003, 09:24
Is it right then that lumoff -2 gives you a range from -2 to 253 (where the values under 0 are just 0)?
I don't know. In the internal filters (which you can also use to adjust the offset and gain): ColorYUV and Tweak the range of lumoff is between -256 and 256. Maybe MarcFD scaled the range differently, otherwise I don't understand the default of -2.
But what else does lumgain then?
It changes the contrast. The higher the contrast, the larger the luma range. It is between 0 and 10 here, whereas the default 1 does nothing.
And couldn't it be possible to just apply lumoff to values under lets say, 20, so dark blocks are minimized but the rest of the picture isn't compromised?
I don't think this is possible. You will have to apply it to the whole clip.
ultimatebilly
12th May 2003, 10:02
Thanks Wilbert!
I think I might have understand a bit of it now...
Here is a quote from the description of coloryuv:
Gain is a multiplier for the value. That means that if gain is set to 0, it preserves the values as they are. When gain is 256 all values are multiplied by 2 (twice as bright). If gain is 512 all values are multiplied by 3.
Offset adds a value to the luma or chroma values. An offset set to 16 will add 16 to the pixel values. An offset of -32 will subtract 32 from all pixel values.
Ok...
When we now use lumafilter(), a shift of -2 is applied to the whole luminance-spectrum...
Therefore values which are a little brighter than black (and are therefore perceived as blocks in black areas) are brought to be 0 as well).
But now we have to compensate for the darkening of the image...
Therefore we apply lumagain...
Because it uses a multiplication, the 0-values will not be affected, only the other parts of the picture will be made brighter (nearer to the original).
-> We have lost some of the blocks in black areas...
Is this the right direction or total bullshit?
Originally posted by ultimatebilly
...couldn't it be possible to just apply lumoff to values under lets say, 20, so dark blocks are minimized but the rest of the picture isn't compromised?
have a look at blockbuster! it does (something) u want. anyway, be careful with such operations. it can make very strange effects.
@lumafilter()
yep. it does something u outlined, but (afaik) the effect is not a simple luma shift but rather 'gaining'.
y
ultimatebilly
12th May 2003, 11:28
Thanks for pointing me to blockbuster, yaz!
The readme seems to second what I thought:
For example, if luma_threshold is 30 and luma_offset is -2, dark pixels (those with a luma between 0 and 30 inclusive) will have 2 subtracted from them, making them slightly darker still.
(Rationale: It was discovered that Marc FD's mpeg2dec plugin's lumoff parameter seems to reduce the appearance of MPEG-4 "dark blocks" -- DCT blocks in dark areas of the frame -- further. These parameters are designed to do the same thing, but constrain the brightness change only to areas that seem to need it.)
I will have a look at blockbuster as soon as possible, although I'm afraid the "add noise" function is not suitable for me, because I'm usually doing 1cd rips with 2 languages...
But it is a really great idea!
http://forum.doom9.org/showthread.php?s=&threadid=45431&highlight=blockbuster+lumafilter
I found this thread in the meantime...
It suggests again that the positive effects are only achieved in combination with unfilter, as Iago previously mentioned in the "Lumimasking"-thread...
So I should try blockbuster in conjunction with unfilter...
Originally posted by ultimatebilly
I will have a look at blockbuster as soon as possible, although I'm afraid the "add noise" function is not suitable for me, because I'm usually doing 1cd rips with 2 languages...
But it is a really great idea!
no problem, functions are separable. u can use that 'selective luma offset' wout 'noising'. trick : make sharpen/blur with strength=0 or something like that :-)
Originally posted by ultimatebilly
... the positive effects are only achieved in combination with unfilter, as Iago previously mentioned in the "Lumimasking"-thread...
So I should try blockbuster in conjunction with unfilter...
yeah, good old times :-) dunno what iago think about it now. anyway, luma offsetting & noise-manipulation are diffrent things. imho, iago's suggestion means simply; both must be considered.
y
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.