
REV. 0
ADV7314
–49–
Gamma Correction
[Subaddress 24h–37h for HD, Subaddress 66h–79h for SD]
Gamma correction is available for SD and HD video. For each
standard there are 20 8-bit registers. They are used to program
the gamma correction curves A and B. HD gamma curve A is
programmed at Addresses 24h–2Dh, HD gamma curve B at
2Eh–37h. SD gamma curve A is programmed at addresses
66h–6Fh, and SD gamma curve B at Addresses 70h–79h.
Generally, gamma correction is applied to compensate for the
nonlinear relationship between signal input and brightness level
output (as perceived on the CRT). It can also be applied wher-
ever nonlinear processing is used.
Gamma correction uses the function
Signal
Signal
OUT
IN
=
(
)
g
where = gamma power factor.
Gamma correction is performed on the luma data only. The
user has the choice to use two different curves, curve A or curve
B. At any time, only one of these curves can be used.
The response of the curve is programmed at 10 predefined
locations. In changing the values at these locations, the gamma
curve can be modified. Between these points linear interpolation
is used to generate intermediate values. Considering the curve
to have a total length of 256 points, the 10 locations are at 24,
32, 48, 64, 80, 96, 128, 160, 192, and 224. Location 0, 16,
240, and 255 are fixed and cannot be changed.
LOCATION
00
50
100
150
200
250
300
50
100
150
200
250
0.5
SIGNAL INPUT
G
SIGNAL OUTPUT
GAMMA CORRECTION BLOCK OUTPUT TO A RAMP INPUT
Figure 40. Signal Input (Ramp) and
Signal Output for Gamma 0.5
For the length of 16 to 240, the gamma correction curve has to
be calculated as follows:
y = x
where:
y
= gamma corrected output.
x
= linear input signal.
= gamma power factor.
To program the gamma correction registers, the seven values for
y
have to be calculated using the following formula:
y
x
n
n
=
(
)
è
í
í
˙
˙
¥
(
)
+
(
)
–16
240 16
240 16
16
g
where:
x
(
n
–16)
= value for x along x-axis at points.
n
= 24, 32, 48, 64, 80, 96, 128, 160, 192, or 224.
y
n
= value for y along the y-axis, which has to be written into
the gamma correction register.
For example:
y
24
= [(8 / 224)
0.5
224] + 16 = 58
*
y
32
= [(16 / 224)
0.5
224] + 16 = 76
*
y
48
= [(32 / 224)
0.5
224] + 16 = 101
*
y
64
= [(48 / 224)
0.5
224] + 16 =120
*
y
80
= [(64 / 224)
0.5
224] + 16 =136
*
y
96
= [(80 / 224)
0.5
224] + 16 = 150
*
y
128
= [(112 / 224)
0.5
y
160
= [(144 / 224)
0.5
224] + 16 = 195
*
y
192
= [(176 / 224)
0.5
224] + 16 = 214
*
y
224
= [(208 / 224)
0.5
224] + 16 = 232
*
*
rounded to the nearest integer
The gamma curves in Figure 41 are examples only; any user
defined curve is acceptable in the range of 16 to 240.
224] + 16 = 174
*
LOCATION
00
50
100
150
200
250
300
50
100
150
200
250
G
GAMMA CORRECTION BLOCK TO A RAMP INPUT FOR
VARIOUS GAMMA VALUES
0.3
0.5
1.5
1.8
SGNALINPUT
Figure 41. Signal Input (Ramp) and
Selectable Gamma Output Curves