Commit 2a53e4b3 authored by fotopoulou's avatar fotopoulou
Browse files

Merge branch 'main' into 575-48-kbit-s-mdct-stereo-concealment-artifact-for-transition-to-tcx5

parents e746ec9e 159805f9
Loading
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -5447,6 +5447,26 @@ void ivas_lfe_synth_with_filters(
    const int16_t lfeChannelIndex                               /* i  : LFE channel index                               */
);

#ifdef FIX_572_LFE_LPF_ENC
/*----------------------------------------------------------------------------------*
 * LFE encoder low pass filter prototypes
 *----------------------------------------------------------------------------------*/

ivas_error ivas_create_lfe_lpf_enc(
    ivas_filters_process_state_t **ph_lfe_lpf_filter_state, /* o  : IVAS LFE encoder structure   */
    const int32_t input_Fs                                  /* i  : input sampling rate          */
);

void ivas_lfe_lpf_enc_close(
    ivas_filters_process_state_t **ph_lfe_lpf_filter_state /* i/o: LFE encoder handle */
);

void ivas_lfe_lpf_enc_apply(
    ivas_filters_process_state_t *h_lfe_lpf_filter_state, /* i/o: LFE encoder handle */
    float data_lfe_ch[],       /* i  : input LFE signal                         */
    const int16_t input_frame  /* i  : input frame length per channel           */
);
#endif

/*----------------------------------------------------------------------------------*
 * LFE Coding prototypes
+3 −0
Original line number Diff line number Diff line
@@ -152,8 +152,11 @@
#define FIX_565_SBA_BURST_IN_FEC                        /* VA: Issue 565: Fix noise burst during FEC, due to wrong total_brate initialization */
#define FIX_562_ISM2_64KBPS                             /* VA: issue 562: fix ISM2 at 64kbps issue */
#define FIX_559_EXTL_IGF_MISMATCH                       /* VA: issue 559: fix mismatch between st->extl and st->igf observed as crash in PlanarSBA bitrate switching */
#define FIX_572_LFE_LPF_ENC                             /* FhG: issue 572: always apply the low pass filter to the LFE channel */

#define FIX_QMETA_SID_5k2                               /* Nokia: Issue 137: enable using full 5.2k bitrate in MASA SID */
#define FIX_578_PARAMMC_ILD_BS                          /* FhG: Issue 578: transmitt also center ILD in band 0 when LFE is active in 3TC ParamMC */
#define FIX_UNCLR_ISSUE                                 /* VoiceAge: issue 574: Fix UNCLR mis-classifications in noisy speech stereo */
#define FIX_575_LOW_OVERLAP_PLC_RECOVERY                /* FhG: Issue 575 fix for PLC and transistion to TCX5*/


+1 −5
Original line number Diff line number Diff line
@@ -422,11 +422,7 @@ ivas_error ivas_dirac_dec_config(
    }


    if ( nchan_transport_orig > 2 && hDirAC->hOutSetup.is_loudspeaker_setup && st_ivas->renderer_type == RENDERER_DIRAC
#ifdef FIX_DIRAC_LS_SYNTHESIS_CONFIG
         && !hodirac_flag
#endif
    )
    if ( nchan_transport_orig > 2 && hDirAC->hOutSetup.is_loudspeaker_setup && st_ivas->renderer_type == RENDERER_DIRAC && !hodirac_flag )
    {
        hDirAC->synthesisConf = DIRAC_SYNTHESIS_PSD_LS;
        hDirAC->panningConf = DIRAC_PANNING_VBAP;
+8 −16
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ ivas_error ivas_jbm_dec_tc(
    int16_t n, output_frame, nchan_out;
    Decoder_State *st;                                /* used for bitstream handling */
    float output[MAX_TRANSPORT_CHANNELS][L_FRAME48k]; /* 'float' buffer for transport channels, MAX_TRANSPORT_CHANNELS channels */
    int16_t nchan_remapped, hodirac_flag;
    int16_t nchan_remapped;
    float output_lfe_ch[L_FRAME48k];
    int16_t nb_bits_metadata[MAX_SCE];
    int32_t output_Fs, ivas_total_brate;
@@ -95,7 +95,6 @@ ivas_error ivas_jbm_dec_tc(
    nchan_out = st_ivas->hTcBuffer->nchan_transport_jbm;
    output_config = st_ivas->hDecoderConfig->output_config;
    ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate;
    hodirac_flag = ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order );

    output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC );

@@ -188,16 +187,10 @@ ivas_error ivas_jbm_dec_tc(
        set_s( nb_bits_metadata, 0, MAX_SCE );

        /* read parameters from the bitstream */
        if ( st_ivas->hQMetaData != NULL && st_ivas->ivas_format != SBA_FORMAT )
        if ( st_ivas->ivas_format == MASA_FORMAT && st_ivas->hQMetaData != NULL )
        {
            st = ( st_ivas->nSCE > 0 ) ? st_ivas->hSCE[0]->hCoreCoder[0] : st_ivas->hCPE[0]->hCoreCoder[0];

            if ( st_ivas->ivas_format == SBA_FORMAT )
            {
                ivas_dirac_dec_read_BS( ivas_total_brate, st, st_ivas->hDirAC, st_ivas->hQMetaData, &nb_bits_metadata[0], hodirac_flag, 0 );
            }
            else
            {
            if ( ( error = ivas_masa_decode( st_ivas, st, &nb_bits_metadata[0] ) ) != IVAS_ERR_OK )
            {
                return error;
@@ -209,7 +202,6 @@ ivas_error ivas_jbm_dec_tc(
            }
#endif
        }
        }
        else if ( st_ivas->ivas_format == SBA_FORMAT )
        {

+15 −0
Original line number Diff line number Diff line
@@ -3055,11 +3055,19 @@ static void ivas_param_mc_bs_decode_parameter_values(
    int16_t i, j, k;
    float dequant_seq[PARAM_MC_MAX_PARAMETER_BANDS * PARAM_MC_MAX_VAL_MAP_SIZE];
    float dequant_ordered[PARAM_MC_MAX_PARAMETER_BANDS * PARAM_MC_MAX_VAL_MAP_SIZE];
#ifdef FIX_578_PARAMMC_ILD_BS
    int16_t n_lfe_idx;
#endif

    range_coding = bit_buffer[( *bit_pos )++];

    /* Decoding the sequence */
#ifdef FIX_578_PARAMMC_ILD_BS
    n_lfe_idx = map_size - map_size_wo_lfe;
    sz_seq = num_param_bands * ( map_size_wo_lfe ) + num_lfe_bands * n_lfe_idx;
#else
    sz_seq = num_param_bands * ( map_size_wo_lfe ) + num_lfe_bands;
#endif

    set_s( idx, 0, PARAM_MC_MAX_PARAMETER_BANDS * PARAM_MC_MAX_VAL_MAP_SIZE );
    set_zero( dequant_ordered, PARAM_MC_MAX_PARAMETER_BANDS * PARAM_MC_MAX_VAL_MAP_SIZE );
@@ -3120,7 +3128,14 @@ static void ivas_param_mc_bs_decode_parameter_values(

    for ( i = 0; i < num_lfe_bands; i++ )
    {
#ifdef FIX_578_PARAMMC_ILD_BS
        for ( j = 0; j < n_lfe_idx; j++ )
        {
            dequant_ordered[map_size - n_lfe_idx + j + i * map_size] = dequant_seq[k++];
        }
#else
        dequant_ordered[map_size - 1 + i * map_size] = dequant_seq[k++];
#endif
    }

    if ( !( *BER_detect ) )
Loading