platform/upstream/nnstreamer.git
3 years ago[Tests/Converter] Fix -Werror=sign-compare error
Wook Song [Mon, 10 May 2021 02:31:41 +0000 (11:31 +0900)]
[Tests/Converter] Fix -Werror=sign-compare error

This patch fixes a build error related to -Werror=sign-compare. Note
that this error occurs while building the source code using gcc-7.5.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Decoder/BoundingBox] remove unnecessary value
Jaeyun [Fri, 7 May 2021 10:39:18 +0000 (19:39 +0900)]
[Decoder/BoundingBox] remove unnecessary value

remove unnecessary global value in decoder-subplugin.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[TEST] Add set property function accepted/tizen/unified/20210510.155212 submit/tizen/20210507.082542
Gichan Jang [Fri, 7 May 2021 05:27:43 +0000 (14:27 +0900)]
[TEST] Add set property function

Add set filter property function.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Spec] add the restricted elements
Hyoung Joo Ahn [Fri, 7 May 2021 05:10:32 +0000 (14:10 +0900)]
[Spec] add the restricted elements

the elements for audio & edgeAI have been added.
to make it clear, the additional macros have been added.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[Common/CodeClean] function to get pad caps
Jaeyun [Thu, 6 May 2021 04:43:59 +0000 (13:43 +0900)]
[Common/CodeClean] function to get pad caps

Code clean, revise function name and remove unnecessary function to check peer caps.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Filter] error in query caps
Jaeyun [Thu, 6 May 2021 04:35:27 +0000 (13:35 +0900)]
[Filter] error in query caps

In transform-caps function, element should not query caps to peer.
The element should add all possible caps here.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Test] filters with other/tensor
Jaeyun [Tue, 4 May 2021 04:38:43 +0000 (13:38 +0900)]
[Test] filters with other/tensor

tensor-filter queries peer caps to check the mimetype.
nnstreamer should handle multi filters connection without an error.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Test/TVM] Add unittest for TVM subplugin
Junhwan Kim [Tue, 27 Apr 2021 04:47:34 +0000 (13:47 +0900)]
[Test/TVM] Add unittest for TVM subplugin

- Add simple model for unittest

Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
3 years ago[Conf/Subplugin] get registered subplugins
Jaeyun [Tue, 4 May 2021 10:24:06 +0000 (19:24 +0900)]
[Conf/Subplugin] get registered subplugins

Util function to get registrable subplugins list.

If conf file is not loaded (or does not exists), nnstreamer cannot get the subplugin list from configuration.
In this case (e.g., Android), conveter cannot set the pad template from subplugins, and will make negotiation failure.

To prevent this error, get subplugins from table and conf file.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[TEST] Seperate postive and negative tests
Gichan Jang [Tue, 4 May 2021 02:19:26 +0000 (11:19 +0900)]
[TEST] Seperate postive and negative tests

Seperate positive and negative tests of the unittest_armnn

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Test] condition to check file size
Jaeyun [Fri, 30 Apr 2021 04:53:55 +0000 (13:53 +0900)]
[Test] condition to check file size

In test-util function, set condition to check file size while running a pipeline.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Filter/Prop] parse combination option
Jaeyun [Fri, 30 Apr 2021 03:06:29 +0000 (12:06 +0900)]
[Filter/Prop] parse combination option

1. parse combi option as unsigned int and check the index (less than 16).
2. fix possible mem leak (release combi option list).

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Filter] input combi option
Jaeyun [Thu, 29 Apr 2021 10:04:15 +0000 (19:04 +0900)]
[Filter] input combi option

While getting tensor info in caps negotiation, check input combi option and compare info with combined.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[If] invalid map info
Jaeyun [Mon, 3 May 2021 08:06:43 +0000 (17:06 +0900)]
[If] invalid map info

memory map info is valid until gst_memory_unmap() is called.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Gst/MQTT/Sink] Support dynamic buffer re-allocation
Wook Song [Fri, 23 Apr 2021 09:42:10 +0000 (18:42 +0900)]
[Gst/MQTT/Sink] Support dynamic buffer re-allocation

This patch changes the message buffer allocation mechanism. When the
size of the incoming GStreamer buffer exceeds that of the current
message buffer allocated, the existing buffer would be freed and
re-allocated. Note that in the case the size of the message buffer
is fixed by the max-buffer-size property, this feature is disabled.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT/Sink] Introduce a new property, max-buffer-size
Wook Song [Fri, 23 Apr 2021 06:16:41 +0000 (15:16 +0900)]
[Gst/MQTT/Sink] Introduce a new property, max-buffer-size

This patch introduces a new property, max-buffer-size, which specifies
the maximum size of a message buffer.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT] Support basic timestamp synchronization
Wook Song [Thu, 22 Apr 2021 06:21:05 +0000 (15:21 +0900)]
[Gst/MQTT] Support basic timestamp synchronization

This patch adds a feature for the basic timestamp synchronization
support. Note that this feature works under the assumption that all the
device's system date and time values have been synchronized.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years agowith GST_PLUGIN_PATH set `gst-inspect-1.0 nnstreamer` works, also renamed Dockerfile...
shortcipher3 [Fri, 30 Apr 2021 23:05:59 +0000 (17:05 -0600)]
with GST_PLUGIN_PATH set `gst-inspect-1.0 nnstreamer` works, also renamed Dockerfile to use standard naming convention

Signed-off-by: shortcipher3 <chris.jon.hall@gmail.com>
3 years ago[Format] clang format for typecast
Jaeyun [Fri, 30 Apr 2021 04:55:19 +0000 (13:55 +0900)]
[Format] clang format for typecast

add space when using c-style typecast.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Decoders] fix the mem leaks of the external decoders
Hyoung Joo Ahn [Mon, 26 Apr 2021 02:45:03 +0000 (11:45 +0900)]
[Decoders] fix the mem leaks of the external decoders

Since the ref count is raised when `gst_buffer_get_all_memory ()` is used, `gst_memory_unref ()` has to be called after using the memory.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[Test/NNFW] init info in testcase
Jaeyun [Thu, 29 Apr 2021 07:03:10 +0000 (16:03 +0900)]
[Test/NNFW] init info in testcase

Initialize tensor-info struct before calling filter callback.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[filter/TVM] Add tensor-filter subplugin for TVM
Junhwan Kim [Fri, 16 Apr 2021 12:55:29 +0000 (21:55 +0900)]
[filter/TVM] Add tensor-filter subplugin for TVM

- `dlpack` and either `tvm` or `tvm_runtime` should be included
- Only supports tvm model compiled with relay (graph_executor)

Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
3 years ago[Gst/MQTT] bugfix: Change default values for pub/sub-topic and client-id
Wook Song [Tue, 20 Apr 2021 01:45:38 +0000 (10:45 +0900)]
[Gst/MQTT] bugfix: Change default values for pub/sub-topic and client-id

This patch changes the default values which are used when the values for
the pub/sub-topic and client-id properties are not given.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT/Src] Eliminate unnecessary critical sections
Wook Song [Fri, 2 Apr 2021 15:33:20 +0000 (00:33 +0900)]
[Gst/MQTT/Src] Eliminate unnecessary critical sections

This patch removes unnecessary critical sections. Mutual exclusion
controlling is only needed when trying to change the pipeline's state.
In addition, instead of locking and unlocking the element object itself,
a GMutex variable in the object is used.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT/Src] Remove unnecessary dynamic memory allocations
Wook Song [Fri, 2 Apr 2021 15:16:29 +0000 (00:16 +0900)]
[Gst/MQTT/Src] Remove unnecessary dynamic memory allocations

In order to reduce the burden from memory management, this patch removes
unnecessary dynamic memory allocations.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT/Sink] Revise mqttsink to use the MQTTAsync C client library
Wook Song [Fri, 2 Apr 2021 14:40:27 +0000 (23:40 +0900)]
[Gst/MQTT/Sink] Revise mqttsink to use the MQTTAsync C client library

This patch revises the mqttsink element to use the Asynchronous MQTT
client library for C. Unnecessary dynamic allocation and lock operations
are also removed.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT/Src] Support asynchronous subscribe via paho.mqtt.c
Wook Song [Fri, 26 Mar 2021 13:18:16 +0000 (22:18 +0900)]
[Gst/MQTT/Src] Support asynchronous subscribe via paho.mqtt.c

This patch enables mqttsrc to support an asynchronous subscribe to the
given topic. In the mqttsrc implementation, the asynchronous MQTT client
library for C has been used instead of the MQTT Client library for C,
used for implementation of mqttsink.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT/Sink] Support synchronize publish via paho.mqtt.c
Wook Song [Thu, 18 Mar 2021 07:58:05 +0000 (16:58 +0900)]
[Gst/MQTT/Sink] Support synchronize publish via paho.mqtt.c

This patch updates mqttsink to support synchronize publish using the
MQTT protocol. Note that only basic features required to publish a
topic are currently implemented.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[TCM] Rename TCM config file
Sangjung Woo [Thu, 29 Apr 2021 06:18:53 +0000 (15:18 +0900)]
[TCM] Rename TCM config file

To run the TCM on AHub infra, the default name of config file should be
'config.yaml'.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[Filter] reduce duplicated source
Jaeyun [Tue, 27 Apr 2021 07:40:03 +0000 (16:40 +0900)]
[Filter] reduce duplicated source

Code clean, add common functions for combi option and set-info callback.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Format] fix format and code style
Jaeyun [Thu, 29 Apr 2021 03:13:26 +0000 (12:13 +0900)]
[Format] fix format and code style

fix clang format error in taos-ci and code style.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Format] fix clang format
Jaeyun [Wed, 28 Apr 2021 08:07:08 +0000 (17:07 +0900)]
[Format] fix clang format

fix clang format error in taos-ci and testcase name rule.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Common] add init-config
Jaeyun [Mon, 26 Apr 2021 04:59:56 +0000 (13:59 +0900)]
[Common] add init-config

Before updating tensor config, initialize config struct.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Meson/MQTT] Add an option to support MQTT
Wook Song [Mon, 15 Mar 2021 07:06:11 +0000 (16:06 +0900)]
[Meson/MQTT] Add an option to support MQTT

This patch adds a Meson configuration option to support MQTT. In order
to avoid build break, this option is disabled for the Debian and Tizen
packages.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT/Sink] Make it work as a dummy sink
Wook Song [Wed, 10 Mar 2021 09:15:01 +0000 (18:15 +0900)]
[Gst/MQTT/Sink] Make it work as a dummy sink

This patch makes MQTTSink work as a dummy sink that has a single sink
pad with "ANY" caps.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Meson/MQTT] Generate libgstmqtt including MQTT GstElements
Wook Song [Tue, 9 Mar 2021 02:01:28 +0000 (11:01 +0900)]
[Meson/MQTT] Generate libgstmqtt including MQTT GstElements

This patch modifies the meson build scripts to add the skeleton code of
MQTT plugins and generate libgstmqtt, the collection of them.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT] Add skeleton codes for MQTT plugins
Wook Song [Tue, 9 Mar 2021 01:52:29 +0000 (10:52 +0900)]
[Gst/MQTT] Add skeleton codes for MQTT plugins

This patch adds skeleton codes of sink and src elements for MQTT support.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Filter] python3 helper funciton
Gichan Jang [Tue, 27 Apr 2021 09:51:35 +0000 (18:51 +0900)]
[Filter] python3 helper funciton

nnstreamer_python3 package include python3 helper functiom.
Change it to use by converter and decoder.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Sink] accept flex tensor
Jaeyun [Fri, 23 Apr 2021 10:58:17 +0000 (19:58 +0900)]
[Sink] accept flex tensor

add pad template to handle flexible tensor stream.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Converter] Change external converter param
Gichan Jang [Wed, 14 Apr 2021 04:57:14 +0000 (13:57 +0900)]
[Converter] Change external converter param

Change external converter param
 - Remove unnecessary param (frames_in, frame_size)

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Common] predefined mime type
Jaeyun [Tue, 20 Apr 2021 09:54:18 +0000 (18:54 +0900)]
[Common] predefined mime type

Code clean, compare predefined mime type - other/tensor(s).

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[filter/tflite] Add enum for tflite delegates
Yongjoo Ahn [Fri, 9 Apr 2021 02:50:01 +0000 (11:50 +0900)]
[filter/tflite] Add enum for tflite delegates

- Add enum for delegates
- Refactor parsing custom props

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Decoder/BoundingBox] add a testcase for the deprecated modes
Hyoung Joo Ahn [Fri, 23 Apr 2021 02:31:51 +0000 (11:31 +0900)]
[Decoder/BoundingBox] add a testcase for the deprecated modes

To guarantee backward compatibility with the deprecated modes(`tflite-ssd`, `tf-ssd`), some test cases are required.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[Tools/Parser] GST Object Emulators
MyungJoo Ham [Wed, 16 Dec 2020 08:26:00 +0000 (17:26 +0900)]
[Tools/Parser] GST Object Emulators

These aux routines emulate GST Objects so that
parsers wouldn't rely on actual GStreamer libraries
and pipeline instances.

This commit is WIP and will be continued by DJ.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[FlexTensors] define mimetype for flexible tensors accepted/tizen/unified/20210427.085750 submit/tizen/20210426.054755
Jaeyun [Mon, 19 Apr 2021 11:04:31 +0000 (20:04 +0900)]
[FlexTensors] define mimetype for flexible tensors

add definition to handle flexible tensors stream.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Converter] reduce complexity
Jaeyun [Mon, 19 Apr 2021 10:20:57 +0000 (19:20 +0900)]
[Converter] reduce complexity

code clean, reduce code complexity.
add internal function to parse incoming caps for custom mode.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Decoder/BoundingBox] revive old modes for backward compatibility
Hyoung Joo Ahn [Wed, 21 Apr 2021 04:26:55 +0000 (13:26 +0900)]
[Decoder/BoundingBox] revive old modes for backward compatibility

For the old-pipeline, make the previous names are usable.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[Decoder/BoundingBox] change the name of option
Hyoung Joo Ahn [Tue, 13 Apr 2021 01:21:21 +0000 (10:21 +0900)]
[Decoder/BoundingBox] change the name of option

The mode of this decoder should be decided according to the model rather than the framework.
Currently, however, some of the modes are decided by the framework: `tf-ssd`, `tflite-ssd`

If we want to use this decoder to run a TFLite model that include the `postprocess`, we have to use `tf-ssd`.
It could occur some confusion.
For this reason, I want to suggest that the name should be changed.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[indent] Change indent style
Gichan Jang [Tue, 20 Apr 2021 04:55:27 +0000 (13:55 +0900)]
[indent] Change indent style

Change coding style
  - but no space after unary operators:
     &  *  +  -  ~  !  sizeof  typeof  alignof  __attribute__  defined
reference: https://www.kernel.org/doc/html/v4.10/process/coding-style.html

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Docs] Change nnstreamer CI server link
Gichan Jang [Tue, 20 Apr 2021 05:39:35 +0000 (14:39 +0900)]
[Docs] Change nnstreamer CI server link

Change nnstreamer CI server link

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years agoEnable detection for nntrainer singleshot
Jihoon Lee [Wed, 10 Mar 2021 12:13:20 +0000 (21:13 +0900)]
Enable detection for nntrainer singleshot

This patch maps *.ini as nntrainer to utilize auto detection for
nntrainer.

**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
3 years ago[Common/Collect] check null param
Jaeyun [Mon, 12 Apr 2021 03:24:40 +0000 (12:24 +0900)]
[Common/Collect] check null param

add condition to check null param (public functions only)

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Mux/Merge] clear collect pad data
Jaeyun [Fri, 9 Apr 2021 08:22:09 +0000 (17:22 +0900)]
[Mux/Merge] clear collect pad data

Clear old buffer in collect pad data when received flush event.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Converter] Add caps filter
Gichan Jang [Mon, 12 Apr 2021 02:00:11 +0000 (11:00 +0900)]
[Converter] Add caps filter

Add caps filter of tensor converter for _NNS_MEDIA_ANY type.

Example launchline:
```
...
        tensor_filter silent=false framework=tensorflow-lite model=tflite_model/ssd_mobilenet_v2_coco.tflite ! \
        tensor_decoder mode=flexbuf ! other/flexbuf ! tensor_converter silent=false ! \
        other/tensors, num_tensors=2, framerate=30/1, dimensions=\"4:1:1917:1\,91:1917:1:1\", types=\"float32\,float32\" ! \
        tensor_decoder mode=bounding_boxes option1=tflite-ssd option2=tflite_model/coco_labels_list.txt option3=tflite_model/box_priors.txt option4=640:480 option5=300:300 ! ... \
```

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Doc] Change menu tree name of contributing doc.
Gichan Jang [Mon, 12 Apr 2021 07:50:52 +0000 (16:50 +0900)]
[Doc] Change menu tree name of contributing doc.

Change menu tree name of Documentation/contributing.md.
Related issue: #3100

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Decoder/DirectVideo] add the video format RGBA
Hyoung Joo Ahn [Fri, 9 Apr 2021 03:38:02 +0000 (12:38 +0900)]
[Decoder/DirectVideo] add the video format RGBA

To handle various video formats, the available formats are required for the direct video decoder and add an option to handle it.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[TEST] Add converter and decoder subplugins test
Gichan Jang [Thu, 8 Apr 2021 02:21:45 +0000 (11:21 +0900)]
[TEST] Add converter and decoder subplugins test

Add tensor converter and decoder subplugin test

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Test] Add tensor transform mode option test
Gichan Jang [Thu, 8 Apr 2021 06:38:51 +0000 (15:38 +0900)]
[Test] Add tensor transform mode option test

Add tensor transform mode option test

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[TEST] Add tensor common unittests
Gichan Jang [Wed, 7 Apr 2021 05:18:14 +0000 (14:18 +0900)]
[TEST] Add tensor common unittests

Add unittest for tensor common functions.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[TCM] Modify tca config files
Gichan Jang [Tue, 6 Apr 2021 07:43:59 +0000 (16:43 +0900)]
[TCM] Modify tca config files

 - Move android and tizen config file of the TCM to nnstreamer/api repo
 - Modify nnstreamer config file of the TCM

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Converter/Decoder] Add error handling code and testcases
Gichan Jang [Tue, 6 Apr 2021 07:40:06 +0000 (16:40 +0900)]
[Converter/Decoder] Add error handling code and testcases

Add error handling code for tensor converter and decoder subplugins
Add testcases for tensor converter and decoder subplugins

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Converter] Define function to find subplugins
Gichan Jang [Tue, 6 Apr 2021 04:41:39 +0000 (13:41 +0900)]
[Converter] Define function to find subplugins

Define function to find converter subplugins.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[aggregator/converter] Fix when GST_EVENT_FLUSH_*
Yongjoo Ahn [Fri, 2 Apr 2021 09:45:41 +0000 (18:45 +0900)]
[aggregator/converter] Fix when GST_EVENT_FLUSH_*

- Do not reset tensor config when flush event occurs, just clear the buffers

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Mux/Merge] change property name submit/tizen/20210406.094012
Jaeyun [Tue, 6 Apr 2021 03:22:17 +0000 (12:22 +0900)]
[Mux/Merge] change property name

change property name (sync mode and option), remove underbar in property name.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[SRNPU/FILTER] Add auto detection for SRNPU subplugin
Dongju Chae [Mon, 5 Apr 2021 11:17:47 +0000 (20:17 +0900)]
[SRNPU/FILTER] Add auto detection for SRNPU subplugin

This patch adds auto detection for SRNPU subplugin.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Android/AMC] clear looper
Jaeyun [Thu, 1 Apr 2021 02:51:16 +0000 (11:51 +0900)]
[Android/AMC] clear looper

Clear looper when media steam is finished.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years agoChange gboolean comparison
Gichan Jang [Mon, 5 Apr 2021 04:28:18 +0000 (13:28 +0900)]
Change gboolean comparison

Never directly compare the contents of a gboolean variable with the values TRUE or FALSE.
Use `if (condition)` to check a gboolean is "true", instead of `if (condition == TRUE)`. Likewise use `if (!condition)` to check a gboolean is "false".
There is no validation when assigning to a gboolean variable and so it could contain any value represented by a gint. This is why the use of if (condition) is recommended.
All non-zero values in C evaluate to "true".

Refer: https://developer.gnome.org/glib/stable/glib-Basic-Types.html#gboolean

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Fix/Python3] Fix install link name of python3 module
Dongju Chae [Mon, 5 Apr 2021 02:24:49 +0000 (11:24 +0900)]
[Fix/Python3] Fix install link name of python3 module

This patch fixes install link name of python3 module.

As python subplugin scripts import 'nnstreamer_python',
its name should be also matched.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Converter] Remove duplicated error handling code
Gichan Jang [Mon, 5 Apr 2021 02:19:18 +0000 (11:19 +0900)]
[Converter] Remove duplicated error handling code

Remove duplicated error handling code.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Converter] Fix mem leak of the converter
Gichan Jang [Thu, 1 Apr 2021 10:08:18 +0000 (19:08 +0900)]
[Converter] Fix mem leak of the converter

A memory leak occurred because the name of the tensor was not released.
Free the name of the tensor and set default name as "" instead of
"Anonymous"

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Transform] add regex for stand mode
Jaeyun [Thu, 1 Apr 2021 03:01:41 +0000 (12:01 +0900)]
[Transform] add regex for stand mode

1. add regex for stand mode, filter option string.
2. ignore upper/lowercase.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Filter/EdgeTPU] tf-lite ver for EdgeTPU
Jaeyun [Thu, 1 Apr 2021 08:00:37 +0000 (17:00 +0900)]
[Filter/EdgeTPU] tf-lite ver for EdgeTPU

When tensorflow2-lite is enabled, set dependency tf2-lite to build EdgeTPU sub-plugin.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[test/tensor_transform] Add testcases for stand
Yongjoo Ahn [Mon, 29 Mar 2021 11:16:44 +0000 (20:16 +0900)]
[test/tensor_transform] Add testcases for stand

- Add SSAT testcases for stand: default and dc-average

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[tensor_data] Make tensor_data_raw_* return allocated memory
Yongjoo Ahn [Thu, 1 Apr 2021 05:55:53 +0000 (14:55 +0900)]
[tensor_data] Make tensor_data_raw_* return allocated memory

- `gst_tensor_data_raw_*` get double pointer for result as input. And allocate memory for it.
- Correspond change in tensor_transform and gsttensorif
- Divide with N, not N - 1 when calculate standard deviation

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[tensor_transform] Add "per-channel" option to stand
Yongjoo Ahn [Mon, 29 Mar 2021 07:47:17 +0000 (16:47 +0900)]
[tensor_transform] Add "per-channel" option to stand

- "channel" is the first dimension.
- Support channel-wise default and dc-average transform

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[TEST] Add apply option testcases for tensor transform
Gichan Jang [Mon, 29 Mar 2021 05:18:01 +0000 (14:18 +0900)]
[TEST] Add apply option testcases for tensor transform

Add apply option testcases for tensor transform

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[TRANSFORM] Add apply option
Gichan Jang [Mon, 29 Mar 2021 00:46:18 +0000 (09:46 +0900)]
[TRANSFORM] Add apply option

User can select tensors to apply transformation.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Test] Fix the Svace issue accepted/tizen/unified/20210331.054224 submit/tizen/20210330.110555
Sangjung Woo [Tue, 30 Mar 2021 08:57:40 +0000 (17:57 +0900)]
[Test] Fix the Svace issue

ret variable is used without initialization. This patch fixes the bug.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[TizenSensor] init sensor type
Jaeyun [Tue, 30 Mar 2021 09:12:09 +0000 (18:12 +0900)]
[TizenSensor] init sensor type

set init value of sensor type. 'all' means no specific sensor and if user does not set type in pipeline, it will be failed.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[CodeQuality] add return error value
Hyoung Joo Ahn [Tue, 30 Mar 2021 08:26:15 +0000 (17:26 +0900)]
[CodeQuality] add return error value

without error return, there are a lot of unreachable code blocks will be existed.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[CodeQuality] check the variables before using it
Hyoung Joo Ahn [Tue, 30 Mar 2021 08:25:58 +0000 (17:25 +0900)]
[CodeQuality] check the variables before using it

check the allocated or passed variables has proper state.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[CodeQuality] release memory when test is failed
Hyoung Joo Ahn [Tue, 30 Mar 2021 08:25:35 +0000 (17:25 +0900)]
[CodeQuality] release memory when test is failed

when a test case is finalized with ASSERT, the allocated memory should be freed properly.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[TensorIf] add a NULL checker
Hyoung Joo Ahn [Tue, 30 Mar 2021 02:47:36 +0000 (11:47 +0900)]
[TensorIf] add a NULL checker

To improve code quality, I want to suggest a null checker.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[Doxygen] Add missing doxygen tag
Gichan Jang [Tue, 30 Mar 2021 04:42:04 +0000 (13:42 +0900)]
[Doxygen] Add missing doxygen tag

Add missing doxygen tag for tensorrt

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Subplugins] Add extern "C"
Gichan Jang [Tue, 30 Mar 2021 01:10:29 +0000 (10:10 +0900)]
[Subplugins] Add extern "C"

Add extern "C" in converter, decoder and filter subplugins.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Flatbuffers] Change function name
Gichan Jang [Mon, 29 Mar 2021 05:48:45 +0000 (14:48 +0900)]
[Flatbuffers] Change function name

Change the name of functions to be consistent.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Doc] Fix typo in md files
Junhwan Kim [Tue, 30 Mar 2021 06:28:34 +0000 (15:28 +0900)]
[Doc] Fix typo in md files

Typo correction in md files.

Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
3 years ago[Spec] Remove archiving script
Sangjung Woo [Fri, 26 Mar 2021 03:47:37 +0000 (12:47 +0900)]
[Spec] Remove archiving script

This patch removes an archiving script, which is not necessary.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[RPM] Add virtual conf package
Jihoon Lee [Tue, 23 Mar 2021 04:27:13 +0000 (13:27 +0900)]
[RPM] Add virtual conf package

Add virtual conf package to resolve build dependency issue as suggested
in https://github.com/nnstreamer/api/pull/21#issuecomment-804599118

With this patch, it is now possible to install devel package with
`/etc/nntrainer.ini` or the packager choose to use `test-devel` when
building.

See also nnstreamer/nntrainer#1034

**Evaluation Method**
Cross building with nntrainer package

**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped

Cc: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
3 years ago[CONVERTER] Change custom mode name
Gichan Jang [Fri, 26 Mar 2021 02:35:21 +0000 (11:35 +0900)]
[CONVERTER] Change custom mode name

Changed custom mode name to custom-code fot callback type.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Transform/Orc] orc acceleration for tensors
Jaeyun [Mon, 29 Mar 2021 08:29:15 +0000 (17:29 +0900)]
[Transform/Orc] orc acceleration for tensors

condition to support orc acceleration for each tensor.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Flatbuffer] Remove memcpy in converter
Gichan Jang [Fri, 26 Mar 2021 05:44:17 +0000 (14:44 +0900)]
[Flatbuffer] Remove memcpy in converter

Remove memory copy in converter.
Memory allocation occurs two times on g_memdup and gst_memory_new_wrapped.
Changed to use gst_memory_share.
No memory copy is performed and the memory region is simply shared.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Doc] Modify tensor_if README.md
Gichan Jang [Mon, 29 Mar 2021 01:49:11 +0000 (10:49 +0900)]
[Doc] Modify tensor_if README.md

 - Remove description of unsupported properties.
 - Elaborate the description.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years agotests/nnstreamer_repo_dynamicity: Fix unittest_repo binary path handling
Xavier Roumegue [Thu, 25 Mar 2021 15:02:34 +0000 (15:02 +0000)]
tests/nnstreamer_repo_dynamicity: Fix unittest_repo binary path handling

In case the unit tests are run from their installed directory,
unittest_repo binary can't be found in this case because install test
directory path and unittest_repo binary location are invalid.

This fixes regression introduced by bfb6630ff and 0c02456ba

Signed-off-by: Xavier Roumegue <xavier.roumegue@nxp.com>
3 years agoCODEOWNERS: Add members
MyungJoo Ham [Mon, 29 Mar 2021 08:16:45 +0000 (17:16 +0900)]
CODEOWNERS: Add members

We had been accepting new members.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[TEST] Add tensor transform testcases for tensrs stream
Gichan Jang [Fri, 26 Mar 2021 01:34:04 +0000 (10:34 +0900)]
[TEST] Add tensor transform testcases for tensrs stream

Add tensor transform testcases for tensrs stream

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[TRANSFORM] Changed to support tensors
Gichan Jang [Wed, 24 Mar 2021 01:52:02 +0000 (10:52 +0900)]
[TRANSFORM] Changed to support tensors

Changd tensor transform to support tensors

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[TEST] Add tensor decdoer cusotom mode unittest
Gichan Jang [Mon, 22 Mar 2021 06:39:56 +0000 (15:39 +0900)]
[TEST] Add tensor decdoer cusotom mode unittest

Add tensor decoder custom mode unittest

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Decoder] Add decoder cusotm operation
Gichan Jang [Fri, 19 Mar 2021 04:56:25 +0000 (13:56 +0900)]
[Decoder] Add decoder cusotm operation

It is similar to cusom-easy of the tensor filter.
Get an input tensors and make output media stream.
It can be used to create cusom media stream from tensors such as flexbuffer.
Output capability is application/octet-stream.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[grpc/debian] Disable grpc packages in debian distro
Dongju Chae [Fri, 12 Mar 2021 03:54:31 +0000 (12:54 +0900)]
[grpc/debian] Disable grpc packages in debian distro

This patch disables grpc packages in debian distro.
For now, gRPC is only supported in Tizen env.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>