Commit 0fd628a0 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'main' into fix_binary_loading_tests

parents 36bf469e 843dbdf7
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1263,6 +1263,7 @@ test-long-self-test:

    ### switch to main
    - git checkout main
    - git pull origin main
    - echo "Building reference codec at commit $(git rev-parse HEAD)"

    ### build main (ref) binaries
+9 −1
Original line number Diff line number Diff line
@@ -153,15 +153,21 @@

#define FIX_963_USAN_ERROR                              /* Eri: Issue 963: USAN error in Stereo CNG, division by zero */
#define FIX_971_LOG2_IDX_GAIN_0                         /* VA: prevent -Inf due to log2(ratio==0) */
#define FIX_966_VAR_OVERFLOW_IN_HARM_MODEL_ARI          /* FhG: fix and undef behaviour bug in the harmonic TCX model arithmetic coder */
#define FIX_ACCESS_WITHIN_NULL_STRUCT_MC_BW_SWITCHING   /* FhG: fix usan error in MCT with bw swicthing */
// #define FIX_966_VAR_OVERFLOW_IN_HARM_MODEL_ARI          /* FhG: fix and undef behaviour bug in the harmonic TCX model arithmetic coder */
#define FIX_983_DISC_ISM_DIGEST_NUM_OBJS                /* FhG: issue #983: the discrete ISM digest function uses the wrong number of objects */


#define FIX_976_USAN_PVQ_ENC_DEC_EVS_CR                      /* Ericsson:  premature cast to unsigned detected by USAN corrected  */


/* #################### End BE switches ################################## */

/* #################### Start NON-BE switches ############################ */
/* any switch which is non-be wrt selection floating point code */
/* all switches in this category should start with "NONBE_" */

#define NONBE_FIX_974_OSBA_JBM_MONO_RS_USAN                   /* FhG : issue #974: usan in mono and stereo output in OSBA JBM RS */
#define NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES             /* Philips: Use pre-computed HRTF average L/R energies and IAC in all renderers */
#define NONBE_FIX_973_HODIRAC_BAND_GROUPING                   /* FhG: issue 973: empty parameter band in DirAC */
#define NONBE_FIX_951_MCMASA_5MS_RENDERING                    /* Nokia: issue #951: Differences for 5ms and 20ms rendering for McMASA at 13.2 kbps to BINAURAL */
@@ -170,6 +176,8 @@
#define NONBE_FIX_567_DOUBLE_STEREO_DMX                       /* Orange: Double-precision replaced by single-precision */   
#define NONBE_FIX_947_STEREO_DMX_EVS_POC                      /* Orange: Fix clicks on POC */  
#define NONBE_FIX_947_STEREO_DMX_EVS_PHA                      /* Orange: Fix issues on PHA */                                                                                        
#define NONBE_FIX_986_MC_BW_SWITCHING                         /* FhG: fix crash in bw and br switching with MC */
#define NONBE_FIX_975_JBM_USAN                                /* FhG: Fix issue #975, USAN in JBM decoding ad 13.2kbps */
#define NONBE_FIX_982_OMASA_DELAY_COMP_5MS                    /* FhG : issue #982 : 5ms and 20ms output different for OMASA */
/* ##################### End NON-BE switches ########################### */

+4 −0
Original line number Diff line number Diff line
@@ -254,7 +254,11 @@ ivas_error ivas_sba_dec_reconfigure(
    }

    /* save old */
#ifdef NONBE_FIX_974_OSBA_JBM_MONO_RS_USAN
    if ( ism_mode_old != ISM_SBA_MODE_DISC && st_ivas->hTcBuffer->tc_buffer_mode != TC_BUFFER_MODE_BUFFER )
#else
    if ( ism_mode_old != ISM_SBA_MODE_DISC )
#endif
    {
        if ( st_ivas->hDirAC == NULL && st_ivas->hSpar != NULL )
        {
+12 −2
Original line number Diff line number Diff line
@@ -2333,8 +2333,18 @@ ivas_error IVAS_DEC_VoIP_FeedFrame(
        return IVAS_ERR_INVALID_BITSTREAM;
    }

#ifdef NONBE_FIX_975_JBM_USAN
    partialCopyFrameType = 0;
    partialCopyOffset = 0;

    if ( hIvasDec->mode == IVAS_DEC_MODE_EVS )
    {
#endif
        /* check if frame contains a partial copy and get its offset */
        evs_dec_previewFrame( au, auSize, &partialCopyFrameType, &partialCopyOffset );
#ifdef NONBE_FIX_975_JBM_USAN
    }
#endif

    /* create data unit for primary copy in the frame */
    dataUnit = JB4_AllocDataUnit( hIvasDec->hVoIP->hJBM );
+24 −0
Original line number Diff line number Diff line
@@ -98,6 +98,7 @@ static void pvq_decode_band(
    }

    set_s( g_part_s, -32768, Np );

    if ( Np > 1 )
    {
        decode_energies( st, hPVQ, Np, dim_part, bits_part, g_part_s, band_bits_tot, bits_left, sfmsize, strict_bits );
@@ -113,10 +114,23 @@ static void pvq_decode_band(
    for ( j = 0; j < Np; j++ )
    {
        g_part[j] = -( (float) g_part_s[j] ) / 32768;
#ifdef FIX_976_USAN_PVQ_ENC_DEC_EVS_CR
        /* note: here  g_part   needs to be become exactly  1.0(float) thus in BASOP  Word16 g_part_s is in the negative Q15 domain */
#endif


#ifdef FIX_976_USAN_PVQ_ENC_DEC_EVS_CR
        /* aligned to BASOP to avoid USAN undefined negation warning for -(-32768) */
        g_part_s[j] = negate( g_part_s[j] );
#else
        g_part_s[j] = -g_part_s[j];
#endif
    }


    srt_vec_ind( g_part_s, sg_part, idx_sort, Np );


    for ( j = 0; j < Np; j++ )
    {
        js = idx_sort[Np - 1 - j];
@@ -415,11 +429,16 @@ static void densitySymbolIndexDecode(
#undef WMC_TOOL_SKIP

    res_c = res - c;

    if ( c == 0 )
    {
        tot = res * ( res + 1 ) + 1;
        dec_freq = rc_decode( &st->BER_detect, hPVQ, tot );
#ifdef FIX_976_USAN_PVQ_ENC_DEC_EVS_CR
        alpha = (int16_t) floor_sqrt_exact( (uint32_t) ( ( res + 1 ) * ( res + 1 ) - dec_freq ) ) + res + 1;
#else
        alpha = (int16_t) floor_sqrt_exact( (uint32_t) ( res + 1 ) * ( res + 1 ) - dec_freq ) + res + 1;
#endif
        sym_freq = 2 * ( res - alpha ) + 1;
        cum_freq = alpha * ( 2 * ( res + 1 ) - alpha );
    }
@@ -437,7 +456,12 @@ static void densitySymbolIndexDecode(
        dec_freq = rc_decode( &st->BER_detect, hPVQ, tot );
        if ( dec_freq < tot - ( res + 1 ) - ( res - ( c + 1 ) ) * ( res - c ) * c + c + 1 )
        {
#ifdef FIX_976_USAN_PVQ_ENC_DEC_EVS_CR
            alpha = ( res_c - 1 + (int16_t) floor_sqrt_exact( (uint32_t) ( res_c * ( res_c + 4 * dec_freq - 2 ) + 1 ) ) ) / ( 2 * res_c );
#else
            alpha = ( res_c - 1 + (int16_t) floor_sqrt_exact( (uint32_t) res_c * ( res_c + 4 * dec_freq - 2 ) + 1 ) ) / ( 2 * res_c );
#endif

            sym_freq = 2 * alpha * res_c + 1;
            cum_freq = alpha * ( ( alpha - 1 ) * res_c + 1 );
        }
Loading