Displaying YCbCr data and RGB data together using a hardware accelerator

  • Hello,

    I'm using a custom board with a STM32H745 MCU (STemWin v5.44). The color conversion routine is GUICC_M565.

    I need to display some JPEG data among other things.
    For converting JPEG data to RGB data I applied hardware JPEG decoder that converts JPEG data to YCbCr data and then I converted YCbCr data to RGB data by software.
    For displaying RGB data I applied DMA2D. I call _DrawBitmap() -> it calls LCD_DrawBitmap() -> it calls LCD_LL_DrawBitmap16bpp() in LCDConf.c.

    Here is a screen from the board displaying a JPEG data and some non-JPEG data (just a white text on a red background) above the JPEG picture. Works fine.

    The next I tried to do is to use DMA2D not only for displaying RGB data but for displaying YCbCr data without wasting time for convertion YCbCr to RGB.
    I modified some functions and now I've got the screen:

    RGB data is shown incorrect. I think there is some mess in data types when calling LCD_LL_DrawBitmap16bpp().

    So is it possible to display both data types (YCbCr and RGB) at the same time using DMA2D?

    Here's a part of the code:


    Also LCDConf files in attach.

    Thank you.

  • Hello,

    the problem solved by converting YCbCr stream to RGB using the same DMA2D instead of software functions. Then RGB data flows to LCD_LL_DrawBitmap16bpp() in the usual way. Works pretty fast.

    Regards,

    Anthony

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!