Product specification
Supersedes data of 2003 Mar 26
2004 Jun 29
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
CONTENTS
1FEATURES
1.1Video decoder
1.2Video scaler
1.3Video encoder
1.4Common features
2APPLICATIONS
3GENERAL DESCRIPTION
4ORDERING INFORMATION
5QUICK REFERENCE DATA
6BLOCK DIAGRAMS
7PINNING
8FUNCTIONAL DESCRIPTION OF DIGITAL
VIDEO ENCODER PART
8.1Reset conditions
8.2Input formatter
8.3RGB LUT
8.4Cursor insertion
8.5RGB Y-CB-CR matrix
8.6Horizontal scaler
8.7Vertical scaler and anti-flicker filter
8.8FIFO
8.9Border generator
8.10Oscillator and Discrete Time Oscillator (DTO)
8.11Low-pass Clock Generation Circuit (CGC)
8.12Encoder
8.13RGB processor
8.14Triple DAC
8.15HD data path
8.16Timing generator
8.17Pattern generator for HD sync pulses
8.18I2C-bus interface
8.19Power-down modes
8.20Programmingthegraphicsacquisitionscalerof
the video encoder
8.21Input levels and formats
9FUNCTIONAL DESCRIPTION OF DIGITAL
VIDEO DECODER PART
9.1Decoder
9.2Decoder output formatter
9.3Scaler
9.4VBI data decoder and capture
(subaddresses 40H to 7FH)
9.5Image port output formatter
(subaddresses 84H to 87H)
9.6Audio clock generation
(subaddresses 30H to 3FH)
10INPUT/OUTPUT INTERFACES AND PORTS
OF DIGITAL VIDEO DECODER PART
10.1Analog terminals
10.2Audio clock signals
10.3Clock and real-time synchronization signals
10.4Video expansion port (X port)
10.5Image port (I port)
10.6Host port for 16-bit extension of video data I/O
(H port)
10.7Basic input and output timing diagrams for the
I and X ports
11BOUNDARY SCAN TEST
11.1Initialization of boundary scan circuit
11.2Device identification codes
12LIMITING VALUES
13THERMAL CHARACTERISTICS
14CHARACTERISTICS OF THE DIGITAL
VIDEO ENCODER PART
15CHARACTERISTICS OF THE DIGITAL
VIDEO DECODER PART
16TIMING
16.1Digital video encoder part
16.2Digital video decoder part
17APPLICATION INFORMATION
17.1Reconstruction filter
17.2Analog output voltages
17.3Suggestions for a board layout
18I2C-BUS DESCRIPTION
18.1Digital video encoder part
18.2Digital video decoder part
19PROGRAMMING START SET-UP OF
DIGITAL VIDEO DECODER PART
19.1Decoder part
19.2Audio clock generation part
19.3Data slicer and data type control part
19.4Scaler and interfaces
20PACKAGE OUTLINE
21SOLDERING
22DATA SHEET STATUS
23DEFINITIONS
24DISCLAIMERS
25PURCHASE OF PHILIPS I2C COMPONENTS
2004 Jun 292
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
1FEATURES
1.1Video decoder
• Six analog inputs, internal analog source selectors, e.g.
6 × CVBS or (2 × Y/C and 2 × CVBS) or (1 × Y/C and
4 × CVBS)
• Two analog preprocessing channels in differential
CMOS style for best S/N performance
• Fully programmable static gain or Automatic Gain
Control (AGC) for the selected CVBS or Y/C channel
• Switchable white peak control
• Two built-in analog anti-aliasing filters
• Two 9-bit video CMOS Analog-to-Digital Converters
(ADCs), digitized CVBS or Y/C signals are available on
the Image Port Data (IPD) port under I2C-bus control
• On-chip clock generator
• Line-locked system clock frequencies
• Digital PLL for horizontal sync processing and clock
generation, horizontal and vertical sync detection
• Requires only one crystal (either 24.576 MHz or
32.11 MHz) for all standards
• Automatic detection of 50 and 60 Hz field frequency,
and automatic switching between PAL and NTSC
standards
• Luminance and chrominance signal processing for
PAL BGHI, PAL N, combination PAL N, PAL M,
NTSC M, NTSC-Japan, NTSC N, NTSC 4.43 and
SECAM
• User programmable luminance peaking or aperture
correction
• Cross-colour reduction for NTSC by chrominance comb
filtering
• PAL delay line for correcting PAL phase errors
• Brightness Contrast Saturation (BCS) and hue control
on-chip
• Two multi functional real-time output pins controlled by
the I2C-bus
• Multi-standard VBI data slicer decoding World Standard
Teletext (WST), North-American Broadcast Text
System (NABTS), Closed Caption (CC), Wide Screen
Signalling (WSS), Video Programming System (VPS),
Vertical Interval Time Code (VITC) variants
(EBU/SMPTE) etc.
• StandardITU 656 Y-CB-CR4:2:2format(8-bit)onIPD
output bus
• Enhanced ITU 656 output format on IPD output bus
containing:
– active video
– raw CVBS data for INTERCAST applications
(27 MHz data rate)
– decoded VBI data
• Detection of copy protected input signals according to
the Macrovision
unauthorized recording of pay-TV or video tape signals.
• Hot-plug detection through dedicated interrupt pin
• Supported VGA resolutions for PAL or NTSC legacy
video output up to 1280 × 1024 graphics data at
60 or 50 Hz frame rate
• Supported VGA resolutions for HDTV output up to
1920 × 1080 interlaced graphics data at 60 or 50 Hz
frame rate
• Three Digital-to-Analog Converters (DACs) for CVBS
(BLUE, CB), VBS (GREEN, CVBS) and C (RED, CR)at
27 MHz sample rate (signals in parenthesis are
optionally selected), all at 10-bit resolution
• Non-interlaced CB-Y-CR or RGB input at maximum
4:4:4 sampling
• Downscaling and upscaling from 50 to 400 %
• Optional interlaced CB-Y-CR input of Digital Versatile
Disk (DVD) signals
• Optional non-interlaced RGB output to drive second
VGA monitor (bypass mode, maximum 85 MHz)
• 3 × 256 bytes RGB Look-Up Table (LUT)
• Support for hardware cursor
• HDTV up to 1920 × 1080 interlaced and 1280 × 720
progressive, including 3-level sync pulses
• Programmable border colour of underscan area
• Programmable 5 line anti-flicker filter
• On-chip 27 MHz crystal oscillator (3rd-harmonic or
fundamental 27 MHz crystal)
• Fast I2C-bus control port (400 kHz)
• Encoder can be master or slave
• Adjustable output levels for the DACs
• Programmable horizontal and vertical input
synchronization phase
• Programmable horizontal sync output phase
• Internal Colour Bar Generator (CBG)
• Optional support of various Vertical Blanking Interval
(VBI) data insertion
• Macrovision Pay-per-View copy protection system
rev. 7.01, rev. 6.1 and rev. 1.03 (525p) as option;
thisappliesto SAA7108AE only. The device is protected
by USA patent numbers 4631603, 4577216 and
4819098 and other intellectual property rights. Use of
the Macrovision anti-copy process in the device is
licensed for non-commercial home use only. Reverse
engineering or disassembly is prohibited. Please
contact your nearest Philips Semiconductors sales
office for more information.
1.4Common features
• 5 V tolerant digital I/O ports
• I2C-bus controlled (full read-back ability by an external
controller, bit rate up to 400 kbits/s)
• Versatile power-save modes
• Boundary scan test circuit complies with the
1149.b1-1994”
encoder)
• Monolithic CMOS 3.3 V device
• BGA156 package
• Moisture Sensitive Level (MSL): e3.
2APPLICATIONS
• Notebook (low-power consumption)
• PCMCIA card application
• AGP based graphics cards
• PC editing
• Image processing
• Video phone applications
• INTERCAST and PC teletext applications
• Security applications
• Hybrid satellite set-top boxes.
(separate ID codes for decoder and
“IEEE Std.
2004 Jun 294
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
3GENERAL DESCRIPTION
The SAA7108AE; SAA7109AE is a new multi-standard
video decoder and encoder chip, offering high quality
video input and TV output processing as required by
PC-99 specifications. It enables hardware manufacturers
to implement versatile video functions on a significantly
reduced printed-circuit board area at very competitive
costs.
Separate pins for supply voltages as well as for I2C-bus
control and boundary scan test have been provided for the
video encoder and decoder sections to ensure both
flexible handling and optimized noise behaviour.
Thevideo encoder is used to encode PC graphics data at
maximum1280 × 1024resolution(optionally 1920 × 1080
interlaced) to PAL (50 Hz) or NTSC (60 Hz) video signals.
A programmable scaler and anti-flicker filter (maximum
5 lines) ensures properly sized and flicker-free TV display
as CVBS or S-video output.
Alternatively, the three Digital-to-Analog Converters
(DACs) can output RGB signals together with a TTL
composite sync to feed SCART connectors.
When the scaler/interlacer is bypassed, a second VGA
monitor can be connected to the RGB outputs and
separate H and V-syncs as well, thereby serving as an
auxiliary monitor at maximum 1280 × 1024
resolution/60 Hz (PIXCLK < 85 MHz). Alternatively this
port can provide Y, PB and PR signals for HDTV monitors.
The encoder section includes a sync/clock generator and
on-chip DACs.
All inputs intended to interface to the host graphics
controller are designed for low-voltage signals down to
1.1 V and up to 3.45 V.
The video decoder, a 9-bit video input processor, is a
combination of a 2-channel analog pre-processing circuit
including source selection, anti-aliasing filter and
Analog-to-Digital Converter (ADC), automatic clamp and
gain control, a Clock Generation Circuit (CGC), and a
digital multi-standard decoder (PAL BGHI, PAL M, PAL N,
combination PAL N, NTSC M, NTSC-Japan, NTSC N,
NTSC 4.43 and SECAM).
The decoder includes a brightness, contrast and
saturation control circuit, a multi-standard VBI data slicer
and a 27 MHz VBI data bypass. The pure 3.3 V (5 V
compatible) CMOS circuit SAA7108AE; SAA7109AE,
consisting of an analog front-end and digital video
decoder,a digital video encoder and analog back-end, is a
highly integrated circuit especially designed for desktop
video applications.
The decoder is based on the principle of line-locked clock
decoding and is able to decode the colour of PAL, SECAM
and NTSC signals into ITU-R BT.601 compatible colour
component values.
The encoder can operate fully independently at its own
variable pixel clock, transporting graphics input data, and
at the line-locked, single crystal-stable video encoding
clock.
As an option, it is possible to slave the video PAL/NTSC
encodingto the video decoderclockwith the encoder FIFO
acting as a buffer to decouple the line-locked decoder
clock from the crystal-stable encoder clock.
1. Power dissipation is extremely dependent on programming and selected application.
6BLOCK DIAGRAMS
digital supply voltage3.153.33.45V
analog supply voltage3.153.33.45V
ambient temperature0−70°C
analog and digital power dissipationnote 1−−1.7W
handbook, full pagewidth
graphics input
analog
video input
digital video
CVBS, Y/C
Y-CB-CR/RGB
PD
digital video
input and output
X port
ANALOG VIDEO
ACQUISITION AND
DEMODULATOR
VIDEO DECODER PART
VIDEO ENCODER PART
SCALER
AND
INTERLACER
SCALER
VIDEO
ENCODER
Fig.1 Simplified block diagram.
I port
(IPD)
CVBS, Y/C
RGB
MHB903
digital
video output
analog
video output
2004 Jun 296
This text is here in white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader.This text is here in
_white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader.This text is here inThis text is here in
white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader. white to force landscape pages to be ...
2004 Jun 297
C1, C2, B1,
B2, A2, B4,
PD11 to
PD0
B3, A3, F3,
H1, H2, H3
INPUT
FORMATTER
FIFO
AND
UPSAMPLING
LUT
AND
CURSOR
RGB TO Y-CB-C
MATRIX
R
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
PIXCLKI
PIXCLKO
F2
G4
DECIMATOR
4 : 4 : 4 to 4 : 2 : 2
FIFO
PIXEL CLOCK
SYNTHESIZER
XTALIe
HORIZONTAL
SCALER
BORDER
GENERATOR
SAA7108AE
SAA7109AE
CRYSTAL
OSCILLATOR
XTALOe
27 MHz
TTX_SRES
VERTICAL
SCALER
ENCODER
GENERATOR
G1A6A5C3
VSVGC
FSVGC
VIDEO
OUTPUT
TIMING
F1 G3
HSVGC
CBOTTXRQ_XCLKO2
Fig.2 Block diagram (video encoder part).
ndbook, full pagewidth
HD
SDAe
VERTICAL
FILTER
TRIPLE
DAC
I2C-BUS
CONTROL
G2
SCLe
C6
BLUE_CB_CVBS
C7
GREEN_VBS_CVBS
C8
RED_CR_C_CVBS
D7
VSM
D8
HSM_CSYNC
F12
TVD
E2D2E3C4
RESe
MBL785
This text is here in white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader.This text is here in
k
_white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader.This text is here inThis text is here in
white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader. white to force landscape pages to be ...
2004 Jun 298
]
XPD[7:0
XRH
M4
K2, K3,
L1 to L3
M1, M2, N1
X PORT I/O FORMATTING
L8
K14
ASCLK
AMXCLK
J12
V
DDXd
V
J13
XRV
N2
P5
SSXd
XTRI
XRDY
L5
N3
FIR-PREFILTER
PRESCALER
SCALER BCS
GENERAL PURPOSE
D11, F11,
J4, J11,
L4, L11
V
DDId
RESd
CE
XTOUTd
XTALId
XTALOd
AI11
AI12
AI21
AI22
AI23
AI24
AOUT
AI1D
AI2D
AGND
M12
N14
P4
P2
P3
P13
P11
P10
P9
P7
P6
M10
P12
P8
N10
LLC2
LLC
M14
CLOCK GENERATION
POWER-ON CONTROL
ANALOG
DUAL
ADC
TRSTd
RTCO
(1)
L14
L13
AND
BOUNDARY
SCAN
TEST
N4
M5
M6
TCLKd
TMSd
RTS0
TDId
XCLK
RTS1
K13
L10
DIGITAL
DECODER
WITH
ADAPTIVE
COMB
FILTER
N5
N6
AMCLK
TDOd
XDQ
M3
EXPANSION PORT PIN MAPPINGI/O CONTROLI2C-BUSREAL-TIME OUTPUT
AUDIO
CLOCK
GENERATION
K12
ALRCLK
(1)
, full pagewidth
HPD[7:0
K1
PROGRAMMING
AND
VBI DATA SLICER
D10, G11,
L7, L9
V
DDEd
A13, D12, C12,
B12, A12, C11,
B11, A11
chrominance of 16-bit input
REGISTER
ARRAY
EVENT CONTROLLER
BUFFER
V
DDAd
]
LINE
FIFO
M8, M9,
N11
REGISTER
VERTICAL
SCALING
E11, K4,
K11
V
SSId
SDAd
A/B
MUX
V
SSEd
L12
H4, H11,
L6, M13
SCLd
M11
HORIZONTAL
FINE
(PHASE)
SCALING
M7,
N7 to N9,
N12, N13
V
SSAd
TEST5
TEST4
J2
TEST3
J1
SAA7108AE
SAA7109AE
VIDEO
FIFO
TEXT
FIFO
VIDEO/TEXT
ARBITER
TEST2
J3
32
to
8(16)
MUX
TEST1
TEST0
C10
H13
B10
E14, D14,
C14, B14,
E13, D13,
C13, B13
IMAGE PORT PIN MAPPING
MBL791
H14
G12
F13
F14
G13
H12
J14
G14
IPD[7:0
IDQ
IGPH
IGPV
IGP0
IGP1
ICLK
ITRDY
ITRI
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
]
(1) The pins RTCO and ALRCLK are used for configuration of the I2C-bus interface
and the definition of the crystal oscillator frequency at RESET (pin strapping).
Fig.3 Block diagram (video decoder part).
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
7PINNING
SYMBOLPINTYPE
(1)
DESCRIPTION
PD7A2IMSB of encoder input bus with CB-Y-CR 4 : 2 : 2; see Tables 9 to 15 for pin
assignment
PD4A3IMSB − 3 of encoder input bus with CB-Y-CR 4 : 2 : 2; see Tables 9 to 15 for
pin assignment
TRSTeA4I/putest reset input for Boundary Scan Test (BST) (encoder); active LOW; with
internal pull-up; notes 2 and 3
XTALIeA5I27 MHz crystal input (encoder)
XTALOeA6O27 MHz crystal output (encoder)
DUMPA7ODAC reference pin (encoder), 12 Ω resistor connected to V
V
SSXe
A8Sground for oscillator (encoder)
RSETA9ODAC reference pin (encoder), 1 kΩ resistor connected to V
V
DDAe
A10S3.3 V analog supply voltage (encoder)
SSAe
SSAe
HPD0A11I/OMSB − 7 of Host Port Data (HPD) output bus
HPD3A12I/OMSB − 4 of HPD output bus
HPD7A13I/OMSB of HPD output bus
PD9B1Isee Tables 9, 14 and 15 for pin assignment with different encoder input
formats
PD8B2Isee Tables 9, 14 and 15 for pin assignment with different encoder input
formats
PD5B3IMSB − 2 of encoder input bus with CB-Y-CR 4 : 2 : 2; see Tables 9 to 15 for
pin assignment
PD6B4IMSB − 1 of encoder input bus with CB-Y-CR 4 : 2 : 2; see Tables 9 to 15 for
pin assignment
TDIeB5I/putest data input for BST (encoder); note 4
V
DDAe
B6S3.3 V analog supply voltage (encoder)
DUMPB7ODAC reference pin (encoder); connected to A7
V
V
SSAe
DDAe
B8Sanalog ground (encoder)
B9S3.3 V analog supply voltage (encoder)
TEST1B10Iscan test input 1, do not connect
HPD1B11I/OMSB − 6 of HPD output bus
HPD4B12I/OMSB − 3 of HPD output bus
IPD0B13OMSB − 7 of IPD output bus
IPD4B14OMSB − 3 of Image Port Data (IPD) output bus
PD11C1Isee Tables 9, 14 and 15 for pin assignment with different encoder input
formats
PD10C2Isee Tables 9, 14 and 15 for pin assignment with different encoder input
formats
TTX_SRESC3Iteletext input or sync reset input (encoder)
TTXRQ_XCLKO2C4Oteletext request output or 13.5 MHz clock output of the crystal oscillator
(encoder)
V
SSIe
C5Sdigital ground core (encoder)
BLUE_CB_CVBSC6OBLUE or CB or CVBS output
2004 Jun 299
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
SYMBOLPINTYPE
(1)
DESCRIPTION
GREEN_VBS_CVBSC7OGREEN or VBS or CVBS output
RED_CR_C_CVBSC8ORED or CR or C or CVBS output
V
DDAe
C9S3.3 V analog supply voltage (encoder)
TEST2C10Iscan test input 2, do not connect
HPD2C11I/OMSB − 5 of HPD output bus
HPD5C12I/OMSB − 2 of HPD output bus
IPD1C13OMSB − 6 of IPD output bus
IPD5C14OMSB − 2 of IPD output bus
TDOeD1Otest data output for BST (encoder); note4
RESeD2Ireset input (encoder); active LOW
TMSeD3I/putest mode select input for BST (encoder); note 4
V
DDIEe
V
SSIe
V
DDXe
D4S3.3 V digital supply voltage for core and peripheral cells (encoder)
D5Sdigital ground core (encoder)
D6S3.3 V supply voltage for oscillator (encoder)
VSMD7Overtical synchronization output to VGA monitor (non-interlaced)
HSM_CSYNCD8Ohorizontal synchronization output to VGA monitor (non-interlaced) or
composite sync for RGB-SCART
V
V
V
DDAe
DDEd
DDId
D9S3.3 V analog supply voltage (encoder)
D10S3.3 V digital supply voltage for peripheral cells (decoder)
D11S3.3 V digital supply voltage for core (decoder)
HPD6D12I/OMSB − 1 of HPD output bus
IPD2D13OMSB − 5 of IPD output bus
IPD6D14OMSB − 1 of IPD output bus
TCKeE1I/putest clock input for BST (encoder); note 4
SCLeE2II2C-bus serial clock input (encoder)
HSVGCE3I/Ohorizontal synchronization output to Video Graphics Controller (VGC)
(optional input)
V
V
SSEe
SSId
E4Sdigital ground peripheral cells (encoder)
E11Sdigital ground core (decoder)
n.c.E12−not connected
IPD3E13OMSB − 4 of IPD output bus
IPD7E14OMSB of IPD output bus
VSVGCF1I/Overtical synchronization output to VGC (optional input)
PIXCLKIF2Ipixel clock input (looped through)
PD3F3IMSB − 4 of encoder input bus with CB-Y-CR 4 : 2 : 2; see Tables 9 to 15 for
pin assignment
V
DD(DVO)
V
DDId
F4Sdigital supply voltage for DVO cells
F11S3.3 V digital supply voltage for core (decoder)
TVDF12OTV Detector; hot-plug interrupt pin, HIGH if TV is connected
IGPVF13Omulti-purpose vertical reference output with IPD output bus
IGP0F14Ogeneral purpose output signal 0 with IPD output bus
2004 Jun 2910
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
SYMBOLPINTYPE
(1)
DESCRIPTION
FSVGCG1I/Oframe synchronization output to VGC (optional input)
SDAeG2I/OI2C-bus serial data input/output (encoder)
CBOG3Ocomposite blanking output to VGC; active LOW
PIXCLKOG4Opixel clock output to VGC
V
DDEd
G11S3.3 V digital supply voltage for peripheral cells (decoder)
IGPHG12Omulti-purpose horizontal reference output with IPD output bus
IGP1G13Ogeneral purpose output signal 1 with IPD output bus
ITRIG14I/(O)programmable control signals for IPD output bus
PD2H1IMSB − 5 of encoder input bus with CB-Y-CR 4 : 2 : 2; see Tables 9 to 15 for
pin assignment
PD1H2IMSB − 6 of encoder input bus with CB-Y-CR 4 : 2 : 2; see Tables 9 to 15 for
pin assignment
PD0H3IMSB − 7 of encoder input bus with CB-Y-CR 4 : 2 : 2; see Tables 9 to 15 for
pin assignment
V
V
SSEd
SSEd
H4Sdigital ground for peripheral cells (decoder)
H11Sdigital ground for peripheral cells (decoder)
ICLKH12I/Oclock for IPD output bus (optional clock input)
TEST0H13Oscan test output, do not connect
IDQH14Odata qualifier for IPD output bus
TEST4J1Oscan test output, do not connect
TEST5J2Iscan test input, do not connect
TEST3J3Iscan test input, do not connect
V
V
DDId
DDId
J4S3.3 V digital supply voltage for core (decoder)
J11S3.3 V digital supply voltage for core (decoder)
AMXCLKJ12Iaudio master external clock input
ALRCLKJ13(I/)Oaudio left/right clock output; can be strapped to supply via a 3.3 kΩ resistor to
indicate that the default 24.576 MHz crystal (ALRCLK = 0; internal pull-down)
has been replaced by a 32.110 MHz crystal (ALRCLK = 1); notes 5 and 6
ITRDYJ14Itarget ready input for IPD output bus
XTRIK1Icontrol signal for all X port pins
XPD7K2I/OMSB of XPD bus
XPD6K3I/OMSB − 1 of XPD bus
V
V
SSId
SSId
K4Sdigital ground core (decoder)
K11Sdigital ground core (decoder)
AMCLKK12Oaudio master clock output, must be less than 50 % of crystal clock
RTS0K13Oreal-time status or sync information line 0
ASCLKK14Oaudio serial clock output
XPD5L1I/OMSB − 2 of XPD bus
XPD4L2I/OMSB − 3 of XPD bus
XPD3L3I/OMSB − 4 of XPD bus
V
DDId
L4S3.3 V digital supply voltage for core (decoder)
XRVL5I/Overtical reference for XPD bus
2004 Jun 2911
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
SYMBOLPINTYPE
V
SSEd
V
DDEd
V
DDXd
V
DDEd
L6Sdigital ground for peripheral cells (decoder)
L7S3.3 V digital supply voltage for peripheral cells (decoder)
L8S3.3 V supply voltage for oscillator (decoder)
L9S3.3 V digital supply voltage for peripheral cells (decoder)
(1)
DESCRIPTION
RTS1L10Oreal-time status or sync information line 1
V
DDId
L11S3.3 V digital supply voltage for core (decoder)
SDAdL12I/OI2C-bus serial data input/output (decoder)
RTCOL13(I/)Oreal-time control output; contains information about actual system clock
frequency, field rate, odd/even sequence, decoder status, subcarrier
frequency and phase and PAL sequence (see external document
Functional Description”
, available on request); the RTCO pin is enabled via
“RTC
I2C-bus bit RTCE; see notes 5 and 7 and Table 150
LLC2L14Oline-locked1⁄2clock output (13.5 MHz nominal)
XPD2M1I/OMSB − 5 of XPD bus
XPD1M2I/OMSB − 6 of XPD bus
XCLKM3I/Oclock for XPD bus
XDQM4I/Odata qualifier for XPD bus
TMSdM5I/putest mode select input for BST (decoder); note 4
TCKdM6I/putest clock input for BST (decoder); note 4
V
V
V
SSAd
DDAd
DDAd
M7Sanalog ground (decoder)
M8S3.3 V analog supply voltage (decoder)
M9S3.3 V analog supply voltage (decoder)
AOUTM10Oanalog test output (do not connect)
SCLdM11II2C-bus serial clock input (decoder)
RESdM12Oreset output signal; active LOW (decoder)
V
SSEd
M13Sdigital ground for peripheral cells (decoder)
LLCM14Oline-locked clock output (27 MHz nominal)
XPD0N1I/OMSB − 7 of XPD bus
XRHN2I/Ohorizontal reference for XPD bus
XRDYN3Odata input ready for XPD bus
TRSTdN4I/putest reset input for BST (decoder); active LOW; with internal pull-up;
notes 2 and 3
TDOdN5Otest data output for BST (decoder); note4
TDIdN6I/putest data input for BST (decoder); note 4
V
V
V
N9Sanalog ground (decoder)
AGNDN10Sanalog ground (decoder) connected to substrate
V
V
V
DDAd
SSAd
SSAd
N11S3.3 V analog supply voltage (decoder)
N12Sanalog ground (decoder)
N13Sanalog ground (decoder)
CEN14Ichip enable or reset input (with internal pull-up)
2004 Jun 2912
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
SYMBOLPINTYPE
(1)
DESCRIPTION
XTALIdP2I27 MHz crystal input (decoder)
XTALOdP3O27 MHz crystal output (decoder)
XTOUTdP4Ocrystal oscillator output signal (decoder); auxiliary signal
V
SSXd
P5Sground for crystal oscillator (decoder)
AI24P6Ianalog input 24
AI23P7Ianalog input 23
AI2DP8Idifferential analog input for channel 2; connect to ground via a capacitor
AI22P9Ianalog input 22
AI21P10Ianalog input 21
AI12P11Ianalog input 12
AI1DP12Idifferential analog input for channel 1; connect to ground via a capacitor
AI11P13Ianalog input 11
Notes
1. Pin type: I = input, O = output, S = supply, pu = pull-up.
2. For board design without boundary scan implementation connect TRSTe and TRSTd to ground.
3. This pin provides easy initialization of the Boundary Scan Test (BST) circuit. TRSTe and TRSTd can be used to force
the Test Access Port (TAP) controller to the TEST_LOGIC_RESET state (normal operation) at once.
4. In accordance with the
“IEEE1149.1”
standard the pads TDIe (TDId), TMSe (TMSd), TCKe (TCKd) and TRSTe
(TRSTd) are input pads with an internal pull-up resistor and TDOe (TDOd) is a 3-state output pad.
5. Pin strapping is done by connecting the pin to supply via a 3.3 kΩ resistor. During the power-up reset sequence the
corresponding pins are switched to input mode to read the strapping level. For the default setting no strapping
resistor is necessary (internal pull-down).
This text is here in white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader.This text is here in
_white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader.This text is here inThis text is here in
white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader. white to force landscape pages to be ...
2004 Jun 2914
Table 1 Pin assignment (top view)
12345678 91011121314
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
APD7PD4TRSTeXTALIeXTALOeDUMPV
BPD9PD8PD5PD6TDIeV
CPD11PD10TTX_
SRES
DTDOeRESeTMSeV
ETCKeSCLeHSVGCV
F VSVGC PIXCLKIPD3V
TTXRQ_
XCLKO2
DDIEe
SSEe
DD(DVO)
V
V
SSIe
SSIe
BLUE_
CB_CVBS
V
DDAe
DDXe
DUMPV
GREEN_
RED_CR_C_
VBS_CVBS
VSMHSM_CSYNC V
SSXe
SSAe
CVBS
RSET V
V
DDAe
V
DDAe
DDAeVDDEdVDDId
DDAe
TEST1 HPD1HPD4IPD0IPD4
TEST2 HPD2HPD5IPD1IPD5
G FSVGCSDAeCBOPIXCLKOV
HPD2PD1PD0V
J TEST4TEST5TEST3V
KXTRIXPD7XPD6V
SSEd
DDId
SSId
HPD0HPD3HPD7
HPD6IPD2IPD6
V
V
V
V
V
SSId
DDId
DDEd
SSEd
DDId
SSId
n.c.IPD3IPD7
TVDIGPVIGP0
IGPHIGP1ITRI
ICLKTEST0IDQ
AMXCLK ALRCLK ITRDY
AMCLKRTS0ASCLK
LXPD5XPD4XPD3V
DDId
XRVV
SSEd
MXPD2XPD1XCLKXDQTMSdTCKdV
NXPD0XRHXRDYTRSTdTDOdTDIdV
PXTALId XTALOd XTOUTdV
SSXd
AI24AI23AI2DAI22AI21AI12AI1DAI11
V
DDEd
SSAd
SSAd
V
V
V
DDXd
DDAd
SSAd
V
V
V
RTS1V
DDEd
AOUT SCLdRESdV
DDAd
AGND V
SSAd
DDId
DDAd
SDAdRTCOLLC2
LLC
CE
V
SSAd
V
SSEd
SSAd
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
8FUNCTIONAL DESCRIPTION OF DIGITAL VIDEO
ENCODER PART
The digital video encoder encodes digital luminance and
colour difference signals (CB-Y-CR) or digital RGB signals
into analog CVBS, S-video and, optionally, RGB or
CR-Y-CB signals. NTSC M, PAL B/G and sub-standards
are supported.
The SAA7108AE; SAA7109AE can be directly connected
to a PC video graphics controller with a maximum
resolution of 1280 × 1024 (progressive) or 1920 × 1080
(interlaced) at a 50 or 60 Hz frame rate. A programmable
scalerscalesthecomputergraphics picture so that it will fit
into a standard TV screen with an adjustable underscan
area.Non-interlaced-to-interlaced conversion is optimized
with an adjustable anti-flicker filter for a flicker-free display
at a very high sharpness.
Besides the most common 16-bit 4 :2:2 CB-Y-CR input
format (using 8 pins with double edge clocking), other
CB-Y-CR and RGB formats are also supported; see
Tables 9 to 15.
Acomplete3 × 256 bytes Look-Up Table (LUT), which can
be used, for example, as a separate gamma corrector, is
locatedintheRGBdomain;itcan be loaded either through
the video input port PD (Pixel Data) or via the I2C-bus.
The SAA7108AE; SAA7109AE supports a 32 × 32 × 2-bit
hardware cursor, the pattern of which can also be loaded
through the video input port or via the I2C-bus.
It is also possible to encode interlaced 4 :2:2 video
signals such as PC-DVD; for that the anti-flicker filter, and
in most cases the scaler, will simply be bypassed.
Besides the applications for video output, the
SAA7108AE;SAA7109AE can alsobeused for generating
a kind of auxiliary VGA output, when the RGB
non-interlacedinputsignalisfed to the DACs. This may be
of interest for example, when the graphics controller
provides a second graphics window at its video output
port.
The basic encoder function consists of subcarrier
generation, colour modulation and insertion of
synchronization signals at a crystal-stable clock rate of
13.5 MHz (independent of the actual pixel clock used at
the input side), corresponding to an internal 4 :2:2
bandwidth in the luminance/colour difference domain.
Luminance and chrominance signals are filtered in
accordance with the standard requirements of
and
“ITU-R BT.470-3”
.
“RS-170-A”
For ease of analog post filtering the signals are twice
oversampled to 27 MHz before digital-to-analog
conversion.
The total filter transfer characteristics (scaler and
anti-flicker filter are not taken into account) are illustrated
in Figs 5 to 10. All three DACs are realized with full 10-bit
resolution. The CR-Y-CB to RGB dematrix can be
bypassed (optionally) in order to provide the upsampled
CR-Y-CB input signals.
The8-bit multiplexed CB-Y-CRformatsare
(D1 format) compatible, but the SAV and EAV codes can
be decoded optionally, when the device is operated in
slave mode. For assignment of the input data to the rising
or falling clock edge see Tables 9 to 15.
In order to display interlaced RGB signals through a
euro-connector TV set, a separate digital composite sync
signal (pin HSM_CSYNC) can be generated; it can be
advanced up to 31 periods of the 27 MHz crystal clock in
order to be adapted to the RGB processing of a TV set.
The SAA7108AE; SAA7109AE synthesizes all necessary
internal signals, colour subcarrier frequency and
synchronization signals from that clock.
It is also possible to connect pin RTCO of the decoder
section to pin RTCI of the encoder section. Thus,
information containing actual subcarrier frequency,
PAL-ID etc. is available in case the line-locked clock of the
decoder section is used for re-encoding of the encoder
section.
Wide screen signalling data can be loaded via the I2C-bus
and is inserted into line 23 for standards using a 50 Hz
field rate.
VPS data for program dependent automatic start and stop
of such featured VCRs is loadable via the I2C-bus.
The IC also contains Closed Caption and extended data
servicesencoding(line 21), and supports teletext insertion
forthe appropriate bit stream formatata 27 MHz clock rate
(see Fig.51). It is also possible to load data for the copy
generation management system into line 20 of every field
(525/60 line counting).
A number of possibilities are provided for setting different
video parameters such as:
Fig.7 Luminance transfer characteristic 1 (excluding scaler).
f (MHz)
MBE736
6
handbook, halfpage
1
G
v
(dB)
0
−1
−2
−3
−4
−5
02
(1)
4
Fig.8 Luminance transfer characteristic 2 (excluding scaler).
2004 Jun 2917
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
handbook, full pagewidth
6
G
v
(dB)
0
−6
−12
−18
−24
−30
−36
−42
−48
−54
024
68101214
Fig.9 Luminance transfer characteristic in RGB (excluding scaler).
MGB708
f (MHz)
handbook, full pagewidth
6
G
v
(dB)
0
−6
−12
−18
−24
−30
−36
−42
−48
−54
024
68101214
Fig.10 Colour difference transfer characteristic in RGB (excluding scaler).
2004 Jun 2918
MGB706
f (MHz)
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
8.1Reset conditions
To activate the reset a pulse at least of 2 crystal clocks
duration is required.
During reset (RESET = LOW) plus an extra 32 crystal
clock periods, FSVGC, VSVGC, CBO, HSVGC and
TTX_SRES are set to input mode and HSM_CSYNC and
VSM are set to 3-state. A reset also forces the I2C-bus
interface to abort any running bus transfer and sets it into
receive condition.
After reset, the state of the I/Os and other functions is
defined by the strapping pins until an I2C-bus access
redefines the corresponding registers; see Table 2.
Table 2 Strapping pins
PINTIEDPRESET
FSVGC (pin G1)LOW NTSC M encoding, PIXCLK
fits to 640 × 480 graphics
input
HIGH PAL B/G encoding, PIXCLK
fits to 640 × 480 graphics
input
VSVGC (pin F1)LOW 4:2:2 Y-CB-CR graphics
input (format 0)
HIGH 4:4:4 RGB graphics input
(format 3)
CBO (pin G3)LOW input demultiplex phase:
LSB=LOW
HIGH input demultiplex phase:
LSB = HIGH
HSVGC (pin E3)LOW input demultiplex phase:
MSB = LOW
HIGH input demultiplex phase:
MSB = HIGH
TTXRQ_XCLKO2
(pin C4)
8.2Input formatter
The input formatter converts all accepted PD input data
formats, either RGB or Y-CB-CR, to a common internal
RGB or Y-CB-CR data stream.
When double-edge clocking is used, the data is internally
split into portions PPD1 and PPD2. The clock edge
assignment must be set according to the I2C-bus control
bits SLOT and EDGE for correct operation.
LOW slave (FSVGC, VSVGC and
HSVGC are inputs, internal
colour bar is active)
HIGH master (FSVGC, VSVGC
and HSVGC are outputs)
If Y-CB-CR is being applied as a 27 Mbyte/s data stream,
the output of the input formatter can be used directly to
feed the video encoder block.
The horizontal upscaling is supported via the input
formatter. According to the programming of the pixel clock
dividers (see Section 8.10), it will upsample the data
stream to 1 ×, 2 × or 4 × the input data rate. An optional
interpolation filter is available. The clock domain transition
is handled by a 4 entries wide FIFO which gets initialized
every field or explicitly at request. A bypass for the FIFO is
available, especially for high input data rates.
8.3RGB LUT
The three 256-byte RAMs of this block can be addressed
by three 8-bit wide signals, thus it can be used to build any
transformation, e.g. a gamma correction for RGB signals.
In the event that the indexed colour data is applied, the
RAMs are addressed in parallel.
The LUTs can either be loaded by an I2C-bus write access
or can be part of the pixel data input through the PD port.
Inthelatter case, 256 × 3 bytes for the R, G and B LUT are
expected at the beginning of the input video line, two lines
before the line that has been defined as first active line,
until the middle of the line immediately preceding the first
active line. The first 3 bytes represent the first RGB LUT
data, and so on.
8.4Cursor insertion
A32× 32 dots cursor can be overlaid as an option; the bit
map of the cursor can be uploaded by an I2C-bus write
accesstospecific registers or in the pixel data input via the
PDport.In the latter case the 256 bytes definingthecursor
bit map (2 bits per pixel) are expected immediately
following the last RGB LUT data in the line preceding the
first active line.
The cursor bit map is set up as follows: each pixel
occupies 2 bits. The meaning of these bits depends on the
CMODE I2C-bus register as described in Table 5.
Transparent means that the input pixels are passed
through, the ‘cursor colours’ can be programmed in
separate registers.
The bit map is stored with 4 pixels per byte, aligned to the
least significant bit. So the first pixel is in bits 0 and 1, the
next pixel in bits 3 and 4 and so on. The first index is the
column, followed by the row; index 0,0 is the upper left
corner.
2004 Jun 2919
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
Table 3 Layout of a byte in the cursor bit map
D7D6D5D4D3D2D1D0
pixel n + 3pixel n + 2pixel n + 1pixel n
D1D0D1D0D1D0D1D0
For each direction, there are 2 registers controlling the
position of the cursor, one controls the position of the
‘hot spot’, the other register controls the insertion position.
Thehotspotisthe‘tip’ofthepointerarrow.It can have any
position in the bit map. The actual position registers
describe the co-ordinates of the hot spot. Again 0,0 is the
upper left corner. While it is not possible to move the
hot spot beyond the left respectively upper screen border
thisisperfectly legal for the right respectively lower border.
It should be noted that the cursor position is described
relative to the input resolution.
RGB input signals to be encoded to PAL or NTSC are
converted to the Y-C
colour difference signals are fed through low-pass filters
and formatted to a ITU-R BT.601 like 4 : 2 : 2 data stream
for further processing.
A gain adjust option corrects the level swing of the
graphics world (black-to-white as 0 to 255) to the required
range of 16 to 235.
The matrix and formatting blocks can be bypassed for
Y-CB-CR graphics input.
Whenthe auxiliary VGA mode isselected,the output of the
cursor insertion block is immediately directed to the triple
DAC.
8.6Horizontal scaler
The high quality horizontal scaler operates on the 4 : 2 : 2
data stream. Its control engines compensate the colour
phase offset automatically.
The scaler starts processing after a programmable
horizontal offset and continues with a number of input
pixels. Each input pixel is a programmable fraction of the
current output pixel (XINC/4096). A special case is
XINC = 0, this sets the scaling factor to 1.
If the SAA7108AE; SAA7109AE input data is in
accordance with
another mode. In this event, XINC needs to be set to 2048
for a scaling factor of 1. With higher values, upscaling will
occur.
CMODE = 0CMODE = 1
“ITU-R BT.656”
CURSOR MODE
colour
colour space in this block. The
B-CR
, the scaler enters
2004 Jun 2920
The phase resolution of the circuit is 12 bits, giving a
maximum offset of 0.2 after 800 input pixels. Small FIFOs
rearrange a 4 : 2 : 2 data stream at the scaler output.
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
8.7Vertical scaler and anti-flicker filter
The functions scaling, Anti-Flicker Filter (AFF) and
re-interlacing are implemented in the vertical scaler.
Besides the entire input frame, it receives the first and last
lines of the border to allow anti-flicker filtering.
Thecircuit generates the interlaced outputfieldsby scaling
down the input frames with different offsets for odd and
even fields. Increasing the YSKIP setting reduces the
anti-flicker function. A YSKIP value of 4095switches it off;
see Table 120.
An additional, programmable vertical filter supports the
anti-flicker function. This filter is not available at upscaling
factors of more than 2.
Theprogramming is similar tothehorizontal scaler. For the
re-interlacing,the resolutions of the offset registers are not
sufficient, so the weighting factors for the first lines can
also be adjusted. YINC = 0 sets the scaling factor to 1;
YIWGTO and YIWGTE must not be 0.
Due to the re-interlacing, the circuit can perform upscaling
by a maximum factor of 2. The maximum factor depends
onthe setting of the anti-flickerfunctionand can be derived
from the formulae given in Section 8.20.
Anadditionalupscaling mode enables the upscaling factor
to be increased to a maximum of 4 as it is required for the
old VGA modes like 320 × 240.
8.10Oscillator and Discrete Time Oscillator (DTO)
The master clock generation is realized as a 27 MHz
crystal oscillator, which can operate with either a
fundamental wave crystal or a 3rd-harmonic crystal.
The crystal clock supplies the DTO of the pixel clock
synthesizer, the video encoder and the I2C-bus control
block. It also usually supplies the triple DAC, with the
exceptionoftheauxiliaryVGAmode,wherethetripleDAC
is clocked by the pixel clock (PIXCLK).
The DTO can be programmed to synthesize all relevant
pixel clock frequencies between circa 40 and 85 MHz.
Two programmable dividers provide the actual clock to be
used externally and internally. The dividers can be
programmed to factors of 1, 2, 4 and 8. For the internal
pixel clock, a divider ratio of 8 makes no sense and is thus
forbidden.
The internal clock can be switched completely to the pixel
clock input. In this event, the input FIFO is useless and will
be bypassed.
The entire pixel clock generation can be locked to the
vertical frequency. Both pixel clock dividers get
re-initialized every field. Optionally, the DTO can be
cleared with each V-sync. At proper programming, this will
make the pixel clock frequency a precise multiple of the
vertical and horizontal frequencies. This is required for
some graphic controllers.
8.8FIFO
The FIFO acts as a buffer to translate from the PIXCLK
clock domain to the XTAL clock domain. The write clock is
PIXCLK and the read clock is XTAL. An underflow or
overflow condition can be detected via the I2C-bus read
access.
In order to avoid underflows and overflows, it is essential
that the frequency of the synthesized PIXCLK matches to
the input graphics resolution and the desired scaling
factor.
8.9Border generator
When the graphics picture is to be displayed as interlaced
PAL, NTSC, S-video or RGB on a TV screen, it is desired
in many cases not to lose picture information due to the
inherent overscanning of a TV set. The desired amount of
underscan area, which is achieved through appropriate
scaling in the vertical and horizontal direction, can be filled
in the border generator with an arbitrary true colour tint.
2004 Jun 2921
8.11Low-pass Clock Generation Circuit (CGC)
This block reduces the phase jitter of the synthesized pixel
clock. It works as a tracking filter for all relevant
synthesized pixel clock frequencies.
8.12Encoder
8.12.1VIDEO PATH
The encoder generates luminance and colour subcarrier
output signals from the Y, CBand CR baseband signals,
which are suitable for use as CVBS or separate Y and C
signals.
Input to the encoder, at 27 MHz clock (e.g. DVD), is either
originated from computer graphics at pixel clock, fed
throughthe FIFO and border generator,ora ITU-R BT.656
style signal.
Luminance is modified in gain and in offset (the offset is
programmable in a certain range to enable different black
level set-ups). A blanking level can be set after insertion of
a fixed synchronization pulse tip level, in accordance with
standard composite synchronization schemes.
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
Other manipulations used for the Macrovision anti-taping
process, such as additional insertion of AGC super-white
pulses (programmable in height), are supported by the
SAA7108AE only.
To enable easy analog post filtering, luminance is
interpolated from a 13.5 MHz data rate to a 27 MHz data
rate, thereby providing luminance in a 10-bit resolution.
The transfer characteristics of the luminance interpolation
filter are illustrated in Figs 7 and 8. Appropriate transients
at start/end of active video and for synchronization pulses
are ensured.
Chrominance is modified in gain (programmable
separately for CBand CR), and a standard dependent
burst is inserted, before baseband colour signals are
interpolated from a 6.75 MHz data rate to a 27 MHz data
rate. One of the interpolation stages can be bypassed,
thus providing a higher colour bandwidth, which can be
usedforthe Y and C output. The transfer characteristics of
the chrominance interpolation filter are illustrated in
Figs 5 and 6.
The amplitude (beginning and ending) of the inserted
burst, is programmable in a certain range that is suitable
for standard signals and for special effects. After the
succeeding quadrature modulator, colour is provided on
the subcarrier in 10-bit resolution.
The numeric ratio between the Y and C outputs is in
accordance with the standards.
8.12.3VIDEO PROGRAMMING SYSTEM (VPS) ENCODING
Five bytes of VPS information can be loaded via the
I2C-bus and will be encoded in the appropriate format into
line 16.
8.12.4CLOSED CAPTION ENCODER
Using this circuit, data in accordance with the specification
of Closed Caption or extended data service, delivered by
the control interface, can be encoded (line 21). Two
dedicated pairs of bytes (two bytes per field), each pair
preceded by run-in clocks and framing code, are possible.
Theactualline number in which data is to be encoded, can
be modified in a certain range.
The data clock frequency is in accordance with the
definition for NTSC M standard 32 times horizontal line
frequency.
DataLOWat the output of the DACs correspondsto0 IRE,
data HIGH at the output of the DACs corresponds to
approximately 50 IRE.
Itis also possible to encode Closed Caption data for 50 Hz
field frequencies at 32 times the horizontal line frequency.
8.12.5ANTI-TAPING (SAA7108AE ONLY)
For more information contact your nearest Philips
Semiconductors sales office.
8.12.2TELETEXT INSERTION AND ENCODING (NOT
SIMULTANEOUSLY WITH REAL-TIME CONTROL)
Pin TTX_SRES receives a WST or NABTS teletext
bitstream sampled at the crystal clock. At each rising edge
of the output signal (TTXRQ) a single teletext bit has to be
provided after a programmable delay at input pin
TTX_SRES.
Phase variant interpolation is achieved on this bitstream in
the internal teletext encoder, providing sufficient small
phase jitter on the output text lines.
TTXRQ_XCLKO2 provides a fully programmable request
signal to the teletext source, indicating the insertion period
of bitstream at lines which can be selected independently
for both fields. The internal insertion window for text is set
to 360 (PAL WST), 296 (NTSC WST) or 288 (NABTS)
teletext bits including clock run-in bits. The protocol and
timing are illustrated in Fig.51.
Alternatively, this pin can be provided with a buffered
crystal clock (XCLK) of 13.5 MHz.
2004 Jun 2922
8.13RGB processor
This block contains a dematrix in order to produce RED,
GREEN and BLUE signals to be fed to a SCART plug.
Before Y, CBand CR signals are de-matrixed, individual
gain adjustment for Y and colour difference signals and
2 times oversampling for luminance and 4 times
oversampling for colour difference signals is performed.
The transfer curves of luminance and colour difference
components of RGB are illustrated in Figs 9 and 10.
8.14Triple DAC
Both Y and C signals are converted from digital-to-analog
in a 10-bit resolution at the output of the video encoder.
Y and C signals are also combined into a 10-bit CVBS
signal.
The CVBS output signal occurs with the same processing
delay as the Y, C and optional RGB or CR-Y-CB outputs.
Absolute amplitude at the input of the DAC for CVBS is
reduced by15⁄16with respect to Y and C DACs to make
maximum use of the conversion ranges.
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
RED, GREEN and BLUE signals are also converted from
digital-to-analog, each providing a 10-bit resolution.
The reference currents of all three DACs can be adjusted
individually in order to adapt for different output signals.
In addition, all reference currents can be adjusted
commonly to compensate for small tolerances of the
on-chip band gap reference voltage.
Alternatively, all currents can be switched off to reduce
power dissipation.
All three outputs can be used to sense for an external load
(usually 75 Ω) during a pre-defined output. A flag in the
I2C-bus status byte reflects whether a load is applied or
not. An automatic sense mode can also be activated,
which will immediately indicate any 75 Ω load at any of the
three outputs at the dedicated interrupt pin TVD.
If the SAA7108AE; SAA7109AE is required to drive a
second (auxiliary) VGA monitor or an HDTV set, the DACs
receive the signal coming from the HD data path. In this
event, the DACs are clocked at the incoming PIXCLKI
instead of the 27 MHz crystal clock used in the video
encoder.
8.15HD data path
This data path enables the SAA7108AE; SAA7109AE to
be used with VGA or HDTV monitors. It receives its data
directly from the cursor generator and supports RGB and
Y-PB-PR output formats (RGB not with Y-PB-PR input
formats). No scaling is done in this mode.
Alternatively, the device can be triggered by auxiliary
codes in a ITU-R BT.656 data stream via PD7 to PD0.
Only vertical frequencies of 50 and 60 Hz are allowed with
the SAA7108AE; SAA7109AE. In slave mode, it is not
possible to lock the encoders colour carrier to the line
frequency with the PHRES bits.
In the (more common) master mode, the time base of the
circuit is continuously free-running. The IC can output a
frame sync at pin FSVGC, a vertical sync at pin VSVGC, a
horizontal sync at pin HSVGC and a composite blanking
signal at pin CBO. All of these signals are defined in the
PIXCLK domain. The duration of HSVGC and VSVGC are
fixed,they are 64 clocks forHSVGCand 1 line for VSVGC.
The leading slopes are in phase and the polarities can be
programmed.
The input line length can be programmed. The field length
is always derived from the field length of the encoder and
the pixel clock frequency that is being used.
CBO acts as a data request signal. The circuit accepts
input data at a programmable number of clocks after CBO
goes active. This signal is programmable and it is possible
to adjust the following (see Figs 49 and 50):
• The horizontal offset
• The length of the active part of the line
• The distance from active start to first expected data
• The vertical offset separately for odd and even fields
• The number of lines per input field.
A gain adjustment either leads the full level swing to the
digital-to-analog converters or reduces the amplitude by a
factor of 0.69. This enables sync pulses to be added to the
signal as it is required for display units that require signals
with sync pulses, either regular or 3-level syncs.
8.16Timing generator
The synchronization of the SAA7108AE; SAA7109AE is
able to operate in two modes; slave mode and master
mode.
In slave mode, the circuit accepts sync pulses on the
bidirectional FSVGC (frame sync), VSVGC (vertical sync)
and HSVGC (horizontal sync) pins: the polarities of the
signals can be programmed. The frame sync signal is only
necessary when the input signal is interlaced, in other
casesit may be omitted. If theframesyncsignal is present,
it is possible to derive the vertical and the horizontal phase
from it by setting the HFS and VFS bits. HSVGC and
VSVGC are not necessary in this case, so it is possible to
switch the pins to output mode.
2004 Jun 2923
In most cases, the vertical offsets for odd and even fields
are equal. If they are not, then the even field will start later.
The SAA7108AE; SAA7109AE will also request the first
input lines in the even field, the total number of requested
lines will increase by the difference of the offsets.
As stated above, the circuit can be programmed to accept
the look-up and cursor data in the first 2 lines of each field.
The timing generator provides normal data request pulses
forthese lines; the duration is thesameasfor regular lines.
The additional request pulses will be suppressed with
LUTL set to logic 0; see Table 143. The other vertical
timings do not change in this case, so the first active line
can be number 2, counted from 0.
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
8.17Pattern generator for HD sync pulses
The pattern generator provides an appropriate
synchronization pattern for the video data path in auxiliary
monitororHDTV mode, respectively. It providesmaximum
flexibility in terms of raster generation for all interlaced and
non-interlaced computer graphics or ATSC formats. The
sync engine is capable of providing a combination of
event-value pairs which can be used to insert certain
values at specified times in the outgoing data stream. It
can also be used to generate digital signals associated
with time events. They can be used as digital horizontal
andvertical synchronization signalsonpins HSM_CSYNC
and VSM.
The picture position is adjustable through the
programmable relationship between the sync pulses and
the video contents.
The generation of embedded analog sync pulses is bound
to a number of events which can be defined for a line.
Several of these line timing definitions can exist in parallel.
Forthe final sync raster composition a certain sequence of
lineswithdifferent sync event properties has to be defined.
The sequence specifies a series of line types and the
number of occurrences of this specific line type. After the
sequence has been completed, it restarts from the
beginning. All pulse shapes are filtered internally in order
to avoid ringing after analog post filters.
The sequence of the generated pulse stream must fit
precisely to the incoming data stream in terms of the total
number of pixels per line and lines per frame.
The sync engines flexibility is achieved by using a
sequence of linked lists carrying the properties for the
image, the lines as well as fractions of lines. Figure 11
illustrates the context between the various tables.
The first table serves as an array to hold the correct
sequence of lines composing the synchronization raster. It
cancontainupto16 entries. Each entry holds a 4-bit index
tothe next table and a 10-bit counter value which specifies
how often this particular line is invoked. If the necessary
line count for a particular line exceeds the 10 bits, it has to
use two table entries.
Each index of this table points to a particular line of the
next table in the linked list. This table is called the line
pattern array and each of the up to seven entries stores up
tofour pairs of a duration in pixel clock cycles and an index
to a value table. The table entries are used to define
portions of a line representing a certain value for a certain
number of clock cycles.
The value specified in this table is actually another 3-bit
index into a value array which can hold up to eight 8-bit
values. If bit 4 (MSB) of the index is logic 1, the value is
inserted into the G or Y signal only; if bit 4 = 0, the
associated value is inserted into all three signals.
Two additional bits of the entries in the value array (LSBs
of the second byte) determine if the associated events
appearasa digital pulse on the HSM_CSYNC and/or VSM
outputs.
To ease the trigger set-up for the sync generation module,
a set of registers is provided to set up the screen raster
defined as width and height. A trigger position can be
specified as an x, y co-ordinate within the overall
dimensions of the screen raster. If the x, y counter
matches the specified co-ordinates, a trigger pulse is
generated which pre-loads the tables with their initial
values.
Table 6 outlines an example on how to set up the sync
tables for a 1080i HD raster.
Important note:
Due to a problem in the programming interface, writing to
the line pattern array (address D2) might destroy the data
of the line type array (address D1). A work around is to
write the line pattern array data before writing the line type
array. Reading of the arrays is possible but all address
pointers must be initialized before the next write operation.
The4-bitindexinthelinecountarraypointstothelinetype
array. It holds up to 15 entries where, index 0 is not used,
index 1 points to the first entry, index 2 to the second entry
of the line type array etc.
Each entry of the line type array can hold up to 8 index
pointerstoanother table. These indices point to portions of
alinepulsepattern:A line could be split up e.g. into a sync,
a blank, and an active portion followed by another blank
portion, occupying four entries in one table line.
2004 Jun 2924
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
handbook, full pagewidth
4-bit line type index
line type pointer
8 + 2-bit value
VALUE ARRAY
8 entries
10-bit line count
LINE COUNT ARRAY
16 entries
33333333
LINE TYPE ARRAY
15 entries
33333333
event type pointer
10-bit duration
4-bit value index
10-bit duration
4-bit value index
line
count
pointer
LINE PATTERN ARRAY
7 entries
line pattern pointer
pattern pointer
10-bit duration
4-bit value index
10-bit duration
4-bit value index
MBL797
Fig.11 Context between the pattern generator tables for DH sync pulses.
2004 Jun 2925
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
Table 6 Example for set-up of the sync tables
SEQUENCECOMMENT
Write to subaddress D0H
00points to first entry of line count array (index 0)
05 20generate 5 lines of line type index 2 (remember, it is the second entry of the line type
array); will be the first vertical raster pulse
01 40generate 1 line of line type index 4; will be sync-black-sync-black sequence after the first
vertical pulse
0E 60generate 14 lines of line type index 6; will be the following lines with sync-black sequence
1C 12generate 540 lines of line type index 1; will be lines with sync and active video
02 60generate 2 lines of line type index 6; will be the following lines with sync-black sequence
01 50generate 1 line of line type index 5; will be the following line (line 563) with
sync-black-sync-black-null sequence (null is equivalent to sync tip)
04 20generate 4 lines of line type index 2; will be the second vertical raster pulse
01 30generate 1 line of line type index 3; will be the following line with sync-null-sync-black
sequence
0F 60generate 15 lines of line type index 6; will be the following lines with sync-black sequence
1C 12generate 540 lines of line type index 1; will be lines with sync and active video
02 60generate 2 lines of line type index 6; will be the following lines with sync-black sequence;
now, 1125 lines are defined
Write to subaddress D2H (insertion is done into all three analog output signals)
00points to first entry of line type array (index 1)
34 00 00 00use pattern entries 4 and 3 in this sequence (for sync and active video)
24 24 00 00use pattern entries 4, 2, 4 and 2 in this sequence (for 2 × sync-black-null-black)
24 14 00 00use pattern entries 4, 2, 4 and 1 in this sequence (for sync-black-null-black-null)
14 14 00 00use pattern entries 4, 1, 4 and 1 in this sequence (for sync-black-sync-black)
14 24 00 00use pattern entries 4, 1, 4 and 2 in this sequence (for sync-black-sync-black-null)
54 00 00 00use pattern entries 4 and 5 in this sequence (for sync-black)
2004 Jun 2926
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
SEQUENCECOMMENT
Write to subaddress D3H (no signals are directed to pins HSM_CSYNC and VSM)
00points to first entry of value array (index 0)
CC 00black level, to be added during active video
80 00sync level LOW (minimum output voltage)
0A 00sync level HIGH (3-level sync)
CC 00black level (needed elsewhere)
80 00null (identical with sync level LOW)
Write to subaddress DCH
0Binsertion is active, gain for signal is adapted accordingly
8.18I2C-bus interface
The I2C-bus interface is a standard slave transceiver,
supporting 7-bit slave addresses and 400 kbits/s
guaranteed transfer rate. It uses 8-bit subaddressing with
an auto-increment function. All registers are read and
write, except two read only status bytes.
The register bit map consists of an RGB Look-Up Table
(LUT), a cursor bit map and control registers. The LUT
containsthree banks of 256 bytes, where each RGB triplet
isassigned to one address. Thus a write access needs the
LUT address and three data bytes following subaddress
FFH. For further write access auto-incrementing of the
LUT address is performed. The cursor bit map access is
similar to the LUT access but contains only a single byte
per address.
The I2C-bus slave address is defined as 88H.
8.19Power-down modes
In order to reduce the power consumption, the
SAA7108AE; SAA7109AE supports 2 Power-down
modes, accessible via the I2C-bus. The analog
Power-down mode (DOWNA = 1) turns off the
digital-to-analog converters and the pixel clock
synthesizer. The digital down mode turns off all internal
clocks and sets the digital outputs to LOW except the
I2C-bus interface. The IC retains its programming and can
still be accessed in this mode, but not all registers can be
read from or written to. Reading or writing to the look-up
tables, the cursor and the HD sync generator require a
valid pixel clock. The typical supply current in full
power-down is approximately 5 mA.
So in most cases, DOWNA and DOWND should be set to
logic 1 simultaneously. If the EIDIV bit is logic 1, it should
be set to logic 0 before power-down.
8.20Programming the graphics acquisition scaler
of the video encoder
The encoder section needs to provide a continuous data
stream at its analog outputs as well as receive a
continuous stream from its data source. Due to the fact
that there is no frame memory isolating the data streams,
restrictions apply to the input frame timings.
Input and output processing of the encoder section are
only coupled through the vertical frequencies. In master
mode, the encoder provides a vertical sync and an
odd/even pulse to the input processing, in slave mode, the
encoder receives them.
The parameters of the input field are mainly given by the
memory capacity of the encoder section. The rule is that
the scaler and thus the input processing needs to provide
the video data in the same time frames as the encoder
reads them. So the vertical active video times (and the
vertical frequencies) need to be the same.
The second rule is that there has to be data in the buffer
FIFO when the encoder enters the active video area.
So the vertical offset in the input path needs to be a bit
shorter than the offset of the encoder.
The following gives the set of equations required to
program the IC for the most common application: A post
processor in master mode with non-interlaced video input
data.
Due to the fact that the analog Power-down mode turns off
the pixel clock synthesizer, there are limitations in some
applications. If there is no pixel clock, the IC is not able to
set its outputs to LOW.
2004 Jun 2927
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; 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.1TV 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.
Theoutputlinesshouldbecentred on the screen. It should
be noted that the encoder has 2 clocks per pixel;
see Table 93.
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.
240 OutLin–
FAL19
FAL23
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.2INPUT 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
thefollowingway: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.
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.
Thedifferencemaybe 1 at 640 × 480 pixels resolution 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).
PCLIPCLE
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.3H
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
XPIX
XINC
XINC needs to be rounded up, it needs to be set to 0 for a
scaling factor of 1.
8.20.4VERTICAL SCALER
The input vertical offset can be taken from the assumption
thatthescalershould have just finished writing the first line
when the encoder starts reading it:
flicker reduction but minimum vertical bandwidth, 4095
gives no flicker reduction and maximum bandwidth. Note
that the maximum value for YINC is 4095. It might be
necessary to reduce the value of YSKIP to fulfil this
requirement.
YINC
YIWGTO
YIWGTE
OutLin
---------------------InLin 2+
YINC
------------- 2
YINC YSKIP–
=
------------------------------------- -
YSKIP
1
+
×4096×=
-----------------
4095
2048+=
2
When YINC = 0 it sets the scaler to scaling factor 1. The
initial weighting factors must not be set to 0 in this case.
YIWGTE may go negative. In this event, YINC should be
added and YOFSE incremented. This can be repeated as
often as necessary to make YIWGTE positive.
Note that these equations assume that the input is
non-interlaced while the output is interlaced. If the input is
interlaced, the initial weighting factors need to be adapted
to get the proper phase offsets in the output frame.
If vertical upscaling beyond the upper capabilities is
required, the parameter YUPSC may be set to 1. This
extends the maximum vertical scaling factor by a factor 2.
Only the parameter YINC gets affected, it needs to be
divided by 2 to get the same effect.
There are restrictions in this mode:
• The vertical filter YFILT is not available in this mode; the
circuit will ignore this value
• The horizontal blanking needs to be long enough to
transfer an output line between 2 memory locations.
This is 710 internal pixel clocks
Ortheupscaling factor needs to be limited to 1.5andthe
horizontal upscaling factor is also limited to less than
∼1.5. In this case a normal blanking length is sufficient.
For C and CVBS outputs, deviating amplitudes of the
colour difference signals can be compensated for by
independent gain control setting, while gain for luminance
is set to predefined values, distinguishable for 7.5 IRE
set-up or without set-up.
The RGB, respectively C
-Y-CB path features an
R
individual gain setting for luminance (GY) and colour
difference signals (GCD). Reference levels are measured
with a colour bar, 100 % white, 100 % amplitude and
100 % saturation.
The encoder section of the SAA7108AE; SAA7109AE has
special input cells for the VGC port. They operate at a
wider supply voltage range and have a strict input
threshold at1/2V
DD(DVO)
. To achieve full speed of these
cells, the EIDIV bit needs to be set to logic 1. In this case
the impedance of these cells is approximately 6 kΩ. This
may cause trouble with the bootstrapping pins of some
graphic chips. So the power-on reset forces the bit to
logic 0, the input impedance is regular in this mode.
9FUNCTIONAL DESCRIPTION OF DIGITAL VIDEO DECODER PART
9.1Decoder
9.1.1ANALOG INPUT PROCESSING
The SAA7108AE; SAA7109AE offers six analog signal inputs, two analog main channels with source switch, clamp
circuit, analog amplifier, anti-alias filter and video 9-bit CMOS ADC; see Fig.15.
9.1.2ANALOG CONTROL CIRCUITS
The anti-alias filters are adapted to the line-locked clock frequency via a filter control circuit. The characteristics are
illustrated in Fig.12. During the vertical blanking period, gain and clamping control is frozen.
6
V
(dB)
0
−6
−12
−18
−24
−30
−36
−42
024 68101214
MGD138
f (MHz)
Fig.12 Anti-alias filter.
2004 Jun 2932
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
9.1.2.1Clamping
The clamping control circuit controls the correct clamping
of the analog input signals. A coupling capacitor is used to
store and filter the clamping voltage. An internal digital
clamp comparator generates the information with respect
to clamp-up or clamp-down. The clamping levels for the
two ADC channels are fixed for luminance (60) and
chrominance (128). Clamping time in normal use is set
with the HCL pulse at the back porch of the video signal.
9.1.2.2Gain control
The gain control circuit receives (via the I2C-bus) the static
gain levels for the two analog amplifiers, or controls one of
theseamplifiersautomaticallyvia a built-in Automatic Gain
Control (AGC) as part of the Analog Input Control (AICO).
HSY
TV line
HCL
MGL065
analog line blanking
255
GAINCLAMP
60
1
The AGC (automatic gain control for luminance) is used to
amplify a CVBS or Y signal to the required signal
amplitude, which is matched to the ADCs input voltage
range.TheAGCactivetimeisthe sync bottom of the video
signal.
Signal (white) peak control limits the gain at signal
overshoots. The influence of supply voltage variation
within the specified range is automatically eliminated by
clampingandautomatic gain control. The flow charts show
more details of the AGC; see Figs 16 and 17.
analog input level
+3 dB
0 dB
(1 V (p-p) 18/56 Ω)
−6 dB
maximum
range 9 dB
minimum
controlled
ADC input level
0 dB
MHB325
Fig.13 Analog line with clamp (HCL) and gain
range (HSY).
2004 Jun 2933
Fig.14 Automatic gain range.
This text is here in white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader.This text is here in
n
_white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader.This text is here inThis text is here in
white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader. white to force landscape pages to be ...
This text is here in white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader.This text is here in
_white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader.This text is here inThis text is here in
white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader. white to force landscape pages to be ...
2004 Jun 2937
9.1.3CHROMINANCE AND LUMINANCE PROCESSING
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
CVBS-IN
or CHR-IN
CVBS-IN
or Y-IN
QUADRATURE
DEMODULATOR
SUBCARRIER
GENERATION 1
HUEC
LDEL
YCOMB
SUBCARRIER
GENERATION 2
CHROMINANCE
INCREMENT
DELAY
DELAY
COMPENSATION
QUADRATURE
MODULATOR
LOW-PASS 1
DOWNSAMPLING
LCBW[2:0
LDEL
YCOMB
CHROMINANCE
INCREMENT
DTO-RESET
SUBCARRIER
INCREMENT
GENERATION
AND
DIVIDER
Y
SUBTRACTOR
CHR
UV
INTERPOLATION
LOW-PASS 3
LUBW
UV
ADAPTIVE
COMB FILTER
SET_RAW
]
SET_VBI
CCOMB
YCOMB
LDEL
BYPS
PHASE
DEMODULATOR
AMPLITUDE
DETECTOR
BURST GATE
ACCUMULATOR
LOOP FILTER
LUMINANCE-PEAKING
Y-DELAY ADJUSTMENT
LUFI[3:0
CSTD[2:0
YDEL[2:0
UV
OR
LOW-PASS,
]
SET_RAW
]
SET_VBI
]
LOW-PASS 2
CHBW
SECAM
PROCESSING
CHROMA
GAIN
CONTROL
UV-
ADJUSTMENT
Y/CVBS
DBRI[7:0
DCON[7:0
DSAT[7:0
RAWG[7:0
RAWO[7:0
PAL DELAY LINE
RECOMBINATION
]
]
]
]
]
COLO
BRIGHTNESS
CONTRAST
SATURATION
CONTROL
RAW DATA
GAIN AND
OFFSET
CONTROL
SET_RAW
UV
SET_VBI
SECAM
Y-OUT/
CVBS-OUT
UV-OUT
HREF-OUT
CDTO
RTCO
CSTD[2:0
INCS
]
FCTC
ACGC
CGAIN[6:0
IDEL[3:0
Fig.18 Chrominance and luminance processing.
CODE
]
]
handbook, full pagewidth
SECS
SET_RAW
SET_VBI
fH/2 switch signal
DCVF
MHB532
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
9.1.3.1Chrominance path
The 9-bit CVBS or chrominance input signal is fed to the
inputofaquadraturedemodulator,whereitismultipliedby
twotime-multiplexed subcarrier signalsfromthe subcarrier
generation block 1 (0 and 90° phase relationship to the
demodulator axis). The frequency is dependent on the
chosen colour standard.
The time-multiplexed output signals of the multipliers are
low-pass filtered (low-pass 1). Eight characteristics are
programmable via LCBW3 to LCBW0 to achieve the
desired bandwidth for the colour difference signals (PAL,
NTSC) or the 0° and 90° FM signals (SECAM).
Thechrominance low-pass 1characteristicalso influences
the grade of cross-luminance reduction during horizontal
colour transients (large chrominance bandwidth means
strong suppression of cross-luminance). If the Y comb
filter is disabled when YCOMB = 0 the filter directly
influences the width of the chrominance notch within the
luminance path (large chrominance bandwidth means
wide chrominance notch resulting to lower luminance
bandwidth).
The low-pass filtered signals are fed to the adaptive comb
filter block. The chrominance components are separated
from the luminance via a two-line vertical stage (four lines
forPAL standards) and a decision logiccircuitbetween the
filtered and the non-filtered output signals: this block is
bypassed for SECAM signals. The comb filter logic can be
enabled independently for the succeeding luminance and
chrominance processing by YCOMB (subaddress 09H,
bit 6) and/or CCOMB (subaddress 0EH, bit 0). It is always
bypassed during VBI or raw data lines, programmable by
the LCRn registers (subaddresses 41H to 57H);
see Section 9.2.
The separated CB-CR components are further processed
by a second filter stage (low-pass 2) to modify the
chrominance bandwidth without influencing the luminance
path. It’s characteristic is controlled by CHBW
(subaddress 10H, bit 3). For the complete transfer
characteristic of low-pass filters 1 and 2 see
Figs 19 and 20.
The SECAM processing (bypassed for QAM standards)
contains the following blocks:
• Baseband ‘bell’ filters to reconstruct the amplitude and
phase equalized 0° and 90° FM signals
• Phase demodulator and differentiator
(FM demodulation)
• De-emphasis filter to compensate the pre-emphasized
input signal, including frequency offset compensation
(DB or DR white carrier values are subtracted from the
signal, controlled by the SECAM switch signal).
The succeeding chrominance gain control block amplifies
or attenuates the CB-CR signal according to the required
ITU 601/656 levels. It is controlled by the output signal
from the amplitude detection circuit within the burst
processing block.
The burst processing block provides the feedback loop of
the chrominance PLL and contains the following:
The increment generation circuit produces the Discrete
Time Oscillator (DTO) increment for both subcarrier
generation blocks. It contains a division by the increment
of the line-locked clock generator to create a stable
phase-locked sine signal under all conditions (e.g. for
non-standard signals).
The PAL delay line block eliminates crosstalk between the
chrominance channels in accordance with the PAL
standard requirements. For NTSC colour standards, the
delay line can be used as an additional vertical filter.
If desired, it can be switched off by DCVF = 1. It is always
disabledduringVBIor raw data lines programmable by the
LCRn registers (subaddresses 41H to 57H); see
Section 9.2. The embedded line delay is also used for
SECAM recombination (cross-over switches).
Fig.20 Transfer characteristics of the chrominance low-pass at CHBW = 1.
2004 Jun 2940
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
9.1.3.2Luminance path
The rejection of the chrominance components within the
9-bit CVBS or Y input signal is done by subtracting the
re-modulated chrominance signal from the CVBS input.
The comb filtered CB-CR components are interpolated
(upsampled) by the low-pass 3 block. It’s characteristic is
controlled by LUBW (subaddress 09H, bit 4) to modify the
width of the chrominance ‘notch’ without influencing the
chrominance path. The programmable frequency
characteristics available, in conjunction with the
LCBW2 to LCBW0 settings, can be seen in Figs 21 to 24.
It should be noted that these frequency curves are only
valid for Y comb disabled filter mode (YCOMB = 0).
In comb filter mode the frequency response is flat. The
centre frequency of the notch is automatically adapted to
the chosen colour standard.
The interpolated CB-CR samples are multiplied by two
time-multiplexed subcarrier signals from the subcarrier
generation block 2. This second DTO is locked to the first
subcarrier generator by an increment delay circuit
matched to the processing delay, which is different for
PAL and NTSC standards according to the chosen comb
filter algorithm. The two modulated signals are finally
added to create the re-modulated chrominance signal.
The frequency characteristic of the separated luminance
signal can be further modified by the succeeding
luminance filter block. It can be configured as peaking
(resolution enhancement) or low-pass block by
LUFI3 to LUFI0 (subaddress 09H, bits 3 to 0). The 16
resulting frequency characteristics can be seen in Fig.25.
The LUFI3 to LUFI0 settings can be used as a user
programmable sharpness control.
The luminance filter block also contains the adjustable
Y delay part; programmable by YDEL2 to YDEL0
(subaddress 11H, bits 2 to 0).
Fig.25 Transfer characteristics of the luminance peaking/low-pass filter (sharpness).
2004 Jun 2946
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
9.1.3.3Brightness Contrast Saturation (BCS) control and decoder output levels
The resulting Y (CVBS) and CB-CR signals are fed to the BCS block, which contains the following functions:
• Chrominance saturation control by DSAT7 to DSAT0
• Luminance contrast and brightness control by DCON7 to DCON0 and DBRI7 to DBRI0
• Raw data (CVBS) gain and offset adjustment by RAWG7 to RAWG0 and RAWO7 to RAWO0
• Limiting Y-CB-CR or CVBS to the values 1 (minimum) and 254 (maximum) to fulfil
“ITU Recommendation 601/656”
.
handbook, full pagewidth
+255
+235
+128
LUMINANCE 100%
+16
0
white
black
+255
+240
+212+212
+128
CB-COMPONENT
+44
+16
0
blue 100%
blue 75%
colourless
yellow 75%
yellow 100%
a. Y output range.b. CB output range.c. CR output range.
“ITU Recommendation 601/656”
Equations for modification to the Y-CB-CR levels via BCS control I2C-bus bytes DBRI, DCON and DSAT.
Luminance:
Chrominance:
It should be noted that the resulting levels are limited to 1 to 254 in accordance with
Y
OUT
CRCB()
OUT
digital levels with default BCS (decoder) settings DCON[7:0] = 44H, DBRI[7:0] = 80H and DSAT[7:0] = 40H.
DCON
Int
-----------------
Int
68
DSAT
--------------- 64
Y 128–()×DBRI+=
CRCB,128–()×128+=
“ITU Recommendation 601/656”
+255
+240
+128
CR-COMPONENT
+44
+16
0
red 100%
red 75%
colourless
cyan 75%
cyan 100%
MHB730
.
Fig.26 Y-CB-CR range for scaler input and X port output.
2004 Jun 2947
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
+255
+209
+71
+60
1
LUMINANCE
SYNC
white
black
black shoulder
sync bottom
+255
+199
+60
1
white
LUMINANCE
black shoulder = black
SYNC
sync bottom
MGD700
a. Sources containing 7.5 IRE black level offset (e.g. NTSC M).b. Sources not containing black level offset.
CVBS levels with default settings RAWG[7:0] = 64 and RAWO[7:0] = 128.
Equation for modification of the raw data levels via bytes RAWG and RAWO:
RAWG
OUT
Int
------------------
CVBS
It should be noted that the resulting levels are limited to 1 to 254 in accordance with “
CVBS
64
nom
128–()×RAWO+=
ITU Recommendation 601/656”
.
Fig.27 CVBS (raw data) range for scaler input, data slicer and X port output.
2004 Jun 2948
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
9.1.4SYNCHRONIZATION
The prefiltered luminance signal is fed to the
synchronization stage. Its bandwidth is further reduced to
1 MHz by a low-pass filter. The sync pulses are sliced and
fed to the phase detectors where they are compared with
the sub-divided clock frequency. The resulting output
signal is applied to the loop filter to accumulate all phase
deviations. Internal signals (e.g. HCL and HSY) are
generated in accordance with analog front-end
requirements. The loop filter signal drives an oscillator to
generate the line frequency control signal (LFCO);
see Fig.28.
The detection of ‘pseudo syncs’ as part of the Macrovision
copy protection standard is also done within the
synchronization circuit.
The result is reported as flag COPRO within the decoder
status byte at subaddress 1FH.
9.1.5CLOCK GENERATION CIRCUIT
The internal CGC generates all clock signals required for
the video input processor.
The internal signal LFCO is a digital-to-analog converted
signal provided by the horizontal PLL. It is a multiple of the
line frequency:
6.75 MHz = 429 × fH (50 Hz), or
6.75 MHz = 432 × fH (60 Hz).
The LFCO signal is multiplied internally by a factor of
2 and 4 in the PLL circuit (including phase detector, loop
filtering, VCO and frequency divider) to obtain the output
clock signals. The rectangular output clocks have a 50 %
duty cycle.
Table 16 Decoder clock frequencies
CLOCKFREQUENCY (MHz)
XTAL24.576 or 32.110
LLC27
LLC213.5
LLC4 (internal)6.75
LLC8 (virtual)3.375
LFCO
BAND PASS
FC = LLC/4
ZERO
CROSS
DETECTION
PHASE
DETECTION
LOOP
FILTER
DIVIDER
1/2
OSCILLATOR
DIVIDER
1/2
MHB330
LLC
LLC2
Fig.28 Block diagram of the clock generation circuit.
9.1.6POWER-ON RESET AND CE INPUT
Amissingclock,insufficient digital or analog V
supplyvoltages(below 2.7 V) will start the reset sequence; all outputs
DDAd
are forced to 3-state (see Fig.29). The indicator output RESd is LOW for approximately 128 LLC after the internal reset
and can be applied to reset other circuits of the digital TV system.
It is possible to force a reset by pulling the Chip Enable (CE) to ground. After the rising edge of CE and sufficient power
supply voltage, the outputs LLC, LLC2 and SDAd return from 3-state to active, while the other signals have to be
activated via programming.
The output interface block of the decoder part contains the
ITU 656 formatter for the expansion port data output
XPD7 to XPD0 (see Section 10.4.1) and the control circuit
for the signals needed for the internal paths to the scaler
and data slicer part. It also controls the selection of the
reference signals for the RT port (RTCO, RTS0 and
RTS1) and the expansion port (XRH, XRV and XDQ).
The generation of the decoder data type control signals
SET_RAW and SET VBI is also done within this block.
These signals are decoded from the requested data type
for the scaler input and/or the data slicer, selectable by the
control registers LCR2 to LCR24; see Section 18.2.4.2.
Table 17 Data formats at decoder output
DATA TYPE NUMBERDATA TYPEDECODER OUTPUT DATA FORMAT
9VITC/EBU time codes (Europe)raw
10VITC/SMPTE time codes (USA)raw
11reservedraw
12US NABTSraw
13MOJI (Japanese)raw
14Japanese format switch (L20/22)raw
15video component signal, active video regionY-CB-CR4:2:2
For each LCR value, from 2 to 23, the data type can be
programmed individually. LCR2 to LCR23 refer to line
numbers. The selection in LCR24 values is valid for the
rest of the corresponding field. The upper nibble contains
the value for field 1 (odd), the lower nibble for field 2
(even). The relationship between LCR values and line
numbers can be adjusted via VOFF8 to VOFF0, located in
subaddresses 5BH (bit 4) and 5AH (bits 7 to 0) and FOFF
subaddress 5BH (bit 7). The recommended values are
VOFF[8:0] = 03H for 50 Hz sources (with FOFF = 0) and
VOFF[8:0] = 06H for 60 Hz sources (with FOFF = 1), to
accommodate line number conventions as used for PAL,
SECAM and NTSC standards; see Tables 18 to 21.
2004 Jun 2951
This text is here in white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader.This text is here in
_white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader.This text is here inThis text is here in
white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader. white to force landscape pages to be ...
2004 Jun 2952
Table 18 Relationship of LCR to line numbers in 525 lines/60 Hz systems (part 1)
Vertical line offset, VOFF[8:0] = 06H (subaddresses 5BH[4] and 5AH[7:0]); horizontal pixel offset, HOFF[10:0] = 347H (subaddresses 5BH[2:0] and
59H[7:0]); FOFF = 1 (subaddress 5BH[7])
Linenumber
(1st field)
Linenumber
(2nd field)
LCR2423456789
Table 19 Relationship of LCR to line numbers in 525 lines/60 Hz systems (part 2)
Vertical line offset, VOFF[8:0] = 06H (subaddresses 5BH[4] and 5AH[7:0]); horizontal pixel offset, HOFF[10:0] = 347H (subaddresses 5BH[2:0] and
59H[7:0]); FOFF = 1 (subaddress 5BH[7])
Linenumber
(1st field)
Linenumber
(2nd field)
LCR101112131415161718192021222324
521522523524525123456789
active videoequalization pulsesserration pulsesequalization pulses
259260261262263264265266267268269270271272
active videoequalization pulsesserration pulsesequalization pulses
10111213141516171819202122232425
nominal VBI lines F1active video
273274275276277278279280281282283284285286287288
nominal VBI lines F2active video
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
Table 20 Relationship of LCR to line numbers in 625 lines/50 Hz systems (part 1)
Vertical line offset, VOFF[8:0] = 03H (subaddresses 5BH[4] and 5AH[7:0]); horizontal pixel offset, HOFF[10:0] = 347H (subaddresses 5BH[2:0] and
59H[7:0]); FOFF = 0 (subaddress 5BH[7])
Linenumber
(1st field)
Linenumber
(2nd field)
LCR242345
Table 21 Relationship of LCR to line numbers in 625 lines/50 Hz systems (part 2)
Vertical line offset, VOFF[8:0] = 03H (subaddresses 5BH[4] and 5AH[7:0]); horizontal pixel offset, HOFF[10:0] = 347H (subaddresses 5BH[2:0] and
59H[7:0]); FOFF = 0 (subaddress 5BH[7])
Linenumber
(1st field)
Linenumber
(2nd field)
LCR67891011121314151617181920212223 24
62162262362462512345
active videoequalization pulsesserration pulsesequalization pulses
309310311312313314315316317318
active videoequalization pulsesserration pulsesequalization pulses
(1) The inactive going edge of the V123 signal indicates whether the field is odd or even. If HREF is active during
the falling edge of V123, the field is ODD (field 1). If HREF is inactive during the falling edge of V123, the field
is EVEN. The specific position of the slope is dependent on the internal processing delay and may change a
few clock cycles from version to version.
The control signals listed above are available on pins RTS0, RTS1, XRH and XRV according to the following table:
For further information see programming section, Tables 171, 172 and 173.
Fig.30 Vertical timing diagram for 50 Hz/625 line systems.
2004 Jun 2953
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
3
4
5
6
7
8
ITU counting
single field counting
CVBS
HREF
F_ITU656
(1)
V123
525
262
2
1
1
3
4
5
6
2
7
9910
8
...
10
...
22
21
22
21
VGATE
FID
ITU counting
single field counting
CVBS
HREF
F_ITU656
(1)
V123
VGATE
FID
VSTO[8:0] = 101H
263
262
263
262
VSTO[8:0] = 101H
264
1
(a) 1st field
265
266326742685269627072718272
2
(b) 2nd field
VSTA[8:0] = 011H
285
284
...
9
...
VSTA[8:0] = 011H
22
21
MHB541
(1) The inactive going edge of the V123 signal indicates whether the field is odd or even. If HREF is active during
the falling edge of V123, the field is ODD (field 1). If HREF is inactive during the falling edge of V123, the field
is EVEN. The specific position of the slope is dependent on the internal processing delay and may change a
few clock cycles from version to version.
The control signals listed above are available on pins RTS0, RTS1, XRH and XRV according to the following table:
For further information see programming section, Tables 171, 172 and 173.
Fig.31 Vertical timing diagram for 60 Hz/525 line systems.
2004 Jun 2954
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
CVBS input
expansion port
data output
HREF (50 Hz)
CREF
CREF2
HS (50 Hz)
programming range
(step size: 8/LLC)
HREF (60 Hz)
CREF
108
burst
processing delay ADC to expansion port:
140 × 1/LLC
12 × 2/LLC
720 × 2/LLC
5 × 2/LLC
0
720 × 2/LLC
144 × 2/LLC
16 × 2/LLC
138 × 2/LLC
sync clipped
2 × 2/LLC
−107
CREF2
HS (60 Hz)
programming range
(step size: 8/LLC)
Thesignals HREF, HS,CREF2 and CREFare available on pinsRTS0 and/or RTS1(see Section 18.2.2.19 Tables 171 and 172);
their polarity can be inverted via RTP0 and/or RTP1.
The signals HREF and HS are available on pin XRH (see Section 18.2.2.20 Table 173).
107
1 × 2/LLC
2 × 2/LLC
0
Fig.32 Horizontal timing diagram (50/60 Hz).
2004 Jun 2955
−106
MHB542
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
9.3Scaler
TheHigh Performance video Scaler (HPS) is based on the
system as implemented in the SAA7140, but enhanced in
some aspects. Vertical upsampling is supported and the
processing pipeline buffer capacity is enhanced, to allow
more flexible video stream timing at the image port,
discontinuous transfers and handshake. The internal data
flow from block to block is discontinuous dynamically, due
to the scaling process.
The flow is controlled by internal data valid and data
request flags (internal handshake signalling) between the
sub-blocks. Therefore the entire scaler acts as a pipeline
buffer. Depending on the actually programmed scaling
parameters the effective buffer can exceed to an entire
line. The access/bandwidth requirements to the VGA
frame buffer are reduced significantly.
The high performance video scaler in the SAA7108AE;
SAA7109AE has the following major blocks.
• Acquisition control (horizontal and vertical timer) and
task handling (the region/field/frame based processing)
• Prescaler, for horizontal downscaling by an integer
factor, combined with appropriate band limiting filters,
especially anti-aliasing for CIF format
• Brightness, saturation and contrast control for scaled
output data
• Line buffer, with asynchronous read and write, to
support vertical upscaling (e.g. for videophone
application, converting 240 into 288 lines, Y-CB-C
4:2:2)
• Vertical scaling, with phase accurate Linear Phase
Interpolation (LPI) for zoom and downscaling, or phase
accurate Accumulation Mode (ACM) for large
downscaling ratios and better anti-alias suppression
• Variable Phase Delay (VPD), operates as horizontal
phase accurate interpolation for arbitrary non-integer
scaling ratios, supporting conversion between square
and rectangular pixel sampling
• Output formatter for scaled Y-CB-CR4:2:2,
Y-CB-CR4:1:1 and Y only (format also for raw data)
• FIFO, 32-bit wide, with 64 pixel capacity in Y-CB-C
formats
• Output interface, 8 or 16-bit (only if extended by H port)
data pins wide, synchronous or asynchronous
operation, with stream events on discrete pins, or coded
in the data stream.
R
R
The overall H and V zooming (HV_zoom) is restricted by
the input/output data rate relationships. With a safety
margin of 2 % for running in and running out, the
maximum HV_zoom is equal to:
1. Input from decoder: 50 Hz, 720 pixel, 288 lines, 16-bit
data at 13.5 MHz data rate, 1 cycle per pixel; output:
8-bit data at 27 MHz, 2 cycles per pixel; the maximum
HV_zoom is equal to:
0.98
2. Input from X port: 60 Hz, 720 pixel, 240 lines, 8-bit
data at 27 MHz data rate (ITU 656), 2 cycles per pixel;
output via I + H port: 16-bit data at 27 MHz clock,
1 cycle per pixel; the maximum HV_zoom is equal to:
0.98
The video scaler receives its input signal from the video
decoder or from the expansion port (X port). It gets 16-bit
Y-CB-CR4:2:2 input data at a continuous rate of
13.5 MHz from the decoder. A discontinuous data stream
can be accepted from the expansion port, normally 8-bit
wide ITU 656 like Y-CB-CRdata, accompanied by a pixel
qualifier on XDQ.
Theinputdatastreamissortedinto two data paths, one for
luminance (or raw samples), and one for time multiplexed
chrominance CBand CR samples. A Y-CB-CR4:1:1
input format is converted to 4 :2:2 for the horizontal
prescaling and vertical filter scaling operation.
Thescaler operation is defined bytwoprogramming pages
A and B, representing two different tasks that can be
applied field alternating or to define two regions in a field
(e.g. with different scaling range, factors, and signal
source during odd and even fields).
Each programming page contains control for:
• Signal source selection and formats
• Task handling and trigger conditions
• Input and output acquisition window definition
• H prescaler, V scaler and H phase scaling.
Raw VBI data will be handled as specific input format and
need its own programming page (equals own task).
In VBI pass through operation the processing of prescaler
and vertical scaling has to be disabled, however the
horizontal fine scaling VPD can be activated. Upscaling
(oversampling, zooming), free of frequency folding, up to
factor 3.5 can be achieved, as required by some software
data slicing algorithms.
These raw samples are transported through the image
port as valid data and can be output as Y only format. The
lines are framed by SAV and EAV codes.
9.3.1ACQUISITION CONTROL AND TASK HANDLING
(SUBADDRESSES 80H, 90H, 91H, 94H TO 9FH
AND C4H TO CFH)
The acquisition control receives horizontal and vertical
synchronization signals from the decoder section or from
the X port. The acquisition window is generated via pixel
and line counters at the appropriate places in the data
path. Only qualified pixels and lines (lines with qualified
pixel) are counted from the X port.
The acquisition window parameters are as follows:
• Signal source selection: input video stream and formats
from the decoder, or from the X port (programming bits
SCSRC[1:0] 91H[5:4] and FSC[2:0] 91H[2:0])
Remark: The input of raw VBI data from the internal
decoder should be controlled via the decoder output
formatter and the LCR registers (see Section 9.2)
• Vertical offset: defined in lines of the video source,
parameter YO[11:0] 99H[3:0] 98H[7:0]
• Vertical length: defined in lines of the video source,
parameter YS[11:0] 9BH[3:0] 9AH[7:0]
• Vertical length: defined in number of target lines, as a
result of vertical scaling, parameter YD[11:0] 9FH[3:0]
9EH[7:0]
• Horizontal offset: defined in number of pixels of the
video source, parameter XO[11:0] 95H[3:0] 94H[7:0]
• Horizontal length: defined in number of pixels of the
video source, parameter XS[11:0] 97H[3:0] 96H[7:0]
• Horizontal destination size: defined in target pixels after
fine scaling, parameter XD[11:0] 9DH[3:0] 9CH[7:0].
9.3.1.1Input field processing
The trigger event for the field sequence detection from
external signals (X port) are defined in subaddress 92H.
The state of the scalers horizontal reference signal at the
time of the vertical reference edge is taken from the X port
asfield sequence identifier (FID).Forexample, if the falling
edge of the XRV input signal is the reference and the state
of XRH input is logic 0 at that time, the detected field ID is
logic 0.
The bits XFDV[92H[7]] and XFDH[92H[6]] define the
detection event and state of the flag from the X port. For
the default setting of XFDV and XFDH at ‘00’ is taken from
the state of the horizontal input at the falling edge of the
vertical input.
The scaler gets corresponding field ID information directly
from the SAA7108AE; SAA7109AE decoder path.
The FID flag is used to determine whether the first or
second field of a frame is going to be processed within the
scaler, and it is also used as trigger conditions for the task
handling (see bits STRC[1:0] 90H[1:0]).
According to ITU 656, FID at logic 0 means first field of a
frame. To ease the application, the polarities of the
detection results on the X port signals and the internal
decoder ID can be changed via XFDH.
As the V sync from the decoder path has a half line timing
(due to the interlaced video signal), but the scaler
processing only recognises full lines, during 1st fields from
the decoder the line count of the scaler can possibly shift
by one line, compared to the 2nd field. This can be
compensated for by switching the vertical trigger event, as
defined by XDV0, to the opposite V sync edge or by using
theverticalscalersphaseoffsets.Theverticaltimingofthe
decoder can be seen in Figs 30 and 31.
As the horizontal and vertical reference events inside the
ITU 656 data stream (from X port) and the real-time
reference signals from the decoder path are processed
differently, the trigger events for the input acquisition also
have to be programmed differently.
The source start offset XO(11:0) and YO(11:0) opens the
acquisition window, and the target size (XD11 to XD0,
YD11 to YD0) closes the window, however the window is
cut vertically if there are less output lines than required.
The trigger events for the pixel and line counts are the
horizontal and vertical reference edges as defined in
subaddress 92H.
The task handling is controlled by subaddress 90H;
see Section 9.3.1.2.
2004 Jun 2957
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
Table 22 Processing trigger and start
XDV1
92H[5]
0104/7 (50/60 Hz, 1st field), respectively 3/6 (50/60 Hz, 2nd field) (decoder count)
0002/5 (50/60 Hz, 1st field), respectively 2/5 (50/60 Hz, 2nd field) (decoder count)
000External ITU 656 stream: The processing starts earliest with SAV at line number 23
9.3.1.2Task handling
The task handler controls the switching between the two
programming register sets. It is controlled by
subaddresses 90H and C0H. A task is enabled via the
global control bits TEA[80H[4]] and TEB[80H[5]]. The
handler is then triggered by events which can be defined
for each register set.
In the event of a programming error the task handling and
the complete scaler can be reset to the initial states by the
software reset bit SWRST[88H[5]] being set to logic 0.
A software reset must be done after programming
especiallyiftheprogrammingregisters,relatedacquisition
window and scaler are reprogrammed while a task is
active.
The difference in the disabling/enabling of a task, which is
evaluatedat the end of a runningtask(whenSWRST is set
to logic 0) is that it sets the internal state machines directly
to their idle states.
The start condition for the handler is defined by bits
STRC[1:0]90H[1:0]andmeans: start immediately, wait for
next V sync, next FID at logic 0 or next FID at logic 1. The
FID is evaluated if the vertical and horizontal offsets are
reached.
XDV0
92H[4]
XDH
92H[2]
DESCRIPTION
Internal decoder: The processing triggers at the falling edge of the V123 pulse
(see Figs 30 (50 Hz) and 31 (60 Hz)), and starts earliest with the rising edge of the
decoder HREF at line number:
(50 Hz system), respectively line 20 (60 Hz system) (according ITU 656 count)
Remarks:
• To activate a task, the start condition must be
fulfilled and the acquisition window offsets must be
reached. For example, in case of ‘start immediately’,
and two regions are defined for one field, the offset of
thelower region must be greater than(offset + length)of
the upper region, if not, the actual counted H and V
position at the end of the upper task is beyond the
programmed offsets and the processing will ‘wait for
next V’.
• Basically,thetrigger conditions are checked when a
task is activated. It is important to know that they are
not checked while a task is inactive. So it is not possible
to trigger to the next logic 0 or logic 1 with overlapping
offset and active video ranges between the tasks (e.g.
task A STRC[2:0] = 2, YO[11:0] = 310 and task B
STRC[2:0] = 3, YO[11:0] = 310 results in an output field
rate of50⁄3Hz).
• After power-on or software reset
(via SWRST[88H[5]]) task B gets priority over
task A.
With RPTSK[90H[2]] at logic 1 the actual running task is
repeated (under the defined trigger conditions) before
handing control over to the alternate task.
To support field rate reduction, the handler is also enabled
to skip fields (bits FSKP[2:0] 90H[5:3]) before executing
thetask.ATOGGLEflag is generated (used for the correct
output field processing), which changes state at the
beginning of a task every time a task is activated;
examples are given in Section 9.3.1.3.
2004 Jun 2958
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
9.3.1.3Output field processing
As a reference for the output field processing, two signals
are available for the back-end hardware.
These signals are the input field ID from the scaler source
and a TOGGLE flag, which shows that an active task is
used an odd (1, 3, 5...) or even (2, 4, 6...) number of times.
Usingasingleorbothtasksand reducing the field or frame
rate with the task handling functionality, the TOGGLE
information can be used to reconstruct an interlaced
scaled picture at a reduced frame rate. The TOGGLE flag
is not synchronized to the input field detection, as it is only
dependent on the interpretation of this information by the
external hardware i.e. whether the output of the scaler is
processed correctly; see Section 9.3.3.
When OFIDC = 0, the scalers input field ID is available as
output field ID on bit 6 of SAV and EAV, and respectively
on pin IGP0 (IGP1), if the FID output is selected.
When OFIDC[90H[6]] = 1, the TOGGLE information is
available as output field ID on bit 6 of SAV and EAV, and
respectively on pin IGP0 (IGP1) if the FID output is
selected.
Additionally bit 7 of SAV and EAV can be defined via
CONLH[90H[7]]. When CONLH[90H[7]] = 0 (default) it
sets bit 7 to logic 1; a logic 1 inverts the SAV/EAV bit 7.
So it is possible to mark the output of both tasks by
different SAV/EAV codes. This bit can also be seen as
‘task flag’ on pins IGP0 (IGP1), if the TASK output is
selected.
2004 Jun 2959
This text is here in white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader.This text is here in
_white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader.This text is here inThis text is here in
white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader. white to force landscape pages to be ...
Processed by taskAAABABABBABBABBABBA
State of detected
0100101010101 0 10 1 01
ITU 656 FID
TOGGLE flag10111001011000
Bit 6 of SAV/EAV byte01001011011000
Required sequence
conversion at the vertical
(8)
scaler
(9)
Output
UP
LO
UP
UP
LO
UP
LO
UP
LO
UP
LO
UP
LO
↓
↓
↓
↓
↓
↓
↓
↓
↓
↓
↓
↓
↓
UP
LO
UP
UP
LO
UP
LO
LO
UP
LO
LO
UP
UP
OOOOOOOOOOOOONOOONOOO
(7)
(7)
UP
↓
UP
111
111
LO
UP
↓
LO
LO
(7)
(7)
LO
↓
↓
LO
Notes
1. Single task every field; OFIDC = 0; subaddress 90H at 40H; TEB[80H[5]] = 0.
2. Tasks are used to scale to different output windows, priority on task B after SWRST.
3. Both tasks at1⁄2frame rate; OFIDC = 0; subaddresses 90H at 43H and C0H at 42H.
4. In examples 3 and 4 the association between input FID and tasks can be flipped, dependent on which time the SWRST is de-asserted.
5. Task B at2⁄3frame rate constructed from neighbouring motion phases; task A at1⁄3frame rate of equidistant motion phases; OFIDC = 1;
subaddresses 90H at 41H and C0H at 45H.
6. Task A and B at1⁄3frame rate of equidistant motion phases; OFIDC = 1; subaddresses 90H at 41H and C0H at 49H.
7. State of prior field.
8. It is assumed that input/output FID = 0 (upper lines); UP = upper lines; LO = lower lines.
9. O = data output; NO = no output.
00
00
UP
LO
↓
↓
UP
UP
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
9.3.2HORIZONTAL SCALING
The overall horizontal scaling factor has to be split into a
binary and a rational value according to the following
equation:
H scale ratio
H scale ratio
--------------------------- XPSC[5:0]
=
1
output pixel
-----------------------------input pixel
1024
×=
------------------------------XSCY[12:0]
where,the parameter of the prescaler XPSC[5:0] = 1 to 63
and the parameter of VPD phase interpolation
XSCY[12:0] = 300 to 8191 (0 to 299 are only theoretical
values). For example,1⁄
is split into1⁄4× 1.14286. The
3.5
binary factor is processed by the prescaler, the arbitrary
non-integer ratio is achieved via the variable phase delay
VPD circuitry, called horizontal fine scaling. The latter
calculates horizontally interpolated new samples with a
6-bit phase accuracy, which relates to less than 1 ns jitter
for regular sampling schemes. Together the prescaler and
fine scaler form the horizontal scaler of the SAA7108AE;
SAA7109AE.
Using the accumulation length function of the prescaler
(XACL[5:0] A1H[5:0]), application and destination
dependent (e.g. scale for display or for a compression
machine), a compromise between visible bandwidth and
alias suppression can be found.
• The bit XC2_1[A2H[3]], which defines the weighting of
the incoming pixels during the averaging process
Theprescaler creates a prescaledependent FIR low-pass,
with up to 64 + 7 filter taps. The parameter XACL[5:0] can
be used to vary the low-pass characteristic for a given
integer prescale of1⁄
XPSC[5:0]
. The user can therewith
decide between signal bandwidth (sharpness impression)
and alias.
The equation for the XPSC[5:0] calculation is:
XPSC[5:0]lower integer of
=
Npix_in
----------------------Npix_out
Where:
the range is 1 to 63 (value 0 is not allowed);
Npix_in = number of input pixel, and
Npix_out = number of desired output pixel over the
complete horizontal scaler.
The use of the prescaler results in a XACL[5:0] and
XC2_1 dependent gain amplification. The amplification
can be calculated according to the equation:
DC gain = [(XACL[5:0] − XC2_1) + 1] × (XC2_1 + 1)
9.3.2.1Horizontal prescaler (subaddresses
A0H to A7H and D0H to D7H)
The prescaling function consists of an FIR anti-alias filter
stage and an integer prescaler, which together form an
adaptiveprescaledependent low-pass filter to balance the
sharpness and aliasing effects.
The FIR pre-filter stage implements different low-pass
characteristics to reduce the anti-alias for downscales in
the range of 1 to1⁄2. A CIF optimized filter is built-in, which
reduces artefacts for CIF output formats (to be used in
combination with the prescaler set to1⁄2scale); see
Table 24.
The function of the prescaler is defined by:
• An integer prescaling ratio XPSC[5:0] A0H[5:0] (equals
1 to 63), which covers the integer downscale range
1to1⁄
63
• An averaging sequence length XACL[5:0] A1H[5:0]
(equals 0 to 63); range 1 to 64
• A DC gain renormalization XDCG[2:0] A2H[2:0];
1 down to1⁄
128
)
It is recommended to use sequence lengths and weights,
N
which results in a 2
DC gain amplification, as these
amplitudes can be renormalized by the XDCG[2:0]
controlled shifter of the prescaler.
The renormalization range of XDCG[2:0] is 1,
to1⁄
128
1
------
N
2
1
⁄2... down
.
Other amplifications have to be normalized by using the
following BCS control circuitry. In these cases the
prescaler has to be set to an overall gain ≤1, e.g. for an
accumulation sequence of ‘1 + 1 + 1’ (XACL[5:0] = 2 and
XC2_1 = 0), XDCG[2:0] must be set to ‘010’, which
equals1⁄4 and the BCS has to amplify the signal to4⁄
3
(SATN[7:0] and CONT[7:0] value = lower integer of
4
⁄3× 64).
The use of XACL[5:0] is XPSC[5:0] dependent.
XACL[5:0] must be <2 × XPSC[5:0].
XACL[5:0] can be used to find a compromise between
bandwidth (sharpness) and alias effects.
2004 Jun 2961
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
Remark: Due to bandwidth considerations XPSC[5:0] and
XACL[5:0] can be chosen differently to the previously
mentioned equations or Table 25, as the horizontal phase
scaling is able to scale in the range from zooming up by
factor 3 to downscaling by a factor of
1024
⁄
8191
.
Figs 35 and 36 show some frequency characteristics of
the prescaler.
Table 25 shows the recommended prescaler
programming.Otherprogramming, than given in Table 25,
may result in better alias suppression, but the resulting
DC gain amplification needs to be compensated by the
BCS control, according to the equation:
For example, if XACL[5:0] = 5, XC2_1 = 1, then
DC gain = 10 and the required XDCG[2:0] = 4.
The horizontal source acquisition timing and the
prescaling ratio is identical for both the luminance and
chrominance path, but the FIR filter settings can be
defined differently in the two channels.
Fade-in and fade-out of the filters is achieved by copying
an original source sample each as first and last pixel after
prescaling.
Figs 33 and 34 show the frequency characteristics of the
selectable FIR filters.
9.3.2.2Horizontal fine scaling (variable phase delay
filter; subaddresses A8H to AFH and
D8H to DFH)
Thehorizontal fine scaling (VPD) shouldoperateat scaling
ratios between1⁄2and 2 (0.8 and 1.6), but can also be
used for direct scaling in the range from1⁄
(theoretical) zoom 3.5 (restriction due to the internal data
path architecture), without prescaler.
In combination with the prescaler a compromise between
sharpness impression and alias can be found, which is
signal source and application dependent.
For the luminance channel a filter structure with 10 taps is
implemented, for the chrominance a filter with 4 taps.
Luminance and chrominance scale increments
(XSCY[12:0]A9H[4:0] A8H[7:0] and XSCC[12:0] ADH[4:0]
ACH[7:0]) are defined independently, but must be set in a
2 : 1 relationship in the actual data path implementation.
The phase offsets XPHY[7:0] AAH[7:0] and XPHC[7:0]
AEH[7:0] can be used to shift the sample phases slightly.
XPHY[7:0] and XPHC[7:0] covers the phase offset range
7.999T to1⁄32T. The phase offsets should also be
programmed in a 2 : 1 ratio.
The underlying phase controlling DTO has a 13-bit
resolution.
According to the equations
Npix_in
XSCY[12:0]1024
XSCC[12:0]
The VPD covers the scale range from 0.125 to zoom 3.5.
The VPD acts equivalent to a polyphase filter with 64
possible phases. In combination with the prescaler, it is
possible to get high accurate samples from a highly
anti-aliased integer downscaled input picture.
=
×
--------------------------- XPSC[5:0]
XSCY[12:0]
------------------------------2
×=
----------------------Npix_out
1
7.999
to
and
9.3.3.1Line FIFO buffer (subaddresses 91H, B4H and
C1H, E4H)
The line FIFO buffer is a dual ported RAM structure for
768 pixels, with asynchronous write and read access. The
line buffer can be used for various functions, but not all
functions may be available simultaneously.
Theline buffer can bufferacomplete unscaled active video
line or more than one shorter lines (only for non-mirror
mode), for selective repetition for vertical zoom-up.
For zooming up from 240 lines to 288 lines e.g., every
fourth line is requested (read) twice from the vertical
scaling circuitry for calculation.
For conversion of a 4 : 2 : 0 or 4:1:0 input sampling
scheme (MPEG, video phone, Indeo YUV-9) to ITU like
sampling scheme 4:2:2, the chrominance line buffer is
read twice or four times, before being refilled again by the
source. By means of the input acquisition window
definition it has to be preserved, that the processing starts
with a line containing luminance and chrominance
information for 4:2:0 and 4:1:0 input. The bits
FSC[2:1] 91H[2:1] define the distance between the Y/C
lines. In case of 4 :2:2 and 4 : 1 : 1 FSC2 and FSC1
have to be set to ‘00’.
The line buffer can also be used for mirroring, i.e. for
flippingtheimage left to right, for the vanity picture in video
phone application (bit YMIR[B4H[4]]). In mirror mode only
one active prescaled line can be held in the FIFO at a time.
The line buffer can be utilized as excessive pipeline buffer
for discontinuous and variable rate transfer conditions at
the expansion port or image port.
9.3.3.2Vertical scaler (subaddresses B0H to BFH and
E0H to EFH)
Vertical scaling of any ratio from 64 (theoretical zoom)
to1⁄63 (icon) can be applied.
9.3.3VERTICAL SCALING
The vertical scaler of the SAA7108AE; SAA7109AE
decoder part consists of a line FIFO buffer for line
repetition and the vertical scaler block, which implements
the vertical scaling on the input data stream in 2 different
operational modes from theoretical zoom by 64 down to
icon size1⁄64. The vertical scaler is located between the
BCS and horizontal fine scaler, so that the BCS can be
used to compensate for the DC gain amplification of the
ACM mode (see Section 9.3.3.2) as the internal RAMs are
only 8-bit wide.
2004 Jun 2966
The vertical scaling block consists of another line delay,
and the vertical filter structure, that can operate in two
different modes. These are the Linear Phase Interpolation
(LPI) and Accumulation (ACM) modes, controlled by
YMODE[B4H[0]].
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
• LPI mode: In the linear phase interpolation mode
(YMODE = 0)two neighbouring linesofthe source video
stream are added together, but weighted by factors
corresponding to the vertical position (phase) of the
target output line relative to the source lines. This linear
interpolation has a 6-bit phase resolution, which equals
64 intra line phases. It interpolates between two
consecutive input lines only. The LPI mode should be
applied for scaling ratios around 1 (down to1⁄2), it mustbe applied for vertical zooming.
• ACM mode: The vertical Accumulation (ACM) mode
(YMODE = 1) represents a vertical averaging window
over multiple lines, sliding over the field. This mode also
generates phase correct output lines. The averaging
windowlengthcorrespondsto the scaling ratio, resulting
in an adaptive vertical low-pass effect, to greatly reduce
aliasing artefacts. ACM can be applied for downscales
only from ratio 1 down to1⁄64. ACM results in a scale
dependent DC gain amplification, which has to be
precorrected by the BCS control of the scaler part.
The phase and scale controlling DTO calculates in 16-bit
resolution, controlled by parameters YSCY[15:0] B1H[7:0]
B0H[7:0]and YSCC[15:0]B3H[7:0] B2H[7:0], continuously
over the entire filed. A start offset can be applied to the
phase processing by means of the parameters
YPY3[7:0] to YPY0[7:0] in BFH[7:0] to BCH[7:0] and
YPC3[7:0] to YPC0[7:0]inBBH[7:0] to B8H[7:0]. The start
phase covers the range of
By programming appropriate, opposite, vertical start
phase values (subaddresses B8H to BFH and
E8H to EFH)depending on odd/even field ID of the source
videostream and A/B page cycle, frameIDconversionand
field rate conversion are supported (i.e. de-interlacing,
re-interlacing).
Figs 37 and 38 and Tables 26 and 27 describe the use of
the offsets.
Remark: The vertical start phase, as well as the
scaling ratio are defined independently for luminance
and chrominance channels, but must be set to the
same values in the actual implementation for accurate
4:2:2 output processing.
The vertical processing communicates on its input side
with the line FIFO buffer. The scale related equations are:
• Scaling increment calculation for ACM and LPI mode,
downscale and zoom: YSCY[15:0] and YSCC[15:0]
lower integer of=1024
255
⁄32to1⁄32 lines offset.
Nline_in
×
------------------------Nline_out
• BCS value to compensate DC gain in ACM mode
(contrast and saturation have to be set): CONT[7:0]
A5H[7:0] respectively SATN[7:0] A6H[7:0]
Nline_out
lower integer of
=
lower integer of
=
-------------------------
Nline_in
1024
-------------------------------
YSCY[15:0]
, or
64×
64×
9.3.3.3Use of the vertical phase offsets
As shown in Section 9.3.1.3, the scaler processing may
run randomly over the interlaced input sequence.
Additionally the interpretation and timing between ITU 656
field ID and real-time detection by means of the state of
H sync at the falling edge of V sync may result in different
field ID interpretation.
A vertically scaled interlaced output also gets a larger
vertical sampling phase error, if the interlaced input fields
are processed, without regard to the actual scale at the
starting point of operation (see Fig.37).
The four events to be considered are illustrated in Fig.38.
In Tables 26 and 27 PHO is a usable common phase
offset.
It should be noted that the equations in Fig.38 also
produce an interpolated output for the unscaled case, as
the geometrical reference position for all conversions is
the position of the first line of the lower field; see Table 26.
If there is no need for UP-LO and LO-UP conversion and
the input field ID is the reference for the back-end
operation, then it is UP-LO = UP-UP and LO-UP = LO-LO
and the1⁄2line phase shift (PHO + 16) that can be
skipped; this case is given in Table 27.
The SAA7108AE; SAA7109AE supports 4 phase offset
registers per task and component (luminance and
chrominance). The value of 20H represents a phase shift
of one line.
The registers are assigned to the following events;
e.g. subaddresses B8H to BBH:
• B8H: 00 = input field ID 0, task status bit 0 (toggle
status, see Section 9.3.1.3)
• B9H: 01 = input field ID 0, task status bit 1
• BAH: 10 = input field ID 1, task status bit 0
• BBH: 11 = input field ID 1, task status bit 1.
2004 Jun 2967
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
Depending on the input signal (interlaced or non-interlaced) and the task processing (50 Hz or field reduced processing
with one or two tasks, see examples in Section 9.3.1.3), other combinations may also be possible, but the basic
equations are the same.
unscaled input
field 1field 2field 1field 2field 1field 2
scale dependent start offset
scaled output,
no phase offset
mismatched vertical line distances
scaled output,
with phase offset
correct scale dependent position
Fig.37 Basic problem of interlaced vertical scaling (example: downscale3⁄5).
MHB547
2004 Jun 2968
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
handbook, full pagewidth
Offset
A
B
1024
------------ 32
1
input line shift 16==
-- 2
1
input line shift
-- 2
field 1field 2
upper
B
A
321 line shift===
1
scale increment+
-- 2
lower
YSCY[15:0]
------------------------------ -
16+==
64
field 1field 2
case UP-UP
C
C
D = no offset = 0
case LO-LO
D
1
scale increment
==
-- 2
field 1field 2
case UP-LO
YSCY[15:0]
------------------------------ 64
case LO-UP
MHB548
Fig.38 Derivation of the phase related equations (example: interlace vertical scaling down to3⁄5, with field
conversion).
Table 26 Examples for vertical phase offset usage: global equations
Table 27 Vertical phase offset usage; assignment of the phase offsets
DETECTED INPUT
FIELD ID
TASK STATUS BIT
0 = upper lines0YPY0[7:0] and
0 = upper lines1YPY1[7:0] and
VERTICAL PHASE
OFFSET
YPC0[7:0]
YPC1[7:0]
CASEEQUATION TO BE USED
(1)
case 1
case 2
case 3
UP-UP (PHO)
(2)
UP-UP
(3)
UP-LO
case 1UP-UP (PHO)
case 2UP-LO
case 3UP-UP
1 = lower lines0YPY2[7:0] and
YPC2[7:0]
case 1
LO-LO
PHO
YSCY[15:0]
------------------------------64
16–+
case 2LO-UP
case 3LO-LO
1 = lower lines1YPY3[7:0] and
YPC3[7:0]
case 1
LO-LO
PHO
YSCY[15:0]
------------------------------64
16–+
case 2LO-LO
case 3LO-UP
Notes
1. Case 1: OFIDC[90H[6]] = 0; scaler input field ID as output ID; back-end interprets output field ID at logic 0 as upper
output lines.
2. Case 2: OFIDC[90H[6]] = 1; task status bit as output ID; back-end interprets output field ID at logic 0 as upper output
lines.
3. Case 3: OFIDC[90H[6]] = 1; task status bit as output ID; back-end interprets output field ID at logic 1 as upper output
lines.
9.4VBI data decoder and capture
(subaddresses 40H to 7FH)
The SAA7108AE; SAA7109AE contains a versatile VBI
data decoder.
The implementation and programming model accords to
the VBI data slicer the built-in multimedia video data
acquisition circuit of the SAA5284.
The circuitry recovers the actual clock phase during the
clock run-in period, slices the data bits with the selected
data rate, and groups them into bytes. The result is
buffered into a dedicated VBI data FIFO with a capacity of
2 × 56 bytes (2 × 14 Dwords). The clock frequency, signal
source, field frequency and accepted error count must be
defined in subaddress 40H.
The VBI data standards that are supported are given in
Table 28.
2004 Jun 2970
For lines 2 to 24 of a field, per VBI line, 1 of 16 standards
can be selected (LCRxxx[41:57[7:0]]: 23 × 2 × 4-bit
programming bits). The definition for line 24 is valid for the
restofthe corresponding field, normally no text data (video
data) should be selected there (LCR24 = FFH) to stop the
activity of the VBI data slicer during active video.
To adjust the slicers processing to the input signal source,
there are offsets in the horizontal and vertical direction
available (parameters HOFF[5B,59[2:0,7:0]],
VOFF[5B,5A[4,7:0]] and FOFF[5B[7]]).
In difference to the scalers counting, the slicers offsets
define the position of the horizontal and vertical trigger
events related to the processed video field. The trigger
events are the falling edge of HREF and the falling edge of
V123 from the decoder processing part.
The relationship of these programming values to the input
signal and the recommended values can be seen in
Tables 18 to 21.
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
Table 28 Data types supported by the data slicer block
DATA TYPE
NUMBER
0000teletext EuroWST, CCST6.937527HWST625always
0001European Closed Caption0.500001CC625
0010VPS59951HVPS
0011wide screen signalling bits51E3C1FHWSS
0100US teletext (WST)5.727227HWST525always
0101US Closed Caption (line 21)0.503001CC525
0110(video data selected)5nonedisable
0111(raw data selected)5nonedisable
1000teletext6.9375programmablegeneral textoptional
1001VITC/EBU time codes (Europe)1.8125programmableVITC625
1010VITC/SMPTE time codes (USA)1.7898programmableVITC525
10115programmableopen
1100US NABTS5.7272programmableNABTSoptional
1101MOJI (Japanese)5.7272programmable (A7H) Japtext
1110Japanese format switch (L20/22) 5programmableopen
1111no sliced data transmitted
STANDARD TYPE
(video data selected)
DATA RATE
(Mbits/s)
5nonedisable
FRAMING CODE
FC
WINDOW
HAM
CHECK
9.5Image port output formatter
(subaddresses 84H to 87H)
The output interface consists of a FIFO for video and for
sliced text data, an arbitration circuit, which controls the
mixed transfer of video and sliced text data over the I port,
and a decoding and multiplexing unit, which generates the
8 or 16-bit wide output data stream together with the
accompanying reference and help information.
The clock for the output interface can be derived from an
internal clock, decoder, expansion port or an externally
provided clock which is appropriate, for example, for the
VGA and frame buffer. The clock can be up to 33 MHz.
The scaler provides the following video related timing
reference events (signals), which are available on pins as
defined by subaddresses 84H and 85H:
• Output field ID
• Start and end of vertical active video range
• Start and end of active video line
• Data qualifier or gated clock
• Actually activated programming page (if CONLH is
The disconnected data stream at the scaler output is
accompanied by a data valid flag (or data qualifier), or is
transported via a gated clock. Clock cycles with invalid
dataon the I port data bus (includingtheHPDpins in 16-bit
output mode) are marked with code 00H.
The output interface also arbitrates the transfer between
scaled video data and sliced text data over the I port
output.
The bits VITX1 and VITX0 (subaddress 86H) are used to
control the arbitration.
The serialization of the internal 32-bit Dwords to 8-bit or
16-bit output (optional), as well as the insertion of the
extendedITU 656 codes (SAV/EAV for video data, ANCor
SAV/EAV codes for sliced text data) are also done here.
Forhandshaking with the VGA controller, or other memory
or bus interface circuitry, programmable FIFO flags are
provided; see Section 9.5.2.
2004 Jun 2971
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
9.5.1SCALER OUTPUT FORMATTER
(SUBADDRESSES 93H AND C3H)
The output formatter organizes the packing into the output
FIFO. The following formats are available:
Y-CB-CR4:2:2, Y-CB-CR4:1:1, Y-CB-CR4:2:0,
Y-CB-CR4:1:0, Yonly (e.g. for raw samples). The
formatting is controlled by FSI[2:0] 93H[2:0], FOI[1:0]
93H[4:3] and FYSK[93H[5]].
The data formats are defined on Dwords, or multiples
thereof, and are similar to the video formats as
recommended for PCI multimedia applications (see
SAA7146A). Planar formats are not supported.
CBnC
YnY (luminance) component, pixel number n = 0, 1, 2, 3 to 719
CRnC
(B − Y) colour difference component, pixel number n = 0, 2, 4 to 718
B
(R − Y) colour difference component, pixel number n= 0, 2, 4 to 718
R
FSI[2:0] defines the horizontal packing of the data,
FOI[1:0] defines how many Y only lines are expected
before a Y/C line will be formatted. If FYSK is set to logic 0
preceding Y only lines will be skipped, and the output will
always start with a Y/C line.
Additionallytheoutputformatter limits the amplitude range
of the video data (controlled by ILLV[85H[5]]); see
Table 31.
Table 31 Limiting range on I port
LIMIT STEP
ILLV[85H[5]]
01 to 25401 to FE00FF
18 to 24708 to F700 to 07F8 to FF
2004 Jun 2972
DECIMAL VALUEHEXADECIMAL VALUELOWER RANGEUPPER RANGE
VALID RANGESUPPRESSED CODES (HEXADECIMAL VALUE)
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
9.5.2VIDEO FIFO (SUBADDRESS 86H)
The video FIFO at the scaler output contains 32 Dwords.
That corresponds to 64 pixels in 16-bit Y-CB-CR4:2:2
format.Butastheentirescalercan act as a pipeline buffer,
the actually available buffer capacity for the image port is
much higher, and can exceed beyond a video line.
The image port and the video FIFO, can operate with the
video source clock (synchronous mode) or with an
externallyprovided clock (asynchronous,and burst mode),
as appropriate for the VGA controller or attached frame
buffer.
The video FIFO provides 4 internal flags, which report to
what extent the FIFO is actually filled. These are:
• The FIFO Almost Empty (FAE) flag
• TheFIFOCombined(FC)flag or FIFO filled, which is set
at almost full level and reset, with hysteresis, only after
the level crosses below the almost empty mark
• The FIFO Almost Full (FAF) flag
• The FIFO Overflow (FOVL) flag.
The trigger levels for FAE and FAF are programmable by
FFL[1:0] 86H[3:2] (16, 24, 28, full) and FEL[1:0] 86H[1:0]
(16, 8, 4, empty).
The state of this flag can be seen on pins IGP0 or IGP1.
The pin mapping is defined by subaddresses 84H
and 85H; see Section 10.5.
9.5.3TEXT FIFO
The data of the terminal VBI data slicer is collected in the
text FIFO before transmission over the I port is requested
(normally before the video window starts) and partitioned
intotwoFIFOsections.Acompleteline is fed into the FIFO
before a data transfer is requested. So normally, one line
of text data is ready for transfer while the next text line is
collected. Thus sliced text data is delivered as a block of
qualified data, without any qualification gaps in the byte
stream of the I port.
The decoded VBI data is collected in the dedicated VBI
data FIFO. Once the capture of a line is completed, the
FIFO can be streamed through the image port, preceded
by a header, giving the line number and standard.
The VBI data period can be signalled via the sliced data
flag on pin IGP0 or IGP1. The decoded VBI data is lead by
the ITU ancillary data header (DID[5:0] 5DH[5:0] at value
<3EH)orby SAV/EAV codes selected by DID[5:0] at value
3EH or 3FH. IGP0 or IGP1 is set if the first byte of the ANC
header is valid on the I port bus; it is reset if an SAV
occurs. Therefore it may frame multiple lines of text data
output, in case the video processing starts with a distance
of several video lines to the region of text data. Valid sliced
data from the text FIFO is available on the I port as long as
the IGP0 or IGP1 flag is set and the data qualifier is active
on pin IDQ.
The decoded VBI data is presented in two different data
formats, controlled by bit RECODE.
RECODE = 1: values 00H and FFH will be recoded to
even parity values 03H and FCH
RECODE = 0: values 00H and FFH may occur in the
data stream as detected.
9.5.4VIDEO AND TEXT ARBITRATION (SUBADDRESS 86H)
Slicedtext data and scaled video data are transferred over
the same bus, the I port. The mixed transfer is controlled
by an arbitration circuit. If the video data is transferred
without any interrupt and the video FIFO does not need to
buffer any output pixel, the text data is inserted after the
end of a scaled video line, normally during the video
blanking interval.
2004 Jun 2973
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
9.5.5DATA STREAM CODING AND REFERENCE SIGNAL
GENERATION (SUBADDRESSES 84H, 85H AND 93H)
As horizontal and vertical reference signals are logic 1,
activegate signals are generated, whichframethe transfer
of the valid output data. Alternatively, the horizontal and
vertical trigger pulses can be generated on the rising
edges of the gates.
Dueto the dynamic FIFO behaviour of the complete scaler
path, the output signal timing has no fixed timing
relationship to the real-time input video stream. Thus fixed
propagation delays, in terms of clock cycles, related to the
analog input can not be defined.
The data stream is accompanied by a data qualifier.
Additionally invalid data cycles are marked with code 00H.
Table 32 SAV/EAV codes on the I port
SAV/EAV CODES ON I PORT
EVENT DESCRIPTION
(2)
OF SAV/EAV BYTE = 0 MSB
FIELD ID = 0FIELD ID = 1FIELD ID = 0FIELD ID = 1
Nextpixel is FIRST pixel of any
0E4980C7HREF = active;
active line
Previous pixel was LAST pixel
13549DDAHREF= inactive;
of any active line, but not the
last
Nextpixel is FIRST pixel of any
2562ABECHREF = active;
V-blanking line
Previous pixel was LAST pixel
387FB6F1HREF = inactive;
of the last active line or of any
V-blanking line
No valid data, do not capture
and do not increment pointer
If ITU 656 like codes are not required, they can be
suppressed in the output stream.
As a further option, it is possible to provide the scaler with
an external gating signal on pin ITRDY. It is therefore
possible to hold the data output for a certain time and to
get valid output data in bursts of a guaranteed length.
The sketched reference signals and events can be
mapped to the I port output pins IDQ, IGPH, IGPV, IGP0
and IGP1. The polarities of all the outputs can be modified
to enable flexible use. The default polarity for the qualifier
and reference signals is logic 1 (active).
Table 32 shows the relevant and supported SAV and EAV
coding.
(1)
(HEX)
(2)
OF SAV/EAV BYTE = 1
COMMENTMSB
VREF = active
VREF = active
VREF = inactive
VREF = inactive
00IDQ pin inactive
Notes
1. The leading byte sequence is: FFH-00H-00H.
2. The MSB of the SAV/EAV code byte is controlled by:
a) Scaler output data: task A ⇒ MSB = CONLH[90H[7]]; task B ⇒ MSB = CONLH[C0H[7]].
b) VBI data slicer output data: DID[5:0] 5DH[5:0] = 3EH ⇒ MSB = 1; DID[5:0] 5DH[5:0] = 3FH ⇒ MSB = 0.
2004 Jun 2974
This text is here in white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader.This text is here in
_white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader.This text is here inThis text is here in
white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader. white to force landscape pages to be ...
2004 Jun 2975
invalid data
or
end of raw VBI line
0000FF0000 SAV SDID DC IDI1 IDI2 D
...
FF0000 EAV
ANC header active for DID (subaddress 5DH) <3EH
timing reference code
ANC headerinternal headersliced data
00FFFFDID SDID DC IDI1 IDI2 D
sliced datainvalid dataand filling data
1_3D1_4D2_1
D
D
1_2
1_1
1_3D1_4
D
DC_3DDC_4
D
DC_3DDC_4
CS BC0000...
CS BCFF0000 EAV 0000......
ANC data output is only filled up
to the Dword boundary
timing reference codeinternal header
...
Fig.39 Sliced data formats on the I port in 8-bit mode.
Table 33 Explanation to Fig.39
NAMEEXPLANATION
SAVstart of active data; see Table 34
(1)
SDIDsliced data identification: NEP
(2)
, EP
, SDID5 to SDID0, freely programmable via I2C-bus subaddress 5EH, bits 5 to 0, e. g. to be used as
source identifier
(1)
DCDword count: NEP
(2)
, EP
, DC5 to DC0. DC describes the number of succeeding 32-bit words:
• For SAV/EAV mode DC is fixed to 11 Dwords (byte value 4BH)
• For ANC mode it is: DC =1⁄4(C + n), where C = 2 (the two data identification bytes IDI1 and IDI2) and n = number of decoded bytes
according to the chosen text standard.
Note that the number of valid bytes inside the stream can be seen in the BC byte.
IDI1internal data identification 1: OP
IDI2internal data identification 2: OP
D
D
Dword number n, byte number m
n_m
last Dword byte 4, note: for SAV/EAV framing DC is fixed to 0BH, missing data bytes are filled up; the fill value is A0H
DC_4
CSthe check sum byte, the check sum is accumulated from the SAV (respectively DID) byte to the D
DT0
CScheck sum byteCS6CS6CS5CS4CS3CS2CS1CS0
BCvalid byte countOP0CNT5CNT4CNT3CNT2CNT1CNT0
Notes
1. NEP = inverted EP (see note 2).
2. EP = Even Parity of bits 5 to 0.
3. FID = 0: field 1; FID = 1: field 2.
4. I1 = 0 and I0 = 0: before line 1; I1 = 0 and I0 = 1: lines 1 to 23; I1 = 1 and I0 = 0: after line 23; I1 = 1 and I0 = 1:
line 24 to end of field.
5. Subaddress 5DH at 3EH and 3FH are used for ITU 656 like SAV/EAV header generation; recommended value.
6. V = 0: active video; V = 1: blanking.
7. H = 0: start of line; H = 1: end of line.
8. DC = Data Count in Dwords according to the data type.
9. OP = Odd Parity of bits 6 to 0.
10. LN = Line Number.
11. DT = Data Type according to table.
(4)
(10)
(11)
2004 Jun 2976
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
9.6Audio clock generation
(subaddresses 30H to 3FH)
The SAA7108AE; SAA7109AE incorporates the
generation of a field-locked audio clock, as an auxiliary
function for video capture. An audio sample clock, that is
locked to the field frequency, ensures that there is always
the same predefined number of audio samples associated
with a field, or a set of fields. This ensures synchronous
playback of audio and video after digital recording (e.g.
capture to hard disk), MPEG or other compression or
non-linear editing.
9.6.1MASTER AUDIO CLOCK
The audio clock is synthesized from the same crystal
frequency as the line-locked video clock is generated. The
master audio clock is defined by the parameters:
Table 35 Programming examples for audio master clock generation
• Audio master Clocks Per Field, ACPF[17:0] 32H[1:0]
31H[7:0] 30H[7:0] according to the equation:
ACPF[17:0]round
• Audio master Clocks Nominal Increment, ACNI[21:0]
36H[5:0] 35H[7:0] 34H[7:0] according to the equation:
ACNI[21:0]round
See Table 35 for examples.
Remark: For standard applications the synthesized audio
clock AMCLK can be used directly as master clock and as
input clock for port AMXCLK (short cut) to generate
ASCLK and ALRCLK. For high-end applications it is
recommended to use an external analog PLL circuit to
enhance the performance of the generated audio clock.
audio frequency
=
=
------------------------------------------
field frequency
audio frequency
---------------------------------------------
crystal frequency
23
×
2
2004 Jun 2977
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
9.6.2SIGNALS ASCLK AND ALRCLK
Two binary divided signals ASCLK and ALRCLK are provided for slower serial digital audio signal transmission and for
channel-select. The frequencies of these signals are defined by the parameters:
0: invert ASCLK, ALRCLK edges triggered by falling edge of ASCLK
1: do not invert ASCLK, ALRCLK edges triggered by rising edge of ASCLK
SCPH[3AH[0]]ASCLK Phase:
0: invert AMXCLK, ASCLK edges triggered by falling edge of AMXCLK
1: do not invert AMXCLK, ASCLK edges triggered by rising edge of AMXCLK
2004 Jun 2978
DESCRIPTION
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
10 INPUT/OUTPUT INTERFACES AND PORTS OF
DIGITAL VIDEO DECODER PART
The SAA7108AE; SAA7109AE has 5 different I/O
interfaces. These are:
• Analog video input interface, for analog CVBS and/or
Y and C input signals
• Audio clock port
• Digital real-time signal port (RT port)
• Digitalvideoexpansion port (X port), for unscaled digital
video input and output
• Digital image port (I port) for scaled video data output
and programming
• Digital host port (H port) for extension of the image port
or expansion port from 8 to 16-bit.
Table 38 Analog pin description
SYMBOLPINI/ODESCRIPTIONBIT
AI24 to AI21P6, P7, P9
and P10
AI12 and AI11P11 and P13
AOUTM10Oanalog video output, for test purposesAOSL1 and AOSL0
AI1D and AI2D P12 and P8Ianalog reference pins for differential ADC operation−
Ianalog video signal inputs, e.g. 2 CVBS signals and
two Y/C pairs can be connected simultaneously
10.1Analog terminals
The SAA7108AE; SAA7109AE has 6 analog inputs
AI21 to AI24, AI11 and AI12 (see Table 38) for composite
videoCVBS or S-video Y/C signalpairs.Additionally, there
are two differential reference inputs, which must be
connected to ground via a capacitor equivalent to the
decoupling capacitors at the 6 inputs. There are no
peripheral components required other than the decoupling
capacitors and 18 Ω/56 Ω termination resistors, one set
per connected input signal (see also application example
in Fig.53). Two anti-alias filters are integrated, and self
adjusting via the clock frequency.
Clamp and gain control for the two ADCs are also
integrated. An analog video output pin (AOUT) is provided
for testing purposes.
MODE3 to MODE0
10.2Audio clock signals
The SAA7108AE; SAA7109AE also synchronizes the audio clock and sampling rate to the video frame rate, via a very
slow PLL. This ensures that the multimedia capture and compression processes always gather the same predefined
number of samples per video frame.
An audio master clock AMCLK and two divided clocks, ASCLK and ALRCLK, are generated; see Table 39.
AMXCLK J12Iexternal audio master clock input for the clock
division circuit, can be directly connected to
output AMCLK for standard applications
ASCLKK14Oserial audio clock output, can be synchronized to
rising or falling edge of AMXCLK
ALRCLKJ13Oaudio channel (left/right) clock output, can be
synchronized to rising or falling edge of ASCLK
−
SDIV[5:0] 38H[5:0] and SCPH[3AH[0]]
LRDIV[5:0] 39H[5:0] and LRPH[3AH[1]]
2004 Jun 2979
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
10.3Clock and real-time synchronization signals
A crystal accurate frequency reference is required for the
generation of the line-locked video (pixel) clock LLC, and
the frame-locked audio serial bit clock. An oscillator is
built-in, for fundamental or 3rd-harmonic crystals. The
supported crystal frequencies are 32.11 or 24.576 MHz
(defined during reset by strapping pin ALRCLK).
Alternatively pins XTALId and XTALIe can be driven from
an external single-ended oscillator.
The crystal oscillation can be propagated as clock to other
ICs in the system via pin XTOUTd.
Table 40 Clock and real-time synchronization signals
SYMBOLPINI/ODESCRIPTIONBIT
Crystal oscillator
XTALIdP2Iinput for crystal oscillator, or reference clock−
XTALOdP3Ooutput of crystal oscillator−
XTOUTdP4Oreference (crystal) clock output drive (optional)XTOUTE[14H[3]]
Real-time signals (RT port)
LLCM14Oline-locked clock; nominal 27 MHz, double pixel clock locked to the
selected video input signal
LLC2L14Oline-locked pixel clock; nominal 13.5 MHz−
RTCOL13Oreal-time control output; transfers real-time status information
supporting RTC level 3.1 (see external document
Description”
RTS0K13Oreal-time status information line 0; can be programmed to carry
various real-time informations; see Table 171
RTS1L10Oreal-time status information line 1; can be programmed to carry
various real-time informations; see Table 172
, available on request)
The Line-Locked Clock (LLC) is the double pixel clock at a
nominal 27 MHz. It is locked to the selected video input,
generating baseband video pixels according to
recommendation 601”
circuits, a direct pixel clock LLC2 is also provided.
The pins for line and field timing reference signals are
RTCO, RTS1 and RTS0. Various real-time status
information can be selected for the RTS pins. The signals
are always available (output) and reflect the
synchronization operation of the decoder part in the
SAA7108AE; SAA7109AE. The function of the RTS1 and
RTS0pins can be definedbybits RTSE1[3:0] 12H[7:4] and
RTSE0[3:0] 12H[3:0]; see Table 40.
. In order to support interfacing
−
−
“ITU
“RTC Functional
RTSE0[3:0] 12H[3:0]
RTSE1[3:0] 12H[7:4]
2004 Jun 2980
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
10.4Video expansion port (X port)
The expansion port is intended for transporting video
streamsof image data from other digitalvideocircuitssuch
as MPEG encoder/decoder and video phone codec, to the
image port (I port); see Table 41.
The expansion port consists of two groups of signals/pins:
• 8-bit data, I/O, regular video components Y-CB-C
4:2:2, i.e. CB-Y-CR-Y, byte serial, exceptionally raw
video samples (e.g. ADC test). In input mode the data
bus can be extended to 16-bit by pins HPD7 to HPD0.
• Clock, synchronization and auxiliary signals,
accompanying the data stream, I/O.
Table 41 Signals dedicated to the expansion port
SYMBOLPINI/ODESCRIPTIONBIT
XPD7 to
XPD0
XCLKM3I/Oclock at expansion port: if output, then copy of
XDQM4I/Odata valid flag of the expansion port input
XRDYN3Odata request flag = ready to receive, to work with
XRHN2I/Ohorizontal reference signal for the X port: as
XRVL5I/Overtical reference signal for the X port: as output:
XTRIK1Iport control: switches X port input to 3-stateXPE[1:0] 83H[1:0]
K2, K3,
L1 to L3,
M1, M2
and N1
I/OX port data: in output mode controlled by decoder
section, for data format see Table 42; in input
mode Y-CB-CR4:2:2 serial input data or
luminance part of a 16-bit Y-CB-CR4:2:2 input
LLC; as input normally a double pixel clock of up
to 32 MHz or a gated clock (clock gated with a
qualifier)
(qualifier): if output, then decoder (HREF and
VGATE) gate (see Fig.32)
optional buffer in external device, to prevent
internal buffer overflow;
second function: input related task flag A/B
output: HREF or HS from the decoder (see
Fig.32); as input: a reference edge for horizontal
input timing and a polarity for input field ID
detection can be defined
V123 or field ID from the decoder,
see Figs 30 and 31; as input: a reference edge for
vertical input timing and for input field ID detection
can be defined
R
As output, these are direct copies of the decoder signals.
The data transfers through the expansion port represent a
single D1 port, with half duplex mode. The SAV and EAV
codes may be inserted optionally for data input (controlled
by bit XCODE[92H[3]]). The input/output direction is
switched for complete fields only.
OFTS[2:0] 13H[2:0], 91H[7:0]
and C1H[7:0]
XCKS[92H[0]]
−
XRQT[83H[2]]
XRHS[13H[6]], XFDH[92H[6]]
and XDH[92H[2]]
XRVS[1:0] 13H[5:4],
XFDV[92H[7]] and XDV[1:0]
92H[5:4]
2004 Jun 2981
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
10.4.1X PORT CONFIGURED AS OUTPUT
Ifthedataoutputisenabledat the expansion port, then the
data stream from the decoder is present. The data format
of the 8-bit data bus is dependent on the chosen data type
which is selectable by the line control registers LCR2
to LCR24; see Table 17. In contrast to the image port, the
sliced data format is not available on the expansion port.
Instead, raw CVBS samples are always transferred if any
sliced data type is selected.
Detailsofsome of the data types on the expansion port are
as follows:
• Active video: (data type 15) contains components
Y-CB-CR4:2:2 signal, 720 active pixels per line. The
amplitude and offsets are programmable via
DBRI7 to DBRI0, DCON7 to DCON0,
DSAT7 to DSAT0, OFFU1, OFFU0, OFFV1 and
OFFV0. For nominal levels see Fig.26.
• Test line: (data type 6) is similar to the active video
format, with some constraints within the data
processing:
(chrominance comb filter for NTSC standards, PAL
phase error correction) within the chrominance
processing are disabled
– adaptive luminance comb filter, peaking and
chrominance trap are bypassed within the luminance
processing.
Thisdatatypeisdefinedforfutureenhancements.Itcan
be activated for lines containing standard test signals
within the vertical blanking period. Currently most
sources do not contain test lines. For nominal levels
see Fig.26.
• Raw samples (data types 0 to 5 and 7 to 14): CB-C
R
samples are similar to data type 6, but CVBS samples
aretransferred instead ofprocessed luminance samples
within the Y time slots.
The amplitude and offset of the CVBS signal is
programmable via RAWG7 to RAWG0 and
RAWO7 to RAWO0, see Chapter 18,
Tables 178 and 179. For nominal levels see Fig.27.
The relationship of LCR programming to line numbers is
described in Section 9.2; see Tables 18 to 21.
The data type selections by LCR are overruled by setting
OFTS2 = 1 (subaddress 13H bit 2). This setting is mainly
intended for device production testing. The VPO-bus
carries the upper or lower 8 bits of the two ADCs
depending on the OFTS[1:0] 13H[1:0] settings; see
Table 173. The output configuration is done via
MODE[3:0] 02H[3:0] settings; see Table 155. If a Y/C
mode is selected, the expansion port carries the
multiplexed output signals of both ADCs, in CVBS mode
theoutput of only one ADC. No timing reference codes are
generated in this mode.
Remark: The LSBs (bit 0) of the ADCs are also available
on pin RTS0; see Table 171.
The SAV/EAV timing reference codes define the start and
end of valid data regions. The ITU-blanking code
sequence ‘- 80 - 10 - 80 - 10 -...’ is transmitted during the
horizontal blanking period, between EAV and SAV.
The position of the F bit is constant according to ITU 656;
see Tables 44 and 45.
The V bit can be generated in two different ways (see
Tables 44 and 45) controlled via OFTS1 and OFTS0; see
Table 173.
F and V bits change synchronously with the EAV code.
1. The generation of the timing reference codes can be suppressed by setting OFTS[2:0] to ‘010’; see Table 173. In
this event the code sequence is replaced by the standard ‘- 80 - 10 -’ blanking values.
2. If raw samples or sliced data are selected by the line control registers (LCR2 to LCR24), the Y samples are replaced
by CVBS samples.
2004 Jun 2982
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
Table 43 SAV/EAV format on expansion port XPD7 to XPD0
BIT 7
1field bitvertical blanking bitformatreserved; evaluation not
for vertical timing see Tables 44 and 45
Table 44 525 lines/60 Hz vertical timing
LINE NUMBERF (ITU 656)
1 to 311according to selected VGATE position type via
4to1901
2000
2100
22 to 26100
26200
26300
264 and 26501
266 to 28211
28310
28410
285 to 52410
52510
BIT 6
(F)
1st field: F = 0
2nd field: F = 1
BIT 5
(V)
VBI: V = 1
active video: V = 0
OFTS[2:0] = 000 (ITU 656)OFTS[2:0] = 001
BIT 4
(H)
H = 0 in SAV format
H = 1 in EAV format
V
VSTA and VSTO (subaddresses 15H to 17H);
see Tables 175 to 177
BIT 3
recommended (protection
bits according to ITU 656)
(P3)
BIT 2
(P2)
BIT 1
(P1)
BIT 0
(P0)
Table 45 625 lines/50 Hz vertical timing
LINE NUMBERF (ITU 656)
OFTS[2:0] = 000 (ITU 656)OFTS[1:0] = 10
1 to 2201according to selected VGATE position type via
2300
24 to 30900
31000
311 and 31201
313 to 33511
33610
337 to 62210
62310
624 and 62511
2004 Jun 2983
V
VSTA and VSTO (subaddresses 15H to 17H);
see Tables 175 to 177
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
10.4.2X PORT CONFIGURED AS INPUT
If data input mode is selected at the expansion port, then
the scaler can choose its input data stream from the
on-chip video decoder, or from the expansion port
(controlled by bit SCSRC[1:0] 91H[5:4]). Byte serial
Y-CB-CR4:2:2,orsubsets for other sampling schemes,
or raw samples from an external ADC may be input (see
also bits FSC[2:0] 91H[2:0]). The input data stream must
beaccompanied by an external clock XCLK, qualifier XDQ
and reference signals XRH and XRV. Instead of the
reference signal, embedded SAV and EAV codes,
according to ITU 656, can also be accepted. The
protection bits are not evaluated.
XRH and XRV carry the horizontal and vertical
synchronization signals for the digital video stream
through the expansion port. The field ID of the input video
stream is carried in the phase (edge) of XRV and state of
XRH, or directly as FS (frame sync, odd/even signal) on
the XRV pin (controlled by XFDV[92H[7]], XFDH[92H[6]]
and XDV[1:0] 92H[5:4]).
The trigger events on XRH (rising/falling edge) and XRV
(rising/falling both edges) for the scalers acquisition
window are defined by XDV[1:0] 92H[5:4] and
XDH[92H[2]]. The signal polarity of the qualifier can also
be defined by bit XDQ[92H[1]]. As an alternative to the
qualifier, the input clock can be applied to a gated clock
(clock gated with a data qualifier, controlled by bit
XCKS[92H[0]]). In this event, all input data will be qualified.
10.5Image port (I port)
The image port transfers data from the scaler as well as
from the VBI data slicer, if selected (maximum 33 MHz).
The reference clock is available at the ICLK pin as an
output or as an input (maximum 33 MHz). As an output,
the ICLK is derived from the line-locked decoder or
expansion port input clock. The data stream from the
scaler output is normally discontinuous. Therefore valid
data during a clock cycle is accompanied by a data
qualifying (data valid) flag on pin IDQ. For pin constrained
applicationsthe IDQ pin can be programmedtofunctionas
a gated clock output (bit ICKS2[80H[2]]).
The data formats at the image port are defined in Dwords
of 32 bits (4 bytes), such as the related FIFO structures.
However, the physical data stream at the image port is
only 16-bit or 8-bit wide; in 16-bit mode data pins HPD7
to HPD0 are used for chrominance data. The four bytes of
the Dwords are serialized in words or bytes.
The available formats are as follows:
• Y-CB-CR4:2:2
• Y-CB-CR4:1:1
• Raw samples
• Decoded VBI data.
For handshaking with the receiving VGA controller, or
other memory or bus interface circuitry, F, H and V
reference signals and programmable FIFO flags are
provided. The information is provided on pins IGP0, IGP1,
IGPH and IGPV. The function on these pins is controlled
via subaddresses 84H and 85H.
VBIdataiscollected over an entire line in its own FIFO and
transferred as an uninterrupted block of bytes. Decoded
VBI data can be signed by the VBI flag on pins IGP0 and
IGP1.
Because scaled video data and decoded VBI data may
come from different and asynchronous sources, an
arbitration scheme is needed. Normally the VBI data slicer
has priority.
The image port consists of the pins and/or signals, as
given in Table 46.
Forpin constrained applications,orinterfaces, the relevant
timingand data reference signalscanalso be encoded into
the data stream. Therefore the corresponding pins do not
need to be connected. The minimum image port
configuration requires 9 pins only, i.e. 8 pins for data
including codes, and 1 pin for clock or gated clock. The
inserted codes are defined in close relationship to the
ITU-R BT.656 (D1) recommendation, where possible.
2004 Jun 2984
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
The following deviations from
are implemented at the SAA7108AE; SAA7109AEs image
port interface:
• SAV and EAV codes are only present in those lines,
where data is to be transferred, i.e. active video lines, or
VBI raw samples, no codes for empty lines
• There may be more or less than 720 pixels between
SAV and EAV
• The data content and number of clock cycles during
horizontal and vertical blanking is undefined, and may
be not constant
• The data stream may be interleaved with not-valid data
codes, 00H, but SAV and EAV 4-byte codes are not
interleaved with not-valid data codes
• There may be an irregular pattern of not-valid data, or
IDQ, and as a result, ‘CB-Y-CR- Y -’ is not in a fixed
phase to a regular clock divider
Table 46 Signals dedicated to the image port
SYMBOLPINI/ODESCRIPTIONBIT
IPD7 to
IPD0
ICLKH12I/Ocontinuous reference clock at image port,
IDQH14Odata valid flag at image port, qualifier, with
IGPHG12Ohorizontal reference output signal, copy of
IGPVF13Overtical reference output signal, copy of the
IGP1G13Ogeneral purpose output signal for I portIDG12[86H[4]], IDG1[1:0] 84H[5:4],
IGP0F14Ogeneral purpose output signal for I portIDG02[86H[5]], IDG0[1:0] 84H[7:6],
ITRDYJ14Itarget ready input signals−
ITRIG14Iport control, switches I port into 3-stateIPE[1:0] 87H[1:0]
E14, D14,
C14, B14,
E13, D13,
C13 and B13
“ITU 656 recommendation”
I/OI port dataICODE[93H[7]], ISWP[1:0] 85H[7:6]
can be input or output, as output decoder
LLC or XCLK from X port
the horizontal gate signal of the scaler,with
programmable polarity;
alternative function: HRESET pulse
vertical gate signal of the scaler, with
programmable polarity;
alternative function: VRESET pulse
• VBI raw sample streams are enveloped with SAV and
EAV, like normal video
• Decoded VBI data is transported as Ancillary (ANC)
data, two modes:
– direct decoded VBI data bytes (8-bit) are directly
placed in the ANC data field, 00H and FFH codes
may appear in the data block (violation to
ITU-R BT.656)
– recoded VBI data bytes (8-bit) directly placed in ANC
data field, 00H and FFH codes will be recoded to
even parity codes 03H and FCH to suppress invalid
ITU-R BT.656 codes.
There are no empty cycles in the ancillary code or its data
field. The data codes 00H and FFH are suppressed
(changed to 01H or FEH respectively) in the active video
stream, as well as in the VBI raw sample stream (VBI
pass-through). As an option the number range can be
limited further.
and IPE[1:0] 87H[1:0]
ICKS[1:0] 80H[1:0] and IPE[1:0]
87H[1:0]
ICKS2[80H[2]], IDQP[85H[0]] and
IPE[1:0] 87H[1:0]
IDH[1:0] 84H[1:0], IRHP[85H[1]] and
IPE[1:0] 87H[1:0]
IDV[1:0] 84H[3:2], IRVP[85H[2]] and
IPE[1:0] 87H[1:0]
IG1P[85H[3]] and IPE[1:0] 87H[1:0]
IG0P[85H[4]] and IPE[1:0] 87H[1:0]
2004 Jun 2985
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
10.6Host port for 16-bit extension of video data I/O (H port)
The H port, pins HPD, can be used to extend the data I/O paths to 16-bit.
The I port has functional priority. If I8_16[93H[6]] is set to logic 1 the output drivers of the H port are enabled and are
dependent on the I port enable control. When I8_16 = 0, the HPD output is disabled.
Table 47 Signals dedicated to the host port
SYMBOLPINI/ODESCRIPTIONBIT
HPD7 to
HPD0
A13, D12, C12, B12,
A12, C11, B11 and A11
I/O 16-bit extension for digital I/O
(chrominance component)
IPE[1:0] 87H[1:0], ITRI[8FH[6]] and
I8_16[93H[6]]
10.7Basic input and output timing diagrams for the
I and X ports
10.7.1I PORT OUTPUT TIMING
Thefollowingdiagrams(Figs 40 to 46)illustratetheoutput
timing via the I port. IGPH and IGPV are indicated as
logic 1 active gate signals. If reference pulses are
programmed, these pulses are generated on the rising
edgeofthe logic 1 active gates. Valid data is accompanied
by the output data qualifier on pin IDQ. In addition, invalid
cycles are marked with output code 00H.
The IDQ output pin may be defined to be a gated clock
output signal (ICLK AND internal IDQ).
ICLK
IDQ
10.7.2X PORT INPUT TIMING
The input timing requirements at the X port are the same
as those for the I port output. However, the following
differences should be noted:
• It is not necessary to mark invalid cycles with a 00H
code
• No constraints on the input qualifier (can be a random
pattern)
• XCLK may by a gated clock (XCLK AND external XDQ).
Remark: All timings illustrated are given for an
uninterrupted output stream (no handshake with the
external hardware).
IPD[7:0
IGPH
]
00FF0000SAV00
C
Y
B
Fig.40 Output timing at the I port for serial 8-bit data at start of a line (ICODE = 1).
2004 Jun 2986
C
Y00
R
C
B
C
Y
R
Y00
MHB550
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
ICLK
IDQ
IPD[7:0
IGPH
ICLK
IDQ
]
00
C
B
C
Y
Y00
R
Fig.41 Output timing at the I port for serial 8-bit data at start of a line (ICODE = 0).
C
B
C
Y
R
Y00
MHB551
IPD[7:0
IGPH
]
C
00
B
C
Y
R
Y00
C
Y
B
Fig.42 Output timing at the I port for serial 8-bit data at end of a line (ICODE = 1).
2004 Jun 2987
C
Y00FF0000EAV00
R
MHB552
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
ICLK
IDQ
IPD[7:0
IGPH
ICLK
IDQ
]
C
00
B
C
Y
R
Y00
C
B
C
Y
Y00
R
Fig.43 Output timing at the I port for serial 8-bit data at end of a line (ICODE = 0).
MHB553
IPD[7:0
HPD[7:0
IGPH
]
00FF0000Y0Y100Y2Y3
]
0000SAV0000
C
C
B
R
C
B
C
R
Y
n−1
C
Y
00FF0000
n
C
0000EAV00
R
B
Fig.44 Output timing for 16-bit data output via the I and H port with codes (ICODE = 1), timing is like 8-bit output,
but packages of 2 bytes per valid cycle.
2004 Jun 2988
MHB554
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
handbook, full pagewidth
IDQ
IGPH
IGPV
MHB555
handbook, full pagewidth
ICLK
IDQ
]
IPD[7:0
]
HPD[7:0
sliced data
flag on IGP0
or IGP1
Fig.45 Horizontal and vertical gate output timing.
0000FFFFDIDSDIDXXYYZZCS
00FF00SAV000000BCFFEAV
BC
000000
MHB733
Fig.46 Output timing for sliced VBI data in 8-bit serial output mode (dotted graphs for SAV/EAV mode).
2004 Jun 2989
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
11 BOUNDARY SCAN TEST
The SAA7108AE; SAA7109AE has built-in logic and
2 times5 dedicated pins to support boundary scan testing,
separately for the encoder and decoder part, which allows
board testing without special hardware (nails). The
SAA7108AE; SAA7109AE follows the
“IEEE Std. 1149.1 Standard Test Access Port and Boundary-Scan
Architecture”
chaired by Philips.
The 10 special pins are Test Mode Select (TMSe and
TMSd), Test Clock (TCKe and TCKd), Test Reset
(TRSTe and TRSTd), Test Data Input (TDIe and TDId)
andTest Data Output(TDOe and TDOd),where extension
‘e’ refers to the encoder part and extension ‘d’ refers to the
decoder part.
Table 48 BST instructions supported by the SAA7108AE; SAA7109AE
INSTRUCTIONDESCRIPTION
BYPASSThis mandatory instruction provides a minimum length serial path (1 bit) between TDIe (or TDId)
EXTESTThis mandatory instruction allows testing of off-chip circuitry and board level interconnections.
SAMPLEThis mandatory instruction can be used to take a sample of the inputs during normal operation of
CLAMPThis optional instruction is useful for testing when not all ICs have BST. This instruction addresses
IDCODEThis optional instruction will provide information on the components manufacturer, part number and
INTESTThis optional instruction allows testing of the internal logic (no support for customers available).
USER1This private instruction allows testing by the manufacturer (no support for customers available).
set by the Joint Test Action Group (JTAG)
and TDOe (or TDOd) when no test operation of the component is required.
the component. It can also be used to preload data values into the latched outputs of the boundary
scan register.
the bypass register while the boundary scan register is in external test mode.
version number.
The Boundary Scan Test (BST) functions BYPASS,
EXTEST, INTEST, SAMPLE, CLAMP and IDCODE are all
supported; see Table 48. Details about the JTAG
BST-TEST can be found in the specification “
1149.1”
Description Language (BSDL) of the SAA7108AE;
SAA7109AE are available on request.
. Two files containing the detailed Boundary Scan
IEEE Std.
11.1Initialization of boundary scan circuit
The Test Access Port (TAP) controller of an IC should be
in the reset state (TEST_LOGIC_RESET) when the IC is
in functional mode. This reset state also forces the
instruction register into a functional instruction such as
IDCODE or BYPASS.
To solve the power-up reset, the standard specifies that
the TAP controller will be forced asynchronously to the
TEST_LOGIC_RESET state by setting the TRSTe or
TRSTd pin LOW.
11.2Device identification codes
A device identification register is specified in
1149.1b-1994”
for the specification of the IC manufacturer, the IC part
number and the IC version number. Its biggest advantage
2004 Jun 2990
. It is a 32-bit register which contains fields
“IEEE Std.
is the possibility to check for the correct ICs mounted after
production and to determine the version number of the ICs
during field service.
When the IDCODE instruction is loaded into the BST
instruction register, the identification register will be
connected between TDIe (or TDId) and TDOe (or TDOd)
of the IC. The identification register will load a component
specific code during the CAPTURE_DATA_REGISTER
state of the TAP controller, this code can subsequently be
shifted out. At board level this code can be used to verify
component manufacturer, type and version number. The
device identification register contains 32 bits, numbered
31 to 0, where bit 31 is the most significant bit (nearest to
TDIe or TDId) and bit 0 is the least significant bit (nearest
to TDOe or TDOd); see Fig.47.
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
handbook, full pagewidth
TDIe
(or TDId)
MSBLSB
31
28 2712 1110
nnnn
4-bit
version
code
0111000100000100
(0111000100010100)
16-bit part number11-bit manufacturer
00000010101
identification
1
TDOe
(or TDOd)
MBL786
a. SAA7108AE.
handbook, full pagewidth
TDIe
(or TDId)
MSBLSB
31
28 2712 1110
nnnn
4-bit
version
code
0111000100000101
(0111000100010100)
16-bit part number11-bit manufacturer
00000010101
identification
1
TDOe
(or TDOd)
MBL787
b. SAA7109AE.
Fig.47 32 bits of identification code.
12 LIMITING VALUES
In accordance with the Absolute Maximum Rating System (IEC 60134); all ground pins connected together and
grounded (0 V); all supply pins connected together.
SYMBOLPARAMETERCONDITIONSMIN.MAX.UNIT
V
V
V
V
V
DDD
DDA
i(A)
i(n)
i(D)
digital supply voltage−0.5+4.6V
analog supply voltage−0.5+4.6V
input voltage at analog inputs−0.5+4.6V
input voltage at pins XTALI, SDA and SCL−0.5V
+ 0.5V
DDD
input voltage at digital inputs or I/O pinsoutputs in 3-state−0.5+4.6V
1. Condition for maximum voltage at digital inputs or I/O pins: 3.0 V < V
DDD
< 3.6 V.
2. Class 2 according to EIA/JESD22-114-B.
3. Class A according to EIA/JESD22-115-A.
2004 Jun 2991
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
13 THERMAL CHARACTERISTICS
SYMBOLPARAMETERCONDITIONSVALUEUNIT
R
th(j-a)
thermal resistance from junction to ambientin free air32
Note
1. The overall R
value can vary depending on the board layout. To minimize the effective R
th(j-a)
ground pins must be connected to the power and ground layers directly. An ample copper area direct under the
SAA7108AE; SAA7109AE with a number of through-hole plating, which connect to the ground layer (four-layer
board: second layer), can also reduce the effective R
. Please do not use any solder-stop varnish under the chip.
th(j-a)
In addition the usage of soldering glue with a high thermal conductance after curing is recommended.
14 CHARACTERISTICS OF THE DIGITAL VIDEO ENCODER PART
T
= 0 to 70 °C (typical values measured at T
amb
=25°C); unless otherwise specified.
amb
SYMBOLPARAMETERCONDITIONSMIN.TYP.MAX.UNIT
Supplies
V
DDA
V
DDIe
V
DD(DVO)
analog supply voltage3.153.33.45V
digital supply voltage3.153.33.45V
digital supply voltage
(DVO)
1.0451.11.155V
1.4251.51.575V
1.711.81.89V
2.3752.52.625V
3.1353.33.465V
I
DDA
I
DDD
analog supply currentnote 11110115mA
digital supply currentnote 21175200mA
input currentVi= LOW or HIGH−10−+10µA
LOW-level output voltage
IOL=3mA−−0.4V
(pin SDAe)
output currentduring acknowledge3−−mA
cycle timenote 412−−ns
delay from PIXCLKO to
note 5−−−ns
PIXCLKI
note 4405060%
output405060%
duty factor t
HIGH/TPIXCLK
HIGH/TCLKO2
rise timenote 4−−1.5ns
fall timenote 4−−1.5ns
input data set-up timepins PD11 to PD02−−ns
input data hold timepins PD11 to PD00.9−−ns
input data set-up timepins HSVGC, VSVGC
2−−ns
and FSVGC; note 6
input data hold timepins HSVGC, VSVGC
1.5−−ns
and FSVGC; note 6
nominal frequency−27−MHz
permissible deviation of
note 7−50−+5010
−6
nominal frequency
2004 Jun 2993
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
SYMBOLPARAMETERCONDITIONSMIN.TYP.MAX.UNIT
CRYSTAL SPECIFICATION
T
amb
C
L
R
S
C
1
C
0
Data and reference signal output timing
C
L
t
o(h)(gfx)
t
o(d)(gfx)
t
o(h)
t
o(d)
CVBS and RGB outputs
V
o(CVBS)(p-p)
V
o(VBS)(p-p)
V
o(C)(p-p)
V
o(RGB)(p-p)
∆V
o
R
L
B
DAC
ILE
lf(DAC)
DLE
lf(DAC)
ambient temperature0−70°C
load capacitance8−−pF
series resistance−−80Ω
motional capacitance
1.21.51.8fF
(typical)
parallel capacitance
2.83.54.2pF
(typical)
output load capacitance8−40pF
output hold time to
graphics controller
output delay time to
graphics controller
output hold timepins TDOe,
pins HSVGC, VSVGC,
FSVGC and CBO
pins HSVGC, VSVGC,
FSVGC and CBO
1.5−−ns
−−10ns
3−−ns
TTXRQ_XCLKO2, VSM
and HSM_CSYNC
output delay timepins TDOe,
−−25ns
TTXRQ_XCLKO2, VSM
and HSM_CSYNC
output voltage CVBS
see Table 49−1.23−V
(peak-to-peak value)
output voltage VBS
see Table 49−1−V
(S-video)
(peak-to-peak value)
output voltage C
see Table 49−0.89−V
(S-video)
(peak-to-peak value)
output voltage R, G, B
see Table 49−0.7−V
(peak-to-peak value)
inequality of output signal
−2−%
voltages
output load resistance−37.5−Ω
output signal bandwidth
−3 dB; note 8−170−MHz
of DACs
low frequency integral
−−±3LSB
linearity error of DACs
low frequency differential
−−±1LSB
linearity error of DACs
2004 Jun 2994
Philips SemiconductorsProduct specification
HD-CODECSAA7108AE; SAA7109AE
Notes
1. Minimum value for I2C-bus bit DOWNA = 1.
2. Minimum value for I2C-bus bit DOWND = 1.
3. Levels refer to pins PD11 to PD0, FSVGC, PIXCLKI, VSVGC, PIXCLKO, CBO, TVD, and HSVGC, being inputs or
outputs directly connected to a graphics controller.
Input sensitivity is1/2V
DD(DVO)
The reference voltage1/2V
4. The data is for both input and output direction.
5. This parameter is arbitrary, if PIXCLKI is looped through the VGC.
6. Tested with programming IFBP = 1.
7. If an internal oscillator is used, crystal deviation of nominal frequency is directly proportional to the deviation of
subcarrier frequency and line/field frequency.