[FFmpeg-devel] [PATCH]opencl: compile kernels separately

Lenny Wang lenny at multicorewareinc.com
Thu Oct 31 06:32:05 CET 2013


On Wed, Oct 30, 2013 at 11:41 AM, Reimar Döffinger
<Reimar.Doeffinger at gmx.de> wrote:
> On Wed, Oct 30, 2013 at 12:12:20PM -0500, Lenny Wang wrote:
>> Thanks for your comments.
>>
>> I can keep the ABI intact without modifying
>> av_opencl_register_kernel_code() but still make this patch work as
>> intended.
>>
>> I can also keep the old API but since their functionality will break,
>> I can do the "return AVERROR(ENOSYS) hack with a message" based on
>> Michael's suggestion.
>
> Also, maybe you could go through your new API and check that you can
> extend it without breaking old applications in as many places as
> possible.
> Things like making sure that users will use an allocation function
> for structures for example, that means that you an always add additional
> members at the end.
> At least whenever it isn't much effort to do.
> We should really avoid keeping APIs in this "experimental" state,
> it's ok for a short while, but after a certain time it starts saying
> "we can't be bothered to make sure our stuff actually works properly".

Attached new patch modified based on previous suggestions.
* To keep libavfilter ABI intact, av_opencl_register_kernel_code() unchanged
* Preserved old opencl API marked as deprecated and emit error
messages when called
* the new av_opencl_compile() function allows opencl components like
filters to manage opencl kernels on their own, ocl-util now only
provide compilation service without managing the entire kernel pool
and related data structures

It's up to you how much longer to keep the "experimental" state or not
at all.  I think it's pretty solid after the patch.  Thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compile_opencl_kernels_separately.patch
Type: application/octet-stream
Size: 21251 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131031/256fc401/attachment.obj>


More information about the ffmpeg-devel mailing list