platform/upstream/nnstreamer.git
6 years ago[Decoder] Add comments on decoder plugin APIs
MyungJoo Ham [Tue, 6 Nov 2018 12:04:31 +0000 (21:04 +0900)]
[Decoder] Add comments on decoder plugin APIs

Fill in more doxygen entries and make the header more readable.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Decoder/Plugin] Direct-Video as Plugin
MyungJoo Ham [Tue, 6 Nov 2018 11:50:33 +0000 (20:50 +0900)]
[Decoder/Plugin] Direct-Video as Plugin

Remove direct-video routines from tensordec.c
Make it an example decoder plugin.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Decoder] Enable decoder subplugins
MyungJoo Ham [Tue, 6 Nov 2018 11:39:24 +0000 (20:39 +0900)]
[Decoder] Enable decoder subplugins

Because there will be many decoding mechanisms,
we support subplugins for decoder.

In later commits, we will remove any decoding
mechanisms from the main decoder and the main
decoder (tensordec.c) will only be acting as
main loop for different decoders.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Transform] refactor with common tensor info
Jaeyun [Wed, 7 Nov 2018 11:39:07 +0000 (20:39 +0900)]
[Transform] refactor with common tensor info

change code to use common structure for in/out tensor info

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Decoder] Mode may be unknown with get-property
MyungJoo Ham [Wed, 7 Nov 2018 07:38:21 +0000 (16:38 +0900)]
[Decoder] Mode may be unknown with get-property

If we are using GUI tools or dynamic pipelines,
the initial state may be unknown when a process
probes its mode or states.

Fixes the first subissue of #700

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Filter] null check & die grarefully if not configured.
MyungJoo Ham [Wed, 7 Nov 2018 09:49:38 +0000 (18:49 +0900)]
[Filter] null check & die grarefully if not configured.

To support pipeviz, the 4th subissue of #700 is resolved.

- Check if framework is configured (null check) at gst_tensor_filter_load_tensor_info()
- Don't die, get out gracefully if it is not configured and the pipeline wants to starts though.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[TEST] Change time out logic
sewon.oh [Tue, 6 Nov 2018 09:06:53 +0000 (18:06 +0900)]
[TEST] Change time out logic

To remove overhead, change the logic

Signed-off-by: sewon.oh <sewon.oh@samsung.com>
6 years ago[TEST] change unit test login in pdebuild
sewon.oh [Mon, 5 Nov 2018 09:13:44 +0000 (18:13 +0900)]
[TEST] change unit test login in pdebuild

use ssat instead of testAll.sh

Signed-off-by: sewon.oh <sewon.oh@samsung.com>
6 years ago[Filter] Handle othercap only when it's valid.
MyungJoo Ham [Mon, 5 Nov 2018 08:00:48 +0000 (17:00 +0900)]
[Filter] Handle othercap only when it's valid.

Assume othercap is "ANY" if cap-size is ZERO.

Fixes #549

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Test/Decoder] Fix SSAT usage
MyungJoo Ham [Tue, 6 Nov 2018 11:02:15 +0000 (20:02 +0900)]
[Test/Decoder] Fix SSAT usage

Golden case should be the first parameter for callCompareTest.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years agotools: Added case study of GstShark
Geunsik Lim [Tue, 6 Nov 2018 11:49:05 +0000 (20:49 +0900)]
tools: Added case study of GstShark

This commit is to append case study of GstShark tool.

**Changes proposed in this PR:**
1. Fixed incorrect autogen.sh statement to generate Makefile
2. Added Case study (processing time)

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
6 years ago[Filter/TFLite] remove the not used code
HyoungjooAhn [Tue, 6 Nov 2018 04:36:47 +0000 (13:36 +0900)]
[Filter/TFLite] remove the not used code

the method 'setInputDimension()' is not used in tensorflow_lite.

Signed-off-by: HyoungjooAhn <hello.ahnn@gmail.com>
6 years ago[Mux/Merge] Add time sync option
jijoong.moon [Fri, 2 Nov 2018 05:31:08 +0000 (14:31 +0900)]
[Mux/Merge] Add time sync option

In order to support various time synchronization method, sync_mode and
sync_option is added. Currently the sync mode is SYNC_NOSYNC,
SYNC_SLOWEST, SYNC_BASEPAD(NYI), SYCN_END.

**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 F/W] Unittest coverage update
MyungJoo Ham [Fri, 2 Nov 2018 01:15:55 +0000 (10:15 +0900)]
[Test F/W] Unittest coverage update

Count coverage for /gst/* only!
Remove entries for deleted directories.
Fixes #746

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Example] Custom filter, "dummy LSTM", added
MyungJoo Ham [Fri, 2 Nov 2018 09:32:08 +0000 (18:32 +0900)]
[Example] Custom filter, "dummy LSTM", added

This custom example filer, "dummy LSTM", is for recurrent
neural network test, mentioned in #738, as the second item.

Note that the third item (pipeline with valid recurrences)
requires new features in tensor_mux.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Testcase] Recurrent Network, Input Stream
MyungJoo Ham [Fri, 2 Nov 2018 07:11:36 +0000 (16:11 +0900)]
[Testcase] Recurrent Network, Input Stream

In order to test recurrent neural networks,
we need to implement #738 (we surely need new synchronization
policy from tensor_mux/merge)

As the first step of #738, I, hereby, provide
the 4x4 BGRx video/x-raw steam with frame-sequence
identification marks.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[TEST] reflect unit test result while gbs build
sewon.oh [Mon, 5 Nov 2018 06:07:57 +0000 (15:07 +0900)]
[TEST] reflect unit test result while gbs build

Because of background running, unit test result doesn't reflected.
so fix it.

Signed-off-by: sewon.oh <sewon.oh@samsung.com>
6 years ago[Filter] free memory when allocate-invoke is true
Jaeyun [Mon, 5 Nov 2018 05:16:04 +0000 (14:16 +0900)]
[Filter] free memory when allocate-invoke is true

add code to free memory if allocate-invoke is true.
Related issue : #757

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Transform] Add testcases for transpose
jijoong.moon [Mon, 5 Nov 2018 01:24:27 +0000 (10:24 +0900)]
[Transform] Add testcases for transpose

Add thress trasnpose test cases
1. Tensor 100:50:3:1  --> Tensor 3:100:50:1
2. Tensor 200:100:3:1  --> Tensor 3:200:100:1
3. Tensor 200:100:3:1  --> Tensor 100:200:3:1

**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[Decoder] Refactor mode name array defs
MyungJoo Ham [Sun, 4 Nov 2018 07:49:31 +0000 (07:49 +0000)]
[Decoder] Refactor mode name array defs

We don't want future confusion or inconsistency between
enum values and string values

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years agoTools: Added manual to use GstShark for tracing & profiling
Geunsik Lim [Fri, 2 Nov 2018 06:54:55 +0000 (15:54 +0900)]
Tools: Added manual to use GstShark for tracing & profiling

This commit is to add a manual to use a GstShark tool to support
tracing and profiling method.

GstShark is an open-source project from Ridgerun that provides
benchmarks and profiling tools for GStreamer 1.7.1 (and above).
It includes tracers for generating debug information plus some tools
to analyze the debug information.

**Changes proposed in this PR:**
1. Added how to use GstShark
2. Updated GST_DEBUG_DUMP_DOT_DIR usage for debugging

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
6 years ago[Decoder] Fix TestCase. Properties have been updated.
MyungJoo Ham [Mon, 5 Nov 2018 03:49:08 +0000 (12:49 +0900)]
[Decoder] Fix TestCase. Properties have been updated.

The current decoder testcases are obsolete; it requires
updates in its properties.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years agoBuild Error Fix / Testcases Broken (old commit mixed)
MyungJoo Ham [Mon, 5 Nov 2018 02:34:48 +0000 (11:34 +0900)]
Build Error Fix / Testcases Broken (old commit mixed)

During the recent CI failure, broken testcases (obsolete cases)
were mixed up.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years agoBuild Error Fix / tensor-dec
MyungJoo Ham [Mon, 5 Nov 2018 01:20:23 +0000 (10:20 +0900)]
Build Error Fix / tensor-dec

Somehow recent fix got away from CI. Strange.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Example] add leaky to drop old buffers
Jaeyun [Thu, 1 Nov 2018 06:48:26 +0000 (15:48 +0900)]
[Example] add leaky to drop old buffers

In the example using tf-lite model, add leaky property to drop old buffers (leaky on downstream).

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[TensorDec] add init functions of bounding boxes mode
jinhyuck-park [Thu, 1 Nov 2018 04:39:05 +0000 (13:39 +0900)]
[TensorDec] add init functions of bounding boxes mode

add initial functions of tensor decoder bounding boxes

Signed-off-by: jinhyuck-park <jinhyuck83.park@samsung.com>
6 years ago[Merge/Mux] Extract Common Functions & Data Type
jijoong.moon [Thu, 1 Nov 2018 22:47:15 +0000 (07:47 +0900)]
[Merge/Mux] Extract Common Functions & Data Type

There are duplicated function call such as
gst_tensor_mux(merge)_collect_buffer(). It could be extracted and
rewrite as common function. Also there is duplicated structure
definition called GstTensorMux(Merge)PadData. It is placed in
tensor_common.h.

**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/OpenCV] Add OpenCV custom filter example: Average (#704)
Sangjung Woo [Sun, 4 Nov 2018 12:14:04 +0000 (21:14 +0900)]
[Example/OpenCV] Add OpenCV custom filter example: Average (#704)

* [Example/OpenCV] Add OpenCV custom filter example: Average

This patch newly adds an OpenCV custom filter example, which calculates
the average value of input tensor for each channel. The shape of the
input tensor is [N][y][x][M] and that of the output tensor is
[N][1][1][M].

This example is developed based on
nnstreamer_customfilter_example_average.c file.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
[Touched up a few typos]
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Decoder] We do not need to configure output types.
MyungJoo Ham [Fri, 2 Nov 2018 10:28:57 +0000 (19:28 +0900)]
[Decoder] We do not need to configure output types.

The decoder mode determins output type.
Thus, we do not need to supply output types as properties.

Fixes #667

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Test F/W] Migration of gst-launch testcases to SSAT
MyungJoo Ham [Tue, 30 Oct 2018 11:43:02 +0000 (20:43 +0900)]
[Test F/W] Migration of gst-launch testcases to SSAT

We are going to use ssat for gst-launch-based test cases
( https://github.com/myungjoo/SSAT )

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[TensorMux] Add time synchronization test case
jijoong.moon [Mon, 22 Oct 2018 08:02:07 +0000 (17:02 +0900)]
[TensorMux] Add time synchronization test case

Add test cases to test time synchronization.

1. sink_0 (30FPS), sink_1 (10FPS)
2. sink_0 (30FPS), sink_1 (20FPS)
3. sink_0 (30FPS), sink_1 (20FPS), sink_1 (20FPS)

**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] fix time out error
sewon.oh [Fri, 2 Nov 2018 07:57:43 +0000 (16:57 +0900)]
[TEST] fix time out error

Now, sleep 1 and minus value is 60. so timeout was 10 seconds.
fix that using interval value.

Signed-off-by: sewon.oh <sewon.oh@samsung.com>
6 years ago[Converter] remove unnecessary local variable
Jaeyun [Thu, 1 Nov 2018 02:31:58 +0000 (11:31 +0900)]
[Converter] remove unnecessary local variable

remove unnecessary local variable in chain function

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Converter] unref buffer when creating new buffer
Jaeyun [Wed, 31 Oct 2018 08:38:34 +0000 (17:38 +0900)]
[Converter] unref buffer when creating new buffer

In chain function, add code to unref old buffer when new buffer created.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[TEST] To manage gbs build time, add time limit to './testAll'
sewon.oh [Thu, 25 Oct 2018 02:01:34 +0000 (11:01 +0900)]
[TEST] To manage gbs build time, add time limit to './testAll'

Set a time limit(10min) to prevent './testAll' from getting longer while gbs build.

Signed-off-by: sewon.oh <sewon.oh@samsung.com>
6 years ago[TensorMerge] Add Test case for time synchronization
jijoong.moon [Mon, 22 Oct 2018 06:53:33 +0000 (15:53 +0900)]
[TensorMerge] Add Test case for time synchronization

Add test case for time synchronization

1. test case 0 : sink_0 (30FPS), sink_1 (10FPS)
2. test case 1 : sink_0 (30FPS), sink_1 (20FPS)
3. test case 2 : sink_0 (30FPS), sink_1 (20FPS), sink_2 (10FPS)

**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[TensorMerge] Add Time Synchronization Option
jijoong.moon [Mon, 22 Oct 2018 00:14:26 +0000 (09:14 +0900)]
[TensorMerge] Add Time Synchronization Option

Add synch option to synchronize input tensors;

Default synch option is true. If it is false, it does not care about
time synchronization and merge without time synchronization.

**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[DIST] Style fix removing tabs in the middle.
MyungJoo Ham [Thu, 1 Nov 2018 00:28:55 +0000 (09:28 +0900)]
[DIST] Style fix removing tabs in the middle.

Github diff gets ugly with tabs in the middle.
Replaced tabs with spaces to avoid it.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[CI/Trivial] Add aarch64
MyungJoo Ham [Wed, 31 Oct 2018 09:49:33 +0000 (18:49 +0900)]
[CI/Trivial] Add aarch64

CC: @leemgs @ohsewon
Add aarch64 (arm64) build/unittest check

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[DIST/Trivial] Update version of testapp
MyungJoo Ham [Wed, 31 Oct 2018 09:49:03 +0000 (18:49 +0900)]
[DIST/Trivial] Update version of testapp

It had not been updated accordingly

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[TensorMux] Add Synchronization based on PTS Time with synch option
jijoong.moon [Mon, 22 Oct 2018 01:21:58 +0000 (10:21 +0900)]
[TensorMux] Add Synchronization based on PTS Time with synch option

We need time synchronizatino base on PTS.
If three srcs with 30/1, 20/1, 10/1 framerate for each, then it should
be synchronized according to the latest (10/1).
Whole outputs are based on 0, 100000000200000000 and 300000000
PTS. The other ouputs from other sources are should be dropped.

If there is synch = false option, then it does not drop any of frame,
and mux without no consideration of time synchronization. First frame
should be mux fisrt comes frames from other sources.

**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[tools] replace 'common' with 'tools' for performance
Geunsik Lim [Wed, 31 Oct 2018 03:37:41 +0000 (12:37 +0900)]
[tools] replace 'common' with 'tools' for performance

This commit is to rename the existing folder name from 'common' to 'tools'.
From now on, debugging facilities will be located in ./tools folder.

**Changes proposed in this PR:**
1. Added ./tools folder
2. Added ./tools/READMD.md
   - development, tracing, debugging, and profiling
3. Updated ./tests/README.md
4. Moved the testcase section from /README.md to ./tests/README.md file

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
6 years ago[Common] move common h files
Jaeyun [Wed, 31 Oct 2018 04:36:32 +0000 (13:36 +0900)]
[Common] move common h files

1. move h files info gst/nnstreamer and change cmake to install these files.
2. remove unnecessary def in cmake (INCLUDE_INSTALL_DIR defined {PREFIX}/include)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[TensorMerge] Fix gst_buffer_unref error (#732)
Jijoong Moon [Wed, 31 Oct 2018 09:11:57 +0000 (18:11 +0900)]
[TensorMerge] Fix gst_buffer_unref error (#732)

* [TensorMerge] Fix gst_buffer_unref error

Fix gst_buffer_unref bug.
If this call exist, pad->buffer will be invalid.

Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
6 years ago[Converter/Aggregator] change condition for caps query
Jaeyun [Tue, 30 Oct 2018 12:33:28 +0000 (21:33 +0900)]
[Converter/Aggregator] change condition for caps query

for accept-caps query in sink pad, change condition to set the query result.
(true when caps is fixed)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Merge] change code to compare timestamp
Jaeyun [Tue, 30 Oct 2018 09:43:51 +0000 (18:43 +0900)]
[Merge] change code to compare timestamp

to fix coverity issue, use GST_CLOCK_DIFF to get time-diff of buffer pts time.
(pts is unsigned value, diff of two buffer timestamp always returns unsigned value)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Filter] change model download policy
HyoungjooAhn [Tue, 30 Oct 2018 04:07:38 +0000 (13:07 +0900)]
[Filter] change model download policy

add a flag 'DISABLE_MODEL_DOWNLOAD' and block it at gbs build. It will be improved as rpm packaging for the model files rather than download them.

Signed-off-by: HyoungjooAhn <hello.ahnn@gmail.com>
6 years ago[Filter] remove nnfw callbacks from nnfw property structure
Jaeyun [Mon, 29 Oct 2018 11:52:23 +0000 (20:52 +0900)]
[Filter] remove nnfw callbacks from nnfw property structure

refactor code to remove dependancy of nnfw callbacks

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Merge] fix coverity issue
Jaeyun [Tue, 30 Oct 2018 04:40:15 +0000 (13:40 +0900)]
[Merge] fix coverity issue

fix invalid condition to check timestamp

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Filter] move h files to tensor-filter directory
Jaeyun [Mon, 29 Oct 2018 09:24:37 +0000 (18:24 +0900)]
[Filter] move h files to tensor-filter directory

move tf and tf-lite core h files into tensor-filter directory

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Test] add simple stream test for octet-stream
Jaeyun Jung [Fri, 26 Oct 2018 17:25:03 +0000 (02:25 +0900)]
[Test] add simple stream test for octet-stream

Simple stream test for octet-steam timestamps, newly added property in converter.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Converter] set timestamp when buffer has invalid ts
Jaeyun [Fri, 26 Oct 2018 09:36:39 +0000 (18:36 +0900)]
[Converter] set timestamp when buffer has invalid ts

When set-timestamp is true and incoming buffer has invalid timestamp, set the timestamp using given framerate.
If caps does not include the framerate info, then it will set current time.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Converter] add property to set timestamp
Jaeyun [Fri, 26 Oct 2018 04:37:07 +0000 (13:37 +0900)]
[Converter] add property to set timestamp

add new property set-timestamp with default true.
if set true, tensor-converter will set timestamp when incoming buffer has invalid timestamp.

TODO: add code to set pts and duration with segment later.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Converter] handle segment event in sink pad
Jaeyun [Thu, 25 Oct 2018 10:59:12 +0000 (19:59 +0900)]
[Converter] handle segment event in sink pad

push time formatted segment event to down-stream element.

Later work: we have to handle invalid timestamps of buffer.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[TensorMerge] Add Synchronization based on PTS Time
jijoong.moon [Fri, 19 Oct 2018 07:26:00 +0000 (16:26 +0900)]
[TensorMerge] Add Synchronization based on PTS Time

We need time synchronization based on PTS (GST_FORMAT_TIME).

if there is three src with 10/1, 20/1, 30/1 framerates, then it should
be synchronized as follow.

          src_0              src_1                 src_2
(Synch) 000000000          000000000             000000000 : merged
(Drop)   33333333
(Drop)   66666666           50000000
(Synch)  99999999          100000000             100000000 : merged
(Drop)  133333333
(Drop)  166666666          150000000
(Synch) 199999999          200000000             200000000 : merged
(Drop)  233333333
(Drop)  266666666          250000000
(Synch) 299999999          300000000             300000000 : merged
    ....

In order to do this, gst_tensor_merge_collect_buffer() is modified.

**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 agoRemove unnecessary file, "tensor_meta.*"
MyungJoo Ham [Fri, 26 Oct 2018 16:01:40 +0000 (01:01 +0900)]
Remove unnecessary file, "tensor_meta.*"

We no longer use metadata of tensors.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Filter/TFLite] make better the inefficient code
HyoungjooAhn [Fri, 26 Oct 2018 01:17:05 +0000 (10:17 +0900)]
[Filter/TFLite] make better the inefficient code

get the length of vector before the iteration

Signed-off-by: HyoungjooAhn <hello.ahnn@gmail.com>
6 years ago[Converter] fix to unref old caps event
Jaeyun [Thu, 25 Oct 2018 11:42:25 +0000 (20:42 +0900)]
[Converter] fix to unref old caps event

unref old caps event and push new caps to src pad.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Filter/TFLite] update logic for performance
HyoungjooAhn [Thu, 25 Oct 2018 02:14:29 +0000 (11:14 +0900)]
[Filter/TFLite] update logic for performance

minor changes were applied for performance

Signed-off-by: HyoungjooAhn <hello.ahnn@gmail.com>
6 years ago[Filter/TFLite] remove memcpy after invoke
HyoungjooAhn [Wed, 24 Oct 2018 07:16:20 +0000 (16:16 +0900)]
[Filter/TFLite] remove memcpy after invoke

remove memcpy by adjusting tflite properties

Signed-off-by: HyoungjooAhn <hello.ahnn@gmail.com>
6 years ago[Aggregator] fix new caps event in sink-pad
Jaeyun [Thu, 25 Oct 2018 10:52:42 +0000 (19:52 +0900)]
[Aggregator] fix new caps event in sink-pad

unref old event and push the configured tensor caps to src pad

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[PkgConfig] Use @INCLUDE_INSTALL_DIR@ instead of the hard-coded path
Wook Song [Thu, 25 Oct 2018 07:01:54 +0000 (16:01 +0900)]
[PkgConfig] Use @INCLUDE_INSTALL_DIR@ instead of the hard-coded path

The existing input file for pkg-config uses the hard-coded path,
'/usr/include', to set the location to install the header files. In
order to improve portability, this patch replaces '/usr/include' with
@INCLUDE_INSTALL_DIR@ which is provided from the build script.

Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years ago[TensorDec] refactoring transform function with property
jinhyuck-park [Thu, 25 Oct 2018 07:44:09 +0000 (16:44 +0900)]
[TensorDec] refactoring transform function with property

refactory transform function
from property out-type to property mode

Signed-off-by: jinhyuck-park <jinhyuck83.park@samsung.com>
6 years ago[Aggregator] code clean
Jaeyun [Thu, 25 Oct 2018 04:35:30 +0000 (13:35 +0900)]
[Aggregator] code clean

remove unnecessary code, assertion and local values

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Test] update pkg requirement
Jaeyun [Thu, 25 Oct 2018 04:40:32 +0000 (13:40 +0900)]
[Test] update pkg requirement

add requirement gst-audio to build test apps

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