From f0a978a519167e5ad5dd479245a7b5da77488d43 Mon Sep 17 00:00:00 2001 From: Mark Thompson Date: Sun, 1 Oct 2017 22:51:13 +0100 Subject: [PATCH] vaapi: Remove H.264 baseline profile This has been deprecated in libva2 because hardware does not and will not support it. Therefore never consider it for decode, and for encode assume the user meant constrained baseline profile instead. --- libavcodec/vaapi_decode.c | 1 - libavcodec/vaapi_encode_h264.c | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c index 5ae98d8fd7..febe22a710 100644 --- a/libavcodec/vaapi_decode.c +++ b/libavcodec/vaapi_decode.c @@ -247,7 +247,6 @@ static const struct { MAP(MPEG4, MPEG4_MAIN, MPEG4Main ), MAP(H264, H264_CONSTRAINED_BASELINE, H264ConstrainedBaseline), - MAP(H264, H264_BASELINE, H264Baseline), MAP(H264, H264_MAIN, H264Main ), MAP(H264, H264_HIGH, H264High ), #if VA_CHECK_VERSION(0, 37, 0) diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c index 1288249be7..3ff19d2c83 100644 --- a/libavcodec/vaapi_encode_h264.c +++ b/libavcodec/vaapi_encode_h264.c @@ -863,12 +863,13 @@ static av_cold int vaapi_encode_h264_init(AVCodecContext *avctx) ctx->codec = &vaapi_encode_type_h264; switch (avctx->profile) { + case FF_PROFILE_H264_BASELINE: + av_log(avctx, AV_LOG_WARNING, "H.264 baseline profile is not " + "supported, using constrained baseline profile instead.\n"); + avctx->profile = FF_PROFILE_H264_CONSTRAINED_BASELINE; case FF_PROFILE_H264_CONSTRAINED_BASELINE: ctx->va_profile = VAProfileH264ConstrainedBaseline; break; - case FF_PROFILE_H264_BASELINE: - ctx->va_profile = VAProfileH264Baseline; - break; case FF_PROFILE_H264_MAIN: ctx->va_profile = VAProfileH264Main; break;