Commit e0eac6c4 authored by advasila's avatar advasila
Browse files

unify switches for issue 913

parent 044ac21b
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -169,8 +169,8 @@
#define NONBE_FIX_874_OMASA_BRSW_2TD                          /* Nokia: issue 874: Fixes the crashes with the long test vectors that prompted switching to TD*/
#define NONBE_FIX_871_ACELP_CRASH_IN_OSBA                     /* FhG: isse 871: crash in ACELP core encoder with OSBA */

#define NONBE_FIX_913_OMASA_BITBUDGET_VIOLATION               /* VA: issue 913: Resolve "Crash in OMASA encoder - DFT-Stereo bit-budget violated" */
#define NONBE_FIX_913_OMASA_BITBUDGET_VIOLATION_ALT           /* Nokia: issue 913: Alternative complementary colution to crash */
#define NONBE_FIX_913_OMASA_BITBUDGET_VIOLATION               /* VA/Nok: issue 913: Resolve "Crash in OMASA encoder - DFT-Stereo bit-budget violated" */


#define NONBE_FIX_906_SBA_LBR_SMOOTHING                       /* FhG: issue #906: fix SBA low bit rate smoothing for HOA2/HOA3 output */
#define NONBE_FIX_878_RS_FEC_STEREO_CNG                       /* Eri: Frame loss and Unified Stereo CNG may cause false BER detection which results in corrupt bitstream decoding */
+0 −7
Original line number Diff line number Diff line
@@ -264,19 +264,12 @@ ivas_error ivas_cpe_dec(
                if ( st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT )
                {
                    nb_bits -= nb_bits_metadata;
#ifdef NONBE_FIX_913_OMASA_BITBUDGET_VIOLATION_ALT
                    if ( hCPE->brate_surplus < 0 )
                    {
#endif
                        nb_bits += (int16_t) ( hCPE->brate_surplus / FRAMES_PER_SEC );
#ifdef NONBE_FIX_913_OMASA_BITBUDGET_VIOLATION_ALT
                    }
#else
                    nb_bits = min( nb_bits, 800 - 32 );
#endif
                }
#endif

                stereo_dft_dec_read_BS( ivas_total_brate, hCPE->element_brate, &sts[0]->total_brate, sts[1], hCPE->hStereoDft, sts[0]->bwidth, output_frame, res_buf, &nb_bits, hCPE->hStereoCng->coh, st_ivas->ivas_format );
            }

+2 −7
Original line number Diff line number Diff line
@@ -656,20 +656,15 @@ ivas_error ivas_cpe_enc(
            if ( ivas_format == MASA_FORMAT || ivas_format == MASA_ISM_FORMAT )
            {
                max_bits -= nb_bits_metadata;
#ifdef NONBE_FIX_913_OMASA_BITBUDGET_VIOLATION_ALT
#ifdef NONBE_FIX_913_OMASA_BITBUDGET_VIOLATION
                if ( hCPE->brate_surplus < 0 )
                {
#endif
                    max_bits += (int16_t) ( hCPE->brate_surplus / FRAMES_PER_SEC );
#ifdef NONBE_FIX_913_OMASA_BITBUDGET_VIOLATION_ALT
                }
#else
#ifdef NONBE_FIX_913_OMASA_BITBUDGET_VIOLATION
                max_bits = min( max_bits, 800 - 32 );
#endif
                }
#endif
            }

            stereo_dft_enc_res( hCPE->hStereoDft, old_inp_12k8[1] + L_INP_MEM - STEREO_DFT_OVL_8k, hCPE->hMetaData, &nb_bits, max_bits );
        }