platform/upstream/nnstreamer.git
4 years ago[Tests/Regression] GTEST error is ignored
MyungJoo Ham [Thu, 7 May 2020 10:24:43 +0000 (19:24 +0900)]
[Tests/Regression] GTEST error is ignored

PR #2338 has incurred a regression in the test suite that
make gbs pass even if there is a failed unit test case in gtest.

This fixes the regression of #2338

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Unittest/IIO] fix mem leak of unittest_src_iio
HyoungJoo Ahn [Thu, 7 May 2020 04:37:50 +0000 (13:37 +0900)]
[Unittest/IIO] fix mem leak of unittest_src_iio

fix mem leaks of few test cases

Signed-off-by: HyoungJoo Ahn <hello.ahn@samsung.com>
4 years ago[Mediapipe] upload the new subplugin
Hyoung Joo Ahn [Wed, 6 May 2020 11:49:42 +0000 (20:49 +0900)]
[Mediapipe] upload the new subplugin

this subplugin helps running mediapipe graph through nnstreamer

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
4 years ago[Mediapipe] fix shell script
Hyoung Joo Ahn [Wed, 6 May 2020 11:45:04 +0000 (20:45 +0900)]
[Mediapipe] fix shell script

make the nnstreamer lib path rather than error

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
4 years ago[C-Api] unknown tensor type
Jaeyun [Thu, 7 May 2020 09:41:37 +0000 (18:41 +0900)]
[C-Api] unknown tensor type

do not allow setting unknown tensor type.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Dist/Tizen] Remove an invalid command line
Wook Song [Thu, 7 May 2020 08:18:42 +0000 (17:18 +0900)]
[Dist/Tizen] Remove an invalid command line

This patch removes an invalid command line that creates a symlink, *.so.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Dist/Tizen] Provide GST_PLUGIN_PATH to unittest_tizen_sensor
Wook Song [Thu, 7 May 2020 07:57:14 +0000 (16:57 +0900)]
[Dist/Tizen] Provide GST_PLUGIN_PATH to unittest_tizen_sensor

'unittest_tizen_sensor' requires a nnstreamer extension plugin,
'tensor_src_tizensensor', in addition to the other nnstreamer plugins.
In order to resolve this dependency at build time, this patch modifies
the rpm spec for Tizen to provide extra GST_PLUGIN_PATH to
'unittest_tizen_sensor'.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Tests/Script] Do not override GST_PLUGIN_PATH in the test script
Wook Song [Thu, 7 May 2020 07:47:42 +0000 (16:47 +0900)]
[Tests/Script] Do not override GST_PLUGIN_PATH in the test script

This patch removes the code line overrides GST_PLUGIN_PATH from the test
script.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Test] add testcases for internal function
Jaeyun [Wed, 6 May 2020 11:41:48 +0000 (20:41 +0900)]
[Test] add testcases for internal function

add testcases for internal function (validate model files)

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Unittest/IIO] add the negative case: base dir
HyoungJoo Ahn [Thu, 7 May 2020 03:42:07 +0000 (12:42 +0900)]
[Unittest/IIO] add the negative case: base dir

testcase for the logic with invalid base dir

Signed-off-by: HyoungJoo Ahn <hello.ahn@samsung.com>
4 years ago[Unittest/IIO] add the negative case: frequency
HyoungJoo Ahn [Wed, 29 Apr 2020 05:39:27 +0000 (14:39 +0900)]
[Unittest/IIO] add the negative case: frequency

testcase for the logic with invalid frequency

Signed-off-by: HyoungJoo Ahn <hello.ahn@samsung.com>
4 years ago[Conf] Add omitted comment and fix a typo
Sangjung Woo [Thu, 7 May 2020 01:48:14 +0000 (10:48 +0900)]
[Conf] Add omitted comment and fix a typo

* Add omitted parameter comment for nnsconf_get_subplugin_info()
* Fix a typo

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[TEST] Fix svace defect : nnfw_runtime, tensordec-imagelabel
gichan-jang [Wed, 6 May 2020 09:54:06 +0000 (18:54 +0900)]
[TEST] Fix svace defect : nnfw_runtime, tensordec-imagelabel

Fix memory leak of nnfw runtime and tensor decoder image labeling unit test.
Related SVACE defects : 440263, 440264, 440265, 440266, 440261

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[README] Add daily build and test badge
gichan-jang [Wed, 29 Apr 2020 02:24:08 +0000 (11:24 +0900)]
[README] Add daily build and test badge

Add daily build and test badge (Tizen x64, Tizen X86, Ubuntu x64)

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Tests/Python] Update test scripts for python extensions
Wook Song [Fri, 24 Apr 2020 08:35:51 +0000 (17:35 +0900)]
[Tests/Python] Update test scripts for python extensions

This patch modifies the scripts running the test cases for python
filters to use proper PYTHONPATH.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Transform] return value when failed to set option
Jaeyun [Wed, 29 Apr 2020 08:57:40 +0000 (17:57 +0900)]
[Transform] return value when failed to set option

1. return false if failed to set option.
2. add simple testcases for the option string.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[C-Api] new ref to get tensor name
Jaeyun Jung [Thu, 30 Apr 2020 05:59:11 +0000 (14:59 +0900)]
[C-Api] new ref to get tensor name

if tensors-info has name, return new ref when getting the tensor name.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
4 years ago[Unittest/IIO] add a testcase for unusual cases
HyoungJoo Ahn [Tue, 28 Apr 2020 11:52:21 +0000 (20:52 +0900)]
[Unittest/IIO] add a testcase for unusual cases

the added testcase cover various cases not covered previous set.

Signed-off-by: HyoungJoo Ahn <hello.ahn@samsung.com>
4 years ago[Filter/Test] test for filter-fw registration
Jaeyun [Wed, 29 Apr 2020 10:59:29 +0000 (19:59 +0900)]
[Filter/Test] test for filter-fw registration

add test for filter-fw v1 registration without model file.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Test/tensordec-pose] Fix a test case with arithmetic transform
Yongjoo Ahn [Mon, 4 May 2020 04:25:40 +0000 (13:25 +0900)]
[Test/tensordec-pose] Fix a test case with arithmetic transform

- tensordec-pose treats incoming array as float, thus add `tensor_transform mode=arithmetic`
- expecting proper line converage results

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[Test] add tc for element properties
Jaeyun [Tue, 28 Apr 2020 10:12:40 +0000 (19:12 +0900)]
[Test] add tc for element properties

update simple testcases for the element properties.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Test/tensordec-pose] Add test case with more buffers
Yongjoo Ahn [Tue, 28 Apr 2020 12:02:26 +0000 (21:02 +0900)]
[Test/tensordec-pose] Add test case with more buffers

The test with `videotestsrc num_buffers=4` sometimes does not enough to execute some functions. This commit adds a test with more buffers.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[Test/CAPI-Util] Add negative cases.
MyungJoo Ham [Tue, 28 Apr 2020 10:53:42 +0000 (19:53 +0900)]
[Test/CAPI-Util] Add negative cases.

Add more negative test cases to increate test coverage rate.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[CodeClean] line comment
Jaeyun [Tue, 28 Apr 2020 04:44:13 +0000 (13:44 +0900)]
[CodeClean] line comment

code-style : remove single line comments.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[TEST] Add test case for tizen sensor
gichan-jang [Tue, 28 Apr 2020 11:31:37 +0000 (20:31 +0900)]
[TEST] Add test case for tizen sensor

Add test case for tizen sensor

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Unittest] apply EXPECT_STREQ for string comparisons
HyoungJoo Ahn [Wed, 29 Apr 2020 03:44:02 +0000 (12:44 +0900)]
[Unittest] apply EXPECT_STREQ for string comparisons

using EXPECT_STREQ rather than `EXPECT_TRUE( g_str_equal...`

Signed-off-by: HyoungJoo Ahn <hello.ahn@samsung.com>
4 years ago[Test] add sync option in appsink accepted/tizen/unified/20200428.125941 submit/tizen/20200428.040141
Jaeyun [Mon, 27 Apr 2020 11:46:51 +0000 (20:46 +0900)]
[Test] add sync option in appsink

1. add sync=false option in model reload test.
2. update pipeline description in docs.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[C-Api/Pipeline] warning message for sync option
Jaeyun [Mon, 27 Apr 2020 11:18:53 +0000 (20:18 +0900)]
[C-Api/Pipeline] warning message for sync option

add warning message if sink element does not have sync=false option.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[CodeClean] fix invalid index
Jaeyun [Mon, 27 Apr 2020 08:49:01 +0000 (17:49 +0900)]
[CodeClean] fix invalid index

1. fix invalid index when unmapping the mem block
2. unref buffer when failed to get mem

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Android] prepare SNPE
Jaeyun [Fri, 24 Apr 2020 10:23:12 +0000 (19:23 +0900)]
[Android] prepare SNPE

Prepare sub-plugin SNPE in android.
- add enum (nnfw type) and build option
- update document for the changes

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Filter/EdgeTPU] Workaround for #2320
MyungJoo Ham [Mon, 27 Apr 2020 09:29:02 +0000 (18:29 +0900)]
[Filter/EdgeTPU] Workaround for #2320

Until #2320 is resolved, adding AUTO/DEFAULT to "supported hw"
list makes it easier to use.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Filter/C++Class] Bugfix: close gets a dlb ptr!
MyungJoo Ham [Wed, 22 Apr 2020 05:26:58 +0000 (14:26 +0900)]
[Filter/C++Class] Bugfix: close gets a dlb ptr!

Pointer type mismatch fixed!

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Spec/Deb] Update C++ devel env.
MyungJoo Ham [Fri, 17 Apr 2020 05:22:26 +0000 (14:22 +0900)]
[Spec/Deb] Update C++ devel env.

1. Do not separate C env and C++ env. Merge them.
Both Ubuntu and Tizen supports C++ by default.

2. Move /nnstreamer/cpp/nnstreamer_cppplugin_api_filter.hh to
/nnstreamer/nnstreamer_cppplugin_api_filter.hh

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Option] Enable tensor-filter C++ class by default
MyungJoo Ham [Tue, 31 Mar 2020 10:24:52 +0000 (19:24 +0900)]
[Option] Enable tensor-filter C++ class by default

Turn the C++ class support on by default.
And update spec file to add .hh file.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Filter/Edgetpu] Rewrite as a C++ class
MyungJoo Ham [Tue, 31 Mar 2020 10:15:43 +0000 (19:15 +0900)]
[Filter/Edgetpu] Rewrite as a C++ class

This potentially reduces the code size and
maintanance costs.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Merge] fix return type
Jaeyun [Mon, 27 Apr 2020 05:44:53 +0000 (14:44 +0900)]
[Merge] fix return type

1. fix invalid return value.
2. mem-unmap when failed to get mem ptr in input buffer.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Test] Fix potential test fail
gichan-jang [Mon, 27 Apr 2020 10:15:17 +0000 (19:15 +0900)]
[Test] Fix potential test fail
Sync option is added on appsink pad to prevent potential test fail caused by buffer drop.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Sink] default sync false
Jaeyun [Mon, 27 Apr 2020 10:10:15 +0000 (19:10 +0900)]
[Sink] default sync false

Set default sync option 'false'.
It may be delayed with tensor_filter element, to invoke neural network model.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Android/Test] add SNAP tests using tensorflow model
Yongjoo Ahn [Wed, 22 Apr 2020 10:07:02 +0000 (19:07 +0900)]
[Android/Test] add SNAP tests using tensorflow model

- For both single-shot and pipeline, add simple tests to validate SNAP with tensorflow model
- Test with CPU, DSP, NPU runtime on recent Snapdragon (S20) and preloaded model files

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years agoError return instead of assert for external errors.
MyungJoo Ham [Mon, 20 Apr 2020 07:16:22 +0000 (16:16 +0900)]
Error return instead of assert for external errors.

If an error might occur by external reasons,
(invalid input/app behaviors and inappropriate environments)
it should not simply assert away, but should provide
appropriate error messages and handling.

Refactored everything except for tensor_filter_python.cc,
which will be refactored with exception throwing.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Test/NNFW] separate testcase
Jaeyun [Thu, 23 Apr 2020 09:39:34 +0000 (18:39 +0900)]
[Test/NNFW] separate testcase

1. separate testcase - invalid model and invalid data.
2. fix mem leak, destroy handle before creating new data.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Test] Fix tizen capi unittest
gichan-jang [Fri, 24 Apr 2020 01:02:34 +0000 (10:02 +0900)]
[Test] Fix tizen capi unittest
Today's Daily Build was a success, but the test fails occasionally due to slow speed of arm.
Timeout occurred in the test and increased it to 10 seconds.
If timeout occurs again, I will investigate another cause.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Unittest] remove the not effective sleeps
HyoungJoo Ahn [Thu, 23 Apr 2020 08:37:15 +0000 (17:37 +0900)]
[Unittest] remove the not effective sleeps

remove or unify `g_usleep() of testcases`

Signed-off-by: HyoungJoo Ahn <hello.ahn@samsung.com>
4 years ago[Filter/Python] Don't assert. Provide exceptions.
MyungJoo Ham [Wed, 22 Apr 2020 11:08:42 +0000 (20:08 +0900)]
[Filter/Python] Don't assert. Provide exceptions.

A subplugin shouldn't be arrogant enough to assert.
Return errors or throw exceptions instead.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Mediapipe] fix meson script
Hyoung Joo Ahn [Thu, 23 Apr 2020 10:39:27 +0000 (19:39 +0900)]
[Mediapipe] fix meson script

set `opencv_path` when system architecture is detected.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
4 years ago[Dist/Tizen] Use the base option, b_coverage, to track coverage
Wook Song [Tue, 21 Apr 2020 08:34:46 +0000 (17:34 +0900)]
[Dist/Tizen] Use the base option, b_coverage, to track coverage

Instead of manually setting cflags for coverage tracking, let's use
b_coverage which is a meson's base option to do it.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[TEST] Fix tizen sensor unit test accepted/tizen/unified/20200424.141621 submit/tizen/20200423.092227
gichan-jang [Thu, 23 Apr 2020 07:15:50 +0000 (16:15 +0900)]
[TEST] Fix tizen sensor unit test

Fix tizen sensor unit test.
 - Add macro to wait until start the pipeline.
 - Wait until expected buffers are processed

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Test/NNFW] ignore timeout in singleshot
Jaeyun [Thu, 23 Apr 2020 06:44:38 +0000 (15:44 +0900)]
[Test/NNFW] ignore timeout in singleshot

increase timeout (30 sec) before invoking the model.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[TEST/util] Clean up wait_pipeline_process_buffers
MyungJoo Ham [Thu, 23 Apr 2020 06:11:40 +0000 (15:11 +0900)]
[TEST/util] Clean up wait_pipeline_process_buffers

1. apply "const" for data_received. It won't update it
2. make it robust against TEST_DEFAULT_SLEEP_TIME values

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[TEST/util] Add unit test util function
gichan-jang [Thu, 23 Apr 2020 05:23:47 +0000 (14:23 +0900)]
[TEST/util] Add unit test util function

Add unit test util function.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Test] Fix nnstreamer repo test
gichan-jang [Tue, 21 Apr 2020 11:08:28 +0000 (20:08 +0900)]
[Test] Fix nnstreamer repo test
Fix nnstremr repo test fail.
It's not best way to fix the problem, But I can not find any other suitable method in SSAT.
If there is a good alternative, please recommend it.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Coverage/Fix] Disable optimization and remove redundant gcov run
Dongju Chae [Tue, 21 Apr 2020 03:04:24 +0000 (12:04 +0900)]
[Coverage/Fix] Disable optimization and remove redundant gcov run

This patch disables code optimization for coverage analysis and remove
redundant gcov run.

In fact, we don't need to run the python script, unittestcoverage.py
which recursively executes gcov. Because lcov internally execute gcov,
the results of the script are never used.

FYI...
- when program is compiled with coverage option, .gcno files are created.
- When such programs are executed, .gcda files are created.
- As lcov input files are .gcda. we don't need to run gcov before lcov.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Android/Build] flag to handle exception
Jaeyun [Tue, 21 Apr 2020 08:41:02 +0000 (17:41 +0900)]
[Android/Build] flag to handle exception

add cxx-flag in android build, enable exception handling.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Src-IIO] CHANNEL property handling fix
MyungJoo Ham [Tue, 21 Apr 2020 02:28:33 +0000 (11:28 +0900)]
[Src-IIO] CHANNEL property handling fix

1. If g_hash_table_insert returns FALSE,
it simply means that the entry is duplicated.
Just skip it, then.

2. If we cannot parse it, don't change status, but
ignore the whole property values.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[C-Api] fix duplicated free accepted/tizen/unified/20200422.032212 submit/tizen/20200421.092647
Jaeyun [Tue, 21 Apr 2020 07:24:49 +0000 (16:24 +0900)]
[C-Api] fix duplicated free

do not call free() when destroying gst-buffer.

TODO : prevent memcpy() when pushing input data into src element.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[TEST] Fix test case name
gichan-jang [Tue, 21 Apr 2020 06:10:49 +0000 (15:10 +0900)]
[TEST] Fix test case name

Fix tese case name of nnstreamer repo unit test.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Tests] Add static to internal-global vairables.
MyungJoo Ham [Tue, 21 Apr 2020 01:59:40 +0000 (10:59 +0900)]
[Tests] Add static to internal-global vairables.

Don't export internal variables.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Filter/C++] Framework rework for better usages
MyungJoo Ham [Sat, 21 Mar 2020 07:53:03 +0000 (16:53 +0900)]
[Filter/C++] Framework rework for better usages

By applying C++ tensor-filter framework to edge-tpu,
I've found that the current draft is not useful enough.

Here comes C++ t-f framework updates tested with the
edgetpu subplugin.

Changes in V2:
- Removed macros. Use static-inline functions instead.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Filter/v1] Bugfix of TF-V1 subplugin API / C++ support
MyungJoo Ham [Thu, 16 Apr 2020 08:21:31 +0000 (17:21 +0900)]
[Filter/v1] Bugfix of TF-V1 subplugin API / C++ support

By testing with C++ class tf-subplugin, "edget-tpu",
bugs were found from the recently introduced TF-V1 subplugin API.

- V1 APIs uses void * private_data instead of void ** private_data.
  There are codes that do not reflect this.

In order to make C++ class subplugins work smoothly,
they need to know "this" pointer when they were invoked
by common C++ wrapper infrastructure, which is a set of
static functions of the base class.

Thus, add a new argument for them to find out "this" pointer.

CC: @kparichay
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Tests] Fix sink unittest fail
gichan-jang [Mon, 20 Apr 2020 06:59:20 +0000 (15:59 +0900)]
[Tests] Fix sink unittest fail
Test fails occasionally due to slow speed of arm.
The test was modified to wait until the pipeline processing the buffers

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Log] Add fatal-log submit/tizen/20200421.014525
MyungJoo Ham [Mon, 20 Apr 2020 07:32:38 +0000 (16:32 +0900)]
[Log] Add fatal-log

Separate "fatal" level from "error".

When we convert "assert" fail to general error handling,
log-fatal might be appropriate.

Fixes #2288

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Dec/Subplugins] Remove duplicated code
MyungJoo Ham [Tue, 14 Apr 2020 07:48:16 +0000 (16:48 +0900)]
[Dec/Subplugins] Remove duplicated code

Add "utility" internal API to remove
duplicated code.

Chages in V2:
- Refactored imglabel_t data structure
- Suggested by @zhoonit

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[LF/AI] Update CONTRIBUTING submit/tizen/20200420.103732
MyungJoo Ham [Wed, 1 Apr 2020 10:56:48 +0000 (19:56 +0900)]
[LF/AI] Update CONTRIBUTING

To follow what LF/AI requires with the Charter.

It has been drafted at https://wiki.lfai.foundation/display/NNSTREAM/NNStreamer+CONTRIBUTING+draft+of+2020.04

updated 2020-04-16
- Clarified "most senior among available committers", Line 45
  (suggeted by @zhoonit)
- s/chairman/chairperson

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years agoComply with LF/AI Community Charter
MyungJoo Ham [Fri, 27 Mar 2020 05:57:47 +0000 (14:57 +0900)]
Comply with LF/AI Community Charter

As attorneys of stakeholders are drafting the community charter,
based on the current draft, I am updating related documents.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[README] Add daily build result badge in table
gichan-jang [Fri, 17 Apr 2020 05:11:04 +0000 (14:11 +0900)]
[README] Add daily build result badge in table
Add daily build result in ofiicial release table

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[CodeClean] return type
Jaeyun [Mon, 20 Apr 2020 04:43:26 +0000 (13:43 +0900)]
[CodeClean] return type

1. fix ret type of filter callback.
2. minor update (warning w/Wmissing-declarations)

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Bug] Do not call essential ops in assert().
MyungJoo Ham [Sat, 18 Apr 2020 02:39:22 +0000 (11:39 +0900)]
[Bug] Do not call essential ops in assert().

Some systems may use NDEBUG and skip all assert calls.
Do not call essential ops in there.

Fixes #2282

Reported-by: @ndufresne
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Tensor-If] Make it buildable
MyungJoo Ham [Mon, 13 Apr 2020 11:16:20 +0000 (20:16 +0900)]
[Tensor-If] Make it buildable

Add empty functions and build infra for Tensor-If.

Tensor-If is a subclass of GstBaseTransform.

The src-pad and sink-pad are supposed to have the same
capabilities.

It appears that in-place op has no benefit, but
not sure if we need to prohibit it.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Mediapipe] update meson script
Hyoung Joo Ahn [Fri, 17 Apr 2020 05:06:49 +0000 (14:06 +0900)]
[Mediapipe] update meson script

add opencv dependency and check architecture of system

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
4 years ago[Android] initialize native code
Jaeyun [Fri, 17 Apr 2020 08:47:18 +0000 (17:47 +0900)]
[Android] initialize native code

For C-API developers, add gst-init in native code.
Calling initialize() in java is unnecessary.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Converter] Refactored: no more large #if/endif code blocks.
MyungJoo Ham [Tue, 14 Apr 2020 07:28:27 +0000 (16:28 +0900)]
[Converter] Refactored: no more large #if/endif code blocks.

Do not enclose a large code block with #if/#endif.
Separate such files instead.

Changed in v2 (2020-04-16)
- Separated no-a/v and a/v headers

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Android] tf-lite version
Jaeyun [Fri, 17 Apr 2020 04:10:10 +0000 (13:10 +0900)]
[Android] tf-lite version

change tf-lite version to 1.13 in android api build.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Tests] Fix tizen capi unit test
gichan-jang [Fri, 17 Apr 2020 04:13:06 +0000 (13:13 +0900)]
[Tests] Fix tizen capi unit test
Test fails occasionally due to slow speed of arm.
The test was modified to only check if the switch is working.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Daily build] Add daily build badge
gichan-jang [Thu, 16 Apr 2020 11:31:20 +0000 (20:31 +0900)]
[Daily build] Add daily build badge

> Builds and tests are conducted every morning at 7: 30 a.m.
> The results are shown on the first page of the nnstreamer.
> Click the badge to download the log and images for the last seven days.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Android/Single] Do not turn off a large code block with #if
MyungJoo Ham [Tue, 14 Apr 2020 07:16:14 +0000 (16:16 +0900)]
[Android/Single] Do not turn off a large code block with #if

Separate the file and build independently instead.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Tests/CAPI] Use constexpr instead of define and ifdef for tflite
Wook Song [Wed, 8 Apr 2020 05:44:08 +0000 (14:44 +0900)]
[Tests/CAPI] Use constexpr instead of define and ifdef for tflite

This patch experimentally replaces #define and #ifdef used for checking
enable-tensorflow-lite is true with constexpr, which is type-safe
replacement for #define.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Tests/CAPI] Use EXPECT_FLOAT_EQ for the test cases comparing float data
Wook Song [Mon, 13 Apr 2020 02:25:20 +0000 (11:25 +0900)]
[Tests/CAPI] Use EXPECT_FLOAT_EQ for the test cases comparing float data

This patch replaces EXPECT_EQ with EXPECT_FLOAT_EQ for the test cases which
compare floating-point data.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[filter] Support tensor filter framework V1 single API
Parichay Kapoor [Sat, 29 Feb 2020 10:25:24 +0000 (15:55 +0530)]
[filter] Support tensor filter framework V1 single API

Support tensor filter framework v1 callbacks for the single API

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years agoLower MCD, Increase SAM Score
MyungJoo Ham [Mon, 13 Apr 2020 11:22:04 +0000 (20:22 +0900)]
Lower MCD, Increase SAM Score

SAM analysis says that nnstreamer.c is causing cyclic dependency
between modules.

Although I think this is false positive, let's move nnstreamer.c
to a subdirectory so that SAM won't recognize nnstreamer.c is
"parent module" of other nnstreamer elements.

Because this is the only modules that SAM recognizes as MCD issue,
this may enhance SAM score greatly.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Tensor-IF] An anchor for further development.
MyungJoo Ham [Wed, 8 Apr 2020 04:08:34 +0000 (13:08 +0900)]
[Tensor-IF] An anchor for further development.

Anyone can jump in and start the development!

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Android/Build] default option to build subplugins accepted/tizen/unified/20200414.034817 submit/tizen/20200413.103329
Jaeyun [Mon, 13 Apr 2020 08:40:12 +0000 (17:40 +0900)]
[Android/Build] default option to build subplugins

Change default option to build library with NNFW and SNAP.
NNFW and SNAP requires additional script.

Also update guide to build Android library.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Tests/CAPI] Add state check methos
gichan-jang [Mon, 6 Apr 2020 10:51:02 +0000 (19:51 +0900)]
[Tests/CAPI] Add state check methos

Mmodified to check the state change of each state.
Considering low speed of the arm, I gave more time than it needed.

*This should have been included in the previous PR, but it was not reflected because the modification was late.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Converter] Lower cyclomatic-complexity
MyungJoo Ham [Wed, 8 Apr 2020 08:22:31 +0000 (17:22 +0900)]
[Converter] Lower cyclomatic-complexity

The CC value of chain function was 24.
Lower it down!

V2: A nested if condition was merged.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Common] Merge BASEPAD/SLOWEST sync mechanisms
MyungJoo Ham [Fri, 10 Apr 2020 04:33:38 +0000 (13:33 +0900)]
[Common] Merge BASEPAD/SLOWEST sync mechanisms

The two has a low in common.
Merge the two.

Suggested-by: Gichan Jang <gichan2.jang@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Common] Lower cyclomatic-complexity
MyungJoo Ham [Wed, 8 Apr 2020 09:33:07 +0000 (18:33 +0900)]
[Common] Lower cyclomatic-complexity

The CC value of buffer-sync-collectpad as 23.
Lower it down!

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Tizen 5.5 / GLIBC 2.24] Workaround for GLIBC bug
MyungJoo Ham [Fri, 10 Apr 2020 05:32:13 +0000 (14:32 +0900)]
[Tizen 5.5 / GLIBC 2.24] Workaround for GLIBC bug

GLIBC dlclose bug
https://bugzilla.redhat.com/show_bug.cgi?id=1264556#c42
is haunting us again with Tizen 5.5 backports.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Filter/Common] Lower cyclomatic-complexity
MyungJoo Ham [Wed, 8 Apr 2020 07:56:01 +0000 (16:56 +0900)]
[Filter/Common] Lower cyclomatic-complexity

The CC value of the set-property function was 57.
Lower it down!

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[CAPI] Lower cyclomatic-complexity
MyungJoo Ham [Wed, 8 Apr 2020 09:45:59 +0000 (18:45 +0900)]
[CAPI] Lower cyclomatic-complexity

The CC value of the two functions was 21.
Lower it down!

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Android/API] init nnstreamer and version info
Jaeyun [Thu, 9 Apr 2020 10:53:07 +0000 (19:53 +0900)]
[Android/API] init nnstreamer and version info

1. nnstreamer version is empty, add definition of version info.
2. add NNStreamer.java in native build.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Android/Test] add simple test for NNFW
Jaeyun [Wed, 8 Apr 2020 11:36:07 +0000 (20:36 +0900)]
[Android/Test] add simple test for NNFW

Both single-shot and pipeline, add simple test to validate NNFW model.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Android/NNFW] add NNFW
Jaeyun [Wed, 8 Apr 2020 10:48:35 +0000 (19:48 +0900)]
[Android/NNFW] add NNFW

Update build script and API to support NNFW.

TODO : fix/update prebuilt libs of NNFW later (now CPU only)

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[C-API] same mem ptr
Jaeyun [Thu, 9 Apr 2020 10:05:34 +0000 (19:05 +0900)]
[C-API] same mem ptr

If user gets tensor data and tries to update it, memcpy is unnecessary.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Mediapipe] required script files of meson build script
Hyoung Joo Ahn [Wed, 8 Apr 2020 06:30:04 +0000 (15:30 +0900)]
[Mediapipe] required script files of meson build script

this script generate shared libs with internal/external object files of mediapipe.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
4 years ago[Mediapipe] add meson option & build script for mediapipe
Hyoung Joo Ahn [Wed, 8 Apr 2020 06:29:56 +0000 (15:29 +0900)]
[Mediapipe] add meson option & build script for mediapipe

This is a initial version of meson script about mediapipe. It will be used to development mediapipe as an external filter like other filters.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
4 years agoStart development of 1.5.2 as 1.6.0-RC3 accepted/tizen/unified/20200408.131442 submit/tizen/20200408.065121
MyungJoo Ham [Wed, 8 Apr 2020 03:38:58 +0000 (12:38 +0900)]
Start development of 1.5.2 as 1.6.0-RC3

I might wait for some of the following PRs before merging this version mark.
- #2244 #2246 #2247 #2248 #2249

Changes during 1.5.1:

1.5.1 -> 1.5.2
- Use gmodule instead of dlfcn for wider compatibility
- Get/Set properties for tensor-filters & C-API.
- Support C++ class as tensor-filter subplugin. (experimental. C++ filter API is not yet fixed)
- Highly configurable Android build. (for smaller app binaries)
- Tensor-Filter auto framework detection mode (C-API support)
- Linux Foundation AI compliance & Github ORG migration
- Upgraded Tensor-Filter API (C)
        - Applied portable logging mechanism.
        - Removed assertion failure for Tizen sensor errors.
- OpenCV compatibility fixes.

- Fixed issues found by static analyzers
- More error/exception handling for robustness
- Shows negative test case statistics

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Tizen/Sensor] Explicitly specify return values.
MyungJoo Ham [Wed, 8 Apr 2020 04:55:47 +0000 (13:55 +0900)]
[Tizen/Sensor] Explicitly specify return values.

Although SENSOR_ERROR_NONE is 0, explicitly specify
the name to increase readability.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Log] Use ml_log* instead of g_* for logging
MyungJoo Ham [Tue, 7 Apr 2020 10:59:36 +0000 (19:59 +0900)]
[Log] Use ml_log* instead of g_* for logging

With ml_log* nnstreamer internal APIs,
we can enable dlog in Tizen and Android logging in Android
while keep using GLIB's logging in other systems.

Fixes #1905

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Tizen/Sensor] Do not assert for sensor not available
MyungJoo Ham [Tue, 7 Apr 2020 10:46:49 +0000 (19:46 +0900)]
[Tizen/Sensor] Do not assert for sensor not available

If a sensor is not available or unknown,
do not assert, but emit error messages and return errors.

Fixes #2219

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Example/custom/opencv] Backward compatibility for old opencv
MyungJoo Ham [Wed, 8 Apr 2020 01:58:02 +0000 (10:58 +0900)]
[Example/custom/opencv] Backward compatibility for old opencv

The previous commit is for OPENCV3. Keep the old code for OPENCV2 or before.

Changed in v2:
- Per the comment from Tae-Young Chung,
"opencv3 also supports this change (opencv3 support c++)
how old opencv version should be supported? for example, opencv2.x?"
The backward compatibility patch is adjusted to support 2 or before.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Example/custom/opencv] Use enumeration in imgproc.hpp
Tae-Young Chung [Wed, 8 Apr 2020 01:32:23 +0000 (10:32 +0900)]
[Example/custom/opencv] Use enumeration in imgproc.hpp

From opencv4, usage of enumeration in c header files causes build failure
unless they are explicitly included.
Change the enumeration in types_c.h to InterpolationFlags in imgproc.hpp.

Change-Id: I521a09b9846d15a6beb8dad95f887681e2b59994
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>