[FFmpeg-devel] Recent regression in VA-API compatibility (assertion in H.264 encode)
Devin Heitmueller
dheitmueller at ltnglobal.com
Fri Dec 1 20:37:25 EET 2017
Hi Mark,
>>
>> Here’s the vainfo output which provides the version info for the driver, va-api version, etc. This is on a Haswell system running Centos 7.
>>
>> libva info: VA-API version 0.34.0
>> libva info: va_getDriverName() returns 0
>> libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
>> libva info: Found init function __vaDriverInit_0_34
>> libva info: va_openDriver() returns 0
>> vainfo: VA-API version: 0.34 (libva 1.2.1)
>> vainfo: Driver version: Intel i965 driver - 1.2.2
>
> Upgrading to a version less than four years old might be a plan - I admit we do notionally support that version because of old RHEL/CentOS, but it is not well tested (as you are finding).
This is actually what you get with the very latest release of Centos 7.4 (downloaded yesterday). Hence while we could certainly argue that perhaps they’re shipping versions that are too old, it’s not like I’m running some archaic five-year-old copy of Centos I found a DVD for in the bottom of a drawer. :-)
And don’t misunderstand, I’m not against saying “Centos is dumb and should bundle newer versions of the library/driver/whatever” - I’m just trying to make clear that this is what the experience will be of any non-technical user who just does a binary install from the most recent versions of one of the more popular distros.
>
> Try this? (Not tested, hardware which can run a version that old isn't immediately to hand.)
>
> --- a/libavcodec/vaapi_encode_h264.c
> +++ b/libavcodec/vaapi_encode_h264.c
> @@ -261,7 +261,8 @@ static int vaapi_encode_h264_write_extra_header(AVCodecContext *avctx,
> return 0;
>
> #if !CONFIG_VAAPI_1
> - } else if (priv->sei_cbr_workaround_needed) {
> + } else if (priv->sei_cbr_workaround_needed &&
> + ctx->va_packed_headers & VA_ENC_PACKED_HEADER_SLICE) {
> // Insert a zero-length header using the old SEI type. This is
> // required to avoid triggering broken behaviour on Intel platforms
> // in CBR mode where an invalid SEI message is generated by the
>
Ok, will give this a try tonight and report back on my findings.
Thanks!
Devin
More information about the ffmpeg-devel
mailing list