[vlc-commits] [Git][videolan/vlc][master] 3 commits: vout/vmem: use VLC_CODEC_BGR565 instead of VLC_CODEC_RGB16

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed Oct 4 17:37:12 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
53d1e269 by Steve Lhomme at 2023-10-04T17:14:24+00:00
vout/vmem: use VLC_CODEC_BGR565 instead of VLC_CODEC_RGB16

This is the format corresponding to the mask depending on endiannness.
It's better to avoid using masks when possible.

- - - - -
13a6c7fa by Steve Lhomme at 2023-10-04T17:14:24+00:00
vout/vmem: use VLC_CODEC_BGR555 instead of VLC_CODEC_RGB15

This is the format corresponding to the mask depending on endiannness.
It's better to avoid using masks when possible.

- - - - -
0e2f75ea by Steve Lhomme at 2023-10-04T17:14:24+00:00
vout/vmem: simplify the mask setting

We only accept chromas without a mask.

- - - - -


1 changed file:

- modules/video_output/vmem.c


Changes:

=====================================
modules/video_output/vmem.c
=====================================
@@ -193,21 +193,17 @@ static int Open(vout_display_t *vd,
     switch (fmt.i_chroma)
     {
     case VLC_CODEC_RGB15:
-        fmt.i_rmask = 0x001f;
-        fmt.i_gmask = 0x03e0;
-        fmt.i_bmask = 0x7c00;
+        fmt.i_chroma = VLC_CODEC_BGR555;
         break;
     case VLC_CODEC_RGB16:
-        fmt.i_rmask = 0x001f;
-        fmt.i_gmask = 0x07e0;
-        fmt.i_bmask = 0xf800;
+        fmt.i_chroma = VLC_CODEC_BGR565;
         break;
     default:
-        fmt.i_rmask = 0;
-        fmt.i_gmask = 0;
-        fmt.i_bmask = 0;
         break;
     }
+    fmt.i_rmask = 0;
+    fmt.i_gmask = 0;
+    fmt.i_bmask = 0;
 
     /* */
     *fmtp = fmt;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/554a6eb9c4d7e5afdfe0b5f5427130cf0e2c4dd6...0e2f75ea30d86582337b743cf3ca3e13c81f619c

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/554a6eb9c4d7e5afdfe0b5f5427130cf0e2c4dd6...0e2f75ea30d86582337b743cf3ca3e13c81f619c
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list