[Flatbuffer] Remove memcpy in converter
authorGichan Jang <gichan2.jang@samsung.com>
Fri, 26 Mar 2021 05:44:17 +0000 (14:44 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 30 Mar 2021 04:24:48 +0000 (13:24 +0900)
commit0cb379f723f1551d38ee297519f19938194b404d
tree336527e158b82a054c03f6706d62fc3f3481c6ba
parentc019807e166f37182483ecd3c6971a9bda4cb635
[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>
ext/nnstreamer/tensor_converter/tensor_converter_flatbuf.cc
ext/nnstreamer/tensor_converter/tensor_converter_flexbuf.cc
gst/nnstreamer/tensor_converter/tensor_converter.c