| 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/gpu/dxva_video_decode_accelerator_win.h" | 5 #include "media/gpu/dxva_video_decode_accelerator_win.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #if !defined(OS_WIN) | 9 #if !defined(OS_WIN) |
| 10 #error This file should only be built on Windows. | 10 #error This file should only be built on Windows. |
| (...skipping 2750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2761 | 2761 |
| 2762 bool DXVAVideoDecodeAccelerator::InitializeID3D11VideoProcessor( | 2762 bool DXVAVideoDecodeAccelerator::InitializeID3D11VideoProcessor( |
| 2763 int width, | 2763 int width, |
| 2764 int height, | 2764 int height, |
| 2765 const gfx::ColorSpace& color_space) { | 2765 const gfx::ColorSpace& color_space) { |
| 2766 if (width < processor_width_ || height != processor_height_) { | 2766 if (width < processor_width_ || height != processor_height_) { |
| 2767 d3d11_processor_.Release(); | 2767 d3d11_processor_.Release(); |
| 2768 enumerator_.Release(); | 2768 enumerator_.Release(); |
| 2769 processor_width_ = 0; | 2769 processor_width_ = 0; |
| 2770 processor_height_ = 0; | 2770 processor_height_ = 0; |
| 2771 dx11_converter_color_space_ = gfx::ColorSpace(); |
| 2771 | 2772 |
| 2772 D3D11_VIDEO_PROCESSOR_CONTENT_DESC desc; | 2773 D3D11_VIDEO_PROCESSOR_CONTENT_DESC desc; |
| 2773 desc.InputFrameFormat = D3D11_VIDEO_FRAME_FORMAT_PROGRESSIVE; | 2774 desc.InputFrameFormat = D3D11_VIDEO_FRAME_FORMAT_PROGRESSIVE; |
| 2774 desc.InputFrameRate.Numerator = 60; | 2775 desc.InputFrameRate.Numerator = 60; |
| 2775 desc.InputFrameRate.Denominator = 1; | 2776 desc.InputFrameRate.Denominator = 1; |
| 2776 desc.InputWidth = width; | 2777 desc.InputWidth = width; |
| 2777 desc.InputHeight = height; | 2778 desc.InputHeight = height; |
| 2778 desc.OutputFrameRate.Numerator = 60; | 2779 desc.OutputFrameRate.Numerator = 60; |
| 2779 desc.OutputFrameRate.Denominator = 1; | 2780 desc.OutputFrameRate.Denominator = 1; |
| 2780 desc.OutputWidth = width; | 2781 desc.OutputWidth = width; |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2936 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers, | 2937 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers, |
| 2937 base::Unretained(this))); | 2938 base::Unretained(this))); |
| 2938 } | 2939 } |
| 2939 | 2940 |
| 2940 uint32_t DXVAVideoDecodeAccelerator::GetTextureTarget() const { | 2941 uint32_t DXVAVideoDecodeAccelerator::GetTextureTarget() const { |
| 2941 bool provide_nv12_textures = share_nv12_textures_ || copy_nv12_textures_; | 2942 bool provide_nv12_textures = share_nv12_textures_ || copy_nv12_textures_; |
| 2942 return provide_nv12_textures ? GL_TEXTURE_EXTERNAL_OES : GL_TEXTURE_2D; | 2943 return provide_nv12_textures ? GL_TEXTURE_EXTERNAL_OES : GL_TEXTURE_2D; |
| 2943 } | 2944 } |
| 2944 | 2945 |
| 2945 } // namespace media | 2946 } // namespace media |
| OLD | NEW |