X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fopencl.c;h=95f0bfc604c0d3714af396e564d49993436fe3c0;hb=82ccb9cba9a7bd530ba2070c90f03d0fde9af1bd;hp=ae61667380a646379e54d496ff22fc4e26982b7a;hpb=cbd5e737fee5e64109fffbc5c2dc05024a06c2c6;p=ffmpeg diff --git a/libavfilter/opencl.c b/libavfilter/opencl.c index ae61667380a..95f0bfc604c 100644 --- a/libavfilter/opencl.c +++ b/libavfilter/opencl.c @@ -19,12 +19,9 @@ #include #include -#include "libavutil/hwcontext.h" -#include "libavutil/hwcontext_opencl.h" #include "libavutil/mem.h" #include "libavutil/pixdesc.h" -#include "avfilter.h" #include "formats.h" #include "opencl.h" @@ -340,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"); +}