[FFmpeg-devel] [PATCH] lavfi: Add OpenCL avgblur filter

Mark Thompson sw at jkqxz.net
Fri Mar 23 02:36:09 EET 2018

On 21/03/18 13:09, Dylan Fernando wrote:
> On Tue, Mar 20, 2018 at 10:34 AM, Mark Thompson <sw at jkqxz.net> wrote:
>> On 19/03/18 02:30, dylanf123 at gmail.com wrote:
>>> From: drfer3 <drfer3 at student.monash.edu>
>>> Behaves like the existing avgblur filter, except working on OpenCL
>>> hardware frames. Takes exactly the same options.
>>> ---
>>>  configure                       |   1 +
>>>  libavfilter/Makefile            |   2 +
>>>  libavfilter/allfilters.c        |   1 +
>>>  libavfilter/opencl/avgblur.cl   |  60 ++++++++
>>>  libavfilter/opencl_source.h     |   1 +
>>>  libavfilter/vf_avgblur_opencl.c | 328 ++++++++++++++++++++++++++++++
>> ++++++++++
>>>  6 files changed, 393 insertions(+)
>>>  create mode 100644 libavfilter/opencl/avgblur.cl
>>>  create mode 100644 libavfilter/vf_avgblur_opencl.c
>>> ...
>> Ignoring the one trivial issue above which I can easily fix myself, this
>> all looks good to me.  I'll try to test on some other platforms (non-Intel,
>> at least AMD and Mali) tomorrow, but I don't anticipate any issues.  Does
>> anyone else have any thoughts?  I'll push this after tomorrow if there
>> isn't anything further.

And pushed, thank you!

> What information should I put in my GSoC application? How should I
> structure it? Should I give a rough timeline detailing exactly which color
> conversion and scaling algorithms I’ll be implementing? If so, which files
> should I look at to see the current colour conversion code?

I have to admit I'm not entirely sure what you need to put in the application (I haven't done this bit before, so I'm also reading what the GSoC site says).  Can anyone else give some guidance here about how it has worked in the past in FFmpeg?

Current scaling and colour conversion code is mostly found in libswscale, though there are also other places like the colorspace filter.  I don't know whether any of these will translate suitably to GPU code and what the right approach is here - some investigation will be required.

- Mark

More information about the ffmpeg-devel mailing list