Commit 2609e3a1 authored by Vladimir Malenovsky's avatar Vladimir Malenovsky
Browse files

merge main to branch

parents 3cd7d7a2 f49c0411
Loading
Loading
Loading
Loading
Loading
+30 −1
Original line number Diff line number Diff line
@@ -217,6 +217,9 @@ static ivas_error decodeVoIP(
#ifdef FIX_1119_SPLIT_RENDERING_VOIP
    ISAR_SPLIT_REND_BITS_DATA *splitRendBits,
#endif
#ifdef FIX_SPLIT_RENDERING_ON_DECODER_RESTART
    IVAS_RENDER_CONFIG_DATA *renderConfig,
#endif
#ifdef DECODER_FORMAT_SWITCHING
    IVAS_DEC_HANDLE *phIvasDec,
#else
@@ -267,6 +270,9 @@ int main(
    IVAS_ROOM_ACOUSTICS_CONFIG_DATA **pAE = NULL;
    uint32_t aeCount = 0;
#endif
#ifdef FIX_SPLIT_RENDERING_ON_DECODER_RESTART
    IVAS_RENDER_CONFIG_DATA renderConfig = { 0 };
#endif
#ifdef DEBUGGING
    int32_t noClipping;
    int32_t cnt_frames_limited;
@@ -655,7 +661,9 @@ int main(

    if ( arg.renderConfigEnabled )
    {
#ifndef FIX_SPLIT_RENDERING_ON_DECODER_RESTART
        IVAS_RENDER_CONFIG_DATA renderConfig;
#endif

        /* sanity check */
        if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB &&
@@ -854,6 +862,9 @@ int main(
#ifdef FIX_1119_SPLIT_RENDERING_VOIP
                            &splitRendBits,
#endif
#ifdef FIX_SPLIT_RENDERING_ON_DECODER_RESTART
                            &renderConfig,
#endif
#ifdef DECODER_FORMAT_SWITCHING
                            &hIvasDec,
#else
@@ -3406,6 +3417,9 @@ static ivas_error decodeVoIP(
#ifdef FIX_1119_SPLIT_RENDERING_VOIP
    ISAR_SPLIT_REND_BITS_DATA *splitRendBits,
#endif
#ifdef FIX_SPLIT_RENDERING_ON_DECODER_RESTART
    IVAS_RENDER_CONFIG_DATA *renderConfig,
#endif
#ifdef DECODER_FORMAT_SWITCHING
    IVAS_DEC_HANDLE *phIvasDec,
#else
@@ -3655,7 +3669,11 @@ static ivas_error decodeVoIP(
                &hIvasDec,
                newCodecInPacket,
                &arg,
#ifdef FIX_SPLIT_RENDERING_ON_DECODER_RESTART
                renderConfig,
#else
                NULL, /* ToDo : Provide rendererConfig */
#endif
                NULL /* ToDo : Provide LS Custom Data */
            );
            if ( error != IVAS_ERR_OK )
@@ -4721,6 +4739,7 @@ ivas_error restartDecoder(
        goto cleanup;
    }

#ifndef FIX_SPLIT_RENDERING_ON_DECODER_RESTART
    if ( arg->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    {
        if ( ( error = IVAS_DEC_EnableSplitRendering( hIvasDec ) ) != IVAS_ERR_OK )
@@ -4737,6 +4756,7 @@ ivas_error restartDecoder(

        arg->enableHeadRotation = true;
    }
#endif

    if ( arg->voipMode )
    {
@@ -4753,6 +4773,15 @@ ivas_error restartDecoder(
        goto cleanup;
    }

#ifdef FIX_SPLIT_RENDERING_ON_DECODER_RESTART
    /* ISAR frame size is set from command line, not renderer config file.
     * This will be ignored if output format is not split rendering. */
    if ( renderConfig != NULL )
    {
        renderConfig->split_rend_config.isar_frame_size_ms = (int16_t) arg->renderFramesize /* given in number of 5ms subframes */ * 5;
    }
#endif

    if ( arg->renderConfigEnabled && renderConfig != NULL )
    {
        if ( ( error = IVAS_DEC_FeedRenderConfig( hIvasDec, *renderConfig ) ) != IVAS_ERR_OK )
+4 −3
Original line number Diff line number Diff line
@@ -168,7 +168,7 @@
#define REVERSE_ISM_PI_DATA                            /* Add reading and packing/unpacking of reverse ISM PI data */
#define DECODER_FORMAT_SWITCHING                       /* Re-initialize the decoder when the format/subformat of the incoming stream is changed */
#define RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE            /* CR for split rendering codec framesize signalling in Toc Byte*/

#define FIX_SPLIT_RENDERING_ON_DECODER_RESTART         /* Re-configure split rendering on decoder restart */

/* ################### Start BE switches ################################# */
/* only BE switches wrt selection floating point code */
@@ -205,7 +205,8 @@
#define NONBE_1380_OMASA_BUILD_DIFF                     /* Nokia: Fix for issue #1380: Large differences in OMASA output between Debug and Release builds */
#define NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL /* Nokia: Adjustments in remaining stereo panning functions to make them BE between Debug and Release */
#define FIX_GAIN_EDIT_LIMITS                           /* Harmonize gain edit limits for all opertation points. For all modes, limit to max +12dB. For parametric modes, limit to min -24dB. */

#define BE_FIX_1391_COVERAGE_SPAR_DYN__CHANNEL         /* Dolby: Fix coverage of SBA SPAR Dynamic active W not getting hit by the tests */
#define NONBE_FIX_1442_MASA_EXT_REND_ORIENT_IDX         /* Nokia: Fix issue 1442 of wrong index to combinedOrientationData */

#define FIX_1430_EVS_STEREO_DMX_CHANNEL_DISAPPEARING    /* Orange: Fix for basop issue 2184 - to prevent one channel from becoming inaudible in the mono downmix output */
#define FIX_1440_AMR_WB_RESET                           /* VA: issue 1440: Fix missing AMR-WB IO memory reset (applicable to float only) */
+5 −0
Original line number Diff line number Diff line
@@ -774,8 +774,13 @@ char *fname(
{
    char idd[6];

#ifdef BE_FIX_1391_COVERAGE_SPAR_DYN__CHANNEL
    assert( id >= 0 && id < 100 );
    snprintf( idd, sizeof( idd ), ".id%d", id );
#else
    assert( id < 100 );
    sprintf( idd, ".id%d", id );
#endif

    strcpy( tmp_fname, dir );
    strcat( tmp_fname, file );
+4 −0
Original line number Diff line number Diff line
@@ -838,7 +838,11 @@ static ivas_error ivas_spar_enc_process(
    {

        /*cross fade between new active W channels and old passive W channel*/
#ifdef BE_FIX_1391_COVERAGE_SPAR_DYN__CHANNEL
        if ( dyn_active_w_flag == 1 || hSpar->hMdEnc->spar_md.prior_dyn_active_w_flag == 1 )
#else
        if ( dyn_active_w_flag == 1 )
#endif
        {
            if ( hSpar->hMdEnc->spar_md.prior_dyn_active_w_flag != dyn_active_w_flag )
            {
+16 −3
Original line number Diff line number Diff line
@@ -3441,11 +3441,15 @@ static void ivas_masa_ext_rend_parambin_internal(

    ivas_dirac_dec_binaural_formulate_input_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, subframe,
                                                                 subFrameTotalEne, IIReneLimiter );

#ifdef NONBE_FIX_1442_MASA_EXT_REND_ORIENT_IDX
    ivas_dirac_dec_binaural_formulate_target_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Rmat, subframe,
                                                                  hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[hCombinedOrientationData->subframe_idx] > 0,
                                                                  subFrameTotalEne, IIReneLimiter, NULL );
#else
    ivas_dirac_dec_binaural_formulate_target_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Rmat, subframe,
                                                                  hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0,
                                                                  subFrameTotalEne, IIReneLimiter, NULL );

#endif
    ivas_dirac_dec_binaural_determine_processing_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, max_band_decorr, Rmat, subframe,
                                                           hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[hCombinedOrientationData->subframe_idx] > 0,
                                                           0, NULL );
@@ -3509,6 +3513,15 @@ static void ivas_masa_ext_rend_parambin_internal(
                mvr2r( hMasaExtRend->hDiracDecBin[0]->ChCrossRe, hDiracDecBin->ChCrossRe, hSpatParamRendCom->num_freq_bands );
                mvr2r( hMasaExtRend->hDiracDecBin[0]->ChCrossIm, hDiracDecBin->ChCrossIm, hSpatParamRendCom->num_freq_bands );

#ifdef NONBE_FIX_1442_MASA_EXT_REND_ORIENT_IDX
                ivas_dirac_dec_binaural_formulate_target_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Rmat_local, subframe,
                                                                              hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[hCombinedOrientationData->subframe_idx] > 0,
                                                                              subFrameTotalEne, IIReneLimiter, NULL );

                ivas_dirac_dec_binaural_determine_processing_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, max_band_decorr, Rmat_local, subframe,
                                                                       hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[hCombinedOrientationData->subframe_idx] > 0,
                                                                       0, NULL );
#else
                ivas_dirac_dec_binaural_formulate_target_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Rmat_local, subframe,
                                                                              hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0,
                                                                              subFrameTotalEne, IIReneLimiter, NULL );
@@ -3516,7 +3529,7 @@ static void ivas_masa_ext_rend_parambin_internal(
                ivas_dirac_dec_binaural_determine_processing_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, max_band_decorr, Rmat_local, subframe,
                                                                       hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0,
                                                                       0, NULL );

#endif

                /* re-use reverb and decorr from main direction for the sides */
                ivas_dirac_dec_binaural_process_output( hDiracDecBin, hSpatParamRendCom, hMasaExtRend->cldfbSynRend, output_f, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in,
Loading