]> git.sesse.net Git - ffmpeg/blob - libavfilter/dnn/dnn_backend_native_layers.c
avfilter/dnn/dnn_backend_tf: simplify the code with ff_hex_to_data
[ffmpeg] / libavfilter / dnn / dnn_backend_native_layers.c
1 /*
2  * Copyright (c) 2019 Guo Yejun
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20
21 #include <string.h>
22 #include "dnn_backend_native_layers.h"
23 #include "dnn_backend_native_layer_pad.h"
24 #include "dnn_backend_native_layer_conv2d.h"
25 #include "dnn_backend_native_layer_depth2space.h"
26 #include "dnn_backend_native_layer_maximum.h"
27 #include "dnn_backend_native_layer_mathbinary.h"
28 #include "dnn_backend_native_layer_mathunary.h"
29 #include "dnn_backend_native_layer_avgpool.h"
30 #include "dnn_backend_native_layer_dense.h"
31
32 const LayerFunc ff_layer_funcs[DLT_COUNT] = {
33     {NULL, NULL},
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},
42 };