ni tutorial 9492

Upload: karkera

Post on 10-Jan-2016

213 views

Category:

Documents


0 download

DESCRIPTION

Digital Video 101 -Fundamentals of digital video signals and the components of a digital video system

TRANSCRIPT

  • 1/6 www.ni.com

    1. 2. 3. 4. 5. 6. 7.

    Digital Video 101Publish Date: Jul 08, 2011

    Overview

    Digital video interfaces in consumer electronics devices such as Blu-ray players, set-top boxes, cell phones, and HD TVs continueto provide a number of challenges for test engineers, partly because the digital video testing comes with a completely new set ofrules than traditional analog video testing. This tutorial covers the fundamentals of digital video signals and the components of adigital video system that are adjustable or measureable for any application. It also discusses some of the key challenges thatengineers encounter when testing digital video in new technologies.

    Table of Contents

    Understanding Digital Video SignalsDigital Video Signal LevelsInterlaced versus Progressive ScanningDigital Video Sample Rates and TimingDigital Video Compression FormatsDigital InterfacesRelated Resources

    1. Understanding Digital Video Signals

    Although digital signals can be transmitted in composite format, most digital carriers transmit using component video. Componentvideo carries each of the three digital signals on separate lines, making the signals less susceptible to degradation and increasingthe signal-to-noise ratio (SNR). Component digital video transfers digital data primarily in one of two formats: YCbCr or RGB. YCbCr Component Digital Video

    Y The luma signal (or luminance) contains the intensity (brightness or darkness) information of the pixel.Cb The blue-difference signal contains the blue color information of the pixel.Cr The red-difference signal contains the red color information of the pixel.

    The YCbCr format takes advantage of the fact that human sight is more sensitive to contrast in brightness than to contrast in color.Many coding and decoding algorithms (codecs) like MPEG 2 and MPEG 4 use YCbCr format rather than RGB because the colordata can be updated less frequently without a perceivable difference. In other words, the luminance data is sampled at higherrates than the color difference signals to obtain a higher-perceived-quality final video signal while minimizing the required datathroughput. RGB Component Digital Video

    R The red color signal contains the red color value of the pixel.G The green color signal contains the red color value of the image pixel.B The blue color signal contains the red color value of the image pixel.

    RGB is used regularly in computer-based systems that use Digital Video Interface (DVI). 2. Digital Video Signal Levels

    A standard digital video signal has 24 bits per pixel (8 bits/channel). For an 8-bit channel, the value for each of the RGB signals ina pixel can range from 0 to 255. For 12-bit, deep color content, it can range from 0 to 4095, offering higher resolution betweencolor levels.Figures 1 and 2 show a single line of a color bar video pattern transmitted in RGB or YCbCr format. Note that in RGB format, thegreen bar contains a full (255) green signal and null (0) blue and red signals. The magenta line contains full (255) red and bluesignals and null (0) green.

    Figure 1. The three component signals, R, G, and B, are each displayed in a pixel to create a new color. The three signals onthe left are combined to create the color bar.

    YCbCr formats combine the voltage of the luma, blue difference, and red difference signals to create the image. One differencefrom the RGB format is that the color-difference signals (Cb and Cr) range from -350 to 350 mV instead of 0 to 700 mV. Figure 2shows a line of a color bar video pattern transmitted in the YCbCr format. Note that the luminance signal peaks at 700 mV during

    the white bar and drops to 0 mV for the black bar. The color-difference signals start at 0 mV for white and fluctuate from -350 to

  • 2/6 www.ni.com

    the white bar and drops to 0 mV for the black bar. The color-difference signals start at 0 mV for white and fluctuate from -350 to350 mV to create the color bar.

    Figure 2. YCbCr formats combine the values of the luma, blue difference, and red difference signals to create the image. Thethree component signals Y, Cb, and Cr are each displayed in a pixel to create a color. The three signals on the left are combined

    to create the color bar.

    When testing devices that generate digital video, you need to evaluate the quality of the image being produced. The color barpattern is a common test pattern test engineers use because it helps them evaluate the color levels and compare them againstindustry standards. It also helps ensure the product meets customers expectations for color quality. Many more video signalcharacteristics such as timing delays, signal-to-noise ratio, and frequency response are covered later in this tutorial.3. Interlaced versus Progressive Scanning

    You can display digital video on a screen using either interlaced or progressive scanning. Interlaced scanning features odd andeven fields that are updated every other video frame. Figure 3 shows the interlaced scanning concept. These two interlacedfields compose a complete frame.

    Figure 3. Interlaced Scanning Lines (left); Image Generated in Interlaced Mode with Red Odd Field Lines and White Even FieldLines (right)

    The progressive scanning technique updates all of the lines in a frame sequentially. The progressive scan mode gives highervertical resolutions and requires less signal processing (blurring, antialiasing, deflickering) than interlaced scanning. Figure 4shows the progressive scanning concept.

    Figure 4. With the progressive scanning technique, every line is updated for each video frame.

    As digital technologies evolve, consumer electronics manufacturers are increasingly incorporating the progressive scanningtechnique to achieve higher-quality video. However, the increased performance of progressive scanning comes with the price ofrequiring twice the bandwidth of the interlaced mode, providing greater challenges during device testing. The next section offersmore information on video signal timing components.4. Digital Video Sample Rates and Timing

    When testing digital video, one of the most common test requirements is testing multiple resolutions and frame rates (480i/30 Hz,720p/50 Hz, 1080p/60 Hz, and so on). The timing signals of a video signal contain the crucial information about the video signalformat. A digital signal includes three timing signals: the horizontal sync, the vertical sync, and the pixel clock. By adjusting thesethree timing signals, you can generate or test different video formats (480i, 720p, 1080p, and so on).A pixel clock, which defines the data transfer rate, can be an input to or an output from a device. The horizontal sync (line-enable)signals the beginning and end of each horizontal video data line. Finally, the vertical sync (frame-enable) signals the start andcompletion of each frame. Figure 5 illustrates the timing signals associated with digital video.

  • 3/6 www.ni.com

    Figure 5. The three digital video timing signals ensure that each pixel, line, and frame is being updated in the specified time andthat the RGB or YCbCr signals are synchronized correctly.

    Four factors determine the required sample rate (pixel clock) of a digital signal: the vertical resolution, horizontal resolution,scanning mode (interlaced or progressive), and the frame rate. The horizontal resolution is often defined by the aspect ratio (16:9,4:3, and so on).Table 1 shows different frame rates and sample rates for common scanning formats. The "Categories" heading shows ratesrequired for standard definition, enhanced definition, and high-definition video. For example, the system name 1280x720p 24refers to a resolution of 1280 (horizontal) x 720 (vertical) using progressive scanning at an update rate of 24 fps. Notice that forhigh-definition video, the sample rates (pixel rates) increase dramatically. This showcases one of the primary challenges thatengineers face when testing high-density digital video. For example, a sample rate of at least 75 MHz is required for mosthigh-definition video signals. This requirement doubles for testing the latest digital video technology such as 1080p/60 Hz.

    Table 1. Common Video Formats, Scan Modes, and Frame RatesSample Rate ExampleThe pixel clock of a given resolution and frame rate is calculated based on the total frame size and frame rate. For Full HD video,which operates at 1080p/60 Hz, the calculation is based on the total frame size and the frame rate.

    Figure 6. The active picture region is 1920x1080, but the total frame size is much larger and must be used in the calculation forpixel clock speed.

    =2200 * 1125 * 60 = ~148.5 MHz5. Digital Video Compression Formats

    Due to the large amounts of data that digital video signals contain, video providers must often apply compression algorithms to

  • 4/6 www.ni.com

    Due to the large amounts of data that digital video signals contain, video providers must often apply compression algorithms tovideo signals before transmitting them over a network. Compression algorithms reduce the data bandwidth of video signals,making them easier to transmit. Decompression algorithms are then used on the back end of the network to retrieve the originalvideo signal (ideally with as little data loss or data error as possible).Some of the most common compression standards are MPEG 2, MPEG 4, and H.264. MPEG 2 has been adopted by broadcastdigital video providers and is commonly used in consumer electronics for DVDs. MPEG 4 is most commonly used in Internettransmissions and mobile systems. MPEG 2 is an older technology and can provide comparable quality to the newer MPEG 4compression format, but it requires higher bandwidth. MPEG 4 compression schemes are often optimized to fit smaller frame sizesbecause they are targeted for mobile devices. H.264, an increasingly prominent technology used in Blu-ray discs, provides qualitysimilar to MPEG 2 at nearly half the bandwidth and with frame sizes two to four times larger than the MPEG 4 format. With itshigher quality, the H.264 compression format requires you to implement the compression algorithms that are more computationallyintensive.One other consideration is that common compression formats, such as MPEG 2, require a source format in multiples of 16 pixels,vertically and horizontally, so you do not see a compressed 1920 x 1035 video format. Instead, you see a 1280 x 720 or 1920 x1152 screen resolution.Another challenge that engineers face is ensuring that a video signal maintains its integrity through compression anddecompression. In most video applications where codecs are applied, the video signal should be tested before and after thecompression algorithms to ensure it still meets internal or industry standards.

    Figure 7. The Common Path for a Video Signal through a Network (It is common to perform measurements on the video signalat all points along this path.)

    6. Digital Interfaces

    You can transfer digital video signals through a variety of digital interfaces, each of which has its own transfer protocol. High Definition Multimedia Interface (HDMI) and Digital Visual Interface (DVI)

    HDMI and DVI use the same digital protocol to transfer uncompressed digital data. The key difference is that HDMI can alsotransmit digital audio. These formats send the digital signals along with a clock to provide for 24 bits of color per pixel (eight bits foreach of the three colors). As HDMI technology evolves, engineers are having to test full color (10-bit color depths) and true color(12-bit color depths) on each color channel, which is even more challenging for engineers. The HDMI data is transferred using theTransition Minimized Differential Signaling (TMDS) protocol, which transmits each channel as a high-speed serial signal. Figure 10shows the block diagram for HDMI.

    Figure 8. Components of an HDMI Link (There are three TMDS data channels along with the pixel clock. HDMI specificationslimit the TMDS clock to 165 MHz for a single HDMI link, which evolves with new HDMI specifications.)

    HDMI and DVI signals are also protected by High-bandwidth Digital Content Protection (HDCP). This is used to ensure that it isnot possible to access the raw (proprietary) video signal.When developing an application to test HDMI-enabled devices, you may experience a few different test challenges. Performingparametric testing on the HDMI lines, like checking for bit error rates, eye diagrams, current leakage, and power consumption,does not generate a good representation of how the final video signal looks. It is also time-intensive and expensive to accomplishon a production line. Ideally, these tests have already been performed on the chip within the device, and, at a production level,your goal is to perform a functional test of the system as a whole.

    The key to successfully testing HDMI video is to evaluate a device at a functional level to ensure that the channels are

  • 5/6 www.ni.com

    The key to successfully testing HDMI video is to evaluate a device at a functional level to ensure that the channels aresynchronized correctly and that all internal signal processing is functioning to offer the crisp, high-definition video signal thatcustomers expect.When developing an application to test HDMI video in this manner, it is necessary to build hardware that deserializes the eight-,10-, or 12-bit color channels and the pixel clock to evaluate each channel. One example of this hardware is the NI PXI-2172deserializer and decryption module (input) and NI-SPX-O (output) boards. Another key challenge in testing HDMI devices is HDCP encryption. Certain applications make it necessary to test raw digitalvideo signals. Encrypted signals provide numerous challenges for engineers testing HDMI digital video because many regulationsdo not allow the raw, uncompressed video signal to be passed anywhere on a board. Using the PXI-2172, you can test the rawvideo signal without the risk of giving a third party access to the raw video.

    High Definition Serial Digital Interface (HD-SDI) and 3G-SDI

    HD-SDI and 3G-SDI interfaces transfer uncompressed and unencrypted digital data. HD-SDI and 3G-SDI allow for highertransfer rates and better signal integrity than HDMI and are most commonly used in professional video due to the stricterrequirements for video quality in broadcasting.The SDI interface uses a single line to transfer all digital data. Special synchronization patterns signify the beginning of a newline, frame, and beginning and end of an active picture. The following transfer rates are available for SDI.

    HD-SDI: 1.45 Gbit/sDual Link HD-SDI: 2.23 Gbits/sSingle Link 3G: 2.97 Gbits/s

    Figure 9. Components of an SDI Link (The audio, video, and clock lines are all transferred through the same link.)

    A similar interface called the Serial Data Transport Interface (SDTI) features the same serial protocol as SDI and is used totransmit compressed data.DisplayPort

    DisplayPort is a rapidly growing digital interface mainly because it is a royalty-free technology, meaning that manufacturers donot currently have to purchase the right to create DisplayPort devices. Many LCD display providers offer DisplayPort supportalong with HDMI/DVI.DisplayPort works with both audio and video transmission, supporting 16 bits of color per pixel in YCbCr color space. With one,two, or four pairs of data transfer using the mini-packet protocol, the DisplayPort interface can handle unidirectional datatransfer rates at up to 10.8 Gbits/s to provide up to 2560x1600 60 Hz resolutions at color depths of 30 bits/pixel. DisplayPortinterfaces also contain an AUX line that offers bidirectional communication between the source and sink devices. The ability ofthe DisplayPort interface to handle such high data transfer rates has helped its adoption by consumer electronicsmanufacturers.Unlike HDMI and HD-SDI, which use the serial protocol for data transfer, DisplayPort uses a mini-packet protocol with the clocksource built into the data lines. This provides a unique challenge for test engineers who are trying to test the individual linepairs.

    Figure 10. Components of a DisplayPort Link (The audio, video, and pixel clock are embedded in the data lines Ch0 through

  • 6/6 www.ni.com

    Figure 10. Components of a DisplayPort Link (The audio, video, and pixel clock are embedded in the data lines Ch0 throughCh3.)

    At this point, you have a basic understanding of digital video and some of the challenges that test engineers face when developingapplications to test devices containing digital video. Increased sample rates, encryption factors, and compression schemes allpresent challenges for testing devices that contain the latest digital video standards.7. Related Resources

    Learn about NI Video Measurement Suite for Digital Video TestUsing National Instruments for Efficient Digital Video TestCase Study: Improve Test Time by 75 PercentVideo Signal Measurement and Generation FundamentalsHDMI 1.4 3D Video Analysis and Testing