diff options
author | Guo, Yejun <yejun.guo@intel.com> | 2019-04-25 10:14:42 +0800 |
---|---|---|
committer | Pedro Arthur <bygrandao@gmail.com> | 2019-05-08 12:33:00 -0300 |
commit | c636dc9819ebab1a84237cc017a6a3d35ebc9cdc (patch) | |
tree | 39fd943e649cb1185f25ccce6e7be193448ba23c /libavfilter/vf_sr.c | |
parent | 25c1cd909fa6c8b6b778dc24192dc3ec780324b0 (diff) |
libavfilter/dnn: add more data type support for dnn model input
currently, only float is supported as model input, actually, there
are other data types, this patch adds uint8.
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
Diffstat (limited to 'libavfilter/vf_sr.c')
-rw-r--r-- | libavfilter/vf_sr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/vf_sr.c b/libavfilter/vf_sr.c index 0145511d11..65baf5f901 100644 --- a/libavfilter/vf_sr.c +++ b/libavfilter/vf_sr.c @@ -40,7 +40,8 @@ typedef struct SRContext { DNNBackendType backend_type; DNNModule *dnn_module; DNNModel *model; - DNNData input, output; + DNNInputData input; + DNNData output; int scale_factor; struct SwsContext *sws_contexts[3]; int sws_slice_h, sws_input_linesize, sws_output_linesize; @@ -86,6 +87,7 @@ static av_cold int init(AVFilterContext *context) return AVERROR(EIO); } + sr_context->input.dt = DNN_FLOAT; sr_context->sws_contexts[0] = NULL; sr_context->sws_contexts[1] = NULL; sr_context->sws_contexts[2] = NULL; |