AnsweredAssumed Answered

DMA2D color conversion from 8-bit gray to ARGB8888 on STM32F746

Question asked by flanery.will on Jun 6, 2016
Latest reply on Jun 9, 2016 by waclawek.jan
I have the STM32F746 Discovery board and I have my project working with the OV9655 camera (which outputs RGB565).

I am trying to switch over to use the MT9V034 camera chip from Aptina/OnSemi, which outputs 8bit grayscale (really, it outputs 10bit, but I'm only using the top 8 bits).

My problem can be replicated without a camera by initializing test pattern data into the camera buffer (in my project it's 0xC0260000 to 0xC027FE00).  I'm filling with 0x00FF00FF  (4 pixels, alternating black, white, black, white).

I have selected CM_L8 as the input color and CM_ARGB8888 as the output color.  My understanding is that L8 is 8-bit Luminance, meaning grayscale, so the conversion should basically copy the grayscale value into the R, G, and B portions of the new ARGB value and I’m forcing the Alpha to be FF, but here’s what I get:
Input:                    0x00FF00FF  (4 pixels)
Expected Out:   0x000000FF  0xFFFFFFFF  0x000000FF  0xFFFFFFFF             (4 pixels)
Actual Output:  0x64F356FF  0x426333FF  0x64F356FF  0x426333FF             (4 pixels)


Any assistance is greatly appreciated. 

Outcomes