platform/upstream/nnstreamer.git
5 years ago[Meson] update required meson version
Jaeyun [Wed, 23 Oct 2019 03:39:52 +0000 (12:39 +0900)]
[Meson] update required meson version

Set min meson version 0.50 and cleanup the script.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Coverity] fix coverity issues
Jaeyun [Thu, 24 Oct 2019 04:47:29 +0000 (13:47 +0900)]
[Coverity] fix coverity issues

Update code to fix invalid condition and free functions in nnstreamer plugins.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[single] flexible dimension unittest fail fix
Parichay Kapoor [Thu, 24 Oct 2019 05:38:41 +0000 (14:38 +0900)]
[single] flexible dimension unittest fail fix

Added fix for flexible dimension unittest fail fix

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[single] simplify get_tensors_info in single API
Parichay Kapoor [Mon, 21 Oct 2019 03:00:18 +0000 (12:00 +0900)]
[single] simplify get_tensors_info in single API

Added simplification for get_tensors_info in single API implementation
input and output tensors info is stored in single API
This patch updates to use that information than extracting the info again from element

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[single] Implementation of flexible input dimension
Parichay Kapoor [Thu, 17 Oct 2019 10:32:16 +0000 (19:32 +0900)]
[single] Implementation of flexible input dimension

Added implementation of flexible input dimension at the API level
Handling flexible input dimension at the tensor filter extension
scope to be done.

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Filter] Enable C++ subplugin build
MyungJoo Ham [Tue, 15 Oct 2019 07:47:03 +0000 (16:47 +0900)]
[Filter] Enable C++ subplugin build

Before adding test cases for C++ filter subplugins,
enable build for Tizen/Ubuntu.

Add enable-cppfilter=true for meson build if you
want to use this feature.

Note that the subplugin is not yet fully implemented
and needs further implementation. Thus, we do not have
testcases, yet.

Changes at v2:
- cppfilter is now default
- added isAllocatedBeforeInvoke() virtual function

Change-Id: I5e1942e0b7c957ceb675bd78496041a888978e65
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[pytorch] Do first run with try/catch
Parichay Kapoor [Tue, 22 Oct 2019 04:27:04 +0000 (13:27 +0900)]
[pytorch] Do first run with try/catch

First run after configuring the tensor filter with pytorch framework
is now run with a try/catch.

Check #1809 for more details.

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[TF-Lite] Added setInputDimension
Parichay Kapoor [Fri, 18 Oct 2019 03:41:53 +0000 (12:41 +0900)]
[TF-Lite] Added setInputDimension

Added implementation for setInputDimension
This can allow support for flexible input dimensions
The support is limited to only changing dimensions
Data type for the input or the number of inputs cannot be changed with current TF-Lite API
The rank for the input is allowed to be changed if the model allows
The input dimension can return error if the model does not allow dimension to be changed

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Decoder/Sub] install img segment
Jaeyun [Tue, 22 Oct 2019 10:52:33 +0000 (19:52 +0900)]
[Decoder/Sub] install img segment

Add definition to install image segment subplugin.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Decoder] update callback description
Jaeyun [Tue, 22 Oct 2019 07:21:07 +0000 (16:21 +0900)]
[Decoder] update callback description

Update callback description for decoder sub-plugin.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Decoder/Sub] mem error case in img segment
Jaeyun [Tue, 22 Oct 2019 08:18:00 +0000 (17:18 +0900)]
[Decoder/Sub] mem error case in img segment

1. handle allocation failure case
2. fix possible mem leak to get the out caps
3. add definition to include img segment in android-libray

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Android] add option to build with min plugins
Jaeyun [Mon, 21 Oct 2019 06:28:59 +0000 (15:28 +0900)]
[Android] add option to build with min plugins

Add build option to set target abi and core gstreamer plugins.

For example, to build library with core plugins for arm64
./build-android-lib.sh --api_option=core --target_abi=arm64

This only includes gstreamer core plugins, so library size is under 15MB.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Decoder] Set color to segmented image accoring to label_idx
niklasjang [Sun, 20 Oct 2019 13:00:02 +0000 (06:00 -0700)]
[Decoder] Set color to segmented image accoring to label_idx

Each pixel has a probability of 21 labels.
Apply a color of the label with the highest probability.

Signed-off-by: niklasjang <niklasjang@gmail.com>
Signed-off-by: Jihoon Lee <ulla4571@gmail.com>
5 years ago[Android/Doc] update build guide
Jaeyun [Fri, 18 Oct 2019 05:51:34 +0000 (14:51 +0900)]
[Android/Doc] update build guide

Update build guide with prebuilt gstreamer-1.16.1 binaries.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[single] Added API and skeleton for flexible input dimension
Parichay Kapoor [Thu, 17 Oct 2019 07:48:01 +0000 (16:48 +0900)]
[single] Added API and skeleton for flexible input dimension

Adding support for flexible input dimension
Added API and skeleton for setting input dimension via single API

V2:
Added more description for retval of ML_ERROR_NOT_SUPPORTED in documentation

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Decoder/Meson] Meson build for image segmentation decoder
Jihoon Lee [Sun, 20 Oct 2019 10:58:00 +0000 (19:58 +0900)]
[Decoder/Meson] Meson build for image segmentation decoder

In order to add tensor decoder for image segmentation to build tree,
updates meson build script.

Signed-off-by: niklasjang <niklasjang@gmail.com>
Signed-off-by: Jihoon Lee <ulla4571@gmail.com>
5 years ago[WIP] Tensor decoder for image segmentation
Jihoon Lee [Sun, 20 Oct 2019 10:57:40 +0000 (19:57 +0900)]
[WIP] Tensor decoder for image segmentation

In order to implement tensor decoder for image segmentation,
this patch composes skeleton code for it.

Signed-off-by: niklasjang <niklasjang@gmail.com>
Signed-off-by: Jihoon Lee <ulla4571@gmail.com>
5 years ago[CodeClean] replace meaningless variables
Dongwon Lee [Sun, 20 Oct 2019 07:09:09 +0000 (16:09 +0900)]
[CodeClean] replace meaningless variables
rename a and b to other more meaningful ones.
a -> from, b -> to

Signed-off-by: Dongwon Lee <dongwon1103@naver.com>
5 years ago[Typo] Fix typo
Injae Kang [Sat, 19 Oct 2019 16:50:56 +0000 (01:50 +0900)]
[Typo] Fix typo

This patch fixes typo in packaging/nnstreamer.spec

Signed-off-by: Injae Kang <abcinje@gmail.com>
5 years ago[CodeClean] combine if statements
Junsang Mo [Thu, 17 Oct 2019 12:46:27 +0000 (21:46 +0900)]
[CodeClean] combine if statements
combine if statements in tensor_transform.c.
I confirmed it worked well in example_image_classification_tflite.

Signed-off-by: Junsang Mo <junsang.mo@samsung.com>
5 years agoAdd execution bit of gradlew
이원준 [Fri, 18 Oct 2019 08:30:13 +0000 (17:30 +0900)]
Add execution bit of gradlew
Added excution bit of gradlew to prevent permission denied error.

Signed-off-by: 이원준 <dldnjs1013@nate.com>
5 years ago[Security] handle returned value
Jaeyun [Thu, 17 Oct 2019 04:18:33 +0000 (13:18 +0900)]
[Security] handle returned value

Check mem allocation failure case and refactor file-close in IIO.

This PR is related with ssms-1016-0006.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[tests] Install models/data with tests
Parichay Kapoor [Wed, 16 Oct 2019 04:25:39 +0000 (13:25 +0900)]
[tests] Install models/data with tests

Install models/data with tests correctly when needed
Install tizen-capi-unittest with install-test option

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years agoAdded the coverity badge
Geunsik Lim [Fri, 18 Oct 2019 04:33:21 +0000 (13:33 +0900)]
Added the coverity badge

This commit is to append the badge of the Coverity (static analysis tool).
TODO: the Coverity module of TAOS-CI will be soon enabled in the nnstreamer GitHub repository.

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
5 years ago[Security] [Converter] handle text format in chain function
Jaeyun [Thu, 17 Oct 2019 04:39:09 +0000 (13:39 +0900)]
[Security] [Converter] handle text format in chain function

get min block size and use memcpy when input mime-type is text.

This PR is related with ssms-1016-0005.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Security] python lib name format
Jaeyun [Thu, 17 Oct 2019 05:31:30 +0000 (14:31 +0900)]
[Security] python lib name format

Define macro for file format and remove macro(preprocess defines) in the function call.

This PR is related with ssms-1016-0007.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Test] update model in tensor-filter
Jaeyun [Wed, 16 Oct 2019 08:31:31 +0000 (17:31 +0900)]
[Test] update model in tensor-filter

Add testcase to re-open nn model in tensor-filter using gst-harness.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[tests] Locate all models and data together
Parichay Kapoor [Wed, 16 Oct 2019 04:08:53 +0000 (13:08 +0900)]
[tests] Locate all models and data together

Locate all the models and data together for easier management

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[CodeClean]remove duplicates in TFLiteCore::getTensorDim
Junsang Mo [Wed, 16 Oct 2019 11:40:21 +0000 (20:40 +0900)]
[CodeClean]remove duplicates in TFLiteCore::getTensorDim
make a variable for interpreter->tensor (tensor_idx)->dims.
replace interpreter->tensor (tensor_idx)->dims with the variable.

Signed-off-by: Junsang Mo <junsang.mo@samsung.com>
5 years ago[Doc] fix doxygen link
Jaeyun [Wed, 16 Oct 2019 03:52:25 +0000 (12:52 +0900)]
[Doc] fix doxygen link

update doc-doxygen, fix the linked url.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Coverity/1087163] Fix dereference before null check
MyungJoo Ham [Tue, 15 Oct 2019 10:57:48 +0000 (19:57 +0900)]
[Coverity/1087163] Fix dereference before null check

This intends to fix:
```
There may be a null pointer dereference, or else the comparison against null is unnecessary.

In ml_tensors_data_create: All paths that lead to this null pointer comparison already dereference the pointer earlier (CWE-476)
```

It appears that Coverity hates defensive coding.

This adds missing free on _data as well.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[tizen/nnfw] Add invoke for nnfw
Parichay Kapoor [Fri, 11 Oct 2019 04:12:51 +0000 (13:12 +0900)]
[tizen/nnfw] Add invoke for nnfw

Added invoke implementation for nnfw along with some bug fixes

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Security] returned value to compare str
Jaeyun [Tue, 15 Oct 2019 02:33:50 +0000 (11:33 +0900)]
[Security] returned value to compare str

Add one more commit for string compare, check returned value.

EXP20-C. Perform explicit tests to determine success, true and false, and equality

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Android] add log to print version string
Jaeyun [Tue, 15 Oct 2019 03:33:14 +0000 (12:33 +0900)]
[Android] add log to print version string

add log to print nnstreamer, gstreamer and glib version info.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Doc] fix typo and link
Jaeyun [Tue, 15 Oct 2019 04:38:58 +0000 (13:38 +0900)]
[Doc] fix typo and link

Update docs (fix links and typo in document)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Typecast] Use explicit type casting with g_ascii_strto(u)ll() function
Injae Kang [Mon, 14 Oct 2019 13:24:43 +0000 (22:24 +0900)]
[Typecast] Use explicit type casting with g_ascii_strto(u)ll() function

This patch use explicit type casting between variables and return values of
g_ascii_strtoll() or g_ascii_strtoull() functions.

This resolves issue #1762, which is about potential warnings
from compilers with strict option.

Signed-off-by: Injae Kang <abcinje@gmail.com>
5 years ago[tizen/nnfw] Add get_input/output_dimensions
Parichay Kapoor [Thu, 10 Oct 2019 12:48:59 +0000 (21:48 +0900)]
[tizen/nnfw] Add get_input/output_dimensions

Added implementation for get_input/output_dimensions functions

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[CodeClean] remove redundant check for LLVM compatibility
Niklas Jang [Sat, 12 Oct 2019 06:41:03 +0000 (15:41 +0900)]
[CodeClean] remove redundant check for LLVM compatibility

As bdata->mode  is defined as bounding_box_modes type, it is never lower than zero.
Because find_key_strv()'s return value is definded as 'The count of replaced. (Set NULL if it is unnecessary)',
it does not affect.

And not latest clang complains about this redundance.(LLVM)

Signed-off-by: Niklas Jang <niklasjang@gmail.com>
5 years ago[test]Change num_buffers type from guint to gint
Niklas Jang [Sat, 12 Oct 2019 05:03:31 +0000 (14:03 +0900)]
[test]Change num_buffers type from guint to gint

It is dangerous to cast from gint to guint and vice versa.
According to Gstreamer GstBaseSrc menual, num-buffer's type is  'gint' not 'guint'.
num-buffers means 'Number of buffers to output before sending EOS (-1 = unlimited).
<https://gstreamer.freedesktop.org/documentation/base/gstbasesrc.html?gi-language=c#GstBaseSrc:num-buffers>

Signed-off-by: Niklas Jang <niklasjang@gmail.com>
[test]Change buffer_index type from guint to gint

There is comparison between buffer_index and num_buffers.
So buffer_index must be gint type like num_buffers.

Signed-off-by: Niklas Jang <niklasjang@gmail.com>
5 years ago[Doc] Tizen Native App Guide accepted/tizen_5.5_unified_mobile_hotfix tizen_5.5_mobile_hotfix accepted/tizen/5.5/unified/20191031.011831 accepted/tizen/5.5/unified/mobile/hotfix/20201027.074251 accepted/tizen/unified/20191015.012028 submit/tizen/20191014.081910 submit/tizen/20191023.084816 submit/tizen_5.5/20191031.000007 submit/tizen_5.5_mobile_hotfix/20201026.185107 tizen_5.5.m2_release
MyungJoo Ham [Fri, 11 Oct 2019 16:29:28 +0000 (01:29 +0900)]
[Doc] Tizen Native App Guide

This guide allows developers to start writing Tizen native apps more easily.

This partially resovles #1751.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Security] cond to compare strings
Jaeyun [Mon, 14 Oct 2019 04:15:04 +0000 (13:15 +0900)]
[Security] cond to compare strings

EXP20-C. Perform explicit tests to determine success, true and false, and equality

This will fix SSMS-0003.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Security] check buffer size
Jaeyun [Mon, 14 Oct 2019 04:01:03 +0000 (13:01 +0900)]
[Security] check buffer size

check the output buffer size before copying the mem block.

This will fix SSMS-0002.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api/Tizen] handle dpm restriction case
Jaeyun [Thu, 10 Oct 2019 07:23:46 +0000 (16:23 +0900)]
[Api/Tizen] handle dpm restriction case

Check the pipeline with device policy restricted case.
Create dpm handle and when trying to start the pipeline, check device policy and handle error case.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Doc] Guide: writing a new tensor-filter subplugin
MyungJoo Ham [Fri, 11 Oct 2019 15:42:29 +0000 (00:42 +0900)]
[Doc] Guide: writing a new tensor-filter subplugin

With https://github.com/nnsuite/nnstreamer-example/pull/68
this guide helps developer write a new filter subplugin easily.

With that PR in nnstreamer-example, this resovles #1746

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[CodeClean] Apply regular expressions
Injae Kang [Tue, 8 Oct 2019 14:44:21 +0000 (23:44 +0900)]
[CodeClean] Apply regular expressions

Use regular expressions instead of combined if-statements.

Signed-off-by: Injae Kang <abcinje@gmail.com>
5 years ago[Filter/TF-lite] cleanup hw-type string
Jaeyun [Tue, 8 Oct 2019 07:38:46 +0000 (16:38 +0900)]
[Filter/TF-lite] cleanup hw-type string

1. remove duplicated src and fix indent
2. move hw-type string definition

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[API/Tizen] Fix the rootstrap buildbreak issue accepted/tizen/unified/20191011.051921 submit/tizen/20191011.051205
Sangjung Woo [Fri, 11 Oct 2019 04:46:05 +0000 (13:46 +0900)]
[API/Tizen] Fix the rootstrap buildbreak issue

This patch fixes the rootstrap buildbreak issue by using relative path
instead of absolute one.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Api/Tizen] remove code which occurs error
Hyoung Joo Ahn [Tue, 8 Oct 2019 08:30:55 +0000 (17:30 +0900)]
[Api/Tizen] remove code which occurs error

remove code which occurs error.
Since the previous code lock the resource internally,
when another pipeline want to contact to the resource, an error is generated.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
5 years ago[Api/Tizen] bug-fix to replace str
Jaeyun [Tue, 8 Oct 2019 06:08:54 +0000 (15:08 +0900)]
[Api/Tizen] bug-fix to replace str

bug-fix to replace element string in pipeline description.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api/Tizen] update restricted elements
Jaeyun [Tue, 8 Oct 2019 05:53:29 +0000 (14:53 +0900)]
[Api/Tizen] update restricted elements

Add tv-camsrc and pulsesrc as cam input src element.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Filter/Sub] use glib to compare strings
Jaeyun [Tue, 8 Oct 2019 01:54:16 +0000 (10:54 +0900)]
[Filter/Sub] use glib to compare strings

change string util functions to parse and compare strings.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
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>