* Preamble
*****************************************************************************/
#include <math.h> /* exp(), pow() */
-#include <string.h> /* strerror() */
-#include <stdlib.h> /* malloc(), free() */
#include <vlc/vlc.h>
#include <vlc_vout.h>
msg_Dbg(p_this, "RGB pixel format is A8R8G8B8");
p_vout->chroma.pf_convert = E_(I420_A8R8G8B8);
}
+ else if( p_vout->output.i_rmask == 0xff000000
+ && p_vout->output.i_gmask == 0x00ff0000
+ && p_vout->output.i_bmask == 0x0000ff00 )
+ {
+ /* R8G8B8A8 pixel format */
+ msg_Dbg(p_this, "RGB pixel format is R8G8B8A8");
+ p_vout->chroma.pf_convert = E_(I420_R8G8B8A8);
+ }
else if( p_vout->output.i_rmask == 0x0000ff00
&& p_vout->output.i_gmask == 0x00ff0000
&& p_vout->output.i_bmask == 0xff000000 )
msg_Dbg(p_this, "RGB pixel format is B8G8R8A8");
p_vout->chroma.pf_convert = E_(I420_B8G8R8A8);
}
+ else if( p_vout->output.i_rmask == 0x000000ff
+ && p_vout->output.i_gmask == 0x0000ff00
+ && p_vout->output.i_bmask == 0x00ff0000 )
+ {
+ /* A8B8G8R8 pixel format */
+ msg_Dbg(p_this, "RGB pixel format is A8B8G8R8");
+ p_vout->chroma.pf_convert = E_(I420_A8B8G8R8);
+ }
else
return -1;
#else
- // generic C chroma converter */
+ /* generic C chroma converter */
p_vout->chroma.pf_convert = E_(I420_RGB32);
#endif
break;
p_cmap_b[ j ] = CLIP( b );
#if 0
- printf("+++Alloc RGB cmap %d (%d, %d, %d)\n", j,
- p_cmap_r[ j ] >>8, p_cmap_g[ j ] >>8,
- p_cmap_b[ j ] >>8);
+ printf("+++Alloc RGB cmap %d (%d, %d, %d)\n", j,
+ p_cmap_r[ j ] >>8, p_cmap_g[ j ] >>8,
+ p_cmap_b[ j ] >>8);
#endif
/* Allocate color */