platform/upstream/nnstreamer.git
3 years ago[Test] add filter-cpp test
Jaeyun [Fri, 22 Jan 2021 11:58:28 +0000 (20:58 +0900)]
[Test] add filter-cpp test

add missed testcases - filter-cpp in tizen build.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Common] code clean
Jaeyun [Mon, 18 Jan 2021 04:32:12 +0000 (13:32 +0900)]
[Common] code clean

fix typo and remove duplicated code to compare file extension.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Badge] Change coverity link of the badge
Gichan Jang [Fri, 22 Jan 2021 04:50:31 +0000 (13:50 +0900)]
[Badge] Change coverity link of the badge

Change coverity link of the badge because coverity project has been
changed.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Common] function to check peer caps
Jaeyun [Thu, 21 Jan 2021 03:12:31 +0000 (12:12 +0900)]
[Common] function to check peer caps

Update description to check peer pad caps, and fix invalid condition.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Join] remove unnecessary code
Jaeyun [Fri, 22 Jan 2021 05:21:05 +0000 (14:21 +0900)]
[Join] remove unnecessary code

remove unnecessary code (duplicated free line)

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[debian] Add nnstreamer-api-common-dev package
Jihoon Lee [Wed, 20 Jan 2021 05:07:06 +0000 (14:07 +0900)]
[debian] Add nnstreamer-api-common-dev package

Currently, `capi-ml-common-devel` was added to rpm package but
corresponding package was not available in debian.

This patch adds `nnstreamer-api-common-dev` to the debian which
corresponds with `capi-ml-common-devel` in rpm.

**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
3 years ago[Doc] Initial commit to generate doccument using hotdoc
Gichan Jang [Thu, 7 Jan 2021 09:18:32 +0000 (18:18 +0900)]
[Doc] Initial commit to generate doccument using hotdoc

Initial commit to generate doccument using hotdoc.
 - Modify markdown files to follow hotdoc's rule
 - Add element descriptions
 - The API reference is connected with doxygen book link
 - NNStreamer-example doc is linked.
 - Tizen nativa and .ENT doc is linked.
 - Android doc is linked.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Filter/Single] hide private properties
Jaeyun [Mon, 18 Jan 2021 07:27:29 +0000 (16:27 +0900)]
[Filter/Single] hide private properties

set private data for tensor-filter single properties.

TODO: move filter-single class to gst directory or declare extern for filter common function.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[test/SSAT] Optimize python lazy `pack`
Yongjoo Ahn [Thu, 14 Jan 2021 08:32:10 +0000 (17:32 +0900)]
[test/SSAT] Optimize python lazy `pack`

- Call python `pack` only once with list.
- This reduces test time on yocto qemu environment.
REF: https://stackoverflow.com/questions/9940859/fastest-way-to-pack-a-list-of-floats-into-bytes-in-python/9941455

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years agoAdd pc file for capi-ml-common-devel
Jihoon Lee [Wed, 20 Jan 2021 03:39:02 +0000 (12:39 +0900)]
Add pc file for capi-ml-common-devel

pc file was missing for capi-ml-common-devel package.
This patch adds pc file so that capi-ml-common can be included from
`pkg-config`

**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
3 years ago[gRPC/Src/Sink] Revise grpc_src/sink for the updated interface
Dongju Chae [Mon, 21 Dec 2020 10:30:01 +0000 (19:30 +0900)]
[gRPC/Src/Sink] Revise grpc_src/sink for the updated interface

This patch revises gRPC source/sink codes for the updated gRPC
common interface.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[gRPC/Common] Add grpc_config struct and revise gRPC common codes
Dongju Chae [Mon, 21 Dec 2020 10:34:58 +0000 (19:34 +0900)]
[gRPC/Common] Add grpc_config struct and revise gRPC common codes

This patch revises gRPC common codes by adding grpc_config structure.
Also, gRPC blocking mode will be supported soon.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[README] Fix daily build path accepted/tizen/unified/20210122.021827 submit/tizen/20210120.015152
Gichan Jang [Tue, 19 Jan 2021 04:19:56 +0000 (13:19 +0900)]
[README] Fix daily build path

Fix daily build directory path.

.... /nnstreamer/ci/taos/daily-build/ -> .... /nnstreamer/ci/daily-build/

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[C-API] fix double free case
Jaeyun [Thu, 14 Jan 2021 07:43:19 +0000 (16:43 +0900)]
[C-API] fix double free case

If filter sub-plugin allocates output tensor, single-shot notifies releasing output buffer when closing the single handle.
In this case, we dont need to free the output handle itself. Calling single-close and destroy-outdata functions will make an error.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[build/Android] Update android lib build script for PyTorch
Yongjoo Ahn [Tue, 12 Jan 2021 01:04:55 +0000 (10:04 +0900)]
[build/Android] Update android lib build script for PyTorch

- Add PyTorch to build script for android library

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Tests/Meson] Fix wrong option values for 'sed' in meson.build
Wook Song [Fri, 15 Jan 2021 03:25:45 +0000 (12:25 +0900)]
[Tests/Meson] Fix wrong option values for 'sed' in meson.build

This is a trivial patch to fix wrong option values following the '-i'
option of 'sed' in the meson build script. Without this patch, some
useless files such as "unittest_tizen_custom.cc'.cc'" are generated in
the build directory.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Java-API] Fix `StateChangeCallback`
Yongjoo Ahn [Tue, 12 Jan 2021 02:21:45 +0000 (11:21 +0900)]
[Java-API] Fix `StateChangeCallback`

- StateCallback occasionally fails to get initial state changes (null -> ready or ready -> pause)
- Assign `mStateCallback` before `ml_pipeline_construct`

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[C-API] Add note comment for ml_tensors_data_destroy and ml_single_close
Sangjung Woo [Mon, 21 Dec 2020 03:27:19 +0000 (12:27 +0900)]
[C-API] Add note comment for ml_tensors_data_destroy and ml_single_close

This patch adds the note comment for ml_tensors_data_destroy and
ml_single_close APIs.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[C-API] Fix the occasional Segmentation fault in test case.
Sangjung Woo [Fri, 18 Dec 2020 08:09:11 +0000 (17:09 +0900)]
[C-API] Fix the occasional Segmentation fault in test case.

When calling `ml_single_invoke()` after set the timeout option,
`ml_single_close()` should be called before destorying the inference
data. If not, the inference engine might try to access the data, which
is already freed by `ml_tensors_data_destroy()`.

This patch updates the related test cases.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[Dist/gRPC] Create per-IDL grpc packages
Dongju Chae [Fri, 18 Dec 2020 07:07:37 +0000 (16:07 +0900)]
[Dist/gRPC] Create per-IDL grpc packages

This patch creates per-IDL grpc packages to resolve dependency issues.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Test] fix deprecated method
Jaeyun [Wed, 13 Jan 2021 10:08:13 +0000 (19:08 +0900)]
[Test] fix deprecated method

tostring() method was deprecated from python v3.2.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Filter/Python] pycore lib name
Jaeyun [Wed, 13 Jan 2021 09:29:09 +0000 (18:29 +0900)]
[Filter/Python] pycore lib name

fix pycore lib name format (failure on v3.9)

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Android/test] Add test for pytorch in Android
Yongjoo Ahn [Thu, 31 Dec 2020 08:52:25 +0000 (17:52 +0900)]
[Android/test] Add test for pytorch in Android

- Add a image classification test for SingleShot and Pipeline API using
  PyTorch sub-plugin

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Android/PyTorch] Support pytorch subplugin on Android
Yongjoo Ahn [Thu, 31 Dec 2020 08:51:04 +0000 (17:51 +0900)]
[Android/PyTorch] Support pytorch subplugin on Android

- Support pytorch subplugin on Android

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Filter] code clean
Jaeyun [Tue, 22 Dec 2020 07:20:08 +0000 (16:20 +0900)]
[Filter] code clean

code clean, add internal function and reduce duplicated code.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Filter] release mem block in combi case
Jaeyun [Mon, 21 Dec 2020 09:46:25 +0000 (18:46 +0900)]
[Filter] release mem block in combi case

Possible res leak in output combination case, release mem block if output tensor is not in the combination list.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Build/Tizen] dependency to check privilege
Jaeyun [Fri, 8 Jan 2021 04:36:51 +0000 (13:36 +0900)]
[Build/Tizen] dependency to check privilege

set dependency to check privilege in tizen build.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[If] install header
Jaeyun [Thu, 7 Jan 2021 10:15:43 +0000 (19:15 +0900)]
[If] install header

add missed header for tensor-if custom callback.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Meson/TensorRT] Fix bugs in resolving dependencies on nvlibs
Wook Song [Wed, 30 Dec 2020 08:28:29 +0000 (17:28 +0900)]
[Meson/TensorRT] Fix bugs in resolving dependencies on nvlibs

The existing logic to resolve dependencies on nvinfer and nvparsers
have bugs as follows:
1) Even though it is failed to find_library(), the declare_dependency()
   creates a valid dependency object that returns True for .found(). For
   this reason, the feature is enabled with some missing libraries.
2) Checking for required header files, NvUffParser.h and NvInfer.h, has
   been omitted.

This patch fixes the above bugs.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Tests/Rate] Fix -Werror=sign-compare errors accepted/tizen/unified/20210108.125849 submit/tizen/20210108.035247
Wook Song [Mon, 28 Dec 2020 10:56:09 +0000 (19:56 +0900)]
[Tests/Rate] Fix -Werror=sign-compare errors

This is a trivial patch to fix -Werror=sign-compare errors in
unittest_rate.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Filter/PyTorch] Use try-catch block when loading pytorch model
Sangjung Woo [Thu, 31 Dec 2020 06:01:27 +0000 (15:01 +0900)]
[Filter/PyTorch] Use try-catch block when loading pytorch model

If null or invalid paramete is passed when loading the pytorch model,
segmentation fault might occur and it makes runtime error. This patch
fixs this bug.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[Spec] Add pytorch & caffe2 filter package and require options
Sangjung Woo [Thu, 31 Dec 2020 02:01:29 +0000 (11:01 +0900)]
[Spec] Add pytorch & caffe2 filter package and require options

Even though `pytorch_support` is enabled, the pytorch filter is not
built since the necessary option is omitted. This patch newly adds the
pytorch & caffe2 filter packages and the requires option.

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

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[JOIN] Remove unnecessary code and fix minor bugs
gichan-jang [Tue, 5 Jan 2021 05:03:15 +0000 (14:03 +0900)]
[JOIN] Remove unnecessary code and fix minor bugs

Remove unnecessary code and fix minor bugs.(pass NULL param).

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Converter/Sub] sub-plugin name prefix
Jaeyun [Mon, 28 Dec 2020 06:58:51 +0000 (15:58 +0900)]
[Converter/Sub] sub-plugin name prefix

define name prefix of tensor-converter sub-plugins.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Converter] property to print sub-plugin list
Jaeyun [Mon, 28 Dec 2020 06:24:08 +0000 (15:24 +0900)]
[Converter] property to print sub-plugin list

add new property to get the sub-plugins list of tensor-converter.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[CodeClean] element type classification
Jaeyun [Tue, 29 Dec 2020 06:40:06 +0000 (15:40 +0900)]
[CodeClean] element type classification

element name in nnstreamer and general classification of element.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Src/IIO] prevent assertion
Jaeyun [Tue, 29 Dec 2020 07:47:11 +0000 (16:47 +0900)]
[Src/IIO] prevent assertion

prevent assertion, compare no of channles and handle error case.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Filter] change prop name (in/out combi)
Jaeyun [Wed, 23 Dec 2020 07:05:13 +0000 (16:05 +0900)]
[Filter] change prop name (in/out combi)

Change property name for in/out combination and update document.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[If] init property values
Jaeyun [Mon, 28 Dec 2020 09:34:04 +0000 (18:34 +0900)]
[If] init property values

remove unnecessary value and init null to avoid exception case using gst-inspect.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Filter/SNPE] detect dlc file
Jaeyun [Tue, 5 Jan 2021 09:13:27 +0000 (18:13 +0900)]
[Filter/SNPE] detect dlc file

add condition to check .dlc file for auto detection.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Dist/Debian] Revise 'Build-Depends' to support protobuf (>=3.12)
Wook Song [Wed, 23 Dec 2020 09:46:23 +0000 (18:46 +0900)]
[Dist/Debian] Revise 'Build-Depends' to support protobuf (>=3.12)

This patch revises the 'Build-Depends' field to use the protobuf
v3.12.3, which is provided by nnstreamer/ppa. This also fixes build
failure for Focal (and the laters) on the launchpad because of unmet
dependencies related to protobuf-compiler17.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[TEST/SSAT] Print progress log
gichan-jang [Tue, 22 Dec 2020 05:12:04 +0000 (14:12 +0900)]
[TEST/SSAT] Print progress log

Because the SSAT result is printed after the tests are finished, the test results are not printed in deadlock status.
Change to print the progress logs.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
3 years ago[Tools/Parser] Parser Rule #4: chain/openchain with URL
MyungJoo Ham [Mon, 23 Nov 2020 10:33:52 +0000 (19:33 +0900)]
[Tools/Parser] Parser Rule #4: chain/openchain with URL

Replacing GST methods with parser-only logic:
Rule 4 includes:
chain: openchain link PARSE_URL
openchain: PARSE_URL

With Rule 4, uri-element make is created.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[CAPI] Wait until the pipeline state is changed accepted/tizen/unified/20201222.122524 submit/tizen/20201222.073053
Dongju Chae [Wed, 16 Dec 2020 10:05:11 +0000 (19:05 +0900)]
[CAPI] Wait until the pipeline state is changed

This patch fixes a potential danger after ml_pipeline_construct()
is called. As ml_pipeline_construct() does not wait the pipeline
state change, the following APIs such as set_property may affect
the initial pipeline processing with dummy data (even if the pipe
line is not started).

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[C-API] Add tensor_if custom usage example
gichan-jang [Fri, 18 Dec 2020 00:33:55 +0000 (09:33 +0900)]
[C-API] Add tensor_if custom usage example

Add tensor_if custom condition usage example.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
3 years ago[TEST] Add tizen capi test for tensor_if custom
gichan-jang [Thu, 17 Dec 2020 06:03:35 +0000 (15:03 +0900)]
[TEST] Add tizen capi test for tensor_if custom

Add tizen CAPI test for tensor_if custom

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
3 years ago[C-API] If custom condition implementation
gichan-jang [Thu, 17 Dec 2020 04:29:23 +0000 (13:29 +0900)]
[C-API] If custom condition implementation

If the if-condition is complex and cannot be expressed with tensor_if expressions, user can define custom condition.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
3 years ago[Android/doc] Add guide for using model file in scoped storage
Yongjoo Ahn [Mon, 21 Dec 2020 04:04:11 +0000 (13:04 +0900)]
[Android/doc] Add guide for using model file in scoped storage

- Add guide for providing model file to NNS Java API with scoped storage
- Fix guide for tflite nnapi delegate

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[gRPC/Fix] Decoupling gRPC IDL dependencies
Dongju Chae [Tue, 15 Dec 2020 04:25:52 +0000 (13:25 +0900)]
[gRPC/Fix] Decoupling gRPC IDL dependencies

This patch seperates gRPC IDL dependencies (protobuf/flatbuf) using
dlopen(). From now on, gRPC plugin does not have mandatory dependencies
for its IDLs.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Android/Build] remove unnecessary lib for nnapi accepted/tizen/unified/20201221.122653 submit/tizen/20201218.044311
Jaeyun [Thu, 17 Dec 2020 08:20:26 +0000 (17:20 +0900)]
[Android/Build] remove unnecessary lib for nnapi

NNFW internally uses nnapi library, this can break tf-lite nnapi option on android-11.
Remove this when building with NNFW.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[C-API] fix C-API header
Jaeyun [Thu, 17 Dec 2020 10:24:51 +0000 (19:24 +0900)]
[C-API] fix C-API header

Fix API headers with the script in API design guide.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Docs] Remove unnecessary HTML link for feature/privilege.
Sangjung Woo [Thu, 17 Dec 2020 01:51:24 +0000 (10:51 +0900)]
[Docs] Remove unnecessary HTML link for feature/privilege.

This patch removes the unnecessary HTML link for feature/privilege.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[C-API] Define new API for tensor_if
gichan-jang [Fri, 4 Dec 2020 04:08:05 +0000 (13:08 +0900)]
[C-API] Define new API for tensor_if

Define new API for tensor_if custom register/unregister

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
3 years ago[Tests] Use python3 instead of python2
Dongju Chae [Fri, 11 Dec 2020 02:54:18 +0000 (11:54 +0900)]
[Tests] Use python3 instead of python2

This patch makes testscripts using numpy use python3 instead of python2.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Python/Cleanup] Remove tensor_filter python2 sub-plugin
Dongju Chae [Thu, 10 Dec 2020 08:46:21 +0000 (17:46 +0900)]
[Python/Cleanup] Remove tensor_filter python2 sub-plugin

This patch removes tensor_filter python2 sub-plugin.

As Python2 is deprecated, we don't need to keep the codes to support
both versions simultaneously.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Android/Build] fix invalid path
Jaeyun [Wed, 16 Dec 2020 10:17:24 +0000 (19:17 +0900)]
[Android/Build] fix invalid path

Fix invalid path to nnstreamer src directory.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Android/TF-lite] prevent conflict to nnfw
Jaeyun [Wed, 16 Dec 2020 04:19:41 +0000 (13:19 +0900)]
[Android/TF-lite] prevent conflict to nnfw

Hide symbols in tensorflow-lite lib, to prevent conflict / exception case of tensorflow-lite and nnfw (ruy library).

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[C-API] fix invalid parameter direction
gichan-jang [Wed, 16 Dec 2020 03:15:01 +0000 (12:15 +0900)]
[C-API] fix invalid parameter direction

Fix invalid parameter direction of the C-API.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
3 years ago[Android/Build] Add an option to display help messages
Wook Song [Tue, 15 Dec 2020 10:51:17 +0000 (19:51 +0900)]
[Android/Build] Add an option to display help messages

This patch adds a option, '--help', to display how to use the build
script.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Android/TFlite] Support an extra argument for the TFLite version to use
Wook Song [Mon, 14 Dec 2020 09:07:03 +0000 (18:07 +0900)]
[Android/TFlite] Support an extra argument for the TFLite version to use

This patch updates the build script to support an extra argument for the
TensorFlow Lite version to use. The version can be given using the
'--enable-tflite' option as follows: --enable-tflite=yes:1.13.1. Note
that 1.13.1 can be replaced with other valid versions, 1.9.0, 1.15.2,
and 2.3.0.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Tools/Parser] Parser Rule #3: chain, openchain, link, pads, morepads
MyungJoo Ham [Thu, 19 Nov 2020 11:32:29 +0000 (20:32 +0900)]
[Tools/Parser] Parser Rule #3: chain, openchain, link, pads, morepads

Replacing GST methods with parser-only logic:
Rule 3 includes:
- chain
- openchain
- link
- pads
- morepads

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Spec] Disable some components in tizen-6.0 profile
Dongju Chae [Fri, 11 Dec 2020 05:33:05 +0000 (14:33 +0900)]
[Spec] Disable some components in tizen-6.0 profile

This patch disables some components in tizen-6.0 profile.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Android/Build] Clean-up previously downloaded files
Wook Song [Tue, 15 Dec 2020 04:54:44 +0000 (13:54 +0900)]
[Android/Build] Clean-up previously downloaded files

This patch adds a command line for clean-up the previously downloaded
third-party/external software tarballs. Note that this is a workaround
solution to be changed later.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Android/Build] Clean-up generated files after the building is done
Wook Song [Mon, 14 Dec 2020 08:15:17 +0000 (17:15 +0900)]
[Android/Build] Clean-up generated files after the building is done

This patch adds a command to remove 'nnstreamer_version.h' generated
during the build procedure to the Android API build script.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Android/API] Correct inconsistency in indentation rules
Wook Song [Mon, 14 Dec 2020 08:00:04 +0000 (17:00 +0900)]
[Android/API] Correct inconsistency in indentation rules

This patch corrects inconsistency in the indentation rules as follows;
- In .mk, indentation is not allowed unless it is multiple-line values
  assignment to a variable or a command.
- In .sh, 4 spaces of indentation is used.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Android/Decoder] Add the decoder sub-plugin for FlatBuffers to AAR
Wook Song [Wed, 9 Dec 2020 12:06:08 +0000 (21:06 +0900)]
[Android/Decoder] Add the decoder sub-plugin for FlatBuffers to AAR

This patch adds the decoder sub-plugin for FlatBuffers to the Android
library (i.e., AAR).

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Fix/UnitTest] Add mutex to count number of callbacks
Dongju Chae [Fri, 11 Dec 2020 06:17:02 +0000 (15:17 +0900)]
[Fix/UnitTest] Add mutex to count number of callbacks

This patch adds mutex to count number of callbacks.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Spec] Enable nnfw filter on x86 architecture accepted/tizen/unified/20201215.022249 submit/tizen/20201214.093059
Sangjung Woo [Mon, 14 Dec 2020 09:36:56 +0000 (18:36 +0900)]
[Spec] Enable nnfw filter on x86 architecture

Since nnfw works on on x86 architecture for the Tizen emulator, This
patch enables the nnfw filter when building x86 architecture.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[Fix/TFlite] Change tflite soname for grep in few unittests
Dongju Chae [Fri, 11 Dec 2020 06:52:12 +0000 (15:52 +0900)]
[Fix/TFlite] Change tflite soname for grep in few unittests

This patch changes tflite soname for grep in few unitests.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Tools/Parser] Fix Psuero-Element Constructor
MyungJoo Ham [Wed, 9 Dec 2020 05:31:52 +0000 (14:31 +0900)]
[Tools/Parser] Fix Psuero-Element Constructor

It should initialize all elements including glist properties.
Do so by using g_new0 instead of g_malloc.
Fixes #2929 .

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Tools/Parser] Parser Rule #1 and #2 updated
MyungJoo Ham [Wed, 4 Nov 2020 10:17:22 +0000 (19:17 +0900)]
[Tools/Parser] Parser Rule #1 and #2 updated

Replacing gst-factory method with simplified implementation.
Updated grammar and its static function for parsing rule
1. element
2. elementary

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[android/test] Remove unnecessary permission
Yongjoo Ahn [Mon, 14 Dec 2020 08:10:13 +0000 (17:10 +0900)]
[android/test] Remove unnecessary permission

- WRITE_EXTERNAL_STORAGE permission is not necessary for test
- Remove the permission

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Android/NNFW] update ONE version
Jaeyun [Fri, 11 Dec 2020 02:45:10 +0000 (11:45 +0900)]
[Android/NNFW] update ONE version

ONE v1.12.0 now released, update ONE version for next release.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Doc] Update meson build command options
SKO [Thu, 10 Dec 2020 06:48:22 +0000 (15:48 +0900)]
[Doc] Update meson build command options

Update meson build command options

Signed-off-by: Seonkyo Ok <uyw4687@naver.com>
3 years ago[Filter] reduce complexity
Jaeyun [Thu, 10 Dec 2020 04:52:58 +0000 (13:52 +0900)]
[Filter] reduce complexity

Code clean, add internal function for filter properties.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Filter/Sub] sub-plugin priority
Jaeyun [Wed, 9 Dec 2020 10:51:41 +0000 (19:51 +0900)]
[Filter/Sub] sub-plugin priority

Set sub-plugin priority in ini.
(For tensorflow-lite, tf2-lite has high priority if tf2-lite is available.)

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Fix/gRPC] Fix minor typos in gRPC common codes
Dongju Chae [Wed, 9 Dec 2020 06:36:29 +0000 (15:36 +0900)]
[Fix/gRPC] Fix minor typos in gRPC common codes

This patch fixes some minor typos in gRPC common codes.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[gRPC/Tests] Add some testcases for gRPC/flatbuffers
Dongju Chae [Thu, 3 Dec 2020 05:55:38 +0000 (14:55 +0900)]
[gRPC/Tests] Add some testcases for gRPC/flatbuffers

This patch adds some testcases for gRPC/flatbuffers.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[gRPC] Revise existing build/source codes
Dongju Chae [Tue, 1 Dec 2020 06:15:25 +0000 (15:15 +0900)]
[gRPC] Revise existing build/source codes

This patch revises existing build/source codes for gRPC utils refactoring.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[gRPC] Code refactoring for gRPC's flatbuffer support
Dongju Chae [Tue, 1 Dec 2020 06:03:15 +0000 (15:03 +0900)]
[gRPC] Code refactoring for gRPC's flatbuffer support

This patch performs code refactoring for gRPC's flatbuffer support.
The existing gRPC codes can be re-used for flatbuffer as well.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Filter/TF-lite] change so name
Jaeyun [Mon, 30 Nov 2020 08:50:37 +0000 (17:50 +0900)]
[Filter/TF-lite] change so name

change .so name (tensorflow-lite to tensorflow1-lite for tf-lite 1.x version)

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Filter/TF-lite] subplugin name for tf-lite
Jaeyun [Mon, 30 Nov 2020 08:45:51 +0000 (17:45 +0900)]
[Filter/TF-lite] subplugin name for tf-lite

change sub-plugin name for tensorflow-lite.
- Android : tensorflow-lite (only one version available)
- Tizen : tensorflow2-lite / tensorflow1-lite for each tf-lite version

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Filter/CodeClean] function description
Jaeyun [Mon, 30 Nov 2020 08:43:07 +0000 (17:43 +0900)]
[Filter/CodeClean] function description

1. add function description details.
2. add code to free old fw type before setting new string.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[TensorRate/Tests] Add some unittests for tensor_rate
Dongju Chae [Wed, 2 Dec 2020 07:24:12 +0000 (16:24 +0900)]
[TensorRate/Tests] Add some unittests for tensor_rate

This patch adds some unittests for tensor_rate.
It increases the coverage of gsttensorrate.c from 67.7% to 78.3%.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Tools/Parser] Replace GST macros to dummy
MyungJoo Ham [Tue, 14 Jul 2020 10:45:04 +0000 (19:45 +0900)]
[Tools/Parser] Replace GST macros to dummy

We do not need to create GST objects with this parser.
Do not use GST object invoking macros.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Android/Test] stop pipeline when test is done
Jaeyun [Mon, 7 Dec 2020 11:45:51 +0000 (20:45 +0900)]
[Android/Test] stop pipeline when test is done

Add code to stop pipeline when test is done.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Android] fix resource leak
Jaeyun [Mon, 7 Dec 2020 11:38:56 +0000 (20:38 +0900)]
[Android] fix resource leak

Fix test failure case, release thread specific key when closing native handle.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Filter] Update filter manual
gichan-jang [Wed, 2 Dec 2020 01:24:44 +0000 (10:24 +0900)]
[Filter] Update filter manual

Since new features of the filter are added, update the manual.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
3 years ago[Android/TF-lite] method to set tf-lite delegate
Jaeyun [Fri, 4 Dec 2020 10:18:45 +0000 (19:18 +0900)]
[Android/TF-lite] method to set tf-lite delegate

parse custom option string to set tensorflow-lite delegate.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[TEST] Add tensors out case when num_teensors is 1
gichan-jang [Tue, 1 Dec 2020 06:53:50 +0000 (15:53 +0900)]
[TEST] Add tensors out case when num_teensors is 1

Add tensors out test when num_tensors is 1

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
3 years ago[TensorCommon] Add get tensors cap common function
gichan-jang [Wed, 18 Nov 2020 06:58:12 +0000 (15:58 +0900)]
[TensorCommon] Add get tensors cap common function

Add get tensors cap common function.
If the number of tensors is 1, it is to cover the case that only othenr/tensors is supported by peer pad.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
3 years agoRelease of NNStreamer 1.7.1 devel v1.7.1
MyungJoo Ham [Fri, 20 Nov 2020 07:30:39 +0000 (16:30 +0900)]
Release of NNStreamer 1.7.1 devel

This is a developmental (unstable) release of NNStreamer 1.7.1.

1.7.0 -> 1.7.1
        - Major features
                - Tensor-IF, a new element. It allows to create conditional branches based on tensor values.
                - Join, a new element. It merges output sinks from src pads of different elements with the same GST-Cap.
                - Tensor-rate, a new element. It allows throttling by generating QoS messages.
                - TensorRT support
                - TF1-lite and TF2-lite coexistance
                - TFx-lite NNAPI, GPU Delegation

        - Minor features
                - hw-accel options for tensor-filters are refactored
                - python3-embed enabled if python3 >= 3.8
                - Subplugin initialization optimization.
                - Docker scripts for Ubuntu developers.

        - Fixes
                - flatbuf dependency related with tensorflow-lite.
                - tensor-decoder configures framerate.
                - Dynamic dimension related API issues fixed.
                - MacOS, Yocto compatibility issues fixed. (A few Yocto known issues are still remaining.)
                - License mismatches resolved.
                - A few Test cases fixed.
                - Packaging issues fixed and style cleaned-up.

        - Extra
                - A lot of interesting sample applications are added.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[test] Fix ninja test for `join`
Yongjoo Ahn [Wed, 2 Dec 2020 07:34:49 +0000 (16:34 +0900)]
[test] Fix ninja test for `join`

- Add gst_join_plugin path to testenv in meson

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[unittest] Fix some unittest for yocto
Yongjoo Ahn [Thu, 3 Dec 2020 01:12:52 +0000 (10:12 +0900)]
[unittest] Fix some unittest for yocto

- Set src_iio test with channels 3 -> 2
- Skip file permission test if the user is root
- Make division compatible with python3

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Android/TF-lite] feature for tf-lite
Jaeyun [Thu, 3 Dec 2020 03:59:02 +0000 (12:59 +0900)]
[Android/TF-lite] feature for tf-lite

define features in .mk file (GPU / NNAPI delegate and types for tf-lite version)

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Tools/Parser] Update gstparser's types
MyungJoo Ham [Fri, 3 Jul 2020 08:04:21 +0000 (17:04 +0900)]
[Tools/Parser] Update gstparser's types

We do not need to load up actual GObjects for this parser.
Thus, the data structures should be simplied.
Define substitute data types for GST Elements as well.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Test] Fix resource and mem leak accepted/tizen/unified/20201207.123246 submit/tizen/20201207.013927
gichan-jang [Fri, 4 Dec 2020 04:35:38 +0000 (13:35 +0900)]
[Test] Fix resource and mem leak

Fix resource and mem leak

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
3 years ago[Debian] Fix the broken symlink
Sangjung Woo [Thu, 3 Dec 2020 06:41:51 +0000 (15:41 +0900)]
[Debian] Fix the broken symlink

This patch fixes the broken symlink for DEB_HOST_MULTIARCH environment
variable.

$ dpkg-query -L nnstreamer:amd64
...
/usr/lib/$(DEB_HOST_MULTIARCH)
/usr/lib/$(DEB_HOST_MULTIARCH)/libnnstreamer.so

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[Android/Build] remove unnecessary so
Jaeyun [Thu, 3 Dec 2020 06:18:16 +0000 (15:18 +0900)]
[Android/Build] remove unnecessary so

When building Android lib, remove unnecessary file (tf-lite lib) in ONE package.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Fix/gRPC] Fix gRPC unittests to use an unused port for each test
Dongju Chae [Thu, 3 Dec 2020 01:37:41 +0000 (10:37 +0900)]
[Fix/gRPC] Fix gRPC unittests to use an unused port for each test

This patch fixes gRPC unittests to use an unused port for each test.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>