Commit 2767cae1 authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Chromium LUCI CQ

components/mirroring: Disable H264 encoder on ChromeOS AMD

Chromecast fails to decode h264 streams encoded by the ChromeOS AMD
HW encoder. This CL disables the hardware encoder for the mirroring
use case as a temporarily workaround.

Bug: b:169533953
Test: chromecast works on kasumi
Change-Id: I6052a06ced2c432653abb46be34fcea61e13379e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2627241
Auto-Submit: Hirokazu Honda <hiroh@chromium.org>
Commit-Queue: mark a. foltz <mfoltz@chromium.org>
Reviewed-by: default avatarmark a. foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844889}
parent 96e19df3
...@@ -39,6 +39,7 @@ component("mirroring_service") { ...@@ -39,6 +39,7 @@ component("mirroring_service") {
public_deps = [ "//base" ] public_deps = [ "//base" ]
deps = [ deps = [
"//build:chromeos_buildflags",
"//components/mirroring/mojom:service", "//components/mirroring/mojom:service",
"//components/openscreen_platform", "//components/openscreen_platform",
"//components/openscreen_platform:openscreen_platform_network_service", "//components/openscreen_platform:openscreen_platform_network_service",
......
...@@ -11,10 +11,12 @@ ...@@ -11,10 +11,12 @@
#include <vector> #include <vector>
#include "base/bind.h" #include "base/bind.h"
#include "base/cpu.h"
#include "base/json/json_writer.h" #include "base/json/json_writer.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/memory/unsafe_shared_memory_region.h" #include "base/memory/unsafe_shared_memory_region.h"
#include "base/metrics/histogram_macros.h" #include "base/metrics/histogram_macros.h"
#include "base/no_destructor.h"
#include "base/rand_util.h" #include "base/rand_util.h"
#include "base/stl_util.h" #include "base/stl_util.h"
#include "base/strings/string_number_conversions.h" #include "base/strings/string_number_conversions.h"
...@@ -27,6 +29,7 @@ ...@@ -27,6 +29,7 @@
#include "base/time/time.h" #include "base/time/time.h"
#include "base/values.h" #include "base/values.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "components/mirroring/service/captured_audio_input.h" #include "components/mirroring/service/captured_audio_input.h"
#include "components/mirroring/service/udp_socket_client.h" #include "components/mirroring/service/udp_socket_client.h"
#include "components/mirroring/service/video_capture_client.h" #include "components/mirroring/service/video_capture_client.h"
...@@ -152,6 +155,15 @@ bool IsHardwareVP8EncodingSupported( ...@@ -152,6 +155,15 @@ bool IsHardwareVP8EncodingSupported(
bool IsHardwareH264EncodingSupported( bool IsHardwareH264EncodingSupported(
const std::vector<media::VideoEncodeAccelerator::SupportedProfile>& const std::vector<media::VideoEncodeAccelerator::SupportedProfile>&
profiles) { profiles) {
// TODO(b/169533953): Look into chromecast fails to decode bitstreams produced
// by the AMD HW encoder.
#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
static const base::NoDestructor<base::CPU> cpuid;
static const bool is_amd = cpuid->vendor_name() == "AuthenticAMD";
if (is_amd)
return false;
#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
// TODO(crbug.com/1015482): Look into why H.264 hardware encoder on MacOS is // TODO(crbug.com/1015482): Look into why H.264 hardware encoder on MacOS is
// broken. // broken.
// TODO(crbug.com/1015482): Look into HW encoder initialization issues on Win. // TODO(crbug.com/1015482): Look into HW encoder initialization issues on Win.
......
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