video playback enhancements for Linux part1: vdpau #870

Closed
wants to merge 11 commits into
from
@@ -5775,7 +5775,12 @@ msgctxt "#13436"
msgid "Allow hardware acceleration (libstagefright)"
msgstr ""
-#empty strings from id 13437 to 13499
+#: system/settings/settings.xml
+msgctxt "#13437"
+msgid "Prefer VDPAU Video Mixer"
+msgstr ""
+
+#empty strings from id 13438 to 13499
#: system/settings/settings.xml
msgctxt "#13500"
@@ -6850,7 +6855,7 @@ msgid "Software Blend"
msgstr ""
msgctxt "#16325"
-msgid "Auto - ION Optimized"
+msgid "VDPAU - Bob"
msgstr ""
#empty strings from id 16326 to 16399
@@ -375,6 +375,16 @@
<level>2</level>
<default>true</default>
</setting>
+ <setting id="videoplayer.usevdpaumixer" type="boolean" label="13437" help="">
+ <visible>HAVE_LIBVDPAU</visible>
+ <level>2</level>
+ <default>true</default>
+ <control>
+ <dependencies>
+ <dependency type="enable" setting="videoplayer.usevdpau" operator="is">true</dependency> <!-- USE VDPAU -->
+ </dependencies>
+ </control>
+ </setting>
<setting id="videoplayer.usevaapi" type="boolean" label="13426" help="36156">
<visible>HAVE_LIBVA</visible>
<level>2</level>
@@ -70,6 +70,18 @@ void main()
rgb.a = gl_Color.a;
gl_FragColor = rgb;
+#elif defined(XBMC_VDPAU_NV12)
+
+ vec4 yuv, rgb;
+ yuv.rgba = vec4( texture2D(m_sampY, stretch(m_cordY)).r
+ , texture2D(m_sampU, stretch(m_cordU)).r
+ , texture2D(m_sampV, stretch(m_cordV)).g
+ , 1.0 );
+
+ rgb = m_yuvmat * yuv;
+ rgb.a = gl_Color.a;
+ gl_FragColor = rgb;
+
#elif defined(XBMC_YUY2) || defined(XBMC_UYVY)
#if(XBMC_texture_rectangle)
Oops, something went wrong.