FFmpeg
Data Structures | Macros | Typedefs | Enumerations | Functions
dnn_interface.h File Reference
#include <stdint.h>
#include "libavutil/frame.h"
#include "avfilter.h"

Go to the source code of this file.

Data Structures

struct  DNNData
 
struct  DNNExecBaseParams
 
struct  DNNExecClassificationParams
 
struct  DNNModel
 
struct  DNNModule
 

Macros

#define DNN_GENERIC_ERROR   FFERRTAG('D','N','N','!')
 

Typedefs

typedef int(* FramePrePostProc) (AVFrame *frame, DNNData *model, AVFilterContext *filter_ctx)
 
typedef int(* DetectPostProc) (AVFrame *frame, DNNData *output, uint32_t nb, AVFilterContext *filter_ctx)
 
typedef int(* ClassifyPostProc) (AVFrame *frame, DNNData *output, uint32_t bbox_index, AVFilterContext *filter_ctx)
 

Enumerations

enum  DNNBackendType { DNN_TF = 1, DNN_OV, DNN_TH }
 
enum  DNNDataType { DNN_FLOAT = 1, DNN_UINT8 = 4 }
 
enum  DNNColorOrder { DCO_NONE, DCO_BGR, DCO_RGB }
 
enum  DNNAsyncStatusType { DAST_FAIL, DAST_EMPTY_QUEUE, DAST_NOT_READY, DAST_SUCCESS }
 
enum  DNNFunctionType { DFT_NONE, DFT_PROCESS_FRAME, DFT_ANALYTICS_DETECT, DFT_ANALYTICS_CLASSIFY }
 
enum  DNNLayout { DL_NONE, DL_NCHW, DL_NHWC }
 

Functions

const DNNModuleff_get_dnn_module (DNNBackendType backend_type, void *log_ctx)
 
static int dnn_get_width_idx_by_layout (DNNLayout layout)
 
static int dnn_get_height_idx_by_layout (DNNLayout layout)
 
static int dnn_get_channel_idx_by_layout (DNNLayout layout)
 

Detailed Description

DNN inference engine interface.

Definition in file dnn_interface.h.

Macro Definition Documentation

◆ DNN_GENERIC_ERROR

#define DNN_GENERIC_ERROR   FFERRTAG('D','N','N','!')

Definition at line 33 of file dnn_interface.h.

Typedef Documentation

◆ FramePrePostProc

typedef int(* FramePrePostProc) (AVFrame *frame, DNNData *model, AVFilterContext *filter_ctx)

Definition at line 89 of file dnn_interface.h.

◆ DetectPostProc

typedef int(* DetectPostProc) (AVFrame *frame, DNNData *output, uint32_t nb, AVFilterContext *filter_ctx)

Definition at line 90 of file dnn_interface.h.

◆ ClassifyPostProc

typedef int(* ClassifyPostProc) (AVFrame *frame, DNNData *output, uint32_t bbox_index, AVFilterContext *filter_ctx)

Definition at line 91 of file dnn_interface.h.

Enumeration Type Documentation

◆ DNNBackendType

Enumerator
DNN_TF 
DNN_OV 
DNN_TH 

Definition at line 35 of file dnn_interface.h.

◆ DNNDataType

Enumerator
DNN_FLOAT 
DNN_UINT8 

Definition at line 37 of file dnn_interface.h.

◆ DNNColorOrder

Enumerator
DCO_NONE 
DCO_BGR 
DCO_RGB 

Definition at line 39 of file dnn_interface.h.

◆ DNNAsyncStatusType

Enumerator
DAST_FAIL 
DAST_EMPTY_QUEUE 
DAST_NOT_READY 
DAST_SUCCESS 

Definition at line 45 of file dnn_interface.h.

◆ DNNFunctionType

Enumerator
DFT_NONE 
DFT_PROCESS_FRAME 
DFT_ANALYTICS_DETECT 
DFT_ANALYTICS_CLASSIFY 

Definition at line 52 of file dnn_interface.h.

◆ DNNLayout

enum DNNLayout
Enumerator
DL_NONE 
DL_NCHW 
DL_NHWC 

Definition at line 59 of file dnn_interface.h.

Function Documentation

◆ ff_get_dnn_module()

const DNNModule* ff_get_dnn_module ( DNNBackendType  backend_type,
void *  log_ctx 
)

Definition at line 33 of file dnn_interface.c.

Referenced by ff_dnn_init().

◆ dnn_get_width_idx_by_layout()

static int dnn_get_width_idx_by_layout ( DNNLayout  layout)
inlinestatic

◆ dnn_get_height_idx_by_layout()

static int dnn_get_height_idx_by_layout ( DNNLayout  layout)
inlinestatic

◆ dnn_get_channel_idx_by_layout()

static int dnn_get_channel_idx_by_layout ( DNNLayout  layout)
inlinestatic