11.07.2015 Views

Xilinx pg013 LogiCORE IP RGB to YCrCb Color-Space Converter v5 ...

Xilinx pg013 LogiCORE IP RGB to YCrCb Color-Space Converter v5 ...

Xilinx pg013 LogiCORE IP RGB to YCrCb Color-Space Converter v5 ...

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Color</strong>-<strong>Space</strong> Conversion BackgroundCb = [ CCOE ⋅ ( B – Y RAW )] OWIDTH+ CbOFFSETCr = [ DCOEF ⋅ ( R – Y RAW )] OWIDTH+ CrOFFSETEquation 4-14Equation 4-15where [ ] k denotes rounding <strong>to</strong> k bits. The architecture contains three possible opera<strong>to</strong>rsthat might introduce noise. Quantization noise is inserted when data is rounded.1. Data is rounded <strong>to</strong> MWIDTH-2 bits after calculating Y raw ,2. Data is rounded <strong>to</strong> OWIDTH bits at the output.3. If CCOEF and DCOEF are chosen such that Cb and Cr may over- or underflow, clippingnoise gets inserted <strong>to</strong> the signal flow.Before analyzing the effects of these noise sources, first look at the input Signal <strong>to</strong>Quantization Noise Ratio (SQNR). Assuming uniformly distributed quantization error,<strong>RGB</strong>MAXP x X 2 dx<strong>RGB</strong>MINSQNR 10log <strong>RGB</strong>= ------- = 10P log------------------------------------------N1Δ-- Δ ⁄ 2e 2 d– Δ ⁄ 2xEquation 4-16Substituting LSB =2 -INBITS , where INBITS is the input (<strong>RGB</strong>) precision, SQNR <strong>RGB</strong> becomes afunction of the input dynamic range. In the next three calculations, when calculatingSQNR <strong>RGB</strong> for the typical dynamic ranges, INBITS = 8 for all three cases.When <strong>RGB</strong> values are in the (0, 255) range:1255-------- 255x 2 x1 d ---------------- [ 255 3 ]03 ⋅ 255SQNR 10 <strong>RGB</strong>= log------------------------------------1 ⁄ 2x 2 = 10log-----------------------------------=1dx-----– 1 ⁄ 21254.15dBEquation 4-17when <strong>RGB</strong> values are in the (16, 240) range:1224-------- 240x 2 d16xSQNR <strong>RGB</strong>= 10log------------------------------------x 2 =1 ⁄ 2 dx– 1 ⁄ 253.92dBEquation 4-18and when <strong>RGB</strong> values are in the (16, 235) range:1219-------- 235x 2 d16xSQNR <strong>RGB</strong>= 10log------------------------------------x 2 = 53.74dB1 ⁄ 2 dx(–1) ⁄ 2Equation 4-19<strong>RGB</strong> <strong>to</strong> <strong>YCrCb</strong> <strong>Color</strong>-<strong>Space</strong> <strong>Converter</strong> www.xilinx.com 38PG013 April 24, 2012

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!