diff options
author | posciak@chromium.org <posciak@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-28 23:12:21 +0000 |
---|---|---|
committer | posciak@chromium.org <posciak@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-28 23:12:21 +0000 |
commit | 59283ff06cb8c64e8fda469fe943752767cccc15 (patch) | |
tree | c63ec31c36c2952414065dc65bf01163444ff4a7 /media | |
parent | 4611d8f3197d14ad1e74992d28fec74142a701f6 (diff) | |
download | chromium_src-59283ff06cb8c64e8fda469fe943752767cccc15.zip chromium_src-59283ff06cb8c64e8fda469fe943752767cccc15.tar.gz chromium_src-59283ff06cb8c64e8fda469fe943752767cccc15.tar.bz2 |
Don't attempt HW decode for videos over 1920x1080 when not supported.
BUG=152765
Review URL: https://chromiumcodereview.appspot.com/10986097
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159361 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/filters/gpu_video_decoder.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/media/filters/gpu_video_decoder.cc b/media/filters/gpu_video_decoder.cc index 00f5f36..91b16e0 100644 --- a/media/filters/gpu_video_decoder.cc +++ b/media/filters/gpu_video_decoder.cc @@ -6,6 +6,7 @@ #include "base/bind.h" #include "base/callback_helpers.h" +#include "base/cpu.h" #include "base/message_loop.h" #include "base/stl_util.h" #include "media/base/decoder_buffer.h" @@ -140,6 +141,22 @@ void GpuVideoDecoder::Initialize(const scoped_refptr<DemuxerStream>& stream, return; } + // Only non-Windows, Ivy Bridge+ platforms can support more than 1920x1080. + if (config.coded_size().width() > 1920 || + config.coded_size().height() > 1080) { + base::CPU cpu; + bool hw_large_video_support = + cpu.vendor_name() == "GenuineIntel" && cpu.model() >= 58; + bool os_large_video_support = true; +#if defined(OS_WINDOWS) + os_large_video_support = false; +#endif + if (!(os_large_video_support && hw_large_video_support)) { + status_cb.Run(DECODER_ERROR_NOT_SUPPORTED); + return; + } + } + VideoDecodeAccelerator* vda = factories_->CreateVideoDecodeAccelerator(config.profile(), this); if (!vda) { |