diff options
author | Wind Yuan <feng.yuan@intel.com> | 2017-09-05 18:48:55 +0800 |
---|---|---|
committer | windyuan <feng.yuan@intel.com> | 2017-09-06 19:00:30 +0800 |
commit | af9df6be52ea20d58d6ad17fc770d207407880e6 (patch) | |
tree | 9df0e8422e849692500193369501c1e20717e310 | |
parent | 548b29dc4816b4097f6267873bfe699f4ad8623c (diff) | |
download | libxcam-af9df6be52ea20d58d6ad17fc770d207407880e6.tar.gz |
interface: extract blender base class
Signed-off-by: Wind Yuan <feng.yuan@intel.com>
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | modules/Makefile.am | 2 | ||||
-rw-r--r-- | modules/interface/Makefile.am | 38 | ||||
-rw-r--r-- | modules/interface/blender.cpp | 113 | ||||
-rw-r--r-- | modules/interface/blender.h | 99 | ||||
-rw-r--r-- | modules/ocl/Makefile.am | 1 | ||||
-rw-r--r-- | modules/ocl/cl_blender.cpp | 97 | ||||
-rw-r--r-- | modules/ocl/cl_blender.h | 37 | ||||
-rw-r--r-- | modules/ocl/cl_image_360_stitch.cpp | 32 | ||||
-rw-r--r-- | modules/ocl/cl_pyramid_blender.cpp | 44 | ||||
-rw-r--r-- | modules/ocl/cl_pyramid_blender.h | 8 | ||||
-rw-r--r-- | modules/soft/soft_worker.cpp | 6 | ||||
-rw-r--r-- | tests/Makefile.am | 94 |
13 files changed, 379 insertions, 193 deletions
diff --git a/configure.ac b/configure.ac index 4555022..2916e55 100644 --- a/configure.ac +++ b/configure.ac @@ -352,6 +352,7 @@ AC_CONFIG_FILES([Makefile clx_kernel/Makefile xcore/Makefile modules/Makefile + modules/interface/Makefile modules/soft/Makefile modules/isp/Makefile modules/ocl/Makefile diff --git a/modules/Makefile.am b/modules/Makefile.am index fd362f8..a72744b 100644 --- a/modules/Makefile.am +++ b/modules/Makefile.am @@ -10,4 +10,4 @@ else ISP_DIR = endif -SUBDIRS = soft $(ISP_DIR) $(OCL_DIR) +SUBDIRS = interface soft $(ISP_DIR) $(OCL_DIR) diff --git a/modules/interface/Makefile.am b/modules/interface/Makefile.am new file mode 100644 index 0000000..27b2f98 --- /dev/null +++ b/modules/interface/Makefile.am @@ -0,0 +1,38 @@ +lib_LTLIBRARIES = libxcam_interface.la + +XCAM_INTERFACE_CXXFLAGS = \ + $(LIBCL_CFLAGS) \ + -I$(top_srcdir)/xcore \ + -I$(top_srcdir)/modules \ + $(NULL) + +xcam_interface_sources = \ + blender.cpp \ + $(NULL) + +libxcam_interface_la_SOURCES = \ + $(xcam_interface_sources) \ + $(NULL) + +libxcam_interface_la_CXXFLAGS = \ + $(XCAM_INTERFACE_CXXFLAGS) \ + $(XCAM_CXXFLAGS) \ + $(NULL) + +libxcam_interface_la_LIBADD = \ + $(top_builddir)/xcore/libxcam_core.la \ + $(NULL) + +libxcam_interface_la_LDFLAGS = \ + $(XCAM_LT_LDFLAGS) \ + $(PTHREAD_LDFLAGS) \ + $(NULL) + +libxcam_interfaceincludedir = $(includedir)/xcam/interface + +nobase_libxcam_interfaceinclude_HEADERS = \ + data_types.h \ + blender.h \ + $(NULL) + +libxcam_interface_la_LIBTOOLFLAGS = --tag=disable-static diff --git a/modules/interface/blender.cpp b/modules/interface/blender.cpp new file mode 100644 index 0000000..4ad30c8 --- /dev/null +++ b/modules/interface/blender.cpp @@ -0,0 +1,113 @@ +/* + * blender.h - blender interface + * + * Copyright (c) 2017 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Author: Wind Yuan <feng.yuan@intel.com> + */ + +#include "blender.h" + +namespace XCam { + +Blender::Blender (uint32_t alignment_x, uint32_t alignment_y) + : _alignment_x (alignment_x) + , _alignment_y (alignment_y) + , _out_width (0) + , _out_height (0) +{ +} + +Blender::~Blender () +{ +} + +void +Blender::set_output_size (uint32_t width, uint32_t height) { + _out_width = XCAM_ALIGN_UP (width, get_alignment_x ()); + _out_height = XCAM_ALIGN_UP (height, get_alignment_y ()); +} + +bool +Blender::set_merge_window (const Rect &window) { + uint32_t alignmend_x = get_alignment_x (); + + _merge_window = window; + _merge_window.pos_x = XCAM_ALIGN_AROUND (_merge_window.pos_x, alignmend_x); + _merge_window.width = XCAM_ALIGN_AROUND (_merge_window.width, alignmend_x); + XCAM_ASSERT (_merge_window.width >= (int32_t)alignmend_x); + XCAM_LOG_DEBUG( + "Blender merge window:(x:%d, width:%d), blend_width:%d", + _merge_window.pos_x, _merge_window.width, _out_width); + return true; +} + +bool +Blender::set_input_valid_area (const Rect &area, uint32_t index) +{ + XCAM_ASSERT (index < XCAM_BLENDER_IMAGE_NUM); + _input_valid_area[index] = area; + + uint32_t alignmend_x = get_alignment_x (); + _input_valid_area[index].pos_x = XCAM_ALIGN_DOWN (_input_valid_area[index].pos_x, alignmend_x); + _input_valid_area[index].width = XCAM_ALIGN_UP (_input_valid_area[index].width, alignmend_x); + + XCAM_LOG_DEBUG( + "Blender buf(%d) valid area:(x:%d, width:%d)", + index, _input_valid_area[index].pos_x, _input_valid_area[index].width); + return true; +} + +bool +Blender::set_input_merge_area (const Rect &area, uint32_t index) +{ + XCAM_ASSERT (index < XCAM_BLENDER_IMAGE_NUM); + if (!is_merge_window_set ()) { + XCAM_LOG_ERROR ("set_input_merge_area(idx:%d) failed, need set merge window first", index); + return false; + } + + _input_merge_area[index] = area; + _input_merge_area[index].pos_x = XCAM_ALIGN_AROUND (_input_merge_area[index].pos_x, get_alignment_x ()); + _input_merge_area[index].pos_y = XCAM_ALIGN_AROUND (_input_merge_area[index].pos_y, get_alignment_y ()); + + XCAM_LOG_DEBUG( + "Blender buf(%d) merge area:(x:%d, width:%d)", + index, _input_merge_area[index].pos_x, _input_merge_area[index].width); + + return true; +} + +bool +Blender::auto_calc_merge_window ( + uint32_t width0, uint32_t width1, uint32_t blend_width, + Rect &out_window) +{ + out_window.pos_x = blend_width - width1; + out_window.width = (width0 + width1 - blend_width) / 2; + + out_window.pos_x = XCAM_ALIGN_AROUND (out_window.pos_x, get_alignment_x ()); + out_window.width = XCAM_ALIGN_AROUND (out_window.width, get_alignment_x ()); + if ((int)blend_width < out_window.pos_x + out_window.width) + out_window.width = blend_width - out_window.pos_x; + + XCAM_ASSERT (out_window.width > 0 && out_window.width <= (int)blend_width); + XCAM_ASSERT (out_window.pos_x >= 0 && out_window.pos_x <= (int)blend_width); + + return true; +} + + +} diff --git a/modules/interface/blender.h b/modules/interface/blender.h new file mode 100644 index 0000000..fd15c7b --- /dev/null +++ b/modules/interface/blender.h @@ -0,0 +1,99 @@ +/* + * blender.h - blender interface + * + * Copyright (c) 2017 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Author: Wind Yuan <feng.yuan@intel.com> + */ + +#ifndef XCAM_INTERFACE_BLENDER_H +#define XCAM_INTERFACE_BLENDER_H + +#include "xcam_utils.h" +#include "interface/data_types.h" +#include "video_buffer.h" + +#define XCAM_BLENDER_IMAGE_NUM 2 + +namespace XCam { + +class Blender; + +class Blender +{ +public: + explicit Blender (uint32_t alignment_x, uint32_t alignment_y); + virtual ~Blender (); + static SmartPtr<Blender> create_ocl_blender (); + static SmartPtr<Blender> create_soft_blender (); + + void set_output_size (uint32_t width, uint32_t height); + void get_output_size (uint32_t &width, uint32_t &height) const { + width = _out_width; + height = _out_height; + } + bool set_input_valid_area (const Rect &area, uint32_t index); + bool set_merge_window (const Rect &window); + virtual bool set_input_merge_area (const Rect &area, uint32_t index); + + const Rect &get_merge_window () const { + return _merge_window; + } + + const Rect &get_input_merge_area (uint32_t index) const { + return _input_merge_area[index]; + } + const Rect &get_input_valid_area (uint32_t index) const { + return _input_valid_area[index]; + } + + bool is_merge_window_set () const { + return _merge_window.pos_x || _merge_window.width; + } + + uint32_t get_alignment_x () const { + return _alignment_x; + } + uint32_t get_alignment_y () const { + return _alignment_y; + } + +#if 0 + virtual XCamReturn blend ( + const SmartPtr<VideoBuffer> &in0, + const SmartPtr<VideoBuffer> &in1, + SmartPtr<VideoBuffer> &out_buf) = 0; +#endif + +protected: + bool auto_calc_merge_window ( + uint32_t width0, uint32_t width1, uint32_t blend_width, Rect &out_window); + +private: + XCAM_DEAD_COPY (Blender); + +private: + uint32_t _alignment_x, _alignment_y; + uint32_t _out_width, _out_height; + Rect _input_valid_area[XCAM_BLENDER_IMAGE_NUM]; + Rect _merge_window; // for output buffer + +protected: + Rect _input_merge_area[XCAM_BLENDER_IMAGE_NUM]; +}; + +} + +#endif //XCAM_INTERFACE_BLENDER_H diff --git a/modules/ocl/Makefile.am b/modules/ocl/Makefile.am index fffc3a2..7c81d7f 100644 --- a/modules/ocl/Makefile.am +++ b/modules/ocl/Makefile.am @@ -92,6 +92,7 @@ libxcam_ocl_la_CXXFLAGS = \ $(NULL) libxcam_ocl_la_LIBADD = \ + $(top_builddir)/modules/interface/libxcam_interface.la \ $(top_builddir)/xcore/libxcam_core.la \ $(XCAMOCL_LIBS) \ $(NULL) diff --git a/modules/ocl/cl_blender.cpp b/modules/ocl/cl_blender.cpp index 1c7b2dd..c22fa10 100644 --- a/modules/ocl/cl_blender.cpp +++ b/modules/ocl/cl_blender.cpp @@ -61,66 +61,29 @@ CLBlender::CLBlender ( const SmartPtr<CLContext> &context, const char *name, bool need_uv, CLBlenderScaleMode scale_mode) : CLImageHandler (context, name) - , _output_width (0) - , _output_height (0) + , Blender (XCAM_CL_BLENDER_ALIGNMENT_X, XCAM_CL_BLENDER_ALIGNMENT_Y) , _need_uv (need_uv) , _swap_input_index (false) , _scale_mode (scale_mode) { -} - -bool -CLBlender::set_merge_window (const Rect &window) { - _merge_window = window; - _merge_window.pos_x = XCAM_ALIGN_AROUND (_merge_window.pos_x, XCAM_BLENDER_ALIGNED_WIDTH); - _merge_window.width = XCAM_ALIGN_AROUND (_merge_window.width, XCAM_BLENDER_ALIGNED_WIDTH); - XCAM_ASSERT (_merge_window.width >= XCAM_BLENDER_ALIGNED_WIDTH); - XCAM_LOG_DEBUG( - "CLBlender(%s) merge window:(x:%d, width:%d), blend_width:%d", - XCAM_STR (get_name()), - _merge_window.pos_x, _merge_window.width, _output_width); - return true; -} - -bool -CLBlender::set_input_valid_area (const Rect &area, uint32_t index) -{ - XCAM_ASSERT (index < XCAM_CL_BLENDER_IMAGE_NUM); - _input_valid_area[index] = area; - - _input_valid_area[index].pos_x = XCAM_ALIGN_DOWN (_input_valid_area[index].pos_x, XCAM_BLENDER_ALIGNED_WIDTH); - _input_valid_area[index].width = XCAM_ALIGN_UP (_input_valid_area[index].width, XCAM_BLENDER_ALIGNED_WIDTH); - - XCAM_LOG_DEBUG( - "CLBlender(%s) buf(%d) valid area:(x:%d, width:%d)", - XCAM_STR(get_name()), index, - _input_valid_area[index].pos_x, _input_valid_area[index].width); - return true; + XCAM_ASSERT (get_alignment_x () == XCAM_CL_BLENDER_ALIGNMENT_X); + XCAM_ASSERT (get_alignment_y () == XCAM_CL_BLENDER_ALIGNMENT_Y); } bool CLBlender::set_input_merge_area (const Rect &area, uint32_t index) { - XCAM_ASSERT (index < XCAM_CL_BLENDER_IMAGE_NUM); - if (!is_merge_window_set ()) { - XCAM_LOG_ERROR ("set_input_merge_area(idx:%d) failed, need set merge window first", index); - return false; - } - + Rect tmp_area = area; if (_scale_mode == CLBlenderScaleGlobal) - XCAM_ASSERT (fabs((int32_t)(area.width - _merge_window.width)) < XCAM_BLENDER_ALIGNED_WIDTH); + tmp_area.width = get_merge_window ().width; - _input_merge_area[index] = area; - _input_merge_area[index].pos_x = XCAM_ALIGN_AROUND (_input_merge_area[index].pos_x, XCAM_BLENDER_ALIGNED_WIDTH); - if (_scale_mode == CLBlenderScaleGlobal) - _input_merge_area[index].width = _merge_window.width; + bool ret = Blender::set_input_merge_area (tmp_area, index); - XCAM_LOG_DEBUG( - "CLBlender(%s) buf(%d) merge area:(x:%d, width:%d)", - XCAM_STR(get_name()), index, - _input_merge_area[index].pos_x, _input_merge_area[index].width); + if (ret && _scale_mode == CLBlenderScaleGlobal) { + XCAM_ASSERT (fabs((int32_t)(area.width - get_merge_window ().width)) < XCAM_CL_BLENDER_ALIGNMENT_X); + } - return true; + return ret; } XCamReturn @@ -128,11 +91,12 @@ CLBlender::prepare_buffer_pool_video_info ( const VideoBufferInfo &input, VideoBufferInfo &output) { - uint32_t output_width = _output_width; - uint32_t output_height = input.height; + uint32_t output_width, output_height; + get_output_size (output_width, output_height); + XCAM_ASSERT (output_height == input.height); // aligned at least XCAM_BLENDER_ALIGNED_WIDTH - uint32_t aligned_width = XCAM_MAX (16, XCAM_BLENDER_ALIGNED_WIDTH); + uint32_t aligned_width = XCAM_MAX (16, XCAM_CL_BLENDER_ALIGNMENT_X); output.init ( input.format, output_width, output_height, XCAM_ALIGN_UP(output_width, aligned_width), XCAM_ALIGN_UP(output_height, 16)); @@ -166,13 +130,13 @@ CLBlender::prepare_parameters (SmartPtr<DrmBoBuffer> &input, SmartPtr<DrmBoBuffe const VideoBufferInfo &in1_info = input1->get_video_info (); const VideoBufferInfo &out_info = output->get_video_info (); - if (!_input_valid_area[0].width) { + if (!get_input_valid_area (0).width) { Rect area; area.width = in0_info.width; area.height = in0_info.height; set_input_valid_area (area, 0); } - if (!_input_valid_area[1].width) { + if (!get_input_valid_area (1).width) { Rect area; area.width = in1_info.width; area.height = in1_info.height; @@ -183,7 +147,7 @@ CLBlender::prepare_parameters (SmartPtr<DrmBoBuffer> &input, SmartPtr<DrmBoBuffe Rect merge_window; XCAM_FAIL_RETURN ( WARNING, - calculate_merge_window (get_input_valid_area(0).width, get_input_valid_area(1).width, out_info.width, merge_window), + auto_calc_merge_window (get_input_valid_area(0).width, get_input_valid_area(1).width, out_info.width, merge_window), XCAM_RETURN_ERROR_PARAM, "CLBlender(%s) auto calculate merge window failed", get_name ()); @@ -204,23 +168,18 @@ CLBlender::prepare_parameters (SmartPtr<DrmBoBuffer> &input, SmartPtr<DrmBoBuffe return ret; } -bool -CLBlender::calculate_merge_window ( - uint32_t width0, uint32_t width1, uint32_t blend_width, - Rect &out_window) +SmartPtr<Blender> +create_ocl_blender () { - out_window.pos_x = blend_width - width1; - out_window.width = (width0 + width1 - blend_width) / 2; - - out_window.pos_x = XCAM_ALIGN_AROUND (out_window.pos_x, XCAM_BLENDER_ALIGNED_WIDTH); - out_window.width = XCAM_ALIGN_AROUND (out_window.width, XCAM_BLENDER_ALIGNED_WIDTH); - if ((int)blend_width < out_window.pos_x + out_window.width) - out_window.width = blend_width - out_window.pos_x; - - XCAM_ASSERT (out_window.width > 0 && out_window.width <= (int)blend_width); - XCAM_ASSERT (out_window.pos_x >= 0 && out_window.pos_x <= (int)blend_width); - - return true; + SmartPtr<CLContext> context = CLDevice::instance ()->get_context (); + XCAM_FAIL_RETURN ( + ERROR, context.ptr (), NULL, + "create ocl blender failed to get cl context"); + SmartPtr<CLBlender> blender = create_pyramid_blender (context, 2, true, false).dynamic_cast_ptr<CLBlender> (); + XCAM_FAIL_RETURN ( + ERROR, blender.ptr (), NULL, + "create ocl blender failed to get pyramid blender"); + return blender; } }; diff --git a/modules/ocl/cl_blender.h b/modules/ocl/cl_blender.h index e3a4be4..07b1d8b 100644 --- a/modules/ocl/cl_blender.h +++ b/modules/ocl/cl_blender.h @@ -23,10 +23,11 @@ #include "xcam_utils.h" #include "interface/data_types.h" +#include "interface/blender.h" #include "ocl/cl_image_handler.h" -#define XCAM_CL_BLENDER_IMAGE_NUM 2 -#define XCAM_BLENDER_ALIGNED_WIDTH 8 +#define XCAM_CL_BLENDER_ALIGNMENT_X 8 +#define XCAM_CL_BLENDER_ALIGNMENT_Y 1 namespace XCam { @@ -65,38 +66,19 @@ protected: }; class CLBlender - : public CLImageHandler + : public CLImageHandler, public Blender { public: explicit CLBlender ( const SmartPtr<CLContext> &context, const char *name, bool need_uv, CLBlenderScaleMode scale_mode); - void set_output_size (uint32_t width, uint32_t height) { - _output_width = width; //XCAM_ALIGN_UP (width, XCAM_BLENDER_ALIGNED_WIDTH); - _output_height = height; - } - - bool set_input_valid_area (const Rect &area, uint32_t index); - bool set_merge_window (const Rect &window); - bool set_input_merge_area (const Rect &area, uint32_t index); - - const Rect &get_merge_window () const { - return _merge_window; - } - const Rect &get_input_merge_area (uint32_t index) const { - return _input_merge_area[index]; - } - const Rect &get_input_valid_area (uint32_t index) const { - return _input_valid_area[index]; - } + //derived from Blender + virtual bool set_input_merge_area (const Rect &area, uint32_t index); bool need_uv () const { return _need_uv; } - bool is_merge_window_set () const { - return _merge_window.pos_x || _merge_window.width; - } CLBlenderScaleMode get_scale_mode () const { return _scale_mode; @@ -112,8 +94,6 @@ protected: const VideoBufferInfo &input, VideoBufferInfo &output); - bool calculate_merge_window (uint32_t width0, uint32_t width1, uint32_t blend_width, Rect &out_window); - //abstract virtual functions virtual XCamReturn allocate_cl_buffers ( SmartPtr<CLContext> context, SmartPtr<DrmBoBuffer> &input0, @@ -123,11 +103,6 @@ private: XCAM_DEAD_COPY (CLBlender); private: - uint32_t _output_width; - uint32_t _output_height; - Rect _input_valid_area[XCAM_CL_BLENDER_IMAGE_NUM]; - Rect _input_merge_area[XCAM_CL_BLENDER_IMAGE_NUM]; - Rect _merge_window; // for output buffer bool _need_uv; bool _swap_input_index; CLBlenderScaleMode _scale_mode; diff --git a/modules/ocl/cl_image_360_stitch.cpp b/modules/ocl/cl_image_360_stitch.cpp index 954a8ed..5b69820 100644 --- a/modules/ocl/cl_image_360_stitch.cpp +++ b/modules/ocl/cl_image_360_stitch.cpp @@ -436,8 +436,8 @@ CLImage360Stitch::prepare_buffer_pool_video_info ( return XCAM_RETURN_ERROR_PARAM; } - // aligned at least XCAM_BLENDER_ALIGNED_WIDTH - uint32_t aligned_width = XCAM_MAX (16, XCAM_BLENDER_ALIGNED_WIDTH); + // aligned at least XCAM_CL_BLENDER_ALIGNMENT_X + uint32_t aligned_width = XCAM_MAX (16, XCAM_CL_BLENDER_ALIGNMENT_X); output.init ( input.format, _output_width, _output_height, XCAM_ALIGN_UP(_output_width, aligned_width), XCAM_ALIGN_UP(_output_height, 16)); @@ -497,15 +497,15 @@ CLImage360Stitch::prepare_global_scale_blender_parameters ( Rect left_lap = get_image_overlap (idx, 1); Rect right_lap = get_image_overlap (idx_next, 0); - int left_img_mid = XCAM_ALIGN_DOWN (in0_info.width / 2, XCAM_BLENDER_ALIGNED_WIDTH); - int right_img_mid = XCAM_ALIGN_DOWN (in1_info.width / 2, XCAM_BLENDER_ALIGNED_WIDTH); + int left_img_mid = XCAM_ALIGN_DOWN (in0_info.width / 2, XCAM_CL_BLENDER_ALIGNMENT_X); + int right_img_mid = XCAM_ALIGN_DOWN (in1_info.width / 2, XCAM_CL_BLENDER_ALIGNMENT_X); int32_t prev_pos; prev_pos = left_lap.pos_x; - left_lap.pos_x = XCAM_ALIGN_AROUND (left_lap.pos_x, XCAM_BLENDER_ALIGNED_WIDTH); - left_lap.width = XCAM_ALIGN_UP (left_lap.width, XCAM_BLENDER_ALIGNED_WIDTH); + left_lap.pos_x = XCAM_ALIGN_AROUND (left_lap.pos_x, XCAM_CL_BLENDER_ALIGNMENT_X); + left_lap.width = XCAM_ALIGN_UP (left_lap.width, XCAM_CL_BLENDER_ALIGNMENT_X); right_lap.pos_x += left_lap.pos_x - prev_pos; - right_lap.pos_x = XCAM_ALIGN_AROUND (right_lap.pos_x, XCAM_BLENDER_ALIGNED_WIDTH); + right_lap.pos_x = XCAM_ALIGN_AROUND (right_lap.pos_x, XCAM_CL_BLENDER_ALIGNMENT_X); right_lap.width = left_lap.width; Rect area; @@ -549,17 +549,17 @@ CLImage360Stitch::prepare_local_scale_blender_parameters ( Rect left_lap = get_image_overlap (idx, 1); Rect right_lap = get_image_overlap (idx_next, 0); - int left_img_mid = XCAM_ALIGN_DOWN (in0_info.width / 2, XCAM_BLENDER_ALIGNED_WIDTH); - int right_img_mid = XCAM_ALIGN_DOWN (in1_info.width / 2, XCAM_BLENDER_ALIGNED_WIDTH); - int cur_start_pos = XCAM_ALIGN_DOWN (out_info.width / _fisheye_num * idx, XCAM_BLENDER_ALIGNED_WIDTH); - int merge_std_width = XCAM_ALIGN_DOWN (out_info.width / _fisheye_num, XCAM_BLENDER_ALIGNED_WIDTH); + int left_img_mid = XCAM_ALIGN_DOWN (in0_info.width / 2, XCAM_CL_BLENDER_ALIGNMENT_X); + int right_img_mid = XCAM_ALIGN_DOWN (in1_info.width / 2, XCAM_CL_BLENDER_ALIGNMENT_X); + int cur_start_pos = XCAM_ALIGN_DOWN (out_info.width / _fisheye_num * idx, XCAM_CL_BLENDER_ALIGNMENT_X); + int merge_std_width = XCAM_ALIGN_DOWN (out_info.width / _fisheye_num, XCAM_CL_BLENDER_ALIGNMENT_X); int32_t prev_pos; prev_pos = left_lap.pos_x; - left_lap.pos_x = XCAM_ALIGN_AROUND (left_lap.pos_x, XCAM_BLENDER_ALIGNED_WIDTH); - left_lap.width = XCAM_ALIGN_UP (left_lap.width, XCAM_BLENDER_ALIGNED_WIDTH); + left_lap.pos_x = XCAM_ALIGN_AROUND (left_lap.pos_x, XCAM_CL_BLENDER_ALIGNMENT_X); + left_lap.width = XCAM_ALIGN_UP (left_lap.width, XCAM_CL_BLENDER_ALIGNMENT_X); right_lap.pos_x += left_lap.pos_x - prev_pos; - right_lap.pos_x = XCAM_ALIGN_AROUND (right_lap.pos_x, XCAM_BLENDER_ALIGNED_WIDTH); + right_lap.pos_x = XCAM_ALIGN_AROUND (right_lap.pos_x, XCAM_CL_BLENDER_ALIGNMENT_X); right_lap.width = left_lap.width; Rect area; @@ -623,7 +623,7 @@ CLImage360Stitch::reset_buffer_info (SmartPtr<DrmBoBuffer> &input) reset_width += img_right.pos_x - img_left.pos_x; } - reset_width = XCAM_ALIGN_UP (reset_width, XCAM_BLENDER_ALIGNED_WIDTH); + reset_width = XCAM_ALIGN_UP (reset_width, XCAM_CL_BLENDER_ALIGNMENT_X); reset_info.init (buf_info.format, reset_width, buf_info.height, buf_info.aligned_width, buf_info.aligned_height); @@ -648,7 +648,7 @@ CLImage360Stitch::prepare_parameters (SmartPtr<DrmBoBuffer> &input, SmartPtr<Drm idx_next = (i == (_fisheye_num - 1)) ? 0 : (i + 1); ret = prepare_local_scale_blender_parameters ( - _fisheye[i].buf, _fisheye[idx_next].buf, output, i, idx_next); + _fisheye[i].buf, _fisheye[idx_next].buf, output, i, idx_next); STITCH_CHECK (ret, "prepare local scale blender parameters failed"); _fisheye[i].buf->attach_buffer (_fisheye[idx_next].buf); diff --git a/modules/ocl/cl_pyramid_blender.cpp b/modules/ocl/cl_pyramid_blender.cpp index fc90179..9eec72c 100644 --- a/modules/ocl/cl_pyramid_blender.cpp +++ b/modules/ocl/cl_pyramid_blender.cpp @@ -191,7 +191,7 @@ PyramidLayer::PyramidLayer () , blend_height (0) { for (int plane = 0; plane < CLBlenderPlaneMax; ++plane) { - for (int i = 0; i < XCAM_CL_BLENDER_IMAGE_NUM; ++i) { + for (int i = 0; i < XCAM_BLENDER_IMAGE_NUM; ++i) { gauss_offset_x[plane][i] = 0; lap_offset_x[plane][i] = 0; } @@ -228,7 +228,7 @@ SmartPtr<CLImage> CLPyramidBlender::get_gauss_image (uint32_t layer, uint32_t buf_index, bool is_uv) { XCAM_ASSERT (layer < _layers); - XCAM_ASSERT (buf_index < XCAM_CL_BLENDER_IMAGE_NUM); + XCAM_ASSERT (buf_index < XCAM_BLENDER_IMAGE_NUM); uint32_t plane = (is_uv ? 1 : 0); return _pyramid_layers[layer].gauss_image[plane][buf_index]; } @@ -237,7 +237,7 @@ SmartPtr<CLImage> CLPyramidBlender::get_lap_image (uint32_t layer, uint32_t buf_index, bool is_uv) { XCAM_ASSERT (layer < _layers); - XCAM_ASSERT (buf_index < XCAM_CL_BLENDER_IMAGE_NUM); + XCAM_ASSERT (buf_index < XCAM_BLENDER_IMAGE_NUM); uint32_t plane = (is_uv ? 1 : 0); return _pyramid_layers[layer].lap_image[plane][buf_index]; @@ -324,7 +324,7 @@ PyramidLayer::bind_buf_to_layer0 ( XCAM_ASSERT (in0_info.height == in1_info.height); XCAM_ASSERT (merge0_rect.width == merge1_rect.width); - this->blend_width = XCAM_ALIGN_UP (merge0_rect.width, XCAM_BLENDER_ALIGNED_WIDTH); + this->blend_width = XCAM_ALIGN_UP (merge0_rect.width, XCAM_CL_BLENDER_ALIGNMENT_X); this->blend_height = merge0_rect.height; CLImageDesc cl_desc; @@ -351,7 +351,7 @@ PyramidLayer::bind_buf_to_layer0 ( if (scale_mode == CLBlenderScaleLocal) { this->scale_image[i_plane] = new CLVaImage (context, output, cl_desc, out_info.offsets[i_plane]); - cl_desc.width = XCAM_ALIGN_UP (this->blend_width, XCAM_BLENDER_ALIGNED_WIDTH) / 8; + cl_desc.width = XCAM_ALIGN_UP (this->blend_width, XCAM_CL_BLENDER_ALIGNMENT_X) / 8; cl_desc.height = XCAM_ALIGN_UP (this->blend_height, divider_vert[i_plane]) / divider_vert[i_plane]; uint32_t row_pitch = CLImage::calculate_pixel_bytes (cl_desc.format) * cl_desc.width; uint32_t size = row_pitch * cl_desc.height; @@ -431,9 +431,9 @@ PyramidLayer::build_cl_images (SmartPtr<CLContext> context, bool last_layer, boo cl_desc_set.format.image_channel_order = CL_RGBA; for (uint32_t plane = 0; plane < max_plane; ++plane) { - for (int i_image = 0; i_image < XCAM_CL_BLENDER_IMAGE_NUM; ++i_image) { + for (int i_image = 0; i_image < XCAM_BLENDER_IMAGE_NUM; ++i_image) { cl_desc_set.row_pitch = 0; - cl_desc_set.width = XCAM_ALIGN_UP (this->blend_width, XCAM_BLENDER_ALIGNED_WIDTH) / 8; + cl_desc_set.width = XCAM_ALIGN_UP (this->blend_width, XCAM_CL_BLENDER_ALIGNMENT_X) / 8; cl_desc_set.height = XCAM_ALIGN_UP (this->blend_height, divider_vert[plane]) / divider_vert[plane]; //gauss y image created by cl buffer @@ -447,7 +447,7 @@ PyramidLayer::build_cl_images (SmartPtr<CLContext> context, bool last_layer, boo this->gauss_offset_x[plane][i_image] = 0; // offset to 0, need recalculate if for deep multi-band blender } - cl_desc_set.width = XCAM_ALIGN_UP (this->blend_width, XCAM_BLENDER_ALIGNED_WIDTH) / 8; + cl_desc_set.width = XCAM_ALIGN_UP (this->blend_width, XCAM_CL_BLENDER_ALIGNMENT_X) / 8; cl_desc_set.height = XCAM_ALIGN_UP (this->blend_height, divider_vert[plane]) / divider_vert[plane]; row_pitch = CLImage::calculate_pixel_bytes (cl_desc_set.format) * cl_desc_set.width; size = row_pitch * cl_desc_set.height; @@ -466,7 +466,7 @@ PyramidLayer::build_cl_images (SmartPtr<CLContext> context, bool last_layer, boo cl_desc_set.row_pitch = 0; this->blend_image[plane][BlendImageIndex] = new CLImage2D (context, cl_desc_set); XCAM_ASSERT (this->blend_image[plane][BlendImageIndex].ptr ()); - for (int i_image = 0; i_image < XCAM_CL_BLENDER_IMAGE_NUM; ++i_image) { + for (int i_image = 0; i_image < XCAM_BLENDER_IMAGE_NUM; ++i_image) { this->lap_image[plane][i_image] = new CLImage2D (context, cl_desc_set); XCAM_ASSERT (this->lap_image[plane][i_image].ptr ()); this->lap_offset_x[plane][i_image] = 0; // offset to 0, need calculate from next layer if for deep multi-band blender @@ -516,7 +516,7 @@ CLPyramidBlender::last_layer_buffer_redirect () for (uint32_t plane = 0; plane < max_plane; ++plane) { layer.blend_image[plane][BlendImageIndex] = layer.blend_image[plane][ReconstructImageIndex]; - for (uint32_t i_image = 0; i_image < XCAM_CL_BLENDER_IMAGE_NUM; ++i_image) { + for (uint32_t i_image = 0; i_image < XCAM_BLENDER_IMAGE_NUM; ++i_image) { layer.lap_image[plane][i_image] = layer.gauss_image[plane][i_image]; } } @@ -643,12 +643,12 @@ CLPyramidBlender::init_seam_buffers (SmartPtr<CLContext> context) _seam_width = layer0.blend_width; _seam_height = layer0.blend_height; _seam_pos_stride = XCAM_ALIGN_UP (_seam_width, 64); // need a buffer large enough to avoid judgement in kernel - _seam_pos_offset_x = XCAM_ALIGN_UP (_seam_width / 4, XCAM_BLENDER_ALIGNED_WIDTH); + _seam_pos_offset_x = XCAM_ALIGN_UP (_seam_width / 4, XCAM_CL_BLENDER_ALIGNMENT_X); if (_seam_pos_offset_x >= _seam_width) _seam_pos_offset_x = 0; - _seam_pos_valid_width = XCAM_ALIGN_DOWN (_seam_width / 2, XCAM_BLENDER_ALIGNED_WIDTH); + _seam_pos_valid_width = XCAM_ALIGN_DOWN (_seam_width / 2, XCAM_CL_BLENDER_ALIGNMENT_X); if (_seam_pos_valid_width <= 0) - _seam_pos_valid_width = XCAM_BLENDER_ALIGNED_WIDTH; + _seam_pos_valid_width = XCAM_CL_BLENDER_ALIGNMENT_X; XCAM_ASSERT (_seam_pos_offset_x + _seam_pos_valid_width <= _seam_width); XCAM_ASSERT (layer0.blend_width > 0 && layer0.blend_height > 0); @@ -681,7 +681,7 @@ CLPyramidBlender::init_seam_buffers (SmartPtr<CLContext> context) XCAM_RETURN_ERROR_CL, "CLPyramidBlender init seam buffer failed to create seam buffers"); - uint32_t mask_width = XCAM_ALIGN_UP(_seam_width, XCAM_BLENDER_ALIGNED_WIDTH); + uint32_t mask_width = XCAM_ALIGN_UP(_seam_width, XCAM_CL_BLENDER_ALIGNMENT_X); uint32_t mask_height = XCAM_ALIGN_UP(_seam_height, 2); for (uint32_t i = 0; i < _layers; ++i) { uint32_t mask_size = sizeof (SEAM_MASK_TYPE) * mask_width * mask_height; @@ -702,7 +702,7 @@ CLPyramidBlender::init_seam_buffers (SmartPtr<CLContext> context) XCAM_RETURN_ERROR_CL, "CLPyramidBlender init seam buffer failed to create seam_mask buffer"); - mask_width = XCAM_ALIGN_UP(mask_width / 2, XCAM_BLENDER_ALIGNED_WIDTH); + mask_width = XCAM_ALIGN_UP(mask_width / 2, XCAM_CL_BLENDER_ALIGNMENT_X); mask_height = XCAM_ALIGN_UP(mask_height / 2, 2); } @@ -871,7 +871,7 @@ CLPyramidTransformKernel::CLPyramidTransformKernel ( , _is_uv (is_uv) { XCAM_ASSERT (layer <= XCAM_CL_PYRAMID_MAX_LEVEL); - XCAM_ASSERT (buf_index <= XCAM_CL_BLENDER_IMAGE_NUM); + XCAM_ASSERT (buf_index <= XCAM_BLENDER_IMAGE_NUM); } static bool @@ -965,9 +965,9 @@ CLSeamDiffKernel::prepare_arguments (CLArgList &args, CLWorkSize &work_size) SmartPtr<CLImage> out_diff = _blender->get_image_diff (); CLImageDesc out_diff_desc = out_diff->get_image_desc (); - int image_offset_x[XCAM_CL_BLENDER_IMAGE_NUM]; + int image_offset_x[XCAM_BLENDER_IMAGE_NUM]; - for (uint32_t i = 0; i < XCAM_CL_BLENDER_IMAGE_NUM; ++i) { + for (uint32_t i = 0; i < XCAM_BLENDER_IMAGE_NUM; ++i) { image_offset_x[i] = layer0.gauss_offset_x[CLBlenderPlaneY][i] / 8; } @@ -1127,7 +1127,7 @@ CLPyramidLapKernel::CLPyramidLapKernel ( , _is_uv (is_uv) { XCAM_ASSERT (layer <= XCAM_CL_PYRAMID_MAX_LEVEL); - XCAM_ASSERT (buf_index <= XCAM_CL_BLENDER_IMAGE_NUM); + XCAM_ASSERT (buf_index <= XCAM_BLENDER_IMAGE_NUM); } int32_t @@ -1228,7 +1228,7 @@ CLPyramidReconstructKernel::get_output_reconstrcut_offset_x () if (_layer > 0) return 0; const Rect & window = _blender->get_merge_window (); - XCAM_ASSERT (window.pos_x % XCAM_BLENDER_ALIGNED_WIDTH == 0); + XCAM_ASSERT (window.pos_x % XCAM_CL_BLENDER_ALIGNMENT_X == 0); return window.pos_x; } @@ -1796,7 +1796,7 @@ create_pyramid_blender ( } for (int plane = 0; plane < max_plane; ++plane) { - for (buf_index = 0; buf_index < XCAM_CL_BLENDER_IMAGE_NUM; ++buf_index) { + for (buf_index = 0; buf_index < XCAM_BLENDER_IMAGE_NUM; ++buf_index) { for (i = 0; i < layer - 1; ++i) { kernel = create_pyramid_transform_kernel (context, blender, (uint32_t)i, buf_index, uv_status[plane]); XCAM_FAIL_RETURN (ERROR, kernel.ptr (), NULL, "create pyramid transform kernel failed"); @@ -1826,7 +1826,7 @@ create_pyramid_blender ( blender->add_kernel (kernel); } - for (buf_index = 0; buf_index < XCAM_CL_BLENDER_IMAGE_NUM; ++buf_index) { + for (buf_index = 0; buf_index < XCAM_BLENDER_IMAGE_NUM; ++buf_index) { kernel = create_pyramid_copy_kernel (context, blender, buf_index, uv_status[plane]); XCAM_FAIL_RETURN (ERROR, kernel.ptr (), NULL, "create pyramid copy kernel failed"); blender->add_kernel (kernel); diff --git a/modules/ocl/cl_pyramid_blender.h b/modules/ocl/cl_pyramid_blender.h index 2d1a340..a2ad391 100644 --- a/modules/ocl/cl_pyramid_blender.h +++ b/modules/ocl/cl_pyramid_blender.h @@ -47,10 +47,10 @@ enum { struct PyramidLayer { uint32_t blend_width; // blend, gauss, and lap uint32_t blend_height; - SmartPtr<CLImage> gauss_image[CLBlenderPlaneMax][XCAM_CL_BLENDER_IMAGE_NUM]; - int32_t gauss_offset_x[CLBlenderPlaneMax][XCAM_CL_BLENDER_IMAGE_NUM]; // aligned with XCAM_BLENDER_ALIGNED_WIDTH - SmartPtr<CLImage> lap_image[CLBlenderPlaneMax][XCAM_CL_BLENDER_IMAGE_NUM]; - int32_t lap_offset_x[CLBlenderPlaneMax][XCAM_CL_BLENDER_IMAGE_NUM]; // aligned with XCAM_BLENDER_ALIGNED_WIDTH + SmartPtr<CLImage> gauss_image[CLBlenderPlaneMax][XCAM_BLENDER_IMAGE_NUM]; + int32_t gauss_offset_x[CLBlenderPlaneMax][XCAM_BLENDER_IMAGE_NUM]; // aligned with XCAM_BLENDER_ALIGNED_WIDTH + SmartPtr<CLImage> lap_image[CLBlenderPlaneMax][XCAM_BLENDER_IMAGE_NUM]; + int32_t lap_offset_x[CLBlenderPlaneMax][XCAM_BLENDER_IMAGE_NUM]; // aligned with XCAM_BLENDER_ALIGNED_WIDTH SmartPtr<CLImage> blend_image[CLBlenderPlaneMax][BlendImageCount]; // 0 blend-image, 1 reconstruct image uint32_t mask_width[CLBlenderPlaneMax]; SmartPtr<CLBuffer> blend_mask[CLBlenderPlaneMax]; // sizeof(float) * mask_width diff --git a/modules/soft/soft_worker.cpp b/modules/soft/soft_worker.cpp index b5e5587..c3c1f1c 100644 --- a/modules/soft/soft_worker.cpp +++ b/modules/soft/soft_worker.cpp @@ -154,9 +154,9 @@ SoftWorker::work (const SmartPtr<Worker::Arguments> &args) } SmartPtr<ItemSynch> sync = new ItemSynch (_work_size.x * _work_size.y * _work_size.z); - for (int z = 0; z < _work_size.z; ++z) - for (int y = 0; y < _work_size.y; ++y) - for (int x = 0; x < _work_size.x; ++x) + for (uint32_t z = 0; z < _work_size.z; ++z) + for (uint32_t y = 0; y < _work_size.y; ++y) + for (uint32_t x = 0; x < _work_size.x; ++x) { SmartPtr<WorkItem> item = new WorkItem (this, args, WorkSize(x, y, z), sync); ret = _threads->queue (item); diff --git a/tests/Makefile.am b/tests/Makefile.am index c8f1b2e..dec5ea6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,3 +1,23 @@ +XCORE_DIR = $(top_srcdir)/xcore +MODULES_DIR = $(top_srcdir)/modules + +TEST_BASE_CXXFLAGS = $(XCAM_CXXFLAGS) +if HAVE_LIBDRM +TEST_BASE_CXXFLAGS += $(LIBDRM_CFLAGS) $(LIBDRM_LIBS) +endif + +if USE_LOCAL_ATOMISP +TEST_BASE_CXXFLAGS += -I$(top_srcdir)/ext/atomisp +endif + +TEST_BASE_CXXFLAGS += \ + -I$(XCORE_DIR) \ + -I$(MODULES_DIR) \ + $(NULL) + +TEST_BASE_LA = \ + $(NULL) + noinst_PROGRAMS = \ test-device-manager \ $(NULL) @@ -18,35 +38,26 @@ noinst_PROGRAMS += \ test-video-stabilization \ $(NULL) +TEST_BASE_LA += $(top_builddir)/modules/ocl/libxcam_ocl.la + if HAVE_OPENCV noinst_PROGRAMS += \ test-image-deblurring \ $(NULL) -endif -endif - -XCORE_DIR = $(top_srcdir)/xcore -MODULES_DIR = $(top_srcdir)/modules -XCORE_LA = $(top_builddir)/xcore/libxcam_core.la - -tests_cxxflags = $(XCAM_CXXFLAGS) -if HAVE_LIBDRM -tests_cxxflags += $(LIBDRM_CFLAGS) $(LIBDRM_LIBS) +TEST_BASE_CXXFLAGS += $(OPENCV_CFLAGS) +TEST_BASE_LA += $(OPENCV_LIBS) endif - -if USE_LOCAL_ATOMISP -tests_cxxflags += -I$(top_srcdir)/ext/atomisp endif -tests_cxxflags += \ - -I$(XCORE_DIR) \ - -I$(MODULES_DIR) \ +TEST_BASE_LA += \ + $(top_builddir)/modules/interface/libxcam_interface.la \ + $(top_builddir)/xcore/libxcam_core.la \ $(NULL) test_device_manager_SOURCES = test-device-manager.cpp -test_device_manager_CXXFLAGS = $(tests_cxxflags) -test_device_manager_LDADD = $(XCORE_LA) +test_device_manager_CXXFLAGS = $(TEST_BASE_CXXFLAGS) +test_device_manager_LDADD = $(TEST_BASE_LA) if ENABLE_IA_AIQ ISP_LA = $(top_builddir)/modules/isp/libxcam_isp.la @@ -54,66 +65,55 @@ ISP_LA = $(top_builddir)/modules/isp/libxcam_isp.la test_device_manager_LDADD += $(ISP_LA) test_poll_thread_SOURCES = test-poll-thread.cpp -test_poll_thread_CXXFLAGS = $(tests_cxxflags) +test_poll_thread_CXXFLAGS = $(TEST_BASE_CXXFLAGS) test_poll_thread_LDADD = \ - $(XCORE_LA) $(ISP_LA) \ + $(TEST_BASE_LA) $(ISP_LA) \ $(NULL) endif if HAVE_LIBCL -OCL_LA = $(top_builddir)/modules/ocl/libxcam_ocl.la - -test_device_manager_LDADD += $(OCL_LA) - test_cl_image_SOURCES = test-cl-image.cpp -test_cl_image_CXXFLAGS = $(tests_cxxflags) +test_cl_image_CXXFLAGS = $(TEST_BASE_CXXFLAGS) test_cl_image_LDADD = \ - $(XCORE_LA) $(OCL_LA) \ + $(TEST_BASE_LA) \ $(NULL) test_binary_kernel_SOURCES = test-binary-kernel.cpp -test_binary_kernel_CXXFLAGS = $(tests_cxxflags) +test_binary_kernel_CXXFLAGS = $(TEST_BASE_CXXFLAGS) test_binary_kernel_LDADD = \ - $(XCORE_LA) $(OCL_LA) \ + $(TEST_BASE_LA) \ $(NULL) test_pipe_manager_SOURCES = test-pipe-manager.cpp -test_pipe_manager_CXXFLAGS = $(tests_cxxflags) -test_pipe_manager_LDADD = \ - $(XCORE_LA) $(OCL_LA) \ +test_pipe_manager_CXXFLAGS = $(TEST_BASE_CXXFLAGS) +test_pipe_manager_LDADD = \ + $(TEST_BASE_LA) \ $(NULL) test_image_blend_SOURCES = test-image-blend.cpp -test_image_blend_CXXFLAGS = $(tests_cxxflags) -test_image_blend_LDADD = \ - $(XCORE_LA) $(OCL_LA) \ +test_image_blend_CXXFLAGS = $(TEST_BASE_CXXFLAGS) +test_image_blend_LDADD = \ + $(TEST_BASE_LA) \ $(NULL) test_image_stitching_SOURCES = test-image-stitching.cpp -test_image_stitching_CXXFLAGS = $(tests_cxxflags) +test_image_stitching_CXXFLAGS = $(TEST_BASE_CXXFLAGS) test_image_stitching_LDADD = \ - $(XCORE_LA) $(OCL_LA) \ + $(TEST_BASE_LA) \ $(NULL) test_video_stabilization_SOURCES = test-video-stabilization.cpp -test_video_stabilization_CXXFLAGS = $(tests_cxxflags) +test_video_stabilization_CXXFLAGS = $(TEST_BASE_CXXFLAGS) test_video_stabilization_LDADD = \ - $(XCORE_LA) $(OCL_LA) \ + $(TEST_BASE_LA) \ $(NULL) if HAVE_OPENCV test_image_deblurring_SOURCES = test-image-deblurring.cpp -test_image_deblurring_CXXFLAGS = $(tests_cxxflags) +test_image_deblurring_CXXFLAGS = $(TEST_BASE_CXXFLAGS) $(NULL) test_image_deblurring_LDADD = \ - $(XCORE_LA) $(OCL_LA) \ + $(TEST_BASE_LA) \ $(NULL) - -test_image_stitching_CXXFLAGS += $(OPENCV_CFLAGS) -test_image_stitching_LDADD += $(OPENCV_LIBS) -test_video_stabilization_CXXFLAGS += $(OPENCV_CFLAGS) -test_video_stabilization_LDADD += $(OPENCV_LIBS) -test_image_deblurring_CXXFLAGS += $(OPENCV_CFLAGS) -test_image_deblurring_LDADD += $(OPENCV_LIBS) endif endif |