Rename RequestItem to OVRequestItem in the OpenVINO backend to avoid confusion.
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -54,18 +54,18 @@ typedef struct OVModel{ · 53 unmodified lines | ||
| 54 | 54 | ie_core_t *core; |
| 55 | 55 | ie_network_t *network; |
| 56 | 56 | ie_executable_network_t *exe_network; |
| 57 | − SafeQueue *request_queue; // holds RequestItem | |
| 57 | + SafeQueue *request_queue; // holds OVRequestItem | |
| 58 | 58 | Queue *task_queue; // holds TaskItem |
| 59 | 59 | Queue *inference_queue; // holds InferenceItem |
| 60 | 60 | } OVModel; |
| 61 | 61 | |
| 62 | 62 | // one request for one call to openvino |
| 63 | −typedef struct RequestItem { | |
| 63 | +typedef struct OVRequestItem { | |
| 64 | 64 | ie_infer_request_t *infer_request; |
| 65 | 65 | InferenceItem **inferences; |
| 66 | 66 | uint32_t inference_count; |
| 67 | 67 | ie_complete_call_back_t callback; |
| 68 | −} RequestItem; | |
| 68 | +} OVRequestItem; | |
| 69 | 69 | |
| 70 | 70 | #define APPEND_STRING(generated_string, iterate_string) \ |
| 71 | 71 | generated_string = generated_string ? av_asprintf("%s %s", generated_string, iterate_string) : \ |
| @@ -111,7 +111,7 @@ static int get_datatype_size(DNNDataType dt) · 39 unmodified lines | ||
| 111 | 111 | } |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | −static DNNReturnType fill_model_input_ov(OVModel *ov_model, RequestItem *request) | |
| 114 | +static DNNReturnType fill_model_input_ov(OVModel *ov_model, OVRequestItem *request) | |
| 115 | 115 | { |
| 116 | 116 | dimensions_t dims; |
| 117 | 117 | precision_e precision; |
| @@ -198,7 +198,7 @@ static void infer_completion_callback(void *args) · 80 unmodified lines | ||
| 198 | 198 | dimensions_t dims; |
| 199 | 199 | precision_e precision; |
| 200 | 200 | IEStatusCode status; |
| 201 | − RequestItem *request = args; | |
| 201 | + OVRequestItem *request = args; | |
| 202 | 202 | InferenceItem *inference = request->inferences[0]; |
| 203 | 203 | TaskItem *task = inference->task; |
| 204 | 204 | OVModel *ov_model = task->model; |
| @@ -381,7 +381,7 @@ static DNNReturnType init_model_ov(OVModel *ov_model, const char *input_name, co · 176 unmodified lines | ||
| 381 | 381 | } |
| 382 | 382 | |
| 383 | 383 | for (int i = 0; i < ctx->options.nireq; i++) { |
| 384 | − RequestItem *item = av_mallocz(sizeof(*item)); | |
| 384 | + OVRequestItem *item = av_mallocz(sizeof(*item)); | |
| 385 | 385 | if (!item) { |
| 386 | 386 | goto err; |
| 387 | 387 | } |
| @@ -422,7 +422,7 @@ err: · 34 unmodified lines | ||
| 422 | 422 | return DNN_ERROR; |
| 423 | 423 | } |
| 424 | 424 | |
| 425 | −static DNNReturnType execute_model_ov(RequestItem *request, Queue *inferenceq) | |
| 425 | +static DNNReturnType execute_model_ov(OVRequestItem *request, Queue *inferenceq) | |
| 426 | 426 | { |
| 427 | 427 | IEStatusCode status; |
| 428 | 428 | DNNReturnType ret; |
| @@ -639,7 +639,7 @@ static DNNReturnType get_output_ov(void *model, const char *input_name, int inpu · 210 unmodified lines | ||
| 639 | 639 | OVModel *ov_model = model; |
| 640 | 640 | OVContext *ctx = &ov_model->ctx; |
| 641 | 641 | TaskItem task; |
| 642 | − RequestItem *request; | |
| 642 | + OVRequestItem *request; | |
| 643 | 643 | AVFrame *in_frame = NULL; |
| 644 | 644 | AVFrame *out_frame = NULL; |
| 645 | 645 | IEStatusCode status; |
| @@ -779,7 +779,7 @@ DNNReturnType ff_dnn_execute_model_ov(const DNNModel *model, DNNExecBaseParams * · 133 unmodified lines | ||
| 779 | 779 | OVModel *ov_model = model->model; |
| 780 | 780 | OVContext *ctx = &ov_model->ctx; |
| 781 | 781 | TaskItem task; |
| 782 | − RequestItem *request; | |
| 782 | + OVRequestItem *request; | |
| 783 | 783 | |
| 784 | 784 | if (ff_check_exec_params(ctx, DNN_OV, model->func_type, exec_params) != 0) { |
| 785 | 785 | return DNN_ERROR; |
| @@ -827,7 +827,7 @@ DNNReturnType ff_dnn_execute_model_async_ov(const DNNModel *model, DNNExecBasePa · 41 unmodified lines | ||
| 827 | 827 | { |
| 828 | 828 | OVModel *ov_model = model->model; |
| 829 | 829 | OVContext *ctx = &ov_model->ctx; |
| 830 | − RequestItem *request; | |
| 830 | + OVRequestItem *request; | |
| 831 | 831 | TaskItem *task; |
| 832 | 832 | DNNReturnType ret; |
| 833 | 833 | |
| @@ -904,7 +904,7 @@ DNNReturnType ff_dnn_flush_ov(const DNNModel *model) · 70 unmodified lines | ||
| 904 | 904 | { |
| 905 | 905 | OVModel *ov_model = model->model; |
| 906 | 906 | OVContext *ctx = &ov_model->ctx; |
| 907 | − RequestItem *request; | |
| 907 | + OVRequestItem *request; | |
| 908 | 908 | IEStatusCode status; |
| 909 | 909 | DNNReturnType ret; |
| 910 | 910 | |
| @@ -943,7 +943,7 @@ void ff_dnn_free_model_ov(DNNModel **model) · 32 unmodified lines | ||
| 943 | 943 | if (*model){ |
| 944 | 944 | OVModel *ov_model = (*model)->model; |
| 945 | 945 | while (ff_safe_queue_size(ov_model->request_queue) != 0) { |
| 946 | − RequestItem *item = ff_safe_queue_pop_front(ov_model->request_queue); | |
| 946 | + OVRequestItem *item = ff_safe_queue_pop_front(ov_model->request_queue); | |
| 947 | 947 | if (item && item->infer_request) { |
| 948 | 948 | ie_infer_request_free(&item->infer_request); |
| 949 | 949 | } |