vaapi_encode: Check packed header capabilities

This improves behaviour with drivers which do not support packed
headers, such as AMD VCE on mesa/gallium.
This commit is contained in:
Mark Thompson 2016-09-18 14:59:59 +01:00
parent 80a5d05108
commit 892bbbcdc1
5 changed files with 54 additions and 7 deletions

View file

@ -1221,6 +1221,10 @@ static av_cold int vaapi_encode_h264_init(AVCodecContext *avctx)
else
ctx->va_rc_mode = VA_RC_CQP;
ctx->va_packed_headers =
VA_ENC_PACKED_HEADER_SEQUENCE | // SPS and PPS.
VA_ENC_PACKED_HEADER_SLICE | // Slice headers.
VA_ENC_PACKED_HEADER_MISC; // SEI.
ctx->surface_width = FFALIGN(avctx->width, 16);
ctx->surface_height = FFALIGN(avctx->height, 16);