History

dnn: Add ff_ prefix to unnamespaced globals

Mark Thompson committed 5 years ago

Commit bb968241 parent 2c424d920 files · +77 −77Browse files

Unified · Split

20 files
  1. libavfilter/dnn/dnn_backend_native.c +5 −5
  2. libavfilter/dnn/dnn_backend_native.h +2 −2
  3. libavfilter/dnn/dnn_backend_native_layer_avgpool.c +4 −4
  4. libavfilter/dnn/dnn_backend_native_layer_avgpool.h +3 −3
  5. libavfilter/dnn/dnn_backend_native_layer_conv2d.c +4 −4
  6. libavfilter/dnn/dnn_backend_native_layer_conv2d.h +3 −3
  7. libavfilter/dnn/dnn_backend_native_layer_dense.c +4 −4
  8. libavfilter/dnn/dnn_backend_native_layer_dense.h +3 −3
  9. libavfilter/dnn/dnn_backend_native_layer_depth2space.c +4 −4
  10. libavfilter/dnn/dnn_backend_native_layer_depth2space.h +3 −3
  11. libavfilter/dnn/dnn_backend_native_layer_mathbinary.c +6 −6
  12. libavfilter/dnn/dnn_backend_native_layer_mathbinary.h +3 −3
  13. libavfilter/dnn/dnn_backend_native_layer_mathunary.c +5 −5
  14. libavfilter/dnn/dnn_backend_native_layer_mathunary.h +3 −3
  15. libavfilter/dnn/dnn_backend_native_layer_maximum.c +5 −5
  16. libavfilter/dnn/dnn_backend_native_layer_maximum.h +3 −3
  17. libavfilter/dnn/dnn_backend_native_layer_pad.c +4 −4
  18. libavfilter/dnn/dnn_backend_native_layer_pad.h +3 −3
  19. libavfilter/dnn/dnn_backend_native_layers.c +9 −9
  20. libavfilter/dnn/dnn_backend_native_layers.h +1 −1
libavfilter/dnn/dnn_backend_native.c+5−5
@@ -208,7 +208,7 @@ DNNModel *ff_dnn_load_model_native(const char *model_filename, const char *optio · 207 unmodified lines
208208 }
209209
210210 native_model->layers[layer].type = layer_type;
211− parsed_size = layer_funcs[layer_type].pf_load(&native_model->layers[layer], model_file_context, file_size, native_model->operands_num);
211+ parsed_size = ff_layer_funcs[layer_type].pf_load(&native_model->layers[layer], model_file_context, file_size, native_model->operands_num);
212212 if (!parsed_size) {
213213 goto fail;
214214 }
@@ -300,7 +300,7 @@ static DNNReturnType execute_model_native(const DNNModel *model, const char *inp · 85 unmodified lines
300300 oprd->dims[2] = in_frame->width;
301301
302302 av_freep(&oprd->data);
303− oprd->length = calculate_operand_data_length(oprd);
303+ oprd->length = ff_calculate_operand_data_length(oprd);
304304 if (oprd->length <= 0) {
305305 av_log(ctx, AV_LOG_ERROR, "The input data length overflow\n");
306306 return DNN_ERROR;
@@ -333,7 +333,7 @@ static DNNReturnType execute_model_native(const DNNModel *model, const char *inp · 26 unmodified lines
333333
334334 for (layer = 0; layer < native_model->layers_num; ++layer){
335335 DNNLayerType layer_type = native_model->layers[layer].type;
336− if (layer_funcs[layer_type].pf_exec(native_model->operands,
336+ if (ff_layer_funcs[layer_type].pf_exec(native_model->operands,
337337 native_model->layers[layer].input_operand_indexes,
338338 native_model->layers[layer].output_operand_index,
339339 native_model->layers[layer].params,
@@ -398,7 +398,7 @@ DNNReturnType ff_dnn_execute_model_native(const DNNModel *model, const char *inp · 58 unmodified lines
398398 return execute_model_native(model, input_name, in_frame, output_names, nb_output, out_frame, 1);
399399 }
400400
401−int32_t calculate_operand_dims_count(const DnnOperand *oprd)
401+int32_t ff_calculate_operand_dims_count(const DnnOperand *oprd)
402402 {
403403 int32_t result = 1;
404404 for (int i = 0; i < 4; ++i)
@@ -407,7 +407,7 @@ int32_t calculate_operand_dims_count(const DnnOperand *oprd) · 2 unmodified lines
407407 return result;
408408 }
409409
410−int32_t calculate_operand_data_length(const DnnOperand* oprd)
410+int32_t ff_calculate_operand_data_length(const DnnOperand* oprd)
411411 {
412412 // currently, we just support DNN_FLOAT
413413 uint64_t len = sizeof(float);
libavfilter/dnn/dnn_backend_native.h+2−2
@@ -137,6 +137,6 @@ void ff_dnn_free_model_native(DNNModel **model); · 136 unmodified lines
137137
138138 // NOTE: User must check for error (return value <= 0) to handle
139139 // case like integer overflow.
140−int32_t calculate_operand_data_length(const DnnOperand *oprd);
141−int32_t calculate_operand_dims_count(const DnnOperand *oprd);
140+int32_t ff_calculate_operand_data_length(const DnnOperand *oprd);
141+int32_t ff_calculate_operand_dims_count(const DnnOperand *oprd);
142142 #endif
libavfilter/dnn/dnn_backend_native_layer_avgpool.c+4−4
@@ -26,7 +26,7 @@ · 25 unmodified lines
2626 #include "libavutil/avassert.h"
2727 #include "dnn_backend_native_layer_avgpool.h"
2828
29−int dnn_load_layer_avg_pool(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
29+int ff_dnn_load_layer_avg_pool(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
3030 {
3131 AvgPoolParams *avgpool_params;
3232 int dnn_size = 0;
@@ -55,8 +55,8 @@ int dnn_load_layer_avg_pool(Layer *layer, AVIOContext *model_file_context, int f · 22 unmodified lines
5555 return dnn_size;
5656 }
5757
58−int dnn_execute_layer_avg_pool(DnnOperand *operands, const int32_t *input_operand_indexes,
59− int32_t output_operand_index, const void *parameters, NativeContext *ctx)
58+int ff_dnn_execute_layer_avg_pool(DnnOperand *operands, const int32_t *input_operand_indexes,
59+ int32_t output_operand_index, const void *parameters, NativeContext *ctx)
6060 {
6161 float *output;
6262 int height_end, width_end, height_radius, width_radius, output_height, output_width, kernel_area;
@@ -106,7 +106,7 @@ int dnn_execute_layer_avg_pool(DnnOperand *operands, const int32_t *input_operan · 43 unmodified lines
106106 // not support pooling in channel dimension now
107107 output_operand->dims[3] = channel;
108108 output_operand->data_type = operands[input_operand_index].data_type;
109− output_operand->length = calculate_operand_data_length(output_operand);
109+ output_operand->length = ff_calculate_operand_data_length(output_operand);
110110 if (output_operand->length <= 0) {
111111 av_log(ctx, AV_LOG_ERROR, "The output data length overflow\n");
112112 return DNN_ERROR;
libavfilter/dnn/dnn_backend_native_layer_avgpool.h+3−3
@@ -33,8 +33,8 @@ typedef struct AvgPoolParams{ · 32 unmodified lines
3333 DNNPaddingParam padding_method;
3434 } AvgPoolParams;
3535
36−int dnn_load_layer_avg_pool(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
37−int dnn_execute_layer_avg_pool(DnnOperand *operands, const int32_t *input_operand_indexes,
38− int32_t output_operand_index, const void *parameters, NativeContext *ctx);
36+int ff_dnn_load_layer_avg_pool(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
37+int ff_dnn_execute_layer_avg_pool(DnnOperand *operands, const int32_t *input_operand_indexes,
38+ int32_t output_operand_index, const void *parameters, NativeContext *ctx);
3939
4040 #endif
libavfilter/dnn/dnn_backend_native_layer_conv2d.c+4−4
@@ -40,7 +40,7 @@ typedef struct ThreadParam{ · 39 unmodified lines
4040 int thread_start, thread_end;
4141 } ThreadParam;
4242
43−int dnn_load_layer_conv2d(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
43+int ff_dnn_load_layer_conv2d(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
4444 {
4545 ConvolutionalParams *conv_params;
4646 int kernel_size;
@@ -181,8 +181,8 @@ static void * dnn_execute_layer_conv2d_thread(void *threadarg) · 134 unmodified lines
181181 }
182182
183183
184−int dnn_execute_layer_conv2d(DnnOperand *operands, const int32_t *input_operand_indexes,
185− int32_t output_operand_index, const void *parameters, NativeContext *ctx)
184+int ff_dnn_execute_layer_conv2d(DnnOperand *operands, const int32_t *input_operand_indexes,
185+ int32_t output_operand_index, const void *parameters, NativeContext *ctx)
186186 {
187187 int thread_num = (ctx->options.conv2d_threads <= 0 || ctx->options.conv2d_threads > av_cpu_count())
188188 ? (av_cpu_count() + 1) : (ctx->options.conv2d_threads);
@@ -203,7 +203,7 @@ int dnn_execute_layer_conv2d(DnnOperand *operands, const int32_t *input_operand_ · 14 unmodified lines
203203 output_operand->dims[2] = width - pad_size * 2;
204204 output_operand->dims[3] = conv_params->output_num;
205205 output_operand->data_type = operands[input_operand_indexes[0]].data_type;
206− output_operand->length = calculate_operand_data_length(output_operand);
206+ output_operand->length = ff_calculate_operand_data_length(output_operand);
207207 if (output_operand->length <= 0) {
208208 av_log(ctx, AV_LOG_ERROR, "The output data length overflow\n");
209209 return DNN_ERROR;
libavfilter/dnn/dnn_backend_native_layer_conv2d.h+3−3
@@ -34,7 +34,7 @@ typedef struct ConvolutionalParams{ · 33 unmodified lines
3434 float *biases;
3535 } ConvolutionalParams;
3636
37−int dnn_load_layer_conv2d(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
38−int dnn_execute_layer_conv2d(DnnOperand *operands, const int32_t *input_operand_indexes,
39− int32_t output_operand_index, const void *parameters, NativeContext *ctx);
37+int ff_dnn_load_layer_conv2d(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
38+int ff_dnn_execute_layer_conv2d(DnnOperand *operands, const int32_t *input_operand_indexes,
39+ int32_t output_operand_index, const void *parameters, NativeContext *ctx);
4040 #endif
libavfilter/dnn/dnn_backend_native_layer_dense.c+4−4
@@ -21,7 +21,7 @@ · 20 unmodified lines
2121 #include "libavutil/avassert.h"
2222 #include "dnn_backend_native_layer_dense.h"
2323
24−int dnn_load_layer_dense(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
24+int ff_dnn_load_layer_dense(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
2525 {
2626 DenseParams *dense_params;
2727 int kernel_size;
@@ -82,8 +82,8 @@ int dnn_load_layer_dense(Layer *layer, AVIOContext *model_file_context, int file · 54 unmodified lines
8282 return dnn_size;
8383 }
8484
85−int dnn_execute_layer_dense(DnnOperand *operands, const int32_t *input_operand_indexes,
86− int32_t output_operand_index, const void *parameters, NativeContext *ctx)
85+int ff_dnn_execute_layer_dense(DnnOperand *operands, const int32_t *input_operand_indexes,
86+ int32_t output_operand_index, const void *parameters, NativeContext *ctx)
8787 {
8888 float *output;
8989 int32_t input_operand_index = input_operand_indexes[0];
@@ -101,7 +101,7 @@ int dnn_execute_layer_dense(DnnOperand *operands, const int32_t *input_operand_i · 11 unmodified lines
101101 output_operand->dims[2] = width;
102102 output_operand->dims[3] = dense_params->output_num;
103103 output_operand->data_type = operands[input_operand_index].data_type;
104− output_operand->length = calculate_operand_data_length(output_operand);
104+ output_operand->length = ff_calculate_operand_data_length(output_operand);
105105 if (output_operand->length <= 0) {
106106 av_log(ctx, AV_LOG_ERROR, "The output data length overflow\n");
107107 return DNN_ERROR;
libavfilter/dnn/dnn_backend_native_layer_dense.h+3−3
@@ -31,7 +31,7 @@ typedef struct DenseParams{ · 30 unmodified lines
3131 float *biases;
3232 } DenseParams;
3333
34−int dnn_load_layer_dense(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
35−int dnn_execute_layer_dense(DnnOperand *operands, const int32_t *input_operand_indexes,
36− int32_t output_operand_index, const void *parameters, NativeContext *ctx);
34+int ff_dnn_load_layer_dense(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
35+int ff_dnn_execute_layer_dense(DnnOperand *operands, const int32_t *input_operand_indexes,
36+ int32_t output_operand_index, const void *parameters, NativeContext *ctx);
3737 #endif
libavfilter/dnn/dnn_backend_native_layer_depth2space.c+4−4
@@ -27,7 +27,7 @@ · 26 unmodified lines
2727 #include "libavutil/avassert.h"
2828 #include "dnn_backend_native_layer_depth2space.h"
2929
30−int dnn_load_layer_depth2space(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
30+int ff_dnn_load_layer_depth2space(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
3131 {
3232 DepthToSpaceParams *params;
3333 int dnn_size = 0;
@@ -49,8 +49,8 @@ int dnn_load_layer_depth2space(Layer *layer, AVIOContext *model_file_context, in · 15 unmodified lines
4949 return dnn_size;
5050 }
5151
52−int dnn_execute_layer_depth2space(DnnOperand *operands, const int32_t *input_operand_indexes,
53− int32_t output_operand_index, const void *parameters, NativeContext *ctx)
52+int ff_dnn_execute_layer_depth2space(DnnOperand *operands, const int32_t *input_operand_indexes,
53+ int32_t output_operand_index, const void *parameters, NativeContext *ctx)
5454 {
5555 float *output;
5656 const DepthToSpaceParams *params = (const DepthToSpaceParams *)parameters;
@@ -74,7 +74,7 @@ int dnn_execute_layer_depth2space(DnnOperand *operands, const int32_t *input_ope · 17 unmodified lines
7474 output_operand->dims[2] = width * block_size;
7575 output_operand->dims[3] = new_channels;
7676 output_operand->data_type = operands[input_operand_index].data_type;
77− output_operand->length = calculate_operand_data_length(output_operand);
77+ output_operand->length = ff_calculate_operand_data_length(output_operand);
7878 if (output_operand->length <= 0) {
7979 av_log(ctx, AV_LOG_ERROR, "The output data length overflow\n");
8080 return DNN_ERROR;
libavfilter/dnn/dnn_backend_native_layer_depth2space.h+3−3
@@ -34,8 +34,8 @@ typedef struct DepthToSpaceParams{ · 33 unmodified lines
3434 int block_size;
3535 } DepthToSpaceParams;
3636
37−int dnn_load_layer_depth2space(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
38−int dnn_execute_layer_depth2space(DnnOperand *operands, const int32_t *input_operand_indexes,
39− int32_t output_operand_index, const void *parameters, NativeContext *ctx);
37+int ff_dnn_load_layer_depth2space(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
38+int ff_dnn_execute_layer_depth2space(DnnOperand *operands, const int32_t *input_operand_indexes,
39+ int32_t output_operand_index, const void *parameters, NativeContext *ctx);
4040
4141 #endif
libavfilter/dnn/dnn_backend_native_layer_mathbinary.c+6−6
@@ -59,7 +59,7 @@ static void math_binary_commutative(FunType pfun, const DnnLayerMathBinaryParams · 58 unmodified lines
5959 int dims_count;
6060 const float *src;
6161 float *dst;
62− dims_count = calculate_operand_dims_count(output);
62+ dims_count = ff_calculate_operand_dims_count(output);
6363 src = input->data;
6464 dst = output->data;
6565 if (params->input0_broadcast || params->input1_broadcast) {
@@ -79,7 +79,7 @@ static void math_binary_not_commutative(FunType pfun, const DnnLayerMathBinaryPa · 13 unmodified lines
7979 int dims_count;
8080 const float *src;
8181 float *dst;
82− dims_count = calculate_operand_dims_count(output);
82+ dims_count = ff_calculate_operand_dims_count(output);
8383 src = input->data;
8484 dst = output->data;
8585 if (params->input0_broadcast) {
@@ -98,7 +98,7 @@ static void math_binary_not_commutative(FunType pfun, const DnnLayerMathBinaryPa · 12 unmodified lines
9898 }
9999 }
100100 }
101−int dnn_load_layer_math_binary(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
101+int ff_dnn_load_layer_math_binary(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
102102 {
103103 DnnLayerMathBinaryParams *params;
104104 int dnn_size = 0;
@@ -147,8 +147,8 @@ int dnn_load_layer_math_binary(Layer *layer, AVIOContext *model_file_context, in · 42 unmodified lines
147147 return dnn_size;
148148 }
149149
150−int dnn_execute_layer_math_binary(DnnOperand *operands, const int32_t *input_operand_indexes,
151− int32_t output_operand_index, const void *parameters, NativeContext *ctx)
150+int ff_dnn_execute_layer_math_binary(DnnOperand *operands, const int32_t *input_operand_indexes,
151+ int32_t output_operand_index, const void *parameters, NativeContext *ctx)
152152 {
153153 const DnnOperand *input = &operands[input_operand_indexes[0]];
154154 DnnOperand *output = &operands[output_operand_index];
@@ -158,7 +158,7 @@ int dnn_execute_layer_math_binary(DnnOperand *operands, const int32_t *input_ope · 3 unmodified lines
158158 output->dims[i] = input->dims[i];
159159
160160 output->data_type = input->data_type;
161− output->length = calculate_operand_data_length(output);
161+ output->length = ff_calculate_operand_data_length(output);
162162 if (output->length <= 0) {
163163 av_log(ctx, AV_LOG_ERROR, "The output data length overflow\n");
164164 return DNN_ERROR;
libavfilter/dnn/dnn_backend_native_layer_mathbinary.h+3−3
@@ -47,8 +47,8 @@ typedef struct DnnLayerMathBinaryParams{ · 46 unmodified lines
4747 float v;
4848 } DnnLayerMathBinaryParams;
4949
50−int dnn_load_layer_math_binary(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
51−int dnn_execute_layer_math_binary(DnnOperand *operands, const int32_t *input_operand_indexes,
52− int32_t output_operand_index, const void *parameters, NativeContext *ctx);
50+int ff_dnn_load_layer_math_binary(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
51+int ff_dnn_execute_layer_math_binary(DnnOperand *operands, const int32_t *input_operand_indexes,
52+ int32_t output_operand_index, const void *parameters, NativeContext *ctx);
5353
5454 #endif
libavfilter/dnn/dnn_backend_native_layer_mathunary.c+5−5
@@ -29,7 +29,7 @@ · 28 unmodified lines
2929 #include "libavutil/avassert.h"
3030 #include "dnn_backend_native_layer_mathunary.h"
3131
32−int dnn_load_layer_math_unary(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
32+int ff_dnn_load_layer_math_unary(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
3333 {
3434 DnnLayerMathUnaryParams *params;
3535 int dnn_size = 0;
@@ -52,8 +52,8 @@ int dnn_load_layer_math_unary(Layer *layer, AVIOContext *model_file_context, int · 16 unmodified lines
5252
5353 }
5454
55−int dnn_execute_layer_math_unary(DnnOperand *operands, const int32_t *input_operand_indexes,
56− int32_t output_operand_index, const void *parameters, NativeContext *ctx)
55+int ff_dnn_execute_layer_math_unary(DnnOperand *operands, const int32_t *input_operand_indexes,
56+ int32_t output_operand_index, const void *parameters, NativeContext *ctx)
5757 {
5858 const DnnOperand *input = &operands[input_operand_indexes[0]];
5959 DnnOperand *output = &operands[output_operand_index];
@@ -66,7 +66,7 @@ int dnn_execute_layer_math_unary(DnnOperand *operands, const int32_t *input_oper · 6 unmodified lines
6666 output->dims[i] = input->dims[i];
6767
6868 output->data_type = input->data_type;
69− output->length = calculate_operand_data_length(output);
69+ output->length = ff_calculate_operand_data_length(output);
7070 if (output->length <= 0) {
7171 av_log(ctx, AV_LOG_ERROR, "The output data length overflow\n");
7272 return DNN_ERROR;
@@ -77,7 +77,7 @@ int dnn_execute_layer_math_unary(DnnOperand *operands, const int32_t *input_oper · 4 unmodified lines
7777 return DNN_ERROR;
7878 }
7979
80− dims_count = calculate_operand_dims_count(output);
80+ dims_count = ff_calculate_operand_dims_count(output);
8181 src = input->data;
8282 dst = output->data;
8383
libavfilter/dnn/dnn_backend_native_layer_mathunary.h+3−3
@@ -53,8 +53,8 @@ typedef struct DnnLayerMathUnaryParams{ · 52 unmodified lines
5353 DNNMathUnaryOperation un_op;
5454 } DnnLayerMathUnaryParams;
5555
56−int dnn_load_layer_math_unary(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
57−int dnn_execute_layer_math_unary(DnnOperand *operands, const int32_t *input_operand_indexes,
58− int32_t output_operand_index, const void *parameters, NativeContext *ctx);
56+int ff_dnn_load_layer_math_unary(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
57+int ff_dnn_execute_layer_math_unary(DnnOperand *operands, const int32_t *input_operand_indexes,
58+ int32_t output_operand_index, const void *parameters, NativeContext *ctx);
5959
6060 #endif
libavfilter/dnn/dnn_backend_native_layer_maximum.c+5−5
@@ -27,7 +27,7 @@ · 26 unmodified lines
2727 #include "libavutil/avassert.h"
2828 #include "dnn_backend_native_layer_maximum.h"
2929
30−int dnn_load_layer_maximum(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
30+int ff_dnn_load_layer_maximum(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
3131 {
3232 DnnLayerMaximumParams *params;
3333 int dnn_size = 0;
@@ -49,8 +49,8 @@ int dnn_load_layer_maximum(Layer *layer, AVIOContext *model_file_context, int fi · 15 unmodified lines
4949 return dnn_size;
5050 }
5151
52−int dnn_execute_layer_maximum(DnnOperand *operands, const int32_t *input_operand_indexes,
53− int32_t output_operand_index, const void *parameters, NativeContext *ctx)
52+int ff_dnn_execute_layer_maximum(DnnOperand *operands, const int32_t *input_operand_indexes,
53+ int32_t output_operand_index, const void *parameters, NativeContext *ctx)
5454 {
5555 const DnnOperand *input = &operands[input_operand_indexes[0]];
5656 DnnOperand *output = &operands[output_operand_index];
@@ -63,7 +63,7 @@ int dnn_execute_layer_maximum(DnnOperand *operands, const int32_t *input_operand · 6 unmodified lines
6363 output->dims[i] = input->dims[i];
6464
6565 output->data_type = input->data_type;
66− output->length = calculate_operand_data_length(output);
66+ output->length = ff_calculate_operand_data_length(output);
6767 if (output->length <= 0) {
6868 av_log(ctx, AV_LOG_ERROR, "The output data length overflow\n");
6969 return DNN_ERROR;
@@ -74,7 +74,7 @@ int dnn_execute_layer_maximum(DnnOperand *operands, const int32_t *input_operand · 4 unmodified lines
7474 return DNN_ERROR;
7575 }
7676
77− dims_count = calculate_operand_dims_count(output);
77+ dims_count = ff_calculate_operand_dims_count(output);
7878 src = input->data;
7979 dst = output->data;
8080 for (int i = 0; i < dims_count; ++i)
libavfilter/dnn/dnn_backend_native_layer_maximum.h+3−3
@@ -37,8 +37,8 @@ typedef struct DnnLayerMaximumParams{ · 36 unmodified lines
3737 }val;
3838 } DnnLayerMaximumParams;
3939
40−int dnn_load_layer_maximum(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
41−int dnn_execute_layer_maximum(DnnOperand *operands, const int32_t *input_operand_indexes,
42− int32_t output_operand_index, const void *parameters, NativeContext *ctx);
40+int ff_dnn_load_layer_maximum(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
41+int ff_dnn_execute_layer_maximum(DnnOperand *operands, const int32_t *input_operand_indexes,
42+ int32_t output_operand_index, const void *parameters, NativeContext *ctx);
4343
4444 #endif
libavfilter/dnn/dnn_backend_native_layer_pad.c+4−4
@@ -22,7 +22,7 @@ · 21 unmodified lines
2222 #include "libavutil/avassert.h"
2323 #include "dnn_backend_native_layer_pad.h"
2424
25−int dnn_load_layer_pad(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
25+int ff_dnn_load_layer_pad(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
2626 {
2727 LayerPadParams *params;
2828 int dnn_size = 0;
@@ -75,8 +75,8 @@ static int after_get_buddy(int given, int border, LayerPadModeParam mode) · 46 unmodified lines
7575 }
7676 }
7777
78−int dnn_execute_layer_pad(DnnOperand *operands, const int32_t *input_operand_indexes,
79− int32_t output_operand_index, const void *parameters, NativeContext *ctx)
78+int ff_dnn_execute_layer_pad(DnnOperand *operands, const int32_t *input_operand_indexes,
79+ int32_t output_operand_index, const void *parameters, NativeContext *ctx)
8080 {
8181 int32_t before_paddings;
8282 int32_t after_paddings;
@@ -110,7 +110,7 @@ int dnn_execute_layer_pad(DnnOperand *operands, const int32_t *input_operand_ind · 27 unmodified lines
110110 output_operand->dims[2] = new_width;
111111 output_operand->dims[3] = new_channel;
112112 output_operand->data_type = operands[input_operand_index].data_type;
113− output_operand->length = calculate_operand_data_length(output_operand);
113+ output_operand->length = ff_calculate_operand_data_length(output_operand);
114114 if (output_operand->length <= 0) {
115115 av_log(ctx, AV_LOG_ERROR, "The output data length overflow\n");
116116 return DNN_ERROR;
libavfilter/dnn/dnn_backend_native_layer_pad.h+3−3
@@ -36,8 +36,8 @@ typedef struct LayerPadParams{ · 35 unmodified lines
3636 float constant_values;
3737 } LayerPadParams;
3838
39−int dnn_load_layer_pad(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
40−int dnn_execute_layer_pad(DnnOperand *operands, const int32_t *input_operand_indexes,
41− int32_t output_operand_index, const void *parameters, NativeContext *ctx);
39+int ff_dnn_load_layer_pad(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
40+int ff_dnn_execute_layer_pad(DnnOperand *operands, const int32_t *input_operand_indexes,
41+ int32_t output_operand_index, const void *parameters, NativeContext *ctx);
4242
4343 #endif
libavfilter/dnn/dnn_backend_native_layers.c+9−9
@@ -29,14 +29,14 @@ · 28 unmodified lines
2929 #include "dnn_backend_native_layer_avgpool.h"
3030 #include "dnn_backend_native_layer_dense.h"
3131
32−const LayerFunc layer_funcs[DLT_COUNT] = {
32+const LayerFunc ff_layer_funcs[DLT_COUNT] = {
3333 {NULL, NULL},
34− {dnn_execute_layer_conv2d, dnn_load_layer_conv2d},
35− {dnn_execute_layer_depth2space, dnn_load_layer_depth2space},
36− {dnn_execute_layer_pad, dnn_load_layer_pad},
37− {dnn_execute_layer_maximum, dnn_load_layer_maximum},
38− {dnn_execute_layer_math_binary, dnn_load_layer_math_binary},
39− {dnn_execute_layer_math_unary, dnn_load_layer_math_unary},
40− {dnn_execute_layer_avg_pool, dnn_load_layer_avg_pool},
41− {dnn_execute_layer_dense, dnn_load_layer_dense},
34+ {ff_dnn_execute_layer_conv2d, ff_dnn_load_layer_conv2d},
35+ {ff_dnn_execute_layer_depth2space, ff_dnn_load_layer_depth2space},
36+ {ff_dnn_execute_layer_pad, ff_dnn_load_layer_pad},
37+ {ff_dnn_execute_layer_maximum, ff_dnn_load_layer_maximum},
38+ {ff_dnn_execute_layer_math_binary, ff_dnn_load_layer_math_binary},
39+ {ff_dnn_execute_layer_math_unary, ff_dnn_load_layer_math_unary},
40+ {ff_dnn_execute_layer_avg_pool, ff_dnn_load_layer_avg_pool},
41+ {ff_dnn_execute_layer_dense, ff_dnn_load_layer_dense},
4242 };
libavfilter/dnn/dnn_backend_native_layers.h+1−1
@@ -33,6 +33,6 @@ typedef struct LayerFunc { · 32 unmodified lines
3333 LAYER_LOAD_FUNC pf_load;
3434 }LayerFunc;
3535
36−extern const LayerFunc layer_funcs[DLT_COUNT];
36+extern const LayerFunc ff_layer_funcs[DLT_COUNT];
3737
3838 #endif

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