Xilinx support.xilinx.com  
Xilinx HomeProductsSupportEducationPurchaseContactSearch
   
  techXclusives
   
 

Colour Space Conversion
Part 2

By Andy Miller
Staff Engineer - Xilinx UK

 
   
 

The following PowerPoint file contains a slide show that graphically demonstrates the conversion of unity RGB color space into Luma and Colour Difference colour space.

Playing the presentation will enable you build up the conversion step-by-step.

Finally, the diagram of Luma and Colour Difference colour space often viewed in popular video text books is achieved and a matrix equation derived for the conversion (Equation 10):

Download the conversion example
Power Point presentation


Hardware For Equation 10 - RGB2YPBPR

Equation 10 suggests that a colour space converter can be built with nine multipliers and six adders. The circuit below would be the hardware equivalent of Equation 10. In fact, it is the foundation of the Logic Devices Colour Space Convertor/Corrector LF2272 (Previously known as Raytheon TMC2250).

The above structure can realise any 3x3 transform between different colour coordinates; the only difference between an RGB2PBPR and YPBPR2RGB is the 12-bit coefficients. Banks of coefficients can be stored local to each multiplier using Xilinx Look-Up Tables configured as distributed RAM. Up to sixteen 12-bit coefficients could be stored in just six Virtex™ or Spartan™ slices.

A More Optimum RGB2YPBPR Solution

Figure 25 is a more optimum solution than Figure 24 because it requires only five multipliers, two adders, and two subtracters. Three multipliers and two adders are used to construct the Luma (Y), which is then subtracted from the Red and Blue data to construct the scaled colour difference channels PB and PR.

Even Smaller!

A further optimization to the circuit of Figure 25 is to re-express the Green contribution to the Luma as a none-scaled item (i.e., no multiplier is required to scale the Green data when generating ‘Y’).

(continued on page 2)

Pg. 2