热度 15
2015-3-18 20:07
8012 次阅读|
0 个评论
浅谈CVBS和VGA视频输出接口 博主使用FPGA输出CVBS和VGA视频,已经有一段时间。但始终对什么时候使用哪种接口芯片没有清晰的概念,基本都是在网上找资料,依葫芦画瓢搭上电路就万事大吉。本着学必参悟的精神,小弟想静下心来和大家一起把这部分的知识深入了解一下。 首先,我们来了解一下BT656编码和RS-343A/RS-170标准。 BT656 #基本概念:BT.656定义了一个并行的硬件接口用来传送一路4:2:2的ycbcr的数字视频流。#视频流的分辨率为720×576像素。 #硬件需求:1个27MHz像素时钟、8-bit的数据 #编码信息:BT.656编码包含了奇偶场、场同步、行同步、行场消隐信息 #编码细则: ITU-RBT.656视频标准接口PAL制式(720*576)每场由四部分组成(768*625)。 ● 有效视频数据,分为奇场和偶场,均由288行组成。每行有1440个字节,其中720个字节为Y分量,360个字节为Cb分量,360个字节为Cr分量。Y分量的取值为16~235;Cb和Cr分量的取值为16~240。 ● 水平消隐,有280个字节。 ● 垂直消隐。 ● 控制字。 对于有效数据行,其格式如图1所示。EAV和SAV为嵌入式控制字,分别表示有效视频的终点和起点。EAV和SAV均为4个字节构成,前3个字节FF、00、00为固定头,“XY”为控制字。“XY”的8个bit含义如下: ● Bit7(Const),常数,总为1。 ● Bit6(F),场同步信号,表示该行数据处于奇场还是偶场。 ● Bit5(V),垂直同步信号,表示处于场消隐区间还是正程区间(有效数据行)。 ● Bit4(H),水平同步信号,表示是“SAV”还是“EAV”。 ● Bit3-0(P3P2P1P0),纠错位。P3=V(XOR)H;P2=F(XOR)H;P1=F(XOR)V;P0=F(XOR)V(XOR)H。 EAV与SAV的详细定义如表1所示。表1 Bit7 Bit6 Bit5 Bit4 Bit3-0(P3P2P1P0) Hex Description 1 0 0 0 0000 0x80 Even,Active,SAV 1 0 0 1 1101 0x9d Even, Active,EAV 1 0 1 0 1011 0xab Even,Blank, SAV 1 0 1 1 0110 0xb6 Even, Blank, EAV 1 1 0 0 0111 0xc7 Odd, Active, SAV 1 1 0 1 1010 0xda Odd, Active, EAV 1 1 1 0 1100 0xec Odd, Blank, SAV 1 1 1 1 0001 0xf1 Odd, Blank, EAV Blanking为水平消隐区,通常由80H/10H来填充。 对于图1中的Valid data(有效数据)区,其数据排列顺序如图2所示。即Y : Cb : Cr="4" : 2 : 2。从图像的像素点上来理解,就是每个像素点有一个单独的Y值,而相邻的两个像素点的Cb和Cr数据是一样的。 PAL一场的数据行格式如图3所示。 行数 F V EAV SAV 1~22 0 1 0xb6 0xab 23~310 0 0 0x9d 0x80 311~312 0 1 0xb6 0xab 313~335 1 1 0xf1 0xec 336~623 1 0 0xda 0xc7 624~625 1 1 0xf1 0xec RS-170视频标准(525线) #RS-170视频标准包含的内容:Monochrome RS-170 Video(单色)、Digitizing RS-170 video、 Color RS-170 video(彩色)、RS-170A(NTSC)。 # RS-170视频标准简介:是一种应用在美国、日本等60HZ国家的“black and white video format”黑白制式电视标准。 #RS-170视频标准的细则: ●电平标准:White: +1.000 V Black: +0.075 V Blank: (0V reference) Sync: - 0.400 V ●信号组成:图像信息、行场同步、行场消隐。image and timing information. The image is sent one line at a time, encoded using analog variation. The timing information consists of horizontal synch signals at the end of every line, and vertical synch pulses at the end of each field. There are also so-called horizontal and vertical blanking periods at the end of each line and field respectively, during which no image information is sent. The non-displayable lines in each field constistute the vertical blanking period. ●传输方式:同轴线缆 和BNC插头 RCA插头。 #Color RS-170视频标准: ●简介: Color RS-170视频比 monocrome RS-170(黑白)要复杂一些,它通过混合RED、GREEN、BLUE三色光在CRT显示器上呈现彩色图像。 ●传输方式: (1)1-线传输——CVBS:"composite video" or NTSC standard. Basically it contains intensity, color, and timing information on the same line. The intensity and timing information is basically consistent with the RS-170 monochrome signal. The color information is combined with the analog intensity signal using some sort of mixture encoding. Resolution of the color signal is considerably less than that of the intensity signal. The mixture encoding was designed so that in general, a monochrome RS-170 device, when fed a composite signal, will produce an acceptable monochrome output, although there are some exceptions to this (usually color mix produces some high-frequency noise in the digitized signal which looks like a very fine checkerboard overlaid on the picture). This picture format is called RS-170A according the standard. (2)2-线传输——S-Video:The two-wire version is known as "S-video". In this format, one coax pair of wires, the Y channel, carries combined intensity and timing signals consistent with RS-170 mono. A second pair, the C channel, carries a separate color signal. S-video is usually carried on a single bundled cable with 4-pin connectors on either end. (3)4-线传输——RGB:The four-wire format is known as RGB or RGBS for Red, Green, Blue, Synch. In this case the color signal is broken into three separate and equal channels,each carrying high-resolution information. RGB video is a "component video" format, meaning the various components of information required to reproduce a video display are enclosed by separate signals. Timing information is provided on a separate wire - the synch channel. Timing information is sometimes also present on the green channel, but more often not. This video format is called RS-170 RGB. Although video intensity information and blanking intervals are present in the red and blue signals, the synchronization pulses typically are not. RS-343A视频标准(525线) #RS-343A视频标准: ●简介:RS-343是由EIA (Electronics Industries Association) 制定的一种(non-broadcast)非广播式高分辨率黑白电视标准。RS-343 比RS-170 颁布的晚,主要应用与闭路电视,因此将电压幅度调整为1.00 Vp-p. ●电压标准:White: +0.714V Black: +0.054V Blank: (0V reference) Sync: -0.286V (四)CCIR视频标准(625线) #CCIR视频标准: ●简介:主要应用于625线25帧的TV。虽然CCIR standard只定义了黑白图像;但是两大彩色制式PAL和SECAM都兼容它。 ●细则:CCIR分奇偶场,每场包含312 lines的图像信息,第一场为奇;第二场为偶。 Horizonal sync :15625 Hz and field rate of 50 Hz. ●电平:CCIR electrical signal is 75 ohm system and 1.0V volt (peak-to-peak, including sync) signal. ●时序: Line period 64 us (Micro-seconds) Line blanking 12.05 +- 0.25 us Line sync 4.7 +- 0.1 us Front porch: 1.65 +- 0.1 us For color television (PAL standard) the following extra details were defined: Color burst start 5.6 +- 0.1 us after sync start. Color burst 10 +- 1 cycles Color subcarrier 4.433 MHz (五)VGA视频标准 #VGA There never really WAS an official standard for VGA video, but it's more closely related to 343 than 170, since it uses a roughly 0.7 V signal (black/blank to white). 其次,我们来研究一下两类常用的视频DAC芯片,Triple 8-Bit Video DAC和Digital PAL/NTSC Video Encoder。 从图上可以看出ADV7120的特点: ●输出: RGB三路模拟信号或一路灰度信号 ●输入: 24-bit数据位(R7:0 G7:0 B7:0) 同步信号 SYNC 消隐信号 BLANK 参考电压 REF WHITE ●应用: 三路使用——VGA 或 RGB(Y Pb Pr电视机上有) 单路使用——CVBS的灰度信号 ADV7171 从图上可以看出ADV7171的特点: ●输出: Composite (CVBS) Component S-Video (Y/C) Component YUV and RGB EuroSCART Output (RGB + CVBS/LUMA) Component YUV + CHROMA ●输入: CCIR-656 4:2:2 8-Bit Parallel Input Format 4:2:2 16-Bit Parallel Input Format ●应用: 1路使用——CVBS 2路使用——S-Video 3路使用——YUV and RGB ADV7179 从图上可以看出ADV7171的特点: ●输出: Composite (CVBS) Component S-Video (Y/C) RGB(SCART) YPbPr ●输入: CCIR-656 4:2:2 8-Bit Parallel Input Format ●应用: 1路使用——CVBS 2路使用——S-Video(Y/C) 3路使用——YUV and RGB 综上所述,我们通过芯片资料的名称类别可以方便的区分哪类芯片适合CVBS,哪类适合VGA;其实最为关键的是:彩色CVBS信号只有Digital PAL/NTSC Video Encoder可以胜任。