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

Side by Side Diff: media/gpu/dxva_video_decode_accelerator_win.cc

Issue 2712683004: Make sure that we update the color space when re-creating the video processor. (Closed)
Patch Set: Created 3 years, 9 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 | no next file » | 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 #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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698