Hardware User Guide
CSC Manual Programming
The equations performed by the CP CSC are as follows:
CSC Channel A
A1
[
12
=
×
Out
_
A
In
_
A
4096
CSC Channel B
B1
[
12
=
×
Out
_
B
In
_
A
4096
CSC Channel C
C1
[
12
=
×
Out
_
C
In
_
A
4096
As can be seen from Equation 4, Equation 5, and Equation 6, the A1, A2, A3; B1, B2, B3; and C1, C2, C3 coefficients are used to scale the
primary inputs. The values of A4, B4, and C4 are added as offsets. The
formulae in which the coefficients exceed the standard range of [−4096/+4096 ... 4095/4096]. The overall range of the CSC is [0..1] for
unipolar signals (for example, Y, R, G, and B) and [−0.5 ... +0.5] for bipolar signals (for example, Pr and Pb).
Note: The bipolar signals must be offset to midrange, for example, 2048.
To arrive at programming values from typical formulas, the following steps are performed:
1.
Determine the dynamic range of the equation.
The dynamic range of the CSC is [0 ... 1] or [−0.5 ... +0.5]. Equations with a gain larger than 1 need to be scaled back. Errors in the
gain can be compensated for in the gain stages of the follow on blocks.
•
Scale the equations, if necessary.
2.
Check the value of each coefficient. The coefficients can only be programmed in the range [−0.99 ... +0.99].
3.
To support larger coefficients, the
4.
Determine the setting for
5.
Program the coefficient values. Convert the float point coefficients into 12-bit fixed decimal format. Convert into binary format,
using twos complement for negative values.
•
Program A1 to A3, B1 to B3, C1 to C3.
6.
Program the offset values. Depending on the type of CSC, offsets may have to be used.
•
Program A4, B4, C4.
CSC Example
The following set of equations gives an example of a conversion from a gamma corrected RGB signal into a YCbCr color space signal.
A1
[
12
=
×
Out
_
A
In
_
A
4096
B1
[
12
=
×
Out
_
B
In
_
A
4096
C1
[
12
=
×
Out
_
C
In
_
A
4096
Note: The original equations give offset values of 128 for the Pr and Pb components. The value of 128 equates to half the range on an 8-bit
system. It must be noted that the CSC operates on a 12-bit range. The offsets, therefore, must be changed from 128 to half the range of a
12-bit system, which equates to 2048.
The maximum range for each equation, that is, each output data path, can only be [0 ... 1] or [−0.5 ... +0.5]. Equations with a larger gain
must be scaled back into range. The gain error can be compensated for in the gain stage of the follow on blocks.
:
] 0
A2
[
12
:
] 0
+
×
+
In
_
B
In
_
4096
:
] 0
B2
[
12
:
] 0
+
×
+
In
_
B
In
_
4096
:
] 0
C2
[
12
:
] 0
+
×
+
In
_
B
In
_
4096
CSC_SCALE[1:0]
function should be used.
CSC_SCALE[1:0]
and adjust coefficients, if necessary.
:
] 0
A2
[
12
:
] 0
+
×
+
In
_
B
In
_
4096
:
] 0
B2
[
12
:
] 0
+
×
+
In
_
B
In
_
4096
:
] 0
C2
[
12
:
] 0
+
×
+
In
_
B
In
_
4096
A3
[
12
:
] 0
×
+
×
C
A4
[
12
:
] 0
4096
B3
[
12
:
] 0
×
+
×
C
B4
[
12
:
] 0
2
4096
C3
[
12
:
] 0
×
+
×
C
C4
[
12
:
] 0
2
4096
CSC_SCALE[1:0]
A3
[
12
:
] 0
×
+
×
C
A4
[
12
:
] 0
2
4096
B3
[
12
:
] 0
×
+
×
C
B4
[
12
:
] 0
2
4096
C3
[
12
:
] 0
×
+
×
C
C4
[
12
:
] 0
2
4096
Rev. 0 | Page 99 of 184
CSC
_
scale
2
(4)
CSC
_
scale
(5)
CSC
_
scale
(6)
bits allows the user to implement conversion
CSC
_
scale
CSC
_
scale
CSC
_
scale
UG-438
Need help?
Do you have a question about the ADV7610 and is the answer not in the manual?
Questions and answers