[vlc-commits] [Git][videolan/vlc][master] 4 commits: fourcc: change the VLC_CODEC_RGB233 FourCC to RGB8

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Sep 21 10:32:36 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
11599f50 by Steve Lhomme at 2023-09-21T10:13:13+00:00
fourcc: change the VLC_CODEC_RGB233 FourCC to RGB8

So that code passing a chroma as a string ends up on the on the same chroma
layout as it used to.

- - - - -
0922c47c by Steve Lhomme at 2023-09-21T10:13:13+00:00
libplacebo: handle VLC_CODEC_RGB233 instead of VLC_CODEC_RGB8 for SPU's

So we have a reliable component position.

Make it less prioritary in case the list of iterated to find the first match.

- - - - -
5579d162 by Steve Lhomme at 2023-09-21T10:13:13+00:00
i420_rgb: set the offset extra depending on i_bytespp

This avoids relying on a single chroma.

- - - - -
6c875b1f by Steve Lhomme at 2023-09-21T10:13:13+00:00
fourcc: remove read-only VLC_CODEC_RGB8

It's never used anymore at any source.

- - - - -


7 changed files:

- include/vlc_fourcc.h
- modules/codec/avcodec/chroma.c
- modules/codec/avcodec/fourcc.c
- modules/video_chroma/i420_rgb.c
- modules/video_output/libplacebo/display.c
- src/misc/fourcc.c
- src/misc/fourcc_list.h


Changes:

=====================================
include/vlc_fourcc.h
=====================================
@@ -343,8 +343,6 @@
 
 /* Palettized RGB with palette element R:G:B */
 #define VLC_CODEC_RGBP            VLC_FOURCC('R','G','B','P')
-/* 8-bit RGB (using explicit masks) */
-#define VLC_CODEC_RGB8            VLC_FOURCC('R','G','B','8')
 /* 15-bit RGB padded to 16 bits (using explicit masks) */
 #define VLC_CODEC_RGB15           VLC_FOURCC('R','V','1','5')
 /* 16-bit RGB (using explicit masks) */
@@ -366,7 +364,7 @@
 /* 8-bit RGB "R3G3B2" */
 #define VLC_CODEC_RGB332           VLC_FOURCC('R','3','3','2')
 /* 8-bit RGB "R2G3B3" */
-#define VLC_CODEC_RGB233           VLC_FOURCC('R','2','3','3')
+#define VLC_CODEC_RGB233           VLC_FOURCC('R','G','B','8')
 /* 8-bit BGR "B2G3R3" */
 #define VLC_CODEC_BGR233           VLC_FOURCC('B','2','3','3')
 


=====================================
modules/codec/avcodec/chroma.c
=====================================
@@ -143,8 +143,6 @@ static const struct
     {VLC_CODEC_RGB233, AV_PIX_FMT_RGB8, 0, 0, 0 },
     {VLC_CODEC_BGR233, AV_PIX_FMT_BGR8, 0, 0, 0 },
 
-    VLC_RGB( VLC_CODEC_RGB8, AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, 0xC0, 0x38, 0x07 )
-
     VLC_RGB( VLC_CODEC_RGB15, AV_PIX_FMT_RGB555, AV_PIX_FMT_BGR555, 0x7c00, 0x03e0, 0x001f )
     VLC_RGB( VLC_CODEC_RGB16, AV_PIX_FMT_RGB565, AV_PIX_FMT_BGR565, 0xf800, 0x07e0, 0x001f )
     VLC_RGB( VLC_CODEC_RGB24, AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, 0xff0000, 0x00ff00, 0x0000ff )


=====================================
modules/codec/avcodec/fourcc.c
=====================================
@@ -64,7 +64,6 @@ static const struct vlc_avcodec_fourcc video_codecs[] =
     { VLC_CODEC_RGB32, AV_CODEC_ID_RAWVIDEO },
     { VLC_CODEC_RGB24, AV_CODEC_ID_RAWVIDEO },
     { VLC_CODEC_RGB16, AV_CODEC_ID_RAWVIDEO },
-    { VLC_CODEC_RGB8, AV_CODEC_ID_RAWVIDEO },
     { VLC_CODEC_RGB332, AV_CODEC_ID_RAWVIDEO },
     { VLC_CODEC_RGB233, AV_CODEC_ID_RAWVIDEO },
     { VLC_CODEC_BGR233, AV_CODEC_ID_RAWVIDEO },


=====================================
modules/video_chroma/i420_rgb.c
=====================================
@@ -174,7 +174,6 @@ static int Activate( filter_t *p_filter )
                 case VLC_CODEC_RGB233:
                 case VLC_CODEC_RGB332:
                 case VLC_CODEC_BGR233:
-                case VLC_CODEC_RGB8:
                     p_filter->ops = &I420_RGB8_ops;
                     break;
                 case VLC_CODEC_RGB15:
@@ -207,7 +206,6 @@ static int Activate( filter_t *p_filter )
         case VLC_CODEC_RGB233:
         case VLC_CODEC_RGB332:
         case VLC_CODEC_BGR233:
-        case VLC_CODEC_RGB8:
             p_sys->i_bytespp = 1;
             break;
 #endif
@@ -225,8 +223,7 @@ static int Activate( filter_t *p_filter )
     }
 
     p_sys->p_offset = malloc( p_filter->fmt_out.video.i_width
-                    * ( ( p_filter->fmt_out.video.i_chroma
-                           == VLC_CODEC_RGB8 ) ? 2 : 1 )
+                    * ( ( p_sys->i_bytespp == 1 ) ? 2 : 1 )
                     * sizeof( int ) );
     if( p_sys->p_offset == NULL )
     {
@@ -328,7 +325,6 @@ static void SetYUV( filter_t *p_filter, const video_format_t *vfmt )
     case VLC_CODEC_RGB233:
     case VLC_CODEC_RGB332:
     case VLC_CODEC_BGR233:
-    case VLC_CODEC_RGB8:
         p_sys->p_rgb8 = (uint8_t *)p_sys->p_base;
         Set8bppPalette( p_filter, p_sys->p_rgb8 );
         break;


=====================================
modules/video_output/libplacebo/display.c
=====================================
@@ -157,11 +157,11 @@ static int Open(vout_display_t *vd,
     static const vlc_fourcc_t subfmts[] = {
         VLC_CODEC_RGBA,
         VLC_CODEC_BGRA,
-        VLC_CODEC_RGB8,
         VLC_CODEC_RGB15,
         VLC_CODEC_RGB16,
         VLC_CODEC_RGB24,
         VLC_CODEC_RGB32,
+        VLC_CODEC_RGB233,
         VLC_CODEC_GREY,
         0
     };


=====================================
src/misc/fourcc.c
=====================================
@@ -802,8 +802,8 @@ static const struct
     { { VLC_CODEC_YUV2 },                      PACKED_FMT(2, 16) },
     { { VLC_CODEC_RGB233, VLC_CODEC_BGR233,
         VLC_CODEC_RGB332, 0 },                 PACKED_FMT(1, 8) },
-    { { VLC_CODEC_RGB8, VLC_CODEC_GREY,
-        VLC_CODEC_YUVP, VLC_CODEC_RGBP },      PACKED_FMT(1, 8) },
+    { { VLC_CODEC_YUVP, VLC_CODEC_RGBP,
+        VLC_CODEC_GREY, 0 },                   PACKED_FMT(1, 8) },
 
     { { VLC_CODEC_GREY_10L,
         VLC_CODEC_GREY_10B },                  PACKED_FMT(2, 10) },


=====================================
src/misc/fourcc_list.h
=====================================
@@ -805,10 +805,8 @@ static const staticentry_t p_list_video[] = {
     B(VLC_CODEC_RGBP, "Palettized RGB with palette element R:G:B"),
         A("RGBP"),
 
-    B(VLC_CODEC_RGB8, "8 bits RGB"),
-        A("RGB2"),
     B(VLC_CODEC_RGB233, "8 bits RGB 2:3:3"),
-        A("R233"),
+        A("RGB8"),
     B(VLC_CODEC_RGB332, "8 bits RGB 3:3:2"),
         A("R332"),
     B(VLC_CODEC_BGR233, "8 bits BGR 2:3:3"),



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/1127d5fc7e88a0ee6fed103ad1e3c16a7d40de8a...6c875b1f659dbaeb5f95696a0d5e8d3de1010903

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/1127d5fc7e88a0ee6fed103ad1e3c16a7d40de8a...6c875b1f659dbaeb5f95696a0d5e8d3de1010903
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