Commit a71c712a authored by vaclav's avatar vaclav
Browse files

Merge branch 'main' into COVARIANCE_MEMORY_OPT

parents 3596358e fec0cc86
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -62,9 +62,6 @@ def collect_for_sanitizer_test(file):
    )
    files_to_archive = find_failed_files_for_sanitizer_test(console_log, "logs")

    print("files_to_archive_noPLC:", files_to_archive_noPLC)
    print("files_to_archive:", files_to_archive)

    log_folder = pathlib.Path("./LOGS_PLC")
    log_folder.mkdir()
    for test in files_to_archive.keys():
+9 −1
Original line number Diff line number Diff line
@@ -1950,6 +1950,14 @@ ivas_error preview_indices(
            /* read number of objects from the bitstream */
            st_ivas->nchan_transport = 1;

#ifdef FIX_ISM_DECODER_PRINTOUT
            k = (int16_t) ( ( total_brate / FRAMES_PER_SEC ) - 1 );
            while ( bit_stream[k] == 1 && st_ivas->nchan_transport < MAX_NUM_OBJECTS )
            {
                st_ivas->nchan_transport++;
                k--;
            }
#else
            if ( total_brate != SID_2k40 && total_brate != FRAME_NO_DATA )
            {
                k = (int16_t) ( ( total_brate / FRAMES_PER_SEC ) - 1 );
@@ -1959,7 +1967,7 @@ ivas_error preview_indices(
                    k--;
                }
            }

#endif
            st_ivas->transport_config = AUDIO_CONFIG_EXTERNAL + st_ivas->nchan_transport;

            st_ivas->ism_mode = ivas_ism_mode_select( st_ivas->nchan_transport, total_brate );
+9 −0
Original line number Diff line number Diff line
@@ -469,6 +469,11 @@ enum
#define STEREO_DFT_OFFSET                       1
#define STEREO_DFT_NBDIV                        2

#ifdef FIX_ITD_CNG
#define STEREO_DFT_ITD_CNG_XFADE                100
#define STEREO_DFT_ITD_CNG_XFADE_RESET          2
#endif

#define STEREO_DFT_DELAY_DEC_BWE_NS             ( STEREO_DFT_OFFSET * STEREO_DFT_HOP_NS - ACELP_LOOK_NS ) /* 1.25ms/2.5ms: max delay for core decoder*/

#define STEREO_DFT_ENC_DFT_NB                   ( STEREO_DFT_OFFSET + 1 )                     /*frame + lookahead*/
@@ -534,6 +539,10 @@ typedef enum
#define STEREO_DFT_SID_GIPD_NBITS               2
#define STEREO_DFT_FD_FILT                      0.9f

#ifdef FIX_ITD_CNG
#define STEREO_DFT_CNG_ITD_CNT                  8
#endif

/*Residual prediction*/
#define STEREO_DFT_PAST_MAX                     4
#define STEREO_DFT_RES_PRED_BAND_MAX            12
+25 −0
Original line number Diff line number Diff line
@@ -925,6 +925,10 @@ float stereo_dft_enc_synthesize(

void stereo_dft_enc_process(
    CPE_ENC_HANDLE hCPE,                                        /* i  : CPE encoder structure               */
#ifdef FIX_ITD_CNG
    const int16_t vad_flag_dtx[],                               /* i: VAD dtx flags                         */
    const int16_t vad_hover_flag[],                             /* i: VAD hangover flags                    */
#endif
    const int16_t input_frame                                   /* i  : input frame length                  */
);

@@ -973,7 +977,11 @@ void stereo_dft_dequantize_itd(

void stereo_dft_enc_sid_calc_coh(
    STEREO_DFT_ENC_DATA_HANDLE hStereoDft,                      /* i/o: DFT stereo handle                   */
#ifdef FIX_ITD_CNG
    float prev_cohBand[2*(STEREO_DFT_BAND_MAX/2)],              /* i/o: Previous coherence                  */
#else
    float coh_crossfade[STEREO_DFT_BAND_MAX / 2],               /* i/o: Coherence crossfade memory          */
#endif
    int16_t *td_active,                                         /* i/o: TD stereo mode indicator            */
    int16_t *first_SID,                                         /* i/o: First SID indicator                 */
    float *cohBand                                              /* i/o: Coherence per band                  */
@@ -1126,6 +1134,11 @@ void stereo_dft_dec_read_BS(
void stereo_dft_dec_smooth_parameters(
    STEREO_DFT_DEC_DATA_HANDLE hStereoDft,                      /* i/o: decoder DFT stereo handle           */
    const int16_t prev_sid_nodata                               /* i  : Previous SID/No data indicator      */
#ifdef FIX_ITD_CNG
    ,
    const int16_t active_frame_counter,                         /* i  : Active frame counter                */
    const int32_t element_brate                                 /* i  : Element bitrate                     */
#endif
);

void stereo_dft_generate_res_pred(
@@ -1281,6 +1294,10 @@ void stereo_dft_enc_compute_itd(
    float *DFT_R,
    const int16_t k_offset,
    const int16_t input_frame,
#ifdef FIX_ITD_CNG
    const int16_t vad_flag_dtx[],  
    const int16_t vad_hover_flag[],
#endif
    float *bin_nrgL,
    float *bin_nrgR 
);
@@ -1836,6 +1853,10 @@ void deindex_lvq_SHB(

void stereo_td_itd_mdct_stereo( 
    CPE_ENC_HANDLE hCPE,                                        /* i/o: CPE encoder handle                      */
#ifdef FIX_ITD_CNG
    const int16_t vad_flag_dtx[],                               /* i: VAD dtx flags                             */
    const int16_t vad_hover_flag[],                             /* i: VAD hangover flags                        */
#endif
    const int16_t input_frame                                   /* i  : frame length                            */
);

@@ -2395,6 +2416,10 @@ void stereo_cng_upd_counters(
    const int16_t nbands,                                       /* i  : Number of bands in active               */
    const float sidSideGain[],                                  /* i  : SID side gains                          */
    const int16_t burst_ho_count                                /* i  : Hang-over count                         */
#ifdef FIX_ITD_CNG
    ,
    int16_t *coh_fade_counter                                   /* i  : Coherence fade counter                  */
#endif
);

void stereo_cng_init_dec(
+5 −1
Original line number Diff line number Diff line
@@ -173,12 +173,16 @@
#define FIX_DTX_RANGE                                   /* Issue 118: fix the DTX usage: default DTX up to 64 kbps, otherwise only in silence */
#define FIX_ISM_METADATA_READER                         /* Issue 211: make ISM metadata file reader robust against invalid files */
#define FIX_GET_DELAY_RETURN                            /* Issue 223: change return data type in function get_delay() */
#define NTT_REDUC_COMP_POC                              /* Contribution  : Complexity reduction of phase spectrum in stereo downmix*/
#define NTT_REDUC_COMP_POC                              /* NTT Contribution 10: Complexity reduction of phase spectrum in stereo downmix*/
#define FIX_ISM_DECODER_PRINTOUT                        /* Issue 229: fix ISM decoder printout */

//#define FIX_ISM_INACTIVE_BITS                           /* fix bitbudget distribution in inactive frames in ISM format */

#define COVARIANCE_MEMORY_OPT                           /* Issue 231: define SPAR covariance buffers in stack instead of inter-frame heap */


#define FIX_ITD_CNG                                     /* Eri: Fix for CNG ITD */

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
#endif
Loading