[vlc-commits] [Git][videolan/vlc][master] 3 commits: vout/drm: remove DRM_FORMAT_YVU410

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed Oct 18 09:39:02 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
242928e3 by Steve Lhomme at 2023-10-18T09:04:56+00:00
vout/drm: remove DRM_FORMAT_YVU410

So we don't have to use VLC_CODEC_YV9 and don't have to swap U/V planes.
This chroma output should be rare enough that noone is impacted.

- - - - -
d3c43f2b by Steve Lhomme at 2023-10-18T09:04:56+00:00
fourcc: remove read-only VLC_CODEC_YV9

- - - - -
97d2bd1c by Steve Lhomme at 2023-10-18T09:04:56+00:00
fourcc: remove VLC_CODEC_YUV_PLANAR_410 define with a single chroma

- - - - -


10 changed files:

- include/vlc_fourcc.h
- modules/codec/avcodec/chroma.c
- modules/video_chroma/swscale.c
- modules/video_filter/blend.cpp
- modules/video_output/drm/fourcc.c
- modules/video_output/kva.c
- modules/video_output/libplacebo/utils.c
- modules/video_output/opengl/sampler.c
- src/misc/fourcc.c
- src/misc/fourcc_list.h


Changes:

=====================================
include/vlc_fourcc.h
=====================================
@@ -202,8 +202,6 @@
 
 /* Planar YUV */
 
-/* Planar YUV 4:1:0 Y:V:U */
-#define VLC_CODEC_YV9             VLC_FOURCC('Y','V','U','9')
 /* Planar YUV 4:1:0 Y:U:V */
 #define VLC_CODEC_I410            VLC_FOURCC('I','4','1','0')
 /* Planar YUV 4:1:1 Y:U:V */


=====================================
modules/codec/avcodec/chroma.c
=====================================
@@ -61,7 +61,6 @@ static const struct
     {VLC_CODEC_I411, AV_PIX_FMT_YUV411P,  COLOR_RANGE_UNDEF },
     {VLC_CODEC_I411, AV_PIX_FMT_YUVJ411P,  COLOR_RANGE_FULL },
     {VLC_CODEC_I410, AV_PIX_FMT_YUV410P,  COLOR_RANGE_UNDEF },
-    {VLC_CODEC_YV9, AV_PIX_FMT_YUV410P,  COLOR_RANGE_UNDEF },
 
     {VLC_CODEC_NV12, AV_PIX_FMT_NV12,  COLOR_RANGE_UNDEF },
     {VLC_CODEC_NV21, AV_PIX_FMT_NV21,  COLOR_RANGE_UNDEF },


=====================================
modules/video_chroma/swscale.c
=====================================
@@ -301,10 +301,6 @@ static void FixParameters( enum AVPixelFormat *pi_fmt, bool *pb_has_a, bool *pb_
         *pi_fmt = AV_PIX_FMT_YUV420P;
         *pb_swap_uv = true;
         break;
-    case VLC_CODEC_YV9:
-        *pi_fmt = AV_PIX_FMT_YUV410P;
-        *pb_swap_uv = true;
-        break;
     default:
         break;
     }


=====================================
modules/video_filter/blend.cpp
=====================================
@@ -401,7 +401,6 @@ private:
 
 typedef CPictureYUVPlanar<uint8_t,  1,1, true,  false> CPictureYUVA;
 
-typedef CPictureYUVPlanar<uint8_t,  4,4, false, true>  CPictureYV9;
 typedef CPictureYUVPlanar<uint8_t,  4,4, false, false> CPictureI410_8;
 
 typedef CPictureYUVPlanar<uint8_t,  4,1, false, false> CPictureI411_8;
@@ -641,7 +640,6 @@ static const struct {
     RGB(VLC_CODEC_BGRX,     CPictureRGB32,    convertAddOpaque),
     RGB(VLC_CODEC_XBGR,     CPictureRGB32,    convertAddOpaque),
 
-    YUV(VLC_CODEC_YV9,      CPictureYV9,      convertNone),
     YUV(VLC_CODEC_I410,     CPictureI410_8,   convertNone),
 
     YUV(VLC_CODEC_I411,     CPictureI411_8,   convertNone),


=====================================
modules/video_output/drm/fourcc.c
=====================================
@@ -171,7 +171,6 @@ static const struct {
 
     /* Planar YUV */
     { DRM_FORMAT_YUV410,   VLC_CODEC_I410 },
-    { DRM_FORMAT_YVU410,   VLC_CODEC_YV9 },
     { DRM_FORMAT_YUV411,   VLC_CODEC_I411 },
     { DRM_FORMAT_YUV420,   VLC_CODEC_I420 },
     { DRM_FORMAT_YVU420,   VLC_CODEC_YV12 },


=====================================
modules/video_output/kva.c
=====================================
@@ -476,12 +476,6 @@ static int OpenDisplay( vout_display_t *vd, video_format_t *fmt )
                     i_kva_fourcc = FOURCC_Y422;
                     break;
 
-                case VLC_CODEC_YV9:
-                    b_hw_accel = sys->kvac.ulInputFormatFlags & KVAF_YVU9;
-                    i_kva_fourcc = FOURCC_YVU9;
-                    i_chroma_shift = 2;
-                    break;
-
                 case VLC_CODEC_RGB565:
                     if (sys->kvac.ulInputFormatFlags & KVAF_BGR16 &&
                         sys->kvac.ulRMask == 0xf800 &&


=====================================
modules/video_output/libplacebo/utils.c
=====================================
@@ -127,7 +127,6 @@ struct fmt_desc {
 // rules, but which are included regardless. The corrections for these
 // exceptions happen below, in the function vlc_placebo_PlaneFormat!
 static const struct { vlc_fourcc_t fcc; struct fmt_desc desc; } formats[] = {
-    { VLC_CODEC_YV9,            {PLANAR(3,  8, _410)} },
     { VLC_CODEC_I410,           {PLANAR(3,  8, _410)} },
     { VLC_CODEC_I411,           {PLANAR(3,  8, _411)} },
     { VLC_CODEC_I440,           {PLANAR(3,  8, _440)} },
@@ -257,7 +256,6 @@ static void FillDesc(vlc_fourcc_t fcc, const struct fmt_desc *desc,
 
     // Exceptions to the rule
     switch (fcc) {
-    case VLC_CODEC_YV9:
     case VLC_CODEC_YV12:
         // Planar Y:V:U
         data[1].component_map[0] = 2;


=====================================
modules/video_output/opengl/sampler.c
=====================================
@@ -234,7 +234,7 @@ sampler_yuv_base_init(struct vlc_gl_sampler *sampler,
      *
      * This is equivalent to swap columns 1 and 2.
      */
-    bool swap_uv = desc->fcc == VLC_CODEC_YV12 || desc->fcc == VLC_CODEC_YV9 ||
+    bool swap_uv = desc->fcc == VLC_CODEC_YV12 ||
                    desc->fcc == VLC_CODEC_NV21;
     if (swap_uv)
     {


=====================================
src/misc/fourcc.c
=====================================
@@ -203,9 +203,6 @@ const char *vlc_fourcc_GetDescription(int cat, vlc_fourcc_t fourcc)
 
 
 /* */
-#define VLC_CODEC_YUV_PLANAR_410 \
-    VLC_CODEC_I410, VLC_CODEC_YV9
-
 #define VLC_CODEC_YUV_PLANAR_420 \
     VLC_CODEC_I420, VLC_CODEC_YV12
 
@@ -243,7 +240,7 @@ const char *vlc_fourcc_GetDescription(int cat, vlc_fourcc_t fourcc)
 #define VLC_CODEC_FALLBACK_420 \
     VLC_CODEC_I422, VLC_CODEC_YUV_PACKED, \
     VLC_CODEC_I444, VLC_CODEC_I440, \
-    VLC_CODEC_I411, VLC_CODEC_YUV_PLANAR_410, VLC_CODEC_Y211
+    VLC_CODEC_I411, VLC_CODEC_I410, VLC_CODEC_Y211
 
 static const vlc_fourcc_t p_I420_fallback[] = {
     VLC_CODEC_I420, VLC_CODEC_YV12, VLC_CODEC_FALLBACK_420, 0
@@ -290,7 +287,7 @@ static const vlc_fourcc_t p_P010_fallback[] = {
 #define VLC_CODEC_FALLBACK_422 \
     VLC_CODEC_YUV_PACKED, VLC_CODEC_YUV_PLANAR_420, \
     VLC_CODEC_I444, VLC_CODEC_I440, \
-    VLC_CODEC_I411, VLC_CODEC_YUV_PLANAR_410, VLC_CODEC_Y211
+    VLC_CODEC_I411, VLC_CODEC_I410, VLC_CODEC_Y211
 
 static const vlc_fourcc_t p_I422_fallback[] = {
     VLC_CODEC_I422, VLC_CODEC_FALLBACK_422, 0
@@ -321,7 +318,7 @@ static const vlc_fourcc_t p_I422_12B_fallback[] = {
 #define VLC_CODEC_FALLBACK_444 \
     VLC_CODEC_I422, VLC_CODEC_YUV_PACKED, \
     VLC_CODEC_YUV_PLANAR_420, VLC_CODEC_I440, \
-    VLC_CODEC_I411, VLC_CODEC_YUV_PLANAR_410, VLC_CODEC_Y211
+    VLC_CODEC_I411, VLC_CODEC_I410, VLC_CODEC_Y211
 
 static const vlc_fourcc_t p_I444_fallback[] = {
     VLC_CODEC_I444, VLC_CODEC_FALLBACK_444, 0
@@ -423,13 +420,13 @@ static const vlc_fourcc_t p_I440_fallback[] = {
     VLC_CODEC_I422,
     VLC_CODEC_I444,
     VLC_CODEC_YUV_PACKED,
-    VLC_CODEC_I411, VLC_CODEC_YUV_PLANAR_410, VLC_CODEC_Y211, 0
+    VLC_CODEC_I411, VLC_CODEC_I410, VLC_CODEC_Y211, 0
 };
 
 #define VLC_CODEC_FALLBACK_PACKED \
     VLC_CODEC_I422, VLC_CODEC_YUV_PLANAR_420, \
     VLC_CODEC_I444, VLC_CODEC_I440, \
-    VLC_CODEC_I411, VLC_CODEC_YUV_PLANAR_410, VLC_CODEC_Y211
+    VLC_CODEC_I411, VLC_CODEC_I410, VLC_CODEC_Y211
 
 static const vlc_fourcc_t p_YUYV_fallback[] = {
     VLC_CODEC_YUYV,
@@ -520,7 +517,7 @@ static const vlc_fourcc_t p_list_YUV[] = {
     VLC_CODEC_YUV_PLANAR_444_ALPHA,
     VLC_CODEC_YUV_SEMIPLANAR_444,
     VLC_CODEC_YUV_PACKED,
-    VLC_CODEC_I411, VLC_CODEC_YUV_PLANAR_410, VLC_CODEC_Y211,
+    VLC_CODEC_I411, VLC_CODEC_I410, VLC_CODEC_Y211,
     VLC_CODEC_YUV_PLANAR_420_16,
     VLC_CODEC_YUV_SEMIPLANAR_420_16,
     VLC_CODEC_YUV_PLANAR_422_16,
@@ -653,7 +650,6 @@ bool vlc_fourcc_AreUVPlanesSwapped( vlc_fourcc_t a, vlc_fourcc_t b )
 {
     static const vlc_fourcc_t pp_swapped[][4] = {
         { VLC_CODEC_YV12, VLC_CODEC_I420, 0 },
-        { VLC_CODEC_YV9,  VLC_CODEC_I410, 0 },
         { 0 }
     };
 
@@ -721,7 +717,6 @@ bool vlc_fourcc_IsYUV(vlc_fourcc_t fcc)
 static const vlc_chroma_description_t p_list_chroma_description[] = {
     { VLC_CODEC_I411,                  PLANAR_8(3, 4, 1) },
     { VLC_CODEC_I410,                  PLANAR_8(3, 4, 4) },
-    { VLC_CODEC_YV9,                   PLANAR_8(3, 4, 4) },
     { VLC_CODEC_I420,                  PLANAR_8(3, 2, 2) },
     { VLC_CODEC_YV12,                  PLANAR_8(3, 2, 2) },
     { VLC_CODEC_NV12,                  SEMIPLANAR(2, 2, 1, 8) },


=====================================
src/misc/fourcc_list.h
=====================================
@@ -761,8 +761,6 @@ static const staticentry_t p_list_video[] = {
     B(VLC_CODEC_YV12, "Planar 4:2:0 YVU"),
         A("YV12"),
         A("yv12"),
-    B(VLC_CODEC_YV9,  "Planar 4:1:0 YVU"),
-        A("YVU9"),
     B(VLC_CODEC_I410, "Planar 4:1:0 YUV"),
         A("I410"),
     B(VLC_CODEC_I411, "Planar 4:1:1 YUV"),



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ab60b7cf0482e8e50cf85ec88c91aff22c30fb76...97d2bd1cf51bbcee1b75ac2b49cf351450d61d93

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ab60b7cf0482e8e50cf85ec88c91aff22c30fb76...97d2bd1cf51bbcee1b75ac2b49cf351450d61d93
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