[FFmpeg-devel] [PATCH] avutil/opencl: don't include config.h

Thilo Borgmann thilo.borgmann at mail.de
Thu Jan 8 22:54:48 CET 2015


Am 08.01.15 17:43, schrieb James Almer:
> On 08/01/15 4:52 AM, Wei Gao wrote:
>> 2015-01-08 10:10 GMT+08:00 James Almer <jamrial at gmail.com>:
>>
>>> On 07/01/15 10:55 PM, Wei Gao wrote:
>>>> 2015-01-08 8:42 GMT+08:00 Michael Niedermayer <michaelni at gmx.at>:
>>>>
>>>>> On Wed, Jan 07, 2015 at 05:44:41PM -0300, James Almer wrote:
>>>>>> On 06/01/15 11:27 PM, Michael Niedermayer wrote:
>>>>>>> On Tue, Jan 06, 2015 at 01:56:01AM -0300, James Almer wrote:
>>>>>>>> It's not an installed header. Use libavutil/avconfig.h instead.
>>>>>>>
>>>>>>> assuming noone objects to this "hack" ... ugly but it should fix the
>>>>>>> build so ok
>>>>>>
>>>>>> Yes, i agree it's kinda ugly. What about this instead?
>>>>>
>>>>> LGTM but i dont have opencl setup so havnt tested it
>>>>>
>>>> Hi
>>>>
>>>> diff --git a/libavutil/opencl.h b/libavutil/opencl.h
>>>> index 4655cba..0b7b8d4 100644
>>>> --- a/libavutil/opencl.h
>>>> +++ b/libavutil/opencl.h
>>>> @@ -32,11 +32,10 @@
>>>>  #ifndef LIBAVUTIL_OPENCL_H
>>>>  #define LIBAVUTIL_OPENCL_H
>>>>
>>>> -#include "config.h"
>>>> -#if HAVE_CL_CL_H
>>>> -#include <CL/cl.h>
>>>> -#else
>>>> +#ifdef __APPLE__
>>>>  #include <OpenCL/cl.h>
>>>> +#else
>>>> +#include <CL/cl.h>
>>>>  #endif
>>>>  #include <stdint.h>
>>>>  #include "dict.h"
>>>> just this patch right? I can test it, but I don't have apple platform.
>>>
>>> Yes.
>>> The CL_cl_h check in configure could also be removed alongside this since
>>> it wouldn't
>>> be necessary anymore.
>>>
>> Hi
>> Thanks, so I merge the patch above then compile ffmpeg to test right?
>> I want to clear the way of testing.
>>
>> Thanks
>> Best regards
> 
> Yes

The patch works for me on OSX 10.10.1
Compiled and tested (unsharp=7:7:2:opencl=1).

-Thilo


More information about the ffmpeg-devel mailing list