[num_tensors] Add header structure for 16+th tensors.
authorYongjoo Ahn <yongjoo1.ahn@samsung.com>
Mon, 30 Jan 2023 11:49:51 +0000 (20:49 +0900)
committerjaeyun-jung <39614140+jaeyun-jung@users.noreply.github.com>
Fri, 10 Feb 2023 10:54:40 +0000 (19:54 +0900)
- Those tensors would be packed into 16th GstMemory in a GstBuffer.
- Define NNS_TENSOR_SIZE_EXTRA_LIMIT as 200

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
gst/nnstreamer/include/tensor_typedef.h

index d042e82..785695c 100644 (file)
@@ -34,6 +34,7 @@
 #define NNS_TENSOR_RANK_LIMIT  (4)
 #define NNS_TENSOR_SIZE_LIMIT  (16)
 #define NNS_TENSOR_SIZE_LIMIT_STR      "16"
+#define NNS_TENSOR_SIZE_EXTRA_LIMIT (200)
 #define NNS_TENSOR_DIM_NULL ({0, 0, 0, 0})
 
 /**
@@ -293,4 +294,18 @@ typedef struct
 
 } GstTensorMetaInfo;
 
+/**
+ * @brief Data structure to describe a "extra" tensor data.
+ * This represents the information of the NNS_TENSOR_SIZE_LIMIT-th memory block for tensor stream.
+*/
+typedef struct
+{
+  uint32_t magic;
+  uint32_t version;
+  uint32_t num_extra_tensors;
+  uint64_t reserved;
+  GstTensorInfo infos[NNS_TENSOR_SIZE_EXTRA_LIMIT];
+} GstTensorExtraInfo;
+
+
 #endif /*__GST_TENSOR_TYPEDEF_H__*/