Skip to content

Commit

Permalink
Unifies same <dxgi1_6.h> #include for TARGET_WINDOWS_STORE and DESKTOP
Browse files Browse the repository at this point in the history
Improves conditions to recognize HDR10 streams
  • Loading branch information
thexai committed Dec 19, 2019
1 parent 58512fa commit 8182d6d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ bool CProcessorHD::Render(CRect src, CRect dst, ID3D11Resource* target, CRenderB
const DXGI_COLOR_SPACE_TYPE source_color = GetDXGIColorSpace(views[2], m_bSupportHDR10);
DXGI_COLOR_SPACE_TYPE target_color;

if (DX::DeviceResources::Get()->Is10BitSwapchain() && views[2]->primaries == AVCOL_PRI_BT2020)
if (DX::DeviceResources::Get()->Is10BitSwapchain() && CRendererBase::IsStreamHDR10(views[2]))
{
target_color = DX::Windowing()->UseLimitedColor()
? DXGI_COLOR_SPACE_RGB_STUDIO_G2084_NONE_P2020
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ DXGI_HDR_METADATA_HDR10 CRendererBase::GetDXGIHDR10MetaData(CRenderBuffer* rb)
bool CRendererBase::IsStreamHDR10(CRenderBuffer* rb)
{
if ((rb->displayMetadata.has_luminance || rb->hasLightMetadata ||
rb->color_space == AVCOL_SPC_BT2020_NCL) &&
rb->color_transfer == AVCOL_TRC_SMPTE2084) &&
rb->primaries == AVCOL_PRI_BT2020)
return true;

Expand Down
6 changes: 2 additions & 4 deletions xbmc/rendering/dx/DeviceResources.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@
#include <wrl.h>
#include <wrl/client.h>
#include <concrt.h>
#if defined(TARGET_WINDOWS_STORE)
#include <dxgi1_6.h>
#else
#include <dxgi1_6.h>
#if !defined(TARGET_WINDOWS_STORE)
#include <easyhook/easyhook.h>
#endif
#include <dxgi1_6.h>
#include <functional>
#include <memory>

Expand Down

0 comments on commit 8182d6d

Please sign in to comment.