mirror of https://git.ffmpeg.org/ffmpeg.git
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>
This commit is contained in:
parent
f5ab8905fd
commit
446b4f77c1
|
@ -32,7 +32,7 @@ typedef struct TaskItem {
|
||||||
AVFrame *in_frame;
|
AVFrame *in_frame;
|
||||||
AVFrame *out_frame;
|
AVFrame *out_frame;
|
||||||
const char *input_name;
|
const char *input_name;
|
||||||
const char *output_name;
|
const char **output_names;
|
||||||
int async;
|
int async;
|
||||||
int do_ioproc;
|
int do_ioproc;
|
||||||
uint32_t inference_todo;
|
uint32_t inference_todo;
|
||||||
|
|
|
@ -208,7 +208,7 @@ static void infer_completion_callback(void *args)
|
||||||
DNNData output;
|
DNNData output;
|
||||||
OVContext *ctx = &ov_model->ctx;
|
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) {
|
if (status != OK) {
|
||||||
//incorrect output name
|
//incorrect output name
|
||||||
char *model_output_name = NULL;
|
char *model_output_name = NULL;
|
||||||
|
@ -222,7 +222,7 @@ static void infer_completion_callback(void *args)
|
||||||
}
|
}
|
||||||
av_log(ctx, AV_LOG_ERROR,
|
av_log(ctx, AV_LOG_ERROR,
|
||||||
"output \"%s\" may not correct, all output(s) are: \"%s\"\n",
|
"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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -676,7 +676,7 @@ static DNNReturnType get_output_ov(void *model, const char *input_name, int inpu
|
||||||
task.async = 0;
|
task.async = 0;
|
||||||
task.input_name = input_name;
|
task.input_name = input_name;
|
||||||
task.in_frame = in_frame;
|
task.in_frame = in_frame;
|
||||||
task.output_name = output_name;
|
task.output_names = &output_name;
|
||||||
task.out_frame = out_frame;
|
task.out_frame = out_frame;
|
||||||
task.model = ov_model;
|
task.model = ov_model;
|
||||||
|
|
||||||
|
@ -796,7 +796,7 @@ DNNReturnType ff_dnn_execute_model_ov(const DNNModel *model, DNNExecBaseParams *
|
||||||
task.async = 0;
|
task.async = 0;
|
||||||
task.input_name = exec_params->input_name;
|
task.input_name = exec_params->input_name;
|
||||||
task.in_frame = exec_params->in_frame;
|
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.out_frame = exec_params->out_frame ? exec_params->out_frame : exec_params->in_frame;
|
||||||
task.model = ov_model;
|
task.model = ov_model;
|
||||||
|
|
||||||
|
@ -843,7 +843,7 @@ DNNReturnType ff_dnn_execute_model_async_ov(const DNNModel *model, DNNExecBasePa
|
||||||
task->async = 1;
|
task->async = 1;
|
||||||
task->input_name = exec_params->input_name;
|
task->input_name = exec_params->input_name;
|
||||||
task->in_frame = exec_params->in_frame;
|
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->out_frame = exec_params->out_frame ? exec_params->out_frame : exec_params->in_frame;
|
||||||
task->model = ov_model;
|
task->model = ov_model;
|
||||||
if (ff_queue_push_back(ov_model->task_queue, task) < 0) {
|
if (ff_queue_push_back(ov_model->task_queue, task) < 0) {
|
||||||
|
|
Loading…
Reference in New Issue