[vlc-commits] [Git][videolan/vlc][master] 2 commits: fourcc: rename and differentiate XYZ12 by endianess

Steve Lhomme (@robUx4) gitlab at videolan.org
Sun Feb 11 14:51:43 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
a805ab05 by François Cartegnie at 2024-02-11T14:37:26+00:00
fourcc: rename and differentiate XYZ12 by endianess

- - - - -
40d8a9fa by François Cartegnie at 2024-02-11T14:37:26+00:00
fourcc: add VLC_CODEC_XYZ_12L

- - - - -


7 changed files:

- include/vlc_fourcc.h
- modules/codec/avcodec/chroma.c
- modules/video_output/libplacebo/utils.c
- modules/video_output/opengl/interop_sw.c
- modules/video_output/opengl/sampler.c
- src/misc/fourcc.c
- src/misc/fourcc_list.h


Changes:

=====================================
include/vlc_fourcc.h
=====================================
@@ -674,7 +674,8 @@
 #define VLC_CODEC_WEBVTT    VLC_FOURCC('w','v','t','t')
 
 /* XYZ colorspace 12 bits packed in 16 bits, organisation |XXX0|YYY0|ZZZ0| */
-#define VLC_CODEC_XYZ12     VLC_FOURCC('X','Y','1','2')
+#define VLC_CODEC_XYZ_12L   VLC_FOURCC('X','Y','c','L')
+#define VLC_CODEC_XYZ_12B   VLC_FOURCC('X','Y','c','B')
 
 
 /* Special endian dependent values


=====================================
modules/codec/avcodec/chroma.c
=====================================
@@ -201,7 +201,8 @@ static const struct
     {VLC_CODEC_GBRA_PLANAR_16B, AV_PIX_FMT_GBRAP16BE,  COLOR_RANGE_UNDEF },
 
     /* XYZ */
-    {VLC_CODEC_XYZ12, AV_PIX_FMT_XYZ12BE,  COLOR_RANGE_UNDEF },
+    {VLC_CODEC_XYZ_12L, AV_PIX_FMT_XYZ12LE,  COLOR_RANGE_UNDEF },
+    {VLC_CODEC_XYZ_12B, AV_PIX_FMT_XYZ12BE,  COLOR_RANGE_UNDEF },
 };
 
 int GetVlcChroma( video_format_t *fmt, enum AVPixelFormat i_ffmpeg_chroma )


=====================================
modules/video_output/libplacebo/utils.c
=====================================
@@ -435,7 +435,8 @@ struct pl_color_repr vlc_placebo_ColorRepr(const video_format_t *fmt)
     enum pl_color_system sys;
     if (likely(vlc_fourcc_IsYUV(fmt->i_chroma))) {
         sys = yuv_systems[fmt->space];
-    } else if (unlikely(fmt->i_chroma == VLC_CODEC_XYZ12)) {
+    } else if (unlikely(fmt->i_chroma == VLC_CODEC_XYZ_12L||
+                        fmt->i_chroma == VLC_CODEC_XYZ_12B)) {
         sys = PL_COLOR_SYSTEM_XYZ;
     } else {
         sys = PL_COLOR_SYSTEM_RGB;


=====================================
modules/video_output/opengl/interop_sw.c
=====================================
@@ -663,7 +663,8 @@ opengl_interop_init(struct vlc_gl_interop *interop,
     interop->fmt_out.space = yuv_space;
     interop->tex_target = GL_TEXTURE_2D;
 
-    if (chroma == VLC_CODEC_XYZ12)
+    if (chroma == VLC_CODEC_XYZ_12B||
+        chroma == VLC_CODEC_XYZ_12L)
     {
         interop_xyz12_init(interop);
         return VLC_SUCCESS;
@@ -731,7 +732,7 @@ opengl_interop_generic_init(struct vlc_gl_interop *interop, bool allow_dr)
         list = vlc_fourcc_GetYUVFallback(interop->fmt_in.i_chroma);
         space = interop->fmt_in.space;
     }
-    else if (interop->fmt_in.i_chroma == VLC_CODEC_XYZ12)
+    else if (interop->fmt_in.i_chroma == VLC_CODEC_XYZ_12B)
     {
         list = NULL;
         space = COLOR_SPACE_UNDEF;


=====================================
modules/video_output/opengl/sampler.c
=====================================
@@ -737,7 +737,8 @@ opengl_fragment_shader_init(struct vlc_gl_sampler *sampler, bool expose_planes)
     if (expose_planes)
         return sampler_planes_init(sampler);
 
-    if (chroma == VLC_CODEC_XYZ12)
+    if (chroma == VLC_CODEC_XYZ_12L ||
+        chroma == VLC_CODEC_XYZ_12B)
         return xyz12_shader_init(sampler);
 
     if (is_yuv)


=====================================
src/misc/fourcc.c
=====================================
@@ -804,7 +804,8 @@ static const vlc_chroma_description_t p_list_chroma_description[] = {
     { VLC_CODEC_Y410,                  PACKED_FMT(4, 32) },
 
     { VLC_CODEC_Y211,                 1, { {{1,4}, {1,1}} }, 4, 32 },
-    { VLC_CODEC_XYZ12,                 PACKED_FMT(6, 48) },
+    { VLC_CODEC_XYZ_12L,               PACKED_FMT(6, 48) },
+    { VLC_CODEC_XYZ_12B,               PACKED_FMT(6, 48) },
 
     { VLC_CODEC_VDPAU_VIDEO,           FAKE_FMT() },
     { VLC_CODEC_VDPAU_OUTPUT,          FAKE_FMT() },


=====================================
src/misc/fourcc_list.h
=====================================
@@ -975,7 +975,9 @@ static const staticentry_t p_list_video[] = {
 
 
     /* XYZ color space */
-    B(VLC_CODEC_XYZ12, "Packed XYZ 12-bit BE"),
+    B(VLC_CODEC_XYZ_12L, "Packed XYZ 12-bit LE"),
+
+    B(VLC_CODEC_XYZ_12B, "Packed XYZ 12-bit BE"),
         A("XY12"),
 
     /* Videogames Codecs */



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ff385bcbab0ceddb2c9bdfd4c398b669da93a2a5...40d8a9fadc4a0e90991d11bed65ae2ff0aedb579

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ff385bcbab0ceddb2c9bdfd4c398b669da93a2a5...40d8a9fadc4a0e90991d11bed65ae2ff0aedb579
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