platform/upstream/nnstreamer.git
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>
4 years ago[Debian/control] Add flatbuf-dev build dependent package
gichan-jang [Wed, 10 Jun 2020 05:40:26 +0000 (14:40 +0900)]
[Debian/control] Add flatbuf-dev build dependent package
As flatbuf headers are separated from tflite-dev pkg, flatbuf-dev pkg is added.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Converter] Change find external converter function
gichan-jang [Wed, 10 Jun 2020 10:23:41 +0000 (19:23 +0900)]
[Converter] Change find external converter function
Change to search for sub-plugins according to the mime type regardless of the name of the library

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Converter] Change prototype of subplugin
gichan-jang [Fri, 29 May 2020 07:09:17 +0000 (16:09 +0900)]
[Converter] Change prototype of subplugin
Change subplugin function prototype of tensor converter

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Converter] Change tensor config to tensors config
gichan-jang [Thu, 28 May 2020 01:45:33 +0000 (10:45 +0900)]
[Converter] Change tensor config to tensors config

Change tensor config to tensors config. Assume single tensor only except subplugin.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Converter] Prepare to register sub-plugin
gichan-jang [Mon, 18 May 2020 01:37:16 +0000 (10:37 +0900)]
[Converter] Prepare to register sub-plugin

Preprare to register sub-plugin for flatbuffers and protobuf

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Filter/C++] Do not go further when failed to open NN framework
Wook Song [Wed, 10 Jun 2020 07:54:43 +0000 (16:54 +0900)]
[Filter/C++] Do not go further when failed to open NN framework

This patch adds more catch blocks that return negative error code in
cpp_open so that the execution does not go further when it failed to
open NN framework.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Dist/Debian] Provide a sub-package for the Edge TPU extension
Wook Song [Wed, 10 Jun 2020 04:51:24 +0000 (13:51 +0900)]
[Dist/Debian] Provide a sub-package for the Edge TPU extension

This patch provides a sub-package for the Edge TPU extension.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Ext/Filter/Meson] Revise resolving build dependency for Edge TPU
Wook Song [Wed, 10 Jun 2020 02:50:10 +0000 (11:50 +0900)]
[Ext/Filter/Meson] Revise resolving build dependency for Edge TPU

This patch revises the mechanism that resolves the build dependency on
libedgetpu and header files.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Ext/Filter/Meson] Elminate white spaces
Wook Song [Wed, 10 Jun 2020 02:27:56 +0000 (11:27 +0900)]
[Ext/Filter/Meson] Elminate white spaces

This is a trivial fix that eliminates white spaces in the meson build
script for the filter extensions.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Tests] Add 'nosync' option into mux
Sangjung Woo [Wed, 10 Jun 2020 01:16:46 +0000 (10:16 +0900)]
[Tests] Add 'nosync' option into mux

To fix `framerate` issue in mux, it set sync-mode to slowest as default.
However, This LSTM test case is hanging as a side-effect since it uses
both tensor_repo and tensor_mux. This patch adds 'nosync' option into
mux so that the test pipeline starts and finishes without hanging.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[Mux] Set sync-mode to slowest as default
Sangjung Woo [Tue, 9 Jun 2020 05:10:26 +0000 (14:10 +0900)]
[Mux] Set sync-mode to slowest as default

After passing mux / demux, the framerate is extremely bigger than
before. (Issue #2440) This is mainly because sync_mode of tensor_mux
filter is SYNC_NOSYNC. To fix this bug, this patch set sync_mode to
SYNC_SLOWEST as default.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years agoFilter/Custom/Easy: fix doxygen entry
MyungJoo Ham [Tue, 9 Jun 2020 10:29:48 +0000 (19:29 +0900)]
Filter/Custom/Easy: fix doxygen entry

Fix easy-custom-filter API's doxygen entry.
It gets output dimenesion info as an input, not output.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Android] implement on-load in native
Jaeyun [Tue, 9 Jun 2020 06:22:21 +0000 (15:22 +0900)]
[Android] implement on-load in native

register native functions when loading native library.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Android] return to static build
Jaeyun [Tue, 9 Jun 2020 04:24:12 +0000 (13:24 +0900)]
[Android] return to static build

To execute model faster, return to static build.
Make all sub-plugins static libs and build one native so file.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Fix][Filter/Prop] Fix performance property (latency) for tensorfilter
Yongjoo Ahn [Fri, 5 Jun 2020 07:15:54 +0000 (16:15 +0900)]
[Fix][Filter/Prop] Fix performance property (latency) for tensorfilter

- Initialize with zero value.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[Decoder/Neon] Support neon accl for SNPE deeplab/depth seg decoder
Dongju Chae [Thu, 4 Jun 2020 11:25:54 +0000 (20:25 +0900)]
[Decoder/Neon] Support neon accl for SNPE deeplab/depth seg decoder

This patch supports neon accl for SNPE deeplab/depth seg decoder

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Decoder/Fix] Revise tensordec-imagesegment impl. and fix minor bugs
Dongju Chae [Thu, 4 Jun 2020 10:53:01 +0000 (19:53 +0900)]
[Decoder/Fix] Revise tensordec-imagesegment impl. and fix minor bugs

This patch revises tensordec-imagesegment impl. and fix minor bugs

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Android] private data to set metadata
Jaeyun [Wed, 3 Jun 2020 05:19:06 +0000 (14:19 +0900)]
[Android] private data to set metadata

Each invoke callback gets/returns tensor data object including metadata.
To improve performance, Cache tensor metadata object and avoid duplicated conversion.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years agoStart development of 1.5.3 as 1.6.0-RC4 accepted/tizen/unified/20200608.144742 submit/tizen/20200608.023449
MyungJoo Ham [Thu, 4 Jun 2020 02:50:24 +0000 (11:50 +0900)]
Start development of 1.5.3 as 1.6.0-RC4

As soon as all major known bugs and SVACE/Coverity issues are fixed,
I'm going to release 1.6.0.

Cheers!

```
1.5.2 -> 1.5.3
- Mediapipe's graphs (NNStreamer pipeline equivalent) may be embedded as an element in NNStreamer pipeline
- Qualcomm SNPE is supported (tensor-filter subplugin)
- Verisilicon Vivante is supported (tensor-filter subplugin)
- NNStreamer --> Protobuf decoder added.
- New tensor-filter subplugin API "v1" released. (with v0 backward compatibility)
- Tensor-filter now accepts C++ classes as a subplugin. Edge-TPU subplugin is re-written as an example.

- Meson script re-worked.
- Semantics of hardware-acceleration options for tensor-filter re-worked.
- API/Android: nnfw-runtime (neurun) and SNPE support
- API/Android: usability update.
- API/Android: less invokation latency. (more optimization coming in next versions)
- API/C: bugfixes, architectural upgrade, latency reduction.
- tensor-filter has latency and throughput performance monitors.
- tensor-sink is by default "sync=false". If appsink or tensor_sink in NNStreamer Pipeline API's pipeline has sync=true, emit warning messages.
- Architectural updates: lower CC, less duplication, removed dependency cycles, less complicated #if statements and blocks.
- Test suite updates: timeout handling, arm-arch error fixes, more test cases (supplying more negative cases), floating-point handling. and a lot more fixes and performance (latency) optimizations.
- Build script updates: cleaned up dependencies and applied "feature" meson feature.
- No more essential class in assert() for optimized binaries.
- Much less assertions. Apply error-handling instead.
- Daily build & test activated and published.
- Rules & policy updated to comply with LF/AI.
- Memory leaks removed: from demux, split, and a few more components.

- Known bug: edge-TPU subplugin is not working in Tizen devices recently.
```

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Android] typo in mk file
Jaeyun [Fri, 5 Jun 2020 13:41:37 +0000 (22:41 +0900)]
[Android] typo in mk file

fix typo in mk file (jni nnstreamer defines)

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years agoTizen/spec: disable mvncsdk/edgeTPU for DA build
MyungJoo Ham [Fri, 5 Jun 2020 05:57:22 +0000 (14:57 +0900)]
Tizen/spec: disable mvncsdk/edgeTPU for DA build

DA requested to remove mvncsdk/edgeTPU from the dependency.
Disable them for their builds.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[NNFW] set backend after loading model
Jaeyun [Thu, 4 Jun 2020 11:16:20 +0000 (20:16 +0900)]
[NNFW] set backend after loading model

recently updated, nnfw set-backend should be called after loading the model.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years agodoc: how to enable vivante tensor filter
Geunsik Lim [Tue, 2 Jun 2020 11:10:18 +0000 (20:10 +0900)]
doc: how to enable vivante tensor filter

This commit is to append how to enable the Vivante tensor filter
based on Vivante NPU Toolkit library on Ubuntu/ARM and Tizen/ARM devices.

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
4 years agoMovidius Filter: Fixed typos
Geunsik Lim [Thu, 4 Jun 2020 11:28:56 +0000 (20:28 +0900)]
Movidius Filter: Fixed typos

This commit is trivial. Let's fix typos in the Movidius filter file.

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
4 years ago[Filter/TFLite] remove ineffective codes
Hyoung Joo Ahn [Thu, 4 Jun 2020 08:38:30 +0000 (17:38 +0900)]
[Filter/TFLite] remove ineffective codes

setting allocation type is not effective anymore.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
4 years ago[Decoder] Extend tensordec-imagesegment to support snpe-deeplab/depth
Dongju Chae [Mon, 1 Jun 2020 12:31:08 +0000 (12:31 +0000)]
[Decoder] Extend tensordec-imagesegment to support snpe-deeplab/depth

This patch extends tensordec-imagesegment to support snpe-deeplab/depth.
Also, it include minor code refactoring.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Filter/Prop] Add performance properties (lat/fps) for tensor filter
Dongju Chae [Wed, 3 Jun 2020 04:01:35 +0000 (13:01 +0900)]
[Filter/Prop] Add performance properties (lat/fps) for tensor filter

This patch adds performance properties (latency/throughput) for tensor filter.

Those properties will be used for the overlay information, to show the performance
of tensor filter (e.g., SNPE).

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years agoSPEC: fixed indentation
Geunsik Lim [Thu, 4 Jun 2020 02:25:57 +0000 (11:25 +0900)]
SPEC: fixed indentation

This commit is trivial. It is to keep an indentation consistently.

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
4 years ago[Android/Custom] drop input buffer
Jaeyun [Wed, 3 Jun 2020 02:40:36 +0000 (11:40 +0900)]
[Android/Custom] drop input buffer

In custom-filter interface, returning null in invoke-callback will drop the input buffer.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[C-Api] function to get pipeline element
Jaeyun [Wed, 3 Jun 2020 05:08:39 +0000 (14:08 +0900)]
[C-Api] function to get pipeline element

Add new function to get the gst-element from pipeline handle.
For native developers, it is necessary to get pipeline element to use gstreamer functions.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>