
REV. B
ADV7330
–43–
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 wide 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, 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
wherever nonlinear processing is used.
Gamma correction uses the function
=
(
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 one 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, 224. Locations 0, 16, 240, and 255 are
fixed and cannot be changed.
Signal
Signal
OUT
IN
)
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 32. 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
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
×
224] + 16 = 174
*
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 32 and 33 are examples only; any
user defined curve is acceptable in the range of 16–240.
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 33. Signal Input (Ramp) and Selectable
Gamma Output Curves