+/*****************************************************************************
+ * SetPalette: sets an 8 bpp palette
+ *****************************************************************************/
+static void SetPalette( vout_thread_t *p_vout, u16 *red, u16 *green, u16 *blue )
+{
+ ggi_color colors[256];
+ int i;
+
+ /* Fill colors with color information */
+ for( i = 0; i < 256; i++ )
+ {
+ colors[ i ].r = red[ i ];
+ colors[ i ].g = green[ i ];
+ colors[ i ].b = blue[ i ];
+ colors[ i ].a = 0;
+ }
+
+ /* Set palette */
+ if( ggiSetPalette( p_vout->p_sys->p_display, 0, 256, colors ) < 0 )
+ {
+ msg_Err( p_vout, "failed setting palette" );
+ }
+}
+