mv_common: fix utc negative test issue accepted/tizen/unified/20220726.012234 submit/tizen/20220721.064000 submit/tizen/20220725.050651
authorInki Dae <inki.dae@samsung.com>
Thu, 21 Jul 2022 05:26:40 +0000 (14:26 +0900)
committerInki Dae <inki.dae@samsung.com>
Thu, 21 Jul 2022 06:39:49 +0000 (15:39 +0900)
[Issue type] bug fix

Fixed negative test issue of legacy face tracking test by
returning an error correctly. In case of invalid color space type,
INVALID_PARAMETER error should be returned according to
utc_mediavision_mv_face_track_n test case.

Change-Id: Ia74578eb33ea1bbc88681cd3abf6fa9d44e22169
Signed-off-by: Inki Dae <inki.dae@samsung.com>
mv_common/src/CommonUtils.cpp

index 4b21714..a90b73e 100644 (file)
@@ -45,6 +45,9 @@ int convertSourceMV2GrayCV(mv_source_h mvSource, cv::Mat& cvSource)
 
        int conversionType;
        switch(colorspace) {
+       case MEDIA_VISION_COLORSPACE_INVALID:
+               LOGE("Error: mv_source has invalid colorspace.");
+               return MEDIA_VISION_ERROR_INVALID_PARAMETER;
        case MEDIA_VISION_COLORSPACE_Y800:
                channelsNumber = 1;
                conversionType = -1; /* Type of conversion from given colorspace to gray */