[vlc-commits] [Git][videolan/vlc][3.0.x] packetizer: av1: fix bogus detection of monochrome

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Aug 3 13:40:58 UTC 2023



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


Commits:
6cc298d7 by Steve Lhomme at 2023-08-02T14:55:35+02:00
packetizer: av1: fix bogus detection of monochrome

Match the algorithm from the specs of [1]

[1] https://aomediacodec.github.io/av1-spec/#color-config-syntax

(cherry picked from commit 4bdb9c1b3681e58678c67c063c519feb2e607c9a)
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

- - - - -


1 changed file:

- modules/packetizer/av1_obu.c


Changes:

=====================================
modules/packetizer/av1_obu.c
=====================================
@@ -171,13 +171,10 @@ static bool av1_parse_color_config(bs_t *p_bs,
                                    obu_u3_t seq_profile)
 {
     p_cc->high_bitdepth = bs_read1(p_bs);
-    if(seq_profile <= 2)
-    {
-        if(p_cc->high_bitdepth)
-            p_cc->twelve_bit = bs_read1(p_bs);
-        if(seq_profile != 1)
-            p_cc->mono_chrome = bs_read1(p_bs);
-    }
+    if (seq_profile == 2 && p_cc->high_bitdepth)
+        p_cc->twelve_bit = bs_read1(p_bs);
+    if (seq_profile != 1)
+        p_cc->mono_chrome = bs_read1(p_bs);
     const uint8_t BitDepth = p_cc->twelve_bit ? 12 : ((p_cc->high_bitdepth) ? 10 : 8);
 
     p_cc->color_description_present_flag = bs_read1(p_bs);



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/6cc298d7d4d7f4eb05bafb0d0e71c24b18de1a5a

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/6cc298d7d4d7f4eb05bafb0d0e71c24b18de1a5a
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