diff options
author | Guo, Yejun <yejun.guo@intel.com> | 2021-02-07 14:35:22 +0800 |
---|---|---|
committer | Guo, Yejun <yejun.guo@intel.com> | 2021-02-18 09:59:37 +0800 |
commit | 76fc6879e2c59929e7d81a72986bb4950053177e (patch) | |
tree | 62ac1a7bd345bfe6fd06f15113b1d46e466413ee /libavfilter/dnn_filter_common.c | |
parent | bdce6361004b3a24082e00b6c0126e2694a65b50 (diff) | |
download | ffmpeg-76fc6879e2c59929e7d81a72986bb4950053177e.tar.gz |
dnn: add function type for model
So the backend knows the usage of model is for frame processing,
detect, classify, etc. Each function type has different behavior
in backend when handling the input/output data of the model.
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Diffstat (limited to 'libavfilter/dnn_filter_common.c')
-rw-r--r-- | libavfilter/dnn_filter_common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/dnn_filter_common.c b/libavfilter/dnn_filter_common.c index 5d0d7d3b90..413adba406 100644 --- a/libavfilter/dnn_filter_common.c +++ b/libavfilter/dnn_filter_common.c @@ -18,7 +18,7 @@ #include "dnn_filter_common.h" -int ff_dnn_init(DnnContext *ctx, AVFilterContext *filter_ctx) +int ff_dnn_init(DnnContext *ctx, DNNFunctionType func_type, AVFilterContext *filter_ctx) { if (!ctx->model_filename) { av_log(filter_ctx, AV_LOG_ERROR, "model file for network is not specified\n"); @@ -43,7 +43,7 @@ int ff_dnn_init(DnnContext *ctx, AVFilterContext *filter_ctx) return AVERROR(EINVAL); } - ctx->model = (ctx->dnn_module->load_model)(ctx->model_filename, ctx->backend_options, filter_ctx); + ctx->model = (ctx->dnn_module->load_model)(ctx->model_filename, func_type, ctx->backend_options, filter_ctx); if (!ctx->model) { av_log(filter_ctx, AV_LOG_ERROR, "could not load DNN model\n"); return AVERROR(EINVAL); |