platform/upstream/nnstreamer.git
5 years ago[Filter/TFLite] init tensor info
Jaeyun [Mon, 19 Nov 2018 11:29:51 +0000 (20:29 +0900)]
[Filter/TFLite] init tensor info

Add code to init tensor info structure.
(This update is to fix coverity issue)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Meson] Initial commit of meson build
sewon.oh [Thu, 15 Nov 2018 01:43:12 +0000 (10:43 +0900)]
[Meson] Initial commit of meson build

Initial commit of meson. This commit's goal is to make single binary.

Signed-off-by: sewon.oh <sewon.oh@samsung.com>
5 years agoTools: Adde how to use Gstreamer Debugger (gst-debugger)
Geunsik Lim [Mon, 19 Nov 2018 07:07:59 +0000 (16:07 +0900)]
Tools: Adde how to use Gstreamer Debugger (gst-debugger)

Fixed issue 132#issuecomment-439788784.

This commit is to explain how to use a Gstreamer Debugger tool to
introspect a gst-pipeline remotely with a graphical client.

**Changes proposed in this PR:**
* Version 2:
1. Added GStreamer-based totem player as an example

* Version 1:
1. Added How to use Gstreamer debugger
2. Added How to patch ver 0.90.0 to build on Ubuntu 16.04

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
5 years ago[Filter/TFLite] support dynamic model
HyoungjooAhn [Mon, 19 Nov 2018 06:50:11 +0000 (15:50 +0900)]
[Filter/TFLite] support dynamic model

User open tflite model when a model is already loaded, compare it with previous one and if it is different, make the  object the new one with new model.

Signed-off-by: HyoungjooAhn <hello.ahnn@gmail.com>
5 years ago[Test/Transform] add tc to test changed arith mode option
Jaeyun [Mon, 19 Nov 2018 07:06:49 +0000 (16:06 +0900)]
[Test/Transform] add tc to test changed arith mode option

1. add new testcases for changed arith mode using gst-harness
2. update the pipeline in object detection example

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Transform] refactor arith/typecast
Jaeyun [Wed, 14 Nov 2018 09:31:18 +0000 (18:31 +0900)]
[Transform] refactor arith/typecast

refactor arith/typecast to handle arithmetic in sequence

1. add operands and handle tensor element with parsed option
2. add common functions for the operators
3. remove multi-op (add-mul and mul-add) and handle operator in sequence

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Decoder] option-3 is not enough. Increase to 9
MyungJoo Ham [Mon, 19 Nov 2018 02:38:53 +0000 (11:38 +0900)]
[Decoder] option-3 is not enough. Increase to 9

- Refactor option handling codes to handle much more without
damaging code readability.
- Fix decoder parameters in test cases / examples.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years agoTools: Added how to use Hawktracer for profiling
Geunsik Lim [Mon, 19 Nov 2018 05:24:29 +0000 (14:24 +0900)]
Tools: Added how to use Hawktracer for profiling

This commit is append to how to use Hawktracer for profiling.

* HawkTracer:
It is a highly portable, low-overhead, configurable profiling tool
built in Amazon Video for getting performance metrics from low-end devices.

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
5 years ago[Filter/TFLite] fix bug
HyoungjooAhn [Fri, 16 Nov 2018 02:19:59 +0000 (11:19 +0900)]
[Filter/TFLite] fix bug

fix NULL ptr error by adding initialize function

Signed-off-by: HyoungjooAhn <hello.ahnn@gmail.com>
5 years ago[Test] print log if failed to remove temp file
Jaeyun [Mon, 19 Nov 2018 03:54:40 +0000 (12:54 +0900)]
[Test] print log if failed to remove temp file

Add logs if failed to remove temp file for unit-test.
(These changes are to resolve coverity issues)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Dist/Debian] Only enable tensorflow-dev when building amd64 and arm64
Sangjung Woo [Mon, 19 Nov 2018 01:21:23 +0000 (10:21 +0900)]
[Dist/Debian] Only enable tensorflow-dev when building amd64 and arm64

Since tensorflow-dev package is only built for amd64 and arm64 on
launchpad.net, nnstreamer for armhf and i386 count not be built. In
order to solve this issue, this patch only enables the tensorflow-dev
Build-Depends when building amd64 and arm64 architecture.

Change-Id: Ie69058450fc1f05424063536b2afd0ecb140757e
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years agoSupport Multi-Tensor for Input
MyungJoo Ham [Fri, 16 Nov 2018 05:21:25 +0000 (14:21 +0900)]
Support Multi-Tensor for Input

Now, decoder plugins may have multi-tensors as their input stream.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Example/FilterPerformanceProfile] Fix on capsfilter
Hwansoon Sung [Sat, 17 Nov 2018 12:04:45 +0000 (21:04 +0900)]
[Example/FilterPerformanceProfile] Fix on capsfilter

This patch fixed a typo found at capsfilter's "height" property.
Having it fixed, we were able to run the example successfully
along with our MIPI camera on ARTIK devkit.

Signed-off-by: Hwansoon Sung <hs2704.sung@samsung.com>
5 years ago[Merge/Mux] Add test cases for conner cases
jijoong.moon [Mon, 12 Nov 2018 00:20:50 +0000 (09:20 +0900)]
[Merge/Mux] Add test cases for conner cases

Added test cases for basedpad mode with "option=0" and "option=0:0"

**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] Fully pluginize decoders
MyungJoo Ham [Thu, 15 Nov 2018 06:54:08 +0000 (15:54 +0900)]
[Decoder] Fully pluginize decoders

Remove all decoder implenmentations from decoder main.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Decoder] Pluginize image labeling
MyungJoo Ham [Wed, 14 Nov 2018 12:23:44 +0000 (21:23 +0900)]
[Decoder] Pluginize image labeling

Pluginize the image labeling mechanism.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Common] add todo item on comparing framerates.
MyungJoo Ham [Thu, 15 Nov 2018 06:29:59 +0000 (15:29 +0900)]
[Common] add todo item on comparing framerates.

1/2 == 2/4. Don't assert they are different.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Tools] Update getTestModels after path migration
MyungJoo Ham [Thu, 15 Nov 2018 06:29:28 +0000 (15:29 +0900)]
[Tools] Update getTestModels after path migration

Because getTestModels.sh has been moved, the path description
in the script should be updated as well.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Common] Provide union of tensor elements.
MyungJoo Ham [Wed, 14 Nov 2018 12:22:41 +0000 (21:22 +0900)]
[Common] Provide union of tensor elements.

This makes C++ template-like usage of tensor elements EASIER.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Example] change free function
Jaeyun [Thu, 15 Nov 2018 10:12:05 +0000 (19:12 +0900)]
[Example] change free function

change function to free list (elements in the list contain the dynamic-allocated memory, we should free all these elements)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[DOC] write how to build with meson
sewon.oh [Fri, 16 Nov 2018 09:40:20 +0000 (18:40 +0900)]
[DOC] write how to build with meson

write how to install and build with meson.

Signed-off-by: sewon.oh <sewon.oh@samsung.com>
5 years ago[Test] update code to remove warning
Jaeyun Jung [Wed, 14 Nov 2018 18:22:21 +0000 (03:22 +0900)]
[Test] update code to remove warning

use glib to get temp filename and to read data from file

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Decoder] Add one more option
MyungJoo Ham [Thu, 15 Nov 2018 08:25:37 +0000 (17:25 +0900)]
[Decoder] Add one more option

Until we fix #837, I'll keep adding mode-options whenever needed.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Example] update exam pipeline using decoder
Jaeyun [Thu, 15 Nov 2018 02:48:29 +0000 (11:48 +0900)]
[Example] update exam pipeline using decoder

change decode mode direct video to play video sink

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years agodoc: Fixed an incorrect link
Geunsik Lim [Thu, 15 Nov 2018 04:21:14 +0000 (13:21 +0900)]
doc: Fixed an incorrect link

It is trivial. This commit is to fix incorrect link address
of TAOS-CI configruation folder.

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
5 years ago[Tests] Upgrade framecounter custom filter
MyungJoo Ham [Fri, 9 Nov 2018 06:15:50 +0000 (15:15 +0900)]
[Tests] Upgrade framecounter custom filter

- For local internal testing, use custom option to make printouts
- For further synchronization testing, use custom option to add usleep()

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Tools] Split one file into four sub-files.
Geunsik Lim [Wed, 14 Nov 2018 11:30:21 +0000 (20:30 +0900)]
[Tools] Split one file into four sub-files.

This commit is to split existing one file into four files.
* before: Tools
* after : development, debugging, tracing, and profiling

**Changes proposed in this PR:**
1. Added 4 folders
2. Re-organized the existing sections

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
5 years ago[Decoder] trivial fix on option property init.
MyungJoo Ham [Wed, 14 Nov 2018 10:54:25 +0000 (19:54 +0900)]
[Decoder] trivial fix on option property init.

Critical typo fixed. Option2 --> Option1

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Mux/Merge] Fix time synchronization buf for cornner cases
jijoong.moon [Fri, 9 Nov 2018 07:01:10 +0000 (16:01 +0900)]
[Mux/Merge] Fix time synchronization buf for cornner cases

For the basepad options with 0 and maximum duration, current
implementation is not work properly. In order to support this
situation, base time is decided min(duration, pts(nth)-pts(n-1 th)-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>
5 years ago[Converter] Don't die for inappropriate properties
MyungJoo Ham [Wed, 14 Nov 2018 04:36:27 +0000 (13:36 +0900)]
[Converter] Don't die for inappropriate properties

Simply make warning messages for incorrect dimension/type.
Pipeviz tool may give you NULL values if not configured.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Filter] Support pipeviz with tensor_filter
MyungJoo Ham [Mon, 12 Nov 2018 08:11:49 +0000 (17:11 +0900)]
[Filter] Support pipeviz with tensor_filter

1. Make "open" vmethod to return status. Handle
the error if "open" returns "fail". Don't die with assert.

2. Handle inappropriate property values. Don't die with such.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Decoder/direct_video] Pipeline may allocate buffer for you already
MyungJoo Ham [Wed, 7 Nov 2018 09:38:52 +0000 (18:38 +0900)]
[Decoder/direct_video] Pipeline may allocate buffer for you already

Do not die when the pipeline has already allocated the exact
size of buffer for you. Just reuse what's already there.

This fixes the 3rd subissue of #700.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[TEST] use ssat instead of testAll.sh
sewon.oh [Fri, 9 Nov 2018 07:55:04 +0000 (16:55 +0900)]
[TEST] use ssat instead of testAll.sh

For archive unit test result, use ssat

Signed-off-by: sewon.oh <sewon.oh@samsung.com>
5 years ago[TEST] Add flag for unit test
sewon.oh [Tue, 13 Nov 2018 02:32:16 +0000 (11:32 +0900)]
[TEST] Add flag for unit test

Able to choice whether unit test or not. So I think no more need time out flag. therefore add unit test flag and remove timeout flag

Signed-off-by: sewon.oh <sewon.oh@samsung.com>
5 years ago[GBS] Add timeout flag
sewon.oh [Fri, 9 Nov 2018 07:00:03 +0000 (16:00 +0900)]
[GBS] Add timeout flag

For test or other reasons, add timeout flag to gbs build.

Signed-off-by: sewon.oh <sewon.oh@samsung.com>
5 years ago[Test] Add mux/merge sync unit tc for #739
MyungJoo Ham [Fri, 9 Nov 2018 04:50:27 +0000 (13:50 +0900)]
[Test] Add mux/merge sync unit tc for #739

Adding more cases for mux/merge sync policy testing of #739

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Filter] Don't die for model file not found.
MyungJoo Ham [Thu, 8 Nov 2018 12:03:17 +0000 (21:03 +0900)]
[Filter] Don't die for model file not found.

Handle incorrect model file path gracefully
because pipeviz users or dynamic-pipeline developers
can react to such cases accordingly.

Emit error, not die when model file is not found.

This is partially addressing #700

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Mux] change log message format
Jaeyun [Fri, 9 Nov 2018 09:17:25 +0000 (18:17 +0900)]
[Mux] change log message format

use time format to print clock time

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Cmake] delete dlog
Jaeyun [Fri, 9 Nov 2018 08:42:19 +0000 (17:42 +0900)]
[Cmake] delete dlog

delete dlog and tizen definition.
related issue : #807

TODO : determine log level defined in common header

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Test] add testcase using gst-harness
Jaeyun [Thu, 8 Nov 2018 12:25:52 +0000 (21:25 +0900)]
[Test] add testcase using gst-harness

Added new testcases using gst-harness.
If needs to test simple data conversion in nnstreamer plugins, add tc in unittest_plugins.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years agoClean up customfilter dependencies, support non-single-binary mode
MyungJoo Ham [Thu, 8 Nov 2018 12:36:17 +0000 (21:36 +0900)]
Clean up customfilter dependencies, support non-single-binary mode

Building custom filter requires "libtensor_filter.so" only.
Other libraries used by nnstreamer are not necessary for custom filters.
Thus, let them depend on libtensor_filter (or libnnstreamer.so) only.

Plus, by defining "CUSTOMFILTERDEP" CMake variable,
support both SINGLEBINARY and NON-SINGLEBINARY.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Tests] Add multi-stream sync TC for #739
MyungJoo Ham [Thu, 8 Nov 2018 10:58:21 +0000 (19:58 +0900)]
[Tests] Add multi-stream sync TC for #739

Using the "nnscustom_framecounter.so", check if the
1st item of #739 is working properly if the sync policy
is "slowest".

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Tests] Add a custom filter for testcase of #739
MyungJoo Ham [Thu, 8 Nov 2018 10:57:28 +0000 (19:57 +0900)]
[Tests] Add a custom filter for testcase of #739

For testcases in #739, we need a custom filter
that shows frame numbers.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Decoder] Don't die for mode name & Get plugin name.
MyungJoo Ham [Wed, 7 Nov 2018 07:57:17 +0000 (16:57 +0900)]
[Decoder] Don't die for mode name & Get plugin name.

This fixes 2nd subissue of #700.

- Do not die for incorrect mode name. Handle it gracefully.
- Enable get-property of plugins.

Note that this requires PR #762 and #796 merged prior.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Test/Cmake] clean cmake
Jaeyun [Wed, 7 Nov 2018 03:00:24 +0000 (12:00 +0900)]
[Test/Cmake] clean cmake

add option ENABLE_TEST and clean cmake for unit-test

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Merge/Mux] Implement BasePad Time Synchronization Policy
jijoong.moon [Tue, 6 Nov 2018 09:10:13 +0000 (18:10 +0900)]
[Merge/Mux] Implement BasePad Time Synchronization Policy

Implemnt BasePad Time Synchronization Policy. The sync_mode name is
"basepad" and it has sync_options which is base pad number and
duration. It is more like "sync_mode=basepad
sync_option=0:33333333". Duration is GstClockTime (unsigned int 64)
and pad number is uint.

Once this sync_mode is enabeled, then the merge time is decided based
on this "basepad". For example, if the framerate of basepad is 30/1,
then the time which is pushed by merge/mux is 3333333366666666,
99999999133333333166666666, etc. Some details are below. It
calculate differenece between current time and pts time of updated
buffer and if it is bigger than duration, it use previous pad buffer.

Test Case 1:
 - srcpad0 ( framerate 30/1 ) : basepad with 33333333 duration.
 - srcpad1 ( framerate 20/1 )
 - srcpad2 ( framerate 10/1 )

then, merge/mux pushed as below.
    *srcpad0        srcpad1         srcpad2
       0               0               0     : pushed
    33333333        50000000           0     : pushed
    66666666        50000000           0     : pushed
    99999999       100000000      1000000000 : pushed
   133333332       150000000      1000000000 : pushed
   166666666       150000000      1000000000 : pushed
   199999999       200000000      2000000000 : pushed
   233333331       250000000      2000000000 : pushed
   266666666       250000000      2000000000 : pushed
   299999997       300000000      3000000000 : pushed

if sync_mode is slowest,
then, merge/mux pushed as below.
    srcpad0         srcpad1         *srcpad2
       0               0               0     : pushed
    33333333        50000000           0     : skipped
    66666666        50000000           0     : skipped
    99999999       100000000      1000000000 : pushed
   133333332       150000000      1000000000 : skipped
   166666666       150000000      1000000000 : skipped
   199999999       200000000      2000000000 : pushed
   233333331       250000000      2000000000 : skipped
   266666666       250000000      2000000000 : skipped
   299999997       300000000      3000000000 : pushed

if sync_mode is nosync,
then, merge/mux pushed as below.
    *srcpad0        *srcpad1        *srcpad2
       0               0               0     : pushed
    33333333        50000000      1000000000 : pushed
    66666666       100000000      2000000000 : pushed
    99999999       150000000      3000000000 : pushed
   133333332       200000000      4000000000 : pushed
   166666666       250000000      5000000000 : pushed
   199999999       300000000      6000000000 : pushed
   233333331       350000000      7000000000 : pushed
   266666666       400000000      8000000000 : pushed
   299999997       450000000      9000000000 : pushed

**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 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>