X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=xbmc%2Fcores%2Fdvdplayer%2FDVDCodecs%2FVideo%2FVDPAU.cpp;h=73c4fa4a83a43f86450b00107f772803f4ee461d;hb=7ee2013ebe5ab3ca46bd7eacf1b21d384c0390e3;hp=8c9437cae53cc19ee39a7dab48c3064dd0b4f5c8;hpb=55030587d56f54a56655fd9ad7e419e4077b7e57;p=vuplus_xbmc diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp index 8c9437c..73c4fa4 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])) @@ -134,6 +135,7 @@ bool CVDPAUContext::EnsureContext(CVDPAUContext **ctx) { delete m_context; m_context = 0; + *ctx = NULL; return false; } } @@ -587,7 +589,6 @@ bool CDecoder::Open(AVCodecContext* avctx, const enum PixelFormat fmt, unsigned avctx->draw_horiz_band = CDecoder::FFDrawSlice; avctx->slice_flags=SLICE_FLAG_CODED_ORDER|SLICE_FLAG_ALLOW_FIELD; avctx->hwaccel_context = &m_hwContext; - avctx->thread_count = 1; g_Windowing.Register(this); return true; @@ -2412,6 +2413,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(); @@ -2420,8 +2422,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 @@ -3095,7 +3097,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; }