mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-13 20:44:38 +08:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user