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','!')
98 const char *output_name,
int *output_width,
int *output_height);
static FilteringContext * filter_ctx
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)
AVFilterContext * filter_ctx
DNNModule * ff_get_dnn_module(DNNBackendType backend_type)
FramePrePostProc frame_post_proc
const OptionDef options[]
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
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
int(* get_input)(void *model, DNNData *input, const char *input_name)
void(* free_model)(DNNModel **model)
const char ** output_names
int(* FramePrePostProc)(AVFrame *frame, DNNData *model, AVFilterContext *filter_ctx)
int(* get_output)(void *model, const char *input_name, int input_width, int input_height, const char *output_name, int *output_width, int *output_height)
int(* flush)(const DNNModel *model)
int(* execute_model)(const DNNModel *model, DNNExecBaseParams *exec_params)