On 05/10/17 08:43, wm4 wrote:
> On Wed,  4 Oct 2017 23:30:52 +0100
> Mark Thompson <[email protected]> wrote:
> 
>> These are needed for the config structures in the following patch.
>> ---
>> Fake hwaccels are omitted, they would just be deleted in a later patch 
>> without ever being used.
>>
>>
>>  libavcodec/hwaccels.h | 59 
>> +++++++++++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 59 insertions(+)
>>  create mode 100644 libavcodec/hwaccels.h
>>
>> diff --git a/libavcodec/hwaccels.h b/libavcodec/hwaccels.h
>> new file mode 100644
>> index 000000000..6dee94b44
>> --- /dev/null
>> +++ b/libavcodec/hwaccels.h
>> @@ -0,0 +1,59 @@
>> +/*
>> + * This file is part of Libav.
>> + *
>> + * Libav is free software; you can redistribute it and/or
>> + * modify it under the terms of the GNU Lesser General Public
>> + * License as published by the Free Software Foundation; either
>> + * version 2.1 of the License, or (at your option) any later version.
>> + *
>> + * Libav is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
>> + * Lesser General Public License for more details.
>> + *
>> + * You should have received a copy of the GNU Lesser General Public
>> + * License along with Libav; if not, write to the Free Software
>> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
>> USA
>> + */
>> +
>> +#ifndef AVCODEC_HWACCELS_H
>> +#define AVCODEC_HWACCELS_H
>> +
>> +#include "avcodec.h"
>> +
>> +extern AVHWAccel ff_h263_vaapi_hwaccel;
>> +extern AVHWAccel ff_h264_cuvid_hwaccel;
>> +extern AVHWAccel ff_h264_d3d11va_hwaccel;
>> +extern AVHWAccel ff_h264_d3d11va2_hwaccel;
>> +extern AVHWAccel ff_h264_dxva2_hwaccel;
>> +extern AVHWAccel ff_h264_vaapi_hwaccel;
>> +extern AVHWAccel ff_h264_vda_hwaccel;
>> +extern AVHWAccel ff_h264_vda_old_hwaccel;
>> +extern AVHWAccel ff_h264_vdpau_hwaccel;
>> +extern AVHWAccel ff_hevc_cuvid_hwaccel;
>> +extern AVHWAccel ff_hevc_d3d11va_hwaccel;
>> +extern AVHWAccel ff_hevc_d3d11va2_hwaccel;
>> +extern AVHWAccel ff_hevc_dxva2_hwaccel;
>> +extern AVHWAccel ff_hevc_vaapi_hwaccel;
>> +extern AVHWAccel ff_hevc_vdpau_hwaccel;
>> +extern AVHWAccel ff_mpeg1_vdpau_hwaccel;
>> +extern AVHWAccel ff_mpeg2_d3d11va_hwaccel;
>> +extern AVHWAccel ff_mpeg2_d3d11va2_hwaccel;
>> +extern AVHWAccel ff_mpeg2_dxva2_hwaccel;
>> +extern AVHWAccel ff_mpeg2_vaapi_hwaccel;
>> +extern AVHWAccel ff_mpeg2_vdpau_hwaccel;
>> +extern AVHWAccel ff_mpeg4_vaapi_hwaccel;
>> +extern AVHWAccel ff_mpeg4_vdpau_hwaccel;
>> +extern AVHWAccel ff_vc1_d3d11va_hwaccel;
>> +extern AVHWAccel ff_vc1_d3d11va2_hwaccel;
>> +extern AVHWAccel ff_vc1_dxva2_hwaccel;
>> +extern AVHWAccel ff_vc1_vaapi_hwaccel;
>> +extern AVHWAccel ff_vc1_vdpau_hwaccel;
>> +extern AVHWAccel ff_vp8_vaapi_hwaccel;
>> +extern AVHWAccel ff_wmv3_d3d11va_hwaccel;
>> +extern AVHWAccel ff_wmv3_d3d11va2_hwaccel;
>> +extern AVHWAccel ff_wmv3_dxva2_hwaccel;
>> +extern AVHWAccel ff_wmv3_vaapi_hwaccel;
>> +extern AVHWAccel ff_wmv3_vdpau_hwaccel;
>> +
>> +#endif /* AVCODEC_HWACCELS_H */
> 
> Hm not sure, why not just declare them ad-hoc where they are needed?

Because a list is needed somewhere - see 7/9.  Also that would be pretty 
horrible in places like h264dec.c which reference a lot of them.

- Mark
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to