bool VvcHrdUnit::general_timing_hrd_parameters()
{
    num_units_in_tick = m_reader.getBits(32);
    time_scale = m_reader.getBits(32);
    general_nal_hrd_params_present_flag = m_reader.getBit();
    general_vcl_hrd_params_present_flag = m_reader.getBit();
    if (general_nal_hrd_params_present_flag || general_vcl_hrd_params_present_flag)
    {
        m_reader.skipBit();  // general_same_pic_timing_in_all_ols_flag
        general_du_hrd_params_present_flag = m_reader.getBit();
        if (general_du_hrd_params_present_flag)
            int tick_divisor_minus2 = m_reader.getBits(8);
        m_reader.skipBits(4);  // bit_rate_scale
        m_reader.skipBits(4);  // cpb_size_scale
        if (general_du_hrd_params_present_flag)
            m_reader.skipBits(4);  // cpb_size_du_scale
        hrd_cpb_cnt_minus1 = extractUEGolombCode();
        if (hrd_cpb_cnt_minus1 > 31)
            return 1;
    }
    return 0;
}
bool VvcHrdUnit::general_timing_hrd_parameters()
{
    num_units_in_tick = m_reader.getBits(32);
    time_scale = m_reader.getBits(32);
    general_nal_hrd_params_present_flag = m_reader.getBit();
    general_vcl_hrd_params_present_flag = m_reader.getBit();
    if (general_nal_hrd_params_present_flag || general_vcl_hrd_params_present_flag)
    {
        m_reader.skipBit();   
        general_du_hrd_params_present_flag = m_reader.getBit();
        if (general_du_hrd_params_present_flag)
            int tick_divisor_minus2 = m_reader.getBits(8);
        m_reader.skipBits(4);   
        m_reader.skipBits(4);   
        if (general_du_hrd_params_present_flag)
            m_reader.skipBits(4);   
        hrd_cpb_cnt_minus1 = extractUEGolombCode();
        if (hrd_cpb_cnt_minus1 > 31)
            return 1;
    }
    return 0;
}