cancel
Showing results for 
Search instead for 
Did you mean: 

How can I make software video decoding faster?

ADow.1
Associate II

I'm using software decoding with double buffer strategy, but the decoding takes too long (about 50ms per frame).

I tried to change the video frame rate to 10fps, but for a video of size 216x530 with a length of 30 seconds, the video output length is about a minute.

I also tried to lower the quality of the video to no avail.

1) Would lowering the video format work? and what should I lower it to? (I have VIDEO_DECODE_FORMAT = RGB565)

2) Should I try a different software decoder? (and where can I get it?)

Thanks!

9 REPLIES 9
Yoann KLEIN
ST Employee

Hello ADow.1,

Could you please provide some information about your configuration ?

  • Which board do you use ?
  • Which version of TouchGFX are you using ?

Thank you,

/Yoann

Yoann KLEIN
ST Software Developer | TouchGFX
ari_v2
Senior

Hello,

I have the same problem.

My custom board has stm32f469 with 8 MB RAM + 32 MB quad-spi flash, CPU runs at 180 Mhz.

Using TaouchGFX version 4.18 and LibJPEG software.

Video is played very slow. For example the sample video in touchgfx is 216*216 that is set to 25 fps should take 10 seconds.

On my board it lasts for 18 seconds.

Any Ideas what is my problem? how to make it faster?

Has anyone experienced playing video on the stm32f469? Could you please share me with performance details?

Thanks,

Ari

Hello,

Unfortunately, the board is limited by the speed of software decoding.

But you can try some things to make it faster :

  • Ensure that the Framebuffer is placed in internal memory
  • Reduce the video size
  • Use 24-bit Framebuffer Pixel format and put video Decode Format to 24-bit (the way to place data on Framebuffer is faster because you don't need to convert 16-bit to 24-bit, it will be directly sent to Framebuffer).

There is also an article on the TouchGFX documentation that provides general information about software decoding, it might help you : https://support.touchgfx.com/4.18/docs/development/touchgfx-hal-development/scenarios/scenarios-video-decoding#software-decoding

Hope that this helps,

/Yoann

Yoann KLEIN
ST Software Developer | TouchGFX

Hi Yoann,

I saw in STM32 TouchGFX page 10, STM32 F769I at 200 MHz SW JPEG can display 8fps. What is the limit of board stm32f469 with software decoding?

Thanks,

Abeer

How about NOT decoding?

How large is the image/video rendered in the exact geometry and colour depth you want to present? Your ability to paint those frames will give you an upper ceiling on the bandwidth you have to work with. Any type of decode, resizing or remapping palettes is going to be subtractive from that.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Take a note that despite similar clock frequencies the Cortex-M7 in F769 is almost twice as fast as Cortex-M4 in F469.

ari_v2
Senior

Hi Yoann,

My display area is 480*800. if working with 24 bit, the size of frame buffer results to 1.1 MByte.

This is way to large for the stm32f469 internal RAM (320 + 64 CCM ram).

Maybe I misunderstood you?

Thanks.

ari_v2
Senior

Hi Tesla,

You suggested with no decoding.

Which video format supports this?

Could TouchGFX handle this format?

The full screen is 480*600 but if I could play video on 240*320, that's good enough.

Thank you

That or you forked the thread and didn't mention​ the screen dimensions only those of the video.

S​till doing as much processing using on-chip memory as possible to render into a compatible form with the display will help. If you can reprocess the data into a matching colour space that will reduce transformation stages.

1​6 or 32-bit wide SDRAM implementation? The F4 doesn't have a cached interface, and both the MCU and LTDC are going to fight for bandwidth.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..