Commit c58b3629 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch '1265-counter-overflow-in-ISM-metadata-BASOP' into 'main'

[non-BE] Resolve "Counter overflow in  ivas_ism_metadata_enc_fx()" in BASOP

Closes #1265

See merge request !1092
parents e0e8c831 55f6bbc5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -140,6 +140,7 @@
#define FIX_ISSUE_1230                          /* Ittiam: Fix for issue 1230: Basop Enc audible differences and distortion @16kbps */
#define NONBE_1211_DTX_BR_SWITCHING             /* VA: port float issue 1211: fix crash in MASA DTX bitrate switching */
#define FIX_1189_GSC_IVAS_OMASA                 /* VA: Fix for issue 1189: Bitstream desynchornization due to reading/writing of the GSC_IVAS_mode parameter */
#define NONBE_1273_ISM_METADATA_COUNTER         /* VA: BASOP issue 1265, FLP issue 1273: fix counter overflow in ISM metadata encoder */
#define FIX_1101_IVAS_SPAR_DEC_UPMIXER_SF       /* FhG: fix for issue 1101: complexity of spar dec upmixer */
/* Note: each compile switch (FIX_1101_...) is independent from the other ones */
#define FIX_1101_IVAS_SPAR_DEC_UPMIXER_SF_USE_MADD_ADD_WEIGHTS  /* FhG: Defines 1.0f-weight variables, uses Madd operation instead of L_add_sat */
+12 −1
Original line number Diff line number Diff line
@@ -317,7 +317,10 @@ ivas_error ivas_ism_metadata_enc_fx(
                        }
                        ELSE IF( EQ_16( 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;
                            move16();
#endif
                            lowrate_metadata_flag[ch] = 1;
                            move16();
                            hIsmMeta[ch]->position_angle.angle1_diff_cnt = ISM_FEC_MAX;
@@ -639,6 +642,10 @@ ivas_error ivas_ism_metadata_enc_fx(
                {
                    hIsmMeta[ch]->ism_md_fec_cnt_enc = add( hIsmMeta[ch]->ism_md_fec_cnt_enc, 1 );
                    move16();
#ifdef NONBE_1273_ISM_METADATA_COUNTER
                    hIsmMeta[ch]->ism_md_fec_cnt_enc = s_min( hIsmMeta[ch]->ism_md_fec_cnt_enc, ISM_MD_FEC_CNT_MAX );
                    move16();
#endif
                }
                ELSE
                {
@@ -806,6 +813,10 @@ ivas_error ivas_ism_metadata_enc_fx(
        {
            hIsmMeta[ch]->ism_md_fec_cnt_enc = add( hIsmMeta[ch]->ism_md_fec_cnt_enc, 1 );
            move16();
#ifdef NONBE_1273_ISM_METADATA_COUNTER
            hIsmMeta[ch]->ism_md_fec_cnt_enc = s_min( hIsmMeta[ch]->ism_md_fec_cnt_enc, ISM_MD_FEC_CNT_MAX );
            move16();
#endif
        }
        ELSE
        {