[vlc-commits] [Git][videolan/vlc][master] 2 commits: video_chroma: chain: favor RGB output for 4:4:4 YUV conversion

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Fri May 12 16:00:17 UTC 2023



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
c75feec3 by Steve Lhomme at 2023-05-12T15:13:04+00:00
video_chroma: chain: favor RGB output for 4:4:4 YUV conversion

We don't want to lose the extra chroma information if possible.

- - - - -
e2d4c69d by Steve Lhomme at 2023-05-12T15:13:04+00:00
avcodec: map VLC_CODEC_RGBA10 to AV_PIX_FMT_X2BGR10

This is a RGB format with 10 bits per color.

- - - - -


2 changed files:

- modules/codec/avcodec/chroma.c
- modules/video_chroma/chain.c


Changes:

=====================================
modules/codec/avcodec/chroma.c
=====================================
@@ -163,6 +163,10 @@ static const struct
     {VLC_CODEC_RGBA64, AV_PIX_FMT_RGBA64LE, 0, 0, 0 },
 #endif /* !WORDS_BIGENDIAN */
 
+#ifdef AV_PIX_FMT_X2BGR10
+    {VLC_CODEC_RGBA10, AV_PIX_FMT_X2BGR10, 0, 0, 0 },
+#endif
+
     {VLC_CODEC_RGBA, AV_PIX_FMT_RGBA, 0, 0, 0 },
     {VLC_CODEC_ARGB, AV_PIX_FMT_ARGB, 0, 0, 0 },
     {VLC_CODEC_BGRA, AV_PIX_FMT_BGRA, 0, 0, 0 },


=====================================
modules/video_chroma/chain.c
=====================================
@@ -91,6 +91,23 @@ static const vlc_fourcc_t pi_allowed_chromas_yuv10[] = {
     0
 };
 
+static const vlc_fourcc_t pi_allowed_chromas_yuv444[] = {
+    VLC_CODEC_RGBA,
+    VLC_CODEC_BGRA,
+    VLC_CODEC_I422,
+    VLC_CODEC_I420,
+    0
+};
+
+static const vlc_fourcc_t pi_allowed_chromas_yuv444_10[] = {
+    VLC_CODEC_RGBA10,
+    VLC_CODEC_RGBA64,
+    ALLOWED_CHROMAS_YUV10,
+    VLC_CODEC_I422,
+    VLC_CODEC_I420,
+    0
+};
+
 static const vlc_fourcc_t *get_allowed_chromas( filter_t *p_filter )
 {
     switch (p_filter->fmt_out.video.i_chroma)
@@ -103,6 +120,12 @@ static const vlc_fourcc_t *get_allowed_chromas( filter_t *p_filter )
         case VLC_CODEC_D3D11_OPAQUE_10B:
         case VLC_CODEC_VAAPI_420_10BPP:
             return pi_allowed_chromas_yuv10;
+        case VLC_CODEC_I444:
+            return pi_allowed_chromas_yuv444;
+        case VLC_CODEC_I444_10L:
+        case VLC_CODEC_I444_12L:
+        case VLC_CODEC_I444_16L:
+            return pi_allowed_chromas_yuv444_10;
         default:
             return pi_allowed_chromas_yuv;
     }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/44c3da73667169e04e4c8a01fc27bee589caf6d7...e2d4c69d79ed8f19b4bdd9cee7ed8227400842d3

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/44c3da73667169e04e4c8a01fc27bee589caf6d7...e2d4c69d79ed8f19b4bdd9cee7ed8227400842d3
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