How to setup tvp5151 video decoder

From IGEP - ISEE Wiki

Revision as of 13:48, 12 May 2011 by Manel Caro (talk | contribs)

Jump to: navigation, search

What is?

The TVP5151 device is an ultralow-power NTSC/PAL/SECAM video decoder. Available in a space-saving 48-terminal PBGA package or a 32-terminal TQFP package, the TVP5151 decoder converts NTSC, PAL, and SECAM video signals to 8-bit ITU-R BT.656 format. Discrete syncs are also available. The optimized architecture of the TVP5151 decoder allows for ultralow power consumption. The decoder consumes 138-mW power under typical operating conditions and consumes less than 1 mW in power-down mode, considerably increasing battery life in portable applications. The decoder uses just one crystal for all supported standards. The TVP5151 decoder can be programmed using an I2C serial interface.

The TVP5151 decoder converts baseband analog video into digital YCbCr 4:2:2 component video.

TVP5151 Features

  • Accepts NTSC (J, M, 4.43), PAL (B, D, G, H, I, M, N, Nc) and SECAM (B, D, G, K, K1, L) Video.
  • Supports ITU-R BT.601 Standard Sampling.
  • High-Speed 9-Bit Analog-to-Digital Converter (ADC).
  • Two Composite Inputs or One S-Video Input.
  • Fully Differential CMOS Analog Preprocessing Channels With Clamping and Automatic Gain Control (AGC) for Best Signal-to-Noise (S/N) Performance.
  • Ultralow Power Consumption.
  • Power-Down Mode: <1 mW
  • Brightness, Saturation, Hue, and Sharpness Control Through I2C
  • Complementary 4-Line (3-H Delay) Adaptive Comb Filters for Both Cross-Luminance and Cross-Chrominance Noise Reduction
  • Single 27.000-MHz Crystal for All Standards
  • Internal Phase-Locked Loop (PLL) for Line-Locked Clock and Sampling
  • Subcarrier Genlock Output for Synchronizing Color Subcarrier of External Encoder
  • Variable Digital I/O Supply Voltage Range from 1.8 V to 3.3 V
  • Standard Programmable Video Output Format:
    • ITU-R BT.656, 8-Bit 4:2:2 With Embedded Syncs
    • 8-Bit 4:2:2 With Discrete Syncs
  • Macrovision™ Copy Protection Detection
  • Advanced Programmable Video Output Formats

Output Formatter

The YCbCr digital output can be programmed as 8-bit 4:2:2 or 8-bit ITU-R BT.656 parallel interface standard.
Summary of Line Frequencies, Data Rates, and Pixel Counts

STANDARDS
(ITU-R BT.601)
PIXELS PER
LINE
ACTIVE
PIXELS PER
LINE
LINES PER
FRAME
NTSC-J, M 858 720 525
NTSC-4.43 858 720 525
PAL-M 858 720 525
PAL-B, D, G, H, I 864 720 625
PAL-N 864 720 625
PAL-Nc 864 720 625
SECAM 864 720 625










Get the ISP kernel branch

You can access to our latest isp kernel branch using our git repository from here.

Get a local copy from our repository.

git clone git://git.igep.es/pub/scm/linux-omap-2.6.git
git checkout linux-2.6.35.y-omap3isp

Build the Kernel

Configure the kernel

source /usr/local/poky/eabi-glibc/environment-setup-arm-none-linux-gnueabi
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- igep0020_defconfig
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage modules
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules_install INSTALL_MOD_PATH=[path to your target rootfs

By default the iommu2, tvp5151 and omap3-isp drivers be build inside the kernel but you can configure it for build as module using this alternative configuration file.

If you wish use this alternative configuration file copy it in the kernel sources root directory and rename the file as:

mv config .config

Build the kernel with this configuration file:

source /usr/local/poky/eabi-glibc/environment-setup-arm-none-linux-gnueabi
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage modules
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules_install INSTALL_MOD_PATH=[path to your target rootfs

After build the kernel and the modules you must install it on the IGEP board.

TVP5151 Setup

You need the program media-ctl this program it's useful for configure the ISP.

If you use the iommu2, tvp5151 and isp as modules before start you must insert it inside the kernel as:

modprobe iommu2
modprobe omap3-isp

The insert order must be first the iommu2 and after that the omap3-isp.

Seteps for configure the ISP and TVP5151

Configure the right ISP routing.

./media-ctl -r -l '"tvp5150 2-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3 ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'

Configure the video capture setup.

./media-ctl --set-format '"tvp5150 2-005c":0 [UYVY 720x628]'

Play with TVP5151

You can use for get the captured images yavta or gstreamer as live stream.

This is the suggested yavta capture setup:

./yavta -f UYVY -s 720x628 -n 4 --capture=4 -F /dev/video2

or the gstreamer pipeline setup:

gst-launch-0.10 -v v4l2src device=/dev/video2 queue-size=2 ! video/x-raw-yuv,format=\(fourcc\)UYVY,width=720,height=628 ! omapdmaifbsink

Dependeces

  • IGEPv2 board with a Expansion board.
  • Camera with PAL output live video.
  • ISEE IGEPv2 toolchain (IGEP VM suggested)
  • Gstreamer.