Commit 359125cf authored by vaclav's avatar vaclav
Browse files

Merge remote-tracking branch 'remotes/origin/main' into nokia/contribution-omasa-combined-format

parents 1ed047e3 b1b6740c
Loading
Loading
Loading
Loading
Loading
+29 −5
Original line number Diff line number Diff line
@@ -3892,7 +3892,7 @@ void calculate_hodirac_sector_parameters(
void ivas_mc_paramupmix_enc(
    Encoder_Struct *st_ivas,                                        /* i/o: IVAS Encoder handle                             */
    BSTR_ENC_HANDLE hMetaData,                                      /* i/o: IVAS Metadata bitstream handle                  */
    float data_f[][L_FRAME48k],                                     /* i/o: input: CICP6, CICP12, CICP14, CICP16 or CICP19 MC data */
    float data_f[][L_FRAME48k],                                 /* i/o: input: MC data                                  */
    const int16_t input_frame                                       /* i  : input frame length                              */
);

@@ -3969,7 +3969,7 @@ void ivas_param_mc_enc_close(
void ivas_param_mc_enc(
    Encoder_Struct *st_ivas,                                    /* i/o: IVAS Encoder handle                                 */
    BSTR_ENC_HANDLE hMetaData,                                  /* i/o: IVAS Metadata bitstream handle                      */
    float data_f[][L_FRAME48k],                                 /* i/o: input: CICP6, CICP12, CICP14, CICP16 or CICP19 MC data */
    float data_f[][L_FRAME48k],                                 /* i/o: input: MC data                                      */
    const int16_t input_frame                                   /* i  : input frame length                                  */
);

@@ -4570,9 +4570,11 @@ void ivas_get_spar_md_from_dirac(
    const int16_t active_w_vlbr
);

/*! r: number of MD subframes */
int16_t ivas_get_spar_dec_md_num_subframes(
    const int16_t sba_order,                                    /* i  : Ambisonic (SBA) order                   */
    const int32_t ivas_total_brate );
    const int32_t ivas_total_brate                              /* i  : IVAS total bitrate                      */
);

ivas_error ivas_spar_md_dec_open(
    ivas_spar_md_dec_state_t **hMdDec_out,                      /* i/o: SPAR MD decoder handle                  */
@@ -4648,7 +4650,7 @@ ivas_error ivas_spar_covar_enc_open(
    ivas_filterbank_t *pFb,                                     /* i/o: FB handle                               */
    const int32_t input_Fs,                                     /* i  : input sampling rate                     */
    const int16_t nchan_inp,                                    /* i  : number of input channels                */
    COV_SMOOTHING_TYPE smooth_mode,                    /* i : Smooth covariance for SPAR or MC*/
    const COV_SMOOTHING_TYPE smooth_mode,                       /* i  : Smooth covariance for SPAR or MC        */
	const int32_t ivas_total_brate                              /* i  : IVAS total bitrate                      */
);

@@ -5602,6 +5604,28 @@ void ivas_lfe_synth_with_filters(
);


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

ivas_error ivas_create_lfe_lpf_enc(
    ivas_filters_process_state_t **hLfeLpf,                     /* o  : LFE LPF handle                          */
    const int32_t input_Fs                                      /* i  : input sampling rate                     */
);

void ivas_lfe_lpf_enc_close(
    ivas_filters_process_state_t **hLfeLpf                      /* i/o: LFE LPF handle                          */
);

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


/*----------------------------------------------------------------------------------*
 * LFE Coding prototypes
 *----------------------------------------------------------------------------------*/
+7 −3
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@
/*MCT Debug switches*/
/*#define DEBUG_FORCE_MCT_CP*/                  /* force MCT Stereo pairs for verification with SPAR */
#ifdef DEBUG_FORCE_MCT_CP
/*#define DEBUG_SINGLE_CODE_OMNI*/              /* force 3 TC SBA always code W channel seperately   */
/*#define DEBUG_SINGLE_CODE_OMNI*/              /* force 3 TC SBA always code W channel separately   */
#endif

/*PLC Debug switches*/
@@ -125,7 +125,7 @@
#endif
/*#define SPAR_HOA_DBG*/                        /* SPAR HOA debug statements */
/*#define DEBUG_BINAURAL_FILTER_DESIGN*/        /* debugging of Crend binaural filter design */
//#define DEBUG_AGC_ENCODER_CMD_OPTION            /* Ability to force enable or disable AGC behaviour in DIRAC/SPAR via command line option */
/*#define DEBUG_AGC_ENCODER_CMD_OPTION*/        /* Ability to force enable or disable AGC behaviour in DIRAC/SPAR via command line option */
#define DEBUG_JBM_CMD_OPTION                    /* ability for telling the decoder the frontend fetch size and to not delay compensate for bad frames at the beginning */

#define VARIABLE_SPEED_DECODING                 /* variable speed decoding employing the JBM functioniality; move to DEBUGGING after build for disabled is fixed */
@@ -152,8 +152,12 @@
#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_TCX_LOWRATE_LIMITATION                      /* VA: issue 577: TCX bitrate limitation only when DEBUGGING is active */


#define MASA_AND_OBJECTS                                /* Nokia: Combination of MASA and objects */
#ifdef MASA_AND_OBJECTS
+1 −2
Original line number Diff line number Diff line
@@ -1592,8 +1592,7 @@ void decoder_tcx_imdct(
        hTcxCfg->tcx_last_overlap_mode = hTcxCfg->tcx_curr_overlap_mode;
    }

    if (
        st->igf )
    if ( st->igf )
    {
        proc = st->hIGFDec->flatteningTrigger;

+0 −2
Original line number Diff line number Diff line
@@ -949,7 +949,6 @@ void destroy_cpe_dec(
    int16_t n;
    Decoder_State *st;


    for ( n = 0; n < CPE_CHANNELS; n++ )
    {
        st = hCPE->hCoreCoder[n];
@@ -1050,7 +1049,6 @@ static void read_stereo_mode_and_bwidth(

    if ( st_ivas->bfi || st_ivas->hDecoderConfig->ivas_total_brate < IVAS_SID_5k2 )
    {

        hCPE->element_mode = hCPE->last_element_mode;
    }

+6 −17
Original line number Diff line number Diff line
@@ -115,8 +115,7 @@ ivas_error ivas_dec(
     * Combine orientations
     *----------------------------------------------------------------*/

    if ( ( error = combine_external_and_head_orientations_dec( st_ivas->hHeadTrackData, st_ivas->hExtOrientationData,
                                                               st_ivas->hCombinedOrientationData ) ) != IVAS_ERR_OK )
    if ( ( error = combine_external_and_head_orientations_dec( st_ivas->hHeadTrackData, st_ivas->hExtOrientationData, st_ivas->hCombinedOrientationData ) ) != IVAS_ERR_OK )
    {
        return error;
    }
@@ -268,18 +267,12 @@ ivas_error ivas_dec(
            }
            else if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM )
            {
                if ( ( error = ivas_rend_crendProcess( st_ivas->hCrendWrapper,
                                                       AUDIO_CONFIG_7_1_4,
                                                       AUDIO_CONFIG_BINAURAL_ROOM_IR,
                                                       NULL,
                                                       NULL,
                                                       NULL,
                                                       NULL,
                                                       p_output,
                                                       output_Fs ) ) != IVAS_ERR_OK )
                if ( ( error = ivas_rend_crendProcess( st_ivas->hCrendWrapper, AUDIO_CONFIG_7_1_4, AUDIO_CONFIG_BINAURAL_ROOM_IR, NULL,
                                                       NULL, NULL, NULL, p_output, output_Fs ) ) != IVAS_ERR_OK )
                {
                    return error;
                }

                ivas_binaural_add_LFE( st_ivas, output_frame, p_output, p_output );
            }
#ifdef DEBUGGING
@@ -306,7 +299,6 @@ ivas_error ivas_dec(
        }
        else if ( st_ivas->ivas_format == SBA_FORMAT )
        {

            if ( ( error = ivas_spar_dec( st_ivas, nb_bits_metadata ) ) != IVAS_ERR_OK )
            {
                return error;
@@ -394,7 +386,6 @@ ivas_error ivas_dec(
            nchan_remapped = ivas_sba_remapTCs( output, st_ivas, output_frame );

            if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM )

            {
                ivas_sba_mix_matrix_determiner( st_ivas->hSpar, output, st_ivas->bfi, nchan_remapped, output_frame );
            }
@@ -587,8 +578,7 @@ ivas_error ivas_dec(
            if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM )
            {
                if ( ( error = ivas_rend_crendProcess( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig,
                                                       st_ivas->hCombinedOrientationData,
                                                       &st_ivas->hIntSetup, st_ivas->hEFAPdata, p_output, output_Fs ) ) != IVAS_ERR_OK )
                                                       st_ivas->hCombinedOrientationData, &st_ivas->hIntSetup, st_ivas->hEFAPdata, p_output, output_Fs ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
@@ -646,8 +636,7 @@ ivas_error ivas_dec(
            if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM )
            {
                if ( ( error = ivas_rend_crendProcess( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig,
                                                       st_ivas->hCombinedOrientationData,
                                                       &st_ivas->hIntSetup, st_ivas->hEFAPdata, p_output, output_Fs ) ) != IVAS_ERR_OK )
                                                       st_ivas->hCombinedOrientationData, &st_ivas->hIntSetup, st_ivas->hEFAPdata, p_output, output_Fs ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
Loading