]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_derain.c
avfilter/dnn: get the data type of network output from dnn execution result
[ffmpeg] / libavfilter / vf_derain.c
index b7bba094643e2fd799d54ee09fb609ef648765e6..89f9d5a2ed82e3e97a8e541d44e6e746f3f67f15 100644 (file)
@@ -39,7 +39,7 @@ typedef struct DRContext {
     DNNBackendType     backend_type;
     DNNModule         *dnn_module;
     DNNModel          *model;
-    DNNInputData       input;
+    DNNData            input;
     DNNData            output;
 } DRContext;
 
@@ -137,7 +137,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
             int t = i * out->width * 3 + j;
 
             int t_in =  (i + pad_size) * in->width * 3 + j + pad_size * 3;
-            out->data[0][k] = CLIP((int)((((float *)dr_context->input.data)[t_in] - dr_context->output.data[t]) * 255), 0, 255);
+            out->data[0][k] = CLIP((int)((((float *)dr_context->input.data)[t_in] - ((float *)dr_context->output.data)[t]) * 255), 0, 255);
         }
     }