[FFmpeg-devel] [PATCH v3 1/4] lavu/hwcontext_opecl: fix the build warning
mypopy at gmail.com
mypopy at gmail.com
Mon Jun 4 03:42:08 EEST 2018
2018-06-04 1:42 GMT+08:00 Mark Thompson <sw at jkqxz.net>:
> On 03/06/18 04:15, Jun Zhao wrote:
>> fix the build warning when use Portable Computing Language (pocl).
>>
>> Signed-off-by: Jun Zhao <mypopydev at gmail.com>
>> ---
>> libavutil/hwcontext_opencl.c | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/libavutil/hwcontext_opencl.c b/libavutil/hwcontext_opencl.c
>> index 43b5c5a..9ecc361 100644
>> --- a/libavutil/hwcontext_opencl.c
>> +++ b/libavutil/hwcontext_opencl.c
>> @@ -2809,7 +2809,11 @@ static int opencl_map_from(AVHWFramesContext
*hwfc, AVFrame *dst,
>> static int opencl_map_to(AVHWFramesContext *hwfc, AVFrame *dst,
>> const AVFrame *src, int flags)
>> {
>> +#if HAVE_OPENCL_DRM_BEIGNET || HAVE_OPENCL_VAAPI_BEIGNET || \
>> + HAVE_OPENCL_VAAPI_INTEL_MEDIA || HAVE_OPENCL_DXVA2 || \
>> + HAVE_OPENCL_D3D11 || HAVE_OPENCL_DRM_ARM
>> OpenCLDeviceContext *priv = hwfc->device_ctx->internal->priv;
>> +#endif
>> av_assert0(dst->format == AV_PIX_FMT_OPENCL);
>> switch (src->format) {
>> #if HAVE_OPENCL_DRM_BEIGNET
>> @@ -2850,7 +2854,11 @@ static int opencl_map_to(AVHWFramesContext *hwfc,
AVFrame *dst,
>> static int opencl_frames_derive_to(AVHWFramesContext *dst_fc,
>> AVHWFramesContext *src_fc, int flags)
>> {
>> +#if HAVE_OPENCL_DRM_BEIGNET || HAVE_OPENCL_VAAPI_BEIGNET || \
>> + HAVE_OPENCL_VAAPI_INTEL_MEDIA || HAVE_OPENCL_DXVA2 || \
>> + HAVE_OPENCL_D3D11 || HAVE_OPENCL_DRM_ARM
>> OpenCLDeviceContext *priv = dst_fc->device_ctx->internal->priv;
>> +#endif
>> switch (src_fc->device_ctx->type) {
>> #if HAVE_OPENCL_DRM_BEIGNET
>> case AV_HWDEVICE_TYPE_DRM:
>>
>
> The condition is horrible and would need to be changed on any addition.
Just mark the variables unused instead.
Will use the unused mark to fix the warning.
>
> - Mark
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
--
=======================================
Jun zhao/赵军
+++++++++++++++++++++++++++++++++++++++
More information about the ffmpeg-devel
mailing list