platform/upstream/nnstreamer.git
4 years ago[unittest] Bug fix for c-api unittest
Parichay Kapoor [Mon, 27 Jul 2020 02:00:15 +0000 (11:00 +0900)]
[unittest] Bug fix for c-api unittest

Bug fix for c-api unittest when tensorflow-lite is not present
Bug of destroy info without create in invoke_01

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years agoTest/Fix potential macro bug
MyungJoo Ham [Fri, 24 Jul 2020 09:58:09 +0000 (18:58 +0900)]
Test/Fix potential macro bug

What if you do:
```
if (WHATSOEVER)
  _print_log (MESSAGE);
else
  do_something ();
```

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Test] Remove trailing whitespace
Tony Jinwoo Ahn [Sun, 26 Jul 2020 14:23:09 +0000 (23:23 +0900)]
[Test] Remove trailing whitespace

Signed-off-by: Tony Jinwoo Ahn <tony.jinwoo.ahn@gmail.com>
4 years ago[Protobuf] Fix protobuf util function header file
gichan-jang [Fri, 24 Jul 2020 02:23:34 +0000 (11:23 +0900)]
[Protobuf] Fix protobuf util function header file

Fix protobuf util function header file.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Build] Support VD product build system accepted/tizen/unified/20200728.045308 submit/tizen/20200724.082310
Sangjung Woo [Mon, 20 Jul 2020 07:48:51 +0000 (16:48 +0900)]
[Build] Support VD product build system

This patch supports the VD product build system.
`enable_tizen_privilege_check` and `enable_tizen_feature_check` are
newly added and below features are disabled.
* Privacy / Privilege Manager
* Resource Manager
* ProtoBuffer / FlatBuffer
* Test since python-numpy is not supported

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[tizensensor] Let the element make use of GstBaseSrc
Yongjoo Ahn [Mon, 13 Jul 2020 09:10:51 +0000 (18:10 +0900)]
[tizensensor] Let the element make use of GstBaseSrc

- Remove timestamp in `_create()` and `_fill()` and let BaseSrc do timestamp
- Remove `_get_times()`
- Init debug category
- Add query for latency
- set_interval for tizen sensor_listener

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[tensor_sink] Add debug log for timestamp in tensor_sink
Yongjoo Ahn [Mon, 13 Jul 2020 09:07:19 +0000 (18:07 +0900)]
[tensor_sink] Add debug log for timestamp in tensor_sink

- Add macro for logging timestamp in render_buffer

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[Debian] Fix protobuf lib install path
gichan-jang [Thu, 23 Jul 2020 10:45:18 +0000 (19:45 +0900)]
[Debian] Fix protobuf lib install path

Fix protobuf util lib install path

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[single] Enable setting timeout to 0
Parichay Kapoor [Fri, 24 Jul 2020 01:45:45 +0000 (10:45 +0900)]
[single] Enable setting timeout to 0

Enable setting timeout to 0
timeout 0 now has significance and re-setting timeout to 0 should be allowed

Related issue: #2568

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years agoREADME: update example style and add more examples
MyungJoo Ham [Tue, 21 Jul 2020 09:17:37 +0000 (18:17 +0900)]
README: update example style and add more examples

- Restyle example lists of README.md
- Add "edge-ai" and "products" category

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Test] Ignore src iio unusual cases test
gichan-jang [Mon, 20 Jul 2020 06:17:57 +0000 (15:17 +0900)]
[Test] Ignore src iio unusual cases test

Unusual cases test fails occasionally when getting state of the pipeline.
I removed the previous patch and modified it to ignore this test in Ubuntu.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[caffe2] Warning fix based for updated caffe2 v1.6.0-rc1
Parichay Kapoor [Thu, 16 Jul 2020 09:59:05 +0000 (18:59 +0900)]
[caffe2] Warning fix based for updated caffe2 v1.6.0-rc1

Update caffe2 extension to remove warning based on api update
for version 1.6.0-rc1

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[pytorch] Update pytorch extension for pytorch v1.6.0-rc1
Parichay Kapoor [Thu, 16 Jul 2020 09:54:03 +0000 (18:54 +0900)]
[pytorch] Update pytorch extension for pytorch v1.6.0-rc1

Update pytorch extension for pytorch v1.6.0-rc1
Also pytorch and caffe2 headers do not follow redundant declarations
So, remove redundant declaration warning flag when compiling with them

V2:
Check version of pytorch from pkg-config
Update extension based on version number due to api update

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years agoTest/CAPI: Type mismatch warning
MyungJoo Ham [Wed, 22 Jul 2020 07:37:15 +0000 (16:37 +0900)]
Test/CAPI: Type mismatch warning

ret_sync_mode is unsigned.
If it is compiled with more strict compilers,
it emits errors. Fix it by adding U.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years agoDebian: add flatbuf/protobuf packaging accepted/tizen/unified/20200723.161155 submit/tizen/20200722.112755
MyungJoo Ham [Wed, 22 Jul 2020 10:13:53 +0000 (19:13 +0900)]
Debian: add flatbuf/protobuf packaging

nnstreamer-flatbuf and
nnstreamer-protobuf will be available for Ubuntu/Debian.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Dist/Debian] Add a sub-package that provides the openvino filter
Wook Song [Fri, 10 Jul 2020 07:11:44 +0000 (16:11 +0900)]
[Dist/Debian] Add a sub-package that provides the openvino filter

This patch adds a sub-package that provides the tensor filter for
OpenVino to Debian/Ubuntu.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Api/Single] default no timeout when invoking model
Jaeyun [Fri, 17 Jul 2020 10:54:28 +0000 (19:54 +0900)]
[Api/Single] default no timeout when invoking model

If user does not set the timeout, single-invoke function will wait for the output till the invoke is done.
This requires another ACR.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years agoFix comments in SingleShot.java
박형민 (Park Hyeoung Min) [Thu, 9 Jul 2020 07:37:29 +0000 (16:37 +0900)]
Fix comments in SingleShot.java

Fix comments grammatically correct by adding subject, "this".

Signed-off-by: Park Hyeoung-Min <phm0127@gmail.com>
4 years ago[Tests/C-API] Add test case for abnormal accessing of callback function
Sangjung Woo [Fri, 17 Jul 2020 09:51:05 +0000 (18:51 +0900)]
[Tests/C-API] Add test case for abnormal accessing of callback function

This patch newly adds a test case for abnormal accessing of callback
function when calling both `ml_pipeline_element_get_handle()` and
`ml_pipeline_sink_register()` functions.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[C-API] Bugfix for abnormal accessing of the callback function
Sangjung Woo [Fri, 17 Jul 2020 09:47:04 +0000 (18:47 +0900)]
[C-API] Bugfix for abnormal accessing of the callback function

If the handle of sink element is fetched by calling both
`ml_pipeline_element_get_handle()` and `ml_pipeline_sink_register()`
functions, segmantation fault occurs because of abnormal accessing for
callback function. This patch fixes that bug.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[SPEC] Cleanup spec file
Sangjung Woo [Mon, 20 Jul 2020 04:15:00 +0000 (13:15 +0900)]
[SPEC] Cleanup spec file

* Fix the wrong definition of flat buffer
* Add `nnfw_support` flag to control NNFW even though ARM architecture

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[Filter/NNFW] change nnfw api
Jaeyun [Fri, 17 Jul 2020 09:17:45 +0000 (18:17 +0900)]
[Filter/NNFW] change nnfw api

1. Change nnfw api to set input info.
The function apply_tensorinfo will be deprecated soon.
2. Remove unnecessary definition about max rank of nnfw.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Api/Single] init status code before invoking
Jaeyun [Fri, 17 Jul 2020 09:50:40 +0000 (18:50 +0900)]
[Api/Single] init status code before invoking

In invoke thread, init status (error-none) before calling the invoke callback.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[SAM/CodeClean] remove global val
Jaeyun [Wed, 15 Jul 2020 07:31:15 +0000 (16:31 +0900)]
[SAM/CodeClean] remove global val

sam report, remove global val in openvino plugin.
update script to install common header file.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Demux] Bugfix for set_property function
Sangjung Woo [Wed, 15 Jul 2020 09:36:05 +0000 (18:36 +0900)]
[Demux] Bugfix for set_property function

If `tensorpick` property of demux element is set twice by calling
g_object_set() function, the previous value should be removed and
new one should be written. However, the value is appended and it can
make a problem. This patch fixes this bug.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[SPEC] Add supproting element for tizen
gichan-jang [Wed, 15 Jul 2020 02:23:19 +0000 (11:23 +0900)]
[SPEC] Add supproting element for tizen

Adding an element : gdppay, gdpdepay
These elements payload and depayload GStreamer buffers and events using the GStreamer Data Protocol.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Fix/SVACE] memory leak and un-init local variables accepted/tizen/unified/20200715.115543 submit/tizen/20200714.022606
MyungJoo Ham [Mon, 13 Jul 2020 07:17:15 +0000 (16:17 +0900)]
[Fix/SVACE] memory leak and un-init local variables

SVACE reported issues in Tizen CAPI unit test cases:
- 443268 (uninitialized local variable)
- 443269 (uninitialized local variable)
- 443278 (memory leak): although this is always not allocated successully, I've added "free" that fails with its error code assertion.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Tizen/Sensor] remove deprecated api
Jaeyun [Tue, 7 Jul 2020 11:35:13 +0000 (20:35 +0900)]
[Tizen/Sensor] remove deprecated api

API to read sensor data was deprecated since 5.5.
Replace this API (sensor data list).
Also set block size of output buffer when starting the src element.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Converter] code clean (parse media info)
Jaeyun [Thu, 9 Jul 2020 08:47:44 +0000 (17:47 +0900)]
[Converter] code clean (parse media info)

code clean, function to set/parse media info for each mime type.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[C-API] Add remarks section for ml_tensors_info_get_tensor_name()
Sangjung Woo [Mon, 13 Jul 2020 02:20:16 +0000 (11:20 +0900)]
[C-API] Add remarks section for ml_tensors_info_get_tensor_name()

This patch adds the remarks section for
ml_tensors_info_get_tensor_name() since the behavior of this function is
changed since 6.0.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[Filter/OpenVino] Fix compile error due to OoO designated initialization
Wook Song [Fri, 10 Jul 2020 05:42:48 +0000 (14:42 +0900)]
[Filter/OpenVino] Fix compile error due to OoO designated initialization

This patch fixes compile errors related to restriction of designated
initialization in C++.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Tests/Sink] Fix compiler warnings with -Werror=sign-compare
Wook Song [Fri, 10 Jul 2020 06:29:08 +0000 (15:29 +0900)]
[Tests/Sink] Fix compiler warnings with -Werror=sign-compare

This patch fixes compiler warnings with -Werror=sign-compare related to
the TestData and TestOption structures in unittest_sink.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Tizen/Restriction] add sensor-src in restriction
Jaeyun [Wed, 8 Jul 2020 03:53:42 +0000 (12:53 +0900)]
[Tizen/Restriction] add sensor-src in restriction

change condition to check restricted element.
tizen sensor-src will be included in restrict list.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Android/Doc] update doc about nn framework
Jaeyun [Thu, 9 Jul 2020 03:19:48 +0000 (12:19 +0900)]
[Android/Doc] update doc about nn framework

Update javadoc
- link to ONE and NNStreamer repo
- add add options for SNPE

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[SPEC] Newly add devel-static packages accepted/tizen/unified/20200710.114122 submit/tizen/20200709.045257
Sangjung Woo [Wed, 8 Jul 2020 05:55:15 +0000 (14:55 +0900)]
[SPEC] Newly add devel-static packages

To avoid the license conflict issue by an automatic tool, this patch
newly adds the `capi-nnstreamer-devel-static` and `nnstreamer-devel-static`
packages which only contain static libraries. `devel` packages only have
headers and package config as below.

$ rpm -qlp capi-nnstreamer-devel-static-1.5.3-0.armv7l.rpm
/usr/lib/libcapi-nnstreamer.a

$ rpm -qlp capi-nnstreamer-devel-1.5.3-0.armv7l.rpm
/usr/include/nnstreamer/nnstreamer-single.h
/usr/include/nnstreamer/nnstreamer.h
/usr/lib/pkgconfig/capi-nnstreamer.pc

$ rpm -qlp nnstreamer-devel-static-1.5.3-0.armv7l.rpm
/usr/lib/libnnstreamer-tizen-sensor.a
/usr/lib/libnnstreamer.a
/usr/lib/libnnstreamer_decoder_bounding_boxes.a
/usr/lib/libnnstreamer_decoder_direct_video.a
/usr/lib/libnnstreamer_decoder_image_labeling.a
/usr/lib/libnnstreamer_decoder_image_segment.a
/usr/lib/libnnstreamer_decoder_pose_estimation.a
/usr/lib/libnnstreamer_filter_movidius-ncsdk2.a
/usr/lib/libnnstreamer_filter_nnfw.a
/usr/lib/libnnstreamer_filter_python2.a
/usr/lib/libnnstreamer_filter_tensorflow-lite.a

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[C-API] Add remarks section in ml_tensors_data_create()
Sangjung Woo [Mon, 6 Jul 2020 05:11:56 +0000 (14:11 +0900)]
[C-API] Add remarks section in ml_tensors_data_create()

Since 6.0, ML_ERROR_STREAMS_PIPE error code is removed in
ml_tensors_data_create() function and ML_ERROR_OUT_OF_MEMORY is returned
for internal error. This patch adds a remarks section in
ml_tensors_data_create() for Tizen application developers.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years agoUpdate README.md
Sung-Jae Lee [Wed, 8 Jul 2020 05:11:32 +0000 (14:11 +0900)]
Update README.md

- Update the name `NN Runtime` to `ONE Runtime` with a link to github repo of the project.

Signed-off-by: Sung-Jae Lee <sj925.lee@samsung.com>
4 years ago[TEST] Fix iio unit test that fails occasionally
gichan-jang [Wed, 8 Jul 2020 03:11:13 +0000 (12:11 +0900)]
[TEST] Fix iio unit test that fails occasionally

Add sleep time unitl state changed within the timeout
Related issue : #2434

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[SPEC] Fix install files list
gichan-jang [Tue, 7 Jul 2020 09:55:29 +0000 (18:55 +0900)]
[SPEC] Fix install files list

Fix install files list.
Seperate flatbuf as independent package.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Android] custom-easy filter
Jaeyun [Wed, 17 Jun 2020 03:28:15 +0000 (12:28 +0900)]
[Android] custom-easy filter

Update custom-filter API using custom-easy.
- register custom-filter with in/out info and implement invoke interface only.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Decoder] Dynamic update of tensor config
gichan-jang [Mon, 6 Jul 2020 07:47:34 +0000 (16:47 +0900)]
[Decoder] Dynamic update of tensor config

Changed to update tensor config dynamically.
Clear private data of subplugin, and init the subplugin.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Android] enable nnfw accepted/tizen/unified/20200708.125346 submit/tizen/20200707.004108
Jaeyun [Fri, 3 Jul 2020 07:18:40 +0000 (16:18 +0900)]
[Android] enable nnfw

Change default option to enable NNFW in android-api build, and clean up build script.
When building android library, download nnfw libs from ONE repo and start to build library.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Filter/TF] code clean
Jaeyun [Thu, 2 Jul 2020 02:40:22 +0000 (11:40 +0900)]
[Filter/TF] code clean

change to static function to release buffer.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[doc/android] Update README for android build and test
Yongjoo Ahn [Sun, 5 Jul 2020 07:24:59 +0000 (16:24 +0900)]
[doc/android] Update README for android build and test

- Add links to data for tflite and snpe test

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[Test/android/snpe] Add android tests with snpe
Yongjoo Ahn [Sun, 5 Jul 2020 07:24:21 +0000 (16:24 +0900)]
[Test/android/snpe] Add android tests with snpe

- Add classification result test with inception_v3 model
- Add runtime checks

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[Protobuf] Add protobuf util function
gichan-jang [Fri, 12 Jun 2020 07:21:53 +0000 (16:21 +0900)]
[Protobuf] Add protobuf util function

The problem happens when multiple objects using .pb.cc file are loaded simultaneously.
I changed to tensor converter and decoder of protobuf subplugin shared libnnstreamer_protobuf.so

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Converter] Add tensor converter sub-plugin protobuf
gichan-jang [Tue, 9 Jun 2020 05:18:52 +0000 (14:18 +0900)]
[Converter] Add tensor converter sub-plugin protobuf

Add tensor converter subplugin protobuf
Add protobuf unittest

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[C-Api] define new API for custom filter
Jaeyun [Wed, 10 Jun 2020 11:48:56 +0000 (20:48 +0900)]
[C-Api] define new API for custom filter

This PR defines new APIs and callbacks for custom filter.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Android/AMCSrc] prevent build warning
Jaeyun [Thu, 2 Jul 2020 02:37:33 +0000 (11:37 +0900)]
[Android/AMCSrc] prevent build warning

1. fix macro to get private data in element (will be deprecated)
2. fix indent

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Common] Allow to fetch nnstreamer version
MyungJoo Ham [Tue, 28 Apr 2020 07:36:38 +0000 (16:36 +0900)]
[Common] Allow to fetch nnstreamer version

Let external nnstreamer plugins to probe nnstreamer version
at both run-time and build-time.

Fixes #2294

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Test] testcase with typecast option
Jaeyun [Thu, 2 Jul 2020 08:21:29 +0000 (17:21 +0900)]
[Test] testcase with typecast option

Add new testcases for caps-nego in tensor-transform, and remove duplicated test code.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Transform] nego failure with appsrc
Jaeyun [Thu, 2 Jul 2020 08:18:38 +0000 (17:18 +0900)]
[Transform] nego failure with appsrc

When pushing the data directly from appsrc to tensor-transform (with typecast option), caps-negotiation failed and cannot run the pipeline.
To fix this, set type to unknown when direction is src pad.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Test/CAPI] Add testcases for element-wise control functions
Sangjung Woo [Tue, 16 Jun 2020 09:50:13 +0000 (18:50 +0900)]
[Test/CAPI] Add testcases for element-wise control functions

This patch newly adds testcases for element-wise control function APIs.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[C-API] Add element-wise control functions
Sangjung Woo [Tue, 16 Jun 2020 08:10:12 +0000 (17:10 +0900)]
[C-API] Add element-wise control functions

This patch newly adds element-wise control functions to get and set
property values of the target element in NNStreamer pipeline.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[C-API] Rename ml_pipeline_get_element() to ml_pipeline_get_gst_element()
Sangjung Woo [Wed, 17 Jun 2020 10:22:23 +0000 (19:22 +0900)]
[C-API] Rename ml_pipeline_get_element() to ml_pipeline_get_gst_element()

This patch renames ml_pipeline_get_element() to
ml_pipeline_get_gst_element(). It is only used for demo application
internally and the name 'ml_pipeline_get_element' is going to use for
other purposes.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[CAPI] Add ml_error_e into CAPI_ML_FRAMEWORK group accepted/tizen/unified/20200702.141729 submit/tizen/20200702.043208
Sangjung Woo [Wed, 1 Jul 2020 10:29:00 +0000 (19:29 +0900)]
[CAPI] Add ml_error_e into CAPI_ML_FRAMEWORK group

This patch newly adds the ml_error_e Enumeration into the
CAPI_ML_FRAMEWORK doxygen group.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[Decoder] Add tensor decoder subplugin flatbuffers
gichan-jang [Wed, 26 Feb 2020 11:30:28 +0000 (20:30 +0900)]
[Decoder] Add tensor decoder subplugin flatbuffers

Add tensor decoder subplugin for flatbuffer

flatbuffers package can be found here :
https://launchpad.net/~nnstreamer/+archive/ubuntu/ppa-build-test/+packages

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Test] Add flatbuffer converter and decode test
gichan-jang [Tue, 26 May 2020 12:16:54 +0000 (21:16 +0900)]
[Test] Add flatbuffer converter and decode test
Add flatbuffer converter and decoder run test

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[TEST] Fix Tensor converter test
gichan-jang [Thu, 25 Jun 2020 11:54:13 +0000 (20:54 +0900)]
[TEST] Fix Tensor converter test

fix tensor converter unit test

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[C-Api] fix mem leak
Jaeyun [Fri, 26 Jun 2020 02:04:20 +0000 (11:04 +0900)]
[C-Api] fix mem leak

1. add g_free to release the memory when appending mem block in buffer.
2. free interator in switch api.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Repo] fix a mem leak accepted/tizen/unified/20200629.143505 submit/tizen/20200626.060219
Hyoung Joo Ahn [Thu, 25 Jun 2020 11:37:02 +0000 (20:37 +0900)]
[Repo] fix a mem leak

fix a mem leak at tensor_repo

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
4 years ago[Mux] add the new sync_mode:REFRESH
Hyoung Joo Ahn [Thu, 25 Jun 2020 03:13:58 +0000 (12:13 +0900)]
[Mux] add the new sync_mode:REFRESH

This new sync mode allows PUSHING with only one new buffer of sinkpads of `tensor_mux`. Previously, if `tensor_mux` want to push its buffers to srcpad, all of sink pads had to be filled with new buffers. However, this new mode, REFRESH, push buffers when `tensor_mux` receive a new buffer. For the other sink pads, except the one received the new buffer, will use again the previous one. It decides EOS when any of the sink pads receive it.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
4 years ago[Test] fix mem leak
Jaeyun [Thu, 25 Jun 2020 11:42:18 +0000 (20:42 +0900)]
[Test] fix mem leak

fix possible mem leak in c-api testcases.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Filter] fix a memory leak
Hyoung Joo Ahn [Thu, 25 Jun 2020 10:39:34 +0000 (19:39 +0900)]
[Filter] fix a memory leak

the allocated memory(when `allocate_in_invoke` is FALSE) should be free when `invoke()` returns not 0(OK)

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
4 years ago[Tests/Filter/EdgeTPU] Enable test() in the meson build script
Wook Song [Wed, 24 Jun 2020 07:09:21 +0000 (16:09 +0900)]
[Tests/Filter/EdgeTPU] Enable test() in the meson build script

This patch enables test(), which has been commented out, in the meson
build script for the EdgeTPU filter.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Meson] Add missing environment variable, NNSTREAMER_SOURCE_ROOT_PATH
Wook Song [Wed, 24 Jun 2020 06:49:51 +0000 (15:49 +0900)]
[Meson] Add missing environment variable, NNSTREAMER_SOURCE_ROOT_PATH

This patch adds the missing environment variable,
NNSTREAMER_SOURCE_ROOT_PATH, to the test environment object in the
meson build script. This variable is necessary to run the test cases
via 'ninja test'.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Mux/Merge] code clean
Jaeyun [Fri, 19 Jun 2020 06:19:55 +0000 (15:19 +0900)]
[Mux/Merge] code clean

code clean, prepare new sync-mode.
- remove unnecessary param
- reduce code complexity
- change return val (true to push buffer to src pad)

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[CodeClean] remove unnecessary defines
Jaeyun [Tue, 23 Jun 2020 11:17:32 +0000 (20:17 +0900)]
[CodeClean] remove unnecessary defines

code clean, remove unnecessary predefinition to set pad template.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[TEST] Fix nnfw unit test
gichan-jang [Wed, 24 Jun 2020 11:04:43 +0000 (20:04 +0900)]
[TEST] Fix nnfw unit test

When testing the operation of the multi-framework, if tflite is disabled, the test fails.
If tflite is disabled, skip the test.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Tests] Rename NNSTREAMER_BUILD_ROOT_PATH with NNSTREAMER_SOURCE_ROOT_PATH
Wook Song [Wed, 24 Jun 2020 05:57:51 +0000 (14:57 +0900)]
[Tests] Rename NNSTREAMER_BUILD_ROOT_PATH with NNSTREAMER_SOURCE_ROOT_PATH

In most cases, the environment variable, NNSTREAMER_BUILD_ROOT_PATH,
is used for indicating the root directory of the path to which the
'test_models' directory belongs, which means the source root path. To
avoid confusion, this patch renames it with NNSTREAMER_SOURCE_ROOT_PATH.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Decoder] Add tensor decoder subplugin flatbuffers
gichan-jang [Wed, 26 Feb 2020 11:30:28 +0000 (20:30 +0900)]
[Decoder] Add tensor decoder subplugin flatbuffers

Add tensor decoder subplugin for flatbuffer

flatbuffers package can be found here :
https://launchpad.net/~nnstreamer/+archive/ubuntu/ppa-build-test/+packages

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Test] Add test for imageseg-decoder and tensor_filter profiling
Yongjoo Ahn [Tue, 23 Jun 2020 05:20:38 +0000 (14:20 +0900)]
[Test] Add test for imageseg-decoder and tensor_filter profiling

- Add test cases for newly added option `snpe-deeplab` and `snpe-depth`
- It also check profiling option of tensor_filter

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[Conf/MemLeak] Add missing g_free() to nnstreamer_conf.c
Dongju Chae [Thu, 18 Jun 2020 05:43:18 +0000 (14:43 +0900)]
[Conf/MemLeak] Add missing g_free() to nnstreamer_conf.c

This patch adds missing `g_free()` to `nnstreamer_conf.c`

`nnsconf_get_custom_value_string()` allocates `hashkey` in the first
line. However, if a value is found in the first hash lookup or a value
does not exist in anywhere, `hashkey` is not inserted to the hash table,
which results in memory leak.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[RepoSink] ignore sync and preroll
Jaeyun [Fri, 19 Jun 2020 06:45:48 +0000 (15:45 +0900)]
[RepoSink] ignore sync and preroll

repo-sink may not receive a buffer when pipeline constructed.
set sync and async option to ignore this case.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Coverage] Exclude generated files by flatbuf
gichan-jang [Fri, 19 Jun 2020 08:01:00 +0000 (17:01 +0900)]
[Coverage] Exclude generated files by flatbuf

Exclude generated files by flatbuf from coverage report

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Tests/EdgeTPU] Use dummy device mode instead of dummy library
Wook Song [Thu, 18 Jun 2020 02:57:06 +0000 (11:57 +0900)]
[Tests/EdgeTPU] Use dummy device mode instead of dummy library

This patch revises the unit test cases for EdgeTPU to use dummy device
mode instead of the dummy EdgeTPU library.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[C-Api] handle invalid info when creating data handle
Jaeyun [Wed, 17 Jun 2020 03:45:50 +0000 (12:45 +0900)]
[C-Api] handle invalid info when creating data handle

When creating the data handle, return error if given tensors-info is invalid.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years agoTAOS-CI / Enable clang-format for C++ codes
MyungJoo Ham [Fri, 5 Jun 2020 05:51:55 +0000 (14:51 +0900)]
TAOS-CI / Enable clang-format for C++ codes

1. Enable clang TAOS-CI module
2. Add "C++ ONLY" mode for it.

Note that I need to update TAOS-CI to make it accept such options.
This depends on https://github.com/nnstreamer/TAOS-CI/pull/628

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Test/C-Api] add testcase of internal functions
Jaeyun [Tue, 16 Jun 2020 07:35:35 +0000 (16:35 +0900)]
[Test/C-Api] add testcase of internal functions

add simple testcases to handle the case of invalid param.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[C-Api] error code when failed to allocate tensor data
Jaeyun [Tue, 16 Jun 2020 07:26:21 +0000 (16:26 +0900)]
[C-Api] error code when failed to allocate tensor data

Remove unnecessary error code (stream-pipe).
If failed to allocate mem for tensors-data handle, API returns out-of-mem error.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Meson] converter sub-plugin path in test-env
Jaeyun [Mon, 15 Jun 2020 12:47:53 +0000 (21:47 +0900)]
[Meson] converter sub-plugin path in test-env

Update sub-plugin path in test-env, set converter plugin path.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Fix] Remove unncessary arg checking before calling g_strdup()
Dongju Chae [Tue, 16 Jun 2020 11:04:20 +0000 (20:04 +0900)]
[Fix] Remove unncessary arg checking before calling g_strdup()

This patch removes uncessary argument checking before calling g_strdup()

If an argument of g_strdup() is NULL, its return value is also NULL.
So, checking its argument before calling is duplicated and useless.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Repo/Test] make it easier to understand
Hyoung Joo Ahn [Tue, 16 Jun 2020 03:13:41 +0000 (12:13 +0900)]
[Repo/Test] make it easier to understand

applying line change at the complicated pipeline to understand easier.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
4 years ago[Filter/EdgeTPU] Add a 'dummy' device mode for the test purpose
Wook Song [Thu, 11 Jun 2020 07:47:17 +0000 (16:47 +0900)]
[Filter/EdgeTPU] Add a 'dummy' device mode for the test purpose

This patch adds a 'dummy' device mode for the test purpose instead of
using the dummy shared library that pretends to be libedgetpu.so.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Android] do not convert meta in invoke method
Jaeyun [Wed, 10 Jun 2020 04:11:21 +0000 (13:11 +0900)]
[Android] do not convert meta in invoke method

To improve performance, it is necessary to remove metadata conversion in invoke method.
Do not handle dynamic mode in invoke method and update description to change the tensor info.
Also, if output info is changed using set-info method, update cached instance in private data.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Android] create info handle in private data
Jaeyun [Wed, 10 Jun 2020 04:03:22 +0000 (13:03 +0900)]
[Android] create info handle in private data

create info handle when allocating private data.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Filter/tflite] Fix typo
junmin-kim [Tue, 16 Jun 2020 05:46:30 +0000 (14:46 +0900)]
[Filter/tflite] Fix typo

Assignment should be ended with semicolon if there is no special reason.
Replace `,` with `;`

Signed-off-by: junmin-kim <junmindd.kim@samsung.com>
4 years ago[Android] constructor with info
Jaeyun [Wed, 10 Jun 2020 09:08:33 +0000 (18:08 +0900)]
[Android] constructor with info

In tensors-data class, update private constructor with tensor-info.
This can remove method call to set metadata in native.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Bugfix/Auto] Fix the bug to access freed memory region in auto fwname
Dongju Chae [Fri, 12 Jun 2020 07:36:37 +0000 (16:36 +0900)]
[Bugfix/Auto] Fix the bug to access freed memory region in auto fwname

This patch fixes the memory bug in auto tensor filter detection.

`gst_tensor_filter_get_available_framework` assumes that `fw_name` and
`prop->fwname` are pointing different memory regions.

However, `_gtfc_setprop_Model` has passed the argument `fw_name` as
`prop->fwname`, which may cause the invalid memory access.

In this case, `fw_name` is being accessed after `prop->fwname` is freed.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Tensor Converter] Add tensor converter subplugin flatbuffer
gichan-jang [Thu, 14 May 2020 02:25:12 +0000 (11:25 +0900)]
[Tensor Converter] Add tensor converter subplugin flatbuffer
Add tensor converter subplugin flatbuffer

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Filter/Custom] copy metadata in registration
Jaeyun [Wed, 10 Jun 2020 10:35:40 +0000 (19:35 +0900)]
[Filter/Custom] copy metadata in registration

In the filter custom-easy, prevent error case when developer tries to register custom-filter with local variables.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Filter/EdgeTPU] Handle the error case when a compiled model is given
Wook Song [Wed, 10 Jun 2020 10:33:42 +0000 (19:33 +0900)]
[Filter/EdgeTPU] Handle the error case when a compiled model is given

This patch is to handle the error case when a model compiled by
edgetpu-compiler is given. In general, a higher version of
tensorflow-lite (> 1.13) could support more various types of the tflite
models.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Converter] reduce complexity
Jaeyun [Fri, 12 Jun 2020 10:30:16 +0000 (19:30 +0900)]
[Converter] reduce complexity

code clean to reduce complexity
1. internal function to push multiple buffers.
2. remove unnecessary args

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Android/Doc] build options
Jaeyun [Fri, 12 Jun 2020 08:27:56 +0000 (17:27 +0900)]
[Android/Doc] build options

Update document, build options for android library.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Tests/Meson] Fix the unknown variable error related to python filters
Wook Song [Mon, 15 Jun 2020 05:29:53 +0000 (14:29 +0900)]
[Tests/Meson] Fix the unknown variable error related to python filters

This patch fixes the unknown variable error related to the filter
sub-plugins for python 2 and 3.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Meson] Remove trailing whitespaces
Wook Song [Mon, 15 Jun 2020 05:12:12 +0000 (14:12 +0900)]
[Meson] Remove trailing whitespaces

This is a trivial patch to eliminate trailing whitespaces of the meson
build script in the source root.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Doc] fix wrong file name
Jaeyun [Mon, 15 Jun 2020 05:05:10 +0000 (14:05 +0900)]
[Doc] fix wrong file name

fix wrong file name in converter header file.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Doc] fix invalid document
Jaeyun [Fri, 12 Jun 2020 09:18:50 +0000 (18:18 +0900)]
[Doc] fix invalid document

typo correction and fix document for converter sub-plugin api.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Tests/Filter] Add test case for NNS_custom_easy_unregister()
Sangjung Woo [Thu, 11 Jun 2020 02:12:11 +0000 (11:12 +0900)]
[Tests/Filter] Add test case for NNS_custom_easy_unregister()

This patch newl adds test cases for NNS_custom_easy_unregister().

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[Filter/Custom/Easy] Add unregister function
Sangjung Woo [Thu, 11 Jun 2020 01:58:56 +0000 (10:58 +0900)]
[Filter/Custom/Easy] Add unregister function

This patch newly adds 'NNS_custom_easy_unregister()' function to remove
registered function so that pipeline itself can be reused without
changing custom model name.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>