Commit 522e904a authored by vaclav's avatar vaclav
Browse files

issue 820: Double precision arithmetic in combined formats; under FIX_819_DOUBLE_PREC_COMB_FORMATS;

parent b15a5701
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@
#define FIX_818_DOUBLE_PREC_KERNEL_SW                   /* FhG: Issue 818: Avoid double precision in kernel switching */
#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 */

#define FIX_819_DOUBLE_PREC_COMB_FORMATS                /* VA: issue 820: Double precision arithmetic in combined formats */

/* #################### End 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 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 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 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 );