]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/opencl.c
lavfi/opencl: add nlmeans_opencl filter
[ffmpeg] / libavfilter / opencl.c
index ac5eec68c686912e53db1c134dfa5050101ba290..95f0bfc604c0d3714af396e564d49993436fe3c0 100644 (file)
@@ -337,3 +337,16 @@ int ff_opencl_filter_work_size_from_image(AVFilterContext *avctx,
 
     return 0;
 }
+
+void ff_opencl_print_const_matrix_3x3(AVBPrint *buf, const char *name_str,
+                                      double mat[3][3])
+{
+    int i, j;
+    av_bprintf(buf, "__constant float %s[9] = {\n", name_str);
+    for (i = 0; i < 3; i++) {
+        for (j = 0; j < 3; j++)
+            av_bprintf(buf, " %.5ff,", mat[i][j]);
+        av_bprintf(buf, "\n");
+    }
+    av_bprintf(buf, "};\n");
+}