| Index: ui/gfx/color_space_win.cc
|
| diff --git a/ui/gfx/color_space_win.cc b/ui/gfx/color_space_win.cc
|
| index 60729038e0a0a16692926837e28929a293796622..d3ab700939a53301a461f7a1d54a891b20fab156 100644
|
| --- a/ui/gfx/color_space_win.cc
|
| +++ b/ui/gfx/color_space_win.cc
|
| @@ -134,95 +134,4 @@
|
| return format;
|
| }
|
|
|
| -DXGI_COLOR_SPACE_TYPE ColorSpaceWin::GetDXGIColorSpace(
|
| - const ColorSpace& color_space) {
|
| - if (color_space.matrix_ == gfx::ColorSpace::MatrixID::RGB) {
|
| - // For RGB, we default to FULL
|
| - if (color_space.range_ == gfx::ColorSpace::RangeID::LIMITED) {
|
| - if (color_space.primaries_ == gfx::ColorSpace::PrimaryID::BT2020) {
|
| - if (color_space.transfer_ == gfx::ColorSpace::TransferID::SMPTEST2084) {
|
| - return DXGI_COLOR_SPACE_RGB_STUDIO_G2084_NONE_P2020;
|
| - } else {
|
| - return DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P2020;
|
| - }
|
| - } else {
|
| - return DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P709;
|
| - }
|
| - } else {
|
| - if (color_space.primaries_ == gfx::ColorSpace::PrimaryID::BT2020) {
|
| - if (color_space.transfer_ == gfx::ColorSpace::TransferID::SMPTEST2084) {
|
| - return DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020;
|
| - } else {
|
| - return DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P2020;
|
| - }
|
| - } else {
|
| - if (color_space.transfer_ == gfx::ColorSpace::TransferID::LINEAR) {
|
| - return DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709;
|
| - } else {
|
| - return DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709;
|
| - }
|
| - }
|
| - }
|
| - } else {
|
| - if (color_space.primaries_ == gfx::ColorSpace::PrimaryID::BT2020) {
|
| - if (color_space.transfer_ == gfx::ColorSpace::TransferID::SMPTEST2084) {
|
| - return DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_LEFT_P2020;
|
| - // Could also be:
|
| - // DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_TOPLEFT_P2020
|
| - } else {
|
| - // For YUV, we default to LIMITED
|
| - if (color_space.range_ == gfx::ColorSpace::RangeID::FULL) {
|
| - return DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020;
|
| -
|
| - } else {
|
| - return DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020;
|
| - // Could also be:
|
| - // DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_TOPLEFT_P2020
|
| - }
|
| - }
|
| - } else if (color_space.primaries_ == gfx::ColorSpace::PrimaryID::BT470BG ||
|
| - color_space.primaries_ ==
|
| - gfx::ColorSpace::PrimaryID::SMPTE170M) {
|
| - // For YUV, we default to LIMITED
|
| - if (color_space.range_ == gfx::ColorSpace::RangeID::FULL) {
|
| - return DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P601;
|
| - } else {
|
| - return DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601;
|
| - }
|
| - } else {
|
| - // For YUV, we default to LIMITED
|
| - if (color_space.range_ == gfx::ColorSpace::RangeID::FULL) {
|
| - // TODO(hubbe): Check if this is correct.
|
| - if (color_space.transfer_ == gfx::ColorSpace::TransferID::SMPTE170M) {
|
| - return DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601;
|
| - } else {
|
| - return DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P709;
|
| - }
|
| - } else {
|
| - return DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709;
|
| - }
|
| - }
|
| - }
|
| -}
|
| -
|
| -D3D11_VIDEO_PROCESSOR_COLOR_SPACE ColorSpaceWin::GetD3D11ColorSpace(
|
| - const ColorSpace& color_space) {
|
| - D3D11_VIDEO_PROCESSOR_COLOR_SPACE ret = {0};
|
| - if (color_space.range_ != gfx::ColorSpace::RangeID::FULL) {
|
| - ret.RGB_Range = 1;
|
| - ret.Nominal_Range = D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_0_255;
|
| - } else {
|
| - ret.Nominal_Range = D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_16_235;
|
| - }
|
| - switch (color_space.transfer_) {
|
| - case gfx::ColorSpace::TransferID::BT709:
|
| - case gfx::ColorSpace::TransferID::SMPTE170M:
|
| - ret.YCbCr_Matrix = 1;
|
| -
|
| - default:
|
| - break;
|
| - }
|
| - return ret;
|
| -}
|
| -
|
| } // namespace gfx
|
|
|