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 #ifndef CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ |
6 #define CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ |
7 | 7 |
8 #include <d3d11.h> | 8 #include <d3d11.h> |
9 #include <d3d9.h> | 9 #include <d3d9.h> |
10 #include <initguid.h> | 10 #include <initguid.h> |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 static std::pair<int, int> GetMinResolution( | 132 static std::pair<int, int> GetMinResolution( |
133 const media::VideoCodecProfile profile); | 133 const media::VideoCodecProfile profile); |
134 | 134 |
135 // Returns the maximum resolution for the |profile| passed in. | 135 // Returns the maximum resolution for the |profile| passed in. |
136 static std::pair<int, int> GetMaxResolution( | 136 static std::pair<int, int> GetMaxResolution( |
137 const media::VideoCodecProfile profile); | 137 const media::VideoCodecProfile profile); |
138 | 138 |
139 // Returns the maximum resolution for H264 video. | 139 // Returns the maximum resolution for H264 video. |
140 static std::pair<int, int> GetMaxH264Resolution(); | 140 static std::pair<int, int> GetMaxH264Resolution(); |
141 | 141 |
| 142 // Certain AMD GPU drivers like R600, R700, Evergreen and Cayman and |
| 143 // some second generation Intel GPU drivers crash if we create a video |
| 144 // device with a resolution higher then 1920 x 1088. This function |
| 145 // checks if the GPU is in this list and if yes returns true. |
| 146 static bool IsLegacyGPU(ID3D11Device* device); |
| 147 |
142 // Creates and initializes an instance of the D3D device and the | 148 // Creates and initializes an instance of the D3D device and the |
143 // corresponding device manager. The device manager instance is eventually | 149 // corresponding device manager. The device manager instance is eventually |
144 // passed to the IMFTransform interface implemented by the decoder. | 150 // passed to the IMFTransform interface implemented by the decoder. |
145 bool CreateD3DDevManager(); | 151 bool CreateD3DDevManager(); |
146 | 152 |
147 // Creates and initializes an instance of the DX11 device and the | 153 // Creates and initializes an instance of the DX11 device and the |
148 // corresponding device manager. The device manager instance is eventually | 154 // corresponding device manager. The device manager instance is eventually |
149 // passed to the IMFTransform interface implemented by the decoder. | 155 // passed to the IMFTransform interface implemented by the decoder. |
150 bool CreateDX11DevManager(); | 156 bool CreateDX11DevManager(); |
151 | 157 |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 | 477 |
472 // Function pointer for the MFCreateDXGIDeviceManager API. | 478 // Function pointer for the MFCreateDXGIDeviceManager API. |
473 static CreateDXGIDeviceManager create_dxgi_device_manager_; | 479 static CreateDXGIDeviceManager create_dxgi_device_manager_; |
474 | 480 |
475 DISALLOW_COPY_AND_ASSIGN(DXVAVideoDecodeAccelerator); | 481 DISALLOW_COPY_AND_ASSIGN(DXVAVideoDecodeAccelerator); |
476 }; | 482 }; |
477 | 483 |
478 } // namespace content | 484 } // namespace content |
479 | 485 |
480 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ | 486 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |