platform/upstream/nnstreamer.git
5 years ago[Fix/Test] nnapi test cases breaks non-Tizen-arm builds
MyungJoo Ham [Sat, 7 Sep 2019 13:43:11 +0000 (22:43 +0900)]
[Fix/Test] nnapi test cases breaks non-Tizen-arm builds

With SSAT updates, this bug has been exposed:
- New test cases of nnapi-tensorflow-lite require nnapi. However,
there are systems that do not support nnapi.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Api/Tizen] base code to convert element in pipeline
Jaeyun [Tue, 13 Aug 2019 04:28:12 +0000 (13:28 +0900)]
[Api/Tizen] base code to convert element in pipeline

1. Add new file for Tizen dependent code.
2. Add base code to check predefined element name in pipeline description.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Common] string util to replace str
Jaeyun [Tue, 13 Aug 2019 04:23:42 +0000 (13:23 +0900)]
[Common] string util to replace str

Add util function to replace string.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Android] unnecessary log while runng android-lib
Jaeyun [Thu, 5 Sep 2019 10:43:56 +0000 (19:43 +0900)]
[Android] unnecessary log while runng android-lib

1. add condition to check file path or tensor name
2. remove unnecessary res file in android

This will remove unnecessary log-print while running java custom-filter and tf-lite model.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[macOS/Tests/CodeGen] Add extra pkg-config path
Wook Song [Fri, 6 Sep 2019 06:20:43 +0000 (15:20 +0900)]
[macOS/Tests/CodeGen] Add extra pkg-config path

This patch adds extra pkg-config path for macOS to the codegen test
script.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Tests] Use SO_EXT instead of hard-coded 'so'
Wook Song [Thu, 5 Sep 2019 15:48:55 +0000 (00:48 +0900)]
[Tests] Use SO_EXT instead of hard-coded 'so'

This patch replaces the hard-coded filename extension, 'so', in the
custom filter, repo_lstm, repo_rnn, and codegen test scripts with
SO_EXT defined at ssat-api.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[TESTS] add test cases for nnapi properity
jijoong.moon [Thu, 29 Aug 2019 02:36:37 +0000 (11:36 +0900)]
[TESTS] add test cases for nnapi properity

Add test cases for reading nnapi property in tensorflow lite example.

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

Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
5 years ago[single-shot] Added open/close for the new single-shot implementation
Parichay Kapoor [Fri, 30 Aug 2019 15:04:24 +0000 (00:04 +0900)]
[single-shot] Added open/close for the new single-shot implementation

Added open/close for the new single-shot implementation
New single-shot directly uses tensor-filter subplugin to avoid gstreamer overhead
Get input/output info is also added
The API for the new implementation is not changed.

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Dist/RPM] devel required library.
MyungJoo Ham [Thu, 5 Sep 2019 08:15:43 +0000 (17:15 +0900)]
[Dist/RPM] devel required library.

In order to use capi-devel, you need capi.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[API] Fix the errors in package config file
Sangjung Woo [Thu, 5 Sep 2019 08:06:37 +0000 (17:06 +0900)]
[API] Fix the errors in package config file

There are wrong include path and link option in CAPI PC file. This
patch fixes that bug.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years agoRelease of 0.3.0 accepted/tizen/unified/20190906.111929 submit/tizen/20190905.082039 v0.3.0
MyungJoo Ham [Wed, 14 Aug 2019 04:39:13 +0000 (13:39 +0900)]
Release of 0.3.0

Please do SR with this.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Test] Prevent unit-test errors in slow systems
MyungJoo Ham [Wed, 4 Sep 2019 07:21:28 +0000 (16:21 +0900)]
[Test] Prevent unit-test errors in slow systems

In slow systems such as QEMU-ARM, a few test cases fail often.

- Add dynamic timeout for pipeline start
- Add mutex for sink callbacks

Changes in v2:
- Loop of wait_for_start runs if it's READY || PAUSED
- Wait 50us right after start() before state-checking.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Android] update script to remove warning accepted/tizen/unified/20190905.060558 submit/tizen/20190905.013539
Jaeyun [Tue, 3 Sep 2019 07:08:12 +0000 (16:08 +0900)]
[Android] update script to remove warning

Clean up build script and remove warning about duplicates.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[filter_single] Common functions between tensor_filter and tensor_filter_single
Parichay Kapoor [Fri, 30 Aug 2019 15:04:24 +0000 (00:04 +0900)]
[filter_single] Common functions between tensor_filter and tensor_filter_single

Simplified common functions between tensor_filter and tensor_filter_single
Added more implementations in tensor_filter_single

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[filter_single] Added tensor_filter_single prototype
Parichay Kapoor [Thu, 29 Aug 2019 10:51:50 +0000 (19:51 +0900)]
[filter_single] Added tensor_filter_single prototype

Added prototype for tensor_filter_single
tensor_filter_single is going to form the backend for singleshot api
to minimize the latency. This is made to be independent of GStreamer,
supporting all the existing tensor_filter plugins

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Filter/Transform] code clean
Jaeyun [Tue, 3 Sep 2019 12:47:33 +0000 (21:47 +0900)]
[Filter/Transform] code clean

1. remove unnecessary code to get output size in tensor-filter.
2. set null to find operator in tensor-transform.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api/Single] invalid condition to check model
Jaeyun [Tue, 3 Sep 2019 10:19:02 +0000 (19:19 +0900)]
[Api/Single] invalid condition to check model

1. validate model path before checking the file extension.
2. set pre-defined so extension for custom-filter.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[TF-Lite] Add terminating null
MyungJoo Ham [Tue, 3 Sep 2019 05:37:16 +0000 (14:37 +0900)]
[TF-Lite] Add terminating null

The string list requires a terminating null.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[TESTHUB] Append 'gtest_output' for reporting unittest results to TESTHUB.
Dongju Chae [Mon, 2 Sep 2019 06:48:33 +0000 (15:48 +0900)]
[TESTHUB] Append 'gtest_output' for reporting unittest results to TESTHUB.

This commit appends 'gtest_output' into .spec file to generate .xml gtest output files.
These xml files are reported to TESTHUB (for daily x86_64 build).

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Filter] Fix svace issue
Sangjung Woo [Mon, 2 Sep 2019 06:21:42 +0000 (15:21 +0900)]
[Filter] Fix svace issue

If the parameter hw of constructor is NNAPI_UNKNOWN, the member variable
accel is not initialized. This patch fixes that bug.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Doc] fix invalid extension
Jaeyun [Fri, 30 Aug 2019 07:09:06 +0000 (16:09 +0900)]
[Doc] fix invalid extension

fix invalid file extension in transform header

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Build] update build script
Jaeyun [Thu, 29 Aug 2019 06:56:29 +0000 (15:56 +0900)]
[Build] update build script

Fix duplicated and unnecessary code with the updation of nnstreamer features.
1. remove src-iio in android-jni (currently excluded to register the element, so unnecessary.)
2. remove option enable-nnfw in .spec (default false)
3. duplicated feature definition for tizen

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api/Single] set timeout
Jaeyun [Fri, 2 Aug 2019 10:57:25 +0000 (19:57 +0900)]
[Api/Single] set timeout

Add new function to set the timeout to wait for the output.
The function try_pull is supported from gst 1.10, check gst version and return error code if is not supported.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api/Tizen] function to get data size
Jaeyun [Fri, 2 Aug 2019 07:24:44 +0000 (16:24 +0900)]
[Api/Tizen] function to get data size

Current function returns total byte size of info handle.
Change this to get the byte size with data index.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Tizen/API] Fix the wrong boilerplate text
Sangjung Woo [Thu, 29 Aug 2019 11:22:27 +0000 (20:22 +0900)]
[Tizen/API] Fix the wrong boilerplate text

This patch fixes the wrong boilerplate text. (Apache -> LGPL-2.1)

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Filter/Decoder] sub-plugins extension
Jaeyun [Thu, 29 Aug 2019 07:07:58 +0000 (16:07 +0900)]
[Filter/Decoder] sub-plugins extension

Check sub-plugins file extension after supporting mac.

Wook defined the file extension for build target. With this, set sub-plugins name in filter/decoder.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[FILTER] add nnapi property to handle
jijoong.moon [Wed, 14 Aug 2019 06:24:55 +0000 (15:24 +0900)]
[FILTER] add nnapi property to handle

Add nnapi property in the tensor_filter element.
Use nnapi=(true|false)(:(cpu|gpu|npu)) option for tensor_filter
element. For example,

gst-launch-1.0 --gst-plugin-path=${PATH_TO_PLUGIN} filesrc
location=${PATH_TO_IMAGE} ! pngdec ! videoscale ! imagefreeze !
videoconvert ! video/x-raw,format=RGB,framerate=0/1 ! tensor_converter
! tensor_filter framework=tensorflow-lite model=${PATH_TO_MODEL} nnapi=true:gpu ! filesink location=tensorfilter.out.log

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

Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
5 years ago[filter plugins] Remove dependency on gst headers
Parichay Kapoor [Wed, 28 Aug 2019 08:02:22 +0000 (17:02 +0900)]
[filter plugins] Remove dependency on gst headers

Remove dependency of tensor_filter plugins and tensor_subplugin on gst headers

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Tests/Common] Use macro as file extension of shared object
Wook Song [Wed, 28 Aug 2019 04:20:13 +0000 (13:20 +0900)]
[Tests/Common] Use macro as file extension of shared object

This patch replaces '.so' with a macro that is defined as file
externsion of shared object according to the platform.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[macOS/Conf] Support .dylib as a file extension of sub-plugins
Wook Song [Tue, 27 Aug 2019 03:52:16 +0000 (12:52 +0900)]
[macOS/Conf] Support .dylib as a file extension of sub-plugins

This patch adds .dylib as a file extension of sub-plugins to support.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[macOS/Tests] Let unit test cases for tensor_sink work on macOS
Wook Song [Tue, 27 Aug 2019 02:18:10 +0000 (11:18 +0900)]
[macOS/Tests] Let unit test cases for tensor_sink work on macOS

This patch updates unit test cases for tensor_sink to make them work on
macOS.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[macOS/Meson/IIO] Exclude tensor source plugin for Linux IIO
Wook Song [Mon, 26 Aug 2019 07:27:38 +0000 (16:27 +0900)]
[macOS/Meson/IIO] Exclude tensor source plugin for Linux IIO

Linux IIO is not compatible with macOS so that this patch excludes
tensor source plugin for Linux IIO from build tree.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Meson] Support macOS
Wook Song [Mon, 26 Aug 2019 02:29:28 +0000 (11:29 +0900)]
[Meson] Support macOS

In order to support macOS, this patch updates the meson build script in
the source root directory to pass macro definition, '__MACOS__', to the
compiler.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[nnfw] Adding nnfw support with nnapi
jijoong.moon [Mon, 12 Aug 2019 23:45:52 +0000 (08:45 +0900)]
[nnfw] Adding nnfw support with nnapi

Support nnfw. If enable-nnfw is on, it will use nnfw.

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

Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
5 years ago[Api/Android] add option for tf-lite version
Jaeyun [Thu, 22 Aug 2019 12:43:21 +0000 (21:43 +0900)]
[Api/Android] add option for tf-lite version

update script to set tensorflow-lite version (1.9 and 1.13 available)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api/Android] add target abi
Jaeyun [Thu, 22 Aug 2019 08:20:02 +0000 (17:20 +0900)]
[Api/Android] add target abi

Update build script to set target abi.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api] code clean
Jaeyun [Thu, 22 Aug 2019 03:47:34 +0000 (12:47 +0900)]
[Api] code clean

1. add struct for state change callback
2. check element pointer before free the resources

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api/Pipeline] remove unnecessary function
Jaeyun [Thu, 22 Aug 2019 03:28:09 +0000 (12:28 +0900)]
[Api/Pipeline] remove unnecessary function

Remove unnecessaty code to set buffer-free function.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Android/Api] add script to build api library
Jaeyun [Wed, 31 Jul 2019 10:19:36 +0000 (19:19 +0900)]
[Android/Api] add script to build api library

Add script to build android-api library.
If runs this script, ext-files are downloaded and run gradle build.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api/Pipeline] element restriction
Jaeyun [Thu, 8 Aug 2019 11:57:45 +0000 (20:57 +0900)]
[Api/Pipeline] element restriction

Handles element restriction (whitelist for API release)

If needs restriction in pipeline elements, simply set the list in meson option.

e.g. meson -Denable-capi=true -Denable-element-restriction=true -Drestricted-elements='videotestsrc videoconvert' build
this allows videotestsrc and videoconvert with nnstreamer elements.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api/Pipeline] set state paused while constructing the pipeline
Jaeyun [Wed, 7 Aug 2019 09:41:42 +0000 (18:41 +0900)]
[Api/Pipeline] set state paused while constructing the pipeline

when called construct(), set the pipeline state paused.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api/Tizen] base code to check plugin name
Jaeyun [Fri, 2 Aug 2019 04:40:32 +0000 (13:40 +0900)]
[Api/Tizen] base code to check plugin name

prepare code to validate the plugins in pipeline.

TODO: update code to initialize white-list for tizen

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Test/bmp2png] Use g_strdup to avoid gcc9 strict checks
MyungJoo Ham [Wed, 14 Aug 2019 14:46:23 +0000 (23:46 +0900)]
[Test/bmp2png] Use g_strdup to avoid gcc9 strict checks

strncpy is required not to use strlen for the length.
Use g_strdup and let glib handle it.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Spec] Fix the bug of post uninstall script.
Sangjung Woo [Tue, 6 Aug 2019 04:12:49 +0000 (13:12 +0900)]
[Spec] Fix the bug of post uninstall script.

Post uninstall script with `-p` option invokes a single program directly
instead of spawning shell script. Because of this reason, below error
occurs when uninstalling package. This patch fixes that bug.

/sbin/ldconfig: relative path `1' used to build cache
warning: %postun(nnstreamer-0.2.1-6.4.i686) scriptlet failed, exit
status 1

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[gcc9-fix] fix strncpy '__builtin_strncpy' issue
MyungJoo Ham [Wed, 14 Aug 2019 11:35:59 +0000 (20:35 +0900)]
[gcc9-fix] fix strncpy '__builtin_strncpy' issue

This fixes:

FAILED: tests/59830eb@@bmp2png@exe/bmp2png.c.o
cc -Itests/59830eb@@bmp2png@exe -Itests -I../tests -I/usr/include/libpng16 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Werror -std=gnu89 '-DVERSION="0.2.1"' -Wredundant-decls -Wwrite-strings -Wformat -Wformat-nonliteral -Wformat-security -Winit-self -Waddress -Wno-multichar -Wvla -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Waggregate-return -Wold-style-definition -Wdeclaration-after-statement '-DNNSTREAMER_CONF_FILE="/etc/nnstreamer.ini"' -DHAVE_ORC=1 -DENABLE_TENSORFLOW_LITE=1 -DENABLE_PYTORCH=1 -DENABLE_CAFFE2=1 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -MD -MQ 'tests/59830eb@@bmp2png@exe/bmp2png.c.o' -MF 'tests/59830eb@@bmp2png@exe/bmp2png.c.o.d' -o 'tests/59830eb@@bmp2png@exe/bmp2png.c.o' -c ../tests/bmp2png.c
In file included from /usr/include/string.h:494,
                 from ../tests/bmp2png.c:36:
In function â€˜strncpy’,
    inlined from â€˜main’ at ../tests/bmp2png.c:291:3:
/usr/include/aarch64-linux-gnu/bits/string_fortified.h:106:10: error: â€˜__builtin_strncpy’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../tests/bmp2png.c: In function â€˜main’:
../tests/bmp2png.c:291:34: note: length computed here
  291 |   strncpy (pngfilename, argv[1], strlen (argv[1]) + 1);
      |                                  ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

This is Case 3 of #1598

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Debian/Unittest] Disable capi-unittest in arm/launchpad.
MyungJoo Ham [Wed, 14 Aug 2019 12:03:42 +0000 (21:03 +0900)]
[Debian/Unittest] Disable capi-unittest in arm/launchpad.

It takes too much time in the launchpad arm emulator.
Disable it to pass unittest-capi.

This resolves another case of #1598

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Debian] Remove tensorflow-dev build-dep for arm64
MyungJoo Ham [Wed, 14 Aug 2019 00:45:13 +0000 (09:45 +0900)]
[Debian] Remove tensorflow-dev build-dep for arm64

We are removing tensorflow-arm64 from our PPA.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Debian] Use Tensorflow only if it's amd64
MyungJoo Ham [Tue, 13 Aug 2019 10:08:23 +0000 (19:08 +0900)]
[Debian] Use Tensorflow only if it's amd64

If it's ARM, don't use tensorflow.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Android/Api] method to get data size
Jaeyun [Mon, 5 Aug 2019 05:28:49 +0000 (14:28 +0900)]
[Android/Api] method to get data size

add method to calculate byte size of tensor data.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api/Single] invalid output if error occurs
Jaeyun [Fri, 2 Aug 2019 10:46:54 +0000 (19:46 +0900)]
[Api/Single] invalid output if error occurs

1. allocate output buffer after invoke is done.
2. allow one buffer in appsink and drop old buffer.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Test] mark negative testcase
Jaeyun [Tue, 6 Aug 2019 02:35:19 +0000 (11:35 +0900)]
[Test] mark negative testcase

1. Add postfix in tc name for the negative testcases.
2. Update comment for future work.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Build] set python encode for meson
Jaeyun [Mon, 12 Aug 2019 07:06:37 +0000 (16:06 +0900)]
[Build] set python encode for meson

set python-encode utf-8 for meson build.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Filter/Py] remove global val to register subplugin
Jaeyun [Fri, 9 Aug 2019 07:19:13 +0000 (16:19 +0900)]
[Filter/Py] remove global val to register subplugin

SAM result, remove global val about filter-framework.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Debian/armhf] Add build dependency on protobuf accepted/tizen/unified/20190812.235554 submit/tizen/20190812.023633
Wook Song [Fri, 9 Aug 2019 04:43:35 +0000 (13:43 +0900)]
[Debian/armhf] Add build dependency on protobuf

Caffe2-related features, which are enabled by default, require
libprotobuf-dev at build time. This build dependency is omitted only for
armhf architecture among those we support. This patch resolves this
issue.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Meson] Apply work-around for gtest-related failure on meson 0.50.1
Wook Song [Wed, 7 Aug 2019 05:32:55 +0000 (14:32 +0900)]
[Meson] Apply work-around for gtest-related failure on meson 0.50.1

In the case that gtest has been installed via apt (i.e., apt install
libgtest-dev), meson provides the -I options indicating the directory
that does not exist. Therefore, it is failed to build when
'-Wmissing-include-dirs' is set. This patch works around this issue.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Meson] option to disable orc
Jaeyun [Thu, 8 Aug 2019 05:58:25 +0000 (14:58 +0900)]
[Meson] option to disable orc

Add meson-option to disable orc library (default true).
Set -Denable-orc=false if you need to block the orc library.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[PythonFilter] Fix svace errors in python filter
Dongju Chae [Thu, 8 Aug 2019 08:06:23 +0000 (17:06 +0900)]
[PythonFilter] Fix svace errors in python filter

This commit fixes svace errors.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Readme] Update release status
MyungJoo Ham [Thu, 8 Aug 2019 02:04:52 +0000 (11:04 +0900)]
[Readme] Update release status

We now fully ready for Android & Yocto.
Update the release status

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Meson] remove missed option
Jaeyun [Wed, 7 Aug 2019 05:32:55 +0000 (14:32 +0900)]
[Meson] remove missed option

remove missed option about tensorflow mem-optimize in meson.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[C-API] Add sample code for ml_pipeline_switch_get_pad_list()
Sangjung Woo [Wed, 7 Aug 2019 05:38:29 +0000 (14:38 +0900)]
[C-API] Add sample code for ml_pipeline_switch_get_pad_list()

This patch newly adds the sample code for ml_pipeline_switch_get_pad_list()
function since it looks hard to use. Moremover, it updates the remarks
section for finalizing its allocated memory space.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[C-API] Describe pre & post state of the pipeline
Sangjung Woo [Wed, 7 Aug 2019 04:40:00 +0000 (13:40 +0900)]
[C-API] Describe pre & post state of the pipeline

This patch newly add the pre & post state of the pipeline in C-API.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[C-API] Describe the pipeline state as image
Sangjung Woo [Wed, 7 Aug 2019 02:10:51 +0000 (11:10 +0900)]
[C-API] Describe the pipeline state as image

This patch describes the the pipeline state as image instead of ASCII
text art.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[C-API] apply the review guide of C-API
Sangjung Woo [Tue, 6 Aug 2019 11:28:51 +0000 (20:28 +0900)]
[C-API] apply the review guide of C-API

* Fix the typo (targetting -> targeting)
* Use detailed comments (pipe is NULL? -> Not negotiated?)
* Use detailed URL (github.com/nnsuite/nnstreamer -> https://github.com/nnsuite/nnstreamer)
* Add '*' into omitted comment line

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[C-API] Add PERMISSION_DENIED state for privilege issue
Sangjung Woo [Tue, 6 Aug 2019 11:06:26 +0000 (20:06 +0900)]
[C-API] Add PERMISSION_DENIED state for privilege issue

This patch newly adds the ML_ERROR_PERMISSION_DENIED error code for
privilege issue and its checking logic in ml_get_feature_enabled()
function.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Tests] Apply bash script formatter to all runTest.sh files
Wook Song [Tue, 6 Aug 2019 14:40:38 +0000 (23:40 +0900)]
[Tests] Apply bash script formatter to all runTest.sh files

In order to improve readability, this patch applies a bash shell script
formatter named 'shfmt' [1] to all runTest.sh files in the ./tests
directory. Note that 4 spaces are used for indentation instead of using
'tab'.

[1] https://github.com/mvdan/sh

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Test] stream test for custom-filter without model
Jaeyun [Tue, 30 Jul 2019 04:02:22 +0000 (13:02 +0900)]
[Test] stream test for custom-filter without model

Add simple stream testcase for custom-filter without model file.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Common] function declaration
Jaeyun [Tue, 30 Jul 2019 03:56:57 +0000 (12:56 +0900)]
[Common] function declaration

fix link error about plugin api in cpp file.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api] common headers in nnstreamer
Jaeyun [Tue, 6 Aug 2019 07:53:18 +0000 (16:53 +0900)]
[Api] common headers in nnstreamer

change nnstreamer headers include to prepare gradle build.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Filter/Tensorflow] remove the unused option for memory optimization
Hyoung Joo Ahn [Wed, 7 Aug 2019 02:07:32 +0000 (11:07 +0900)]
[Filter/Tensorflow] remove the unused option for memory optimization

after changing tensorflow to use `c-api`, the `mem_optmz` is not used anymore

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
5 years ago[Typo] fix typo at README.md
Hyoung Joo Ahn [Wed, 7 Aug 2019 02:17:18 +0000 (11:17 +0900)]
[Typo] fix typo at README.md

fix a typo of README file: technolog -> technology

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
5 years ago[Build] fix build warning
Jaeyun [Mon, 5 Aug 2019 04:00:34 +0000 (13:00 +0900)]
[Build] fix build warning

Add function declaration and fix enum conversion.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api] update api description
Jaeyun [Fri, 2 Aug 2019 10:19:23 +0000 (19:19 +0900)]
[Api] update api description

Fix typo and update details about the APIs.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api] check null param
Jaeyun [Fri, 2 Aug 2019 07:16:59 +0000 (16:16 +0900)]
[Api] check null param

In the functions for tensor data, add code to check null param.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Tizen/C-API] Increate single-invoke timeout
MyungJoo Ham [Fri, 2 Aug 2019 06:39:54 +0000 (15:39 +0900)]
[Tizen/C-API] Increate single-invoke timeout

Timeout of 1 sec is too short even for unit-test cases
in QEMU-ARM. Increase it to 3 sec.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[UnitTest/TizenCAPI] Support in-emulator unit test
MyungJoo Ham [Fri, 2 Aug 2019 04:49:43 +0000 (13:49 +0900)]
[UnitTest/TizenCAPI] Support in-emulator unit test

In QEMU, things are not that fast. Slow it down!

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Tizen/Feature] invalid condition to check feature status
Jaeyun [Thu, 1 Aug 2019 12:10:47 +0000 (21:10 +0900)]
[Tizen/Feature] invalid condition to check feature status

1. Fix invalid condition when mutex-lock of element handle locked.
2. Add new struct to set mutex locked.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[C-API] Update the return value of each API
Sangjung Woo [Fri, 26 Jul 2019 07:00:49 +0000 (16:00 +0900)]
[C-API] Update the return value of each API

This patch updates the return value of each API by adding
'ML_ERROR_NOT_SUPPORTED' if the device is not supported
'machine_learning.inference'. Moreover, this updates nnstreamer_doc.h
file for doxygen.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[C-Api] Check feature before processing API
Sangjung Woo [Fri, 26 Jul 2019 05:00:54 +0000 (14:00 +0900)]
[C-Api] Check feature before processing API

This patch checks the machine_learning.inference feature before
processing API by calling ml_get_feature_enabled() function. In case of
Unit test, feature checking could be skipped by calling internal API,
ml_set_feature_status().

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

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Android/Api] add custom-filter callback
Jaeyun [Mon, 29 Jul 2019 04:00:01 +0000 (13:00 +0900)]
[Android/Api] add custom-filter callback

1. Add custom-filter in java to execute tensors data in the application.
2. Update sample code to set the custom-filter.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Android/Api] invalid data conversion
Jaeyun [Fri, 26 Jul 2019 11:14:29 +0000 (20:14 +0900)]
[Android/Api] invalid data conversion

1. Fix wrong conversion of byte buffer in native.
2. Add methods to allocate buffer with native byte order.
3. Fix invalid condition to close handle.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Android/Api] refactor code
Jaeyun [Thu, 25 Jul 2019 06:58:21 +0000 (15:58 +0900)]
[Android/Api] refactor code

1. separate native code to each java class.
2. add common functions and definitions.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Filter/TF] apply c_api at tensor_filter_tensorflow
Hyoung Joo Ahn [Wed, 24 Jul 2019 08:25:59 +0000 (17:25 +0900)]
[Filter/TF] apply c_api at tensor_filter_tensorflow

change the codes of tensorflow filter to use c_api only

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
5 years ago[Tests/Filter/Tensorflow] bugfix: Fix a typo and wrong if-logic
Wook Song [Fri, 26 Jul 2019 06:44:08 +0000 (15:44 +0900)]
[Tests/Filter/Tensorflow] bugfix: Fix a typo and wrong if-logic

This patch fixes a critical typo and wrong if-logic in order to make the
test cases properly run when the '/etc/nnstreamer.ini' is used.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Tests/Filter/PyTorch] bugfix: Fix a typo and wrong if-logic
Wook Song [Fri, 26 Jul 2019 04:49:11 +0000 (13:49 +0900)]
[Tests/Filter/PyTorch] bugfix: Fix a typo and wrong if-logic

In order to make the test cases properly run when the
'/etc/nnstreamer.ini' is used, this patch fixes a critical typo and
wrong if-logic for such cases.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Tests/Filter/Caffer2] bugfix: Rewrite wrong if-logic
Wook Song [Fri, 26 Jul 2019 04:24:12 +0000 (13:24 +0900)]
[Tests/Filter/Caffer2] bugfix: Rewrite wrong if-logic

Since it is wrong that the if-logic for the test cases using
'/etc/streamer.ini', the tests are always terminated before even
started. This patch fixes this bug.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Tests/Filter/Caffe2] bugfix: Fix a typo
Wook Song [Fri, 26 Jul 2019 04:17:10 +0000 (13:17 +0900)]
[Tests/Filter/Caffe2] bugfix: Fix a typo

This patch fixes a critical typo in the runTest script. In order to run
test cases using '/etc/nnstreamer.ini', 'ini_path' should be replaced
with 'ini_file'.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Filter] condition to check model
Jaeyun [Thu, 25 Jul 2019 07:14:17 +0000 (16:14 +0900)]
[Filter] condition to check model

Prevent error case if filter framework does not need a model file.
Add a flag in nnfw struct and change condition to check model in transform callback.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Test] free string
Jaeyun [Thu, 25 Jul 2019 07:11:33 +0000 (16:11 +0900)]
[Test] free string

free strings after getting the pad list in testcase.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Conf] Handle the case of using the default 'sysconfdir' value of meson
Wook Song [Fri, 24 May 2019 04:45:53 +0000 (13:45 +0900)]
[Conf] Handle the case of using the default 'sysconfdir' value of meson

Since the default value of 'sysconfdir' in the Meson build system is
just 'etc' instead of '/etc', NNSTREAMER_CONF_FILE could be set to wrong
path when the default value is used. This patch fixes this issue.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Tests/CustomFilter] Fix a bug in code for checking existence of OpenCV
Wook Song [Thu, 25 Jul 2019 02:45:48 +0000 (11:45 +0900)]
[Tests/CustomFilter] Fix a bug in code for checking existence of OpenCV

This patch fixes a minor bug in the code for checking existence of
OpenCV libraries.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Android/Sample] add sample code to use library
Jaeyun [Fri, 19 Jul 2019 09:22:26 +0000 (18:22 +0900)]
[Android/Sample] add sample code to use library

Add sample code to use nnstreamer library.
This sample includes basic example to run the single-shot and pipeline examples repeatedly.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Android/Api] api base
Jaeyun [Wed, 10 Jul 2019 11:31:14 +0000 (20:31 +0900)]
[Android/Api] api base

Update files for android-java api.

- initial commit to add android java api set.
- single-shot / pipeline functions.
- data callback from sink node in pipeline api.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Decoder/Sub] build static lib
Jaeyun [Fri, 19 Jul 2019 06:42:50 +0000 (15:42 +0900)]
[Decoder/Sub] build static lib

change font file in decoder-subplugins to build static library.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[ANDROID] Built as Shared Library with tensorflow-lite
jijoong.moon [Fri, 14 Jun 2019 04:23:35 +0000 (13:23 +0900)]
[ANDROID] Built as Shared Library with tensorflow-lite

In order to build nnstreamer shared libraries including
sub-plugins (decoder, filters), the android.mk file is
restructured. Becuse gstreamer building blocks list for nnstreamer might be
required for static build and android application build, it is moved
to nnstreamer.mk.

If you bulid libnnstreamer.so using this android.mk, gstreamer shared
libries should be prepared. Please refere "Build Gstreamer full source
based Android rootFS with Cerbero" in
https://github.com/nnsuite/nnstreamer-example/tree/master/android.

Once the build is finished successfully, you can find libnnstreamer.so
and gstreamer shared libraries in libs/$TARGET_ARCH/ which is listed
in nnstreamer.mk under the name of "NNSTREAMER_BUILDING_BLOCK_LIST".
you can use these to build your own android application.

New script for tensorflow-lite tensor filter library is added. If
there is not tflite source, "prepare_tflite.sh" will download and
prepare the external packages of tflite. Using these source code,
android.mk make tflite static library and use it to build
libnnstreamer_filter_tensorflow-lite.so (which includes static
tensorflowlite.a for android of course)

If you want to build android application statically, you could just use the
macro defined in nnstreamer.mk.

Build NNStreamer as Shared Library.
- Gstreamer Shared Libraries : Cerbero
  : Download and build by yourself
- Tensorflow-lite : If TENSORFLOW_LITE Macro is not defined,
  NNStreamer is going to download and configure
  --> static lib
- NNStreamer : libnnstreamer.so
- NNStreamer tflite : libnnstreamer_filter_tensorflow-lite.so
- NNStreamer decoder: libnnstreamer_decoder_direct_video.so
                      libnnstreamer_decoder_bounding_boxes.so
                      libnnstreamer_decoder_image_labeling.so

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

Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
5 years ago[Sink] remove unnecessary functions
Jaeyun [Mon, 22 Jul 2019 09:38:26 +0000 (18:38 +0900)]
[Sink] remove unnecessary functions

use basesink default and remove unnecessary functions.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[C-API] check gstreamer initialization status in ml_single_open() accepted/tizen/unified/20190723.112130 submit/tizen/20190722.095424
Sangjung Woo [Fri, 19 Jul 2019 09:45:14 +0000 (18:45 +0900)]
[C-API] check gstreamer initialization status in ml_single_open()

Before calling gstreamer function, this patch checks its initialization
status by calling gst_init_check() in ml_single_open().

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Tests/Filter/TFLite] bugfix: Fix wrong if-logic
Wook Song [Mon, 22 Jul 2019 05:48:59 +0000 (14:48 +0900)]
[Tests/Filter/TFLite] bugfix: Fix wrong if-logic

This patch fixes wrong if-logic that results in termination of the test
without running the gstTest code when /etc/streamer.ini is used.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Tests/Filter/TFLite] bugfix: Correct a critical typo
Wook Song [Mon, 22 Jul 2019 05:37:41 +0000 (14:37 +0900)]
[Tests/Filter/TFLite] bugfix: Correct a critical typo

This patch corrects a critical typo by replacing 'ini_path' with
'ini_file'. Note that the 'ini_file' variable is required to run the
test case when '/etc/nnstreamer.ini' is used.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Tests/Decoder/ImageLabeling] bugfix: Fix wrong if-logic
Wook Song [Mon, 22 Jul 2019 05:12:10 +0000 (14:12 +0900)]
[Tests/Decoder/ImageLabeling] bugfix: Fix wrong if-logic

This patch fixes wrong if-logic that leads to always skipping the
gstTest code line when /etc/streamer.ini is used.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Tests/Decoder/ImageLabeling] bugfix: Correct critical typo
Wook Song [Mon, 22 Jul 2019 02:26:25 +0000 (11:26 +0900)]
[Tests/Decoder/ImageLabeling] bugfix: Correct critical typo

When the unit tests for image labeling decoder is run using
/etc/nnstreamer.ini, it would be stuck because of a critical typo in
the variable indicating /etc/nnstreamer. This patch fixes this issue.

Signed-off-by: Wook Song <wook16.song@samsung.com>