mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-12 01:40:04 +01:00
avfilter/dnn: add a new interface to query dnn model's input info
to support dnn networks more general, we need to know the input info of the dnn model. background: The data type of dnn model's input could be float32, uint8 or fp16, etc. And the w/h of input image could be fixed or variable. Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
This commit is contained in:
@@ -43,6 +43,9 @@ typedef struct 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, DNNData *input, const char *input_name, const char **output_names, uint32_t nb_output);
|
||||
|
||||
Reference in New Issue
Block a user