Commit aad98611 authored by Tom Tan's avatar Tom Tan Committed by Commit Bot

Don't load AMD VP9 decoder on Windows ARM64

This change makes the code compile for Widnows ARM64. Also AMD GPU could not be available on every device, so assume that it could be ignored to load.

Bug: 893460
Change-Id: Idae2a64fa9ad8f9e3ad9843abc128e48b85a82c5
Reviewed-on: https://chromium-review.googlesource.com/c/1335281Reviewed-by: default avatarKuang-che Wu <kcwu@chromium.org>
Commit-Queue: Tom Tan <Tom.Tan@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#608630}
parent a2b45f47
......@@ -66,6 +66,7 @@
namespace {
#if defined(ARCH_CPU_X86_FAMILY)
// AMD
// Path is appended on to the PROGRAM_FILES base path.
const wchar_t kAMDVPXDecoderDLLPath[] =
......@@ -85,6 +86,7 @@ const CLSID CLSID_AMDWebmMfVp9Dec = {
0x67d6,
0x48ab,
{0x89, 0xfb, 0xa6, 0xec, 0x65, 0x55, 0x49, 0x70}};
#endif
const wchar_t kMSVP9DecoderDLLName[] = L"MSVP9DEC.dll";
......@@ -1586,6 +1588,8 @@ bool DXVAVideoDecodeAccelerator::InitDecoder(VideoCodecProfile profile) {
program_files_key = base::DIR_PROGRAM_FILES6432;
}
// Avoid loading AMD VP9 decoder on Windows ARM64.
#if defined(ARCH_CPU_X86_FAMILY)
// AMD
if (!decoder_dll &&
enable_accelerated_vpx_decode_ & gpu::GpuPreferences::VPX_VENDOR_AMD &&
......@@ -1600,6 +1604,7 @@ bool DXVAVideoDecodeAccelerator::InitDecoder(VideoCodecProfile profile) {
LOAD_WITH_ALTERED_SEARCH_PATH);
}
}
#endif
}
if (!decoder_dll) {
......
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