2004 Jun 29
28
Philips Semiconductors
Product specification
HD-CODEC
SAA7108AE; SAA7109AE
Some variables are defined below:
InPix: the number of active pixels per input line
InPpl: the length of the entire input line in pixel clocks
InLin: the number of active lines per input field/frame
TPclk: the pixel clock period
RiePclk: the ratio of internal to external pixel clock
OutPix: the number of active pixels per output line
OutLin: the number of active lines per output field
TXclk: the encoder clock period (37.037 ns).
8.20.1
TV
DISPLAY WINDOW
At 60 Hz, the first visible pixel has the index 256,
710 pixels can be encoded; at 50 Hz, the index is 284,
702 pixels can be visible.
The output lines should be centred on the screen. It should
be noted that the encoder has 2 clocks per pixel;
see Table 93.
ADWHS = 256 + 710
OutPix (60 Hz);
ADWHS = 284 + 702
OutPix (50 Hz);
ADWHE = ADWHS + OutPix
×
2 (all frequencies)
For vertical, the procedure is the same. At 60 Hz, the first
line with video information is number 19, 240 lines can be
active. For 50 Hz, the numbers are 23 and 287;
see Table 99.
(60 Hz);
(50 Hz);
LAL = FAL + OutLin (all frequencies)
Most TV sets use overscan, and not all pixels respectively
lines are visible. There is no standard for the factor, it is
highly recommended to make the number of output pixels
and lines adjustable. A reasonable underscan factor is
10 %, giving approximately 640 output pixels per line.
8.20.2
I
NPUT FRAME AND PIXEL CLOCK
The total number of pixel clocks per line and the input
horizontal offset need to be chosen next. The only
constraint is that the horizontal blanking has at least
10 clock pulses.
The required pixel clock frequency can be determined in
the following way: Due to the limited internal FIFO size, the
input path has to provide all pixels in the same time frame
as the encoders vertical active time. The scaler also has to
process the first and last border lines for the anti-flicker
function.
Thus:
(60 Hz)
(50 Hz)
and for the pixel clock generator
TPclk
(all frequencies);
see Tables 102, 104 and 105. The divider PCLE should
be set according to Table 104. PCLI may be set to a lower
or the same value. Setting a lower value means that the
internal pixel clock is higher and the data get sampled up.
The differencemay be1at 640
×
480 pixelsresolution and
2 at resolutions with 320 pixels per line as a rule of thumb.
This allows horizontal upscaling by a maximum factor of 2
respectively 4 (this is the parameter RiePclk).
(all frequencies)
The equations ensure that the last line of the field has the
full number of clock cycles. Many graphic controllers
require this. Note that the bit PCLSY needs to be set to
ensure that there is not even a fraction of a clock left at the
end of the field.
8.20.3
H
ORIZONTAL SCALER
XOFS can be chosen arbitrarily, the condition being that
XOFS + XPIX
≤
HLEN is fulfilled. Values given by the
VESA display timings are preferred.
HLEN = InPpl
×
RiePclk
1
InPix
InPix
XINC needs to be rounded up, it needs to be set to 0 for a
scaling factor of 1.
8.20.4
V
ERTICAL SCALER
The input vertical offset can be taken from the assumption
that the scaler should have just finished writing the first line
when the encoder starts reading it:
FAL
1716
×
TXclk
×
TPclk
×
1728
×
TXclk
×
InPpl
TPclk
×
(60 Hz)
(50 Hz)
FAL
19
240
OutLin
2
–
+
=
FAL
23
287
–
+
=
TPclk
integer----------------------
×
1716
×
TXclk
2
+
×
InPpl
OutLin
262.5
×
----------------262.5
=
TPclk
×
TXclk
2
×
InPpl
-OutLin
312.5
×
----------------3intege1728
=
PCL
TXclk
2
20
PCLE
+
×
=
PCLI
PCLE
2
log
log
–
=
XPIX
-----2
RiePclk
×
=
XINC
OutPix
RiePclk
---4096
×
=
YOFS
-------InPpl
2.5
–
=
YOFS
FAL
2.5
–
=