Skip to content

Conversation

hfruchet-st
Copy link

This PR introduces the VC8000NanoE software stack needed on top of STM32N6 VENC hardware peripheral in order to enable H264 hardware video compression.
This code comes from STM32CubeN6 firmware code located here: https://github.com/STMicroelectronics/STM32CubeN6/tree/main/Middlewares/Third_Party/VideoEncoder/source
Some changes have been made to comply with Zephyr build system and Zephyr kernel defines.
The debug trace system has been adapted and some trace points fixed.
Defining CONFIG_VENC_DEBUG enable printf trace logs.

Add VC8000NanoE H264 video encoding stack needed by
STM32 VENC peripheral to generate H264 compressed bitstream.

Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Avoid bool redefinition.

Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Avoid min/max redefinition.

Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Add debug trace support.

Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Fix some debug trace points.

Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com
Trace pointers in hexa instead of decimal.

Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please drop this file - it's large and unneeded. (Also, I'm a bit worried about licensing...)

Comment on lines 156 to 161
#ifndef MAX
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#endif
#ifndef MIN
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To workaround this, provide and use an alternate definition:

-#define MAX(a, b)       ((a) > (b) ?  (a) : (b))
+#define STM32_MAX(a, b)       ((a) > (b) ?  (a) : (b))

Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a README filr documenting lib origin, how it is maintained, potential add on fixes. See https://github.com/zephyrproject-rtos/hal_stm32/blob/main/lib/stm32wba/README.rst as exemple

Comment on lines 156 to 161
#ifndef MAX
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#endif
#ifndef MIN
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To workaround this, provide and use an alternate definition:

-#define MAX(a, b)       ((a) > (b) ?  (a) : (b))
+#define STM32_MAX(a, b)       ((a) > (b) ?  (a) : (b))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign-off issue on this commit:

-Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com
+Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants