1.0 Motivation2.0 Introduction2.1 ITU-R BT.601 Video2.1.1 RGB Coloring & Human Perception2.1.2 YUV Coloring2.2 ITU-R BT.656 Video3.0 Prelab4.0 Lab Procedure4.1 VideoEncoder.vEECS150 Spring 2007 Checkpoint 1UNIVERSITY OF CALIFORNIA AT BERKELEYCOLLEGE OF ENGINEERINGDEPARTMENT OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCECheckpoint 1Video Encoder1.0 MotivationThis checkpoint serves three purposes:1. Create a video encoder module for use in your video conferencing system2. Acquaint you with digital video in general and NTSC (TV) in particularWith the first goal in mind you should make sure to design your Verilog aheadof time, comment you code and test everything thoroughly. Because you will bekeeping and relying on this code for months, it will actually save you many stressfulhours to ensure it works well now, rather than when you are about to finish the project.Many of you will be at least reasonably familiar with video as it is used oncomputer systems, with standard VGA or DVI interfaces, complicated video cards andhigh-resolution data grade CRT or LCD monitors. In this checkpoint you will beintroduced to the far older and more universal world of broadcast video. You will beworking with NTSC standard video, as used in the U.S. broadcast TV industry, and infact on your TV at home.NTSC is a reasonably simple standard, which is widely used and readilyavailable. But one of the primary reasons to use it is that despite advances such as DVIand HDTV, the video standards we will be using (which have survived from the inventionof black-and-white television) will continue to affect video for a long time to come.“BECAUSE YOU WILL BE KEEPING AND RELYING ON THIS CODE FOR MONTHS, ITWILL ACTUALLY SAVE YOU MANY STRESSFUL HOURS TO ENSURE IT WORKS WELL NOW,RATHER THAN WHEN YOU ARE ABOUT TO FINISH THE PROJECT”2.0 IntroductionThe module you will building for this checkpoint is a simple protocol bridge,connecting a memory structure, in this case a simple ROM-like module, to a byte widevideo data stream.The primary responsibilities of your module are:1. Request the video data to be transmitteda. Must track which line and pixel is being sent when2. Generate video framing signalsa. Start-of-active-video and end-of-active-video (SAV and EAV)signals to delineate row boundariesb. Blanking and field control to indicate what type of data will be sentc. Black data to fill blanking periods3. Clip the video data to the allowable value rangea. Data values less than 0x10 or more than 0xF0 must be clippedUCB 1 2006EECS150 Spring 2007 Checkpoint 14. Initialize and control the Analog Devices ADV7194 hardwarea. The ADV7194 is a digital-to-analog converter which generatesanalog video signalsb. Use I2C to initialize the ADV7194 to the proper modeYour module will be responsible for abstracting away all the complexities ofdealing with the ADV7194 and properly framing the data, leaving only the task ofsupplying valid video data, which for this checkpoint will be provided by a simple ROM-like module to generate a test pattern of solid color bars.2.1 ITU-R BT.601 VideoWhen television broadcasts were slated to move from black-and-white to color,there was a significant concern over the existing investments in black-and-white sets.Not only were engineers concerned that old TV sets would be unable to receive newersignals, making old equipment useless, but they were worried that signals from olderstations would not be received by the new color sets, preventing the adoption and sales ofcolor TVs. As such a compromise was made resulting in the color scheme outlinedbelow.2.1.1 RGB Coloring & Human PerceptionThe standard color scheme used when dealing with light, as we are in videoapplications, is based on the three primary colors: Red, Green and Blue.Human eyes have two sets of photoreceptors which detect incoming light:- Rods cannot detect color, but they are very sensitive to brightness- Cones can detect color, but they are significantly less sensitiveThe primary colors Red, Green and Blue derive from the fact that cones come inthree colors: Red, Green and Blue. This means that rather than generating any possiblecolor, it is enough to be able to mix varying proportions of Red, Green and Blue, as oureyes perceive every other color in terms of the RGB proportions in them.Just as important is the relative sensitivity of the rods and cones in our eyes, forexample, because cones are not particularly sensitive, it is more than sufficient to store8bits of intensity for each color in RGB, leading to the widespread use of 24bit color.Less known but even more important is the fact that the rods in our eyes, whichare sensitive only to brightness, are much more sensitive. This means that while we caneasily perceive slight differences in brightness using our cones, it is more difficult toperceive subtle shades of color.2.1.2 YUV ColoringAs a result of the economic pressures to maintain compatibility between olderblack and white TVs and the newer color models, as well as the way in which humansperceive light, engineers designed a video format which would transmit intensity, orluminance, and color, or chrominance, separately.UCB 2 2006EECS150 Spring 2007 Checkpoint 1This means that instead of storing the Red, Green and Blue content of a pixel inour video, we will store its luminance (Y) or brightness and its red (CR/V) and blue(CB/U) chrominance, or color.Figure 1: RGB/YCRCB with Sub-SamplingAs shown above, we also can take advantage of the fact that the cones in thehuman eye are significantly less sensitive, by storing only half as much color informationas brightness information, as shown by the chrominance sub-sampling map in Figure 1.In order to transmit the data serially, it is reduced to pixel pairs, each of them32bits wide with two luminance (Y) values, and one each of the chrominance values, red(CR) and blue (CB).Line i-1: CB Y CR Y CB Y CR Y CB Y CR Y ...Line i: CB Y CR Y CB Y CR Y CB Y CR Y ...Line i+1: CB Y CR Y CB Y CR Y CB Y CR Y ...2.2 ITU-R BT.656 VideoThe ITU-R BT.601 standard outlined above covers how the pixels are sampleddigitally and encoded with brightness and color information. The ITU-R BT.656standard outlines how to organize, frame and transmit the data.Because these video standards are meant to be the digital equivalent of
View Full Document