diff options
author | Guo, Yejun <yejun.guo@intel.com> | 2021-03-01 19:23:20 +0800 |
---|---|---|
committer | Guo, Yejun <yejun.guo@intel.com> | 2021-04-08 09:23:02 +0800 |
commit | 59021d79a24e28434f57376276625bc44eff340c (patch) | |
tree | b67d8f2e1b0b7697bd6e3e39a931652917084c2f /libavfilter/dnn_filter_common.c | |
parent | d2ccbc966b151f2500aa43e789288af188258ba3 (diff) | |
download | ffmpeg-59021d79a24e28434f57376276625bc44eff340c.tar.gz |
lavfi/dnn: refine code for frame pre/proc processing
Diffstat (limited to 'libavfilter/dnn_filter_common.c')
-rw-r--r-- | libavfilter/dnn_filter_common.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavfilter/dnn_filter_common.c b/libavfilter/dnn_filter_common.c index 413adba406..dc5966332a 100644 --- a/libavfilter/dnn_filter_common.c +++ b/libavfilter/dnn_filter_common.c @@ -64,6 +64,13 @@ int ff_dnn_init(DnnContext *ctx, DNNFunctionType func_type, AVFilterContext *fil return 0; } +int ff_dnn_set_frame_proc(DnnContext *ctx, FramePrePostProc pre_proc, FramePrePostProc post_proc) +{ + ctx->model->frame_pre_proc = pre_proc; + ctx->model->frame_post_proc = post_proc; + return 0; +} + DNNReturnType ff_dnn_get_input(DnnContext *ctx, DNNData *input) { return ctx->model->get_input(ctx->model->model, input, ctx->model_inputname); |