author: Andres Salomon Bullseye's libva-dev is too old, and doesn't support av1 encoding. So (partially) revert the patch that ties it into encode accelerator (1c1502a0cbc69465e2dc8b2a6d0c0fb7213376b4), and don't build the av1 vaapi encoder that was added with chromium 114. --- a/media/gpu/vaapi/BUILD.gn +++ b/media/gpu/vaapi/BUILD.gn @@ -38,8 +38,6 @@ source_set("vaapi") { sources = [ "av1_vaapi_video_decoder_delegate.cc", "av1_vaapi_video_decoder_delegate.h", - "av1_vaapi_video_encoder_delegate.cc", - "av1_vaapi_video_encoder_delegate.h", "h264_vaapi_video_decoder_delegate.cc", "h264_vaapi_video_decoder_delegate.h", "h264_vaapi_video_encoder_delegate.cc", --- a/media/gpu/vaapi/vaapi_video_encode_accelerator.cc +++ b/media/gpu/vaapi/vaapi_video_encode_accelerator.cc @@ -41,7 +41,6 @@ #include "media/gpu/gpu_video_encode_accelerator_helpers.h" #include "media/gpu/h264_dpb.h" #include "media/gpu/macros.h" -#include "media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h" #include "media/gpu/vaapi/h264_vaapi_video_encoder_delegate.h" #include "media/gpu/vaapi/va_surface.h" #include "media/gpu/vaapi/vaapi_common.h" @@ -200,7 +199,7 @@ bool VaapiVideoEncodeAccelerator::Initia const VideoCodec codec = VideoCodecProfileToVideoCodec(config.output_profile); if (codec != VideoCodec::kH264 && codec != VideoCodec::kVP8 && - codec != VideoCodec::kVP9 && codec != VideoCodec::kAV1) { + codec != VideoCodec::kVP9) { MEDIA_LOG(ERROR, media_log.get()) << "Unsupported profile: " << GetProfileName(config.output_profile); return false; @@ -293,7 +292,6 @@ void VaapiVideoEncodeAccelerator::Initia break; case VideoCodec::kVP8: case VideoCodec::kVP9: - case VideoCodec::kAV1: mode = VaapiWrapper::kEncodeConstantQuantizationParameter; break; default: @@ -356,12 +354,6 @@ void VaapiVideoEncodeAccelerator::Initia vaapi_wrapper_, error_cb); } break; - case VideoCodec::kAV1: - if (!IsConfiguredForTesting()) { - encoder_ = std::make_unique( - vaapi_wrapper_, error_cb); - } - break; default: NOTREACHED() << "Unsupported codec type " << GetCodecName(output_codec_); return; @@ -835,10 +827,6 @@ VaapiVideoEncodeAccelerator::CreateEncod case VideoCodec::kVP9: picture = new VaapiVP9Picture(std::move(reconstructed_surface)); break; - case VideoCodec::kAV1: - picture = new VaapiAV1Picture(/*display_va_surface=*/nullptr, - std::move(reconstructed_surface)); - break; default: return nullptr; }