Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions boards/st/stm32n6570_dk/stm32n6570_dk_common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -517,3 +517,7 @@ csi_interface: &dcmipp {
csi_ep_in: endpoint {};
};
};

&venc {
status = "okay";
};
6 changes: 6 additions & 0 deletions drivers/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ config VIDEO_I2C_RETRY_NUM
The default is to not retry. Board configuration files or user project can then
use the number of retries that matches their situation.

config VIDEO_ENCODER_H264
bool "H264 video encoder support"

config VIDEO_ENCODER_JPEG
bool "JPEG video encoder support"

source "drivers/video/Kconfig.esp32_dvp"

source "drivers/video/Kconfig.mcux_csi"
Expand Down
1 change: 1 addition & 0 deletions drivers/video/Kconfig.stm32_venc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ config VIDEO_STM32_VENC
bool "STM32 video encoder (VENC) driver"
default y
depends on DT_HAS_ST_STM32_VENC_ENABLED
depends on VIDEO_ENCODER_H264
select HAS_STM32LIB
select USE_STM32_LL_VENC
select USE_STM32_HAL_RIF if SOC_SERIES_STM32N6X
Expand Down
14 changes: 3 additions & 11 deletions samples/drivers/video/tcpserversink/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,14 @@ a video software pattern generator is supported by using :ref:`snippet-video-sw-
:goals: build
:compact:

For :zephyr:board:`stm32n6570_dk`, the sample can be built with the following command:
For :zephyr:board:`stm32n6570_dk`, the sample can be built with H264 video compression
support using the venc file_suffix at the end of the following command:

.. zephyr-app-commands::
:zephyr-app: samples/drivers/video/tcpserversink
:board: stm32n6570_dk
:shield: st_b_cams_imx_mb1854
:goals: build
:compact:

The same can be built with H264 video compression support using :ref:`snippet-video-stm32-venc`:

.. zephyr-app-commands::
:zephyr-app: samples/drivers/video/tcpserversink
:board: stm32n6570_dk
:shield: st_b_cams_imx_mb1854
:snippets: video-stm32-venc
:gen-args: -DFILE_SUFFIX=venc
:goals: build
:compact:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ CONFIG_FPU=y
CONFIG_VIDEO_CAPTURE_N_BUFFERING=2

# Video encoder
CONFIG_VIDEO_ENCODER_H264=y
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_VIDEO_ENCODED_PIXEL_FORMAT="H264"

# Default frame size
CONFIG_VIDEO_PIXEL_FORMAT="NV12"
CONFIG_VIDEO_FRAME_WIDTH=1920
CONFIG_VIDEO_FRAME_HEIGHT=1080

# Network buffers
CONFIG_NET_BUF_RX_COUNT=4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,3 @@
zephyr,videoenc = &venc;
};
};

&venc {
status = "okay";
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ CONFIG_FPU=y
CONFIG_VIDEO_CAPTURE_N_BUFFERING=2

# Video encoder
CONFIG_VIDEO_ENCODER_H264=y
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_VIDEO_ENCODED_PIXEL_FORMAT="H264"

# Default frame size
CONFIG_VIDEO_PIXEL_FORMAT="NV12"
CONFIG_VIDEO_FRAME_WIDTH=1920
CONFIG_VIDEO_FRAME_HEIGHT=1080

# Network buffers
CONFIG_NET_BUF_RX_COUNT=4
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* Copyright (c) 2025 STMicroelectronics
* SPDX-License-Identifier: Apache-2.0
*/

/ {
chosen {
zephyr,videoenc = &venc;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ CONFIG_FPU=y
CONFIG_VIDEO_CAPTURE_N_BUFFERING=2

# Video encoder
CONFIG_VIDEO_ENCODER_H264=y
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_VIDEO_ENCODED_PIXEL_FORMAT="H264"

# Default frame size
CONFIG_VIDEO_PIXEL_FORMAT="NV12"
CONFIG_VIDEO_FRAME_WIDTH=1920
CONFIG_VIDEO_FRAME_HEIGHT=1080

# Network buffers
CONFIG_NET_BUF_RX_COUNT=4
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* Copyright (c) 2025 STMicroelectronics
* SPDX-License-Identifier: Apache-2.0
*/

/ {
chosen {
zephyr,videoenc = &venc;
};
};
2 changes: 1 addition & 1 deletion samples/drivers/video/tcpserversink/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ tests:
- stm32n6570_dk/stm32n657xx/sb
extra_args:
- platform:mimxrt1064_evk/mimxrt1064:SHIELD=dvp_fpc24_mt9m114
- platform:stm32n6570_dk/stm32n657xx/sb:SNIPPET=video-stm32-venc
- platform:stm32n6570_dk/stm32n657xx/sb:FILE_SUFFIX=venc
- platform:stm32n6570_dk/stm32n657xx/sb:SHIELD=st_b_cams_imx_mb1854
10 changes: 0 additions & 10 deletions snippets/stm32/index.rst

This file was deleted.

19 changes: 0 additions & 19 deletions snippets/stm32/video-stm32-venc/README.rst

This file was deleted.

4 changes: 0 additions & 4 deletions snippets/stm32/video-stm32-venc/snippet.yml

This file was deleted.

9 changes: 0 additions & 9 deletions snippets/stm32/video-stm32-venc/video-stm32-venc.conf

This file was deleted.