Unverified Commit 1da7223f authored by norvell's avatar norvell
Browse files

Merge with main

parents 697d1d32 14d2c1c7
Loading
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -1939,9 +1939,13 @@ static ivas_error initOnFirstGoodFrame(
        if ( arg.rtpOutSR && srRtp != NULL )
        {
            FILE *fParamsSR = NULL;
            char srParamsFile[FILENAME_MAX], *ext = ".sr.txt";
            strncpy( srParamsFile, arg.outputWavFilename, FILENAME_MAX - sizeof( ext ) );
            strncat( srParamsFile, ext, sizeof( ext ) + 1 );
            char srParamsFile[FILENAME_MAX];
            const char *ext = ".sr.txt";

            strncpy( srParamsFile, arg.outputWavFilename, FILENAME_MAX - strlen( ext ) - 1 );
            srParamsFile[FILENAME_MAX - strlen( ext ) - 1] = '\0';
            strncat( srParamsFile, ext, strlen( ext ) );
            srParamsFile[FILENAME_MAX - 1] = '\0';

            /* Write the Split Rendering Params passed from SDP to srParamsFile */
            fParamsSR = fopen( srParamsFile, "w" );
+6 −18
Original line number Diff line number Diff line
@@ -259,37 +259,19 @@ uint32_t ivas_syn_output(
    int16_t *synth_out                                          /* o  : integer 16 bits synthesis signal        */
);

#ifdef FIX_BASOP_2396_CONSTANT_STRIDE_IN_TC_BUFFER
void ivas_buffer_interleaved_to_deinterleaved(
    float *audio_in,                                            /* i  : interleaved audio buffer                                 */
    float *audio_out[],                                         /* o  : pointers to each channel of deinterleaved audio buffer   */
    const int16_t n_channels,                                   /* i  : number of channels                                       */
    const int16_t frame_length                                  /* i  : frame length (one channel)                               */
);
#else
void ivas_buffer_interleaved_to_deinterleaved(
    float *audio,                                               /* i/o: audio buffer                            */
    const int16_t n_channels,                                   /* i  : number of channels                      */
    const int16_t frame_length,                                 /* i  : frame length (one channel)              */
    const int16_t n_samp_full                                   /* i  : full frame length (one channel)         */
);
#endif

#ifdef FIX_BASOP_2396_CONSTANT_STRIDE_IN_TC_BUFFER
void ivas_buffer_deinterleaved_to_interleaved(
    float *audio_in[],                                          /* i  : pointers to each channel of deinterleaved audio buffer  */
    float *audio_out,                                           /* o  : interleaved audio buffer                                */
    const int16_t n_channels,                                   /* i  : number of channels                                      */
    const int16_t frame_length                                  /* i  : frame length (one channel)                              */
);
#else
void ivas_buffer_deinterleaved_to_interleaved(
    float *audio[],                                             /* i  : deinterleaved audio buffer              */
    const int16_t n_channels,                                   /* i  : number of channels                      */
    const int16_t frame_length,                                 /* i  : frame length (one channel)              */
    float *audio_out                                            /* o  : interleaved audio buffer                */
);
#endif

void ivas_initialize_handles_enc(
    Encoder_Struct *st_ivas                                     /* i/o: IVAS encoder structure                  */
@@ -1127,11 +1109,17 @@ ivas_error ivas_param_ism_dec_open(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                      */
);

#ifdef FIX_FLOAT_1526_DIRAC_MEM_LEAK
void ivas_param_ism_dec_close(
    PARAM_ISM_DEC_HANDLE *hParamIsmDec                          /* i/o: decoder ParamISM handle                     */
);
#else
void ivas_param_ism_dec_close(
    PARAM_ISM_DEC_HANDLE *hParamIsmDec,                         /* i/o: decoder ParamISM handle                     */
    SPAT_PARAM_REND_COMMON_DATA_HANDLE *hSpatParamRendCom_out,  /* i/o: common spatial renderer data                */
    const AUDIO_CONFIG output_config                            /* i  : output audio configuration                  */
);
#endif

void ivas_ism_dec_digest_tc(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                      */
+0 −58
Original line number Diff line number Diff line
@@ -155,7 +155,6 @@ uint32_t ivas_syn_output(
 * Convert an interleaved buffer of audio channels to deinterleaved one
 *-------------------------------------------------------------------*/

#ifdef FIX_BASOP_2396_CONSTANT_STRIDE_IN_TC_BUFFER
void ivas_buffer_interleaved_to_deinterleaved(
    float *audio_in,           /* i  : interleaved audio buffer                                 */
    float *audio_out[],        /* o  : pointers to each channel of deinterleaved audio buffer   */
@@ -184,35 +183,6 @@ void ivas_buffer_interleaved_to_deinterleaved(

    return;
}
#else
void ivas_buffer_interleaved_to_deinterleaved(
    float *audio,               /* i/o: audio buffer                    */
    const int16_t n_channels,   /* i  : number of channels              */
    const int16_t frame_length, /* i  : frame length (one channel)      */
    const int16_t n_samp_full   /* i  : full frame length (one channel) */
)
{
    int16_t offset, ch, m;
    float buffer[MAX_TRANSPORT_CHANNELS][MAX_JBM_L_FRAME48k];

    for ( ch = 0; ch < n_channels; ch++ )
    {
        for ( m = 0; m < frame_length; m++ )
        {
            buffer[ch][m] = audio[m * n_channels + ch];
        }
    }

    offset = 0;
    for ( ch = 0; ch < n_channels; ch++ )
    {
        mvr2r( buffer[ch], audio + offset, frame_length );
        offset += n_samp_full;
    }

    return;
}
#endif

/*-------------------------------------------------------------------*
 * ivas_buffer_deinterleaved_to_interleaved()
@@ -220,7 +190,6 @@ void ivas_buffer_interleaved_to_deinterleaved(
 * Convert a deinterleaved buffer of audio channels to interleaved one
 *-------------------------------------------------------------------*/

#ifdef FIX_BASOP_2396_CONSTANT_STRIDE_IN_TC_BUFFER
void ivas_buffer_deinterleaved_to_interleaved(
    float *audio_in[],         /* i  : pointers to each channel of deinterleaved audio buffer  */
    float *audio_out,          /* o  : interleaved audio buffer                                */
@@ -249,33 +218,6 @@ void ivas_buffer_deinterleaved_to_interleaved(

    return;
}
#else
void ivas_buffer_deinterleaved_to_interleaved(
    float *audio[],             /* i/o: deinterleaved audio buffer      */
    const int16_t n_channels,   /* i  : number of channels              */
    const int16_t frame_length, /* i  : frame length (one channel)      */
    float *audio_out            /* o  : interleaved audio buffer        */
)
{
    int16_t ch, m;
    float buffer[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS][L_FRAME48k]; /* temp buffer needed when "*audio[]" and "*audio_out[]" are the same */

    for ( ch = 0; ch < n_channels; ch++ )
    {
        mvr2r( audio[ch], buffer[ch], frame_length );
    }

    for ( ch = 0; ch < n_channels; ch++ )
    {
        for ( m = 0; m < frame_length; m++ )
        {
            audio_out[m * n_channels + ch] = buffer[ch][m];
        }
    }

    return;
}
#endif


/*-------------------------------------------------------------------*
+4 −6
Original line number Diff line number Diff line
@@ -98,7 +98,6 @@
/*#define DEBUG_STEREO_DFT_OUTRESPRED*/         /* output residual prediction signal instead of L/R*/

/*DirAC Debug switches*/
/*#define DEBUG_DISABLE_DIRAC_DELAY_COMP */     /* temporarily disable delay compensation on DirAC encoder */
/*#define DEBUG_BS_READ_WRITE*/
/*#define DEBUG_MODE_DIRAC_NOCORE*/
/*#define DEBUG_MODE_QMETADATA*/                /* output q_metadata parameters */
@@ -163,16 +162,15 @@
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define FIX_2235_TD_RENDERER_WORD16                     /* Eri: For float: small synch with BASOP, removing unnecessary abs. BASOP: Use Word16 in TD renderer without converting to Word32 */
#define FIX_2371_REMOVE_UNUSED_ISAR_FCNS                /* Dolby: basop issue 2371: remove unused ISAR-related functions */      
#define FIX_FLOAT_1522_LTV_MSAN_QMETADATA_ENC_EC3       /* Nokia: float issue 1522: fix uninit MSAN in EC3 of qmetadata encoding */
#define FIX_FLOAT_1526_DIRAC_MEM_LEAK                   /* FhG: potential memory leak in DirAC handles in case of format switching */
#define ALIGN_ACELP_CORE                                /* VA: align ACELP core functions with BASOP */

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

/* #################### Start NON-BE switches ############################ */
/* any switch which is non-be wrt. TS 26.258 V3.0 */
#define FIX_1465_SWB_TBE_RANDOM_VECTOR_CREATION         /* Dolby: issue 1465: Fix constant in create_random_vector() to allow more reliable fixed point port */
#define FIX_BASOP_2317_UNINIT_VALUE_IN_STEREO_CNG       /* Eri: Basop issue 2317: Uninitialized value read in case of DTX and BW switching   */
#define FIX_1283_STEREO_DFT_COLLAPSE                    /* FhG: issue 1283: fix for critical issue with DFT stereo core coder */
#define FIX_BASOP_2396_CONSTANT_STRIDE_IN_TC_BUFFER     /* FhG/VA: basop issue 2396: keep TC channel pointers in one constant place during decoding and rendering */

/* ##################### End NON-BE switches ########################### */

/* ################## End MAINTENANCE switches ######################### */
+16 −14
Original line number Diff line number Diff line
@@ -2336,7 +2336,9 @@ void MDCT_classifier_reset(
ivas_error acelp_core_enc(
    Encoder_State *st, /* i/o: encoder state structure                 */
    const float inp[], /* i  : input signal of the current frame       */
#ifndef ALIGN_ACELP_CORE
    const float ener, /* i  : residual energy from Levinson-Durbin    */
#endif
    float A[NB_SUBFR16k * ( M + 1 )],    /* i  : A(z) unquantized for the 4 subframes    */
    float Aw[NB_SUBFR16k * ( M + 1 )],   /* i  : weighted A(z) unquant. for subframes    */
    const float epsP[M + 1],             /* i  : LP prediction errors                    */
@@ -2685,9 +2687,7 @@ void GenShapedWBExcitation(
    float *mem_genSHBexc_filt_down3, /* i/o: memory                                 */
    float *state_lpc_syn,            /* i/o: memory                                 */
    const int16_t coder_type,        /* i  : coding type                            */
#ifdef FIX_1465_SWB_TBE_RANDOM_VECTOR_CREATION
    const int16_t element_mode,      /* i  : element mode                           */
#endif
    const float *bwe_exc_extended,   /* i  : bandwidth extended exciatation         */
    int16_t bwe_seed[],              /* i/o: random number generator seed           */
    const float voice_factors[],     /* i  : voicing factor                         */
@@ -3031,7 +3031,9 @@ void CNG_enc(
    Encoder_State *st,   /* i/o: State structure                                     */
    float Aq[],          /* o  : LP coefficients                                     */
    const float *speech, /* i  : pointer to current frame input speech buffer        */
#ifndef ALIGN_ACELP_CORE
    float enr, /* i  : frame energy output from Levinson recursion         */
#endif
    const float *lsp_mid,   /* i  : mid frame LSPs                                      */
    float *lsp_new,         /* i/o: current frame LSPs                                  */
    float *lsf_new,         /* i/o: current frame LSFs                                  */
Loading