mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
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>
This commit is contained in:
parent
25c1cd909f
commit
c636dc9819
4 changed files with 39 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue