mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
xbmc: add PR4647
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
5d7777390a
commit
c3c2ee3c54
@ -0,0 +1,65 @@
|
|||||||
|
From fb82cedf2ea631c0e47296f461fe8d48dfc6d7b3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Rainer Hochecker <fernetmenta@online.de>
|
||||||
|
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
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user