platform/upstream/nnstreamer.git
5 years ago[Api/Tizen] Tizen internal API to construct pipeline accepted/tizen/unified/20191008.101521 submit/tizen/20191008.053234
Jaeyun [Wed, 2 Oct 2019 08:06:49 +0000 (17:06 +0900)]
[Api/Tizen] Tizen internal API to construct pipeline

Add Tizen internal API without checking the permission.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[single] Minor updates for modularity
Parichay Kapoor [Mon, 7 Oct 2019 04:27:19 +0000 (13:27 +0900)]
[single] Minor updates for modularity

Added minor updates in C-API single shot implementation for improved modularity

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Android/Test] add tc to check max local ref
Jaeyun [Mon, 7 Oct 2019 04:16:06 +0000 (13:16 +0900)]
[Android/Test] add tc to check max local ref

Add aging test to check local ref table overflow.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Filter/Sub] already loaded case
Jaeyun [Mon, 7 Oct 2019 03:47:26 +0000 (12:47 +0900)]
[Filter/Sub] already loaded case

Check returned value when the nn model file is already loaded.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Tizen/Api] fix invalid params to parse mm info submit/tizen/20191008.021543
Jaeyun [Mon, 7 Oct 2019 10:28:41 +0000 (19:28 +0900)]
[Tizen/Api] fix invalid params to parse mm info

Add missed param mm-handle to get video cam src element in Tizen.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[API/Tizen] Remove version number from libcapi-nnstreamer.so
Sangjung Woo [Mon, 7 Oct 2019 09:47:32 +0000 (18:47 +0900)]
[API/Tizen] Remove version number from libcapi-nnstreamer.so

This patch removes the version number from libcapi-nnstreamer shared
object.
* libcapi-nnstreamer.so.0.3 -> libcapi-nnstreamer.so

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Tizen/nnfw] Add open/close callbacks for tensor_filter
MyungJoo Ham [Tue, 1 Oct 2019 10:36:47 +0000 (19:36 +0900)]
[Tizen/nnfw] Add open/close callbacks for tensor_filter

This validates integration mechanisms for nnfw-runtime of Tizen.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[android/build] Update build script
Parichay Kapoor [Wed, 2 Oct 2019 07:37:18 +0000 (16:37 +0900)]
[android/build] Update build script

Update build script to be directly used by CI for building

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Code Clean] Make example launch line in remark follow convention.
niklasjang [Thu, 3 Oct 2019 12:50:55 +0000 (21:50 +0900)]
[Code Clean] Make example launch line in remark follow convention.
1. Move 'tensor_mux name=mux ! fakesink' from front to back.
2. Add \ for readability
3. Add missing regular expression ']|'

Signed-off-by: niklasjang <niklasajang@gmail.com>
5 years ago[Filter/C++] Skeleton header
MyungJoo Ham [Tue, 24 Sep 2019 06:55:36 +0000 (15:55 +0900)]
[Filter/C++] Skeleton header

A few users have requested the ability to write C++ custom filters
especially for OpenCV usage.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Api/Tizen] internal function to ignore permission
Jaeyun [Wed, 2 Oct 2019 06:00:36 +0000 (15:00 +0900)]
[Api/Tizen] internal function to ignore permission

add flag to ignore the permission (supposed tizen internal)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[single] Increase default timeout
Parichay Kapoor [Wed, 2 Oct 2019 04:54:23 +0000 (13:54 +0900)]
[single] Increase default timeout

Increase the default timeout to pass the test case on a slow machine/not fully
optimized tensorflow-lite. Also, as the running time for tf-lite test case in
aarch64 is over 10x compared to armv7l, higher defailt timeout is better.

In unit-test, increased the corresponding default timeout as well.
Further, when running many test cases in parallel, default timeout is scaled
with number of parallel runs.

Solves #1717

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Filter/nnfw] Tizen-nnfw skeleton
MyungJoo Ham [Tue, 24 Sep 2019 04:39:13 +0000 (13:39 +0900)]
[Filter/nnfw] Tizen-nnfw skeleton

Skeleton code for Tizen-nnfw is added.
New nnfw of Tizen has its own interface; thus, we can no longer
rely on tensorflow-lite/nnapi for this.

Changes v2:
- Enabled nnfw by default for Tizen
- Applied jaeyun's comments (meson script style fix, nnfw subplugin explicitness of properties)

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years agoRelease of nnstreamer 1.0.0 (1.0 RC2) accepted/tizen/unified/20191004.003656 submit/tizen/20191001.060054 submit/tizen/20191002.012959 v1.0.0
MyungJoo Ham [Thu, 26 Sep 2019 06:38:42 +0000 (15:38 +0900)]
Release of nnstreamer 1.0.0 (1.0 RC2)

This is 1.0 RC2.
With Tizen Official Release, 1.0 stable will be released.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Build] build fail in 18.04
Jaeyun [Tue, 1 Oct 2019 05:19:30 +0000 (14:19 +0900)]
[Build] build fail in 18.04

missed typecast in single-shot, fix build error.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Coverage] remove meson private folder
Jaeyun [Tue, 1 Oct 2019 03:57:54 +0000 (12:57 +0900)]
[Coverage] remove meson private folder

remove meson-related directory in coverage report.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Android/Test] tc fail case
Jaeyun [Mon, 30 Sep 2019 04:11:13 +0000 (13:11 +0900)]
[Android/Test] tc fail case

Sometimes testcase failed with pipeline state NULL when stopping the pipeline.
Add sleep time before closing the pipeline.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Tests] Make tool scripts written in python be compatible with python3
Wook Song [Fri, 27 Sep 2019 05:09:02 +0000 (14:09 +0900)]
[Tests] Make tool scripts written in python be compatible with python3

There are several platforms which do not support python2.7 by default
anymore. To prepare this issue, this patch revises all python scripts in
tests to be also compatible with python3.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Android/Test] update testcases submit/tizen/20190930.043252
Jaeyun Jung [Sun, 22 Sep 2019 09:19:56 +0000 (18:19 +0900)]
[Android/Test] update testcases

1. update testcases for each java class
2. add flag to generate coverage report

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[API/Tizen] Update the comment for Tizen API
Sangjung Woo [Fri, 20 Sep 2019 07:42:39 +0000 (16:42 +0900)]
[API/Tizen] Update the comment for Tizen API

When pipeline string directly accesses the camera or recorder device of
the Tizen, appropriate privilege should be written on configuration
file. This patch new adds the 'remarks' comment for this privilege.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[svace/iio] security fixes related to sscanf
Parichay Kapoor [Thu, 26 Sep 2019 03:03:23 +0000 (12:03 +0900)]
[svace/iio] security fixes related to sscanf

1. Fix security issue related with sscanf. Use g_ascii_str instead
Issue: WID:7938408 Use of vulnerable function 'sscanf' at tensor_src_iio.c:690. This function is unsafe.
Issue: WID:7938409 Use of vulnerable function 'sscanf' at tensor_src_iio.c:723. This function is unsafe.
2. Add comments for switch cases where breaks have been skipped
Issue: Missing break in the switch case

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Api/Tizen] check cam privilege
Jaeyun [Thu, 26 Sep 2019 03:34:59 +0000 (12:34 +0900)]
[Api/Tizen] check cam privilege

Check camera and recoder privilege for each src element.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Tests/TFLite] Run NNAPI tests only on Tizen
Wook Song [Wed, 25 Sep 2019 10:16:18 +0000 (19:16 +0900)]
[Tests/TFLite] Run NNAPI tests only on Tizen

NNAPI tests are only needded in the case of Tizen. Although these tests
are not harmful on the other platform, this patch makes those NNAPI
tests run only on Tizen.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Tests/RepoDynamicity] Support running tests on Yocto
Wook Song [Wed, 25 Sep 2019 09:29:14 +0000 (18:29 +0900)]
[Tests/RepoDynamicity] Support running tests on Yocto

As a workaround for running tests on Yocto, this patch uses the default
installation directory excepting that the tests are running at the build
time or the directory where the test binary is located is provided.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Security] handle return value
Jaeyun [Wed, 25 Sep 2019 08:17:19 +0000 (17:17 +0900)]
[Security] handle return value

Fix svace issues, check returned value and file descriptor.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Android/Sample] move sample app to nnstreamere-example repo
Jaeyun [Wed, 25 Sep 2019 07:31:43 +0000 (16:31 +0900)]
[Android/Sample] move sample app to nnstreamere-example repo

Remove sample app in this repo.
I newly uploaded the sample code to use Android API in example repository.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Android/Test] script to run unittest
Jaeyun [Mon, 23 Sep 2019 06:31:03 +0000 (15:31 +0900)]
[Android/Test] script to run unittest

Update script to run the unittest on target device.

Note that, the testcases are android instrumented test which requires the target device.

Cmd to build and run test: ./build-android-lib.sh --run_unittest=yes

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Android/Api] add readme to build api
Jaeyun [Tue, 24 Sep 2019 02:36:42 +0000 (11:36 +0900)]
[Android/Api] add readme to build api

add readme to build android library using the script.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Tests/CustomFilters] Use default installation direcotory accepted/tizen/unified/20190925.220436 submit/tizen/20190925.063922
Wook Song [Tue, 24 Sep 2019 03:27:22 +0000 (12:27 +0900)]
[Tests/CustomFilters] Use default installation direcotory

Tests which require custom shared library does not consider the
tests using the unittest package (which means not the build time test).
They uses hardcoded path to indicate the location of the shared library.
In order to fix this problem, this patch makes the test use the default
installation directory when the test is running using the unittest
package.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[single-new] Memory leak bug fix in error cases
Parichay Kapoor [Fri, 20 Sep 2019 07:22:27 +0000 (16:22 +0900)]
[single-new] Memory leak bug fix in error cases

Added memory leak bug fix in error cases running

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Android/Api] update condition
Jaeyun Jung [Sun, 22 Sep 2019 07:00:54 +0000 (16:00 +0900)]
[Android/Api] update condition

1. update condition to check the given params.
2. update api description about ml model.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[single-new] Remove dependency over pthread
Parichay Kapoor [Fri, 20 Sep 2019 10:13:16 +0000 (19:13 +0900)]
[single-new] Remove dependency over pthread

Remove the dependency over pthread
Use glib functionalities instead

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Android/Api] fix typo
Jaeyun Jung [Sun, 22 Sep 2019 10:33:31 +0000 (19:33 +0900)]
[Android/Api] fix typo

Fix typo in tensor-info class and update related sample code.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Android/Test] base code to run instrumented test
Jaeyun [Thu, 19 Sep 2019 10:52:14 +0000 (19:52 +0900)]
[Android/Test] base code to run instrumented test

Add base code to run Android instrumented test on the target devices.

TODO add testcases for each java class

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[ReadMe] Correct typo in bullet items under Getting Started
Wook Song [Thu, 19 Sep 2019 12:19:44 +0000 (21:19 +0900)]
[ReadMe] Correct typo in bullet items under Getting Started

This patch corrects typo in bullet items under the Getting Started
section.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[CAPI/New-Single] Code Clean
MyungJoo Ham [Thu, 19 Sep 2019 10:16:48 +0000 (19:16 +0900)]
[CAPI/New-Single] Code Clean

For the readability and to prevent mistakes in the future,
- Apply symmetricity to lock/unlock, hide magic lock from programmers
- Apply common ops into macro

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Build] remove warning message
Jaeyun [Thu, 19 Sep 2019 10:47:11 +0000 (19:47 +0900)]
[Build] remove warning message

function declaration to avoid build warning (missing-declaration)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Tests/Plugins] Avoid warnings caused by a GCC bug related to gtest
Wook Song [Wed, 18 Sep 2019 08:43:59 +0000 (17:43 +0900)]
[Tests/Plugins] Avoid warnings caused by a GCC bug related to gtest

A GCC bug [1] might cause warnings related to 'conversion-null' when
using googletest macros with !FALSE as arguments. Therefore, in the case
that Werror is true, the build would be broken by this bug. To avoid
such situation, this patch replaces EXPECT_EQs in the plugin unit tests
with EXPECT_TRUE or EXPECT_FALSE.

[1] https://github.com/google/googletest/issues/322

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[single] Thread safety bug fix
Parichay Kapoor [Thu, 19 Sep 2019 03:56:34 +0000 (12:56 +0900)]
[single] Thread safety bug fix

Added bug fix for thread safe usage
Single shot API use single handle lock for making all its API call thread safe
However, the call to close the API destroys the handle itself making the
call to close not thread safe
Added a global lock to make closing of handles thread safe

Further, all the single handle locks are acquired inside the global lock
to ensure that single handle is not closed while the magic has been verified
and the local lock is not acquired

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Clean/SAM] add common functions
Jaeyun [Tue, 17 Sep 2019 07:58:42 +0000 (16:58 +0900)]
[Clean/SAM] add common functions

1. define common functions to reduce complexity
2. condition to print log message about nnapi

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[build] Added cleanup after android/ubuntu build
Parichay Kapoor [Thu, 19 Sep 2019 03:18:51 +0000 (12:18 +0900)]
[build] Added cleanup after android/ubuntu build

Added cleanup of patches after android/ubuntu build
Changed relative path of files to patches in patch file

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[build] Use patch file for modification in build
Parichay Kapoor [Wed, 4 Sep 2019 05:59:53 +0000 (14:59 +0900)]
[build] Use patch file for modification in build

Use patch file to modify the nnstreamer.h when building for non-tizen systems

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Readme] Update deployment status
MyungJoo Ham [Wed, 18 Sep 2019 06:58:48 +0000 (15:58 +0900)]
[Readme] Update deployment status

We now release macoS and JCenter binaries.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Build] cleanup script
Jaeyun [Wed, 18 Sep 2019 03:44:41 +0000 (12:44 +0900)]
[Build] cleanup script

Fix typo and cleanup build options.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Config] remove unnecessary lines
Jaeyun [Wed, 18 Sep 2019 02:09:05 +0000 (11:09 +0900)]
[Config] remove unnecessary lines

Remove unnecessary lines about tensorflow optimization.
The key of mem-optimize was removed and these lines are now unnecessary.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Single] Added unittests
Parichay Kapoor [Tue, 17 Sep 2019 10:47:04 +0000 (19:47 +0900)]
[Single] Added unittests

Added more unittests for single-shot API testing
1. Multiple runs in parallel with varying timeouts
2. Changing timeout/closing the handle while calling the API in a different thread
3. Closing the handle multiple times
4. Check valid result after increasing the timeout, when earlier it was timing out

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Filter] add common functions
Jaeyun [Mon, 16 Sep 2019 11:21:50 +0000 (20:21 +0900)]
[Filter] add common functions

Add common functions for tensor-filter and filter-single.
1. add struct for common property
2. reduce duplicated code of tensor-filter

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Filter/Sub] use glib-mutex
Jaeyun [Tue, 17 Sep 2019 07:10:23 +0000 (16:10 +0900)]
[Filter/Sub] use glib-mutex

remove pthread header and use g_mutex instead.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api/Tizen] restricted elements in Tizen accepted/tizen/unified/20190918.102219 submit/tizen/20190917.105643
Jaeyun [Tue, 17 Sep 2019 04:03:32 +0000 (13:03 +0900)]
[Api/Tizen] restricted elements in Tizen

Update the restricted elements in Tizen.

Restricted elements
- capsfilter input-selector output-selector queue tee valve
- appsink appsrc
- audioconvert audiorate audioresample audiomixer
- videoconvert videocrop videorate videoscale videoflip videomixer compositor
- fakesrc fakesink filesrc filesink
- audiotestsrc videotestsrc
- jpegparse jpegenc jpegdec pngenc pngdec
- tcpclientsink tcpclientsrc tcpserversink tcpserversrc udpsink udpsrc
- xvimagesink ximagesink evasimagesink evaspixmapsink glimagesink (mmfw ini)
- theoraenc lame vorbisenc wavenc volume oggmux avimux matroskamux (mmfw ini)
- v4l2src avsysvideosrc camerasrc fimcconvert (mmfw ini)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[CodeClean] remove duplicates
Jaeyun [Wed, 11 Sep 2019 12:16:44 +0000 (21:16 +0900)]
[CodeClean] remove duplicates

remove duplicates and unnecessary code.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[single] Static linking with unit-test
Parichay Kapoor [Mon, 16 Sep 2019 02:32:49 +0000 (11:32 +0900)]
[single] Static linking with unit-test

Updated meson to do static linking with unit-test executable
This resolves #1653

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Android/Api] add timeout in single-shot
Jaeyun [Tue, 10 Sep 2019 10:33:02 +0000 (19:33 +0900)]
[Android/Api] add timeout in single-shot

Add method to set the timeout in single-shot API.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api/Single] invalid condition to check file extension
Jaeyun [Wed, 11 Sep 2019 07:37:02 +0000 (16:37 +0900)]
[Api/Single] invalid condition to check file extension

1. Fix invalid cond to check file extension.
2. Add proper log message and error code to set tensors info.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[single-shot] Added support for timeout in single-shot
Parichay Kapoor [Thu, 5 Sep 2019 05:39:05 +0000 (14:39 +0900)]
[single-shot] Added support for timeout in single-shot

Added support for timeout in new single-shot API implementation to
comply with the existing single-shot API

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Api/Single] clear old buffer
Jaeyun [Wed, 4 Sep 2019 04:36:11 +0000 (13:36 +0900)]
[Api/Single] clear old buffer

1. Add mutex-lock for internal process.
2. Clear old buffer of appsink before pushing new buffer to appsrc.

When old buffer received in appsink after timeout, next output of invoke() may be the previous result.
To prevent this, clear old sample of appsink before pushing new buffer.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Android] update script to release
Jaeyun [Thu, 5 Sep 2019 13:01:34 +0000 (22:01 +0900)]
[Android] update script to release

Add dependency and args for jcenter release.

To upload NNStreamer library, run the script with bintray user name.

./api/android/build-android-lib.sh --release=yes --release_version=$release_ver --bintray_user_name=$user_name --bintray_user_key=$user_key

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Dist/RPM] Added library required by devel package
Parichay Kapoor [Mon, 9 Sep 2019 10:19:59 +0000 (19:19 +0900)]
[Dist/RPM] Added library required by devel package

Added dependency of devel-capi on capi

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[single-shot] Added README.md
Parichay Kapoor [Thu, 5 Sep 2019 06:33:03 +0000 (15:33 +0900)]
[single-shot] Added README.md

Added README.md with small details on the source files and
comparison on the single-shot APIs

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[single-shot] benchmarking the latency
Parichay Kapoor [Tue, 3 Sep 2019 04:46:34 +0000 (13:46 +0900)]
[single-shot] benchmarking the latency

Added benchmarking the latency and running times in the test code
This compares old vs new singleshot api - showing reduction in latency and running-time

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Doc] Update the component-description
MyungJoo Ham [Thu, 5 Sep 2019 07:59:56 +0000 (16:59 +0900)]
[Doc] Update the component-description

This document was way too obsolete. Update it with recent info.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[single-shot] Completion for new single-shot API
Parichay Kapoor [Mon, 2 Sep 2019 10:42:41 +0000 (19:42 +0900)]
[single-shot] Completion for new single-shot API

Completed the implementation for single-shot API without GStreamer
Added a separate binary for this API
Added remaining functions in tensor_filter_single.c
Added another test run in meson and nnstreamer.spec for testing of this new implementation

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[TEST] Fix nnapi test
jijoong.moon [Mon, 9 Sep 2019 02:11:11 +0000 (11:11 +0900)]
[TEST] Fix nnapi test

Fix nnapi test (#1647)

**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[Test] Add decoder-pose unit test
MyungJoo Ham [Fri, 6 Sep 2019 02:16:03 +0000 (11:16 +0900)]
[Test] Add decoder-pose unit test

Add a fail case and a simple-run case of decoder-pose.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Android/Api] change package name
Jaeyun [Mon, 9 Sep 2019 06:06:11 +0000 (15:06 +0900)]
[Android/Api] change package name

1. Change package name of Android API. (com.samsung.android.nnstreamer > org.nnsuite.nnstreamer)
2. Change directory structure (src > src/main)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[README] Add a link to the 'getting-started' manual for macOS
Wook Song [Fri, 6 Sep 2019 15:45:03 +0000 (00:45 +0900)]
[README] Add a link to the 'getting-started' manual for macOS

This patch adds a link to the 'getting-started' manual for macOS.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Documentation] Add 'getting-started' for macOS
Wook Song [Fri, 6 Sep 2019 15:37:31 +0000 (00:37 +0900)]
[Documentation] Add 'getting-started' for macOS

This patch adds a 'getting-started' manual to guide for using NNStreamer
in macOS. Note that this is just an initial draft.

Signed-off-by: Wook Song <wook16.song@samsung.com>
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>