Changeset 6e8bbe8e1a8e11492ad87fa8886c1f3cb20c026c

Show
Ignore:
Timestamp:
13/09/08 23:47:15 (3 months ago)
Author:
Antoine Cellerier <dionoea@videolan.org>
git-committer:
Antoine Cellerier <dionoea@videolan.org> 1221342435 +0200
git-parent:

[aa98c569277c489e7796e857e56f4fad15b0d00c]

git-author:
Antoine Cellerier <dionoea@videolan.org> 1221342405 +0200
Message:

Fix the RGB masks in v4l too.

Once again, thanks to plc5_250 for the tests.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/access/v4l.c

    r857535c r6e8bbe8  
    504504 
    505505        /* Setup rgb mask for RGB formats */ 
    506         if( p_sys->i_fourcc == VLC_FOURCC('R','V','2','4') ) 
    507         { 
    508             /* This is in BGR format */ 
    509             fmt.video.i_bmask = 0x00ff0000; 
    510             fmt.video.i_gmask = 0x0000ff00; 
    511             fmt.video.i_rmask = 0x000000ff; 
     506        switch( p_sys->i_fourcc ) 
     507        { 
     508            case VLC_FOURCC('R','V','1','5'): 
     509                fmt.video.i_rmask = 0x001f; 
     510                fmt.video.i_gmask = 0x03e0; 
     511                fmt.video.i_bmask = 0x7c00; 
     512                break; 
     513            case VLC_FOURCC('R','V','1','6'): 
     514                fmt.video.i_rmask = 0x001f; 
     515                fmt.video.i_gmask = 0x07e0; 
     516                fmt.video.i_bmask = 0xf800; 
     517                break; 
     518            case VLC_FOURCC('R','V','2','4'): 
     519            case VLC_FOURCC('R','V','3','2'): 
     520                fmt.video.i_rmask = 0x00ff0000; 
     521                fmt.video.i_gmask = 0x0000ff00; 
     522                fmt.video.i_bmask = 0x000000ff; 
     523                break; 
    512524        } 
    513525