Log in

View Full Version : Adjusting gamma


cool9
4th August 2006, 01:08
Is there a filter for adjusting gamma? BTW, I found this informative:

http://www.faqs.org/faqs/graphics/colorspace-faq/

In video, computer graphics and image processing the "gamma" symbol represents a numerical parameter that describes the nonlinearity of intensity reproduction. The Gamma FAQ section of this document clarifies aspects of nonlinear image coding.

The Color FAQ section of this document clarifies aspects of color
specification and image coding that are important to computer graphics, image processing, video, and the transfer of digital images to print.

WHAT IS GAMMA?

The intensity of light generated by a physical device is not usually a linear function of the applied signal. A conventional CRT has a power-law response to voltage: intensity produced at the face of the display is approximately the applied voltage, raised to the 2.5 power. The numerical value of the exponent of this power function is colloquially known as gamma. This nonlinearity must be compensated in order to achieve correct
reproduction of intensity.
As mentioned above (What is lightness?), human vision has a nonuniform perceptual response to intensity. If intensity is to be coded into a smallnumber of steps, say 256, then in order for the most effective perceptual use to be made of the available codes, the codes must be assigned to intensities according to the properties of perception. Here is a graph of an actual CRT's transfer function, at three differentcontrast settings:
<< A nice graph is found in the .PDF and .PS versions. >>
This graph indicates a video signal having a voltage from zero to 700 mV. In a typical eight-bit digital-to-analog converter on a framebuffer card, black is at code zero and white is at code 255.
Through an amazing coincidence, vision's response to intensity is
effectively the inverse of a CRT's nonlinearity. If you apply a transfer function to code a signal to take advantage of the properties of lightnessperception - a function similar to the L* function - the coding will be inverted by a CRT.

CWR03
4th August 2006, 05:30
Is there a filter for adjusting gamma?
There's one with ffdshow that only affects videos which it decodes. There's also an adjustment within most video adaptor setup that will let you adjust it. nVidia's will let you change overall display or just video overlay.

Edit: Didn't realize you were referring to encoding filters; never mind.

cool9
4th August 2006, 05:36
I found avs filter "ConvertYUV" that adjusts gamma. "Levels" filter does, too but only works in RGB. I assume ConvertYUV works in YUY2/YV12. It seems to be working.

setarip_old
4th August 2006, 14:19
The VirtualDub internal "Levels" filter allows you to change the controls from RGB to "luma"...

cool9
4th August 2006, 16:19
When I use ColorYUV or Levels my filesize and bitrate drops. Why is this?

setarip_old
4th August 2006, 16:46
my filesize and bitrate drops.That would depend on the codec and settings you've used for video compression when applying the filter...

cool9
4th August 2006, 18:48
Before I tried ColorYUV I was hitting the target bitrate. When I started using ColorYUV the bitrate dropped 10%. I didn't mess with any 2-pass XviD settings. I guess ColorYUV redistributed bits differently than w/o ColorYUV?

movmasty
9th August 2006, 13:44
The VirtualDub internal "Levels" filter allows you to change the controls from RGB to "luma"...
but vdub itself works in rgb, so no point to use the luma option