[vlc-devel] commit: Fix the RGB masks in v4l too. (Antoine Cellerier )
git version control
git at videolan.org
Sat Sep 13 23:43:49 CEST 2008
vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Sat Sep 13 23:46:45 2008 +0200| [6e8bbe8e1a8e11492ad87fa8886c1f3cb20c026c] | committer: Antoine Cellerier
Fix the RGB masks in v4l too.
Once again, thanks to plc5_250 for the tests.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6e8bbe8e1a8e11492ad87fa8886c1f3cb20c026c
---
modules/access/v4l.c | 22 +++++++++++++++++-----
1 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/modules/access/v4l.c b/modules/access/v4l.c
index 2dbfb2c..eaa73b0 100644
--- a/modules/access/v4l.c
+++ b/modules/access/v4l.c
@@ -503,12 +503,24 @@ static int Open( vlc_object_t *p_this )
fmt.video.i_aspect = 4 * VOUT_ASPECT_FACTOR / 3;
/* Setup rgb mask for RGB formats */
- if( p_sys->i_fourcc == VLC_FOURCC('R','V','2','4') )
+ switch( p_sys->i_fourcc )
{
- /* This is in BGR format */
- fmt.video.i_bmask = 0x00ff0000;
- fmt.video.i_gmask = 0x0000ff00;
- fmt.video.i_rmask = 0x000000ff;
+ case VLC_FOURCC('R','V','1','5'):
+ fmt.video.i_rmask = 0x001f;
+ fmt.video.i_gmask = 0x03e0;
+ fmt.video.i_bmask = 0x7c00;
+ break;
+ case VLC_FOURCC('R','V','1','6'):
+ fmt.video.i_rmask = 0x001f;
+ fmt.video.i_gmask = 0x07e0;
+ fmt.video.i_bmask = 0xf800;
+ break;
+ case VLC_FOURCC('R','V','2','4'):
+ case VLC_FOURCC('R','V','3','2'):
+ fmt.video.i_rmask = 0x00ff0000;
+ fmt.video.i_gmask = 0x0000ff00;
+ fmt.video.i_bmask = 0x000000ff;
+ break;
}
msg_Dbg( p_demux, "added new video es %4.4s %dx%d",
More information about the vlc-devel
mailing list