PDA

View Full Version : What is contrast?


jmac698
7th March 2006, 07:39
I'm looking for the formula for contrast. I turn the slider on my card up and down and it seems to multiply the brightness, but not exactly. It doesn't fit well to log either. It makes no sense. Is it really gamma? What is the formula?
Example:
Brightness My setting
16 0
17 1
19 2
21 3
23 4
24 5
26 6
28 7
30 8
44 16
72 32
100 48
128 64
183 96
239 128
254 137

My settings for 1,2,4,8,16,32,64,128 should double the brightness but it doesn't, so it's not a multiply. If it were a log, it would increment the output for each doubling of the control.

AVIL
7th March 2006, 09:15
Hi,

could be a linear correlation between your settings and the brightness reached:

Brightness = 1,7427 * Mysetting + 15,8321

It gives a correlation coeficient of 0,9999889. Values so near to 1 indicates near-perfect adjustement.

Value 15,8321 (near 16) is to accomodate to BT.601 standard. Minimun luma value is 16.

Value 1,7427 seems an convenient value to reach maximum brightness (235 with BT.601 standard) with a setting of 128 wich is a convenient number for computation purposes.

tedkunich
7th March 2006, 09:16
I'm looking for the formula for contrast. I turn the slider on my card up and down and it seems to multiply the brightness, but not exactly. It doesn't fit well to log either. It makes no sense. Is it really gamma? What is the formula?
Example:
Brightness My setting
16 0
17 1
19 2
21 3
23 4
24 5
26 6
28 7
30 8
44 16
72 32
100 48
128 64
183 96
239 128
254 137

My settings for 1,2,4,8,16,32,64,128 should double the brightness but it doesn't, so it's not a multiply. If it were a log, it would increment the output for each doubling of the control.


Contrast is a gain applied to luma signal, whereas brightness is a offset (if you think in terms of analog signal).

Assuming you are talking about the Conexant 878a decoder, have a look at page 133 of the datasheet - register 0x030 makes up the LBS of a 9bit contrast control. From that data sheet, every tick in the contrast register is equivalent to a 0.46% of the original signal with 100% at 0x0D8. The decimal numbers you are referring to are what the driver reports to the UI - what is acually set in the chips registers is something you will need to use RegSpy (part of the Dscaler package) to view.... assuming it behaves like the older conexant devices.


T

jmac698
7th March 2006, 16:02
Thanks for those quick and very helpful answers. I read the datasheet as well but was thrown off by some quick mental calculation. It's obviously 1/216(D8)=4.63%, for 878a.
For mine, I think it's Brightness=MySetting*219/128+16. With MySetting=128, we get Brightness=219+16=235.
More properly it's Output=Input*MySetting*219/128+16.
My Input=1.01856, giving Output=239.36.
It's cool how a correlation can give more precise measurements.
I should set my slider to 126.
Damn I wish I had floating point in avisynth, I could use my C4All technique with different contrast each cap and put them together.

jmac698
8th March 2006, 02:58
RegSpy didn't work for me, I guess it's only meant to recognize bt848 chips.