Browse Source

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 4bdb9c1b36)
Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
cherry-pick-c5513cf9
Steve Lhomme 3 years ago
parent
commit
6cc298d7d4
  1. 11
      modules/packetizer/av1_obu.c

11
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);

Loading…
Cancel
Save