mv_3d: fix svace issue (SIGNED_TO_BIGGER_UNSIGNED) 98/282098/2
authorSeungbae Shin <seungbae.shin@samsung.com>
Tue, 27 Sep 2022 04:57:53 +0000 (13:57 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Tue, 27 Sep 2022 05:57:06 +0000 (14:57 +0900)
[Version] : 0.23.29-0
[Issue type] : bug fix

fix svace wgid 499263

Change-Id: Iea3cf1342f2b1b090d3fef626e26898e65a0c631

mv_3d/3d/include/Mv3d.h
mv_3d/3d/src/Mv3d.cpp
mv_3d/3d/src/mv_3d_open.cpp
packaging/capi-media-vision.spec

index 3614cea..eea895b 100644 (file)
@@ -93,7 +93,7 @@ namespace mv3d
                                                size_t windowHeight,
                                                size_t speckleSize);
 
-               int Configure(int mode, int width, int height, int minDisp, int maxDisp,
+               int Configure(int mode, unsigned int width, unsigned int height, int minDisp, int maxDisp,
                                        double samplingRatio, int outlierRemovalPoints, double outlierRemovalRadius,
                                        std::string stereoConfigPath, std::string pointcloudOutputPath);
 
index b63ad9a..9982635 100644 (file)
@@ -97,7 +97,7 @@ namespace mv3d
                mDfsParameter.maxSpeckleSize = speckleSize;
        }
 
-       int Mv3d::Configure(int mode, int width, int height,
+       int Mv3d::Configure(int mode, unsigned int width, unsigned int height,
                                                int minDisp, int maxDisp, double samplingRatio,
                                                int outlierRemovalPoints, double outlierRemovalRadius,
                                                std::string stereoConfigPath,
index 0319351..4c09f60 100644 (file)
@@ -176,9 +176,15 @@ int mv3dConfigure(mv_3d_h mv3d, mv_engine_config_h engine_config)
        }
 
        pMv3d = static_cast<Mv3d *>(mv3d);
-       ret = pMv3d->Configure(mode, depthWidth, depthHeight, minDisp, maxDisp,
-                                                       samplingRatio, outlierRemovalPoints, outlierRemovalRadius,
-                                                       stereoConfigFilePath, pointcloudOutputFilePath);
+       ret = pMv3d->Configure(mode,
+                                                       static_cast<unsigned int>(depthWidth),
+                                                       static_cast<unsigned int>(depthHeight),
+                                                       minDisp, maxDisp,
+                                                       samplingRatio,
+                                                       outlierRemovalPoints,
+                                                       outlierRemovalRadius,
+                                                       stereoConfigFilePath,
+                                                       pointcloudOutputFilePath);
 
        if (ret != MEDIA_VISION_ERROR_NONE) {
                LOGE("Failed to configure Depth");
index bcc2f5d..4b02bd8 100644 (file)
@@ -1,6 +1,6 @@
 Name:        capi-media-vision
 Summary:     Media Vision library for Tizen Native API
-Version:     0.23.28
+Version:     0.23.29
 Release:     0
 Group:       Multimedia/Framework
 License:     Apache-2.0 and BSD-3-Clause