platform/upstream/nnstreamer.git
5 years ago[IIO] Removing fileno() accepted/tizen/unified/20190404.022039 submit/tizen/20190403.111722
Parichay Kapoor [Mon, 1 Apr 2019 05:26:23 +0000 (14:26 +0900)]
[IIO] Removing fileno()

Removed usage of fileno to file descriptor to compile without error with C89
as fileno() requires _POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _POSIX_SOURCE

Using open() from fcntl directly instead of fopen() and fileno() combined
Resolves issue #1293

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Coverity 1050026,1049988] Branch Past Initialization
Parichay Kapoor [Wed, 3 Apr 2019 03:42:14 +0000 (12:42 +0900)]
[Coverity 1050026,1049988] Branch Past Initialization

This fixes branch past initialization (transfer of control bypasses initialization) at two incidents

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Coverity 1049985,1049986] Branch Past Initialization
Parichay Kapoor [Wed, 3 Apr 2019 03:27:21 +0000 (12:27 +0900)]
[Coverity 1049985,1049986] Branch Past Initialization

This fixes branch past initialization (transfer of control bypasses initialization) at two incidents

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Unittest] add install unittest
jijoong.moon [Wed, 3 Apr 2019 02:13:27 +0000 (11:13 +0900)]
[Unittest] add install unittest

Add installation of ssat unittest cases according to install-test
option.

**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[Common] Add other/tensors parsing rule.
MyungJoo Ham [Tue, 2 Apr 2019 10:06:40 +0000 (19:06 +0900)]
[Common] Add other/tensors parsing rule.

dimensions and types are not deliminated by both '.' and ','.
It is to support GstCap (CapsFilter) with other/tensors string
expressions.

Note that ... ! other/tensors,types=float32,int32 !...
is not supported. We need to use . instead in such cases.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Coverity 1049998/1050018] Fix useless keyword
MyungJoo Ham [Wed, 3 Apr 2019 00:56:23 +0000 (09:56 +0900)]
[Coverity 1049998/1050018] Fix useless keyword

const of const gboolean func() is useless.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Coverity 1050275] Unchecked return value
Parichay Kapoor [Wed, 3 Apr 2019 03:58:48 +0000 (12:58 +0900)]
[Coverity 1050275] Unchecked return value

This fixes the error of unchecked return value upon deletion of directory structure.

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Coverity 1050274,1050277][SVACE/414964] Array out of bound
MyungJoo Ham [Wed, 3 Apr 2019 00:48:38 +0000 (09:48 +0900)]
[Coverity 1050274,1050277][SVACE/414964] Array out of bound

This fixes array out of bound access found by the three incidents.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Filter] remove ip mode vmethod submit/tizen/20190402.101945
Jaeyun [Tue, 2 Apr 2019 04:29:10 +0000 (13:29 +0900)]
[Filter] remove ip mode vmethod

In tensor-filter, ip-mode vmethod is unnecessary.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[IIO] restore iio device on _stop()
Parichay Kapoor [Thu, 28 Mar 2019 11:36:43 +0000 (20:36 +0900)]
[IIO] restore iio device on _stop()

restore the existing values of scan_channels_en, sampling_frequency,
buffer/length and current trigger (if exist) when stopping the element

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[IIO] Restriction on changing element properties
Parichay Kapoor [Mon, 1 Apr 2019 04:26:27 +0000 (13:26 +0900)]
[IIO] Restriction on changing element properties

Element should be in state NULL or READY for the property of the device to be changed.
If the state is PAUSED/READY, properties cant be changed as the updated properties cannot
be reflected without the element going back to READY state.
Added freeing of properties before re-setting them.

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[IIO] Support device number, filled _finalize()
Parichay Kapoor [Thu, 28 Mar 2019 04:45:01 +0000 (13:45 +0900)]
[IIO] Support device number, filled _finalize()

1. Support device/trigger number as input, added corresponding test case as well
2. Set proper max limit on buffer capacity and frequency
3. Filled _finalize()

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[SVACE/414949] Fix 65505047 Warning
jijoong.moon [Mon, 1 Apr 2019 08:07:40 +0000 (17:07 +0900)]
[SVACE/414949] Fix 65505047 Warning

Line 448 of unittest_common.cpp has svace warning:

WID:65505047 Return value of a function 'fopen64' is dereferenced at
unittest_common.cpp:448 without checking, but it is usually checked
for this function (8/9).

**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[IIO] removed blocksize, merging with inner dimension
Parichay Kapoor [Thu, 28 Mar 2019 07:49:40 +0000 (16:49 +0900)]
[IIO] removed blocksize, merging with inner dimension

1. Removed blocksize (merging multiple buffers of data together). Use tensor_aggregator for this functionality
2. Merging of tensors is done with innermost dimension (merging on outermost dimension introduced reduntant dimensions)
3. Bugfix:
  - buffer size scaled by buffer_capacity
  - data rate_d set to buffer_capacity
4. Moved one-shot mode todo - no support for one-shot mode now

V2:
Added direction for merging the tensor

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[TENSORS] No need the tests/nnstreamer_tensors
jijoong.moon [Fri, 29 Mar 2019 04:36:15 +0000 (13:36 +0900)]
[TENSORS] No need the tests/nnstreamer_tensors

Test case, nnstreamer_tensors are not needed anymore. It was written
just for the temperal check of possibility of meta in the buffer.

**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 agotest cases for state change and corresponding bug fixes
Parichay Kapoor [Wed, 27 Mar 2019 06:35:51 +0000 (15:35 +0900)]
test cases for state change and corresponding bug fixes

1. Created virtual iio device to test against
2. Added test case to test state change from NULL to PLAYING and backwards
3. Bug fixes-
  3.1 setting of fixated caps moved to _fixating() from _start()
  3.2 channel property list memory issue resolved
  3.3 missing sampling frequency file while setting it is now a warning
      skip to default frequency if file is not present
  3.4 More minor bug fixes
4. IIO base directories moved to header file
  These directories are modified to temporary location when testing with simulated device

V2:
- BugFix:
  - updated condition check for sampling_frequency
  - updated freeing channel list while filtering enabled channels
  - declaration following C89
- Moved fixating of caps to _fixate(). This removes unnecessary storage of fixated_caps
  and calculating fixated caps in _fixate() makes code more readable

V3:
- replaced stdio.h with glib/gprintf.h

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[YOCTO] Modified unittest directory for installation & runn
jijoong.moon [Wed, 20 Mar 2019 06:58:58 +0000 (15:58 +0900)]
[YOCTO] Modified unittest directory for installation & runn

Because there are test cases incluiding absolute path for library, it
is hard to run unit testcases after installation. In this PR, these
testcases and nnstreamer_example libraries are installed
/usr/lib/nnstreamer/unittest. For the nnstreamer_example, libraries
are in /usr/lib/nnstreamer/unittest/nnstreamer_exampls, and For the
tests, they are installed in /usr/lib/nnstreamer/unittest/tests.
Some unittest executions (unittest_repo, unittest_sink,
unittest_common, unittest_plugins) are installed in
/usr/lib/nnstreamer/unittest.

**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[SVACE/414634-5] Fix 65505041/2 Warning accepted/tizen/unified/20190402.071859 submit/tizen/20190401.105207
MyungJoo Ham [Mon, 1 Apr 2019 08:07:35 +0000 (17:07 +0900)]
[SVACE/414634-5] Fix 65505041/2 Warning

DEREF_OF_NULL.RET.ALLOC

Warning Message
Pointer '↦left[0]' returned from function 'g_strdup_printf' at tensor_filter.c:965 may be null, and it is dereferenced at tensor_filter.c:984.
Warning Message
Pointer '↦right[0]' returned from function 'g_strdup_printf' at tensor_filter.c:974 may be null, and it is dereferenced at tensor_filter.c:986.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[SVACE/414633] Check malloc return value
MyungJoo Ham [Mon, 1 Apr 2019 07:59:59 +0000 (16:59 +0900)]
[SVACE/414633] Check malloc return value

Do not proceed if malloc returns null:
Warning Message
Pointer 'output[0].data' returned from function 'malloc' at nnstreamer_customfilter_example_scaler_allocator.c:159 may be null, and it is dereferenced at nnstreamer_customfilter_example_scaler_allocator.c:202.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[SVACE/414632] Check malloc return value
MyungJoo Ham [Mon, 1 Apr 2019 07:57:40 +0000 (16:57 +0900)]
[SVACE/414632] Check malloc return value

Do not proceed if malloc returns null:
Warning Message
Pointer 'data' returned from function 'malloc' at nnscustom_framecounter.c:96 may be null, and it is dereferenced at nnscustom_framecounter.c:98.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[SVACE/414631] Check malloc return value
MyungJoo Ham [Mon, 1 Apr 2019 07:55:04 +0000 (16:55 +0900)]
[SVACE/414631] Check malloc return value

Do not proceed if malloc returns null:
Warning Message
Pointer 'data' returned from function 'malloc' at nnstreamer_customfilter_example_scaler_allocator.c:65 may be null, and it is dereferenced at nnstreamer_customfilter_example_scaler_allocator.c:68.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[SVACE/414630] Check malloc return value
MyungJoo Ham [Mon, 1 Apr 2019 07:53:17 +0000 (16:53 +0900)]
[SVACE/414630] Check malloc return value

Do not proceed if malloc returns null:
Warning Message
Pointer 'data' returned from function 'malloc' at nnstreamer_customfilter_example_scaler.c:45 may be null, and it is dereferenced at nnstreamer_customfilter_example_scaler.c:48.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[SVACE/414629] Check malloc return value.
MyungJoo Ham [Mon, 1 Apr 2019 07:49:13 +0000 (16:49 +0900)]
[SVACE/414629] Check malloc return value.

If it's NULL, don't proceed:
Warning Message
Pointer 'data' returned from function 'malloc' at nnstreamer_customfilter_example_average.c:36 may be null, and it is dereferenced at nnstreamer_customfilter_example_average.c:38.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[SVACE/414609] Fix 65505016 Warning
MyungJoo Ham [Mon, 1 Apr 2019 07:25:22 +0000 (16:25 +0900)]
[SVACE/414609] Fix 65505016 Warning

Line 249 of tensordec-boundingbox.c has the following SVACE warning:

Warning Message
Possible integer underflow: left operand is tainted. An integer underflow may occur due to arithmetic operation (unsigned subtraction) between values { [0, 1073741823] } and '1', where the first value comes from the expression 'strlen(line)'

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[SVACE/414602] Fix 65505007 Warning
MyungJoo Ham [Mon, 1 Apr 2019 06:47:52 +0000 (15:47 +0900)]
[SVACE/414602] Fix 65505007 Warning

Fix: WID:65505007 Integer value 'width * height' obtained from untrusted source at bmp2png.c:239 by passing as 1st parameter to function 'fread' at bmp2png.c:232 without checking its lower bound is used in a trusted operation at bmp2png.c:254 by calling function 'calloc'.

Add lower limits for height/width.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[SVACE/414655] Fix 65505049 Warning
jijoong.moon [Mon, 1 Apr 2019 07:43:43 +0000 (16:43 +0900)]
[SVACE/414655] Fix 65505049 Warning

Line 343 of unittest_sink.cpp has svace warning:

WID:65505049 Use of vulnerable function 'sprintf' at
unittest_sink.cpp:343. For better security, VD recommends NOT to use
sprintf. Use snprintf instead.

**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/TF-Lite] Enable NNAPI with configurations
MyungJoo Ham [Fri, 29 Mar 2019 01:45:41 +0000 (10:45 +0900)]
[Filter/TF-Lite] Enable NNAPI with configurations

This rephrases #1013 with nnstreamer configuration support.

Add TRUE or 1 or ON of "enable_nnapi" in .ini file or
Use NNSTREAMER_tensorflowlite_enable_nnapi=1 as an environmental
variable to enable NNAPI for tensorflow-lite.

CC: @daeinki
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[IIO] Change functions used for byte order conversion
Wook Song [Fri, 29 Mar 2019 00:08:30 +0000 (09:08 +0900)]
[IIO] Change functions used for byte order conversion

Without defining _BSD_SOURCE and __USE_BSD macros, the functions such as
be16toh, le16toh, be32toh, le32toh, be64toh and le64toh are not
compatible with c89. In order to fix this issue, this patch replaces
such functions with byte order macros from glib-2.0.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[README] Add a badge for displaying status of code coverage
Wook Song [Thu, 28 Mar 2019 08:47:42 +0000 (17:47 +0900)]
[README] Add a badge for displaying status of code coverage

This patch adds a badge that displays code coverage status to the main
page of github, i.e., README.md.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years agoRemove tensor_save/load. It's unimplemented skeleton abandoned.
MyungJoo Ham [Thu, 28 Mar 2019 02:19:03 +0000 (11:19 +0900)]
Remove tensor_save/load. It's unimplemented skeleton abandoned.

It has been abandoned for too long time that has incorrect skeleton.
To promote better design, remove the whole skeleton.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[UNITTEST] Adding queue to prevent unexpected input drop
jijoong.moon [Wed, 27 Mar 2019 08:32:47 +0000 (17:32 +0900)]
[UNITTEST] Adding queue to prevent unexpected input drop

Add queue element in the test pipeline. For the slow hardware, there
are  unexpected input drop, which makes unittests inconsistent.

**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[Conf/Testcase] Add UT cases for custom conf
MyungJoo Ham [Tue, 26 Mar 2019 08:24:58 +0000 (17:24 +0900)]
[Conf/Testcase] Add UT cases for custom conf

Added a few test cases for custom conf.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[TENSORREPO] Fix hanging while waiting pulled signal when eos.
jijoong.moon [Wed, 27 Mar 2019 09:54:04 +0000 (18:54 +0900)]
[TENSORREPO] Fix hanging while waiting pulled signal when eos.

There is hanging error when it is waiting pulled signal. In the case
of EOS(End of Stream), there is no pulling procedure but it is
required to get signal to get out the while loop.

**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[UNITTESTS] Fix binary write
jijoong.moon [Wed, 27 Mar 2019 01:48:49 +0000 (10:48 +0900)]
[UNITTESTS] Fix binary write

Some of test cases is not appropriate for python3. In this PR, these
are fixed. (wirte binary data in to string file write option)

**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 agolcov: Changed the default time zone from UTC to KST
Geunsik Lim [Wed, 27 Mar 2019 09:32:29 +0000 (18:32 +0900)]
lcov: Changed the default time zone from UTC to KST

Fixed the issue #1193 and #1275 finally.
https://github.com/nnsuite/nnstreamer/issues/1193#issuecomment-469635177
https://github.com/nnsuite/nnstreamer/issues/1275

This commit is to replace UTC with KST by default in order to display the date format
with Seoul time.  The 'lcov' generates the date format with UTC time zone by default.
So, let's replace UTC with KST.

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
5 years ago[Tizen] fix the typos in doc header
Sangjung Woo [Wed, 27 Mar 2019 08:01:30 +0000 (17:01 +0900)]
[Tizen] fix the typos in doc header

This patch fixes the minor typos in doc header file.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Common] remove media type header
Jaeyun [Mon, 11 Mar 2019 08:23:23 +0000 (17:23 +0900)]
[Common] remove media type header

Only tensor-converter needs media format header.
Remove unnecessary header include in common files.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Test/Unit-test-coverage] Add Tizen/API into unittest coverage
MyungJoo Ham [Fri, 22 Mar 2019 05:54:38 +0000 (14:54 +0900)]
[Test/Unit-test-coverage] Add Tizen/API into unittest coverage

Count test-coverage of Tizen/API.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Test:Tizen/API] Test "valve" control Tizen APIs
MyungJoo Ham [Fri, 22 Mar 2019 05:53:44 +0000 (14:53 +0900)]
[Test:Tizen/API] Test "valve" control Tizen APIs

Test if frames flow only when valve is opened.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Tizen/API] Bugfix on get_state
MyungJoo Ham [Fri, 22 Mar 2019 05:52:17 +0000 (14:52 +0900)]
[Tizen/API] Bugfix on get_state

gst_state should not wait indefinitely. Let's give 100us as the "deadline".

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[IIO] enable automated tests for src IIO
Parichay Kapoor [Tue, 26 Mar 2019 06:41:48 +0000 (15:41 +0900)]
[IIO] enable automated tests for src IIO

1. Added IIO test check in debian rules auto tests
2. Added IIO test in nnstreamer.spec unit tests

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[IIO] register iio source and add test cases
Parichay Kapoor [Mon, 25 Mar 2019 06:50:49 +0000 (15:50 +0900)]
[IIO] register iio source and add test cases

1. Register plugin as a nnstreamer plugin and initialize it
2. Add test case for setting/getting properties of tensor src iio
3. Bug fixes for the bugs found with the tests
Removed srcpad from properties as it is not needed

V2:
- include tensor source in nnstreamer for android build

V3:
- removed srcpad from properties as it is not needed

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Conf] Custom conf keys
MyungJoo Ham [Mon, 25 Mar 2019 06:01:51 +0000 (15:01 +0900)]
[Conf] Custom conf keys

Any subplugins (/ext/) may use this to make custom
configuration keys.

To support custom filters, the header should be exported.
However, for now, let's forget about the need from
custom filters.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years agoUse macro to shorten common codes.
MyungJoo Ham [Mon, 18 Mar 2019 09:51:07 +0000 (18:51 +0900)]
Use macro to shorten common codes.

Use macro for init/exit routines that are same in many functions.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years agoCode clean: use macro for dlog tag name
MyungJoo Ham [Mon, 18 Mar 2019 08:29:26 +0000 (17:29 +0900)]
Code clean: use macro for dlog tag name

Use DLOG_TAG instead of "nnstreamer-capi-pipeline".

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Filter/Tensorflow] fix bug of testcase accepted/tizen/unified/20190326.024547 submit/tizen/20190325.074521
Hyoung Joo Ahn [Mon, 25 Mar 2019 05:09:20 +0000 (14:09 +0900)]
[Filter/Tensorflow] fix bug of testcase

Since the STRING input tensor should be processed differently, the logic was fixed.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
5 years ago[Tizen/API] Implement src/sink/switch/valve handlers
MyungJoo Ham [Fri, 15 Mar 2019 00:44:54 +0000 (09:44 +0900)]
[Tizen/API] Implement src/sink/switch/valve handlers

Tizen-API implementation to handle
- tensor_sink
- app_src
- input_selector
- output_selector
- valve

Unit test cases and code clean/compaction commit will follow soon.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Filter/TFLite] refine the headers
Hyoung Joo Ahn [Mon, 25 Mar 2019 05:20:02 +0000 (14:20 +0900)]
[Filter/TFLite] refine the headers

relocate headers at proper position and remove useless headers

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
5 years ago[IIO] minor bug fixes and changes
Parichay Kapoor [Thu, 21 Mar 2019 11:09:51 +0000 (20:09 +0900)]
[IIO] minor bug fixes and changes

1. using scale and offset
2. removed unused mutex
3. using GST_ERROR_OBJECT() instead of GST_ERROR()
4. using silent debug properly
5. bug fix for setting generic_name in channel properties
6. using G_UNLIKELY with updated cppcheck

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Build] build warning
Jaeyun [Fri, 22 Mar 2019 11:41:53 +0000 (20:41 +0900)]
[Build] build warning

change incorrect header definition

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Tizen/API] Implement start/stop/getstate/destroy with testcases
MyungJoo Ham [Wed, 13 Mar 2019 08:11:37 +0000 (17:11 +0900)]
[Tizen/API] Implement start/stop/getstate/destroy with testcases

Implement Tizen-CAPI, "start/stop/getstate/destroy" for a nnstreamer pipeline.
Add testcases for them.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Subplugin] Remove dlsym subplugin loader
MyungJoo Ham [Tue, 19 Mar 2019 02:36:38 +0000 (11:36 +0900)]
[Subplugin] Remove dlsym subplugin loader

We no longer need dlsym subplugin loader, which make it
incompatible with statically built subplugins.

Subplugins have been calling register_subplugin in its
init functions; thus removing dlsym routines is ok.

Fixes #1130

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[IIO] _create() creates the buffer
Parichay Kapoor [Tue, 19 Mar 2019 07:48:54 +0000 (16:48 +0900)]
[IIO] _create() creates the buffer

Create the buffer, allocate memory for the buffer
Enable setting the timestamp for the buffer by base src
Ignore timestamp channel for now - added in todo

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[IIO] scan data and fill buffer
Parichay Kapoor [Mon, 18 Mar 2019 07:47:48 +0000 (16:47 +0900)]
[IIO] scan data and fill buffer

1. Read the data from IIO device
2. Process the raw data
3. Fill the buffer with processed data
4. Fixing type for all channels data to float32

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[IIO] added scale and offset
Parichay Kapoor [Fri, 15 Mar 2019 11:23:16 +0000 (20:23 +0900)]
[IIO] added scale and offset

Added scale and offset to process raw data.
First get channel specific scale/offset, if available. Secondly, try
generic scale/offset, else use default values.

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Filter/Tensorflow] remove memcpy by getting conf
Hyoung Joo Ahn [Mon, 18 Mar 2019 10:00:39 +0000 (19:00 +0900)]
[Filter/Tensorflow] remove memcpy by getting conf

Through conf, we can avoid the unexpected errors at the specific environment by turning on/off the option(memory optimization).

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
5 years ago[Tizen/API] Add unittest skeleton for Tizen-CAPI (TCT candidate)
MyungJoo Ham [Wed, 13 Mar 2019 02:33:10 +0000 (11:33 +0900)]
[Tizen/API] Add unittest skeleton for Tizen-CAPI (TCT candidate)

This is to be the basis of TCT (Tizen Compliance Test) in the future.

Testing construction & destruction of nnstreamer pipelines
with different elements.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Build] requirement for orc lib
Jaeyun [Thu, 21 Mar 2019 05:15:50 +0000 (14:15 +0900)]
[Build] requirement for orc lib

change dependency of orc lib

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Dist] Do not depend on ssat if it's not neeed. submit/tizen/20190321.045528
MyungJoo Ham [Wed, 20 Mar 2019 11:48:53 +0000 (20:48 +0900)]
[Dist] Do not depend on ssat if it's not neeed.

ssat is required only when unit_test is enabled.
We are not going to enable auto-unit-test in Tizen:Unified.

We will execute auto-unit-test only in Github-CI and
personal gbs for now.
We will enable auto-unit-test in Tizen:Unified after
we submit ssat to tizen.org

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Test/RepoRnn] handle the uninitialized output buffer submit/tizen/20190321.034934
Dongju Chae [Wed, 20 Mar 2019 06:46:17 +0000 (15:46 +0900)]
[Test/RepoRnn] handle the uninitialized output buffer

In tizen, this uninitialized output buffer sometimes causes a wrong result

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Tizen/API] API implementation skeleton
MyungJoo Ham [Fri, 8 Mar 2019 06:18:49 +0000 (15:18 +0900)]
[Tizen/API] API implementation skeleton

This includes Tizen API implementation skeleton
and a constructor of a pipeline.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years agoStart of 0.1.3 RC development v0.1.2
MyungJoo Ham [Wed, 20 Mar 2019 05:59:59 +0000 (14:59 +0900)]
Start of 0.1.3 RC development

From here, it's NNStreamer 0.1.3 Release Candidate Development.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years agoRelease of NNStreamer 0.1.2
MyungJoo Ham [Wed, 20 Mar 2019 05:57:09 +0000 (14:57 +0900)]
Release of NNStreamer 0.1.2

After the nnstreamer summit 5,
https://github.com/nnsuite/nnstreamer/wiki/NNStreamer-Mini-Summit-%235

we are releasing 0.1.2

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years agoUpdated the misspelt words
Dongju Chae [Tue, 19 Mar 2019 07:24:49 +0000 (16:24 +0900)]
Updated the misspelt words

- 'upto' --> 'up to'
- 'there is' --> 'there are'

This commit is for testing my submission envionment.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Conf] Code Clean
MyungJoo Ham [Tue, 19 Mar 2019 00:57:39 +0000 (09:57 +0900)]
[Conf] Code Clean

- nnsconf_load(FALSE) do not process if it's loaded. We do not need to check it before calling it.
- Do not repeat parsing the configuration string (Raw values). Cache it and read the cached values.
- Processing raw values should be completed in nnsconf_load() for caching.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years agoWelcome new member: Dongju Chae
MyungJoo Ham [Tue, 19 Mar 2019 00:45:33 +0000 (09:45 +0900)]
Welcome new member: Dongju Chae

https://github.com/dongju-chae has just joined the group.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Test/Decoder/ImageLabeling] Add test cases for various data types
Wook Song [Fri, 15 Mar 2019 09:46:47 +0000 (18:46 +0900)]
[Test/Decoder/ImageLabeling] Add test cases for various data types

This patch adds more test cases for checking that the 'image labeling'
sub plug-in of tensor_decoder properly works with various data types.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[CONF] add the new variables and method
Hyoung Joo Ahn [Thu, 14 Mar 2019 12:47:09 +0000 (21:47 +0900)]
[CONF] add the new variables and method

to process with int/boolean value, the new variables and method is added.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
5 years ago[CONF] fix a comment of a method
Hyoung Joo Ahn [Thu, 14 Mar 2019 12:46:44 +0000 (21:46 +0900)]
[CONF] fix a comment of a method

fix the invalid comment for the method

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
5 years ago[IIO] setting caps and data configs
Parichay Kapoor [Tue, 12 Mar 2019 07:50:14 +0000 (16:50 +0900)]
[IIO] setting caps and data configs

1. Find caps from data configs based on the device channels
2. Fixate the caps for the pad in _start()
3. Filled _set() and _get() for caps
4. Added feature to merge channels data into 1 tensor
5. Filled _fixate()

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[IIO] enable buffers
Parichay Kapoor [Wed, 13 Mar 2019 04:24:30 +0000 (13:24 +0900)]
[IIO] enable buffers

1. Enabling buffers in _start, disabling buggers in _stop
2. Setting channels data location in buffers
3. Storing only enabled channels
4. Opening the device data buffer file descriptor to be ready to read data
Added some bugfixes and fixes to comments

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[YOCTO] Add enable-opencv-test meson option to remove opencv dep
jijoong.moon [Fri, 15 Mar 2019 09:55:03 +0000 (18:55 +0900)]
[YOCTO] Add enable-opencv-test meson option to remove opencv dep

The only place which has opencv dependency is
custom_exampel_opencv. In order to manage more efficient,
enable-opencv-test meson option is added. If it is true, opencv
example is enabled or disabled, if not.

**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[Decoder] Add GObject vmethod implementation for finalize
Wook Song [Fri, 15 Mar 2019 09:58:35 +0000 (18:58 +0900)]
[Decoder] Add GObject vmethod implementation for finalize

In order to clean up private data of each decoder sub plug-in,
corresponding TensorDecDef.exit() should be invoked by the decoder.
To this end, this patch adds GObject 'finalize' vmethod implementation
to the tensor decoder element.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Test/Transform/Arithmetic] Add test for dynamically changing option string
Wook Song [Thu, 14 Mar 2019 01:43:18 +0000 (10:43 +0900)]
[Test/Transform/Arithmetic] Add test for dynamically changing option string

This patch adds unit test cases for dynamically changing option string
for the 'arithmetic' mode of tensor_transform.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Transform] Handle error due to wrong option string gracefully
Wook Song [Wed, 13 Mar 2019 06:59:47 +0000 (15:59 +0900)]
[Transform] Handle error due to wrong option string gracefully

This patch replaces assertion code for handling wrong option string with
the code returning error code in order to gracefully terminate the
pipeline with proper error messages.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Test/Transform/Arithmetic] Add more test cases
Wook Song [Wed, 13 Mar 2019 06:57:46 +0000 (15:57 +0900)]
[Test/Transform/Arithmetic] Add more test cases

This patch adds more test cases for verifying the 'arithmetic' mode
of the tensor_transform element.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Test/Transform/Arithmetic] Remove unused code from checkResult.py
Wook Song [Wed, 13 Mar 2019 06:46:34 +0000 (15:46 +0900)]
[Test/Transform/Arithmetic] Remove unused code from checkResult.py

This is a trivial patch that removes unused code from the python script
checking the unit test results.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Test/Transform/Arithmetic] Update checkResult script to support integer
Wook Song [Wed, 13 Mar 2019 06:33:29 +0000 (15:33 +0900)]
[Test/Transform/Arithmetic] Update checkResult script to support integer

Since the python script for checking unit test results has only
supported values of floating-point type until now, this patch updates
the script to support integer so that more test cases using integer
values could be added.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Tizen] Native API Draft: Main API Prototype
MyungJoo Ham [Thu, 7 Mar 2019 09:55:31 +0000 (18:55 +0900)]
[Tizen] Native API Draft: Main API Prototype

The prototypes of TIZEN-ML-NNSTREAMER-PIPELINE (Main API set of NNStremaer-Tizen) are defined.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years agoAndroid/ARM64: Updated binary path
Geunsik Lim [Tue, 12 Mar 2019 09:47:15 +0000 (18:47 +0900)]
Android/ARM64: Updated binary path

This commit is trivial. However, the existing statements have to be updated
to give developers a correct instruction. After updating *.mk file, The binary
path is also changed from ../ to ./ folder.

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
5 years ago[IIO] added _get_times
Parichay Kapoor [Tue, 12 Mar 2019 07:56:10 +0000 (16:56 +0900)]
[IIO] added _get_times

Added _get_times to support syncing of buffer for the live source

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Common] Updated copy tensor info
Parichay Kapoor [Wed, 13 Mar 2019 04:58:38 +0000 (13:58 +0900)]
[Common] Updated copy tensor info

Added function to copy tensor_info with variable length

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Test/Transform] Replace existing typecast tests with macro
Wook Song [Tue, 12 Mar 2019 04:45:20 +0000 (13:45 +0900)]
[Test/Transform] Replace existing typecast tests with macro

For convenience, this patch replaces the existing type cast tests (from
typecast_1 to typecast_7) with the macro, TEST_TRANSFORM_TYPECAST.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Test/UnittestPlugins/Transform] Add test cases for properties
Wook Song [Tue, 12 Mar 2019 04:16:25 +0000 (13:16 +0900)]
[Test/UnittestPlugins/Transform] Add test cases for properties

This patch adds unit test cases for setting and getting properties.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Test/Transform/Typecast] Add more test cases
Wook Song [Tue, 12 Mar 2019 02:24:15 +0000 (11:24 +0900)]
[Test/Transform/Typecast] Add more test cases

This patch adds more unit test cases for the typecast mode of the
tensor_transform element.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Test/UnittestPlugins/Transform] Add a macro to test typecast
Wook Song [Tue, 12 Mar 2019 02:01:21 +0000 (11:01 +0900)]
[Test/UnittestPlugins/Transform] Add a macro to test typecast

This patch adds a macro to test typecast mode of the tensor_transform
element for convenience.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Codegen/CustomFilter] Fix typo in boilerplate to be generated
Wook Song [Tue, 12 Mar 2019 09:23:51 +0000 (18:23 +0900)]
[Codegen/CustomFilter] Fix typo in boilerplate to be generated

This is a trivial patch which fixes typo in boilerplate to be generated
by the codegen tool for Custom Filter.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Git] Update .gitignore to ignore files generated by codegen tests
Wook Song [Tue, 12 Mar 2019 09:05:23 +0000 (18:05 +0900)]
[Git] Update .gitignore to ignore files generated by codegen tests

This patch updates .gitignore to exclude files generated by the test
script of codegen.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years agoAndroid/ARM64: Added how to run CLI app with linker64
Geunsik Lim [Tue, 12 Mar 2019 07:48:52 +0000 (16:48 +0900)]
Android/ARM64: Added how to run CLI app with linker64

This commit is to depict how to run nnstreamer-based test application
with linker64 (the ELF interpreter) on the Android 64bit devices.

We assume that you run your test applications in the `/data/nnstreamer/`
folder on the Android devices based on ARM64 CPU. Note that the 'linker64'
file to interpret ELF files is located in the `/data/nnstreamer/libandroid/`
folder.

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
5 years ago[CodeGen] add tensor name
Jaeyun [Mon, 11 Mar 2019 06:45:52 +0000 (15:45 +0900)]
[CodeGen] add tensor name

add lines to set name in tensot-info structure

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Converter] media caps definition
Jaeyun [Mon, 11 Mar 2019 04:52:33 +0000 (13:52 +0900)]
[Converter] media caps definition

move media caps definition to converter.
set template caps for each media type.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Decoder] media caps string
Jaeyun [Mon, 11 Mar 2019 04:15:30 +0000 (13:15 +0900)]
[Decoder] media caps string

set media caps string from decoder sub-plugins.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[IIO] updated comments
Parichay Kapoor [Fri, 8 Mar 2019 01:55:57 +0000 (10:55 +0900)]
[IIO] updated comments

Updated all comments to be compatible with doxygen

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[IIO] Handling queries
Parichay Kapoor [Thu, 7 Mar 2019 07:54:55 +0000 (16:54 +0900)]
[IIO] Handling queries

Handling scheduling query and remaining queries handled with basesrc class
All events are handled by basesrc class

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Converter] move functions to parse media stream
Jaeyun [Fri, 8 Mar 2019 09:48:13 +0000 (18:48 +0900)]
[Converter] move functions to parse media stream

tensor-converter converts all media stream to tensor type.
moves all functions to parse media info into tensor-converter.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Common] Updated return values
Parichay Kapoor [Fri, 8 Mar 2019 10:31:57 +0000 (19:31 +0900)]
[Common] Updated return values

Use return values from function calls while setting up config

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Android] Make concise list of gst plugins for build nnstream & app
jijoong.moon [Thu, 7 Mar 2019 09:43:16 +0000 (18:43 +0900)]
[Android] Make concise list of gst plugins for build nnstream & app

Make BUILDING_BLOCK_LIST more concise. If other plugin are needed,
then add plugin library in BUILDING_BLOCK_LIST

**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[Android] Add NO_AUDIO for video only case
jijoong.moon [Mon, 4 Mar 2019 08:30:49 +0000 (17:30 +0900)]
[Android] Add NO_AUDIO for video only case

There are the cases which has no needs for audio support. In order to
reduce shared library size, NO_AUDIO build Option is added.

**Changes proposed in this PR:**
- Addded NO_AUDIO option for build.
- Modify Android-app.mk and Android-nnstreamer.mk

**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[IIO] Added doxygen entries
Parichay Kapoor [Wed, 6 Mar 2019 07:45:50 +0000 (16:45 +0900)]
[IIO] Added doxygen entries

Added more doxygen entries for the functions
Updated some bugs

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[IIO] Add start/stop for src IIO
Parichay Kapoor [Tue, 5 Mar 2019 08:48:13 +0000 (17:48 +0900)]
[IIO] Add start/stop for src IIO

1. Add reading device and its properties
2. Get device ready to data capture, start function (null->ready state)
3. Filled stop function (ready->null state)

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>