Project Name: RGBtoYCbCr.dpj Project Type: ADSP-BF533 [X] ADSP-BF537 [ ] ADSP-BF561 [ ] Hardware Used: ADSP-BF533 EZ-Kit VisualDSP++ Emulator System Services Components Used: None OVERVIEW ======== The RGBtoYCbCr function takes input (R, G, B) in the range of 0 to 255 and outputs (Y, Cb and Cr) also in the range of 0 to 255. The formula’s implementation is represented by the diagram below. Y = 0.299R + 0.587G + 0.114B Cb = -0.169R - 0.331G + 0.500B + 128 Cr = 0.500R - 0.419G - 0.081B + 128 128 is added to Cb and Cr to get the output in the range 0 to 255. For this function to work properly, the input must be gamma corrected values in the order RGB order and the result will be stored in YCbCr order. Prototype : void RGBtoYCbCr(unsigned char input[], unsigned char out[], int N); Arguments: input[] - Input RGB array out[] - Out put array to store in YCbCr format N - Number of inputs Registers Used : A0, A1, R0-R3, R5-R7, I1, B1, M0, L1, P0-P2, LC0. RUNNING THE APPLICATION (on the ADSP-BF533 EZ-KIT Lite) =========================================================== 1) Load project "RGBtoYCbCr.dpj". 2) Select "Project->Rebuild Project" 3) Select "Debug->Run". 4) Observe output on VisualDSP++ console window. Files in This Application ========================== This example consists of the following files: "./RGBtoYCbCr.ldf" - linker description file "./RGBtoYCbCr.dpj" - project file "../../src/t_RGBtoYCbCr.c" - source file "../../src/RGBtoYCbCr.asm" - source file "../../../../BFinUtils/ADSP-BF533/SDK-cycle_count.asm" - source file "../../../../Include/SDK-cycle_count.h" - include file "../../include/color_cnvr.h" - include file