[go: nahoru, domu]

media: Limit kVp9kSVCHWDecoding feature option to ChromeOS x86 devices

This CL limits kVp9kSVCHWDecoding feature option to ChromeOS x86 devices.
ChromeOS ARM devices are not ready for the feature. If I enable the feature on
ARM device by finch experiment, then something wrong happens.

Bug: chromium:935411
Test: Hangout Meet with VP9 SVC stream
Change-Id: I4114d5ab400d4f43bc2d329675c781365e698856
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1768217
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#690576}
diff --git a/media/gpu/vp9_decoder.cc b/media/gpu/vp9_decoder.cc
index 68188ea4..59668bd 100644
--- a/media/gpu/vp9_decoder.cc
+++ b/media/gpu/vp9_decoder.cc
@@ -9,6 +9,7 @@
 #include "base/bind.h"
 #include "base/feature_list.h"
 #include "base/logging.h"
+#include "build/build_config.h"
 #include "media/base/limits.h"
 #include "media/base/media_switches.h"
 #include "media/gpu/vp9_decoder.h"
@@ -18,6 +19,7 @@
 namespace {
 std::vector<uint32_t> GetSpatialLayerFrameSize(
     const DecoderBuffer& decoder_buffer) {
+#if defined(ARCH_CPU_X86_FAMILY) && defined(OS_CHROMEOS)
   const uint32_t* cue_data =
       reinterpret_cast<const uint32_t*>(decoder_buffer.side_data());
   if (!cue_data)
@@ -33,6 +35,8 @@
     return {};
   }
   return std::vector<uint32_t>(cue_data, cue_data + num_of_layers);
+#endif  // defined(ARCH_CPU_X86_FAMILY) && defined(OS_CHROMEOS)
+  return {};
 }
 }  // namespace