Four-Channel NTSC/PAL Video Decoders
With Independent Scalers, Noise Reduction, Auto
Contrast, and Flexible Output Formatter for Security and
Other Multi-Channel Video Applications
Data Manual
PRODUCTION DATA information is current as of publication date.
Products conform to specifications per the terms of the Texas
Instruments standard warranty. Production processing does not
necessarily include testing of all parameters.
•Noise reduction and auto contrasttemperature range
•Robust automatic video standard• Additional TVP5158/TVP5157 Specific Features
detection (NTSC/PAL) and switching
•Programmable hue, saturation,audio sample rate of 8 kHz or 16 kHz
sharpness, brightness and contrast
•Luma-peaking processing
•Patented architecture for locking to weak,
noisy, or unstable signals
– Four independent scalers support horizontal
and/or vertical 2:1 downscaling
– Channel multiplexing capabilities with
metadata insertion
•Pixel-interleaved mode supports up to
four-channel D1 multiplexed 8-bit output
at 108 MHz
•Supports concurrent NTSC and PAL
inputs
– Support crystal interface with on-chip
oscillator and single clock input mode
– Single 27-MHz clock input or crystal for all
standards and all channels
line-locked clock (separate for each channel)
and sampling
– Standard programmable video output format
– 3.3-V compatible I/O
– 128-pin TQFP package
– Available in commercial (0°C to 70°C)
– Integrated four-channel audio ADC with
– Support Master and Slave mode I2S Output
– Support audio cascade connection
• Additional TVP5158 Specific Features
– Enhanced channel multiplexing capability –
Line-interleaved mode
– Four-channel D1 multiplexed output at 8 bit
at 108 MHz
– Video cascade connection for 8-Ch CIF, 8-Ch
Half-D1, and 8-Ch CIF + 1-Ch D1 outputs
– Also available in Industrial (-40°C to 85°C)
temperature range
• Qualified for Automotive Applications
(AEC-Q100 Rev G – TVP5158IPNPQ1,
TVP5158IPNPRQ1)
1
Please be aware that an important notice concerning availability, standard warranty, and use in critical applications of Texas
Instruments semiconductor products and disclaimers thereto appears at the end of this data sheet.
2DaVinci is a trademark of Texas Instruments.
3Macrovision is a trademark of Macrovision Corporation.
4All other trademarks are the property of their respective owners.
PRODUCTION DATA information is current as of publication date.
Products conform to specifications per the terms of the Texas
Instruments standard warranty. Production processing does not
necessarily include testing of all parameters.
•Security/surveillance digital video recorders/servers and PCI products
•Automotive infotainment video hub
•Large format video wall displays
•Game systems
1.3Related Products
•TVP5154A
•TVP5150AM1
•TVP5146M2
•TVP5147M1
1.4Trademarks
DaVinci, PowerPAD are trademarks of Texas Instruments.
Macrovision is a trademark of Macrovision Corporation.
Other trademarks are the property of their respective owners.
1.5Document Conventions
Throughout this data manual, several conventions are used to convey information. These conventions are
as follows:
•To identify a binary number or field, a lower case b follows the numbers. For example: 000b is a 3-bit
binary field.
•To identify a hexadecimal number or field, a lower case h follows the numbers. For example: 8AFh is a
12-bit hexadecimal field.
•All other numbers that appear in this document that do not have either a b or h following the number
are assumed to be decimal format.
•If the signal or terminal name has a bar above the name (for example, RESETB), then this indicates
the logical NOT function. When asserted, this signal is a logic low, 0, or 0b.
•RSVD indicates that the referenced item is reserved.
www.ti.com
1.6Description
The TVP5158, TVP5157, and TVP5156 devices are 4-channel, high-quality NTSC/PAL video decoder that
digitizes and decodes all popular base-band analog video formats into digital video output. Each channel
of this decoder includes 10-bit 27-MSPS A/D converter (ADC). Preceding each ADC in the device, the
corresponding analog channel contains an analog circuit that clamps the input to a reference voltage and
applies the gain.
Composite input signal is sampled at 2x the ITU-R BT.601 clock frequency, line-locked alignment, and is
then decimated to the 1x pixel rate. CVBS decoding uses five-line adaptive comb filtering for both the
luma and chroma data paths to reduce both cross-luma and cross-chroma artifacts. A chroma trap filter is
also available. On CVBS inputs, the user can control video characteristics such as contrast, brightness,
saturation, and hue via an I2C host port interface. Furthermore, luma peaking (sharpness) with
programmable gain is included.
All 4 channels are independently controllable. These decoders share a single clock input for all channels
and for all supported standards.
TVP5158 provides a glueless audio and video interface to TI DaVinci™ video processors. Video output
ports support 8-bit ITU-R BT.656 and 16-bit 4:2:2 YCbCr with embedded synchronization. TVP5158
supports multiplexed pixel-interleaved and line-interleaved mode video outputs with metadata insertion.
TVP5158 and TVP5157 integrate 4-Ch audio ADCs to reduce the BOM cost for surveillance market.
Multiple TVP5158 devices can be cascade connected to support up to 8-Ch Video or 16-Ch audio
processing.
Noise reduction and auto contrast functions improve the video quality under low light condition which is
very critical for surveillance products.
The TVP5158, TVP5157, and TVP5156 can be programmed by using a single I2C serial interface. I2C
commands can be sent to one or more decoder cores simultaneously, reducing the amount of I2C activity
necessary to configure each core. This is especially useful for fast downloading modified firmware to the
decoder cores.
TVP5158, TVP5157, and TVP5156 use 1.1-V, 1.8-V, and 3.3-V power supplies for the analog/digital core
and I/O. These devices are available in a 128-pin TQFP package.
SLES243D–JULY 2009–REVISED OCTOBER 2010
Table 1-1. Device Options
Device Name4-Ch Audio ADCLine-Interleaved Modes
TVP5156NoNo
TVP5157YesNo
TVP5158YesYes
1.7Ordering Information
(3)
(3)
(1) (2)
PACKAGE OPTION
Tray
Tape and reel
T
A
0°C to 70°C
-40°C to 85°C
(1) For the most current package and ordering information, see the Package Option Addendum at the end of this document, or see the TI
web site at www.ti.com.
(2) Package drawings, thermal data, and symbolization are available at www.ti.com/packaging.
(3) AEC-Q100 Rev G certified
VIN_1_P108IAnalog video input for ADC channel 1.
VIN_1_N109ICommon-mode reference input for ADC channel 1.
VIN_2_P112IAnalog video input for ADC channel 2.
VIN_2_N113ICommon-mode reference input for ADC channel 2.
VIN_3_P121IAnalog video input for ADC channel 3.
VIN_3_N122ICommon-mode reference input for ADC channel 3.
VIN_4_P125IAnalog video input for ADC channel 4.
VIN_4_N126ICommon-mode reference input for ADC channels.
REXT_2K116IExternal resistor for AFE bias generator. Connect external 1.8kΩ resistor to ground.
AIN_195IAnalog audio input for channel 1 (No Connect for TVP5156 Only)
AIN_294IAnalog audio input for channel 2 (No Connect for TVP5156 Only)
AIN_393IAnalog audio input for channel 3 (No Connect for TVP5156 Only)
AIN_492IAnalog audio input for channel 4 (No Connect for TVP5156 Only)
XTAL_IN99I
XTAL_REF100GCrystal reference. Connected to analog ground internally.
XTAL_OUT101O
Analog Power
VDDA_1_1103, 106, 119P1.1V analog supply
VDDA_1_8114, 115, 120,P1.8V analog supply
VDDA_3_3128P3.3V analog supply for all 4 video channels
VSSAGAnalog ground
Digital Power
VSS49, 55, 61, 65,GDigital ground
VDD_1_135, 44, 52, 64,PDigital core supply. Connect to 1.1-V digital supply.
VDD_3_3PDigital I/O supply. Connect to 3.3-V digital supply.
Digital Section
INTREQ2OInterrupt request. Interrupt signal to host processor.
RESETB3IReset. An active low signal that controls the reset state.
SCL4I/OI2C serial clock (open drain)
SDA5I/OI2C serial data (open drain)
OSC_OUT97OBuffered crystal oscillator output. 1.8-V compatible.
OCLK_P51OOutput data clock+. All 4 digital video output ports are synchronized to this clock.
OCLK_N/CLKIN50I/O
DVO_A_[7:0]ODigital video output data bus.
91, 102, 107,
127
96, 98, 104,
105, 110, 111,
117, 118, 123,
124
1, 6, 12, 14, 20,
26, 33, 38, 47,
73, 79, 82, 87,
90
13, 18, 23, 32,
67, 76, 84
15, 29, 41, 58,
70, 81
68, 69, 71, 72,
74, 75, 77, 78
I/ODESCRIPTION
External clock reference input. It may be connected to external oscillator with 1.8-V compatible
clock signal or 27.0-MHz crystal oscillator.
External clock reference output. Not connected if XTAL_IN is driven by an external
single-ended oscillator.
Output data clock- for 2-Ch time-multiplexed mode or data clock input for 8-Ch video cascade
mode
I2CA166II2C slave address bit 1
I2CA248II2C slave address bit 2
Digital Audio Section (Not supported on TVP5156)
BCLK_R85I/O
LRCLK_R86I/O
SD_R88OI2S serial data output for recording.
SD_M89OI2S serial data output for mixed audio or recording.
SD_CO83OAudio serial data output for cascade mode
LRCLK_CI16II2S left/right clock input for cascade mode. Also known as I2S word select (WS).
BCLK_CI17II2S bit clock input for cascade mode. Also known as I2S serial clock (SCK).
SD_CI19IAudio serial data input for cascade mode.
No Connect Pins
T1, T2, T3, T4,7, 8, 9, 10, 11,
T5, NC34
53, 54, 56, 57,
59, 60, 62, 63
36, 37, 39, 40,Digital video output data bus. In cascade mode, all pins operate as input from another
42, 43, 45, 46TVP5158 device.
21, 22, 24, 25,Digital video output data bus. In cascade mode, all pins operate as input from another
27, 28, 30, 31TVP5158 device.
I/ODESCRIPTION
I2S bit clock for recording. Also known as I2S serial clock (SCK). Supports master and slave
modes.
I2S left/right clock for recording. Also known as I2S word select (WS). Supports master and
slave modes.
Each video decoder accepts one composite video input and performs video clamping, anti-aliasing
filtering, video amplification, A/D conversion, and gain and offset adjustments to center the digitized video
signal. Figure 3-1 shows the video analog processing and ADC block diagram.
Figure 3-1. Video Analog Processing and ADC Block Diagram
3.1.1Analog Video Input
Supports NTSC (J, M, 4.43) and PAL (B, D, G, H, I, M, N, Nc, 60) video standards. Each video decoder
channel supports a composite video input with a pseudo-differential pin which improves the noise
immunity and analog performance.
www.ti.com
Each video decoder input should be ac-coupled through a 0.1-µF capacitor. The nominal parallel
termination resistor before the input to the device is 75 Ω.
Each video decoder integrates an anti-aliasing filter to provide good stop-band rejection on the analog
video input signal. Figure 3-2 shows the frequency response of the anti-aliasing filter.
Figure 3-2. Anti-Aliasing Filter Frequency Response
An internal clamping circuit provides dc restoration for all four analog composite video inputs. The dc
restoration circuit (sync-tip clamp) restores sync-tip level of the ac-coupled composite video signal to a
fixed dc level near the bottom of the A/D converter range.
3.1.3A/D Converter
All ADCs have a resolution of 10 bits and can operate at 27 MSPS. Each A/D channel receives a clock
from the on-chip phase-locked loop (PLL) at a nominal frequency of 27 MHz. All ADC reference voltages
are generated internally.
3.2Digital Video Processing
Digital Video Processing block receives digitized video signals from the ADCs and performs composite
processing and YCbCr signal enhancements. The digital data output can be programmed to two formats:
ITU-R BT.656 8-bit 4:2:2 with embedded syncs or 16-bit 4:2:2 with embedded syncs. The circuit also
detects pseudo-sync pulses, AGC pulses, and color striping in Macrovision-encoded copy-protected
material.
3.2.12x Decimation Filter
All input signals are over-sampled by a factor of 2 (by 27-MHz clock). The A/D outputs initially pass
through decimation filters that reduce the data rate to 1x the pixel rate. The decimation filter is a half-band
filter. Over-sampling and decimation filtering can effectively increase the overall signal-to-noise ratio by
3 dB.
SLES243D–JULY 2009–REVISED OCTOBER 2010
3.2.2Automatic Gain Control
The automatic gain control (AGC) can be enabled and can adjust the signal amplitude controlled by 14-bit
digital gain stage after the ADC. The AGC algorithms can use up to four amplitude references: sync
height, color burst amplitude, composite peak, and luma peak.
The specific amplitude references being used by the AGC algorithms can be controlled using the AGC
white peak processing register located at sub-address 2Dh. The gain increment speed and gain increment
delay can be controlled using the AGC increment speed register located at sub-address 29h and the AGC
increment delay register located at sub-address 2Ah. The gain decrement speed and gain decrement
delay can be controlled using the AGC decrement speed register located at sub-address 2Bh and the
AGC decrement delay register located at sub-address 2Ch.
3.2.3Composite Processor
This Composite Processor circuit receives a digitized composite signal from the ADCs and performs sync
and Y/C separation, chroma demodulation for PAL/NTSC, and YUV signal enhancements. The slice levels
of the sync separator are adaptive. The slice levels continually adapt to changes in the back-porch and
sync-tip levels. The 10-bit composite video is multiplied by the sub carrier signals in the quadrature
demodulator to generate U and V color difference signals. The U and V signals are then sent to low-pass
filters to achieve the desired bandwidth. An adaptive 5-line comb filter separates UV from Y based on the
unique property of color phase shifts from line to line. The chroma is re-modulated through a quadrature
modulator and subtracted from line-delayed composite video to generate luma. This form of Y/C
separation is completely complementary, thus there is no loss of information. However, in some
applications, it is desirable to limit the U/V bandwidth to avoid crosstalk. In that case, notch filters can be
turned on. To accommodate some viewing preferences, a peaking filter is also available in the luma path.
Contrast, brightness, sharpness, hue, and saturation controls are programmable through the I2C host port.
Figure 3-3 shows the block diagram of Composite Processor.
High filter bandwidth preserves sharp color transitions and produces crisp color boundaries. However, for
nonstandard video sources that have asymmetrical U and V side bands, it is desirable to limit the filter
bandwidth to avoid UV crosstalk. The color low-pass filter bandwidth is programmable to enable one of the
three notch filters. Figure 3-4 and Figure 3-5 represent the frequency responses of the wideband color
low-pass filters.
Figure 3-4. Color Low-Pass Filter Frequency Response
Figure 3-5. Color Low-Pass Filter with Filter Characteristics, NTSC/PAL ITU-R BT.601 Sampling
3.2.3.2Y/C Separation
Y/C separation can be done using adaptive 5-line (5-H delay) comb filters or a chroma trap filter. The
comb filter can be selectively bypassed in the luma or chroma path. If the comb filter is bypassed in the
luma path, then chroma trap filters are used which are shown in Figure 3-6 and Figure 3-7. The TI
patented adaptive comb filter algorithm reduces artifacts such as hanging dots at color boundaries. It
detects and properly handles false colors in high-frequency luminance images such as a multiburst pattern
or circle pattern.
Figure 3-7. Chroma Trap Filter Frequency Response, PAL ITU-R BT.601 Sampling
3.2.4Luminance Processing
The digitized composite video signal passes through either a luminance comb filter or a chroma trap filter,
either of which removes chrominance information from the composite signal to generate a luminance
signal. The luminance signal is then fed into the input of a peaking circuit. Figure 3-8 shows the basic
functions of the luminance data path. A peaking filter (edge enhancer) amplifies high-frequency
components of the luminance signal. Figure 3-9 shows the characteristics of the peaking filter at four
different gain settings that are user-programmable via the I2C interface.
AVID or active video cropping provides a means to decrease the amount of video data output. This is
accomplished by horizontally blanking a number of AVID pulses and by vertically blanking a number of
lines per frame. Horizontal cropping can be enabled/disabled using bit-6 of address B1h. When line
cropping is enabled, active video will be reduced from 720 to 704 pixels for unscaled video and from 360
to 352 pixels for down-scaled video.
SLES243D–JULY 2009–REVISED OCTOBER 2010
When line cropping is enabled, the TVP5158 crops an equal amount from both the start and end of active
video. Register 8Ch can be used to delay both the start and end of active video. It allows selecting which
704 pixels out of 720 are actually being used for active video when line cropping is enabled.
3.4Embedded Syncs
Standards with embedded syncs insert SAV and EAV codes into the data stream at the beginning and end
of horizontal blanking. These codes contain the V and F bits which also define vertical timing. F and V
change on EAV. Table 3-1 gives the format of the SAV and EAV codes.
H equals 1 always indicates EAV. H equals 0 always indicates SAV. The alignment of V and F to the line
and field counter varies depending on the standard. Please refer to ITU-R BT.656 for more information on
embedded syncs.
The P bits are protection bits:
P3 = V xor H
P2 = F xor H
P1 = F xor V
P0 = F xor V xor H
Table 3-1. EAV and SAV Sequence
8-BIT DATA
D7 (MSB)D6D5D4D3D2D1D0
Preamble11111111
Preamble00000000
Preamble00000000
Status word1FVHP3P2P1P0
Each video decoder has an independent horizontal and vertical scaler, which supports D1 to half-D1 or
CIF conversion. Table 3-2 gives the details of video resolution including un-cropped and cropped.
Table 3-3 shows the video resolutions converted by the scaler.
Table 3-2. Standard Video Resolutions
Format
D1720 x 480720 x 576704 x 480704 x 576
Half-D1360 x 480360 x 576352 x 480352 x 576
CIF360 x 240360 x 288352 x 240352 x 288
Table 3-3. Video Resolutions Converted by the Scaler
A video sequence shot under low light condition, which is typical of video surveillance applications, can
contain lots of noise. Human eyes are very sensitive to oscillating signals, the visual quality degenerates
significantly even when the noise level is small.
Each video decoder uses a TI proprietary spatial filter to reduce video noise. For each frame of image, the
video noise filter (VNF) produces an estimate of the Y/U/V noise. Based on the noise estimates, the
firmware adjusts the threshold for Y/U/V filtering. The filtered video shows improved video quality and
lower compression bit-rate. The firmware can also utilize the Y/U/V noise estimates to make decisions to
disable color if the video noise is determined to be too high. This "color killer" decision bit can be used to
control another module that implements the color killing function.
The Noise Reduction can be controlled using I2C registers from 50h to 5Fh. This module can also be set
to bypass mode by I2C register 5Dh (Bit 0).
3.7Auto Contrast
The Auto Contrast (AC) module can adjust the picture brightness automatically or manually (user
programmable) for better image quality. The goal of AC processing is to make the dark area brighter and
high-light area dimmer. This makes it possible for the viewer to see details hidden in the shadows. It also
prevents loss of details in the washed-out high light area. The AC processing is mostly for video
surveillance applications.
For each frame of image, the auto contrast module collects the statistics of its Y (luminance) values. The
AC algorithm implemented in the firmware processes the statistics and generates a look-up table (LUT).
This LUT is used to map each incoming pixel Y value to an output pixel Y value for the next frame of
image. The LUT is updated during the blanking period between two frames.
The Auto Contrast Mode can be controlled by using I2C registers 0Fh. This module can also be set to
disable mode by I2C register 0Fh (Bit 1:0).
The output formatter is responsible for generating the output digital video stream. Table 3-4 provides a
summary of line frequencies, data rates, and pixel counts for different input standards. TVP5158 supports
non-interleaved output mode, pixel-interleaved output mode and line-interleaved output mode. The
non-interleaved mode is similar to the TVP5154A device, except that a single fixed clock output is used. In
the interleaved modes, the video output data from multiple decoder channels are multiplexed together and
then output to a single 8-bit or 16-bit port. The video output data from selected channels can be
interleaved on a pixel or line basis.
Table 3-4. Summary of Line Frequencies, Data Rates and Pixel Counts for Different Standards
StandardsActive PixelsLines per
(ITU-R BT.601)per LineFrame
NTSC-J, M85872052513.53.57954515.73426
NTSC-4.4385872052513.54.4336187515.73426
PAL-M85872052513.53.5756114915.73426
PAL-6085872052513.54.4336187515.73426
PAL-B, D, G, H, I86472062513.54.4336187515.625
PAL-N86472062513.54.4336187515.625
PAL-Nc86472062513.53.5820562515.625
Pixels per LineFrequencyFrequencyRate
PixelColor SubcarrierHorizontal Line
(MHz)(MHz)(kHz)
3.8.1Non-Interleaved Mode
In the non-interleaved mode, the YCbCr digital output is programmed as 8-bit ITU-R BT.656 parallel
interface standard. Depending on which output mode is selected, the output for each channel can be
un-scaled data or scaled data. Also each video output port can be selected to output the video data from
any 1 of 4 video decoders. Table 3-5 shows the detailed information about non-interleaved mode.
Table 3-5. Output Ports Configuration for Non-Interleaved Mode
Video OutputCascadeI2C Address:OCLK
FormatStageB0h(MHz)
1-Ch D1n/a00h27Any 1 of 4 ChAny 1 of 4 ChAny 1 of 4 ChAny 1 of 4 Ch
1-Ch Half-D1n/a02h27Any 1 of 4 ChAny 1 of 4 ChAny 1 of 4 ChAny 1 of 4 Ch
1-Ch CIFn/a03h27Any 1 of 4 ChAny 1 of 4 ChAny 1 of 4 ChAny 1 of 4 Ch
Port APort BPort CPort D
3.8.2Pixel-Interleaved Mode
Each video decoder supports multiplexing two or four channels ITU-R BT.656 format data together on a
pixel basis. The output from each video decoder channel is still ITU-R BT.656 format. After the processing
in output formatter, two or four channels video data has been interleaved together by strictly one pixel
from each channel.
The pixel-interleaved mode is dedicated for the backend chip which has limited video input ports.
Table 3-6 gives the output port configuration for pixel-interleaved mode.
Table 3-6. Output Ports Configuration for Pixel-Interleaved Mode
Video OutputCascadeI2C Address:OCLK
FormatStageB0h(MHz)
2-Ch D1n/a50h54Any 2 of 4 ChAny 2 of 4 ChHi-ZHi-Z
4-Ch D1n/a60h108All 4 ChHi-ZHi-ZHi-Z
4-Ch Half-D1n/a62h54All 4 ChHi-ZHi-ZHi-Z
4-Ch CIFn/a63h54All 4 ChHi-ZHi-ZHi-Z
Port APort BPort CPort D
3.8.2.12-Ch Pixel-Interleaved Mode
In 2-Ch pixel-interleaved mode, the video output data with D1 resolution from two video channels is
multiplexed pixel by pixel at 54 MHz. The output ports DVO_A and DVO_B are used in this mode. The
output clocks OCLK_P and OCLK_N are synchronized with each channel so that the backend chip can
de-multiplexed each video channel data easily. The video output from each channel is compatible with
ITU-R BT.656 format. Figure 3-10 shows the timing diagram for 2-Ch pixel-interleaved mode.
In 4-Ch pixel-interleaved mode, the video output data with D1 resolution from four video channels is
multiplexed pixel by pixel at 108 MHz. The output DVO_A is used in this mode. The output clock OCLK_P
is synchronized with all four channels data. Each channel video data is compatible with ITU-R BT.656
format. Figure 3-11 shows the timing diagram for 4-Ch pixel-interleaved mode.
In 4-Ch pixel-interleaved mode, TVP5158 also supports Half-D1 and CIF format data multiplexed at 54
MHz. The output DVO_A is used in this mode. The output clock OCLK_P is synchronized with all four
channels data.
3.8.2.3Metadata Insertion for Non-Interleave Mode and Pixel-Interleaved Mode
In non-interleaved mode and pixel-interleaved mode, the video detection status (VDET) has also been
inserted in MSB of SAV/EAV control byte. Table 3-7 shows VDET status insertion in SAV/EAV codes.
Table 3-7. VDET Statues Insertion in SAV/EAV Codes
In the pixel-interleaved mode, Channel ID is inserted in the horizontal blanking code as Table 3-8. The
backend chip can easily identify the video data from which video decoder channel by inserted Channel ID.
Table 3-8. Channel ID Insertion in Horizontal Blanking Code
The TVP5158 supports 2-Ch, 4-Ch, and 8-Ch line-interleaved modes. In the line-interleaved mode, the
video channels are multiplexed together on a line-by-line basis. Compared to the pixel-interleaved mode,
the line-interleaved mode significantly reduces the code complexity and MIPS consumption of the backend
processor. The 8-Ch modes require connecting two TVP5158 devices together using a video cascade
interface (see Section 3.8.3.3). The TVP5158 also supports different image resolutions (for example, D1,
Half-D1, and CIF) in the line-interleaved mode. All supported line-interleaved modes are shown in
Table 3-10.
Table 3-10. Output Ports Configuration for Line-Interleaved Mode
Video OutputCascadeI2C Address:OCLK
FormatStageB0h(MHz)
2-Ch D1n/a90h54Any 2 of 4 ChAny 2 of 4 ChHi-ZHi-Z
4-Ch D1n/aA0h108All 4 ChHi-ZHi-ZHi-Z
4-Ch Half-D1n/aA2h54All 4 ChHi-ZHi-ZHi-Z
4-Ch CIFn/aA3h27All 4 ChHi-ZHi-ZHi-Z
4-Ch D1All 4 ChAll 4 Ch
(16-bit)(Y data)(C data)
4-Ch Half-D1All 4 ChAll 4 Ch
(16-bit)(Y data)(C data)
8-Ch Half-D1
8-Ch CIF
4-Ch Half-D1 +4 Ch Half-D1 +
1-Ch D1Any 1 of 4 D1
4-Ch CIF +4-Ch CIF + Any
1-Ch D11 of 4 D1
8-Ch CIF +
1-Ch D1
n/aA8h54Hi-ZHi-Z
n/aAAh27Hi-ZHi-Z
1stB2h108Hi-ZHi-Z
2ndB6h54Hi-ZHi-ZHi-Z
1stB3h54Hi-ZHi-Z4-Ch CIF Input
2ndB7h27Hi-ZHi-ZHi-Z
n/aE2h108Hi-ZHi-ZHi-Z
n/aE3h54Hi-ZHi-ZHi-Z
1stF3h108Hi-Z1-Ch D1 Input4-Ch CIF Input
2ndF7h271-Ch D1 OutputHi-ZHi-Z
Port APort BPort CPort D
8-Ch Half-D14-Ch Half-D1
OutputInput
4-Ch Half-D1
Output
8-Ch CIF
Output
4-Ch CIF
Output
8-Ch CIF + Any
1 of 8 D1
4-Ch CIF
Output
www.ti.com
3.8.3.12-Ch Line-Interleaved Mode
TVP5158 supports 2-Ch line-interleaved mode at 54 MHz. The video output data with D1 resolution from
any two video channels is multiplexed together on a line basis. The output ports DVO_A and DVO_B are
used in this mode. The output clock OCLK_P is synchronized with both output ports.
3.8.3.24-Ch Line-Interleaved Mode
In 4-Ch line-interleaved mode, the video output data from all 4 channels is multiplexed together on a line
basis. The output resolution of video data can be D1, Half-D1 or CIF. For D1 and Half-D1 output
resolutions, the video output port can be configured to support 8-bit BT.656 or 16-Bit YCbCr 4:2:2 data
with embedded sync. Port DVO_A is used for 8-bit output. Ports DVO_A and DVO_B are used for 16-Bit
output. The output clock OCLK_P is synchronized with all four output ports.
TVP5158 supports multiplexing 4-Ch CIF and 1-Ch D1 data together and then output through DVO_A at
54 MHz. 1-Ch D1 can be from any one of 4 video channels. In typical surveillance applications, CIF
resolution is used for recording and D1 resolution is used for video preview.
TVP5158 also supports multiplexing 4-Ch Half-D1 and 1-Ch D1 data together and then output through
DVO_A at 108 MHz. The backend chip can use Half-D1 to generate CIF format by dropped one field.
Pleas note that the line-interleaved mode does NOT strictly output one line from each decoder channel
sequentially. The order of multiplexed the video line data is based on the availability of video output data
from each decoder channel. Therefore, it is possible to output two consecutive lines from the same
decoder channel or to skip one decoder channel output.
3.8.3.38-Ch Line-Interleaved Mode
Two TVP5158 devices can be cascade connected and work as single 8-Ch video decoder. In cascade
mode, the port DVO_C and DVO_D of master TVP5158 (first stage) can be configured as the video input
interface. The DVO_A and DVO_B of master TVP5158 are configured as the output interface for two
devices. This mode is dedicated for the backend chip with extremely limited input ports.
In the video cascade mode, the open-drain interrupt request (INTREQ) outputs from the first and second
stages can be combined using a wired-OR connection.
Typical applications with cascade mode show in the following diagrams.
Figure 3-12 shows the Cascade Connection for 16-Ch CIF Recoding and Multi-Ch CIF Preview.
Figure 3-13 shows the Cascade Connection for 16-Ch CIF Recoding and Multi-Ch Half-D1 Preview.
Figure 3-14 shows the Cascade Connection for 16-Ch CIF Recoding and 2-Ch D1/Multi-Ch CIF
Preview.
SLES243D–JULY 2009–REVISED OCTOBER 2010
Figure 3-12. Cascade Connection for 16-Ch CIF Recoding and Multi-Ch CIF Preview
Figure 3-14. Cascade Connection for 16-Ch CIF Recoding and 2-Ch D1/Multi-Ch CIF Preview
Submit Documentation Feedback
Product Folder Link(s): TVP5158 TVP5157 TVP5156
FFh 00h 00h XYh
SAV
SC3 SC3 SC2 SC2
Channel Data
SC1 SC1 SC0 SC0
SAV for
encapsulated
frame
Cb Y Cr Y
FFh 00h 00h XYh
EAV
Start code for
channel data
EAV for
encapsulated
frame
Horizontal Active Period (SAV2EAV)
Horizontal Blanking Interval
64 clock cycles (fixed)
EAV2SAVStart Code
TVP5158, TVP5157, TVP5156
www.ti.com
3.8.3.4Hybrid Modes
The TVP5158 also supports multiplexing both scaled and unscaled data streams in the line-interleaved
mode. In these hybrid modes (4-Ch Half-D1 + 1-Ch D1, 4-Ch CIF + 1-Ch D1, and 8-Ch CIF + 1-Ch D1),
the D1 line is split into two equal-length half lines and then multiplexed with the other CIF lines. Therefore,
all video data is actually multiplexed by CIF line length. In these hybrid modes, the line cropping mode
affects both the scaled and unscaled data streams. The line cropping mode is controlled by bit 6 of I2C
register B1h.
3.8.3.5Metadata Insertion for Line-Interleaved Mode
In the line-interleaved mode, the video data is rearranged on a line-by-line basis. There can be no
guaranteed output line order, because all analog video inputs are not synchronized. To be compatible with
general backend BT.656 decoder, the video data is encapsulated on TVP5158 output so that all input data
is preserved and output data is understandable to a BT.656 decoder.
To prevent confusion over image line count and vertical blanking appearing haphazardly, SAV/EAV codes
have FID and V data stripped and replaced with FID = V = 0. Because vertical blanking in the input is
being masked out, artificial vertical sync is inserted every encapsulated frame (a.k.a., super frame). Thus,
to the unaware BT.656 decoder, the stream appears to be progressive data with 2 lines of vertical
blanking. The default super-frame format and timing for each line-interleaved output format is shown in
Table 3-11.
Table 3-11. Default Super-Frame Format and Timing
SLES243D–JULY 2009–REVISED OCTOBER 2010
Video Output FormatsEAV2SAV (bytes)SAV2EAV (bytes)
TMS320DM6467) interfaces to the first stage.
0: First stage (channels 1 to 4)
1: Second stage (channels 5 to 8)
2-bit Channel ID. Video decoder channel number.
00: Channel 1
10: Channel 3
11: Channel 4
Active-high beginning of line flag. Used in split-line mode which may be required for hybrid formats (e.g.
1-Ch D1 + 8-Ch CIF). Set high when the current encapsulated line of channel data includes the beginning of
a video line.
0: BOL not included (2nd half of split line)
1: BOL included (1st half of split line or full line)
Active-high end of line flag. Used in split-line mode which may be required for hybrid formats (e.g. 1-Ch D1 +
8-Ch CIF). Set high when the current line of channel data includes the end of a video line.
0: EOL not included (1st half of split line)
1: EOL included (2nd half of split line or full line)
Active-high video detection status
1: Video detected
Submit Documentation Feedback
Product Folder Link(s): TVP5158 TVP5157 TVP5156
Loading...
+ 75 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.