aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYinhang Liu <yinhangx.liu@intel.com>2018-12-21 11:06:08 +0800
committerZong Wei <wei.zong@intel.com>2019-01-08 16:23:23 +0800
commit0c61e2d32f2b1608513c41a2d701ddd190e16c9e (patch)
tree3691ff98a3b7e98a33a7c9f393ab661c3e2d36dd
parent44bfe1b023c92eda8054d127facbcb16e066c348 (diff)
downloadlibxcam-0c61e2d32f2b1608513c41a2d701ddd190e16c9e.tar.gz
build: fix unused warnings
-rw-r--r--modules/ocl/cl_image_360_stitch.cpp3
-rw-r--r--tests/test-image-stitching.cpp6
-rw-r--r--tests/test-video-stabilization.cpp3
3 files changed, 7 insertions, 5 deletions
diff --git a/modules/ocl/cl_image_360_stitch.cpp b/modules/ocl/cl_image_360_stitch.cpp
index 2a1dc75..1eb3bf1 100644
--- a/modules/ocl/cl_image_360_stitch.cpp
+++ b/modules/ocl/cl_image_360_stitch.cpp
@@ -859,6 +859,7 @@ CLImage360Stitch::execute_done (SmartPtr<VideoBuffer> &output)
return CLMultiImageHandler::execute_done (output);
}
+#if HAVE_OPENCV
static void
convert_to_stitch_rect (Rect xcam_rect, Rect &stitch_rect, SurroundMode surround_mode)
{
@@ -879,7 +880,7 @@ convert_to_xcam_rect (Rect stitch_rect, Rect &xcam_rect)
xcam_rect.pos_x = stitch_rect.pos_x;
xcam_rect.width = stitch_rect.width;
}
-
+#endif
XCamReturn
CLImage360Stitch::sub_handler_execute_done (SmartPtr<CLImageHandler> &handler)
diff --git a/tests/test-image-stitching.cpp b/tests/test-image-stitching.cpp
index ab723aa..acd2a78 100644
--- a/tests/test-image-stitching.cpp
+++ b/tests/test-image-stitching.cpp
@@ -506,13 +506,15 @@ int main (int argc, char *argv[])
#endif
SmartPtr<VideoBuffer> pre_buf, cur_buf;
-#if (HAVE_OPENCV) && (XCAM_TEST_STITCH_DEBUG)
+ int frame_id = 0;
+#if (HAVE_OPENCV)
+#if XCAM_TEST_STITCH_DEBUG
SmartPtr<VideoBuffer> input_bufs[XCAM_STITCH_FISHEYE_MAX_NUM];
#endif
- int frame_id = 0;
std::vector<PointFloat2> top_view_map_table;
std::vector<PointFloat2> rectified_view_map_table;
float rectified_start_angle = -45.0f, rectified_end_angle = 45.0f;
+#endif
while (loop--) {
for (int i = 0; i < input_count; i++) {
diff --git a/tests/test-video-stabilization.cpp b/tests/test-video-stabilization.cpp
index 0203172..5499ce4 100644
--- a/tests/test-video-stabilization.cpp
+++ b/tests/test-video-stabilization.cpp
@@ -81,7 +81,6 @@ int main (int argc, char *argv[])
const char *gyro_data = "gyro_data.csv";
bool need_save_output = true;
- double framerate = 30.0;
int loop = 1;
const struct option long_opts[] = {
@@ -213,7 +212,7 @@ int main (int argc, char *argv[])
cv::VideoWriter writer;
if (need_save_output) {
cv::Size dst_size = cv::Size (output_width, output_height);
- if (!writer.open (file_out_name, cv::VideoWriter::fourcc ('X', '2', '6', '4'), framerate, dst_size)) {
+ if (!writer.open (file_out_name, cv::VideoWriter::fourcc ('X', '2', '6', '4'), 30, dst_size)) {
XCAM_LOG_ERROR ("open file %s failed", file_out_name);
return -1;
}