From: Kwanghoon Son Date: Thu, 2 Jun 2022 06:07:25 +0000 (-0400) Subject: Fix implicit declaration function X-Git-Tag: submit/tizen/20220704.055720~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a3957a7188baa049fb19b67395b7c68c29502c00;p=platform%2Fcore%2Fapi%2Fmediavision.git Fix implicit declaration function 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 --- diff --git a/packaging/capi-media-vision.spec b/packaging/capi-media-vision.spec index 8dfb22f..ff1a687 100644 --- a/packaging/capi-media-vision.spec +++ b/packaging/capi-media-vision.spec @@ -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 diff --git a/test/testsuites/machine_learning/inference/inference_test_suite.c b/test/testsuites/machine_learning/inference/inference_test_suite.c index 681afab..d7326c0 100644 --- a/test/testsuites/machine_learning/inference/inference_test_suite.c +++ b/test/testsuites/machine_learning/inference/inference_test_suite.c @@ -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";