Commit c77fc499 authored by vaclav's avatar vaclav Committed by Sandesh Venkatesh
Browse files

fix FLP issue 1273: fix counter overflow in ISM metadata encoder; under...

fix FLP issue 1273: fix counter overflow in ISM metadata encoder; under NONBE_1273_ISM_METADATA_COUNTER
parent d050fd12
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -176,6 +176,8 @@
#define NONBE_FIX_1189_GSC_IVAS_OMASA                   /* VA: Fix for issue 1189: Bitstream desynchornization due to reading/writing of the GSC_IVAS_mode parameter */
#define NONBE_FIX_1087_OOB_SBA_DTX_RS                   /* VA: issue 1087: Extend the length of the buffer for MCT decoding to avoid out-of-bound writing in SBA SID bitrate switching decoding */
#define FIX_920_IGF_INIT_ERROR                          /* FhG: issue 920: fix bitrate mismatch in initial IGF config to avoid error message in same cases */
#define NONBE_1273_ISM_METADATA_COUNTER                 /* VA: FLP issue 1273: fix counter overflow in ISM metadata encoder */

/* #################### End FIXES switches ############################ */

#define BASOP_NOGLOB                                    /* Disable global symbols in BASOPs, Overflow/Carry in BASOPs disabled, additional BASOPs in case of Overflow */
+9 −1
Original line number Diff line number Diff line
@@ -277,7 +277,9 @@ ivas_error ivas_ism_metadata_enc(
                        }
                        else if ( hIsmMeta[ch]->ism_md_fec_cnt_enc == ISM_MD_FEC_CNT_MAX )
                        {

#ifdef NONBE_1273_ISM_METADATA_COUNTER
                            hIsmMeta[ch]->ism_md_fec_cnt_enc = 0;
#endif
                            lowrate_metadata_flag[ch] = 1;

                            hIsmMeta[ch]->position_angle.angle1_diff_cnt = ISM_FEC_MAX;
@@ -555,6 +557,9 @@ ivas_error ivas_ism_metadata_enc(
                if ( hIsmMeta[ch]->ism_metadata_flag == 0 )
                {
                    hIsmMeta[ch]->ism_md_fec_cnt_enc++;
#ifdef NONBE_1273_ISM_METADATA_COUNTER
                    hIsmMeta[ch]->ism_md_fec_cnt_enc = min( hIsmMeta[ch]->ism_md_fec_cnt_enc, ISM_MD_FEC_CNT_MAX );
#endif
                }
                else
                {
@@ -699,6 +704,9 @@ ivas_error ivas_ism_metadata_enc(
        if ( hIsmMeta[ch]->ism_metadata_flag == 0 )
        {
            hIsmMeta[ch]->ism_md_fec_cnt_enc++;
#ifdef NONBE_1273_ISM_METADATA_COUNTER
            hIsmMeta[ch]->ism_md_fec_cnt_enc = min( hIsmMeta[ch]->ism_md_fec_cnt_enc, ISM_MD_FEC_CNT_MAX );
#endif
        }
        else
        {