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

Side by Side Diff: content/common/gpu/media/dxva_video_decode_accelerator_win.h

Issue 1859043005: Attempt to fix a crash in the GPU process while determining the max H.264 resolution which can be s… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/common/gpu/media/dxva_video_decode_accelerator_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/media/dxva_video_decode_accelerator_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698