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

Side by Side Diff: ui/gfx/color_space_win.cc

Issue 2791023002: FP16 mode gamma fix (Closed)
Patch Set: bugfix Created 3 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 | « media/gpu/dxva_video_decode_accelerator_win.cc ('k') | 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 "ui/gfx/color_space_win.h" 5 #include "ui/gfx/color_space_win.h"
6 6
7 namespace gfx { 7 namespace gfx {
8 8
9 DXVA2_ExtendedFormat ColorSpaceWin::GetExtendedFormat( 9 DXVA2_ExtendedFormat ColorSpaceWin::GetExtendedFormat(
10 const ColorSpace& color_space) { 10 const ColorSpace& color_space) {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 return DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P709; 144 return DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P709;
145 } 145 }
146 } else { 146 } else {
147 if (color_space.primaries_ == gfx::ColorSpace::PrimaryID::BT2020) { 147 if (color_space.primaries_ == gfx::ColorSpace::PrimaryID::BT2020) {
148 if (color_space.transfer_ == gfx::ColorSpace::TransferID::SMPTEST2084) { 148 if (color_space.transfer_ == gfx::ColorSpace::TransferID::SMPTEST2084) {
149 return DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020; 149 return DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020;
150 } else { 150 } else {
151 return DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P2020; 151 return DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P2020;
152 } 152 }
153 } else { 153 } else {
154 if (color_space.transfer_ == gfx::ColorSpace::TransferID::LINEAR) { 154 if (color_space.transfer_ == gfx::ColorSpace::TransferID::LINEAR ||
155 color_space.transfer_ == gfx::ColorSpace::TransferID::LINEAR_HDR) {
155 return DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709; 156 return DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709;
156 } else { 157 } else {
157 return DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709; 158 return DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709;
158 } 159 }
159 } 160 }
160 } 161 }
161 } else { 162 } else {
162 if (color_space.primaries_ == gfx::ColorSpace::PrimaryID::BT2020) { 163 if (color_space.primaries_ == gfx::ColorSpace::PrimaryID::BT2020) {
163 if (color_space.transfer_ == gfx::ColorSpace::TransferID::SMPTEST2084) { 164 if (color_space.transfer_ == gfx::ColorSpace::TransferID::SMPTEST2084) {
164 return DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_LEFT_P2020; 165 return DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_LEFT_P2020;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 case gfx::ColorSpace::TransferID::SMPTE170M: 215 case gfx::ColorSpace::TransferID::SMPTE170M:
215 ret.YCbCr_Matrix = 1; 216 ret.YCbCr_Matrix = 1;
216 217
217 default: 218 default:
218 break; 219 break;
219 } 220 }
220 return ret; 221 return ret;
221 } 222 }
222 223
223 } // namespace gfx 224 } // namespace gfx
OLDNEW
« no previous file with comments | « media/gpu/dxva_video_decode_accelerator_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698