Commit 5678b8eb authored by vaclav's avatar vaclav
Browse files

- revert: Merge branch 'main' into 22-terminology-for-the-number-of-channels

- merge with main
parent 4fa66a37
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -793,14 +793,11 @@ enum fea_names
#define MAX_MDCT_ITD_BRATE                      IVAS_64k

#define SNS_LOW_BR_MODE                         -1
#ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE
#define SNS_NPTS                                16 /* Number of downsampled SNS parameters */

#define MDCT_ST_PLC_FADEOUT_MIN_NOISE_NRG       0.001f
#ifdef FADE_TO_ZERO_FOR_TOO_LONG_FRAMELOSS
#define MDCT_ST_PLC_FADEOUT_MAX_CONC_FRAME      2 * FRAMES_PER_SEC
#define MDCT_ST_PLC_FADEOUT_TO_ZERO_LEN         20
#endif

typedef enum {
    EQUAL_CORES,
@@ -812,7 +809,6 @@ typedef enum {
    ON_FIRST_LOST_FRAME,
    ON_FIRST_GOOD_FRAME,
} TONALMDCTCONC_NOISE_SHAPE_WHITENING_MODE;
#endif


/*----------------------------------------------------------------------------------*
@@ -911,6 +907,9 @@ typedef enum
{
    DIRAC_OPEN,                                 /* initialize to default value              */
    DIRAC_RECONFIGURE                           /* HOA3                                     */
#ifdef SBA_BITRATE_SWITCHING // VE2FhG: TBV - just dirty patch for the moment
   ,DIRAC_RECONFIGURE_MODE                      /* HOA3                                     */
#endif
} DIRAC_CONFIG_FLAG;


+1 −1
Original line number Diff line number Diff line
@@ -267,7 +267,7 @@ void ivas_cov_smooth_process(
#ifdef SBA_SPAR_HARM
    ivas_compute_smooth_cov( hCovState, pFb, cov_real, hCovState->pPrior_cov_real, 1e-20f, start_band, end_band, nchan, transient_det );
#else
    ivas_compute_smooth_cov( hCovState, pFb, pIn_buf->cov_real, hCovState->pPrior_cov_real, 1e-20f, start_band, end_band, nchan, transient_det );
    ivas_compute_smooth_cov( hCovState, pIn_buf, pFb, pIn_buf->cov_real, hCovState->pPrior_cov_real, 1e-20f, start_band, end_band );
#endif

    for ( i = 0; i < nchan; i++ )
+10 −16
Original line number Diff line number Diff line
@@ -1985,9 +1985,7 @@ void decoder_tcx_invQ(

void decoder_tcx_noisefilling(
    Decoder_State *st,                                          /* i/o: coder memory state                      */
#ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE
    float concealment_noise[L_FRAME48k],
#endif
    const float A[],                                            /* i  : coefficients NxAz[M+1]                  */
    const int16_t L_frameTCX_glob,
    const int16_t L_spec,
@@ -2000,9 +1998,7 @@ void decoder_tcx_noisefilling(
    const int16_t *prm_sqQ,
    int16_t nf_seed,
    const int16_t bfi,                                          /* i  : Bad frame indicator                     */
#ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE
    const int16_t isMCT,
#endif
    const int16_t frame_cnt                                     /* i  : frame counter in the super frame        */
);

@@ -2085,12 +2081,8 @@ void decoder_tcx_IGF_stereo(
    const int16_t L_frame,                                      /* i  : frame length                            */
    const int16_t left_rect,                                    /* i  : left part is rectangular                */
    const int16_t k,                                            /* i  : Subframe index                          */
#ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE
    const int16_t bfi,                                          /* i  : bad frame indicator                     */
    const int16_t is_mct                                        /* i  : flag to signal MCT or SMDCT                         */
#else
    const int16_t bfi                                           /* i  : bad frame indicator                     */
#endif
);

void ms_processing(
@@ -2123,12 +2115,8 @@ void IGFDecApplyStereo(
    const int16_t igfGridIdx,                                   /* i  : in case of CELP->TCX switching, use 1.25 framelength */
    const int16_t *coreMsMask,
    const int16_t restrict_hopsize,
#ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE
    const int16_t bfi,                                          /* i  : frame loss == 1, frame good == 0        */
    const int16_t bfi_apply_damping                                  /* i  : decoder element mode                    */
#else
    const int16_t bfi                                           /* i  : frame loss == 1, frame good == 0        */
#endif
);

void IGFEncStereoEncoder(
@@ -3113,7 +3101,7 @@ void ivas_sba_getTCs(
);

ivas_error ivas_sba_linear_renderer(
    float output_f[][L_FRAME48k],                               /* i/o: synthesized core-coder transport channels/DirAC output  */
    float output[][L_FRAME48k],                                 /* i/o: synthesized core-coder transport channels/DirAC output  */
    const int16_t output_frame,                                 /* i  : output frame length per channel                         */
    const int16_t nchan_inp,                                    /* i  : number of input ambisonics channels                     */
    const AUDIO_CONFIG output_config,                           /* i  : output audio configuration                              */
@@ -3907,6 +3895,14 @@ void ivas_spar_md_enc_close(
    ivas_spar_md_enc_state_t **hMdEnc                           /* i/o: SPAR MD encoder handle                  */
);

#ifdef SBA_BITRATE_SWITCHING
ivas_error ivas_spar_md_enc_init(
    ivas_spar_md_enc_state_t *hMdEnc,                           /* o  : MD encoder handle                       */
    const ENCODER_CONFIG_HANDLE hEncoderConfig,                 /* i  : configuration structure                 */
    const int16_t sba_order                                     /* i  : Ambisonic (SBA) order                   */
);
#endif

ivas_error ivas_spar_md_enc_process(
    ivas_spar_md_enc_state_t *hMdEnc,                           /* i/o: SPAR MD encoder handle                  */
    const ENCODER_CONFIG_HANDLE hEncoderConfig,                 /* i  : configuration structure                 */
@@ -3999,7 +3995,7 @@ void ivas_spar_get_parameters(
    const int16_t nchan_out,                                    /* i  : number of channels out                  */
    const int16_t nchan_inp,                                    /* i  : number of channels in                   */
    const int16_t num_spar_bands,                               /* i  : number of SPAR bands                    */
    float par_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH][IVAS_MAX_NUM_BANDS]   /* o  : mixing matrix               */
    float mixer_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH][IVAS_MAX_NUM_BANDS] /* o  : mixing matrix               */
);

ivas_error ivas_spar_md_dec_init(
@@ -5490,7 +5486,6 @@ ivas_error ivas_orient_trk_GetTrackedOrientation(
    float *roll 
);

#ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE
void TonalMdctConceal_create_concealment_noise(
    float concealment_noise[L_FRAME48k],
    CPE_DEC_HANDLE hCPE,
@@ -5514,7 +5509,6 @@ int16_t get_igf_startline(
    int16_t L_frame,
    int16_t L_frameTCX
);
#endif

float rand_triangular_signed(
    int16_t *seed );
+0 −4
Original line number Diff line number Diff line
@@ -37,15 +37,12 @@
#include "ivas_prot.h"
#include "rom_com.h"
#include <math.h>
#ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE
#include <assert.h>
#endif
#ifdef DEBUGGING
#include "debug.h"
#endif
#include "wmops.h"

#ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE

/*-------------------------------------------------------------------
 * sns_compute_scf()
@@ -212,7 +209,6 @@ void sns_compute_scf(

    return;
}
#endif

/*-------------------------------------------------------------------
 * sns_interpolate_scalefactors()
+0 −3
Original line number Diff line number Diff line
@@ -68,9 +68,6 @@ static void SpectrumWeighting_Init(
 *  initialize a PsychoacousticParameters structure
 *-------------------------------------------------------------------*/

#ifndef MDCT_STEREO_PLC_FADE_2_BG_NOISE
static
#endif
    ivas_error
    PsychoacousticParameters_Init(
        const int32_t sr_core,  /* i  : sampling rate of core-coder                                     */
Loading