aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Op den Kamp <lars@opdenkamp.eu>2011-01-04 04:06:32 +0100
committerLars Op den Kamp <lars@opdenkamp.eu>2011-01-04 12:37:46 +0100
commit3c6a7ae7eb70eaf7188b6c4310d0a179bc864171 (patch)
tree22da9142c9402c6a171074b722dedb89af2f6e1a
parentb88c5ad29622640ee18b6514a3f5525f88283116 (diff)
video: implement optimized auto select deinterlace for ION chipset from: Gujs <gujs.lists@gmail.com>
-rw-r--r--language/English/strings.xml1
-rw-r--r--xbmc/GUIDialogVideoSettings.cpp1
-rw-r--r--xbmc/Settings.cpp2
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp18
-rw-r--r--xbmc/settings/VideoSettings.h1
5 files changed, 20 insertions, 3 deletions
diff --git a/language/English/strings.xml b/language/English/strings.xml
index 96a77709e3..6455e2ac0e 100644
--- a/language/English/strings.xml
+++ b/language/English/strings.xml
@@ -1513,6 +1513,7 @@
<string id="16317">Temporal (Half)</string>
<string id="16318">Temporal/Spatial (Half)</string>
<string id="16319">DXVA</string>
+ <string id="16320">Auto - ION Optimized</string>
<string id="16400">Post-processing</string>
diff --git a/xbmc/GUIDialogVideoSettings.cpp b/xbmc/GUIDialogVideoSettings.cpp
index 84b7ca85af..f762fcb1a2 100644
--- a/xbmc/GUIDialogVideoSettings.cpp
+++ b/xbmc/GUIDialogVideoSettings.cpp
@@ -89,6 +89,7 @@ void CGUIDialogVideoSettings::CreateSettings()
entries.push_back(make_pair(VS_INTERLACEMETHOD_VDPAU_TEMPORAL_SPATIAL_HALF, 16318));
entries.push_back(make_pair(VS_INTERLACEMETHOD_VDPAU_TEMPORAL_HALF , 16317));
entries.push_back(make_pair(VS_INTERLACEMETHOD_VDPAU_INVERSE_TELECINE , 16314));
+ entries.push_back(make_pair(VS_INTERLACEMETHOD_AUTO_ION , 16320));
/* remove unsupported methods */
for(vector<pair<int, int> >::iterator it = entries.begin(); it != entries.end();)
diff --git a/xbmc/Settings.cpp b/xbmc/Settings.cpp
index e96563aa53..09a9c11ed7 100644
--- a/xbmc/Settings.cpp
+++ b/xbmc/Settings.cpp
@@ -691,7 +691,7 @@ bool CSettings::LoadSettings(const CStdString& strSettingsFile)
if (pElement)
{
int interlaceMethod;
- GetInteger(pElement, "interlacemethod", interlaceMethod, VS_INTERLACEMETHOD_NONE, VS_INTERLACEMETHOD_NONE, VS_INTERLACEMETHOD_INVERSE_TELECINE);
+ GetInteger(pElement, "interlacemethod", interlaceMethod, VS_INTERLACEMETHOD_NONE, VS_INTERLACEMETHOD_NONE, VS_INTERLACEMETHOD_AUTO_ION);
m_defaultVideoSettings.m_InterlaceMethod = (EINTERLACEMETHOD)interlaceMethod;
int scalingMethod;
GetInteger(pElement, "scalingmethod", scalingMethod, VS_SCALINGMETHOD_LINEAR, VS_SCALINGMETHOD_NEAREST, VS_SCALINGMETHOD_AUTO);
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
index 207613324f..fc3eca1d99 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
@@ -495,7 +495,8 @@ bool CVDPAU::Supports(VdpVideoMixerFeature feature)
bool CVDPAU::Supports(EINTERLACEMETHOD method)
{
if(method == VS_INTERLACEMETHOD_VDPAU_BOB
- || method == VS_INTERLACEMETHOD_AUTO)
+ || method == VS_INTERLACEMETHOD_AUTO
+ || method == VS_INTERLACEMETHOD_AUTO_ION)
return true;
for(SInterlaceMapping* p = g_interlace_mapping; p->method != VS_INTERLACEMETHOD_NONE; p++)
@@ -612,7 +613,17 @@ void CVDPAU::SetDeinterlacing()
VdpBool enabled[]={1,1,1};
vdp_st = vdp_video_mixer_set_feature_enables(videoMixer, ARSIZE(feature), feature, enabled);
}
- else if (method == VS_INTERLACEMETHOD_VDPAU_TEMPORAL
+ else if (method == VS_INTERLACEMETHOD_AUTO_ION)
+ {
+ if (vid_height <= 576){
+ VdpBool enabled[]={1,1,0};
+ vdp_st = vdp_video_mixer_set_feature_enables(videoMixer, ARSIZE(feature), feature, enabled);
+ }
+ else if (vid_height > 576){
+ VdpBool enabled[]={1,0,0};
+ vdp_st = vdp_video_mixer_set_feature_enables(videoMixer, ARSIZE(feature), feature, enabled);
+ }
+ } else if (method == VS_INTERLACEMETHOD_VDPAU_TEMPORAL
|| method == VS_INTERLACEMETHOD_VDPAU_TEMPORAL_HALF)
{
VdpBool enabled[]={1,0,0};
@@ -1167,6 +1178,8 @@ int CVDPAU::Decode(AVCodecContext *avctx, AVFrame *pFrame)
if((method == VS_INTERLACEMETHOD_AUTO &&
m_DVDVideoPics.front().iFlags & DVP_FLAG_INTERLACED)
+ || (method == VS_INTERLACEMETHOD_AUTO_ION &&
+ m_DVDVideoPics.front().iFlags & DVP_FLAG_INTERLACED)
|| method == VS_INTERLACEMETHOD_VDPAU_BOB
|| method == VS_INTERLACEMETHOD_VDPAU_TEMPORAL
|| method == VS_INTERLACEMETHOD_VDPAU_TEMPORAL_HALF
@@ -1176,6 +1189,7 @@ int CVDPAU::Decode(AVCodecContext *avctx, AVFrame *pFrame)
{
if(method == VS_INTERLACEMETHOD_VDPAU_TEMPORAL_HALF
|| method == VS_INTERLACEMETHOD_VDPAU_TEMPORAL_SPATIAL_HALF
+ || (method == VS_INTERLACEMETHOD_AUTO_ION && vid_height > 576)
|| avctx->hurry_up)
m_mixerstep = 0;
else
diff --git a/xbmc/settings/VideoSettings.h b/xbmc/settings/VideoSettings.h
index 0787da3e19..32cafc5efe 100644
--- a/xbmc/settings/VideoSettings.h
+++ b/xbmc/settings/VideoSettings.h
@@ -51,6 +51,7 @@ enum EINTERLACEMETHOD
VS_INTERLACEMETHOD_VDPAU_TEMPORAL_HALF=13,
VS_INTERLACEMETHOD_VDPAU_TEMPORAL_SPATIAL=14,
VS_INTERLACEMETHOD_VDPAU_TEMPORAL_SPATIAL_HALF=15,
+ VS_INTERLACEMETHOD_AUTO_ION=16,
};
enum ESCALINGMETHOD