The KS0127B converts analog NTSC, PAL or SECAM
video in composite, S-video, or component format to
digitized component video. Output data can be selected for
CCIR 601 or square pixel sample rates in either YCbCr or
RGB formats. The digital video can be scaled down in both
the horizontal and vertical directions. The KS0127B also
decodes Intercast, Teletext, Closed Caption, and WSS
data with a built-in bit data slicer. Digitized CVBS data can
be output directly during VBI for external processing.
FEATURES
• Accepts NTSC-M/N/4.43, PAL-M/N/B/G/H/I/D/K/L and
SECAM formats with auto detection
• 6 analog inputs: 3 S-video, 6 composite, or 1 3-wire
YCbCr component video
• 2-line luma and chroma comb filters including
adaptive luma comb for NTSC
• Programmable luma bandwidth, contrast,
brightness, and edge enhancement
• Programmable chroma bandwidth, hue, and
saturation
• High quality horizontal and vertical down scaler
• Intercast, Teletext and Closed Caption decoding with
built-in bit slicer
• Direct output of digitized CVBS during VBI for
Intercast application
• Analog square pixel or CCIR 601 sample rates
• Output in 4:4:4, 4:2:2, or 4:1:1 YCbCr component, or
24-bit or 16-bit RGB formats with dithering
• YCbCr 4:2:2 output can be 8 or 16 bits wide with
embedded timing reference code support for 8-bit
mode
• Simultaneous scaled and non-scaled digital output
ports outputs for 8-bit mode.
• Direct access to scaler via bi-directional digital port.
• Programmable Gamma correction table
• Programmable timing signals
• Industry standard IIC interface
100 PQFP
ORDERING INFORMATION
DevicePackageTemperature Range
KS0127B100 PQFP-20°~+70°C
APPLICATIONS
• Multimedia
• Digital Video
• Video Capture/Editing
RELATED PRODUCTS
• KS0119Q2 NTSC VIDEO ENCODER
• KS0123 MULTISTANDARD VIDEO ENCODER
• KS0125 MULTISTANDARD VIDEO ENCODER
• KS0122 MULTISTANDARD VIDEO DECODER
• KS0127 MULTISTANDARD VIDEO DECODER
ELECTRONICS
PAGE 1 OF 96Modified on May/04/2000
KS0127B Data SheetMULTIMEDIA VIDEO
BLOCK DIAGRAM
HS1
HS2VSHAV
VAVCKCK2
SCH
PID
EHAV
EVAV
EXV[7:0]
Non Scaler Output
Y[7:0]
Data
Format
Output
Horizontal
SRAM
Vertical
C[7:0]
Color
Space
Scaler
Scaler
Converter
OEN
Gamma
LUT
CCEN
CCDAT
Comb
Filter
Variable
LPF
Sliced VBI or Raw CVBS
Line Lock,
Timing
Generation
Scaler Input OR Simultaneous Non Scaler Output OR 24-bit Output
Digital
Input
Timing
Reference
Generator/
Compensation
Luma
Processing
EXV
Control
Direct.
6 input MUX
2-AGCs
Chroma
Processing
Gain/Offset
2-ADCs
Control
VBI Data
Decoding
IIC Host
Interface
XTALI
XTALO
ELECTRONICS
HS1
VS
COMP2
VRT
VRB
AY[2:0]
AC[2:0]
Modified on May/04/2000
SCLK
SDAT
AEX1,0
PAGE 2 OF 96
KS0127B Data SheetMULTIMEDIA VIDEO
PIN ASSIGNMENT - 100 PQFP
AY084I1 of 6 analog CVBS or 1of 3 S-video Y inputs.
AY186I1 of 6 analog CVBS or 1of 3 S-video Y inputs.
AY288I1 of 6 analog CVBS input or 1 of 3 S-video Y inputs or Y input for 3
wire component input
AC090I1 of 6 analog CVBS or 1 of 3 S-video C inputs.
AC192I1 of 6 analog CVBS or 1 of 3 S-video C inputs or Cb input for 3 wire
component input
AC294I1 of 6 analog CVBS or 1 of 3 S-video C inputs or Cr input for 3 wire
component input
XTALI8IPin 1 for an external crystal or TTL clock input.
XTALO7OPin 2 for an external crystal.
RST10IChip reset. Active low signal.
OUTPUT (All output pins can be selectively three-stated)
Y0 - Y7, C0 - C7 45-48,53-56,33-
39,44
EXV0 - EXV716,27,28,61-63,
68,71
HS126I/OProgrammable horizontal timing signal. One pulse every video line.
HS2(IIC)76I/OProgrammable horizontal timing signal. One pulse every video line.
VS23I/OProgrammable vertical timing signal. When the EXV port is
HAV25OProgrammable horizontal active video flag.
VAV(OENC0)3I/OProgrammable vertical active video flag.
ODigital video outputs.
I/OExpanded digital video I/O port. Can be configured as an additional
8-bit output port (no scaling), or additional outputs of the main digital
output stream for 24 bit output modes, as an 8-bit input for direct
digital access of the down scaler.
When the EXV port is configured as an input, this pin can be
programmed as an input.
At power up, this pin needs a 10 kΩ pull-down resistor to configure
the chip to operate in IIC mode.
configured as an input, this pin can be programmed as an input.
During reset, the pin is an input and the logic state of this pin is
latched into the OENC[0] register bit. Use a 10 kΩ resistor for pull-up
or pull-down.
EHAV5OValid pixel data flag. Polarity is programmable. Active when output
video data is valid.
Modified on May/04/2000
ELECTRONICS
PAGE 4 OF 96
KS0127B Data SheetMULTIMEDIA VIDEO
PIN DESCRIPTION (Continued)
Pin NamePin #TypeDescription
EVAV(OENC1)4I/OValid line flag. Polarity is programmable. Active when output video
line is valid. During reset, the pin is an input and the logic state of
this pin is latched into the OENC[1]register bit. Use a 10 kΩ resistor
for pull-up or pull-down.
ODD22OOdd field flag. Polarity is programmable. Active for fields 1 and 3.
PID17OPAL ID flag. High for phase alternating line.
OEN15IDigital video data, timing and clock output 3-state control.
CK18I/OPixel clock. In normal decoding mode, this is an output. When the
EXV port is used as an input, this can be programmed as an input
pixel clock.
CK221OPixel output clock (rate is one half of CK) aligned to HAV signal.
CCDAT73OSliced VBI data output. Data can be from Closed Caption, Teletext,
Intercast, or WSS type encoded data.
CCEN74OWhen high, this pin indicates that valid VBI data is being clocked out
at the CCDAT pin or at the digital video output.
MULTI-PURPOSE I/O PORTS AND TEST ENABLE
PORTA58I/OMulti-purpose I/O port.
SCH(PORTB)24I/OMulti-purpose I/O port.
TESTEN57IWhen tied to VDD, the chip is put into the test mode. For normal use,
this pin should be connected to VSS.
TEST96IWhen tied to VDD, the chip is put into the test mode. For normal use,
this pin should be connected to VSS.
REFERENCE AND COMPENSATION
VRT77I/OADC VRT compensation (requires an external 0.1 µF capacitor
connected to VSS).
VRB78I/OADC VRB compensation (requires an external 0.1 µF capacitor
connected to VSS).
COMP297I/OInternal 1.3 V reference (requires an external 0.1 µF capacitor
connected to VSS).
HOST INTERFACE
SCLK75ISerial clock for IIC host interface.
SDAT72I/OSerial data for IIC host interface.
AEX0 - AEX169 - 70IDevice ID selection for IIC host interface.
Modified on May/04/2000
ELECTRONICS
PAGE 5 OF 96
KS0127B Data SheetMULTIMEDIA VIDEO
PIN DESCRIPTION (Continued)
Pin NamePin #TypeDescription
POWER AND GROUND
VDD20,59PWR Digital power supply for output buffers. The voltage can be +5V or
3.3V depending on interface requirement.
VDD311,12,42,43,66,67+3.3V Digital power supply for internal logic.
VDDA85,89,93,98+5VAnalog power supply for ADC, AGC and reference circuits.
VDDA19+5VAnalog power supply for clock generation circuitry.
VSS6,13,14,19,40,
41,60,64,65,83,
87,91,95
NC
NCP1,2,29-32,49-52,
79-82,99,100
GND Common ground.
-These pins are directly connected to the die substrate. If electrical
connect is desired (not required) only connection to VSS is allowed.
ELECTRONICS
Modified on May/04/2000
PAGE 6 OF 96
KS0127B Data SheetMULTIMEDIA VIDEO
PIN CROSS REFERENCE: NUMERICAL ORDER BY PIN NUMBER
Pin #Pin NamePin #Pin NamePin #Pin NamePin #Pin Name
The KS0127B supports complete video decoding of many analog video standards. In addition, the chip can support
direct 8-bit YCbCr input for high quality video scaling and other processing.
1.1.1. Analog Video Input
Figure 1 shows the detailed block diagram of the analog front end. Up to six composite video sources, three
S-video sources, one 3-wire YCbCr component video source, or any combination can be selected. The allowed
inputs are selected using the INSEL[3:0] bits in the CMDB register. Table 1 lists all possible input selections. The
front end has two paths each containing an analog gain control, a clamping control, and an 8-bit ADC. Composite
video input uses only the luma path. S-video and analog component YCbCr inputs utilize both the luma and
chroma paths. The ADC digital data is used to calculate the correct gain and clamp values. The data is feedback to
the analog clamping and gain control. This architecture eliminates any offset and gain mismatch in the analog front
end.
OFFSET
VRT
VRB
LPF
LPF
To Chroma Processing
To Luma Processing
To Timing Generation
AC0
AC1
AC2
AY0
AY1
AY2
MUX
MUX
8-bit
Digital
Input
AGC
AGC
8 Bit ADC
COMP1
8 Bit ADC
GAIN
OFFSET
Figure 1. Analog Front End
The analog inputs must be AC coupled through an external 0.1 µF capacitor clamp. Due to the high sampling rate
of the ADC’s inside the KS0127B, most video sources will not require a low-pass filter for alias reduction. For those
video sources with harmonics above 13 MHz, a simple single order pole at 6 MHz will provide sufficient high
frequency signal reduction. This can be implemented with a 400 pF capacitor in parallel with the 75 Ω load.
The AGC normally references to the ADC code difference between sync tip and back porch. Two sets of sync
tip-back porch ADC values are available for different AGC gain requirements: if AGCGN = 0, the sync tip locks to
code 2, and the back porch locks to code 70; when AGCGN = 1, the sync tip locks to 16, and the back porch locks
to code 70. Video signal with abnormal sync tip or very bright saturated colors may cause the ADC to limit the
maximum value. This situation can be corrected by enabling the AGCOVF bit in the CMDB register to force the
gain tracking loop to reduce AGC when maximum limiting conditions occur. The AGC may also be programmed to
freeze the AGC at the current value by setting the AGCFRZ bit in the CMDB register. Once the AGC is frozen, the
gain can be manually adjusted with the AGC register. The tracking time constant for the AGC can be controlled
with the AGC_LPG[1:0] bits in the TRACKB register. In addition, the AGC tracking time constant can be
configured as 2X faster during acquisition via the AGC_LKG.
1.1.3. Digital Video Input
The high quality digital video down scaler in the KS0127B can be directly accessed via the EXV bi-directional port.
The KS0127B accepts CCIR 656 compliant 8-bit YCbCr digital video input with embedded or external timing. Video
timing may also be generated by the KS0127B. Data path for 8-bit YCbCr input is shown in Figure 3. Selection of
analog video input or digital CCIR 656 data is with the INPSL[1:0] register bits. The KS0127B can operate in
master or slave timing mode when the chip is programmed for digital video input.
1.1.4. Pixel Clock and Timing Mode Selection for Digital Video Input
Pixel clock and synchronization timing can be individually selected to either come from an external generator or be
generated internally. In addition, if synchronization is provided by an external source, the KS0127B supports
embedded syncs as defined in CCIR 656, or TTL HS and VS inputs. Selection of pixel clock is via CKDIR bit in
Modified on May/04/2000
ELECTRONICS
PAGE 9 OF 96
KS0127B Data SheetMULTIMEDIA VIDEO
CMDD register. Timing selection is through either SYNDIR or EAV bit.
HS1
VS
EXV[7:0]
From Luma ADC
From Chroma ADC
Timing
Control
Data
Demux
Luma
Y
C
Processing
Chroma
Processing
To Luma Scaler
To Chroma Scaler
Figure 3. 8-bit YCbCr Input Data Path
By using an external pixel clock, the reference clock input at XTALI is no longer required. Additional register bits
have to be programmed for different selections of pixel clock and timing, which are detailed in Table 2. The
following register/bit-settings are required for digital video input:
INSEL[3:0] = 8, 9, A, or F.
TSTCGN = 1.
DMCTL[1:0] = 2 or 3.
UGAIN = 238.
BRT = 34.
SAT = 229.
RGBH = UNIT = PED = 1.
Table 2: Digital Video Input Pixel Clock and Timing Selection
Pixel Clock TTL Timing
CKDIR
*1
SYNDIR
00010130 if input
00101131
01001111
10010131
10101111
11001111
*1
: CKDIR = 0 - CK is output and is internally generated. CKDIR = 1 - CK is input from an external source.
*2
: SYNDIR = 0 - HS1 and VS are output. SYNDIR = 1 - HS1 and VS are inputs from external sources.
*3
: EAV = 0 - chip will not sync to embedded timing. EAV = 1 - chip will sync to embedded timing.
Note: the combination X11 for CKDIR, SYNDIR, EAV is not valid.
ELECTRONICS
Embedded
Timing
*2
EAV
Additional Register Programming
*3
VMENTSTGPH TSTGEN TSTGFR PIXSELMNFMTIFMT
10 if input
data is at
square
pixel
rate.
1 if input
is at
CCIR
601 rate.
Modified on May/04/2000
PAGE 10 OF 96
is 50 Hz
video.
1 if input
is 60 Hz
video.
KS0127B Data SheetMULTIMEDIA VIDEO
When in digital input mode, all programmable timing registers (such as HAVB,HAVE, HS2B etc.) are still functional.
If HS1 and VS are programmed as inputs, the associated output timing controls such as HS1B,E will have no
effect. An example of horizontal timing for digital input is shown in Figure 4.
HS1
Programmable, when an
output - Any input phase
is acceptable
This HS1 location can also come
From a 656 SAV code
Fully programmable HAVB location
based on internal counter
HAV -- fully programmable,
Defines location of first, last pixel
and defines Cb,Y,Cr data location
The CK2 output clock phasing
is aligned to the HAV leading
edge
Figure 4. Horizontal Timing for EXV Port as Digital Input
x
x
Fully programmable
HAVE location
1.1.5. Additional Information for Analog Component Video Input
For the KS0127B to correctly set the V component phase in analog component video input mode, PID (pin 17) and
PORTA (pin 58) need to be connected together. PORTA has to be configured as input (DIRA = 0) and connected
to the internal CBG signal (DATAA[2:0] = 3).
It is also recommended that external clamp circuit be used for Cb and Cr inputs (before the coupling caps) and the
internal chroma clamp be disabled (COFFENB = 1) due to slight Cb/Cr leakage.
Modified on May/04/2000
ELECTRONICS
PAGE 11 OF 96
KS0127B Data SheetMULTIMEDIA VIDEO
1.2. VIDEO TRACKING AND TIMING GENERATION
When the KS0127B is configured for analog video input, the chip tracks the video input and generates a sampling
clock that is line locked to the input video. The KS0127B requires an external reference clock for video tracking.
This reference can be supplied via a crystal using the on chip crystal interface or any TTL compatible source.
These configurations are shown in Figure 5
1.2.1. Clock Input Timing Reference
The KS0127B can use either a 24.576 MHz or a 26.8 MHz reference. However, it is recommended that the 24.576
MHz reference be used for CCIR 601 operation, and the 26.8 MHz reference be used for square pixel or dual mode
operation. Other specifications for the crystal are:
• Fundamental or third overtone
• Load capacitance of ~20 pF
• Series resistance of 40 Ω or less
• Frequency deviation of 50 ppm or less over operating temperature range
Optional for 3rd
harmonic crystal
22 pF
22 pF
24.576 MHz
5.7 µH
391 pF
8
XTALI
KS0127B
7
XTALO
Using a Crystal
24.576 MHz
TTL Clock
Using a Clock
N. C.
8
7
XTALI
KS0127B
XTALO
Figure 5. Standard Clock Configurations
1.2.2. The Sampling Clock
The sampling clock is generated by multiplying the line rate by N. This ensures that samples are aligned
horizontally, vertically and in time. The required N factor for the KS0127B is based upon the field rate (60 Hz or 50
Hz) and the desired sampling rates (CCIR 601 or square pixel). Field rate can be automatically detected and can
be monitored with the FFRDET bit in the STAT register. Manual control of the field rate can be controlled with the
MNFMT and IFMT bits. The PIXSEL bit in register CMDA selects CCIR 601 or square pixel. Table 3 shows the
constants for the various combinations of input formats and output pixel rates.
ELECTRONICS
Modified on May/04/2000
PAGE 12 OF 96
KS0127B Data SheetMULTIMEDIA VIDEO
Table 3: Timing for Different Pixel Rates
CCIR 601 Data RatesSquare Pixel Data Rates
MN,B,G,H,I,D,K,K1,LMN,B,G,H,I,D,K,K1,L
Units
Field Rate60506050Hz
Pixels/Line (N)858864780944Pixels
Active Pixels/Line720720640768Pixels
Active Lines/Frame480580480580Lines
Pixel Rate 13.513.512.2714.75MHz
ADC Sampling Rate272724.5429.5MHz
The time constants for the pixel clock tracking loop can be adjusted with the HFSEL[1:0] bits.
In addition to providing the pixel clock, the KS0127B also outputs various timing signals to indicate the beginning of
a line, a field, and for field and frame identification. All the timing and clock pins may be optionally put into high
impedance state. Three-state of these pins are software controlled and initial state of these pins at power up is
controlled via two configuration pins: 3 and 4.
The KS0127B can generate all the video timing without video input. This enables the KS0127B to be used as a
video timing generator for a system that contains both the KS0127B for live video input and a MPEG decoder
which requires a video timing generator.
1.2.3. Horizontal Timing
The KS0127B creates many internal timing signals aligned to the horizontal sync tip (mid-way of the falling edge of
horizontal sync, typically ADC code 36). These include locations of color burst (CBG, CBGW) used in chrominance
processing, back porch (BPG), and sync tip timing signals (SLICE, FS_PULSE) used for AGC and clamp functions.
SLICE is low whenever the input is below half way level of horizontal sync (typically ADC code 36). FS_PULSE is
a single clock pulse coincide with the start of SLICE. One of these internal signals can be made available at the
PORTA or PORTB pin at any time.
The chip outputs two horizontal synchronization signals: HS1 and HS2. The start and stop locations for these
signals are fully programmable. Offset programmed to HSxB, HSxE, and HSxBE0 are added to the default edge
locations as shown in Table 4. Note that there are different modulo numbers for different input video standards and
output pixel rates.
Modified on May/04/2000
ELECTRONICS
PAGE 13 OF 96
KS0127B Data SheetMULTIMEDIA VIDEO
Table 4: Horizontal Timing Signal Edge Locations (in # of CK)
60 Hz50 Hz
DescriptionSignal
Chip delay120120120120
Sync gate (1-CK pulse)SYG72727272
Back porch gateBPG[147 222][129 204][154 234][168 254]
Color burst gate (1-CK pulse)CBG222204234254
Wide color burst gateCBGW[159 254][147 233][173 254][186 277]
CCIR 601
(modulo 1716)
Square Pixel
(modulo 1560)
CCIR 601
(modulo 1728)
Square Pixel
(modulo 1888)
Two pulses per line (1-CK each
pulse)
Default one pulse per lineHS1[65 238][45 220][69 250][65 270]
Default one pulse per lineHS2[65 238][45 220][69 250][65 270]
Default horizontal croppingHAV[351 75][334 58][379 91][415 59]
An additional signal, HAV, is provided for horizontal video cropping. This signal has programmable polarity, start
and stop locations. Two 11-bit registers, HAVB and HAVE, are used to define the first and last pixel locations of
the horizontal portion of the cropped video. Numbers programmed into these registers are used as offset to the
default locations as shown in Table 4. Note that even though HAVB and HAVE have 1-CK resolution, the
difference between them should be maintained at multiple of 4 CKs for correct output.
Table 4 shows the default edge locations relative to the midway of the falling edge of the analog horizontal sync.
Note the numbers shown are in multiple of CK clocks. Figure 6 shows the approximate locations for the horizontal
timing signals. Horizontal timing signals used for scaling will be described in Section 1.6.1.
FH242, 90042, 82242, 90642, 986
ELECTRONICS
Modified on May/04/2000
PAGE 14 OF 96
KS0127B Data SheetMULTIMEDIA VIDEO
Analog video input
Digital video output
HAV
HS1,2
FS_PULSE
SLICE
SYG
BPG
CBG
CBGW
FH2
Chip delay
HAVE
HSE
HSB
Blank
HAVB
Active videoActive video
Figure 6. Approximate Locations for the Horizontal Timing Signals
1.2.4. Vertical Timing
The vertical timing signals include VS, VAV, ODD, SCH, and PID.
The VS is used for identifying the first line of video in the vertical position. The VS leading edge can be
programmed to either track the incoming video’s serration pulses or to be aligned to the beginning of the video line
or half way, as shown in Figure 36 and Figure 37. If VALIGN = 0, the VS leading edge is based on the output of an
internal low pass filter, and its location is dependent on the noise conditions of the video input. The trailing edge of
VS is locked to either the beginning of the video line or half way. The half way location relative to the beginning of
the video line changes depending on current input standard and output format. If VALIGN = 1, the leading edge of
the VS is aligned to the beginning of the video line or half way. The trailing edge is always aligned to the beginning
of the video line. The VSE bit in the CMDA register can be programmed to shorten the VS falling edge by one
horizontal line.
The VAV signal is used for vertical cropping. The start and stop lines for VAV are programmable through the VAVB
and VAVE registers, respectively.
The ODD signal signifies the current field number. When ODD is active, the current field is 1 or 3 (or 5 or 7 if in PAL
mode). The leading and trailing edges of ODD can be aligned to either the leading edge of VS (VALIGN = 1) or the
trailing edge of VS (VALIGN = 0). The signal may be used in conjunction with SCH and PID to exactly identify the
Modified on May/04/2000
PAGE 15 OF 96
ELECTRONICS
KS0127B Data SheetMULTIMEDIA VIDEO
current field. To distinguish between fields 1, 2 verse fields 3, 4 (or fields 1, 2, 3, 4 verse fields 5, 6, 7, 8 for PAL)
the phase of the color burst relative to the sync tip must be measured. That information is provided by the SCH pin.
The KS0127B provides the output of a comparator that measures whether the current color burst phase relative to
the falling edge of the sync is greater or less than a predetermined constant. This constant is controlled with
SCHCMP[3:0]. The polarity of the SCH output pin depends on the current SCHCMP[3:0] value. The SCH signal
changes every video line. The SCH for line 260 is held for the entire vertical blanking period. By using the SCH
signal for the same line from each field, proper field identification can be determined. Figure 8 shows field
identification values for SCHCMP[3:0]=0. It is important to note that the SCH value is only valid for video signals
that have a constant sync tip to color burst relationship. This is not the case with consumer VCRs.
HAVdefault width for each input standard and output mode
EVAV
Note: Numbers shown are in CK. Active high polarities are used. Timing shown for VAV and EVAV are with qualifier off.
27, except 60 Hz Square = 28
15, except 60 Hz Square = 14
60 Hz - 261
50 Hz - CCIR 601 = 273, Square = 341
Figure 7. Short Term Vertical Timing
ELECTRONICS
Modified on May/04/2000
PAGE 16 OF 96
KS0127B Data SheetMULTIMEDIA VIDEO
VS
ODD
1
2
34
SCH
Truth Table
FIELD
ODD
SCH
12
HL
HLLH
34
HL
Note:
ODD and SCH are
measured at the trailing
edge of VS.
Figure 8. NTSC Vertical Timing Signals
The PID pin is used to identify whether the current V-axis is inverted in PAL mode. This signal changes at the color
burst. By noting this value at the same line of each field, a determination of whether a field is from {1-4} or {5-8} can
be made. As with the SCH pin, the KS0127B is designed to hold the line 260 PID measurement for the entire
vertical blank period. This allows easy sampling of the PID or current field identification.
The ODD, SCH and PID signals change at different times and more than once within the video fields. Proper data
for field identification is determined by latching all three signals at the trailing edge of VS. Figure 9 shows the VS,
ODD, SCH, and PID signals and their latched values for each of the 8 possible fields. Figure 10 is the line to line
timing diagram for these signals in PAL mode.
VS
ODD
SCH
PID
Truth Table
FIELD
ODD
SCH
PIDHL
12
HLHL
HL
1
2
34
HL
LH
34
56
HLHL
LH
HL
5
78
LL
LH
6
7
Note:
ODD, SCH and PID are
measured at the trailing
edge of VS (VALIGN = 0).
8
Figure 9. PAL Vertical Timing Signals
Modified on May/04/2000
PAGE 17 OF 96
ELECTRONICS
KS0127B Data SheetMULTIMEDIA VIDEO
SCH
ODD
PID
VS
HS
Figure 10. Line to Line VS, SCH and PID Timing (PAL input)
1.3. HORIZONTAL LUMA PROCESSING
A simplified block diagram for the luma path is shown in Figure 11.
Programmable
Low Pass Filter
HYLPF
Brightness
Control
FROM ADC
Contrast
Control
Decimation
Filter
HYBWRCTRAP
HYBWI
Horizontal
Peaking
HYPKCONTBRT
Chroma
Trap
Figure 11. Horizontal Luma Processing Unit
1.3.1. Luminance DC Gain
The KS0127B can accommodate CCIR 624 M/N/H/G standards, which fall into categories of -40 or -43 sync tip
and inclusion or exclusion of 7.5 setup. The KS0127B can produce correct CCIR 601 luminance output levels by
controlling the gain and offset in the luminance path via PED. This register should be set for the appropriate input
standard. The programmable CONT and BRT registers provide the user with additional flexibility to create
non-standard luminance gain and offset values.
ELECTRONICS
Modified on May/04/2000
PAGE 18 OF 96
KS0127B Data SheetMULTIMEDIA VIDEO
Max Input
Peak White
Black Level
Blanking Level
Sync Tip
Figure 12. Luminance Signal
Luminance levels produced by the KS0127B for different broadcast standards (assuming AGCGN=0, CONT=0
and BRT=0) are summarized in Table 5.
Table 5: Luminance Digital Level Code
M/N PED=1M/N PED=0B/G/H PED=1
Signal
Level
(IRE)
ADC
(CVBS)
Y[7:0]
Level
(IRE)
ADC
(CVBS)
Y[7:0]
Level
(IRE)
ADC
(CVBS)
Y[7:0]
Max Input109255255109255255117255255
Peak White100240235100240235100229235
Black7.583160701607016
Blank070107016070
Sync-4021-4021-432
KS0127B Data
Path Equation
CY1.37CVBS100–=
CY1.288CVBS74–=
CY1.37CVBS80–=
When digital component output is desired in RGB mode, the RGBH register can be programmed to increase the
0-100% values from standard CCIR 601 levels to full range levels.The gain variations are shown in Table 6.
Table 6: RGB Output Range
RGB normal gain (RGBH=0)RGB high gain (RGBH=1)
Signal CyRGB (U,V=0)CyRGB (U,V=0)
Peak White235235255255
Black161600
Modified on May/04/2000
ELECTRONICS
PAGE 19 OF 96
KS0127B Data SheetMULTIMEDIA VIDEO
For CCIR 601 digital video input (INPSL[1:0] = 1), register UNIT must be set to 1 to produce unit gain.
1.3.2. Horizontal Luma Frequency Shaping
The luma path contains many programmable filters for different purposes. The combination of these filters will give
different frequency characteristics.
The over sampled video data from the ADC pass through a decimation filter. The decimation filter has user
programmable bandwidth. Three registers are used to control the decimation filter characteristics and each is
designed for certain purposes. The HYBWI, when set to “1”, provides extra bandwidth for very high quality video
source. The HYBWR, when set to “1”, reduces the bandwidth so high frequency noise can be eliminated. The 3-bit
register HYLPF[2:0] provides the necessary bandwidth reduction for horizontal scaling. When all three registers
are programmed to “0”, the decimation filter has the bandwidth of the normal video. The KS0127B provides the
option of bypassing the decimation filter. This option should be used only when the input video is band limited and
with low high frequency noise.
For composite video input, the notch filter can be enabled (CTRAP set to “1”) to extract the luminance. The notch
filter has different center frequencies for different input video format. User selectable peaking function is included
for edge enhancement. The notch filter should be bypassed for S-video and component video input, or if luma
comb filter is enabled.
The luminance filter characteristics have been designed to be very similar for all combinations of 60/50 Hz video
and CCIR 601/square pixel sampling rates. Figure 13 and Figure 14 show the output characteristics of the
luminance path with different filter combinations for the supported input standards and output pixel rates.
ELECTRONICS
Modified on May/04/2000
PAGE 20 OF 96
KS0127B Data SheetMULTIMEDIA VIDEO
Figure 13. Medium to High Frequency Luma Filter Characteristics (CTRAP=0)
Figure 14. Medium to Low Frequency Luma Filter Characteristics (NTSC, CTRAP=1)
Modified on May/04/2000
ELECTRONICS
PAGE 21 OF 96
KS0127B Data SheetMULTIMEDIA VIDEO
Figure 15. Medium to Low Frequency Luma Filter Characteristic (PAL, CTRAP=1)
Figure 16. Luma Filter Characteristic with Peaking On (NTSC, CTRAP=1)
Modified on May/04/2000
ELECTRONICS
PAGE 22 OF 96
KS0127B Data SheetMULTIMEDIA VIDEO
1.4. HORIZONTAL CHROMA PROCESSING
A simplified block diagram for the horizontal chroma processing unit is shown in Figure 17.
FROM ADC
Saturation
Control
COS
SIN
Low
Pass
CBW,FSEC
Low
Pass
CBW,FSEC
Tracking
V
U
Gain
Frequency
Tracking
CFTC
HUE, TSTCFR
SECAM
Frequency
Differentiator
SAT
CGTC
CKILL
TSTCGN
Auto
Detect
RTCO
Control
RTC_DTO
RTC_PID
Gain / PAL
Control
UGAIN
VGAIN
Figure 17. Horizontal Chroma Processing Unit
CKILL
Offset
Control
UOFFST
VOFFST
Color
Killer
Coring
Control
CORE
The KS0127B supports chroma input in NTSC, PAL, SECAM and component formats. The color standard is
automatically detected and the various chroma processing blocks are enabled as required for the given chroma
standard. Details of the various chroma processing blocks follow.
1.4.1. IF Compensation
For improved chroma demodulation when the input video is from a mis-tuned IF source, an IF compensation filter
is included that has variable gain for the upper chroma side band. This is controlled by the CIFCMP[1:0] bits at
location CDEM. The frequency response is shown in Figure 18. For convenience, all plots are normalized to the
NTSC modulation frequency.
Modified on May/04/2000
PAGE 23 OF 96
ELECTRONICS
KS0127B Data SheetMULTIMEDIA VIDEO
Figure 18. Chroma IF Compensation Frequency Response
1.4.2. Demodulation Gain
The demodulation gain block is controlled by feedback from the gain tracking block. For NTSC and PAL type
inputs, the gain constant is derived from a programmable reference compared against the U component of the
input video. This reference is controlled by the SAT register. The default value “0” is the correct gain (saturation for
nominal output). For SECAM type input, the feedback is calculated such that proper frequency demodulation is
obtained. When external calibration is desired, the gain feed back loop can be “opened” by setting TSTCGN=1.
The SAT then controls bits 8 through 1 of a 10 bit multiplier.
For standard auto tracking applications, it is recommended that the SAT register be used as an end user saturation
control. This register is 2’s compliment.
1.4.3. Demodulation Low Pass Filter
The demodulation circuit also contains a programmable low pass filter and a coring function for noise reduction.
The chroma low pass filter frequency response for the demodulation circuit for the various video standards are
shown in Figure 19
ELECTRONICS
Modified on May/04/2000
PAGE 24 OF 96
KS0127B Data SheetMULTIMEDIA VIDEO
Figure 19. Chroma Low Pass Filter Frequency Response
1.4.4. SECAM Demodulation
SECAM processing includes a frequency differentiator, a Cloche and a de-emphasis filter. Frequency response for
the filters are shown in Figure 20 and Figure 21.
Figure 20. Cloche Filter Frequency Characteristic
ELECTRONICS
Modified on May/04/2000
PAGE 25 OF 96
KS0127B Data SheetMULTIMEDIA VIDEO
Figure 21. De-emphasis Filter Frequency Response
1.4.5. Additional Chroma Functions
KS0127B has many built in auto detection circuits. These allow KS0127B to track any type of video standard input
automatically.
For analog component video input, the demodulation function is not enabled. The low pass filter provides a group
delay for Cb and Cr alignment. This enables the two components to be sampled by one ADC.
An RTCO serial output is provided that encodes the current chroma and pixel frequency of the decoder. This
information can be used by an Encoder running off of the decoder clock to produce proper color output. The
horizontal position of the serial signal is controlled by the HS2 location. The phasing of the DTO and the Encoder
can be reset using the RTC_DTO bit. For PAL mode, the PID polarity can be controlled with the RTC_PID bit.
1.5. COMB FILTER
Comb filters provide superior Y/C separation for composite NTSC and PAL than simple chroma trap filter. The
KS0127B contains on-chip separate 2-line stored luma and chroma comb filters. An internal signal COMB controls
for what lines the comb function is enabled. This signal is available through the PORTB pin. Combing is part of the
vertical processing which also includes vertical scaling, which is discussed in Section 1.6. A block diagram for the
vertical processing section is shown in Figure 22.
ELECTRONICS
Modified on May/04/2000
PAGE 26 OF 96
KS0127B Data SheetMULTIMEDIA VIDEO
Luma
Vertical
Scaler
Luma
Adaptive
Comb
Chroma
Vertical
Scaler
Chroma
Comb
Luma
Chroma
Horizontal
Scaler
Horizontal
Scaler
Figure 22. Vertical Processing
1.5.1. Luma Comb Filter
The luma comb filter reduces high frequency chroma leakage into the luminance path. The KS0127B uses 2-line
stored luma data for combing. Filter coefficients for different video input standards are provided and can be
selected automatically based on the video input. Filter coefficients may also be set manually.
Vertical
BW
Retention
Sum
Y
C
An optional active comb is employed for NTSC video. Selection of luma comb coefficients is based on line-to-line
chroma correlation.
Provision is made to disable luma comb for S-video, component, or digital video input. This is achieved by
programming the luma comb control register MNYCMB to “1”, and by choosing the value 3 or 4 for YCMBCO[2:0].
This will result either a 1-line or 2-line luma delay. Care must be exercised when disabling the luma comb so that
luma line delay matches the chroma path line delay.
Special filtering is applied to ensure that high vertical bandwidth is retained for the luma path.
1.5.2. Chroma Comb Filter
The chroma comb filter provides further color separation from the composite video. Filter coefficients can be
automatically selected based on the input video standard or manually set using NMCCMB and CCMBCO[2:0].
ELECTRONICS
Modified on May/04/2000
PAGE 27 OF 96
KS0127B Data SheetMULTIMEDIA VIDEO
1.6. SCALING
The KS0127B includes a high quality down scaler. The video images can be down scaled in both horizontal and
vertical direction to an arbitrary size.
1.6.1. Horizontal Scaler
The horizontal scaler uses a 5-tap 32-phase interpolation filter for luma, and a 3-tap 8-phase interpolation filter for
chroma. Scaled pixel data are stored in an on-chip FIFO so they can be sent out in a continuous stream.
Horizontal scaling ratio is programmed via the 15-bit register HSCL. The timing signal EHAV is used to indicate
when scaled pixel data is available at the video output port. EHAV can be programmed so that it is active for every
line regardless of vertical cropping and scaling. Or it can be programmed to be active only for valid video lines. For
example, Figure 23 shows the timing for CIF output assuming HAV is programmed to be active for 720 pixels. The
HSCL register is programmed with the value 4000 (hex). The trailing edge of EHAV is either aligned with the
trailing edge of HAV if the total number of scaled pixels is even, or is one pixel clock earlier if the number is odd.
Frequency response and group delay for the luma scaler are shown in Figure 24 and Figure 25, respectively. The
luma interpolation filter is designed to achieve relatively flat frequency response and minimal group delay up to the
normal video bandwidth. A flat full data path frequency response may be obtained with the help of the luma
peaking control register HYPK[1:0]. The high quality filter ensures minimal artifacts for any scaling ratio.
ELECTRONICS
Modified on May/04/2000
PAGE 28 OF 96
KS0127B Data SheetMULTIMEDIA VIDEO
Figure 24. Horizontal Luma Scaler Interpolation Filter Frequency Response
3
2.5
2
group delay (13.5MHz Clocks)
1.5
1
Figure 25. Horizontal Luma Scaler Interpolation Filter Group Delay
Because of the limited bandwidth of the chroma data, a simpler interpolation filter is used for the horizontal chroma
scaler. The frequency response and group delay for this filter are shown in Figure 26 and Figure 27, respectively.
ELECTRONICS
Modified on May/04/2000
PAGE 29 OF 96
Loading...
+ 67 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.