[FFmpeg-devel] [PATCH] lavfi: add gblur_opencl filter
Moritz Barsnick
barsnick at gmx.net
Thu Apr 25 17:18:39 EEST 2019
On Thu, Apr 25, 2019 at 22:41:49 +1000, Dylan Fernando wrote:
> +static const AVOption gblur_opencl_options[] = {
> + { "sigma", "set horizontal size", OFFSET(sigma), AV_OPT_TYPE_FLOAT, {.dbl=0.5}, 0.0, 1024, FLAGS },
^
Shouldn't this be "set sigma"?
> + { "planes", "set planes to filter", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=0xF}, 0, 0xF, FLAGS },
> + { "sigmaV", "set vertical sigma", OFFSET(sigmaV), AV_OPT_TYPE_FLOAT, {.dbl=-1}, -1, 1024, FLAGS },
> + { NULL }
Please also add documentation to doc/filters.texi. You could do this by
reference to the "gblur" filter, but as this filter's options are
slightly different, you will need to copy the relevant sections.
Furthermore, CamelCase variables aren't usually accepted for ffmpeg own
variables, but this mirrors the gblur filter, so - oh well.
> + matrix_horiz = av_malloc(matrix_bytes_horiz);
> + if (!matrix_horiz) {
> + av_freep(&matrix_horiz);
If av_malloc() returned 0/NULL, does it ever need to be freed???
> + matrix_vert = av_malloc(matrix_bytes_vert);
> + if (!matrix_vert) {
> + av_freep(&matrix_vert);
Ditto
I can't judge on the rest.
Cheers,
Moritz
More information about the ffmpeg-devel
mailing list