From c3c2ee3c544ecf0a64eb019b0a5f56c858755bed Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sun, 4 May 2014 14:42:46 +0200 Subject: [PATCH] xbmc: add PR4647 Signed-off-by: Stephan Raue --- .../xbmc/patches/xbmc-999.80.04-PR4647.patch | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 packages/mediacenter/xbmc/patches/xbmc-999.80.04-PR4647.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-999.80.04-PR4647.patch b/packages/mediacenter/xbmc/patches/xbmc-999.80.04-PR4647.patch new file mode 100644 index 0000000000..39b543815c --- /dev/null +++ b/packages/mediacenter/xbmc/patches/xbmc-999.80.04-PR4647.patch @@ -0,0 +1,65 @@ +From fb82cedf2ea631c0e47296f461fe8d48dfc6d7b3 Mon Sep 17 00:00:00 2001 +From: Rainer Hochecker +Date: Sun, 4 May 2014 09:45:52 +0200 +Subject: [PATCH] VDPAU: fix cropping for interlaced frames + +--- + xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 8 +++++--- + xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h | 1 + + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +index 2468db3..575b2e3 100644 +--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp ++++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +@@ -39,6 +39,7 @@ + + using namespace VDPAU; + #define NUM_RENDER_PICS 7 ++#define NUM_CROP_PIX 3 + + #define ARSIZE(x) (sizeof(x) / sizeof((x)[0])) + +@@ -2382,6 +2383,7 @@ void CMixer::InitCycle() + } + m_mixerstep = 0; + ++ m_processPicture.crop = false; + if (m_mixerInput[1].DVDPic.format == RENDER_FMT_VDPAU) + { + m_processPicture.outputSurface = m_outputSurfaces.front(); +@@ -2390,8 +2392,8 @@ void CMixer::InitCycle() + if (m_SeenInterlaceFlag) + { + double ratio = (double)m_mixerInput[1].DVDPic.iDisplayHeight / m_mixerInput[1].DVDPic.iHeight; +- m_mixerInput[1].DVDPic.iHeight -= 6; +- m_mixerInput[1].DVDPic.iDisplayHeight = lrint(ratio*m_mixerInput[1].DVDPic.iHeight); ++ m_mixerInput[1].DVDPic.iDisplayHeight = lrint(ratio*(m_mixerInput[1].DVDPic.iHeight-NUM_CROP_PIX*2)); ++ m_processPicture.crop = true; + } + } + else +@@ -3065,7 +3067,7 @@ CVdpauRenderPicture* COutput::ProcessMixerPicture() + retPic->texWidth = m_config.outWidth; + retPic->texHeight = m_config.outHeight; + retPic->crop.x1 = 0; +- retPic->crop.y1 = (m_config.outHeight - retPic->DVDPic.iHeight) / 2; ++ retPic->crop.y1 = procPic.crop ? NUM_CROP_PIX : 0; + retPic->crop.x2 = m_config.outWidth; + retPic->crop.y2 = m_config.outHeight - retPic->crop.y1; + } +diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h +index 4d046c1..8efadc1 100644 +--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h ++++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h +@@ -202,6 +202,7 @@ struct CVdpauProcessedPicture + DVDVideoPicture DVDPic; + VdpVideoSurface videoSurface; + VdpOutputSurface outputSurface; ++ bool crop; + }; + + /** +-- +1.9.1 +