cancel
Showing results for 
Search instead for 
Did you mean: 

Whether the DMA2D can convert YCBCR (input data is line by line pixel) to RGB888?

Zaid1
Associate

Hi,

I have a question related to the graphic engine DMA2D in the STM32H743. The STM32H743 custom board has the video analog chip (ADV7180KCP32Z-RL). It sends the YCBCR video data to STM32H743 through DCMI interface.

1. We are able to receive the YCBCR video data (input data is line by line pixel) from the DCMI interface. Now we want to convert the YCBCR video data to RGB888 using DMA2D. Is it possible to convert YCBCR video data to RGB using DMA2D block?

If so, Can you please provide us the sample code for this?

2. What we understood from the STM32H7xx technical document that, the DCMI can convert the YCBCR to RGB888 if the YCBCR data should be in the form of 8x8 pixel block. 

Above points Which one is correct?

ie. a. Whether the DMA2D can convert YCBCR (input data is line by line pixel) to RGB888? (OR) can convert YCBCR (form of 8x8 pixel block) to RGB888?

3 REPLIES 3

I don't use the DCMI/DMA2D, but based on reading of documentation

  • DCMI does not perform any format conversion (mentioning YCbCr in DCMI chapter is misleading, it basically just says "yes it can capture YCbCr 4:2:2 as any other 8-bit data stream", plus there's the generic option to drop every other byte labelled as "Y extraction", but that's in fact no conversion)
  • DMA2D can convert only 8x8 YCbCr blocks for JPG, i.e. not the linear YCbCr stream

So sorry, no hardware supported conversion for YCbCr stream in STM32.

JW

MSale.1
Senior

@Zaid1 

Yes its possible to do it. i already converted YCbCr from DCMI to RB565 using DMA2D.

you will need to do some processing to organize this lines to YCbCr MCU (Minimum Code Unit) to make it compatible for the DMA2D then feed them to DMA2D.

For YCbCr VGA resolution, my code do it in less than 11ms with the STM32H7B3 Evaluation board.

Regards

M.Salem

@MSale.1 and how did you achieve the rearrangement?