platform/upstream/nnstreamer.git
6 years ago[Test] change the flag to print logs
Jaeyun [Wed, 24 Oct 2018 11:25:54 +0000 (20:25 +0900)]
[Test] change the flag to print logs

Set default debug flag to false. The examples will not print messages.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Example/OpenCV] Add OpenCV custom filter example
Sangjung Woo [Mon, 22 Oct 2018 16:14:31 +0000 (01:14 +0900)]
[Example/OpenCV] Add OpenCV custom filter example

This patch newly adds the OpenCV custom filter example, which scales an
input tensor of [N][input_h][input_w][M] to an ouput tensor of
[N][output_h][output_w][M]. The shape of an output tensor could set by
custom property as "custom=[new-x]x[new-y]", where new-x and new-y are
unsigned integers.

This example is developed based on
nnstreamer_customfilter_example_scaler_allocator.c file.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
6 years ago[Filter/Custom] Remove unnecessary comment
Sangjung Woo [Wed, 24 Oct 2018 00:30:52 +0000 (09:30 +0900)]
[Filter/Custom] Remove unnecessary comment

After refactoring the filter-framework callbacks, the size in function
parameter was removed since GstTensorMemory object internally contains
its size. However, its function header comment still remains. This patch
removes that unnecessary comment. Moreover, this updates the comment of
input parameter & return values.

Change-Id: I3d5b77dce8e34509d7e084829db0487951144c45
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
6 years ago[CMAKE] Set VERSION to use @VERSION@ in input file of config_file
Wook Song [Wed, 24 Oct 2018 04:21:12 +0000 (13:21 +0900)]
[CMAKE] Set VERSION to use @VERSION@ in input file of config_file

In order to reference variable values using '@VAR@' forms, VAR should be
defined using the 'set' cmake command. However, 'instead of 'VERSION',
since '-DVERSION' is defined using 'add_definitions', @VERSION@ could
not be properly substitued. As a result, the 'Version' field in the
pkg-config file for nnstreamer only contains a white space. This patch
fixes this issue.

Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years ago[Common] fix coverity issue 1035367
Jaeyun [Wed, 24 Oct 2018 02:35:28 +0000 (11:35 +0900)]
[Common] fix coverity issue 1035367

To fix coverity issue, block some lines (logical dead code now)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Filter/Example] update multi objects detection
HyoungjooAhn [Fri, 19 Oct 2018 10:52:35 +0000 (19:52 +0900)]
[Filter/Example] update multi objects detection

Multi-Output Tensor Example: detect the multiple objects through ssd model.

Signed-off-by: HyoungjooAhn <hello.ahnn@gmail.com>
6 years ago[Filter/Custom/Example] Remove unnecessary header
Sangjung Woo [Wed, 24 Oct 2018 02:00:06 +0000 (11:00 +0900)]
[Filter/Custom/Example] Remove unnecessary header

Some included headers actually are not used so this patch removes those
unnecessary headers in code.

Change-Id: Ib40211cd903ccc7a0edbbf4f2377f29688a53803
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
6 years ago[Tensor Decoder] Security: fixed not null termination of strncpy(3)
Geunsik Lim [Tue, 23 Oct 2018 08:09:54 +0000 (17:09 +0900)]
[Tensor Decoder] Security: fixed not null termination of strncpy(3)

Fixed issue #690.

This commit is to fix not null termination issue in strncpy library call
in the tensor decoder element.

strncpy() supposedly protects from buffer overflows. But if it prevents
an overflow without null terminating, in all likelyhood a subsequent
string operation is going to overflow.

**Change proposed in this PR:**
* Version 3:
  1. Commented security, gstreamer structure, and Svace (Won't fix)
  2. Keep Gstreamer (gstbasetextoverlay.c) policy

* Version 2:
  1. Replaced strncpy with memcpy.
  2. Added annotation.

* Version 1:
  1. Fixed not null termination issue of strncpy() by using memset().

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
6 years ago[Filter] get out-caps info from NN model
Jaeyun [Fri, 19 Oct 2018 04:43:01 +0000 (13:43 +0900)]
[Filter] get out-caps info from NN model

when called transform-caps, try to get tensor info from NN model.
if tensor-filter cannot parse the tensor info from in-caps, it will return pad template caps.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Common/Typedef] Correct file name on boilerplate code
Wook Song [Tue, 23 Oct 2018 04:47:22 +0000 (13:47 +0900)]
[Common/Typedef] Correct file name on boilerplate code

This is a trivial patch that corrects the file name on boilerplate code.

Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years ago[Common/Typedef] Include a header file 'stddef.h' to use 'size_t'
Wook Song [Tue, 23 Oct 2018 04:36:10 +0000 (13:36 +0900)]
[Common/Typedef] Include a header file 'stddef.h' to use 'size_t'

Since tensor_typedef.h uses size_t without including any header files
that define it, it is failed to build a custom filter which includes the
tensor_typedef.h when headers defining 'size_t' is not included
anywhere. This patch fixes this issue.

Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years ago[Filter/Custom] remove unnecessary flag
Jaeyun [Tue, 23 Oct 2018 04:09:12 +0000 (13:09 +0900)]
[Filter/Custom] remove unnecessary flag

Custom filter determines output-memory allocation using the function allocate_invoke.
(set true if allocate_invoke defined)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[TensorDec] update mode with bounding boxes
jinhyuck-park [Fri, 19 Oct 2018 01:28:18 +0000 (10:28 +0900)]
[TensorDec] update mode with bounding boxes

change mode type from const char to uint
and add bounding boxes mode

Signed-off-by: jinhyuck-park <jinhyuck83.park@samsung.com>
6 years ago[converter] print timestamp when silent=false
sewon.oh [Fri, 19 Oct 2018 07:45:52 +0000 (16:45 +0900)]
[converter] print timestamp when silent=false

To check timestamp, print pts, dts, duration when debug mode.

Signed-off-by: sewon.oh <sewon.oh@samsung.com>
6 years ago[Common/Test] expand video formats
Jaeyun [Mon, 22 Oct 2018 10:57:02 +0000 (19:57 +0900)]
[Common/Test] expand video formats

1. add video formats for caps negotiation in tensor-converter
2. change code to init tensor dimension
3. add simple stream testcases for added video formats

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Transform/Typecast/Test] Add test cases for casting from float to uint
Wook Song [Mon, 15 Oct 2018 01:28:59 +0000 (10:28 +0900)]
[Transform/Typecast/Test] Add test cases for casting from float to uint

This patch adds test cases for testing typecast from floating point
types to unsigned integer types.

Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years ago[Transform/Typecast] Cast from float to unsigned int via signed int
Wook Song [Mon, 15 Oct 2018 01:28:40 +0000 (10:28 +0900)]
[Transform/Typecast] Cast from float to unsigned int via signed int

In order to provide same results for all architecture, this patch
modifies the typecast policy to use signed integer as an intermediate
type when casting from floating point to unsigned integer.

Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years ago[unittest] Archive unit test result
sewon.oh [Thu, 18 Oct 2018 01:33:07 +0000 (10:33 +0900)]
[unittest] Archive unit test result

archive unit test result using crontab, you can see it on'nnsuite.mooo.com'

Signed-off-by: sewon.oh <sewon.oh@samsung.com>
6 years ago[Mux/Merge] max pad limit
Jaeyun [Thu, 18 Oct 2018 11:26:11 +0000 (20:26 +0900)]
[Mux/Merge] max pad limit

add condition to check max number of sink pad in tensor-mux and tensor-merge

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Example/Test] fix invalid param
Jaeyun [Thu, 18 Oct 2018 06:07:57 +0000 (15:07 +0900)]
[Example/Test] fix invalid param

1. remove invalid param in tensor-sink callbacks
2. update code to get a buffer of text data

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Demux/Split] copy meta from incoming buffer
Jaeyun [Wed, 17 Oct 2018 09:54:16 +0000 (18:54 +0900)]
[Demux/Split] copy meta from incoming buffer

1. add code to copy metadata from incoming buffer
2. remove code about discontinuity flag

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years agoLimit ignore scope for bmp2png
MyungJoo Ham [Fri, 19 Oct 2018 01:23:35 +0000 (10:23 +0900)]
Limit ignore scope for bmp2png

As we are limiting a specific file on a specific path, let's specify the full path.

6 years ago[git ignore] Add list for test generated files.
sewon.oh [Thu, 18 Oct 2018 02:28:48 +0000 (11:28 +0900)]
[git ignore] Add list for test generated files.

It is trivial. Edit git ignore lists for test generated files.

Signed-off-by: sewon.oh <sewon.oh@samsung.com>
6 years ago[TensorMerge] Add Proper GstMemory Generation according to direction
jijoong.moon [Mon, 15 Oct 2018 01:12:13 +0000 (10:12 +0900)]
[TensorMerge] Add Proper GstMemory Generation according to direction

Add gst_tensor_merge_generate_mem function to generate output
GstMemory to push.
Now support linear mode and channel, width, height option.

Assume tensor a is aC:aW:aH:aB and b is bC:bW:bH:bB.
if the mode is linear and channel option,
the output tensor is generated by
  aC+bC:aW:aH:aB ( should be aH==bH, aW==bW and a.type==b.type ).
  That means,

   [[aB][aH][aW][aC,bC]]

if linear and width option,
  aC:aW+bW:aH,aB ( should be aC==bC, aH==bH and a.type==b.type ).

  [[aB][aH][aW,bW][aC]]

if linear and height option
  aC:aW:aH+bH,aB (should be aC==bC, aW==bW and a.type==b.type ).

  [[aB][aH,bH][aW][aC]]

Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
6 years ago[Aggregator] add condition to flush the bytes
Jaeyun Jung [Tue, 16 Oct 2018 15:29:21 +0000 (00:29 +0900)]
[Aggregator] add condition to flush the bytes

add condition to check flush-size (when sets large value to flush the data)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Test] update stream testcase
Jaeyun [Wed, 17 Oct 2018 04:38:03 +0000 (13:38 +0900)]
[Test] update stream testcase

1. add stream test for tensor-aggregator usecase
2. set duration for text/byte stream buffer
3. check invalid buffer in data callback

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Converter/Aggregator] update timestamp
Jaeyun [Tue, 16 Oct 2018 11:26:05 +0000 (20:26 +0900)]
[Converter/Aggregator] update timestamp

1. set timestamp at first frame
2. add duration in output buffer

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Filter/TF-Lite] apply memcpy for output tensors
HyoungjooAhn [Tue, 16 Oct 2018 07:46:55 +0000 (16:46 +0900)]
[Filter/TF-Lite] apply memcpy for output tensors

memcpy is applied for each output tensors of tflite. it should be just temporal solution and be updated with better way.

Signed-off-by: HyoungjooAhn <hello.ahnn@gmail.com>
6 years ago[CI] Change folder structure.
sewon.oh [Thu, 20 Sep 2018 07:50:21 +0000 (16:50 +0900)]
[CI] Change folder structure.

change folder name to use config files by copying instead of linking.

Signed-off-by: Sewon Oh sewon.oh@samsung.com
6 years ago[Mux/Merge] remove unnecessary value
Jaeyun [Mon, 15 Oct 2018 07:00:33 +0000 (16:00 +0900)]
[Mux/Merge] remove unnecessary value

1. remove unnecessary value in pad-data structure
2. add cond to check valid buffer
3. add code to free option string

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[DIST] Ubuntu/Debian packaging version number
MyungJoo Ham [Tue, 16 Oct 2018 09:31:38 +0000 (18:31 +0900)]
[DIST] Ubuntu/Debian packaging version number

Discard date-based obsolete version number.
Use 0.0.3-1rc1 for the rolling release version.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[DIST] Clean up Ubuntu build scripts
MyungJoo Ham [Mon, 15 Oct 2018 11:50:39 +0000 (20:50 +0900)]
[DIST] Clean up Ubuntu build scripts

1. Install the required .a only for Android development
2. Removed unnecessary .so files from being installed
3. Updated description for the dev package to mention that Android developers may use this.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[DIST] Update build scripts
MyungJoo Ham [Mon, 15 Oct 2018 10:22:05 +0000 (19:22 +0900)]
[DIST] Update build scripts

1. (RPM/Tizen) Install related .a files for devel package
2. (CMake) Fix INCLUDE_INSTALL_DIR warning
3. (CMake) Rename ${NAME}Static.a to ${NAME}.a
4. (CMake) Remove meaningless "TARGET_LINK_LIBRARIES" for static libraries

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[0.0.3-rc1] Single-binary is now the stndard release.
MyungJoo Ham [Mon, 15 Oct 2018 09:21:30 +0000 (18:21 +0900)]
[0.0.3-rc1] Single-binary is now the stndard release.

From 0.0.3, single-binary release is the standard.
We start 0.0.3-rc1 with this commit.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years agoRelease 0.0.2 v0.0.2
MyungJoo Ham [Mon, 15 Oct 2018 08:06:02 +0000 (17:06 +0900)]
Release 0.0.2

All test passed with 0.0.2 rc1.
This is the release for 2018.10.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Testcase]Add test case for tensor decoder image labelling
jinhyuck-park [Mon, 15 Oct 2018 02:05:50 +0000 (11:05 +0900)]
[Testcase]Add test case for tensor decoder image labelling

Add test case for tensor decoder for image labelling

Signed-off-by: jinhyuck-park <jinhyuck83.park@samsung.com>
6 years ago[Release] 0.0.2-rc1
MyungJoo Ham [Sat, 13 Oct 2018 07:23:15 +0000 (16:23 +0900)]
[Release] 0.0.2-rc1

If this passes all the release test, this will become 0.0.2 stable.
(Along with the pending PRs)

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Documentation] Update component description
MyungJoo Ham [Sat, 13 Oct 2018 12:31:29 +0000 (21:31 +0900)]
[Documentation] Update component description

1. Fix URL errors
2. Update component info as we have a lot of changes with v0.0.2

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Utility] For demo, create a shell script loading model/label
MyungJoo Ham [Sat, 13 Oct 2018 07:14:21 +0000 (16:14 +0900)]
[Utility] For demo, create a shell script loading model/label

For the demonstration, provide a shell script that gets
the standard example tflite model and its labeling file

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Single Binary] Merge all elements into a single plugin binary
MyungJoo Ham [Fri, 12 Oct 2018 13:20:42 +0000 (22:20 +0900)]
[Single Binary] Merge all elements into a single plugin binary

Now we have all nnstreamer elements in a single plugin binary.

Note that enabling tensorflow, which is WIP, will break the result.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Single Binary] Merge decoder, demux
MyungJoo Ham [Fri, 12 Oct 2018 07:02:00 +0000 (16:02 +0900)]
[Single Binary] Merge decoder, demux

1. Merge decoder,demux for the new build scheme.
2. Rephrase related code of aggregator, converter

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Common] move common c files to gst/nnstreamer
MyungJoo Ham [Sat, 13 Oct 2018 07:04:22 +0000 (16:04 +0900)]
[Common] move common c files to gst/nnstreamer

Use /common/ for common utilities, not source files
Use /gst/nnstreamer/ for common source files.

This will make it easier to be upstreamed to GST communities later.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Cmake/CleanUp] Clean up cmake main logic
MyungJoo Ham [Sat, 13 Oct 2018 06:52:55 +0000 (15:52 +0900)]
[Cmake/CleanUp] Clean up cmake main logic

1. Disable tensorflow by default. Enable it when tensorflow support is completed.

2. Dismangled tizen/gtest dependency logic

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[TensorMerge] fix Dereference before null check
jijoong.moon [Fri, 12 Oct 2018 00:20:59 +0000 (09:20 +0900)]
[TensorMerge] fix Dereference before null check

Fix the derefrencing bug before null check

**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>
6 years ago[Transform/Common] code clean
Jaeyun [Thu, 11 Oct 2018 10:36:08 +0000 (19:36 +0900)]
[Transform/Common] code clean

1. use common functions and structure in tensor-transform
2. add macros to print debug message
3. remove functions to parse caps (get_tensor_from_padcap, get_tensor_from_structure in common)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Single Binary] Merge converter and aggregator into a single plugin binary
MyungJoo Ham [Thu, 11 Oct 2018 08:38:15 +0000 (17:38 +0900)]
[Single Binary] Merge converter and aggregator into a single plugin binary

This is a pilot program for #628

We are going to merge all nnstreamer plugins into one single plugin binary.

Use -DSINGLE_BINARY to generate a single plugin binary with all plugin elements.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Transform/Arithmetic/Test] Add test cases for add-mul and mul-add
Wook Song [Thu, 11 Oct 2018 07:11:59 +0000 (16:11 +0900)]
[Transform/Arithmetic/Test] Add test cases for add-mul and mul-add

This patch adds test cases for testing newly added operators, add-mul
and mul-add.

Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years ago[Transform/Arithmetic/Test] Update test checking API for fused operators
Wook Song [Thu, 11 Oct 2018 06:58:16 +0000 (15:58 +0900)]
[Transform/Arithmetic/Test] Update test checking API for fused operators

This patch updates the test checking API to support the fused add-mul
and fused mul-add operators. According to this change, the existing
tests are slightly modified as well.

Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years ago[Transform/Arithmetic] Support fused add-mul and mul-add operators
Wook Song [Thu, 11 Oct 2018 06:53:55 +0000 (15:53 +0900)]
[Transform/Arithmetic] Support fused add-mul and mul-add operators

This patch adds two operators, fused add-mul and fused mul-add, to the
Arithmetic mode of the transform plugin.

Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years ago[Transform/Arithmetic/Test] Add test cases for floating-point operand
Wook Song [Thu, 11 Oct 2018 01:19:29 +0000 (10:19 +0900)]
[Transform/Arithmetic/Test] Add test cases for floating-point operand

This patch adds more test cases for testing the Arithmetic mode of the
Transform plug-in with floating-point operands.

Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years ago[Transform/Arithmetic] Support operand value of floating point type
Wook Song [Wed, 10 Oct 2018 08:05:08 +0000 (17:05 +0900)]
[Transform/Arithmetic] Support operand value of floating point type

Since the data type of the operand is fixed to 'int64_t', the Arithmetic
mode cannot properly handle operand values of the floating point type
such as 2.3, -10.5, and -9.900000e-001. This patch supports such
floating-point operand values by using the data type, double.

Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years ago[Sink] code clean
Jaeyun [Fri, 12 Oct 2018 03:41:09 +0000 (12:41 +0900)]
[Sink] code clean

add function prefix to prepare single bin

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Common] check max tensor size limit
Jaeyun [Fri, 12 Oct 2018 05:48:39 +0000 (14:48 +0900)]
[Common] check max tensor size limit

update code to check array size limit, tensors max is now 16.

Related issue : #635

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Example App]Add tensor decoder image labelling App
jinhyuck-park [Fri, 12 Oct 2018 06:11:24 +0000 (15:11 +0900)]
[Example App]Add tensor decoder image labelling App

Add tensor decoder image labelling app
only use gst sub plugins including tensor decoder

Signed-off-by: jinhyuck-park <jinhyuck83.park@samsung.com>
6 years ago[TensorDec] update tensor decoder for proper working
jinhyuck-park [Thu, 11 Oct 2018 22:18:38 +0000 (07:18 +0900)]
[TensorDec] update tensor decoder for proper working

Update tensor decoder for proper working
set caps and some minor updates

Signed-off-by: jinhyuck-park <jinhyuck83.park@samsung.com>
6 years ago[Transform] Fix transpose
jijoong.moon [Mon, 8 Oct 2018 04:54:03 +0000 (13:54 +0900)]
[Transform] Fix transpose

There was wrong tensro and C array index.
Batch should be last index.
Before this patch, the batch is the first index of C array or Tensor.

**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>
6 years ago[Test/Transform] Add test cases for typecast between float and integer
Wook Song [Fri, 5 Oct 2018 05:59:37 +0000 (14:59 +0900)]
[Test/Transform] Add test cases for typecast between float and integer

This patch adds more test cases for testing the typecast operation
between floating point types and integer types.

Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years ago[TensorMerge] Add draft tensor_merge plugin
jijoong.moon [Tue, 2 Oct 2018 06:22:47 +0000 (15:22 +0900)]
[TensorMerge] Add  draft tensor_merge plugin

we need tensor_merge to merge tensor. It make multiple tensor into
single tensor. After this PR, C:W:H:B ([B][H][W][C]) +
C:W:H:B ([B][H][W][C]) --> W:H:2xC:B ([B][2xC][H][W]).
Therefore, if you want to use this as input for tensorflow lite, you
may need transform element,
with transpose mode. ( mode=transpose, option=2:0:1:3. It produce
2xC:W:H:B ([B][H][W][2xC]).

**Changes proposed in this PR:**
- Added Tensor merge plugin

**TODO**
- Add Multiple direction merge : Width, Height or mixed.
- Better handling to reduce memcopy.

**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>
6 years ago[Transform] Add Test Case for transform/standardization mode
jijoong.moon [Tue, 9 Oct 2018 23:34:50 +0000 (08:34 +0900)]
[Transform] Add Test Case for transform/standardization mode

Add Test Case for standardization mode.
Compare the result with python and approval diff is
-0.01 < diff < 0.01. (application/octet-stream mime is used.)

**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>
6 years ago[Aggregator] update code to concatenate data with axis
Jaeyun [Wed, 10 Oct 2018 11:54:45 +0000 (20:54 +0900)]
[Aggregator] update code to concatenate data with axis

update data concatenation for the axis (frames-dim)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Comment Fix] Fix broken URLs in comments / docs
MyungJoo Ham [Mon, 8 Oct 2018 07:10:00 +0000 (16:10 +0900)]
[Comment Fix] Fix broken URLs in comments / docs

There have been old URLs that cannot be accessed.
Fix them all.

There are a few off-topic changes due to recently enforced
coding style/rule of CI/CD system.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Aggregator] update code to concatenate output
Jaeyun [Wed, 10 Oct 2018 04:23:10 +0000 (13:23 +0900)]
[Aggregator] update code to concatenate output

1. add property concat (default true, to do the concatenation)
2. add functions to check dimension before pushing the buffer into source pad

TODO : update concat code with the axis

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[CoC Update] Update due to recent turmoil at LKML
MyungJoo Ham [Fri, 28 Sep 2018 03:54:10 +0000 (12:54 +0900)]
[CoC Update] Update due to recent turmoil at LKML

The COC we are based on appears to be based on postmeritocracy with political intentions.
Before moving on the the official nnsuite CoC, I suggest to use this temporarily updated one.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Test] update stream testcase
Jaeyun [Wed, 10 Oct 2018 04:29:42 +0000 (13:29 +0900)]
[Test] update stream testcase

1. add tc to change dimension in output tensor (tensor-aggregator)
2. change output dimension for octet-stream (tensor-converter)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Transform] Add Standardization Mode in Tranform Plugin
jijoong.moon [Thu, 4 Oct 2018 07:32:35 +0000 (16:32 +0900)]
[Transform] Add Standardization Mode in Tranform Plugin

Add Standardization Mode (mode=stand, option=default). Could be added
more methods.

for Tensor T,
: out[i] = fabs((T[i] - average(T)) / (stand(T) + 1e-10))

**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>
6 years ago[Transform] Remove hard coded values in transform
jijoong.moon [Wed, 10 Oct 2018 02:00:34 +0000 (11:00 +0900)]
[Transform] Remove hard coded values in transform

Use NNS_TENSOR_RANK_LIMIT instead of 4 for transpose.

Resolves: #537

**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>
6 years ago[Converter] fix coverity issue 1034478
Jaeyun [Wed, 10 Oct 2018 02:18:37 +0000 (11:18 +0900)]
[Converter] fix coverity issue 1034478

1. add condition to check frame size (divide by zero)
2. remove debug message (unnecessary to print frames)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Aggregator] fix out-tensor dimension
Jaeyun [Mon, 8 Oct 2018 04:18:18 +0000 (13:18 +0900)]
[Aggregator] fix out-tensor dimension

update output dimension with the properties frames-dim, frames-out.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Converter] support byte-stream
Jaeyun [Mon, 8 Oct 2018 03:50:13 +0000 (12:50 +0900)]
[Converter] support byte-stream

add new properties input-dim and input-type to get tensor info from byte-stream (application/octet-stream)
add testcase for byte-stream

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Common] initial commit to add a type of byte-stream
Jaeyun [Thu, 4 Oct 2018 07:36:58 +0000 (16:36 +0900)]
[Common] initial commit to add a type of byte-stream

1. define new type for byte-stream (application/octet-stream)
2. refactor functions to get tensor config

TODO: need to update tensor-converter later

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Converter/Aggregator] update timestamp
Jaeyun [Tue, 2 Oct 2018 12:12:28 +0000 (21:12 +0900)]
[Converter/Aggregator] update timestamp

set timestamp with distance (bytes from pts)

if frames-in is larger than frames-out, it will set same timestamp.
in this case, elements update timestamp with distance.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[TensorDec] Add install properties in tensor decoder init
jinhyuck-park [Thu, 4 Oct 2018 06:18:13 +0000 (15:18 +0900)]
[TensorDec] Add install properties in tensor decoder init

Add install properties mode and mode-option-1 for tensor decoder
processing image labeling

Signed-off-by: jinhyuck-park <jinhyuck83.park@samsung.com>
6 years ago[Example] change plugin to get scaled video frame from v4l2
Jaeyun [Thu, 4 Oct 2018 07:46:29 +0000 (16:46 +0900)]
[Example] change plugin to get scaled video frame from v4l2

1. change to videoscale to set 640x480 frame
2. remove framerate in caps filter

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[SVACE-Fix] Fix 376961 / str without termination
MyungJoo Ham [Thu, 4 Oct 2018 05:23:35 +0000 (14:23 +0900)]
[SVACE-Fix] Fix 376961 / str without termination

Fixed error: WID:57241610 Copying from string 'label' to 'out_info.data' without null termination at tensordec.c:743 by calling function 'strncpy'.
Reference: https://stackoverflow.com/questions/1453876/why-does-strncpy-not-null-terminate

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Common] update condition to validate tensor config
Jaeyun [Thu, 4 Oct 2018 02:36:29 +0000 (11:36 +0900)]
[Common] update condition to validate tensor config

update condition about framerate, denominator should be larger than 0.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Mux/Decoder] fix coverity issue
Jaeyun [Tue, 2 Oct 2018 12:52:47 +0000 (21:52 +0900)]
[Mux/Decoder] fix coverity issue

fix coverity issue 1030251, 1030250 in tensor-decoder and tensor-mux

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Demux/Transform] add code to free string
Jaeyun [Tue, 2 Oct 2018 05:59:56 +0000 (14:59 +0900)]
[Demux/Transform] add code to free string

add code to free the array of strings

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Split] remove rank and fix mem leak
Jaeyun [Tue, 2 Oct 2018 04:28:09 +0000 (13:28 +0900)]
[Split] remove rank and fix mem leak

1. remove rank in caps and use common structure to get tensor caps
2. add code to free the array of strings

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[SVACE] fix CID 1030252, CID 1030251 issues
jinhyuck-park [Tue, 2 Oct 2018 04:49:49 +0000 (13:49 +0900)]
[SVACE] fix CID 1030252, CID 1030251 issues

SVACE issues fix for tensor decoder

Signed-off-by: jinhyuck-park <jinhyuck83.park@samsung.com>
6 years ago[Test] add stream tc with tensor-split
Jaeyun [Tue, 2 Oct 2018 06:29:04 +0000 (15:29 +0900)]
[Test] add stream tc with tensor-split

add stream testcase with tensor-split to check out buffers

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[example/custom] Fix coverity issue.
MyungJoo Ham [Tue, 2 Oct 2018 04:14:05 +0000 (13:14 +0900)]
[example/custom] Fix coverity issue.

Do not check if it's < 0 if it's unsigned.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Test] add stream testcases
Jaeyun [Mon, 1 Oct 2018 07:32:37 +0000 (16:32 +0900)]
[Test] add stream testcases

1. stream test for newly added audio format
2. stream test for multi-tensors with tensor-demux
3. add testcase for no signal case from tensor-sink

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Common] expand audio format
Jaeyun [Mon, 1 Oct 2018 07:29:36 +0000 (16:29 +0900)]
[Common] expand audio format

add audio format (signed/unsigned 32bit, floating point 32/64bit)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Document/CodeClean] update description and debug messages
Jaeyun [Mon, 1 Oct 2018 08:17:01 +0000 (17:17 +0900)]
[Document/CodeClean] update description and debug messages

change log messages in tensor-sink
add description for properties and signals in tensor-sink
fix property name in tensor-converter doc

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[tensorDec] Implement copy label string to out buffer
jinhyuck-park [Mon, 1 Oct 2018 05:31:18 +0000 (14:31 +0900)]
[tensorDec] Implement copy label string to out buffer

Implement set out buffer with updated image label text

Signed-off-by: jinhyuck-park <jinhyuck83.park@samsung.com>
6 years ago[Common] change tensor type of string
Jaeyun [Fri, 28 Sep 2018 07:13:58 +0000 (16:13 +0900)]
[Common] change tensor type of string

for text stream, change tensor type to uint8

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Test] update testcases
Jaeyun [Fri, 28 Sep 2018 05:22:35 +0000 (14:22 +0900)]
[Test] update testcases

1. [sink] add flag to check timestamp and failure case
2. [sink] change tensor type of string
3. [common] add testcase for dimension string

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[boilerplate] fix broken links
Sangjung Woo [Fri, 28 Sep 2018 07:09:07 +0000 (16:09 +0900)]
[boilerplate] fix broken links

This patch fixes the broken links instead of 'TO-BE-DETERMINED-SOON'
comment on boilerplate code.

Change-Id: I6776096752a5d52829043cd3ab9d9584154752d2
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
6 years ago[Common] add function to get tensor size
Jaeyun [Fri, 28 Sep 2018 04:22:11 +0000 (13:22 +0900)]
[Common] add function to get tensor size

add function to get date size with GstTensorInfo
and refactor elements and examples

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Demux] change default property value
Jaeyun [Thu, 27 Sep 2018 12:04:53 +0000 (21:04 +0900)]
[Demux] change default property value

change default property value (set default value true)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Mux] set timestamp in output buffer
Jaeyun [Thu, 27 Sep 2018 12:00:19 +0000 (21:00 +0900)]
[Mux] set timestamp in output buffer

1. add timestamp (pts and dts) in output buffer
2. change default property value (silent true)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Mux] fix coverity issue (1029508)
Jaeyun [Thu, 27 Sep 2018 10:09:33 +0000 (19:09 +0900)]
[Mux] fix coverity issue (1029508)

Add log message and remove unnecessary state.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Test/Meta] remove dependency of tensor-meta
Jaeyun [Thu, 27 Sep 2018 06:29:15 +0000 (15:29 +0900)]
[Test/Meta] remove dependency of tensor-meta

1. Refactor test plugins to remove tensor-meta.
(these elements are for testing multi-tensors only)
2. Remove unnecessary header in saveload.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Document/Sink] update README.md about tensor-sink
Jaeyun [Thu, 27 Sep 2018 08:03:18 +0000 (17:03 +0900)]
[Document/Sink] update README.md about tensor-sink

Update README.md file for the element tensor-sink.

Related issue: #490

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[TensorDec] Add functions regarding image labeling in tensor decoder
jinhyuck-park [Sat, 22 Sep 2018 05:16:33 +0000 (14:16 +0900)]
[TensorDec] Add functions regarding image labeling in tensor decoder

Add functions regarding image labeling
in tensor decoder

Signed-off-by: jinhyuck-park <jinhyuck83.park@samsung.com>
6 years ago[Filter/TF-Lite] refactor to reduce repeated code
MyungJoo Ham [Fri, 21 Sep 2018 05:47:00 +0000 (14:47 +0900)]
[Filter/TF-Lite] refactor to reduce repeated code

Let's not repeat the same code for switch cases.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[TensorSplit] Fix Tensor dimension type assign
jijoong.moon [Thu, 20 Sep 2018 02:01:23 +0000 (11:01 +0900)]
[TensorSplit] Fix Tensor dimension type assign

When we write tensor dimension, it should be [C][W][H][B].
But before this PR, it considered C array type [B][H][W][C].

Resolves: #538

**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>
6 years ago[Example/FilterPerformanceProfile] Fix coverity analysis error 1029509
Wook Song [Fri, 21 Sep 2018 02:33:59 +0000 (11:33 +0900)]
[Example/FilterPerformanceProfile] Fix coverity analysis error 1029509

This patch adds an initialization of a structure variable to fix the
coverity analysis error 1029509: Uninitialized scalar variable.

Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years ago[Example/FilterPerformanceProfile] Fix coverity analysis error 1029505
Wook Song [Fri, 21 Sep 2018 02:28:22 +0000 (11:28 +0900)]
[Example/FilterPerformanceProfile] Fix coverity analysis error 1029505

This patch removes logically dead code, which is duplicated by mistake.

Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years ago[Example/FilterPerformanceProfile] Revise file header comment
Wook Song [Fri, 21 Sep 2018 02:11:18 +0000 (11:11 +0900)]
[Example/FilterPerformanceProfile] Revise file header comment

This patch revises the file header comment by removing unneeded lines
and fixing a misalignment comment line due to the indentation mistake.

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