mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-06 09:22:36 +08:00
lavfi/dnn: refine code for frame pre/proc processing
This commit is contained in:
@@ -63,6 +63,8 @@ typedef struct DNNData{
|
||||
DNNColorOrder order;
|
||||
} DNNData;
|
||||
|
||||
typedef int (*FramePrePostProc)(AVFrame *frame, DNNData *model, AVFilterContext *filter_ctx);
|
||||
|
||||
typedef struct DNNModel{
|
||||
// Stores model that can be different for different backends.
|
||||
void *model;
|
||||
@@ -80,10 +82,10 @@ typedef struct DNNModel{
|
||||
const char *output_name, int *output_width, int *output_height);
|
||||
// set the pre process to transfer data from AVFrame to DNNData
|
||||
// the default implementation within DNN is used if it is not provided by the filter
|
||||
int (*pre_proc)(AVFrame *frame_in, DNNData *model_input, AVFilterContext *filter_ctx);
|
||||
FramePrePostProc frame_pre_proc;
|
||||
// set the post process to transfer data from DNNData to AVFrame
|
||||
// the default implementation within DNN is used if it is not provided by the filter
|
||||
int (*post_proc)(AVFrame *frame_out, DNNData *model_output, AVFilterContext *filter_ctx);
|
||||
FramePrePostProc frame_post_proc;
|
||||
} DNNModel;
|
||||
|
||||
// Stores pointers to functions for loading, executing, freeing DNN models for one of the backends.
|
||||
|
Reference in New Issue
Block a user