cancel
Showing results for 
Search instead for 
Did you mean: 

REPOST: Rendering Video?

QUESTION - TouchGFX Community repost - David Fries - Jan 2017

Hi

We are running TouchGFX on a STM32F769 CPU and we would like to render videos (MJPEG). We have a running example from ST which does this. However, it runs on FreeRTOS+STemWin.

We're trying to implement a similar thing with TouchGFX. I thought I'd use a PixelDataWidget which uses a separate video buffer and then simply render the video frames into it. Is that a sensible approach, or is there a better way to do this?

The product development page (http://touchgfx.com/en/product-development/touchgfx-4-6-0/) says that there is already a video player demo for the F7. May I ask how you implemented it?

Thanks!

ANSWER - TouchGFX Community repost - Soren Pingel Dalsgaard - Jan 2017

The PixelDataWidget is a good choice for this. The required complexity of the solution depends a great deal on your target resolution and frame rate. If you're aiming for 800x480 video @24 FPS then that's a lot of bandwidth and very careful management of the data flow is required. If you need something more modest, it will be easier to implement.

The 769 JPEG decoder outputs in YCbCr format, which must be converted to RGB888/RGB565 in software before it can be shown on the screen. This part of the process could be managed by a different OS task. You can use a PixelDataWidget to then display this output, but it does add an additional copy (to the frame buffer), which may or may not be OK depending on resolution/frame rate. It will cause much copying of data:

JPEG IP -> YCbCr -> RGB888 -> Frame buffer

Alternatively, the result of the YCbCr conversion could be written directly into the frame buffer. This is faster but a bit more tricky to synchronize.

You're quite right we already did a video player implementation. We haven't posted it yet since we want to do a better, more generic API for dealing with video playback (and camera input) but that is still a while down the road. But early next week I'll look into posting the source code for the demo we did, so you can see how we did it. This demo is already available (in binary form only) for the STM32F769I-Discovery board, in case you have one of those and want to check it out. It can be downloaded at the bottom of this page: http://touchgfx.com/en/try-touchgfx/demo-applications/ . 

ANSWER - TouchGFX Community repost - Soren Pingel Dalsgaard - Jan 2017

It took me a bit longer than anticipate to prepare the source code for the demo. Sorry about that.

Anyway, you can grab it here:

http://ftp.draupnergraphics.com/TouchGFX/demos/Demo2016-source-769-Discovery.zip

This demo is for the 769 discovery board. If you do not have this board you can still compile the simulator and run it. Anyway, it features a video playback screen, capable of showing MJPEG encoded videos.

Hope this helps.

ANSWER - TouchGFX Community repost - Ajith P V - Jan 2017

http://ftp.draupnergraphics.com/TouchGFX/demos/Demo2016-source-769-Discovery.zip Is this link still active? I have tried to download but failed. I'm actually looking for a similar solution

Thank you in advance,

Ajith P V

ANSWER - TouchGFX Community repost - Jesper Hedegaard - Jan 2017

Just tried it and yes it is active. I did get a "page not found" when following the link, but I tried just pasting the address in the browser which worked.

ANSWER - TouchGFX Community repost - Ajith P V - Jan 2017

 I have downloaded, compiled and run the below demo on simulator:

 http://ftp.draupnergraphics.com/TouchGFX/demos/Demo2016-source-769-Discovery.zip

But when I compile the same demo for ST platform, I'm getting error as shown in below image snippet:

0690X000006CUHPQA4.png

Why it is showing this error for ST? Is it a working one for ST platform?

ANSWER - TouchGFX Community repost - Martin Stig Stissing - Jan 2017

Hi Ajith.

This demo is only supporting IAR so far. You can open the IAR7 application.eww project and try this out.

You might be able to add GCC support by altering the Makefile into including the right files. You need to alter the board_name to ST/STM32F769I-DISCO and setup the right paths to include the Middleware files needed

ANSWER - TouchGFX Community repost - Jith - Jan 2017

Hi,

Is video rendering demo available for STM32F769I EVK board using pixeldata widget?

ANSWER - TouchGFX Community repost - Flemming Gram christensen - Jan 2017

Hi. You can find a MPJEG video demo for STM32F769-eval board here:

http://ftp.draupnergraphics.com/TouchGFX/demos/simple_video769eval.zip

The demo is a copy of a demo for the STM32F746G-DISCO board. So it only uses the upper left 480x272 part of the screen. The video resolution is 240x240.

It uses libJPEG for decompression of the frames. It is therefore necessary to raise the size of the malloc heap to 40000 bytes. This is done in application.ld.

Please note, that this demo uses double framebuffering and a single pixeldata buffer. This is not the best approach and in fact lowers the "actual" framerate of the UI to the speed of JPEG decompression.

0 REPLIES 0