[Filter] remove definition of supported framework
authorJaeyun <jy1210.jung@samsung.com>
Fri, 18 Jan 2019 09:10:04 +0000 (18:10 +0900)
committerMyungJoo Ham <myungjoo.ham@gmail.com>
Sat, 19 Jan 2019 13:15:57 +0000 (22:15 +0900)
FW definition is now unnecessary.
1. remove fw defines
2. update custom filter description

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
gst/nnstreamer/tensor_filter/tensor_filter.c
gst/nnstreamer/tensor_filter/tensor_filter.h
gst/nnstreamer/tensor_filter/tensor_filter_custom.c
gst/nnstreamer/tensor_filter_custom.h
gst/nnstreamer/tensor_typedef.h

index b0e28e6..278b705 100644 (file)
@@ -218,27 +218,6 @@ tensor_filter_find (const gchar * name)
   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
 
index 3a3bff1..acb06df 100644 (file)
@@ -186,12 +186,6 @@ struct _GstTensorFilterFramework
        */
 };
 
-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);
index 5f94d71..5b58bdd 100644 (file)
@@ -31,6 +31,8 @@
 #include <glib.h>
 #include <dlfcn.h>
 
+static GstTensorFilterFramework NNS_support_custom;
+
 /**
  * @brief internal_data
  */
@@ -233,7 +235,7 @@ custom_close (const GstTensorFilter * filter, void **private_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 */
index 84c207d..2f350ac 100644 (file)
@@ -90,8 +90,9 @@ typedef int (*NNS_custom_set_input_dimension) (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, 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,
@@ -101,8 +102,9 @@ 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,
index 294ba06..9c5e988 100644 (file)
 #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
 {
@@ -91,21 +89,6 @@ typedef union {
   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];
 
 /**