OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/filters/gpu_video_decoder.h" | 5 #include "media/filters/gpu_video_decoder.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 // Only non-Windows, Ivy Bridge+ platforms can support more than 1920x1080. | 110 // Only non-Windows, Ivy Bridge+ platforms can support more than 1920x1080. |
111 // We test against 1088 to account for 16x16 macroblocks. | 111 // We test against 1088 to account for 16x16 macroblocks. |
112 if (coded_size.width() <= 1920 && coded_size.height() <= 1088) | 112 if (coded_size.width() <= 1920 && coded_size.height() <= 1088) |
113 return true; | 113 return true; |
114 | 114 |
115 // NOTE: additional autodetection logic may require updating input buffer size | 115 // NOTE: additional autodetection logic may require updating input buffer size |
116 // selection in platform-specific implementations, such as | 116 // selection in platform-specific implementations, such as |
117 // V4L2VideoDecodeAccelerator. | 117 // V4L2VideoDecodeAccelerator. |
118 base::CPU cpu; | 118 base::CPU cpu; |
119 bool hw_large_video_support = | 119 bool hw_large_video_support = |
120 CommandLine::ForCurrentProcess()->HasSwitch( | 120 base::CommandLine::ForCurrentProcess()->HasSwitch( |
121 switches::kIgnoreResolutionLimitsForAcceleratedVideoDecode) || | 121 switches::kIgnoreResolutionLimitsForAcceleratedVideoDecode) || |
122 ((cpu.vendor_name() == "GenuineIntel") && cpu.model() >= 55); | 122 ((cpu.vendor_name() == "GenuineIntel") && cpu.model() >= 55); |
123 bool os_large_video_support = true; | 123 bool os_large_video_support = true; |
124 #if defined(OS_WIN) | 124 #if defined(OS_WIN) |
125 os_large_video_support = false; | 125 os_large_video_support = false; |
126 #endif | 126 #endif |
127 return os_large_video_support && hw_large_video_support; | 127 return os_large_video_support && hw_large_video_support; |
128 } | 128 } |
129 | 129 |
130 // Report |status| to UMA and run |cb| with it. This is super-specific to the | 130 // Report |status| to UMA and run |cb| with it. This is super-specific to the |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 DLOG(ERROR) << "VDA Error: " << error; | 622 DLOG(ERROR) << "VDA Error: " << error; |
623 DestroyVDA(); | 623 DestroyVDA(); |
624 } | 624 } |
625 | 625 |
626 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() | 626 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() |
627 const { | 627 const { |
628 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); | 628 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); |
629 } | 629 } |
630 | 630 |
631 } // namespace media | 631 } // namespace media |
OLD | NEW |