[FFmpeg-devel] [PATCH]opencl: compile kernels separately
lenny at multicorewareinc.com
Wed Oct 30 08:36:04 CET 2013
When will be the next scheduled API bump?
We cannot just keep the old API cause the data structures are also
slightly reorganized to support the new features.
This API change only affects the OpenCL stuff, and as a matter of
fact, we will update the existing opencl filters (deshake & unsharp)
right after this patch gets merged. Our new filters rely on the
features introduced in this patch to work properly.
I consider the previous opencl work in ffmpeg experimental, it was not
enabled in any public builds. The last patch was submitted about 10
months ago, and now it's good time for an overhaul. In the long run,
this patch will also make other opencl efforts a lot easier.
On Wed, Oct 30, 2013 at 1:32 AM, Reimar Döffinger
<Reimar.Doeffinger at gmx.de> wrote:
> On 30.10.2013, at 04:07, Wei Gao <highgod0401 at gmail.com> wrote:
>> 2013/10/30 Lenny Wang <lenny at multicorewareinc.com>
>>> Attached new patch after 2nd review.
>>> On Tue, Oct 29, 2013 at 3:24 PM, Lenny Wang <lenny at multicorewareinc.com>
>>>> Attached new patch has been cleaned up and modified based on previous
>>>> reviewer's comments. Any comments or questions please just let me
>>>> On Tue, Oct 29, 2013 at 4:19 AM, Thilo Borgmann <thilo.borgmann at mail.de>
>>>>> Am 29.10.13 07:59, schrieb Lenny Wang:
>>>>>> Currently opencl kernels in ffmpeg are compiled altogether at
>>>>>> initialization stage, most of related data structures are maintained
>>>>>> the opencl framework of ffmpeg. This is very cumbersome to use and is
>>>>>> efficient. This patch uses distributed opencl programs/kernels for
>>>>>> filter (or potentially any other component that uses opencl), allowing
>>>>>> kernels to be compiled separately at each component's initialization
>>>>>> Tests have been conducted successfully on mainstream Nvidia/AMD/Intel
>>>>>> platforms with "-vf deshake=opencl=1,unsharp=opencl=1".
>>>>> Your patch contains trailing whitespaces, a lot of unnecessary and
>>>>> changes. Please clean it up and resubmit it.
>> Hi, I reviewed the patch, and still has some bugs on code styles.
>> I correct all bugs which I have found and make a patch, is it OK for you?
> The stuff you are changing all seems to be public API (has av_ prefix).
> You may only change those in a way that might break any existing code at a major API bump, and usually only after a transition period.
> If you want to use a new API you can add it with new names, but you can't just remove/change the old one.
> Or to put it differently: if you install a previous FFmpeg version and then replace libavutil.so and only that one with a version after this patch and _any_ if the opencl filters break, the change is wrong.
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
More information about the ffmpeg-devel