]> git.sesse.net Git - vlc/commitdiff
* bit masks for RV15 and RV16 were inverted (!) (or there is something I really haven...
authorBenjamin Pracht <bigben@videolan.org>
Sun, 23 Apr 2006 14:37:54 +0000 (14:37 +0000)
committerBenjamin Pracht <bigben@videolan.org>
Sun, 23 Apr 2006 14:37:54 +0000 (14:37 +0000)
* Endianness fix for RV15 and RV16 (mostly used for x11)

modules/video_output/x11/xcommon.c

index 801b77c42486f7bbbfd3af49b142464749dba8cf..9bc0894d08c3be653ffd50f8a75174c6542458d9 100644 (file)
@@ -374,15 +374,27 @@ static int InitVideo( vout_thread_t *p_vout )
 
     switch( p_vout->output.i_chroma )
     {
-        case VLC_FOURCC('R','V','1','5'):
+        case VLC_FOURCC('R','V','1','6'):
+#if defined( WORDS_BIGENDIAN )
+            p_vout->output.i_rmask = 0xf800;
+            p_vout->output.i_gmask = 0x07e0;
+            p_vout->output.i_bmask = 0x001f;
+#else
             p_vout->output.i_rmask = 0x001f;
             p_vout->output.i_gmask = 0x07e0;
             p_vout->output.i_bmask = 0xf800;
+#endif
             break;
-        case VLC_FOURCC('R','V','1','6'):
+        case VLC_FOURCC('R','V','1','5'):
+#if defined( WORDS_BIGENDIAN )
+            p_vout->output.i_rmask = 0x7c00;
+            p_vout->output.i_gmask = 0x03e0;
+            p_vout->output.i_bmask = 0x001f;
+#else
             p_vout->output.i_rmask = 0x001f;
             p_vout->output.i_gmask = 0x03e0;
             p_vout->output.i_bmask = 0x7c00;
+#endif
             break;
     }