- case VLC_FOURCC('R','V','2','4'):
- case VLC_FOURCC('R','V','3','2'):
- p_vout->chroma.pf_convert = E_(I420_RGB32);
+ case VLC_CODEC_RGB32:
+#if ! defined (MODULE_NAME_IS_i420_rgb)
+ /* If we don't have support for the bitmasks, bail out */
+ if( p_filter->fmt_out.video.i_rmask == 0x00ff0000
+ && p_filter->fmt_out.video.i_gmask == 0x0000ff00
+ && p_filter->fmt_out.video.i_bmask == 0x000000ff )
+ {
+ /* A8R8G8B8 pixel format */
+ msg_Dbg(p_this, "RGB pixel format is A8R8G8B8");
+ p_filter->pf_video_filter = I420_A8R8G8B8_Filter;
+ }
+ else if( p_filter->fmt_out.video.i_rmask == 0xff000000
+ && p_filter->fmt_out.video.i_gmask == 0x00ff0000
+ && p_filter->fmt_out.video.i_bmask == 0x0000ff00 )
+ {
+ /* R8G8B8A8 pixel format */
+ msg_Dbg(p_this, "RGB pixel format is R8G8B8A8");
+ p_filter->pf_video_filter = I420_R8G8B8A8_Filter;
+ }
+ else if( p_filter->fmt_out.video.i_rmask == 0x0000ff00
+ && p_filter->fmt_out.video.i_gmask == 0x00ff0000
+ && p_filter->fmt_out.video.i_bmask == 0xff000000 )
+ {
+ /* B8G8R8A8 pixel format */
+ msg_Dbg(p_this, "RGB pixel format is B8G8R8A8");
+ p_filter->pf_video_filter = I420_B8G8R8A8_Filter;
+ }
+ else if( p_filter->fmt_out.video.i_rmask == 0x000000ff
+ && p_filter->fmt_out.video.i_gmask == 0x0000ff00
+ && p_filter->fmt_out.video.i_bmask == 0x00ff0000 )
+ {
+ /* A8B8G8R8 pixel format */
+ msg_Dbg(p_this, "RGB pixel format is A8B8G8R8");
+ p_filter->pf_video_filter = I420_A8B8G8R8_Filter;
+ }
+ else
+ return VLC_EGENERIC;
+#else
+ /* generic C chroma converter */
+ p_filter->pf_video_filter = I420_RGB32_Filter;
+#endif