platform/upstream/nnstreamer.git
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>
3 years ago[unittest] Fix signed-unsigned compare and command line option submit/tizen/20201202.082821
Yongjoo Ahn [Wed, 2 Dec 2020 07:06:08 +0000 (16:06 +0900)]
[unittest] Fix signed-unsigned compare and command line option

- Fix signed vs unsigned comapre in unittest_grpc
- Make unittest_sink properly get command line option like `--gst-plugin-path=`

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[android/SNPE] Add test for multi output SNPE
Yongjoo Ahn [Tue, 1 Dec 2020 08:00:37 +0000 (17:00 +0900)]
[android/SNPE] Add test for multi output SNPE

- Add two tcs for testing multi output SNPE model
- One is with custom prop and the other with tensor info

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[filter/SNPE] Support multiple output layers
Yongjoo Ahn [Wed, 23 Sep 2020 08:39:21 +0000 (17:39 +0900)]
[filter/SNPE] Support multiple output layers

- Existing snpe filter only use the final layer of the given model.
- This patch makes the filter support multiple output layers.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
fix

3 years ago[doxygen] Add missing tags
Yongjoo Ahn [Wed, 23 Sep 2020 09:33:53 +0000 (18:33 +0900)]
[doxygen] Add missing tags

- Add missing tags in SNPE sub-plugin

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Test] path to build dir
Jaeyun [Wed, 2 Dec 2020 03:15:51 +0000 (12:15 +0900)]
[Test] path to build dir

set build root (current dir) if env var is not set.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[meson] Add deps declaration for tensorrt, grpc
junmin-kim [Tue, 1 Dec 2020 06:49:31 +0000 (15:49 +0900)]
[meson] Add deps declaration for tensorrt, grpc

command: meson build -Dtensorrt-support=disabled
log: ERROR: Unknown variable "tensorrt_deps".

Without empty dependency declaration, features can not recognize
"tensorrt_deps".
Ditto grpc.

Signed-off-by: junmin-kim <junmindd.kim@samsung.com>
3 years ago[gRPC/Tests] Add some unittests for gRPC source/sink
Dongju Chae [Fri, 27 Nov 2020 03:29:26 +0000 (12:29 +0900)]
[gRPC/Tests] Add some unittests for gRPC source/sink

This patch adds some unittests for gRPC source/sink, including
- basic operations & property
- multi-pieline examples

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Coverage/Fix] Exclude auto-generated files from coverage analysis
Dongju Chae [Tue, 1 Dec 2020 09:54:18 +0000 (18:54 +0900)]
[Coverage/Fix] Exclude auto-generated files from coverage analysis

This patch excludes auto-generated files from coverage analysis.
It's mostly related to protobuf/flatbuf build process.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Filter/tflite] Support GPU Delegate on Tizen submit/tizen/20201201.095355
Sangjung Woo [Tue, 24 Nov 2020 02:32:30 +0000 (11:32 +0900)]
[Filter/tflite] Support GPU Delegate on Tizen

This patch supports the GPU Delegate functionality on Tizen platform.

NNStreamer filter for TFLite2 GPU delegate only supports OpenCL backend
since GLES v3.1 backend has a constraint that Invoke() must be called
from the same EGLContext.

If both tensorflow2_lite_support and tensorflow2_gpu_delegate_support
are set as 1 in nnstreamer.spec, GPU Delegate functionality is enabled.
If tensorflow2_gpu_delegate_support is set but tensorflow2_lite_support
is 0, then tensorflow2_gpu_delegate_support option is ignored.

Since Tensorflow2 GPU delegate is ready,
tensorflow2_gpu_delegate_support is set as 1 in this patch.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[android/build] Patch NDK source to prevent build error
Yongjoo Ahn [Fri, 27 Nov 2020 05:55:07 +0000 (14:55 +0900)]
[android/build] Patch NDK source to prevent build error

- After Android API level 28, the introduced
  `AMediaCodecOnAsyncNotifyCallback` make comile error.
- Make build script to patch this part after
  https://android.googlesource.com/platform/frameworks/av/+/master/media/ndk/include/media/NdkMediaCodec.h#117

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Filter/Sub] preserved name
Jaeyun [Mon, 30 Nov 2020 06:02:12 +0000 (15:02 +0900)]
[Filter/Sub] preserved name

add preserved name 'any' in sub-plugin config.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Tools] GstPipe String Parser
MyungJoo Ham [Fri, 3 Jul 2020 01:05:23 +0000 (10:05 +0900)]
[Tools] GstPipe String Parser

Rather than rewriting lex/yacc code from scratch for python,
modify GST's lex/yacc (flex/bison) C code and call it
from python.

This is the first commit of parser and simply imports
GST-Parser code without touching it.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years agoBuild script clean: nnstreamer-check built by default
MyungJoo Ham [Fri, 20 Nov 2020 07:21:27 +0000 (16:21 +0900)]
Build script clean: nnstreamer-check built by default

The main meson script will not handle utilities
under /tools/development

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[C-Api] define sub-plugin names
Jaeyun [Fri, 27 Nov 2020 11:35:09 +0000 (20:35 +0900)]
[C-Api] define sub-plugin names

Fix typo and add new function to get the nnfw type by subplugin name.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Style] macro block style fix.
MyungJoo Ham [Wed, 28 Oct 2020 07:11:31 +0000 (16:11 +0900)]
[Style] macro block style fix.

Let users add semicolons at the end.
Do not add semicolons at the end of the macro definition.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Style] doxygen error fixed after clang-format fix
MyungJoo Ham [Wed, 28 Oct 2020 06:30:24 +0000 (15:30 +0900)]
[Style] doxygen error fixed after clang-format fix

After clang-format fix, a lot of doxygen errors are discovered.
Fix them all.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Style] Apply clang-format
MyungJoo Ham [Mon, 30 Nov 2020 09:56:48 +0000 (18:56 +0900)]
[Style] Apply clang-format

Apply clang-format with the .clang-format file of nnstreamer
to all *.cc (C++) files

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Style] Update clang-format
MyungJoo Ham [Fri, 20 Nov 2020 06:09:29 +0000 (15:09 +0900)]
[Style] Update clang-format

1. Do not affect doxygen comments
2. Keep gtest include at the top.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Android/ONE] update ONE version
Jaeyun [Wed, 18 Nov 2020 09:38:42 +0000 (18:38 +0900)]
[Android/ONE] update ONE version

Prepare next release, update ONE version to 1.11.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Filter/NNFW] invalid tensor info
Jaeyun [Wed, 25 Nov 2020 06:19:58 +0000 (15:19 +0900)]
[Filter/NNFW] invalid tensor info

1. Fix invalid tensor info ptr when setting new tensor shape.
(Running dummy invoke tries to set old tensor info.)
2. Allocate dummy buffer and init to 0.
3. Handle insufficient output buffer case.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Join] Add testcases for join
gichan-jang [Tue, 17 Nov 2020 06:10:51 +0000 (15:10 +0900)]
[Join] Add testcases for join

Add testcases for join element.
Line coverage: 92.4%

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
3 years ago[gRPC] Implement tensor_source (client) and tensor_sink (server) accepted/tizen/unified/20201130.122954 submit/tizen/20201127.015104
Dongju Chae [Tue, 17 Nov 2020 03:24:57 +0000 (12:24 +0900)]
[gRPC] Implement tensor_source (client) and tensor_sink (server)

This patch implement a reverse pair of gRPC tensor_source/tensor_sink.
(i.e., tensor_source as client and tensor_sink as server)

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Android/Test] remove unnecessary format conversion
Jaeyun [Thu, 26 Nov 2020 09:04:09 +0000 (18:04 +0900)]
[Android/Test] remove unnecessary format conversion

In Android testcase, remove unnecessary format conversion to glimagesink.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Fix/Debian] Fix some typos in debian/control
Dongju Chae [Thu, 26 Nov 2020 07:54:57 +0000 (16:54 +0900)]
[Fix/Debian] Fix some typos in debian/control

This patch fixes some typos in debian/control
- MUlti-Arch --> Multi-Arch

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[TensorRate/Filter] Skip inference when QoS events arrive
Dongju Chae [Mon, 23 Nov 2020 01:29:59 +0000 (10:29 +0900)]
[TensorRate/Filter] Skip inference when QoS events arrive

This patch implements a simple QoS mechanism which skips
inference when QoS events arrive from tensor_rate.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[DIST/RPM] Code Clean .spec for readability and non-Tizen users
MyungJoo Ham [Fri, 20 Nov 2020 02:29:51 +0000 (11:29 +0900)]
[DIST/RPM] Code Clean .spec for readability and non-Tizen users

1. .spec file code cleaned for readability
2. reflect recent changes in usage conditions of a few subplugins
3. allow to use CAPI in other Linux distros.

Addresses #2564

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Android/Doc] Add guide for using NNAPI delegate to README
Yongjoo Ahn [Mon, 23 Nov 2020 05:30:09 +0000 (14:30 +0900)]
[Android/Doc] Add guide for using NNAPI delegate to README

- Add guide for using TensorFlow Lite NNAPI delegate to README.md

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Android/Test] testcases for new methods
Jaeyun [Wed, 18 Nov 2020 09:31:32 +0000 (18:31 +0900)]
[Android/Test] testcases for new methods

Add testcases for methods to set surface and check element availability.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Android/Api] method to check element availability
Jaeyun [Wed, 18 Nov 2020 09:28:37 +0000 (18:28 +0900)]
[Android/Api] method to check element availability

Add new method to check element available on the pipeline.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Build] fix warning (type conversion)
Jaeyun [Fri, 20 Nov 2020 09:29:57 +0000 (18:29 +0900)]
[Build] fix warning (type conversion)

fix warning in android native build (type conversion)

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[SPEC] Add capi-nnstreamer-devel Requires to capi-nnstreamer package accepted/tizen/unified/20201123.123148 submit/tizen/20201120.071152
Sangjung Woo [Fri, 20 Nov 2020 04:58:20 +0000 (13:58 +0900)]
[SPEC] Add capi-nnstreamer-devel Requires to capi-nnstreamer package

Since the rootstrap of Tizen v6.5 is not ready, some application built
on v6.0 needs libcapi-nnstreamer.so file. Because of this reason, this
patch temporarily adds the capi-nnstreamer-devel Requires to
capi-nnstreamer package. It will be removed when the rootstrap of Tizen
v6.5 is ready.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[Android] fix invalid window error
Jaeyun [Thu, 19 Nov 2020 09:33:18 +0000 (18:33 +0900)]
[Android] fix invalid window error

prevent invalid window handle case.
video-sink does not set new window handle directly. If video-sink accesses released window handle, this will crash an application.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Tools/Confchk] Show custom property description for sub-plugins
Dongju Chae [Thu, 15 Oct 2020 08:36:26 +0000 (17:36 +0900)]
[Tools/Confchk] Show custom property description for sub-plugins

This patch adds feature to show custom property description for
registered sub-plugins.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Tools] GstPipe<-->Pbtxt Conversion / Skeleton
MyungJoo Ham [Tue, 30 Jun 2020 10:35:32 +0000 (19:35 +0900)]
[Tools] GstPipe<-->Pbtxt Conversion / Skeleton

Skeleton code for GstPipe<-->Pbtxt Conversion.

Ultimately, we can use web-based WYSIWYG tools based on this! (next year or later)

This commit offers a python script that construct a pipeline object
from a parsed GstPipeline string and generate a pbtxt pipeline from it.

Next step: write a parser of GstPipeline (modify Gstreamer's .y and .l)

Changes in V2:
- Applied change requests from reviewers. (var names, SPDX, )

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[NNFW] print retry count log
Jaeyun [Wed, 18 Nov 2020 08:55:06 +0000 (17:55 +0900)]
[NNFW] print retry count log

For debug, add log retry count in set-dimension function.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[TensorIF] Add custom callback accepted/tizen/unified/20201119.125120 submit/tizen/20201119.061738
gichan-jang [Thu, 22 Oct 2020 06:23:36 +0000 (15:23 +0900)]
[TensorIF] Add custom callback

Add custom callback to support user defined condition

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
3 years ago[TensorIF] Add testcases for custom condition
gichan-jang [Tue, 27 Oct 2020 03:07:43 +0000 (12:07 +0900)]
[TensorIF] Add testcases for custom condition

Add testcases for custom condition

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
3 years ago[JOIN] Support packaging for join element
gichan-jang [Wed, 11 Nov 2020 02:49:28 +0000 (11:49 +0900)]
[JOIN] Support packaging for join element

To provide rpm and debian package of join element.
Package is provied by nnstreamer-extra package.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
3 years ago[JOIN] Add new element join
gichan-jang [Tue, 10 Nov 2020 09:08:21 +0000 (18:08 +0900)]
[JOIN] Add new element join

Add new gstreamer element: join
The join select the out that arrived first among the input streams.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
3 years ago[Android] method to set surface
Jaeyun [Thu, 12 Nov 2020 06:05:26 +0000 (15:05 +0900)]
[Android] method to set surface

Add new method to set a surface to video-sink element.
In Android application, developer can simply set SurfaceHolder object to glimagesink.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Filter/TensorRT] Add unit testcases for TensorRT filter
Sangjung Woo [Mon, 26 Oct 2020 05:33:32 +0000 (14:33 +0900)]
[Filter/TensorRT] Add unit testcases for TensorRT filter

This patch newly adds unit testcases for TensorRT filter.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[Filter/TensorRT] Add a sub-plugin filter for TensorRT
Sangjung Woo [Fri, 23 Oct 2020 06:32:53 +0000 (15:32 +0900)]
[Filter/TensorRT] Add a sub-plugin filter for TensorRT

This patch newly adds an sub-plugin filter for TensorRT to support
Nvidia GPU. It is implemented based on tensor_filter_subplugin class and
catches the DESTROY_NOTIFY event to clean up the used GPU memory.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[C-Api] element availability
Jaeyun [Mon, 16 Nov 2020 11:25:37 +0000 (20:25 +0900)]
[C-Api] element availability

Add new function to check the element availability (registered and not restricted)

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[CodeClean] indent and common function
Jaeyun [Tue, 17 Nov 2020 11:44:41 +0000 (20:44 +0900)]
[CodeClean] indent and common function

Code clean, fix indent and common ptr to handle tensor info struct.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Debian] Modify nnstreamer install files
gichan-jang [Fri, 13 Nov 2020 05:06:57 +0000 (14:06 +0900)]
[Debian] Modify nnstreamer install files

Modify the install file list since grpc and join are newly added to the gst path.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
3 years ago[gRPC/Sink] Implement gRPC tensor sink
Dongju Chae [Wed, 4 Nov 2020 10:36:43 +0000 (19:36 +0900)]
[gRPC/Sink] Implement gRPC tensor sink

This patch implements gRPC tensor sink as a client.
Its gRPC server mode is WIP.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[TensorFilter] Add unit testcases for input and output combination
gichan-jang [Thu, 5 Nov 2020 00:58:44 +0000 (09:58 +0900)]
[TensorFilter] Add unit testcases for input and output combination

Add unit testcases for input and output combination options.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
3 years ago[TensorFilter] Combined Tensor Picking
gichan-jang [Fri, 30 Oct 2020 01:42:13 +0000 (10:42 +0900)]
[TensorFilter] Combined Tensor Picking

Add options for input and output combination.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
3 years ago[Tizen/gRPC] check gRPC capability in nnstreamer.spec
Dongju Chae [Tue, 10 Nov 2020 07:55:59 +0000 (16:55 +0900)]
[Tizen/gRPC] check gRPC capability in nnstreamer.spec

This patch enables gRPC plugin in DA profile.

The below shows gRPC package status in each profile.
- DA: gRPC 1.20.1
- VD: None

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[TensrDemux] Add testcases for tensors out
gichan [Sun, 1 Nov 2020 10:11:25 +0000 (19:11 +0900)]
[TensrDemux] Add testcases for tensors out

Add testcases for tensors out.
Re-use of the tensor and non-sequential combinations are also possible.

Signed-off-by: gichan <gichan2.jang@samsung.com>
3 years ago[TensorDemux] Support other/tensors on src pads
gichan [Sat, 31 Oct 2020 08:22:27 +0000 (17:22 +0900)]
[TensorDemux] Support other/tensors on src pads

Changed to suppot ohter/tensors on src pads.
Related issue: #2844

Signed-off-by: gichan <gichan2.jang@samsung.com>
3 years ago[filter/tflite] Define macro for version check
Yongjoo Ahn [Wed, 11 Nov 2020 02:44:41 +0000 (11:44 +0900)]
[filter/tflite] Define macro for version check

- Add version check macro for delegate support

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Android/tflite] Support gpu delegate
Yongjoo Ahn [Thu, 5 Nov 2020 11:46:03 +0000 (20:46 +0900)]
[Android/tflite] Support gpu delegate

- Support gpu delegate for tflite-2.3.0

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
ffix

3 years ago[Android] Bump up the minimum SDK version
Yongjoo Ahn [Thu, 5 Nov 2020 09:52:16 +0000 (18:52 +0900)]
[Android] Bump up the minimum SDK version

- Tflite gpu delegate requires sdk version higher than 28
- Bump up the minimum sdk version from 24 to 28

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Test/NNFW] fix invalid tc
Jaeyun [Fri, 6 Nov 2020 11:34:53 +0000 (20:34 +0900)]
[Test/NNFW] fix invalid tc

nnfw-1.10 was released and now supports dynamic dimension.
Enable testcases and fix invalid test conditions.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years agoAdd CII Best Practices Badges
MyungJoo Ham [Wed, 11 Nov 2020 06:21:21 +0000 (15:21 +0900)]
Add CII Best Practices Badges

LF-AI/Data recommends to maintain CII Best Practices checks.

This badge shows the status.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>