FFmpeg
Data Structures | Macros | Functions
dnn_filter_common.c File Reference
#include "dnn_filter_common.h"
#include "libavutil/avstring.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"

Go to the source code of this file.

Data Structures

struct  DnnFilterBase
 

Macros

#define MAX_SUPPORTED_OUTPUTS_NB   4
 

Functions

static char ** separate_output_names (const char *expr, const char *val_sep, int *separated_nb)
 
int ff_dnn_filter_init_child_class (AVFilterContext *filter)
 
void * ff_dnn_filter_child_next (void *obj, void *prev)
 
int ff_dnn_init (DnnContext *ctx, DNNFunctionType func_type, AVFilterContext *filter_ctx)
 
int ff_dnn_set_frame_proc (DnnContext *ctx, FramePrePostProc pre_proc, FramePrePostProc post_proc)
 
int ff_dnn_set_detect_post_proc (DnnContext *ctx, DetectPostProc post_proc)
 
int ff_dnn_set_classify_post_proc (DnnContext *ctx, ClassifyPostProc post_proc)
 
int ff_dnn_get_input (DnnContext *ctx, DNNData *input)
 
int ff_dnn_get_output (DnnContext *ctx, int input_width, int input_height, int *output_width, int *output_height)
 
int ff_dnn_execute_model (DnnContext *ctx, AVFrame *in_frame, AVFrame *out_frame)
 
int ff_dnn_execute_model_classification (DnnContext *ctx, AVFrame *in_frame, AVFrame *out_frame, const char *target)
 
DNNAsyncStatusType ff_dnn_get_result (DnnContext *ctx, AVFrame **in_frame, AVFrame **out_frame)
 
int ff_dnn_flush (DnnContext *ctx)
 
void ff_dnn_uninit (DnnContext *ctx)
 

Macro Definition Documentation

◆ MAX_SUPPORTED_OUTPUTS_NB

#define MAX_SUPPORTED_OUTPUTS_NB   4

Definition at line 24 of file dnn_filter_common.c.

Function Documentation

◆ separate_output_names()

static char** separate_output_names ( const char *  expr,
const char *  val_sep,
int *  separated_nb 
)
static

Definition at line 26 of file dnn_filter_common.c.

Referenced by ff_dnn_init().

◆ ff_dnn_filter_init_child_class()

int ff_dnn_filter_init_child_class ( AVFilterContext filter)

Definition at line 61 of file dnn_filter_common.c.

◆ ff_dnn_filter_child_next()

void* ff_dnn_filter_child_next ( void *  obj,
void *  prev 
)

Definition at line 67 of file dnn_filter_common.c.

◆ ff_dnn_init()

int ff_dnn_init ( DnnContext ctx,
DNNFunctionType  func_type,
AVFilterContext filter_ctx 
)

Definition at line 73 of file dnn_filter_common.c.

Referenced by dnn_classify_init(), dnn_detect_init(), and init().

◆ ff_dnn_set_frame_proc()

int ff_dnn_set_frame_proc ( DnnContext ctx,
FramePrePostProc  pre_proc,
FramePrePostProc  post_proc 
)

Definition at line 139 of file dnn_filter_common.c.

◆ ff_dnn_set_detect_post_proc()

int ff_dnn_set_detect_post_proc ( DnnContext ctx,
DetectPostProc  post_proc 
)

Definition at line 146 of file dnn_filter_common.c.

Referenced by dnn_detect_init().

◆ ff_dnn_set_classify_post_proc()

int ff_dnn_set_classify_post_proc ( DnnContext ctx,
ClassifyPostProc  post_proc 
)

Definition at line 152 of file dnn_filter_common.c.

Referenced by dnn_classify_init().

◆ ff_dnn_get_input()

int ff_dnn_get_input ( DnnContext ctx,
DNNData input 
)

Definition at line 158 of file dnn_filter_common.c.

Referenced by config_input().

◆ ff_dnn_get_output()

int ff_dnn_get_output ( DnnContext ctx,
int  input_width,
int  input_height,
int *  output_width,
int *  output_height 
)

Definition at line 163 of file dnn_filter_common.c.

Referenced by config_output().

◆ ff_dnn_execute_model()

int ff_dnn_execute_model ( DnnContext ctx,
AVFrame in_frame,
AVFrame out_frame 
)

Definition at line 171 of file dnn_filter_common.c.

Referenced by activate(), dnn_detect_activate(), and filter_frame().

◆ ff_dnn_execute_model_classification()

int ff_dnn_execute_model_classification ( DnnContext ctx,
AVFrame in_frame,
AVFrame out_frame,
const char *  target 
)

Definition at line 183 of file dnn_filter_common.c.

Referenced by dnn_classify_activate().

◆ ff_dnn_get_result()

DNNAsyncStatusType ff_dnn_get_result ( DnnContext ctx,
AVFrame **  in_frame,
AVFrame **  out_frame 
)

◆ ff_dnn_flush()

int ff_dnn_flush ( DnnContext ctx)

◆ ff_dnn_uninit()

void ff_dnn_uninit ( DnnContext ctx)

Definition at line 208 of file dnn_filter_common.c.

Referenced by dnn_classify_uninit(), dnn_detect_uninit(), and uninit().