Go to the documentation of this file.
26 #ifndef AVFILTER_DNN_INTERFACE_H
27 #define AVFILTER_DNN_INTERFACE_H
33 #define DNN_GENERIC_ERROR FFERRTAG('D','N','N','!')
107 const char *output_name,
int *output_width,
int *output_height);
162 #if CONFIG_LIBTENSORFLOW
166 #if CONFIG_LIBOPENVINO
DNNAsyncStatusType(* get_result)(const DNNModel *model, AVFrame **in, AVFrame **out)
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce output
This structure describes decoded (raw) audio or video data.
FramePrePostProc frame_pre_proc
int(* DetectPostProc)(AVFrame *frame, DNNData *output, uint32_t nb, AVFilterContext *filter_ctx)
const DNNModule * dnn_module
AVFilterContext * filter_ctx
static int dnn_get_width_idx_by_layout(DNNLayout layout)
static FilteringContext * filter_ctx
char ** model_outputnames
int(* get_output)(struct DNNModel *model, const char *input_name, int input_width, int input_height, const char *output_name, int *output_width, int *output_height)
Describe the class of an AVClass context structure.
FramePrePostProc frame_post_proc
const DNNModule * ff_get_dnn_module(DNNBackendType backend_type, void *log_ctx)
DNNBackendType backend_type
int(* ClassifyPostProc)(AVFrame *frame, DNNData *output, uint32_t bbox_index, AVFilterContext *filter_ctx)
DetectPostProc detect_post_proc
DNNFunctionType func_type
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some input
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel layout
void * ff_dnn_child_next(DnnContext *obj, void *prev)
ClassifyPostProc classify_post_proc
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
void(* free_model)(DNNModel **model)
const char ** output_names
int(* FramePrePostProc)(AVFrame *frame, DNNData *model, AVFilterContext *filter_ctx)
static int dnn_get_height_idx_by_layout(DNNLayout layout)
void ff_dnn_init_child_class(DnnContext *ctx)
static int dnn_get_channel_idx_by_layout(DNNLayout layout)
const AVClass * ff_dnn_child_class_iterate_with_mask(void **iter, uint32_t backend_mask)
int(* get_input)(struct DNNModel *model, DNNData *input, const char *input_name)
int(* flush)(const DNNModel *model)
char * model_outputnames_string
int(* execute_model)(const DNNModel *model, DNNExecBaseParams *exec_params)