diff options
author | Guo, Yejun <yejun.guo@intel.com> | 2020-09-11 22:15:04 +0800 |
---|---|---|
committer | Guo, Yejun <yejun.guo@intel.com> | 2020-09-21 21:26:56 +0800 |
commit | e71d73b09652f4fc96e512a7d6d4c2ab41860f27 (patch) | |
tree | 07b84f09dceed8083e0985390f0258e780c4c742 /libavfilter/dnn_interface.h | |
parent | fce3e3e137843d86411f8868f18e1c3f472de0e5 (diff) |
dnn: add a new interface DNNModel.get_output
for some cases (for example, super resolution), the DNN model changes
the frame size which impacts the filter behavior, so the filter needs
to know the out frame size at very beginning.
Currently, the filter reuses DNNModule.execute_model to query the
out frame size, it is not clear from interface perspective, so add
a new explict interface DNNModel.get_output for such query.
Diffstat (limited to 'libavfilter/dnn_interface.h')
-rw-r--r-- | libavfilter/dnn_interface.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/dnn_interface.h b/libavfilter/dnn_interface.h index 0369ee4f71..2f129d535e 100644 --- a/libavfilter/dnn_interface.h +++ b/libavfilter/dnn_interface.h @@ -51,6 +51,9 @@ typedef struct DNNModel{ // 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); + // Gets model output width/height with given input w/h + DNNReturnType (*get_output)(void *model, const char *input_name, int input_width, int input_height, + const char *output_name, int *output_width, int *output_height); // set the pre process to transfer data from AVFrame to DNNData // the default implementation within DNN is used if it is not provided by the filter int (*pre_proc)(AVFrame *frame_in, DNNData *model_input, void *user_data); |