Skip to content

video: samples: i.MX RT10xx: Do not use PxP to flip images #82672

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
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
5 changes: 5 additions & 0 deletions samples/drivers/video/capture/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ config VIDEO_PIXEL_FORMAT
help
Pixel format of the video frame. If not set, the default pixel format is used.

config VIDEO_CTRL_HFLIP
bool "Mirror the video frame horizontally"
help
If set, mirror the video frame horizontally

endmenu

source "Kconfig.zephyr"
6 changes: 2 additions & 4 deletions samples/drivers/video/capture/boards/mimxrt1060_evkb.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
# Leverage PXP to mirror image by flipping
CONFIG_DMA=y
CONFIG_MCUX_ELCDIF_PXP=y
CONFIG_MCUX_ELCDIF_PXP_FLIP_HORIZONTAL=y
# Mirror video images horizontally
CONFIG_VIDEO_CTRL_HFLIP=y
6 changes: 2 additions & 4 deletions samples/drivers/video/capture/boards/mimxrt1064_evk.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
# Leverage PXP to mirror image by flipping
CONFIG_DMA=y
CONFIG_MCUX_ELCDIF_PXP=y
CONFIG_MCUX_ELCDIF_PXP_FLIP_HORIZONTAL=y
# Mirror video images horizontally
CONFIG_VIDEO_CTRL_HFLIP=y
8 changes: 6 additions & 2 deletions samples/drivers/video/capture/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@

#include <zephyr/drivers/display.h>
#include <zephyr/drivers/video.h>
#include <zephyr/drivers/video-controls.h>

#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(main);

#ifdef CONFIG_TEST
#include <zephyr/drivers/video-controls.h>

#include "check_test_pattern.h"

#define LOG_LEVEL LOG_LEVEL_DBG
Expand Down Expand Up @@ -179,6 +178,11 @@ int main(void)
fie.index++;
}

/* Set controls */
if (IS_ENABLED(CONFIG_VIDEO_CTRL_HFLIP)) {
video_set_ctrl(video_dev, VIDEO_CID_HFLIP, (void *)1);
}

#ifdef CONFIG_TEST
video_set_ctrl(video_dev, VIDEO_CID_TEST_PATTERN, (void *)1);
#endif
Expand Down
Loading