From eeaa7de21b8c7a8c9b2b7bc6a178d12e9b87c336 Mon Sep 17 00:00:00 2001 From: Harvey Yang Date: Tue, 22 Oct 2024 07:43:40 +0000 Subject: libcamera: pipeline: Add test pattern for VirtualPipelineHandler Add a test pattern generator class hierarchy for the Virtual pipeline handler. Implement two types of test patterns: color bars and diagonal lines generator and use them in the Virtual pipeline handler. A shifting mechanism is enabled. For each frame, the image is shifted to the left by 1 pixel. It drops FPS though. Add a dependency for libyuv to the build system to generate images in NV12 format from the test pattern. Signed-off-by: Konami Shu Co-developed-by: Harvey Yang Signed-off-by: Harvey Yang Co-developed-by: Yunke Cao Signed-off-by: Yunke Cao Co-developed-by: Tomasz Figa Signed-off-by: Tomasz Figa Reviewed-by: Jacopo Mondi Reviewed-by: Kieran Bingham Signed-off-by: Kieran Bingham --- src/meson.build | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/meson.build') diff --git a/src/meson.build b/src/meson.build index 165a77bb..91bea775 100644 --- a/src/meson.build +++ b/src/meson.build @@ -27,6 +27,25 @@ else ipa_sign_module = false endif +libyuv_dep = dependency('libyuv', required : false) + +# Fallback to a subproject if libyuv isn't found, as it's typically not +# provided by distributions. +if not libyuv_dep.found() + cmake = import('cmake') + + libyuv_vars = cmake.subproject_options() + libyuv_vars.add_cmake_defines({'CMAKE_POSITION_INDEPENDENT_CODE': 'ON'}) + libyuv_vars.set_override_option('cpp_std', 'c++17') + libyuv_vars.append_compile_args('cpp', + '-Wno-sign-compare', + '-Wno-unused-variable', + '-Wno-unused-parameter') + libyuv_vars.append_link_args('-ljpeg') + libyuv = cmake.subproject('libyuv', options : libyuv_vars) + libyuv_dep = libyuv.dependency('yuv') +endif + # libcamera must be built first as a dependency to the other components. subdir('libcamera') -- cgit v1.2.1