FFmpeg
|
#include "../dnn_interface.h"
#include "libavformat/avio.h"
#include "libavutil/opt.h"
#include "queue.h"
Go to the source code of this file.
Data Structures | |
struct | Layer |
struct | DnnOperand |
struct | InputParams |
struct | NativeOptions |
struct | NativeContext |
struct | NativeModel |
Enumerations | |
enum | DNNLayerType { DLT_INPUT = 0, DLT_CONV2D = 1, DLT_DEPTH_TO_SPACE = 2, DLT_MIRROR_PAD = 3, DLT_MAXIMUM = 4, DLT_MATH_BINARY = 5, DLT_MATH_UNARY = 6, DLT_AVG_POOL = 7, DLT_DENSE = 8, DLT_COUNT } |
the enum value of DNNLayerType should not be changed, the same values are used in convert_from_tensorflow.py and, it is used to index the layer execution/load function pointer. More... | |
enum | DNNOperandType { DOT_INPUT = 1, DOT_OUTPUT = 2, DOT_INTERMEDIATE = DOT_INPUT | DOT_OUTPUT } |
enum | DNNPaddingParam { VALID, SAME, SAME_CLAMP_TO_EDGE } |
enum | DNNActivationFunc { RELU, TANH, SIGMOID, NONE, LEAKY_RELU } |
Functions | |
DNNModel * | ff_dnn_load_model_native (const char *model_filename, DNNFunctionType func_type, const char *options, AVFilterContext *filter_ctx) |
DNNReturnType | ff_dnn_execute_model_native (const DNNModel *model, DNNExecBaseParams *exec_params) |
DNNAsyncStatusType | ff_dnn_get_result_native (const DNNModel *model, AVFrame **in, AVFrame **out) |
DNNReturnType | ff_dnn_flush_native (const DNNModel *model) |
void | ff_dnn_free_model_native (DNNModel **model) |
int32_t | ff_calculate_operand_data_length (const DnnOperand *oprd) |
int32_t | ff_calculate_operand_dims_count (const DnnOperand *oprd) |
DNN inference functions interface for native backend.
Definition in file dnn_backend_native.h.
enum DNNLayerType |
the enum value of DNNLayerType should not be changed, the same values are used in convert_from_tensorflow.py and, it is used to index the layer execution/load function pointer.
Enumerator | |
---|---|
DLT_INPUT | |
DLT_CONV2D | |
DLT_DEPTH_TO_SPACE | |
DLT_MIRROR_PAD | |
DLT_MAXIMUM | |
DLT_MATH_BINARY | |
DLT_MATH_UNARY | |
DLT_AVG_POOL | |
DLT_DENSE | |
DLT_COUNT |
Definition at line 40 of file dnn_backend_native.h.
enum DNNOperandType |
Enumerator | |
---|---|
DOT_INPUT | |
DOT_OUTPUT | |
DOT_INTERMEDIATE |
Definition at line 53 of file dnn_backend_native.h.
enum DNNPaddingParam |
Enumerator | |
---|---|
VALID | |
SAME | |
SAME_CLAMP_TO_EDGE |
Definition at line 54 of file dnn_backend_native.h.
enum DNNActivationFunc |
Enumerator | |
---|---|
RELU | |
TANH | |
SIGMOID | |
NONE | |
LEAKY_RELU |
Definition at line 55 of file dnn_backend_native.h.
DNNModel* ff_dnn_load_model_native | ( | const char * | model_filename, |
DNNFunctionType | func_type, | ||
const char * | options, | ||
AVFilterContext * | filter_ctx | ||
) |
check file header with string and version
Definition at line 139 of file dnn_backend_native.c.
Referenced by ff_get_dnn_module(), and load_native_model().
DNNReturnType ff_dnn_execute_model_native | ( | const DNNModel * | model, |
DNNExecBaseParams * | exec_params | ||
) |
Definition at line 435 of file dnn_backend_native.c.
Referenced by ff_get_dnn_module().
DNNAsyncStatusType ff_dnn_get_result_native | ( | const DNNModel * | model, |
AVFrame ** | in, | ||
AVFrame ** | out | ||
) |
Definition at line 484 of file dnn_backend_native.c.
Referenced by ff_get_dnn_module().
DNNReturnType ff_dnn_flush_native | ( | const DNNModel * | model | ) |
Definition at line 470 of file dnn_backend_native.c.
Referenced by ff_get_dnn_module().
void ff_dnn_free_model_native | ( | DNNModel ** | model | ) |
Definition at line 511 of file dnn_backend_native.c.
Referenced by ff_dnn_load_model_native(), ff_get_dnn_module(), and load_native_model().
int32_t ff_calculate_operand_data_length | ( | const DnnOperand * | oprd | ) |
Definition at line 499 of file dnn_backend_native.c.
Referenced by execute_model_native(), ff_dnn_execute_layer_avg_pool(), ff_dnn_execute_layer_conv2d(), ff_dnn_execute_layer_dense(), ff_dnn_execute_layer_depth2space(), ff_dnn_execute_layer_math_binary(), ff_dnn_execute_layer_math_unary(), ff_dnn_execute_layer_maximum(), and ff_dnn_execute_layer_pad().
int32_t ff_calculate_operand_dims_count | ( | const DnnOperand * | oprd | ) |
Definition at line 490 of file dnn_backend_native.c.
Referenced by ff_dnn_execute_layer_math_unary(), ff_dnn_execute_layer_maximum(), math_binary_commutative(), and math_binary_not_commutative().