chromeos / cros-codecs

BSD 3-Clause "New" or "Revised" License
30 stars 11 forks source link

Possible typo in AV1 synthetizer #79

Closed Gnurou closed 5 months ago

Gnurou commented 5 months ago

The AV1 synthetizer's decoder_model_info method outputs the following:

        self.f(32, dm.buffer_removal_time_length_minus_1)?;
        self.f(32, dm.frame_presentation_time_length_minus_1)?;

However, from the AV1 parser, both buffer_removal_time_length_minus_1 and frame_presentation_time_length_minus_1 are read from 5 bits. Could this be a typo?

bgrzesik commented 5 months ago

Oh, yes. You're fully right. 5.5.4. Decoder model info syntax defines the layout. It is

decoder_model_info( ) {
    buffer_delay_length_minus_1               f(5)
    num_units_in_decoding_tick                f(32)
    buffer_removal_time_length_minus_1        f(5)
    frame_presentation_time_length_minus_1    f(5)
}

The generated bitstream has decoder_model_info_present_flag = 0 so that syntax is not generated, however this should be fixed to avoid long debugs.

Good catch! Thanks!