libavfilter/dnn: add batch mode for async execution

the default number of batch_size is 1

Signed-off-by: Xie, Lin <lin.xie@intel.com>
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
This commit is contained in:
Guo, Yejun
2021-01-07 11:14:10 +08:00
parent 57dae5723f
commit 64ea15f050
5 changed files with 196 additions and 35 deletions

View File

@@ -82,6 +82,8 @@ typedef struct DNNModule{
const char **output_names, uint32_t nb_output, AVFrame *out_frame);
// Retrieve inference result.
DNNAsyncStatusType (*get_async_result)(const DNNModel *model, AVFrame **in, AVFrame **out);
// Flush all the pending tasks.
DNNReturnType (*flush)(const DNNModel *model);
// Frees memory allocated for model.
void (*free_model)(DNNModel **model);
} DNNModule;