From f4b3c0e55c84434eb897c2a4a1179cb1d202c52c Mon Sep 17 00:00:00 2001 From: "Guo, Yejun" Date: Mon, 21 Oct 2019 20:38:17 +0800 Subject: 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 Signed-off-by: Pedro Arthur --- libavfilter/dnn_interface.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libavfilter/dnn_interface.h') diff --git a/libavfilter/dnn_interface.h b/libavfilter/dnn_interface.h index fdefcb708b..b20e5c8fab 100644 --- a/libavfilter/dnn_interface.h +++ b/libavfilter/dnn_interface.h @@ -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); -- cgit v1.2.3