diff options
author | Guo, Yejun <yejun.guo@intel.com> | 2021-01-22 22:20:15 +0800 |
---|---|---|
committer | Guo, Yejun <yejun.guo@intel.com> | 2021-01-28 09:45:13 +0800 |
commit | 06c01f1763bd2a9266659be6097d2fc07e014163 (patch) | |
tree | 1e5f20e8a9164a6b4114de913f693398495dd184 /libavfilter/dnn/dnn_backend_native.c | |
parent | a163aa6cf7fea184a2e72cade7a9aa4f841a23f3 (diff) |
dnn: remove type cast which is not necessary
Diffstat (limited to 'libavfilter/dnn/dnn_backend_native.c')
-rw-r--r-- | libavfilter/dnn/dnn_backend_native.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavfilter/dnn/dnn_backend_native.c b/libavfilter/dnn/dnn_backend_native.c index 1f89ee4110..87f3568cc2 100644 --- a/libavfilter/dnn/dnn_backend_native.c +++ b/libavfilter/dnn/dnn_backend_native.c @@ -50,7 +50,7 @@ static DNNReturnType execute_model_native(const DNNModel *model, const char *inp static DNNReturnType get_input_native(void *model, DNNData *input, const char *input_name) { - NativeModel *native_model = (NativeModel *)model; + NativeModel *native_model = model; NativeContext *ctx = &native_model->ctx; for (int i = 0; i < native_model->operands_num; ++i) { @@ -78,7 +78,7 @@ static DNNReturnType get_output_native(void *model, const char *input_name, int const char *output_name, int *output_width, int *output_height) { DNNReturnType ret; - NativeModel *native_model = (NativeModel *)model; + NativeModel *native_model = model; NativeContext *ctx = &native_model->ctx; AVFrame *in_frame = av_frame_alloc(); AVFrame *out_frame = NULL; @@ -269,7 +269,7 @@ static DNNReturnType execute_model_native(const DNNModel *model, const char *inp const char **output_names, uint32_t nb_output, AVFrame *out_frame, int do_ioproc) { - NativeModel *native_model = (NativeModel *)model->model; + NativeModel *native_model = model->model; NativeContext *ctx = &native_model->ctx; int32_t layer; DNNData input, output; @@ -382,7 +382,7 @@ static DNNReturnType execute_model_native(const DNNModel *model, const char *inp DNNReturnType ff_dnn_execute_model_native(const DNNModel *model, const char *input_name, AVFrame *in_frame, const char **output_names, uint32_t nb_output, AVFrame *out_frame) { - NativeModel *native_model = (NativeModel *)model->model; + NativeModel *native_model = model->model; NativeContext *ctx = &native_model->ctx; if (!in_frame) { @@ -428,7 +428,7 @@ void ff_dnn_free_model_native(DNNModel **model) if (*model) { if ((*model)->model) { - native_model = (NativeModel *)(*model)->model; + native_model = (*model)->model; if (native_model->layers) { for (layer = 0; layer < native_model->layers_num; ++layer){ if (native_model->layers[layer].type == DLT_CONV2D){ |