FW definition is now unnecessary.
1. remove fw defines
2. update custom filter description
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
return get_subplugin (NNS_SUBPLUGIN_FILTER, name);
}
-/** @todo Obsolete. To be removed soon. */
-GstTensorFilterFramework *tensor_filter_supported[] = {
- [_T_F_UNDEFINED] = NULL,
-
- [_T_F_CUSTOM] = &NNS_support_custom,
-
-#ifdef ENABLE_TENSORFLOW_LITE
- [_T_F_TENSORFLOW_LITE] = &NNS_support_tensorflow_lite,
-#else
- [_T_F_TENSORFLOW_LITE] = NULL,
-#endif
-#ifdef ENABLE_TENSORFLOW
- [_T_F_TENSORFLOW] = &NNS_support_tensorflow,
-#else
- [_T_F_TENSORFLOW] = NULL,
-#endif
- [_T_F_CAFFE2] = NULL,
-
- 0,
-};
-
GST_DEBUG_CATEGORY_STATIC (gst_tensor_filter_debug);
#define GST_CAT_DEFAULT gst_tensor_filter_debug
*/
};
-extern GstTensorFilterFramework NNS_support_tensorflow_lite;
-extern GstTensorFilterFramework NNS_support_tensorflow;
-extern GstTensorFilterFramework NNS_support_custom;
-
-extern GstTensorFilterFramework *tensor_filter_supported[];
-
/* extern functions for subplugin management */
extern gboolean tensor_filter_probe (GstTensorFilterFramework *tfsp);
extern void tensor_filter_exit (const gchar *name);
#include <glib.h>
#include <dlfcn.h>
+static GstTensorFilterFramework NNS_support_custom;
+
/**
* @brief internal_data
*/
g_assert (filter->privateData == NULL);
}
-GstTensorFilterFramework NNS_support_custom = {
+static GstTensorFilterFramework NNS_support_custom = {
.name = "custom",
.allow_in_place = FALSE, /* custom cannot support in-place (output == input). */
.allocate_in_invoke = FALSE, /* GstTensorFilter allocates output buffers */
* @brief Invoke the "main function". Without allocating output buffer. (fill in the given output buffer)
* @param[in] private_data The pointer returned by NNStreamer_custom_init.
* @param[in] prop GstTensorFilter's property values. Do not change its values.
- * @param[in] input The array of input tensors, each tensor size = dim1 x dim2 x dim3 x dim4 x typesize, allocated by caller
- * @param[out] output The array of output tensors, each tensor size = dim1 x dim2 x dim3 x dim4 x typesize, allocated by caller
+ * @param[in] input The array of input tensors, each tensor size = dim_1 x dim_2 x .. x dim_n x typesize, allocated by caller
+ * @param[out] output The array of output tensors, each tensor size = dim_1 x dim_2 x .. x dim_n x typesize, allocated by caller
+ * @note rank limit (NNS_TENSOR_RANK_LIMIT) and typesize (tensor_element_size) defined in tensor_typedef.h
* @return 0 if success
*/
typedef int (*NNS_custom_invoke) (void *private_data,
* @brief Invoke the "main function". Without allocating output buffer. (fill in the given output buffer)
* @param[in] private_data The pointer returned by NNStreamer_custom_init.
* @param[in] prop GstTensorFilter's property values. Do not change its values.
- * @param[in] input The array of input tensors, each tensor size = dim1 x dim2 x dim3 x dim4 x typesize, allocated by caller
- * @param[out] output The array of output tensors, each tensor size = dim1 x dim2 x dim3 x dim4 x typesize, the memory block for output tensor should be allocated. (data in GstTensorMemory)
+ * @param[in] input The array of input tensors, each tensor size = dim_1 x dim_2 x .. x dim_n x typesize, allocated by caller
+ * @param[out] output The array of output tensors, each tensor size = dim_1 x dim_2 x .. x dim_n x typesize, the memory block for output tensor should be allocated. (data in GstTensorMemory)
+ * @note rank limit (NNS_TENSOR_RANK_LIMIT) and typesize (tensor_element_size) defined in tensor_typedef.h
* @return 0 if success
*/
typedef int (*NNS_custom_allocate_invoke) (void *private_data,
#define NNS_TENSOR_SIZE_LIMIT (16)
#define NNS_TENSOR_SIZE_LIMIT_STR "16"
#define NNS_TENSOR_DIM_NULL ({0, 0, 0, 0})
+
/**
* @brief Possible data element types of other/tensor.
- *
- * The current version supports NNS_UINT8 only as video-input.
- * There is no restrictions for inter-NN or sink-to-app.
*/
typedef enum _nns_tensor_type
{
uint64_t _uint64_t;
} tensor_element;
-/**
- * @brief NN Frameworks available for the tensor_filter element.
- */
-typedef enum _nnfw_type
-{
- _T_F_UNDEFINED = 0, /**< Not defined or supported. Cannot proceed in this status */
-
- _T_F_CUSTOM, /**< Custom filter provided as a shared object (dysym) */
- _T_F_TENSORFLOW_LITE, /**< In Progress */
- _T_F_TENSORFLOW, /**< NYI */
- _T_F_CAFFE2, /**< NYI */
-
- _T_F_NNFW_END,
-} nnfw_type;
-
typedef uint32_t tensor_dim[NNS_TENSOR_RANK_LIMIT];
/**