diff options
author | Martijn Kaijser <martijn@xbmc.org> | 2016-03-05 09:55:35 +0100 |
---|---|---|
committer | Martijn Kaijser <martijn@xbmc.org> | 2016-03-05 09:55:35 +0100 |
commit | 1f43582a9b03ad2b3c5bfe2b46c7ce98ebc209db (patch) | |
tree | 7014c2b55be8932285b134da7c436872a733fc83 | |
parent | b661cc5ad1dbe0d3d55c0ec0c4c5a48346c879c2 (diff) | |
parent | a255516bec15c855c0285a23bff5966f638627a5 (diff) |
Merge pull request #9264 from afedchin/win32_fixes_j
[Backport][Win32] Several small fixes.
-rw-r--r-- | xbmc/cores/VideoRenderers/DXVAHD.cpp | 10 | ||||
-rw-r--r-- | xbmc/rendering/dx/RenderSystemDX.cpp | 29 | ||||
-rw-r--r-- | xbmc/utils/win32/memcpy_sse2.h | 2 |
3 files changed, 21 insertions, 20 deletions
diff --git a/xbmc/cores/VideoRenderers/DXVAHD.cpp b/xbmc/cores/VideoRenderers/DXVAHD.cpp index 247d1a6308..91b470b7fb 100644 --- a/xbmc/cores/VideoRenderers/DXVAHD.cpp +++ b/xbmc/cores/VideoRenderers/DXVAHD.cpp @@ -694,10 +694,12 @@ bool CProcessorHD::Render(CRect src, CRect dst, ID3D11Resource* target, ID3D11Vi m_pVideoContext->VideoProcessorSetOutputColorSpace(m_pVideoProcessor, &colorSpace); - ApplyFilter(D3D11_VIDEO_PROCESSOR_FILTER_BRIGHTNESS, CMediaSettings::GetInstance().GetCurrentVideoSettings().m_Brightness - , 0, 100, 50); - ApplyFilter(D3D11_VIDEO_PROCESSOR_FILTER_CONTRAST, CMediaSettings::GetInstance().GetCurrentVideoSettings().m_Contrast - , 0, 100, 50); + ApplyFilter(D3D11_VIDEO_PROCESSOR_FILTER_BRIGHTNESS, + CMediaSettings::GetInstance().GetCurrentVideoSettings().m_Brightness, 0, 100, 50); + ApplyFilter(D3D11_VIDEO_PROCESSOR_FILTER_CONTRAST, + CMediaSettings::GetInstance().GetCurrentVideoSettings().m_Contrast, 0, 100, 50); + ApplyFilter(D3D11_VIDEO_PROCESSOR_FILTER_HUE, 50, 0, 100, 50); + ApplyFilter(D3D11_VIDEO_PROCESSOR_FILTER_SATURATION, 50, 0, 100, 50); // Rotation m_pVideoContext->VideoProcessorSetStreamRotation(m_pVideoProcessor, DEFAULT_STREAM_INDEX, (rotation != 0), (D3D11_VIDEO_PROCESSOR_ROTATION)(rotation / 90)); diff --git a/xbmc/rendering/dx/RenderSystemDX.cpp b/xbmc/rendering/dx/RenderSystemDX.cpp index fe70da91a6..b1b9d1c387 100644 --- a/xbmc/rendering/dx/RenderSystemDX.cpp +++ b/xbmc/rendering/dx/RenderSystemDX.cpp @@ -812,24 +812,23 @@ bool CRenderSystemDX::CreateWindowSizeDependentResources() if (SUCCEEDED(hr)) { m_pSwapChain1->QueryInterface(__uuidof(IDXGISwapChain), reinterpret_cast<void**>(&m_pSwapChain)); + // this hackish way to disable stereo in windowed mode: + // - restart presenting, 0 in sync interval discards current frame also + // - wait until new frame will be drawn + // sleep value possible depends on hardware m.b. need a setting in as.xml + if (m_useWindowedDX && !bHWStereoEnabled && m_bHWStereoEnabled) + { + DXGI_PRESENT_PARAMETERS presentParams = {}; + presentParams.DirtyRectsCount = 0; + presentParams.pDirtyRects = NULL; + presentParams.pScrollRect = NULL; + m_pSwapChain1->Present1(0, DXGI_PRESENT_RESTART, &presentParams); + + Sleep(100); + } m_bHWStereoEnabled = bHWStereoEnabled; } dxgiFactory2->Release(); - - // this hackish way to disable stereo in windowed mode: - // - restart presenting, 0 in sync interval discards current frame also - // - wait until new frame will be drawn - // sleep value possible depends on hardware m.b. need a setting in as.xml - if (!bHWStereoEnabled && m_useWindowedDX && bNeedRecreate) - { - DXGI_PRESENT_PARAMETERS presentParams = {}; - presentParams.DirtyRectsCount = 0; - presentParams.pDirtyRects = NULL; - presentParams.pScrollRect = NULL; - m_pSwapChain1->Present1(0, DXGI_PRESENT_RESTART, &presentParams); - - Sleep(100); - } } else { diff --git a/xbmc/utils/win32/memcpy_sse2.h b/xbmc/utils/win32/memcpy_sse2.h index e6ea34a940..de9323831a 100644 --- a/xbmc/utils/win32/memcpy_sse2.h +++ b/xbmc/utils/win32/memcpy_sse2.h @@ -118,7 +118,7 @@ inline void convert_yuv420_nv12(uint8_t *const src[], const int srcStride[], int *d++ = *v++; } } - else + else if (i < chromaWidth) { xmm0 = _mm_load_si128((__m128i*)(v + i)); xmm1 = _mm_load_si128((__m128i*)(u + i)); |