[vlc-commits] [Git][videolan/vlc][3.0.x] 4 commits: fourcc: add VLC_CODEC_GREY_16{L, B}

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Sep 1 11:32:36 UTC 2022



Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
27cb4bb1 by Tristan Matthews at 2022-09-01T11:16:19+00:00
fourcc: add VLC_CODEC_GREY_16{L, B}

Refs #20814

(cherry picked from commit 1c34053ec020be288d7dc6228f60681607c7adf3)

Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

- - - - -
3e301543 by Steve Lhomme at 2022-09-01T11:16:19+00:00
fourcc: add 10 bits / 12 bits greyscale chroma

(cherry picked from commit f50de4fa6453e6bc1a961e88e56f66d847af3ba7)

Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

- - - - -
9787c051 by Tristan Matthews at 2022-09-01T11:16:19+00:00
codec: avcodec: map Y16 (Fixes #20814)

(cherry picked from commit e121a52d969faa5f2625a555219b0af1b3743b27)

Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

- - - - -
373fd143 by Steve Lhomme at 2022-09-01T11:16:19+00:00
avcodec: map 10/12 bits greyscale pixel formats

(cherry picked from commit 8263fd8bac67ecc5d6629ff5376973497fb54e2c)

Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

- - - - -


5 changed files:

- include/vlc_fourcc.h
- modules/codec/avcodec/chroma.c
- src/misc/es_format.c
- src/misc/fourcc.c
- src/misc/fourcc_list.h


Changes:

=====================================
include/vlc_fourcc.h
=====================================
@@ -346,6 +346,15 @@
 
 /* 8 bits grey */
 #define VLC_CODEC_GREY            VLC_FOURCC('G','R','E','Y')
+/* 10 bits grey */
+#define VLC_CODEC_GREY_10L        VLC_FOURCC('G','0','F','L')
+#define VLC_CODEC_GREY_10B        VLC_FOURCC('G','0','F','B')
+/* 12 bits grey */
+#define VLC_CODEC_GREY_12L        VLC_FOURCC('G','2','F','L')
+#define VLC_CODEC_GREY_12B        VLC_FOURCC('G','2','F','B')
+/* 16 bits grey */
+#define VLC_CODEC_GREY_16L        VLC_FOURCC('G','R','F','L')
+#define VLC_CODEC_GREY_16B        VLC_FOURCC('G','R','F','B')
 
 /* VDPAU video surface YCbCr 4:2:0 */
 #define VLC_CODEC_VDPAU_VIDEO_420 VLC_FOURCC('V','D','V','0')


=====================================
modules/codec/avcodec/chroma.c
=====================================
@@ -157,6 +157,16 @@ static const struct
     {VLC_CODEC_ARGB, AV_PIX_FMT_ARGB, 0, 0, 0 },
     {VLC_CODEC_BGRA, AV_PIX_FMT_BGRA, 0, 0, 0 },
     {VLC_CODEC_GREY, AV_PIX_FMT_GRAY8, 0, 0, 0},
+#ifdef AV_PIX_FMT_GRAY10
+    {VLC_CODEC_GREY_10L, AV_PIX_FMT_GRAY10LE, 0, 0, 0},
+    {VLC_CODEC_GREY_10B, AV_PIX_FMT_GRAY10BE, 0, 0, 0},
+#endif
+#ifdef AV_PIX_FMT_GRAY12
+    {VLC_CODEC_GREY_12L, AV_PIX_FMT_GRAY12LE, 0, 0, 0},
+    {VLC_CODEC_GREY_12B, AV_PIX_FMT_GRAY12BE, 0, 0, 0},
+#endif
+    {VLC_CODEC_GREY_16L, AV_PIX_FMT_GRAY16LE, 0, 0, 0},
+    {VLC_CODEC_GREY_16B, AV_PIX_FMT_GRAY16BE, 0, 0, 0},
 
      /* Paletized RGB */
     {VLC_CODEC_RGBP, AV_PIX_FMT_PAL8, 0, 0, 0},


=====================================
src/misc/es_format.c
=====================================
@@ -215,6 +215,16 @@ void video_format_Setup( video_format_t *p_fmt, vlc_fourcc_t i_chroma,
         p_fmt->i_bits_per_pixel = 8;
         break;
 
+    case VLC_CODEC_GREY_10B:
+    case VLC_CODEC_GREY_10L:
+        p_fmt->i_bits_per_pixel = 10;
+        break;
+
+    case VLC_CODEC_GREY_12B:
+    case VLC_CODEC_GREY_12L:
+        p_fmt->i_bits_per_pixel = 12;
+        break;
+
     case VLC_CODEC_XYZ12:
         p_fmt->i_bits_per_pixel = 48;
         break;


=====================================
src/misc/fourcc.c
=====================================
@@ -739,6 +739,13 @@ static const struct
     { { VLC_CODEC_RGB8, VLC_CODEC_GREY,
         VLC_CODEC_YUVP, VLC_CODEC_RGBP },      PACKED_FMT(1, 8) },
 
+    { { VLC_CODEC_GREY_10L,
+        VLC_CODEC_GREY_10B },                  PACKED_FMT(2, 10) },
+    { { VLC_CODEC_GREY_12L,
+        VLC_CODEC_GREY_12B },                  PACKED_FMT(2, 12) },
+    { { VLC_CODEC_GREY_16L,
+        VLC_CODEC_GREY_16B },                  PACKED_FMT(2, 16) },
+
     { { VLC_CODEC_RGB15, 0 },                  PACKED_FMT(2, 15) },
     { { VLC_CODEC_RGB12, 0 },                  PACKED_FMT(2, 12) },
     { { VLC_CODEC_RGB16, 0 },                  PACKED_FMT(2, 16) },


=====================================
src/misc/fourcc_list.h
=====================================
@@ -818,6 +818,24 @@ static const staticentry_t p_list_video[] = {
         A("Y800"),
         A("Y8  "),
 
+    B(VLC_CODEC_GREY_10L, "10 bits greyscale LE"),
+        A("G0FL"),
+
+    B(VLC_CODEC_GREY_10B, "10 bits greyscale BE"),
+        A("G0FB"),
+
+    B(VLC_CODEC_GREY_12L, "12 bits greyscale LE"),
+        A("G2FL"),
+
+    B(VLC_CODEC_GREY_12B, "12 bits greyscale BE"),
+        A("G2FB"),
+
+    B(VLC_CODEC_GREY_16L, "16 bits greyscale LE"),
+        A("GRFL"),
+
+    B(VLC_CODEC_GREY_16B, "16 bits greyscale BE"),
+        A("GRFB"),
+
     B(VLC_CODEC_UYVY, "Packed YUV 4:2:2, U:Y:V:Y"),
         A("UYVY"),
         A("UYNV"),



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/49a27d65c6a9f57e4c7d560468a12b0fdac41b21...373fd1433bd75abc22fa98677042562dc56414f5

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/49a27d65c6a9f57e4c7d560468a12b0fdac41b21...373fd1433bd75abc22fa98677042562dc56414f5
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