xbmc: VAAPI: Attempt to fix mysterious non-smoothness issue

This commit is contained in:
Stefan Saraev 2013-12-09 17:19:32 +02:00
parent f4eb9354be
commit 1ae28b47d9

View File

@ -0,0 +1,55 @@
From dd4346a0cfacbb62bc06644bdf471531ea1f5a8a Mon Sep 17 00:00:00 2001
From: BtbN <btbn@btbn.de>
Date: Mon, 9 Dec 2013 14:47:29 +0100
Subject: [PATCH] VAAPI, squash me: Attempt to fix mysterious non-smoothness
issue
---
xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI_VPP.cpp | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI_VPP.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI_VPP.cpp
index 78e786a..c88e402 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI_VPP.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI_VPP.cpp
@@ -406,6 +406,7 @@ CVPPPicture CVPP::DoDeint(const CVPPPicture& input, bool topFieldFirst, bool fir
VAProcPipelineParameterBuffer *pipelineParam;
VARectangle inputRegion;
VARectangle outputRegion;
+ unsigned int deint_flags = 0;
VASurfaceID *forwRefs = 0;
@@ -416,16 +417,16 @@ CVPPPicture CVPP::DoDeint(const CVPPPicture& input, bool topFieldFirst, bool fir
if(firstCall || m_forwardReferences.size() < m_forwardReferencesCount)
{
if(!topFieldFirst)
- deint->flags = VA_DEINTERLACING_BOTTOM_FIELD_FIRST | VA_DEINTERLACING_BOTTOM_FIELD;
+ deint_flags = deint->flags = VA_DEINTERLACING_BOTTOM_FIELD_FIRST | VA_DEINTERLACING_BOTTOM_FIELD;
else
- deint->flags = 0;
+ deint_flags = deint->flags = 0;
}
else
{
if(topFieldFirst)
- deint->flags = VA_DEINTERLACING_BOTTOM_FIELD;
+ deint_flags = deint->flags = VA_DEINTERLACING_BOTTOM_FIELD;
else
- deint->flags = VA_DEINTERLACING_BOTTOM_FIELD_FIRST;
+ deint_flags = deint->flags = VA_DEINTERLACING_BOTTOM_FIELD_FIRST;
}
CHECK_VA(vaUnmapBuffer(m_display->get(), m_deintFilter), 0);
@@ -449,7 +450,7 @@ CVPPPicture CVPP::DoDeint(const CVPPPicture& input, bool topFieldFirst, bool fir
pipelineParam->surface_region = &inputRegion;
pipelineParam->output_background_color = 0xff000000;
- pipelineParam->filter_flags = 0;
+ pipelineParam->filter_flags = (deint_flags & VA_DEINTERLACING_BOTTOM_FIELD) ? VA_BOTTOM_FIELD : VA_TOP_FIELD;
pipelineParam->filters = &m_deintFilter;
pipelineParam->num_filters = 1;
--
1.8.5.1