cancel
Showing results for 
Search instead for 
Did you mean: 

STM32N6 camera code roadmap (DCMIPP -> VENC -> x) ?

svogl
Associate III

Dear all,

we're creating a camera application and have successfully run and modified some of the demos available. ( State at time of writing: 800x600 30 fps full-frame encoding to SDCard).

We have full-frame double-buffering code running but this is consuming extensive memory; from the documentation I saw that there is a hardware-linked mode available chaining DCMIPP and VENC cores. From the code, I see there is one implementation in VENC_USB example.

The camera and venc middlewares on github miss the slice aka "HW Handshake mode" so I wonder which code-base is recent and will be supported in the future, especially as CubeMX does not (yet) support VENC configuration.

We're trying to go beyond a proof of concept, so I'd like to base our project on a maintained code-base but that is hard to spot, could you give some indications?
Many thanks,

Simon

 

 

7 REPLIES 7
FBL
ST Employee

Hi @svogl 

In your case, I would suggest this example firmware for SDCard recording.  Can you provide more details about : the slice aka "HW Handshake mode" issue?

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.




Best regards,
FBL
svogl
Associate III

hi @FBL ,

apparently, the VENC_USB example implements a mode that links dcmipp line interrupts to the venc encoder interrupts, which reduces the amount of internal RAM needed significantly (from full frames to multiples of 16 lines == macroblock sizes).

This code is not present anywhere else but would be needed to support higher resolutions. I have successfully modified the VENC_SDCard_ThreadX example to run with 800x600 pixels, which is about the maximum before hitting memory limits (n.b. that the VENC encoder library internally needs another full frame for reference >= 1.01MB in best case - I have these in PSRAM already but I start seeing timing-related artifacts in the encoded h264 stream).

Maybe you can check with the camera development team what is on the roadmap?

Simon

 

Hi @svogl again, 

Thank you for the heads up! Would you make sure to use latest CubeN6 version provided on GitHub. I found updates in latest version to correct PSRAM initialization in VENC_USB application and enhance VENC_SDCard application to support resolution changes.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.




Best regards,
FBL
svogl
Associate III

thanks for the update, will check the latest state there.

Side-question: Is there a CubeMX config file available for one of the examples? It would be helpful to get access to the clock tree etc. in an ordered way.

 

Hi @svogl 

Unfortunately, VideoEncoder_EWL middleware is not supported as of now using CubeMX.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.




Best regards,
FBL
svogl
Associate III

Hi @FBL , 

I finally had some time to start with the latest VENC code. The VENC_SDCard_ThreadX example does not compile (Linux) due to an absolute Windoes path in the project settings, I posted a PR here:

https://github.com/STMicroelectronics/STM32CubeN6/pull/13

--> the same applies to other projects.

both VENC_SDCard and the threadx exmaples crash in under a second. In which configuration have these been tested?
Simon 

svogl
Associate III

And after upgrading to the latest STMCubeIDE version (2.1.0), stricter type checks caused an error in the venc code - there's a PR fixing this:

https://github.com/STMicroelectronics/STM32CubeN6/pull/14