Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1290)

Unified Diff: media/filters/gpu_video_decoder.cc

Issue 1016283003: GVD: Disable 4k HW decode for VPX formats for Intel platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/gpu_video_decoder.cc
diff --git a/media/filters/gpu_video_decoder.cc b/media/filters/gpu_video_decoder.cc
index 703cb20dbb1284bc1650d5cde120c850ceeb356f..d059c0be894fc9594c161bc94d5f3ff1cf8531e7 100644
--- a/media/filters/gpu_video_decoder.cc
+++ b/media/filters/gpu_video_decoder.cc
@@ -97,7 +97,8 @@ void GpuVideoDecoder::Reset(const base::Closure& closure) {
vda_->Reset();
}
-static bool IsCodedSizeSupported(const gfx::Size& coded_size) {
+static bool IsCodedSizeSupported(const gfx::Size& coded_size,
+ VideoCodecProfile profile) {
#if defined(OS_WIN)
// Windows Media Foundation H.264 decoding does not support decoding videos
// with any dimension smaller than 48 pixels:
@@ -118,7 +119,9 @@ static bool IsCodedSizeSupported(const gfx::Size& coded_size) {
bool hw_large_video_support =
base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kIgnoreResolutionLimitsForAcceleratedVideoDecode) ||
- ((cpu.vendor_name() == "GenuineIntel") && cpu.model() >= 55);
+ ((cpu.vendor_name() == "GenuineIntel") && cpu.model() >= 55 &&
+ // TODO(posciak, henryhsu): Remove this once we can query in runtime.
+ profile >= H264PROFILE_MIN && profile <= H264PROFILE_MAX);
bool os_large_video_support = true;
#if defined(OS_WIN)
os_large_video_support = false;
@@ -166,7 +169,7 @@ void GpuVideoDecoder::Initialize(const VideoDecoderConfig& config,
return;
}
- if (!IsCodedSizeSupported(config.coded_size())) {
+ if (!IsCodedSizeSupported(config.coded_size(), config.profile())) {
status_cb.Run(DECODER_ERROR_NOT_SUPPORTED);
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698