summaryrefslogtreecommitdiff
path: root/libavfilter/dnn_interface.h
diff options
context:
space:
mode:
authorGuo, Yejun <yejun.guo@intel.com>2019-10-21 20:38:10 +0800
committerPedro Arthur <bygrandao@gmail.com>2019-10-30 11:00:41 -0300
commite1b45b85963b5aa9d67e23638ef9b045e7fbd875 (patch)
tree8f42ca165f693649ea2ec8f6f9a8e62c1a505027 /libavfilter/dnn_interface.h
parentdff39ea9f0154ec52b7548b122a4a5332df3c2c6 (diff)
avfilter/dnn: get the data type of network output from dnn execution result
so, we can make a filter more general to accept different network models, by adding a data type convertion after getting data from network. After we add dt field into struct DNNData, it becomes the same as DNNInputData, so merge them with one struct: DNNData. Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
Diffstat (limited to 'libavfilter/dnn_interface.h')
-rw-r--r--libavfilter/dnn_interface.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/libavfilter/dnn_interface.h b/libavfilter/dnn_interface.h
index 057005f47e..fdefcb708b 100644
--- a/libavfilter/dnn_interface.h
+++ b/libavfilter/dnn_interface.h
@@ -34,15 +34,10 @@ typedef enum {DNN_NATIVE, DNN_TF} DNNBackendType;
typedef enum {DNN_FLOAT = 1, DNN_UINT8 = 4} DNNDataType;
-typedef struct DNNInputData{
+typedef struct DNNData{
void *data;
DNNDataType dt;
int width, height, channels;
-} DNNInputData;
-
-typedef struct DNNData{
- float *data;
- int width, height, channels;
} DNNData;
typedef struct DNNModel{
@@ -50,7 +45,7 @@ typedef struct DNNModel{
void *model;
// Sets model input and output.
// Should be called at least once before model execution.
- DNNReturnType (*set_input_output)(void *model, DNNInputData *input, const char *input_name, const char **output_names, uint32_t nb_output);
+ DNNReturnType (*set_input_output)(void *model, DNNData *input, const char *input_name, const char **output_names, uint32_t nb_output);
} DNNModel;
// Stores pointers to functions for loading, executing, freeing DNN models for one of the backends.