]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/dnn_interface.h
avformat/httpauth: do not decode plus sign to space in credentials
[ffmpeg] / libavfilter / dnn_interface.h
index c24df0e96174e0c68b61c22a5a7e2b1ae597b34d..b20e5c8fabe637645d70fe35ffc0221dbc62271e 100644 (file)
@@ -32,25 +32,23 @@ typedef enum {DNN_SUCCESS, DNN_ERROR} DNNReturnType;
 
 typedef enum {DNN_NATIVE, DNN_TF} DNNBackendType;
 
-typedef enum {DNN_FLOAT, DNN_UINT8} DNNDataType;
+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{
     // Stores model that can be different for different backends.
     void *model;
+    // Gets model input information
+    // Just reuse struct DNNData here, actually the DNNData.data field is not needed.
+    DNNReturnType (*get_input)(void *model, DNNData *input, const char *input_name);
     // 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.