summaryrefslogtreecommitdiff
path: root/libavfilter/dnn_interface.h
diff options
context:
space:
mode:
authorGuo, Yejun <yejun.guo@intel.com>2019-10-21 20:38:17 +0800
committerPedro Arthur <bygrandao@gmail.com>2019-10-30 11:07:06 -0300
commitf4b3c0e55c84434eb897c2a4a1179cb1d202c52c (patch)
tree4d119163acfab352d18328b526c0bb99a7dc771d /libavfilter/dnn_interface.h
parente1b45b85963b5aa9d67e23638ef9b045e7fbd875 (diff)
downloadffmpeg-f4b3c0e55c84434eb897c2a4a1179cb1d202c52c.tar.gz
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>
Diffstat (limited to 'libavfilter/dnn_interface.h')
-rw-r--r--libavfilter/dnn_interface.h3
1 files changed, 3 insertions, 0 deletions
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);