]> git.sesse.net Git - vlc/commitdiff
Fixed asa decoder colors (on x86 at least).
authorLaurent Aimar <fenrir@videolan.org>
Wed, 9 Jul 2008 19:03:18 +0000 (19:03 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Wed, 9 Jul 2008 19:03:18 +0000 (19:03 +0000)
Can someone test on a big endian CPU (I don't know if it is CPU
dependant) ?

modules/codec/csri.c

index 963e7d86475dfb20df99cf7e9879932dcc5ad079..26f4c18077df5251c7892eb7b9bf974a042aa9eb 100644 (file)
@@ -262,7 +262,8 @@ static subpicture_region_t *UpdateRegions( video_format_t *p_fmt, spu_t *p_spu,
             p_fmt->i_visible_width, p_fmt->i_visible_height,
             (const char*)&p_fmt->i_chroma );
 #endif
-
+    /* XXX On x86 at least our RGBA is mapped to their BGRA
+     * TODO confirm that is the same on big endian cpu */
     fmt = *p_fmt;
     fmt.i_chroma = VLC_FOURCC('R','G','B','A');
     fmt.i_width = fmt.i_visible_width;
@@ -278,7 +279,7 @@ static subpicture_region_t *UpdateRegions( video_format_t *p_fmt, spu_t *p_spu,
 
         struct csri_fmt csri_fmt;
         memset(&csri_fmt, 0, sizeof(csri_fmt));
-        csri_fmt.pixfmt = CSRI_F_RGBA;
+        csri_fmt.pixfmt = CSRI_F_BGRA;
         csri_fmt.width = fmt.i_width;
         csri_fmt.height = fmt.i_height;
         if( csri_request_fmt( p_sys->p_instance, &csri_fmt ) )
@@ -303,7 +304,7 @@ static subpicture_region_t *UpdateRegions( video_format_t *p_fmt, spu_t *p_spu,
         /* */
         //msg_Dbg( p_dec, "TS %lf", ts * 0.000001 );
         memset( &csri_frame, 0, sizeof(csri_frame) );
-        csri_frame.pixfmt = CSRI_F_RGBA;
+        csri_frame.pixfmt = CSRI_F_BGRA;
         csri_frame.planes[0] = (unsigned char*)p_spu_region->picture.Y_PIXELS;
         csri_frame.strides[0] = p_spu_region->picture.Y_PITCH;
         csri_render( p_sys->p_instance, &csri_frame, ts * 0.000001 );