1、ADC Auto Balance目的和原理一、目的:1、使信号的最低电平经ADC采集后输出的数位信号是0,信号的最高电平经ADC采集后输出的数位信号是255,这样可以得到最佳的对比度;2、硬件电路差异,使进入ADC采集器的RGB信号可能偏离标准信号,且偏离量可能不信号可能偏离标准信号,且偏离量可能不一样,故必须对RGB通道分别做auto balance。二、原理 通过调整ADC offset设定值使信号的最低电平经ADC采集后输出的数位信号为0(可以适当调整目标值),通过调整ADC Gain设定值使信号的最高电平经ADC采集后输出的数位信号为255(可以适当调整目标值)。ADC Offset
2、& Gain CalibrationOffset and Gain Calibration for YPbPr inputOffset/Gain CalibrationL3L2L1INPUT2550GAIN=1,OFFSET=0OUTPUT255GAIN1,OFFSET=0GAIN=1,OFFSET0GAIN: 过原点的直线,调整GAIN, 即调整斜率,调整CONTRAST, 故灰阶白阶变化,暗阶不变. OFFSET: 直线的斜率不变,上下偏移的直线,故调整时亮暗阶均变化,调整Brightness.一般,CONTRAST为50时,GAIN为1,灰阶刚好饱和,OFFSET为0,直线过原点,斜率为
3、1。 如上图示,调整GAIN曲线以原点为中心旋转,当GAIN减小时,输出亮度降低,但最暗点不会变,如L1变到L2;而GAIN增加时,亮阶会出现饱和;调整OFFSET曲线斜率不变,当OFFSET增加或减少时,亮度(最亮点和最暗点)会呈线性变化,增加时,亮度增加,亮阶饱和,减少时亮度降低,暗阶饱和。ADC Auto Balance Pattern 的选定依据1、PC Mode:利用读取整场画面的数位信号,并用Register来计录最小及最大的Data。所以选用的Pattern要有大面积的全黑和全白画面,通常选用Pattern 42(5 White Block)2、YPbPr Mode:读取画面某几
4、点像素的数位信号,并用Register来计录像素的Data。此种方式选用画面需依据软体如何选定读取像素位置来考良。通常选用 Pattern 85(100% 纯色Colorbar)画面ADC Convertor ModuleCLAMPCLAMPCLAMPCLOCKGeneratorRBGA/DA/DA/DA/D8bit8bit8bit8bit8bit8bit8bit8bit8bit8bitRout ARout BGout AGout BBout ABout BFILTCONTROLSDA SCLA0A1 PWERDN0.15VSOGINSOGIN SOGOUTREFREFOUTHSYNCCOAS
5、TCLAMPCKINVCKEXTDATACKHSOUTREFINADC Offset/Gain Adjustment(Brightness & Contrast)Clamping7CVBS (PAL) Color BarsChroma (彩度)Sync亮度1V700mV300mV8Block Diagram of Video DecoderAuto mode switch9Comb FilterCVBSY onlyC onlyPoor comb-filterGood comb-filterS-video 信號無需經過 comb filter, 進ADC之前已Y, C分離.10Digital C
6、lamping (1)11Digital Clamping (2)12Auto Digital Gain Controller (1)13Auto Digital Gain Controller (2)Peak level detectedSync level detectedAuto Digital Gain Controller (3)目前很多机种的做法是:VGA和YPBPR通道需要人爲做AUTO COLOR,其它AV/S-VIDEO/TV通道是通過Video Decode內的digital clamping和digital gain做實時調整,不需要用人爲AUTO COLOR的方式。15
7、 VGA ADC 流程图lCheck the Black (Level = 0) & White (Level = 255)Detect theBlack LevelIncrease/DecreaseRGB OffsetOffsetModified?Black OK?Detect theWhite LevelWhite OK?Increase/DecreaseRGB GainFinishStartNOYESNOYESYESNO16YPbPr ADC 流程图 Black & White, With Specific PatternDetect theBlack BarIncrease/Decre
8、aseY, Pb, Pr OffsetBlack & PbPrStill Ok?Black &PbPr Ok?Detect theWhite LevelWhite &PbPr Ok?Increase/DecreaseY GainStart R/BStartNOYESNOYESYESNODetect theBlack BarCheck Base Level of YPbPrCheck Peak Level of Y17 YPbPr ADC 流程图 Red & Blue Bar, With Specific PatternDetect theRed & BlueIncrease/DecreaseP
9、bPr GainPbPr Ok?Re-CheckStart R/BNOYESCheck Peak Level of PbPr18 以上原理应用在生产线以上原理应用在生产线 的的SOPSOP19 Y(out)(YY Black Level)*ContrastBrightness Cb(out)(Cb*Cos CHue+Cr*SinHue)*Saturation cb*Sat*cos(Hue)Cr*Sat*Sin(Hue) Cr(out)(Cr*cosHue)Cb*SinHue)*Saturation Cr*Sat*Cos(Hue)Cb*Sat*Sin(Hue)The End Thank you!