mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
dnn: add a new interface DNNModel.get_output
for some cases (for example, super resolution), the DNN model changes the frame size which impacts the filter behavior, so the filter needs to know the out frame size at very beginning. Currently, the filter reuses DNNModule.execute_model to query the out frame size, it is not clear from interface perspective, so add a new explict interface DNNModel.get_output for such query.
This commit is contained in:
@@ -51,6 +51,9 @@ typedef struct DNNModel{
|
||||
// Gets model input information
|
||||
// Just reuse struct DNNData here, actually the DNNData.data field is not needed.
|
||||
DNNReturnType (*get_input)(void *model, DNNData *input, const char *input_name);
|
||||
// Gets model output width/height with given input w/h
|
||||
DNNReturnType (*get_output)(void *model, const char *input_name, int input_width, int input_height,
|
||||
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, void *user_data);
|
||||
|
||||
Reference in New Issue
Block a user