Commit 1c4b1c70 authored by vaclav's avatar vaclav
Browse files

Merge branch '819-double-precision-arithmetic-in-combined-formats' into 'main'

Resolve "Double precision arithmetic in combined formats"

See merge request !1150
parents 873ff8d5 413c65ce
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -166,7 +166,6 @@
#define FIX_822_REFACTOR_BIN_REVERB_OPEN                /* Nokia: Addresses first step of issue 822 by refactoring ivas_binaural_reverb_open */
#define FIX_847_OUTPUT_PCM_BUFFER                       /* VA: issue 847: Allocate decoder output PCM buffer dynamically */


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


@@ -188,6 +187,7 @@
#define NONBE_FIX_838_CRASH_24_4_WB                           /* FhG: Issue 838: fix encoder crashes for Unified Stereo and MASA 2 TC at 24.4 kbps WB due to missing IGF (re-) allocation */
#define NONBE_FIX_839_MC_RS_CHANNEL_ALLOC                     /* FhG: Issues #839: problems with reallocation of the channels on the heap in case of MC RS */
#define BE_FIX_832_ASAN_ERROR_EFAP_OSBA                       /* FhG: issue #832: fix ASAN error caused by re-allocating EFAP memories in OSBA*/
#define NONBE_FIX_819_DOUBLE_PREC_COMB_FORMATS                /* VA: issue 820: Double precision arithmetic in combined formats */


/* ##################### End NON-BE switches ########################### */
+4 −0
Original line number Diff line number Diff line
@@ -127,7 +127,11 @@ ivas_error ivas_omasa_enc_open(

    for ( i = 0; i < MAX_NUM_OBJECTS; i++ )
    {
#ifdef NONBE_FIX_819_DOUBLE_PREC_COMB_FORMATS
        set_f( hOMasa->prev_object_dm_gains[i], INV_SQRT_2, MASA_MAX_TRANSPORT_CHANNELS );
#else
        set_f( hOMasa->prev_object_dm_gains[i], (float) sqrt( 0.5 ), MASA_MAX_TRANSPORT_CHANNELS );
#endif
    }
    set_zero( hOMasa->broadband_energy_sm, MAX_NUM_OBJECTS + MASA_MAX_TRANSPORT_CHANNELS );
    set_zero( hOMasa->broadband_energy_prev, MAX_NUM_OBJECTS + MASA_MAX_TRANSPORT_CHANNELS );
+4 −1
Original line number Diff line number Diff line
@@ -102,10 +102,13 @@ ivas_error ivas_osba_enc_open(
        return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for OMASA encoder\n" ) );
    }


    for ( i = 0; i < MAX_NUM_OBJECTS; i++ )
    {
#ifdef NONBE_FIX_819_DOUBLE_PREC_COMB_FORMATS
        set_f( hOSba->prev_object_dm_gains[i], INV_SQRT_2, MAX_INPUT_CHANNELS );
#else
        set_f( hOSba->prev_object_dm_gains[i], (float) sqrt( 0.5 ), MAX_INPUT_CHANNELS );
#endif
    }

    len = NS2SA( st_ivas->hEncoderConfig->input_Fs, IVAS_FB_ENC_DELAY_NS );
+4 −0
Original line number Diff line number Diff line
@@ -150,7 +150,11 @@ ivas_error ivas_omasa_ana_open(

    for ( i = 0; i < MAX_NUM_OBJECTS; i++ )
    {
#ifdef NONBE_FIX_819_DOUBLE_PREC_COMB_FORMATS
        set_f( hOMasa->prev_object_dm_gains[i], INV_SQRT_2, MASA_MAX_TRANSPORT_CHANNELS );
#else
        set_f( hOMasa->prev_object_dm_gains[i], (float) sqrt( 0.5 ), MASA_MAX_TRANSPORT_CHANNELS );
#endif
    }

    input_frame = (int16_t) ( input_Fs / FRAMES_PER_SEC );