Commit 503b0540 authored by fotopoulou's avatar fotopoulou
Browse files

Merge branch 'main' into 1411-encoder-crash-in-igfupdateinfo-with-masa-dtx-bw-switching

parents 967b7687 cc874915
Loading
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -168,7 +168,7 @@
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define FIX_1119_SPLIT_RENDERING_VOIP                   /* FhG: Add split rendering support to decoder in VoIP mode */
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */

#define FIX_1413_IGF_INIT_PRINTOUT                      /* FhG: use correct variable for IGF initiliazation */


/* #################### End BE switches ################################## */
@@ -183,6 +183,8 @@
#define NONBE_1399_1400_FIX_OBJ_EDIT_ISSUES             /* Nokia: Fix for issues 1399: obj edit broken with MC/SBA output in VOIP, and 1400: negative energy estimate used for gaining. */
#define FIX_1411_IGF_CRASH_BW_SWITCHING                 /* FhG: Fix for issue 1411: fixes crash that can happen for IGF with BW switching and DTX*/

#define NONBE_1412_AVOID_ROUNDING_AZ_ELEV              /* FhG:  Avoid rounding when passing azimuth and elevation to efap_determine_gains() */

/* ##################### End NON-BE switches ########################### */

/* ################## End DEVELOPMENT switches ######################### */
+1 −1
Original line number Diff line number Diff line
@@ -3198,7 +3198,7 @@ static ivas_error doSanityChecks_IVAS(
        }
    }

    if ( st_ivas->hDecoderConfig->Opt_ObjEdit_on & st_ivas->hDecoderConfig->Opt_non_diegetic_pan )
    if ( st_ivas->hDecoderConfig->Opt_ObjEdit_on && st_ivas->hDecoderConfig->Opt_non_diegetic_pan )
    {
        return IVAS_ERROR( IVAS_ERR_OBJECTS_EDITING_AND_PANNING_NOT_SUPPORTED, "Wrong set-up: Only object editing or Non-diegetic panning can be used." );
    }
+22 −2
Original line number Diff line number Diff line
@@ -709,8 +709,9 @@ void ivas_ism_dec_digest_tc(
         ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM && st_ivas->hDecoderConfig->Opt_Headrotation == 0 ) )
    {
        int16_t i;
#ifndef NONBE_1412_AVOID_ROUNDING_AZ_ELEV
        int16_t azimuth, elevation;

#endif
        /* we have a full frame interpolator, adapt it */
        /* for BE testing */
        if ( ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ) == st_ivas->hTcBuffer->n_samples_available )
@@ -753,24 +754,36 @@ void ivas_ism_dec_digest_tc(
            }
            else
            {
#ifndef NONBE_1412_AVOID_ROUNDING_AZ_ELEV
                // TODO tmu review when #215 is resolved
                azimuth = (int16_t) floorf( st_ivas->hIsmMetaData[i]->edited_azimuth + 0.5f );
                elevation = (int16_t) floorf( st_ivas->hIsmMetaData[i]->edited_elevation + 0.5f );

#endif
                if ( ( st_ivas->renderer_type == RENDERER_TD_PANNING ||
                       st_ivas->renderer_type == RENDERER_OSBA_LS ||
                       st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM || ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM && st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) ) &&
                     st_ivas->hCombinedOrientationData == NULL )
                {
#ifdef NONBE_1412_AVOID_ROUNDING_AZ_ELEV
                    float elevation = st_ivas->hIsmMetaData[i]->edited_elevation;
#endif
                    if ( st_ivas->hIntSetup.is_planar_setup )
                    {
                        /* If no elevation support in output format, then rendering should be done with zero elevation */
#ifdef NONBE_1412_AVOID_ROUNDING_AZ_ELEV
                        elevation = 0.f;
#else
                        elevation = 0;
#endif
                    }

                    if ( st_ivas->hEFAPdata != NULL )
                    {
#ifdef NONBE_1412_AVOID_ROUNDING_AZ_ELEV
                        efap_determine_gains( st_ivas->hEFAPdata, st_ivas->hIsmRendererData->gains[i], st_ivas->hIsmMetaData[i]->edited_azimuth, elevation, EFAP_MODE_EFAP );
#else
                        efap_determine_gains( st_ivas->hEFAPdata, st_ivas->hIsmRendererData->gains[i], azimuth, elevation, EFAP_MODE_EFAP );
#endif
                        v_multc( st_ivas->hIsmRendererData->gains[i], st_ivas->hIsmMetaData[i]->edited_gain, st_ivas->hIsmRendererData->gains[i], st_ivas->hEFAPdata->numSpk );
                    }
                }
@@ -778,6 +791,13 @@ void ivas_ism_dec_digest_tc(
                          st_ivas->renderer_type == RENDERER_OSBA_AMBI ||
                          st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV )
                {
#ifdef NONBE_1412_AVOID_ROUNDING_AZ_ELEV
                    // TODO tmu review when #215 is resolved
                    int16_t azimuth, elevation;

                    azimuth = (int16_t) floorf( st_ivas->hIsmMetaData[i]->edited_azimuth + 0.5f );
                    elevation = (int16_t) floorf( st_ivas->hIsmMetaData[i]->edited_elevation + 0.5f );
#endif
                    /*get HOA gets for direction (ACN/SN3D)*/
                    ivas_dirac_dec_get_response( azimuth, elevation, st_ivas->hIsmRendererData->gains[i], st_ivas->hIntSetup.ambisonics_order );
                    v_multc( st_ivas->hIsmRendererData->gains[i], st_ivas->hIsmMetaData[i]->edited_gain, st_ivas->hIsmRendererData->gains[i], ivas_sba_get_nchan( st_ivas->hIntSetup.ambisonics_order, 0 ) );
+5 −1
Original line number Diff line number Diff line
@@ -568,7 +568,11 @@ ivas_error ivas_cpe_enc(

                bw = ( hCPE->element_mode == IVAS_CPE_MDCT ) ? sts[n]->bwidth : max_bwidth;
                igf = getIgfPresent( sts[n]->element_mode, sts[n]->bits_frame_nominal * FRAMES_PER_SEC, bw, sts[n]->rf_mode );
#ifdef FIX_1413_IGF_INIT_PRINTOUT
                if ( ( error = IGF_Reconfig( &sts[n]->hIGFEnc, igf, 0, sts[n]->bits_frame_nominal * FRAMES_PER_SEC, bw, sts[n]->element_mode, sts[n]->rf_mode ) ) != IVAS_ERR_OK )
#else
            if ( ( error = IGF_Reconfig( &sts[n]->hIGFEnc, igf, 0, sts[n]->bits_frame_nominal * FRAMES_PER_SEC, max_bwidth, sts[n]->element_mode, sts[n]->rf_mode ) ) != IVAS_ERR_OK )
#endif
                {
                    return error;
                }
+6 −6
Original line number Diff line number Diff line
@@ -185,16 +185,16 @@ void convert_backslash(
void remove_cr(
    char *str )
{
    char *pos;
    int32_t n, p = 0;

    /* remove all \r characters from the string */
    pos = strchr( str, '\r' );
    while ( pos != NULL )
    for ( n = 0; str[n] != 0; n++ )
    {
        strcpy( pos, pos + 1 );
        pos = strchr( pos, '\r' );
        char c = str[n];
        str[p] = c;
        p += ( c == '\r' ) ? 0 : 1;
    }

    str[p] = 0;
    return;
}

Loading