[TensorMerge] Add Proper GstMemory Generation according to direction
authorjijoong.moon <jijoong.moon@samsung.com>
Mon, 15 Oct 2018 01:12:13 +0000 (10:12 +0900)
committerMyungJoo Ham <myungjoo.ham@gmail.com>
Wed, 17 Oct 2018 13:10:24 +0000 (22:10 +0900)
commitf9173500179c020a35c2e0573d6b08f624f559a3
tree39c5d7aca960cd5fe74926c54ddc799a724aaf9a
parentec5ce2a3912bf65e3d888797386546a15747e51b
[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>
gst/tensor_merge/gsttensormerge.c
gst/tensor_merge/gsttensormerge.h
tests/nnstreamer_merge/generateTest.py [new file with mode: 0755]
tests/nnstreamer_merge/runTest.sh