diff options
author | xbmc <fernetmenta@online.de> | 2017-01-05 06:58:36 +0100 |
---|---|---|
committer | Martijn Kaijser <mcm.kaijser@gmail.com> | 2017-01-09 07:43:32 +0100 |
commit | a67788b4f2bab9bd28e64fa21c053325c6240c30 (patch) | |
tree | 0271c99dc41c826d9afb860adf48ef8cc006956e | |
parent | 60bcae225f2adbecf85857b34d486d639da275b9 (diff) |
VideoPlayer: dxva - only retain buffers for deinterlacing
-rw-r--r-- | xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.cpp | 4 | ||||
-rw-r--r-- | xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.cpp index 2c6b838b88..5e2fa81e40 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.cpp +++ b/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.cpp @@ -261,6 +261,7 @@ void CWinRenderer::AddVideoPictureHW(DVDVideoPicture &picture, int index) SAFE_RELEASE(buf->pic); buf->pic = m_processor->Convert(picture); buf->frameIdx = m_frameIdx; + buf->pictureFlags = picture.iFlags; m_frameIdx += 2; } else if (picture.format == RENDER_FMT_DXVA) @@ -1117,7 +1118,8 @@ bool CWinRenderer::NeedBuffer(int idx) DXVABuffer** buffers = reinterpret_cast<DXVABuffer**>(m_VideoBuffers); int numPast = m_processor->PastRefs(); - if (buffers[idx] && buffers[idx]->pic) + if (buffers[idx] && buffers[idx]->pic && + (buffers[idx]->pictureFlags & DVP_FLAG_INTERLACED)) { if (buffers[idx]->frameIdx + numPast*2 >= buffers[m_iYV12RenderBuffer]->frameIdx) return true; diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.h b/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.h index dfd7cd86a8..1474493008 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.h +++ b/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.h @@ -147,6 +147,7 @@ struct DXVABuffer : SVideoBuffer ~DXVABuffer() { SAFE_RELEASE(pic); } DXVA::CRenderPicture *pic; unsigned int frameIdx; + unsigned int pictureFlags; }; class CWinRenderer : public CBaseRenderer |