[FFmpeg-devel] [PATCH] avfilter: add dewobble_opencl filter

Lynne dev at lynne.ee
Sun Aug 15 14:11:27 EEST 2021


15 Aug 2021, 11:13 by daniel.playfair.cal at gmail.com:

> On Sun, Aug 15, 2021 at 6:18 PM Paul B Mahol <onemda at gmail.com> wrote:
>
>> Non native filters can not be named like this.
>>
>
> OK, how would you suggest to name it - just "dewobble"?
>
> My thinking was that since the user must ensure that the input/output
> is OpenCL hardware frames (e.g. using hwupload/hwmap), the "_opencl"
> postfix in the name would serve a hint that this is necessary (as it
> is for all the native OpenCL filters).
>

All library wrappers must be prefixed with 'lib', so 'libdewobble_opencl'.

> +static cl_int copy_frame_to_buffer(AVFilterContext * avctx,
> +                                   cl_context context,
> +                                   cl_command_queue command_queue,
> +                                   AVFrame * frame, cl_mem input_buffer)
Why are there mandatory GPU memcpys on both the input and output?
Can't the library be made to work with images rather than buffers?

> /// Motion stabilization algorithm, mirroring those available in libdewobble.
Can't it just use the defines from libdewobble instead?

Finally, coding style, follow the coding style. No brackets around 1-line statements,
function arguments do not go on one line each, for (int i) is supported, and don't mix
C++ and C-style comments, just use C, since that's what we use most often, we don't
strictly enforce the 80-char line guideline if the code looks like a mess after newlines.



More information about the ffmpeg-devel mailing list