diff options
author | Guo, Yejun <yejun.guo@intel.com> | 2020-08-24 16:09:59 +0800 |
---|---|---|
committer | Guo, Yejun <yejun.guo@intel.com> | 2020-09-21 21:26:56 +0800 |
commit | 6918e240d706f7390272976d8b8d502afe426a18 (patch) | |
tree | 21e95a743464bc61fe755ac9a0d1ce24edbe6fad /libavfilter/dnn_interface.h | |
parent | dfbea7b210ac95e59446f9512b25688df44c108b (diff) |
dnn: add userdata for load model parameter
the userdata will be used for the interaction between AVFrame and DNNData
Diffstat (limited to 'libavfilter/dnn_interface.h')
-rw-r--r-- | libavfilter/dnn_interface.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/dnn_interface.h b/libavfilter/dnn_interface.h index 365c9a4729..702c8306e0 100644 --- a/libavfilter/dnn_interface.h +++ b/libavfilter/dnn_interface.h @@ -45,6 +45,8 @@ typedef struct DNNModel{ void *model; // Stores options when the model is executed by the backend const char *options; + // Stores userdata used for the interaction between AVFrame and DNNData + void *userdata; // 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); @@ -56,7 +58,7 @@ typedef struct DNNModel{ // Stores pointers to functions for loading, executing, freeing DNN models for one of the backends. typedef struct DNNModule{ // Loads model and parameters from given file. Returns NULL if it is not possible. - DNNModel *(*load_model)(const char *model_filename, const char *options); + DNNModel *(*load_model)(const char *model_filename, const char *options, void *userdata); // Executes model with specified input and output. Returns DNN_ERROR otherwise. DNNReturnType (*execute_model)(const DNNModel *model, DNNData *outputs, const char **output_names, uint32_t nb_output); // Frees memory allocated for model. |