Fix implicit declaration function 13/275813/1
authorKwanghoon Son <k.son@samsung.com>
Thu, 2 Jun 2022 06:07:25 +0000 (02:07 -0400)
committerKwanghoon Son <k.son@samsung.com>
Thu, 2 Jun 2022 06:09:57 +0000 (02:09 -0400)
Use before function declaration and this makes wrong function usage.

[Version] : 0.12.10-0
[Issue type] : Bug fix

Change-Id: I2f8cc1386acd6c2d6afb098729140fe070725424
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
packaging/capi-media-vision.spec
test/testsuites/machine_learning/inference/inference_test_suite.c

index 8dfb22f..ff1a687 100644 (file)
@@ -1,6 +1,6 @@
 Name:        capi-media-vision
 Summary:     Media Vision library for Tizen Native API
-Version:     0.12.9
+Version:     0.12.10
 Release:     0
 Group:       Multimedia/Framework
 License:     Apache-2.0 and BSD-3-Clause
index 681afab..d7326c0 100644 (file)
@@ -520,6 +520,33 @@ clean_mv_inference:
        return err;
 }
 
+int engine_config_hosted_tflite_cpu(mv_engine_config_h handle,
+                                                                       const char *tf_weight,
+                                                                       const char *meta_file)
+{
+       RET_IF_FAIL(mv_engine_config_set_string_attribute(
+                       handle, MV_INFERENCE_MODEL_WEIGHT_FILE_PATH, tf_weight));
+       RET_IF_FAIL(mv_engine_config_set_int_attribute(
+                       handle, MV_INFERENCE_BACKEND_TYPE, MV_INFERENCE_BACKEND_TFLITE));
+       RET_IF_FAIL(mv_engine_config_set_int_attribute(
+                       handle, MV_INFERENCE_TARGET_TYPE, MV_INFERENCE_TARGET_CPU));
+       if (meta_file != NULL)
+               RET_IF_FAIL(mv_engine_config_set_string_attribute(
+                       handle, MV_INFERENCE_MODEL_META_FILE_PATH, meta_file));
+       return MEDIA_VISION_ERROR_NONE;
+}
+
+int engine_config_user_hosted_tflite_cpu(mv_engine_config_h handle,
+                                                                                const char *tf_weight,
+                                                                                const char *user_file,
+                                                                                const char *meta_file)
+{
+       RET_IF_FAIL(engine_config_hosted_tflite_cpu(handle, tf_weight, meta_file));
+       RET_IF_FAIL(mv_engine_config_set_string_attribute(
+                       handle, MV_INFERENCE_MODEL_USER_FILE_PATH, user_file));
+       return MEDIA_VISION_ERROR_NONE;
+}
+
 int perform_configure_set_model_config_path(mv_engine_config_h engine_cfg)
 {
        int err = MEDIA_VISION_ERROR_NONE;
@@ -1332,7 +1359,7 @@ int perform_tflite_mobilenetv1ssd_face(mv_engine_config_h handle)
                                                                         "TFLite_Detection_PostProcess:2",
                                                                         "TFLite_Detection_PostProcess:3" };
 
-       RET_IF_FAIL(engine_config_hosted_tflite_cpu(handle, FD_TFLITE_WEIGHT_PATH));
+       RET_IF_FAIL(engine_config_hosted_tflite_cpu(handle, FD_TFLITE_WEIGHT_PATH, NULL));
        RET_IF_FAIL(mv_engine_config_set_int_attribute(
                        handle, MV_INFERENCE_INPUT_DATA_TYPE, MV_INFERENCE_DATA_FLOAT32));
        RET_IF_FAIL(mv_engine_config_set_double_attribute(
@@ -1592,33 +1619,6 @@ clean_facial_landmark_engine:
        return err;
 }
 
-int engine_config_hosted_tflite_cpu(mv_engine_config_h handle,
-                                                                       const char *tf_weight,
-                                                                       const char *meta_file)
-{
-       RET_IF_FAIL(mv_engine_config_set_string_attribute(
-                       handle, MV_INFERENCE_MODEL_WEIGHT_FILE_PATH, tf_weight));
-       RET_IF_FAIL(mv_engine_config_set_int_attribute(
-                       handle, MV_INFERENCE_BACKEND_TYPE, MV_INFERENCE_BACKEND_TFLITE));
-       RET_IF_FAIL(mv_engine_config_set_int_attribute(
-                       handle, MV_INFERENCE_TARGET_TYPE, MV_INFERENCE_TARGET_CPU));
-       if (meta_file != NULL)
-               RET_IF_FAIL(mv_engine_config_set_string_attribute(
-                       handle, MV_INFERENCE_MODEL_META_FILE_PATH, meta_file));
-       return MEDIA_VISION_ERROR_NONE;
-}
-
-int engine_config_user_hosted_tflite_cpu(mv_engine_config_h handle,
-                                                                                const char *tf_weight,
-                                                                                const char *user_file,
-                                                                                const char *meta_file)
-{
-       RET_IF_FAIL(engine_config_hosted_tflite_cpu(handle, tf_weight, meta_file));
-       RET_IF_FAIL(mv_engine_config_set_string_attribute(
-                       handle, MV_INFERENCE_MODEL_USER_FILE_PATH, user_file));
-       return MEDIA_VISION_ERROR_NONE;
-}
-
 int perform_armnn_cpm_config(mv_engine_config_h handle)
 {
        const char *inputNodeName = "image";