Skip to content

Commit 62da291

Browse files
Alain Volmathfruchet-st
authored andcommitted
snippets: stm32: addition of video-stm32-venc
Addition of a snippet in order to enable and configure the STM32 VENC encoder Signed-off-by: Alain Volmat <[email protected]>
1 parent 823cfc8 commit 62da291

File tree

5 files changed

+57
-0
lines changed

5 files changed

+57
-0
lines changed

snippets/stm32/index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. _stm32-snippets:
2+
3+
STM32 snippets
4+
##############
5+
6+
.. toctree::
7+
:maxdepth: 1
8+
:glob:
9+
10+
**/*
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.. _snippet-video-stm32-venc:
2+
3+
STM32 Video ENCoder (VENC) Snippet (video-stm32-venc)
4+
#####################################################
5+
6+
.. code-block:: console
7+
8+
west build -S video-stm32-venc [...]
9+
10+
Overview
11+
********
12+
13+
This snippet instantiate the STM32 Video ENCoder (VENC) and set it
14+
as ``zephyr,videoenc`` :ref:`devicetree` chosen node.
15+
16+
Requirements
17+
************
18+
19+
The board must have the hardware support for the Video ENCoder (VENC).
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: video-stm32-venc
2+
append:
3+
EXTRA_DTC_OVERLAY_FILE: video-stm32-venc.overlay
4+
EXTRA_CONF_FILE: video-stm32-venc.conf
5+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# VENC output format
2+
CONFIG_VIDEO_ENCODED_PIXEL_FORMAT="H264"
3+
4+
# Default frame size
5+
CONFIG_VIDEO_FRAME_WIDTH=1920
6+
CONFIG_VIDEO_FRAME_HEIGHT=1080
7+
8+
# VENC default input format
9+
CONFIG_VIDEO_PIXEL_FORMAT="NV12"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright (c) 2025 STMicroelectronics
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/ {
7+
chosen {
8+
zephyr,videoenc = &venc;
9+
};
10+
};
11+
12+
&venc {
13+
status = "okay";
14+
};

0 commit comments

Comments
 (0)