Skip to main content
ADow.1
Associate II
February 7, 2022
Question

How can I make software video decoding faster?

  • February 7, 2022
  • 9 replies
  • 2134 views

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!

This topic has been closed for replies.

9 replies

Yoann KLEIN
ST Employee
February 8, 2022

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 KLEINST Software Developer | TouchGFX
ari_v2
Senior
February 10, 2022

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

Yoann KLEIN
ST Employee
February 11, 2022

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 KLEINST Software Developer | TouchGFX
ADow.1
ADow.1Author
Associate II
February 13, 2022

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

ari_v2
Senior
February 14, 2022

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.

Tesla DeLorean
Guru
February 14, 2022

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
ari_v2
Senior
February 14, 2022

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