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

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed Aug 2 12:54:10 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
4bdb9c1b by Steve Lhomme at 2023-08-02T12:40:54+00: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

- - - - -


1 changed file:

- modules/packetizer/av1_obu.c


Changes:

=====================================
modules/packetizer/av1_obu.c
=====================================
@@ -167,13 +167,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/4bdb9c1b3681e58678c67c063c519feb2e607c9a

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