mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-25 01:41:31 +08: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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user