[FFmpeg-devel] [PATCH 10/26] vaapi_encode: Choose profiles dynamically

Mark Thompson sw at jkqxz.net
Tue Apr 24 02:01:18 EEST 2018


On 23/04/18 03:54, Michael Niedermayer wrote:
> On Sun, Apr 22, 2018 at 04:29:05PM +0100, Mark Thompson wrote:
>> Previously there was one fixed choice for each codec (e.g. H.265 -> Main
>> profile), and using anything else then required an explicit option from
>> the user.  This changes to selecting the profile based on the input format
>> and the set of profiles actually supported by the driver (e.g. P010 input
>> will choose Main 10 profile for H.265 if the driver supports it).
>>
>> The entrypoint and render target format are also chosen dynamically in the
>> same way, removing those explicit selections from the per-codec code.
>> ---
>>  doc/encoders.texi               |   3 +
>>  libavcodec/vaapi_encode.c       | 261 +++++++++++++++++++++++++++++++---------
>>  libavcodec/vaapi_encode.h       |  41 +++++--
>>  libavcodec/vaapi_encode_h264.c  |  45 ++-----
>>  libavcodec/vaapi_encode_h265.c  |  43 +++----
>>  libavcodec/vaapi_encode_mjpeg.c |  13 +-
>>  libavcodec/vaapi_encode_mpeg2.c |  36 ++----
>>  libavcodec/vaapi_encode_vp8.c   |  11 +-
>>  libavcodec/vaapi_encode_vp9.c   |  34 ++----
>>  9 files changed, 306 insertions(+), 181 deletions(-)
> 
> breaks build on linux x86-64 ubuntu
> 
> CC	libavcodec/vaapi_encode.o
> libavcodec/vaapi_encode.c:1007:5: error: ‘VAEntrypointEncSliceLP’ undeclared here (not in a function)
>      VAEntrypointEncSliceLP,
>      ^
> libavcodec/vaapi_encode.c:1011:5: error: initializer element is not constant
>      VAEntrypointEncSliceLP,
>      ^
> libavcodec/vaapi_encode.c:1011:5: error: (near initialization for ‘vaapi_encode_entrypoints_low_power[0]’)
> make: *** [libavcodec/vaapi_encode.o] Error 1
> 
> 
> [...]

Right, that lost some of preprocessor checks around EncSliceLP in the refactoring.

Fixed locally (don't include it in the normal list and don't include the low-power list at all in that case).  I'll try to test again with more old versions to make sure there aren't any similar build failures lurking.

Thanks,

- Mark


More information about the ffmpeg-devel mailing list