aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/dnn
diff options
context:
space:
mode:
authorShubhanshu Saxena <shubhanshu.e01@gmail.com>2021-06-05 23:38:03 +0530
committerGuo Yejun <yejun.guo@intel.com>2021-06-12 15:18:58 +0800
commit446b4f77c106add0f6db4c0ffad1642d0920d6aa (patch)
tree02513a5a780183d683994c5d50e6991e1c537d2d /libavfilter/dnn
parentf5ab8905fddee7a772998058e8cf18f93649fc5a (diff)
downloadffmpeg-446b4f77c106add0f6db4c0ffad1642d0920d6aa.tar.gz
lavfi/dnn: Convert output_name to char** in TaskItem
Convert output_name to char **output_names in TaskItem and use it as a pointer to array of output names in the DNN backend. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
Diffstat (limited to 'libavfilter/dnn')
-rw-r--r--libavfilter/dnn/dnn_backend_common.h2
-rw-r--r--libavfilter/dnn/dnn_backend_openvino.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/libavfilter/dnn/dnn_backend_common.h b/libavfilter/dnn/dnn_backend_common.h
index 0c043e51f0..f76a05026d 100644
--- a/libavfilter/dnn/dnn_backend_common.h
+++ b/libavfilter/dnn/dnn_backend_common.h
@@ -32,7 +32,7 @@ typedef struct TaskItem {
AVFrame *in_frame;
AVFrame *out_frame;
const char *input_name;
- const char *output_name;
+ const char **output_names;
int async;
int do_ioproc;
uint32_t inference_todo;
diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c
index a84370d689..0f3b235820 100644
--- a/libavfilter/dnn/dnn_backend_openvino.c
+++ b/libavfilter/dnn/dnn_backend_openvino.c
@@ -208,7 +208,7 @@ static void infer_completion_callback(void *args)
DNNData output;
OVContext *ctx = &ov_model->ctx;
- status = ie_infer_request_get_blob(request->infer_request, task->output_name, &output_blob);
+ status = ie_infer_request_get_blob(request->infer_request, task->output_names[0], &output_blob);
if (status != OK) {
//incorrect output name
char *model_output_name = NULL;
@@ -222,7 +222,7 @@ static void infer_completion_callback(void *args)
}
av_log(ctx, AV_LOG_ERROR,
"output \"%s\" may not correct, all output(s) are: \"%s\"\n",
- task->output_name, all_output_names);
+ task->output_names[0], all_output_names);
return;
}
@@ -676,7 +676,7 @@ static DNNReturnType get_output_ov(void *model, const char *input_name, int inpu
task.async = 0;
task.input_name = input_name;
task.in_frame = in_frame;
- task.output_name = output_name;
+ task.output_names = &output_name;
task.out_frame = out_frame;
task.model = ov_model;
@@ -796,7 +796,7 @@ DNNReturnType ff_dnn_execute_model_ov(const DNNModel *model, DNNExecBaseParams *
task.async = 0;
task.input_name = exec_params->input_name;
task.in_frame = exec_params->in_frame;
- task.output_name = exec_params->output_names[0];
+ task.output_names = &exec_params->output_names[0];
task.out_frame = exec_params->out_frame ? exec_params->out_frame : exec_params->in_frame;
task.model = ov_model;
@@ -843,7 +843,7 @@ DNNReturnType ff_dnn_execute_model_async_ov(const DNNModel *model, DNNExecBasePa
task->async = 1;
task->input_name = exec_params->input_name;
task->in_frame = exec_params->in_frame;
- task->output_name = exec_params->output_names[0];
+ task->output_names = &exec_params->output_names[0];
task->out_frame = exec_params->out_frame ? exec_params->out_frame : exec_params->in_frame;
task->model = ov_model;
if (ff_queue_push_back(ov_model->task_queue, task) < 0) {