Go to the documentation of this file.
24 #ifndef AVFILTER_DNN_FILTER_COMMON_H
25 #define AVFILTER_DNN_FILTER_COMMON_H
29 #define AVFILTER_DNN_DEFINE_CLASS_EXT(name, desc, options) \
30 static const AVClass name##_class = { \
32 .item_name = av_default_item_name, \
34 .version = LIBAVUTIL_VERSION_INT, \
35 .category = AV_CLASS_CATEGORY_FILTER, \
36 .child_next = ff_dnn_filter_child_next, \
37 .child_class_iterate = ff_dnn_child_class_iterate, \
40 #define AVFILTER_DNN_DEFINE_CLASS(fname) \
41 AVFILTER_DNN_DEFINE_CLASS_EXT(fname, #fname, fname##_options)
int ff_dnn_get_input(DnnContext *ctx, DNNData *input)
This structure describes decoded (raw) audio or video data.
int ff_dnn_set_detect_post_proc(DnnContext *ctx, DetectPostProc post_proc)
int ff_dnn_init(DnnContext *ctx, DNNFunctionType func_type, AVFilterContext *filter_ctx)
int(* DetectPostProc)(AVFrame *frame, DNNData *output, uint32_t nb, AVFilterContext *filter_ctx)
void ff_dnn_uninit(DnnContext *ctx)
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 then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
void * ff_dnn_filter_child_next(void *obj, void *prev)
static FilteringContext * filter_ctx
int ff_dnn_set_classify_post_proc(DnnContext *ctx, ClassifyPostProc post_proc)
int ff_dnn_get_output(DnnContext *ctx, int input_width, int input_height, int *output_width, int *output_height)
int ff_dnn_filter_init_child_class(AVFilterContext *filter)
int(* ClassifyPostProc)(AVFrame *frame, DNNData *output, uint32_t bbox_index, AVFilterContext *filter_ctx)
DNNAsyncStatusType ff_dnn_get_result(DnnContext *ctx, AVFrame **in_frame, AVFrame **out_frame)
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
int ff_dnn_execute_model_classification(DnnContext *ctx, AVFrame *in_frame, AVFrame *out_frame, const char *target)
int ff_dnn_execute_model(DnnContext *ctx, AVFrame *in_frame, AVFrame *out_frame)
int(* FramePrePostProc)(AVFrame *frame, DNNData *model, AVFilterContext *filter_ctx)
int ff_dnn_flush(DnnContext *ctx)
int ff_dnn_set_frame_proc(DnnContext *ctx, FramePrePostProc pre_proc, FramePrePostProc post_proc)