[vlc-commits] vdpau/display: fix blending on big-endian platforms (untested)

Rémi Denis-Courmont git at videolan.org
Wed May 14 15:27:11 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed May 14 17:44:30 2014 +0800| [b2c81de9d6b56690611c0cebecde92df86d2380b] | committer: Rémi Denis-Courmont

vdpau/display: fix blending on big-endian platforms (untested)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b2c81de9d6b56690611c0cebecde92df86d2380b
---

 modules/hw/vdpau/display.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/modules/hw/vdpau/display.c b/modules/hw/vdpau/display.c
index 3266b9b..1206cdc 100644
--- a/modules/hw/vdpau/display.c
+++ b/modules/hw/vdpau/display.c
@@ -171,7 +171,11 @@ static void RenderRegion(vout_display_t *vd, VdpOutputSurface target,
 {
     vout_display_sys_t *sys = vd->sys;
     VdpBitmapSurface surface;
-    VdpRGBAFormat fmt = VDP_RGBA_FORMAT_R8G8B8A8; /* TODO? YUVA */
+#ifdef WORDS_BIGENDIAN
+    VdpRGBAFormat fmt = VDP_RGBA_FORMAT_B8G8R8A8;
+#else
+    VdpRGBAFormat fmt = VDP_RGBA_FORMAT_R8G8B8A8;
+#endif
     VdpStatus err;
 
     /* Create GPU surface for sub-picture */
@@ -612,7 +616,11 @@ static int Open(vlc_object_t *obj)
     /* Check bitmap capabilities (for SPU) */
     const vlc_fourcc_t *spu_chromas = NULL;
     {
+#ifdef WORDS_BIGENDIAN
+        static const vlc_fourcc_t subpicture_chromas[] = { VLC_CODEC_ARGB, 0 };
+#else
         static const vlc_fourcc_t subpicture_chromas[] = { VLC_CODEC_RGBA, 0 };
+#endif
         uint32_t w, h;
         VdpBool ok;
 



More information about the vlc-commits mailing list