summaryrefslogtreecommitdiff
path: root/libavfilter/dnn_interface.h
diff options
context:
space:
mode:
authorShubhanshu Saxena <shubhanshu.e01@gmail.com>2021-08-26 02:40:45 +0530
committerGuo Yejun <yejun.guo@intel.com>2021-08-28 16:19:07 +0800
commit60b4d07cf65c9dd949155989591979299a7ee9d4 (patch)
tree6d3bc66da2a7e02d36971e659f6738b846402210 /libavfilter/dnn_interface.h
parentd39580ac11003267c707f7264e6a1968d8e1d22c (diff)
libavfilter: Unify Execution Modes in DNN Filters
This commit unifies the async and sync mode from the DNN filters' perspective. As of this commit, the Native backend only supports synchronous execution mode. Now the user can switch between async and sync mode by using the 'async' option in the backend_configs. The values can be 1 for async and 0 for sync mode of execution. This commit affects the following filters: 1. vf_dnn_classify 2. vf_dnn_detect 3. vf_dnn_processing 4. vf_sr 5. vf_derain This commit also updates the filters vf_dnn_detect and vf_dnn_classify to send only the input frame and send NULL as output frame instead of input frame to the DNN backends. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
Diffstat (limited to 'libavfilter/dnn_interface.h')
-rw-r--r--libavfilter/dnn_interface.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavfilter/dnn_interface.h b/libavfilter/dnn_interface.h
index 5e9ffeb077..37e89d9789 100644
--- a/libavfilter/dnn_interface.h
+++ b/libavfilter/dnn_interface.h
@@ -114,10 +114,8 @@ typedef struct DNNModule{
DNNModel *(*load_model)(const char *model_filename, DNNFunctionType func_type, const char *options, AVFilterContext *filter_ctx);
// Executes model with specified input and output. Returns DNN_ERROR otherwise.
DNNReturnType (*execute_model)(const DNNModel *model, DNNExecBaseParams *exec_params);
- // Executes model with specified input and output asynchronously. Returns DNN_ERROR otherwise.
- DNNReturnType (*execute_model_async)(const DNNModel *model, DNNExecBaseParams *exec_params);
// Retrieve inference result.
- DNNAsyncStatusType (*get_async_result)(const DNNModel *model, AVFrame **in, AVFrame **out);
+ DNNAsyncStatusType (*get_result)(const DNNModel *model, AVFrame **in, AVFrame **out);
// Flush all the pending tasks.
DNNReturnType (*flush)(const DNNModel *model);
// Frees memory allocated for model.