History

lavfi/dnn_backend_ov: Rename RequestItem to OVRequestItem

Rename RequestItem to OVRequestItem in the OpenVINO backend to avoid confusion.

Shubhanshu Saxena committed 5 years ago

Commit 0bc7ddc1 parent 42995481 file · +12 −12Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/dnn/dnn_backend_openvino.c+12−12
@@ -54,18 +54,18 @@ typedef struct OVModel{ · 53 unmodified lines
5454 ie_core_t *core;
5555 ie_network_t *network;
5656 ie_executable_network_t *exe_network;
57− SafeQueue *request_queue; // holds RequestItem
57+ SafeQueue *request_queue; // holds OVRequestItem
5858 Queue *task_queue; // holds TaskItem
5959 Queue *inference_queue; // holds InferenceItem
6060 } OVModel;
6161
6262 // one request for one call to openvino
63−typedef struct RequestItem {
63+typedef struct OVRequestItem {
6464 ie_infer_request_t *infer_request;
6565 InferenceItem **inferences;
6666 uint32_t inference_count;
6767 ie_complete_call_back_t callback;
68−} RequestItem;
68+} OVRequestItem;
6969
7070 #define APPEND_STRING(generated_string, iterate_string) \
7171 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
111111 }
112112 }
113113
114−static DNNReturnType fill_model_input_ov(OVModel *ov_model, RequestItem *request)
114+static DNNReturnType fill_model_input_ov(OVModel *ov_model, OVRequestItem *request)
115115 {
116116 dimensions_t dims;
117117 precision_e precision;
@@ -198,7 +198,7 @@ static void infer_completion_callback(void *args) · 80 unmodified lines
198198 dimensions_t dims;
199199 precision_e precision;
200200 IEStatusCode status;
201− RequestItem *request = args;
201+ OVRequestItem *request = args;
202202 InferenceItem *inference = request->inferences[0];
203203 TaskItem *task = inference->task;
204204 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
381381 }
382382
383383 for (int i = 0; i < ctx->options.nireq; i++) {
384− RequestItem *item = av_mallocz(sizeof(*item));
384+ OVRequestItem *item = av_mallocz(sizeof(*item));
385385 if (!item) {
386386 goto err;
387387 }
@@ -422,7 +422,7 @@ err: · 34 unmodified lines
422422 return DNN_ERROR;
423423 }
424424
425−static DNNReturnType execute_model_ov(RequestItem *request, Queue *inferenceq)
425+static DNNReturnType execute_model_ov(OVRequestItem *request, Queue *inferenceq)
426426 {
427427 IEStatusCode status;
428428 DNNReturnType ret;
@@ -639,7 +639,7 @@ static DNNReturnType get_output_ov(void *model, const char *input_name, int inpu · 210 unmodified lines
639639 OVModel *ov_model = model;
640640 OVContext *ctx = &ov_model->ctx;
641641 TaskItem task;
642− RequestItem *request;
642+ OVRequestItem *request;
643643 AVFrame *in_frame = NULL;
644644 AVFrame *out_frame = NULL;
645645 IEStatusCode status;
@@ -779,7 +779,7 @@ DNNReturnType ff_dnn_execute_model_ov(const DNNModel *model, DNNExecBaseParams * · 133 unmodified lines
779779 OVModel *ov_model = model->model;
780780 OVContext *ctx = &ov_model->ctx;
781781 TaskItem task;
782− RequestItem *request;
782+ OVRequestItem *request;
783783
784784 if (ff_check_exec_params(ctx, DNN_OV, model->func_type, exec_params) != 0) {
785785 return DNN_ERROR;
@@ -827,7 +827,7 @@ DNNReturnType ff_dnn_execute_model_async_ov(const DNNModel *model, DNNExecBasePa · 41 unmodified lines
827827 {
828828 OVModel *ov_model = model->model;
829829 OVContext *ctx = &ov_model->ctx;
830− RequestItem *request;
830+ OVRequestItem *request;
831831 TaskItem *task;
832832 DNNReturnType ret;
833833
@@ -904,7 +904,7 @@ DNNReturnType ff_dnn_flush_ov(const DNNModel *model) · 70 unmodified lines
904904 {
905905 OVModel *ov_model = model->model;
906906 OVContext *ctx = &ov_model->ctx;
907− RequestItem *request;
907+ OVRequestItem *request;
908908 IEStatusCode status;
909909 DNNReturnType ret;
910910
@@ -943,7 +943,7 @@ void ff_dnn_free_model_ov(DNNModel **model) · 32 unmodified lines
943943 if (*model){
944944 OVModel *ov_model = (*model)->model;
945945 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);
947947 if (item && item->infer_request) {
948948 ie_infer_request_free(&item->infer_request);
949949 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t