Commit 65fc71a4 authored by Dale Curtis's avatar Dale Curtis Committed by Chromium LUCI CQ

Disable VP9 hardware decoding on Intel GPUs with hybrid decoders.

We've disabled these on Windows and ChromeOS, so it's no surprise that
we need to disable them on macOS as well.

R=zmo

Fixed: 1163111
Change-Id: I406e6ebd1d27da84964e46efb9582ce77f904dac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2613560Reviewed-by: default avatarDan Sanders <sandersd@chromium.org>
Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Auto-Submit: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841116}
parent 1916748c
...@@ -3659,6 +3659,22 @@ ...@@ -3659,6 +3659,22 @@
"features": [ "features": [
"supports_two_yuv_hardware_overlays" "supports_two_yuv_hardware_overlays"
] ]
},
{
"id": 363,
"description": "VP9 decoding is too slow on Intel Broadwell, Skylake, and CherryTrail",
"cr_bugs": [616318, 1163111],
"os": {
"type": "macosx"
},
"intel_gpu_series": [
"broadwell",
"skylake",
"cherrytrail"
],
"features": [
"disable_accelerated_vp9_decode"
]
} }
] ]
} }
...@@ -74,7 +74,7 @@ gpu::VideoDecodeAcceleratorCapabilities GetDecoderCapabilitiesInternal( ...@@ -74,7 +74,7 @@ gpu::VideoDecodeAcceleratorCapabilities GetDecoderCapabilitiesInternal(
#endif #endif
#elif defined(OS_MAC) #elif defined(OS_MAC)
capabilities.supported_profiles = capabilities.supported_profiles =
VTVideoDecodeAccelerator::GetSupportedProfiles(); VTVideoDecodeAccelerator::GetSupportedProfiles(workarounds);
#endif #endif
return GpuVideoAcceleratorUtil::ConvertMediaToGpuDecodeCapabilities( return GpuVideoAcceleratorUtil::ConvertMediaToGpuDecodeCapabilities(
...@@ -232,7 +232,8 @@ GpuVideoDecodeAcceleratorFactory::CreateVTVDA( ...@@ -232,7 +232,8 @@ GpuVideoDecodeAcceleratorFactory::CreateVTVDA(
const gpu::GpuPreferences& gpu_preferences, const gpu::GpuPreferences& gpu_preferences,
MediaLog* media_log) const { MediaLog* media_log) const {
std::unique_ptr<VideoDecodeAccelerator> decoder; std::unique_ptr<VideoDecodeAccelerator> decoder;
decoder.reset(new VTVideoDecodeAccelerator(gl_client_, media_log)); decoder.reset(
new VTVideoDecodeAccelerator(gl_client_, workarounds, media_log));
return decoder; return decoder;
} }
#endif #endif
......
...@@ -475,8 +475,10 @@ bool VTVideoDecodeAccelerator::FrameOrder::operator()( ...@@ -475,8 +475,10 @@ bool VTVideoDecodeAccelerator::FrameOrder::operator()(
VTVideoDecodeAccelerator::VTVideoDecodeAccelerator( VTVideoDecodeAccelerator::VTVideoDecodeAccelerator(
const GpuVideoDecodeGLClient& gl_client, const GpuVideoDecodeGLClient& gl_client,
const gpu::GpuDriverBugWorkarounds& workarounds,
MediaLog* media_log) MediaLog* media_log)
: gl_client_(gl_client), : gl_client_(gl_client),
workarounds_(workarounds),
media_log_(media_log), media_log_(media_log),
gpu_task_runner_(base::ThreadTaskRunnerHandle::Get()), gpu_task_runner_(base::ThreadTaskRunnerHandle::Get()),
decoder_thread_("VTDecoderThread"), decoder_thread_("VTDecoderThread"),
...@@ -588,7 +590,7 @@ bool VTVideoDecodeAccelerator::Initialize(const Config& config, ...@@ -588,7 +590,7 @@ bool VTVideoDecodeAccelerator::Initialize(const Config& config,
} }
static const base::NoDestructor<VideoDecodeAccelerator::SupportedProfiles> static const base::NoDestructor<VideoDecodeAccelerator::SupportedProfiles>
kActualSupportedProfiles(GetSupportedProfiles()); kActualSupportedProfiles(GetSupportedProfiles(workarounds_));
if (std::find_if(kActualSupportedProfiles->begin(), if (std::find_if(kActualSupportedProfiles->begin(),
kActualSupportedProfiles->end(), [config](const auto& p) { kActualSupportedProfiles->end(), [config](const auto& p) {
return p.profile == config.profile; return p.profile == config.profile;
...@@ -1708,7 +1710,8 @@ bool VTVideoDecodeAccelerator::SupportsSharedImagePictureBuffers() const { ...@@ -1708,7 +1710,8 @@ bool VTVideoDecodeAccelerator::SupportsSharedImagePictureBuffers() const {
// static // static
VideoDecodeAccelerator::SupportedProfiles VideoDecodeAccelerator::SupportedProfiles
VTVideoDecodeAccelerator::GetSupportedProfiles() { VTVideoDecodeAccelerator::GetSupportedProfiles(
const gpu::GpuDriverBugWorkarounds& workarounds) {
SupportedProfiles profiles; SupportedProfiles profiles;
if (!InitializeVideoToolbox()) if (!InitializeVideoToolbox())
return profiles; return profiles;
...@@ -1716,6 +1719,8 @@ VTVideoDecodeAccelerator::GetSupportedProfiles() { ...@@ -1716,6 +1719,8 @@ VTVideoDecodeAccelerator::GetSupportedProfiles() {
for (const auto& supported_profile : kSupportedProfiles) { for (const auto& supported_profile : kSupportedProfiles) {
if (supported_profile == VP9PROFILE_PROFILE0 || if (supported_profile == VP9PROFILE_PROFILE0 ||
supported_profile == VP9PROFILE_PROFILE2) { supported_profile == VP9PROFILE_PROFILE2) {
if (workarounds.disable_accelerated_vp9_decode)
continue;
if (!base::mac::IsAtLeastOS11()) if (!base::mac::IsAtLeastOS11())
continue; continue;
if (!base::FeatureList::IsEnabled(kVideoToolboxVp9Decoding)) if (!base::FeatureList::IsEnabled(kVideoToolboxVp9Decoding))
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "base/threading/thread.h" #include "base/threading/thread.h"
#include "base/threading/thread_checker.h" #include "base/threading/thread_checker.h"
#include "base/trace_event/memory_dump_provider.h" #include "base/trace_event/memory_dump_provider.h"
#include "gpu/config/gpu_driver_bug_workarounds.h"
#include "media/base/media_log.h" #include "media/base/media_log.h"
#include "media/gpu/gpu_video_decode_accelerator_helpers.h" #include "media/gpu/gpu_video_decode_accelerator_helpers.h"
#include "media/gpu/media_gpu_export.h" #include "media/gpu/media_gpu_export.h"
...@@ -44,6 +45,7 @@ class VTVideoDecodeAccelerator : public VideoDecodeAccelerator, ...@@ -44,6 +45,7 @@ class VTVideoDecodeAccelerator : public VideoDecodeAccelerator,
public base::trace_event::MemoryDumpProvider { public base::trace_event::MemoryDumpProvider {
public: public:
VTVideoDecodeAccelerator(const GpuVideoDecodeGLClient& gl_client_, VTVideoDecodeAccelerator(const GpuVideoDecodeGLClient& gl_client_,
const gpu::GpuDriverBugWorkarounds& workarounds,
MediaLog* media_log); MediaLog* media_log);
~VTVideoDecodeAccelerator() override; ~VTVideoDecodeAccelerator() override;
...@@ -74,7 +76,8 @@ class VTVideoDecodeAccelerator : public VideoDecodeAccelerator, ...@@ -74,7 +76,8 @@ class VTVideoDecodeAccelerator : public VideoDecodeAccelerator,
OSStatus status, OSStatus status,
CVImageBufferRef image_buffer); CVImageBufferRef image_buffer);
static VideoDecodeAccelerator::SupportedProfiles GetSupportedProfiles(); static VideoDecodeAccelerator::SupportedProfiles GetSupportedProfiles(
const gpu::GpuDriverBugWorkarounds& workarounds);
private: private:
// Logged to UMA, so never reuse values. Make sure to update // Logged to UMA, so never reuse values. Make sure to update
...@@ -214,6 +217,7 @@ class VTVideoDecodeAccelerator : public VideoDecodeAccelerator, ...@@ -214,6 +217,7 @@ class VTVideoDecodeAccelerator : public VideoDecodeAccelerator,
// GPU thread state. // GPU thread state.
// //
const GpuVideoDecodeGLClient gl_client_; const GpuVideoDecodeGLClient gl_client_;
const gpu::GpuDriverBugWorkarounds workarounds_;
MediaLog* media_log_; MediaLog* media_log_;
VideoDecodeAccelerator::Client* client_ = nullptr; VideoDecodeAccelerator::Client* client_ = nullptr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment