Commit a9666f8e authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'main' into basop-ci-branch

parents b117d9cd 4a4bb894
Loading
Loading
Loading
Loading
+16 −4
Original line number Diff line number Diff line
@@ -28,15 +28,27 @@
# accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and
# the United Nations Convention on Contracts on the International Sales of Goods.

# get format from command line
if [ $# -ne 2 ]; then
  echo "Usage: $0 \"ivas-format(s)\" \"output-format(s)\""
function usage {
    echo "Usage: $0 \"ivas-format(s)\" \"output-format(s)\" \"mode{full(default)|mem_only}\""
  exit 1
}

if [ $# -ne 2 ] && [ $# -ne 3 ]; then
    usage
fi

ivas_format=$1
output_format="$2"

mode_arg_script=""
if [ $# -eq 3 ]; then
    if [ "$3" = "mem_only" ]; then
        mode_arg_script="--wmc_tool_mem_only"
    elif [ "$3" != "full" ]; then
        usage
    fi
fi

date=`date +%Y%m%d`                         # used for log-file file ending
shortDate=`date "+%b %d" | sed -e "s/\ /_/g"`    # stored in the log-file
fullDate=`date "+%c" | sed -e "s/\ /_/g"`       # stored in the log-file
@@ -56,7 +68,7 @@ wmopsFilenameFlc=${destDir}/wmops/logs/${wmopsFilenameFlcLast}
ret_val=0

# instrument and build
./scripts/IvasBuildAndRunChecks.py -p $config_file --checks COMPLEXITY --create_complexity_tables ${wmopsFilenameFlc} -C $ivas_format -f ${ep} --oc $output_format
./scripts/IvasBuildAndRunChecks.py $mode_arg_script -p $config_file --checks COMPLEXITY --create_complexity_tables ${wmopsFilenameFlc} -C $ivas_format -f ${ep} --oc $output_format
ret_val=$?

# get the info on worst-case operating point: WMOPS number, enc-operating mode, dec-operating mode
+1 −4
Original line number Diff line number Diff line
@@ -161,8 +161,6 @@

#define FIX_CREND_SIMPLIFY_CODE                         /* Ora : simplify line code in crend */
#define TMP_FIX_1119_SPLIT_RENDERING_VOIP               /* FhG: Add error check for unsupported config: split rendering with VoIP mode */
#define FIX_1113_EXTREND_ISAR                           /* FhG: issue 1113: fix external renderer asserts for FOA/HOA2 and CLDFB config */
#define FIX_1113_CLDFB_REND_IN_ISAR                     /* issue 1113: fix the use of CLDFB renderer in split-rendering at the external renderer */

#define FIX_POINT_HRTF_FILE_FORMAT                     /* All: fix point hrtf binary file format */
#ifdef FIX_POINT_HRTF_FILE_FORMAT
@@ -172,7 +170,7 @@
#define FIX_1123_PARAMBIN_16BIT_ROM                     /* FhG,Nok: issue 1123: update ParamBin ROM tables and scripts to generate 16 bit tables instead of float */
#define FIX_RETURN                                      /* VA: fix location of function returns */
#endif
#define FIX_BASOP_812_NAN_COHSNR                        /* FhG: BASOP issue 812: fix nan values in sparse frames for cohSNR value in ITD estimation*/
#define FIX_1152_UNINIT_VAL_IN_ITD_VAD_COMPUTATION      /* FhG: fix uninitialized value being used in ITD VAD mid signal computation that does not affect synthesis, but crashes BASOPs */

/* #################### End BE switches ################################## */

@@ -180,7 +178,6 @@
/* any switch which is non-be wrt selection floating point code */
/* all switches in this category should start with "NONBE_" */

#define NONBE_FIX_1132_THRESHOLD_POW_IN_SWB_TBE               /* VA: issue 1132: prevent division by extremely low energy value in SWB TBE */
#define NONBE_FIX_1141_OSBA_ROOM_RENDERING                    /* FhG: Fix for issue 1141: render objects in OSBA decoder with room effect */

/* ##################### End NON-BE switches ########################### */
+2 −39
Original line number Diff line number Diff line
@@ -1171,11 +1171,7 @@ static void ivas_binaural_obtain_DMX(
            set_zero( outImagRightPtr, CLDFB_NO_CHANNELS_MAX );

            /*Ambisonics input requires different processing*/
#ifdef FIX_1113_CLDFB_REND_IN_ISAR
            if ( hBinRenderer->nInChannels == HOA3_CHANNELS )
#else
            if ( hBinRenderer->nInChannels == 16 )
#endif
            {
                float *inRealPtr_W, *inImagPtr_W;
                float *inRealPtr_Y, *inImagPtr_Y;
@@ -1271,12 +1267,7 @@ ivas_error ivas_rend_openCldfbRend(
        hBinRenderer->conv_band = convBand;
    }

#ifdef FIX_1113_EXTREND_ISAR
    ivas_output_init( hBinRenderer->hInputSetup, inConfig );
#else
    hBinRenderer->hInputSetup->is_loudspeaker_setup = 0;
    hBinRenderer->hInputSetup->output_config = inConfig;
#endif
    if ( ( error = getAudioConfigNumChannels( inConfig, &hBinRenderer->hInputSetup->nchan_out_woLFE ) ) != IVAS_ERR_OK )
    {
        return error;
@@ -1307,8 +1298,6 @@ ivas_error ivas_rend_openCldfbRend(
        return error;
    }

#ifdef FIX_1113_CLDFB_REND_IN_ISAR
#ifdef FIX_1113_EXTREND_ISAR
    if ( inConfig == IVAS_AUDIO_CONFIG_FOA )
    {
        pCldfbRend->binaural_latency_ns = (int32_t) ( pCldfbRend->hHrtfFastConv->FASTCONV_FOA_latency_s * 1000000000.f );
@@ -1326,12 +1315,6 @@ ivas_error ivas_rend_openCldfbRend(
        /* should never happen for SBA */
        return IVAS_ERR_INVALID_OUTPUT_FORMAT;
    }
#else
    pCldfbRend->binaural_latency_ns = (int32_t) ( pCldfbRend->hHrtfFastConv->FASTCONV_HOA3_latency_s * 1000000000.f );
#endif
#else
    pCldfbRend->binaural_latency_ns = (int32_t) ( FASTCONV_HOA3_latency_s * 1000000000.f );
#endif
    hBinRenderer->hReverb = NULL;
    hBinRenderer->hEFAPdata = NULL;

@@ -1465,27 +1448,15 @@ ivas_error ivas_binRenderer_open(
            }
            else
            {
#ifdef FIX_1113_CLDFB_REND_IN_ISAR
                if ( hBinRenderer->nInChannels == HOA3_CHANNELS )
#else
                if ( hBinRenderer->nInChannels == 16 )
#endif
                {
                    st_ivas->binaural_latency_ns = (int32_t) ( st_ivas->hHrtfFastConv->FASTCONV_HOA3_latency_s * 1000000000.f );
                }
#ifdef FIX_1113_CLDFB_REND_IN_ISAR
                else if ( hBinRenderer->nInChannels == HOA2_CHANNELS )
#else
                else if ( hBinRenderer->nInChannels == 9 )
#endif
                {
                    st_ivas->binaural_latency_ns = (int32_t) ( st_ivas->hHrtfFastConv->FASTCONV_HOA2_latency_s * 1000000000.f );
                }
#ifdef FIX_1113_CLDFB_REND_IN_ISAR
                else if ( hBinRenderer->nInChannels == FOA_CHANNELS )
#else
                else if ( hBinRenderer->nInChannels == 4 )
#endif
                {
                    st_ivas->binaural_latency_ns = (int32_t) ( st_ivas->hHrtfFastConv->FASTCONV_FOA_latency_s * 1000000000.f );
                }
@@ -2199,12 +2170,8 @@ void ivas_binRenderer(
    }

    /* HOA decoding to CICP19 if needed*/
#ifdef FIX_1113_EXTREND_ISAR
    if ( hBinRenderer->hInputSetup->is_loudspeaker_setup == 0 &&
         ( hBinRenderer->nInChannels != HOA3_CHANNELS && hBinRenderer->nInChannels != HOA2_CHANNELS && hBinRenderer->nInChannels != FOA_CHANNELS ) )
#else
    if ( hBinRenderer->hInputSetup->is_loudspeaker_setup == 0 && hBinRenderer->nInChannels != 16 )
#endif
    {
        ivas_sba2mc_cldfb( *( hBinRenderer->hInputSetup ), RealBuffer, ImagBuffer, hBinRenderer->nInChannels, hBinRenderer->conv_band, numTimeSlots, hBinRenderer->hoa_dec_mtx );
    }
@@ -2262,11 +2229,7 @@ void ivas_binRenderer(
                    }
                    else
                    {
#ifdef FIX_1113_EXTREND_ISAR
                        rotateFrame_shd_cldfb( RealBuffer, ImagBuffer, Rmat_local, hBinRenderer->hInputSetup->nchan_out_woLFE, numTimeSlots, hBinRenderer->hInputSetup->ambisonics_order );
#else
                        rotateFrame_shd_cldfb( RealBuffer, ImagBuffer, Rmat_local, hBinRenderer->hInputSetup->nchan_out_woLFE, numTimeSlots, 3 );
#endif
                    }

                    ivas_binRenderer_filterModule( Cldfb_RealBuffer_Binaural[pos_idx], Cldfb_ImagBuffer_Binaural[pos_idx], RealBuffer, ImagBuffer, numTimeSlots, hBinRenderer, pos_idx );
+0 −4
Original line number Diff line number Diff line
@@ -328,14 +328,12 @@ void wb_tbe_dec(
        prev_pow = sum2_f( shaped_wb_excitation, L_SHB_LAHEAD / 4 );
        curr_pow = sum2_f( shaped_wb_excitation + L_SHB_LAHEAD / 4, L_SHB_LAHEAD / 4 );

#ifdef NONBE_FIX_1132_THRESHOLD_POW_IN_SWB_TBE
        if ( st->element_mode > EVS_MONO )
        {
            /* prevent too low values of energy */
            prev_pow = max( 0.00001f, prev_pow );
            curr_pow = max( 0.00001f, curr_pow );
        }
#endif

        if ( voice_factors[0] > 0.75f )
        {
@@ -1073,14 +1071,12 @@ void swb_tbe_dec(
        prev_pow = sum2_f( shaped_shb_excitation, L_SHB_LAHEAD + 10 );
        curr_pow = sum2_f( shaped_shb_excitation + L_SHB_LAHEAD + 10, L_SHB_LAHEAD + 10 );

#ifdef NONBE_FIX_1132_THRESHOLD_POW_IN_SWB_TBE
        if ( st->element_mode > EVS_MONO )
        {
            /* prevent too low values of energy */
            prev_pow = max( 0.00001f, prev_pow );
            curr_pow = max( 0.00001f, curr_pow );
        }
#endif

        if ( voice_factors[0] > 0.75f )
        {
+6 −4
Original line number Diff line number Diff line
@@ -288,7 +288,13 @@ static int16_t stereo_dft_enc_itd_vad(

    float Spd[STEREO_DFT_N_16k_ENC / 2 + 1];

#ifdef FIX_1152_UNINIT_VAL_IN_ITD_VAD_COMPUTATION
    /* Spd is later only used starting at itd_vad_band_tbl[0], so only compute values starting from there */
    /* -> this avoids uninitialized values in Spd_L and Spd_R at index 0 to be used */
    for ( i = itd_vad_band_tbl[0]; i <= STEREO_DFT_N_16k_ENC / 2; i++ )
#else
    for ( i = 0; i <= STEREO_DFT_N_16k_ENC / 2; i++ )
#endif
    {
        Spd[i] = 0.5f * ( Spd_L[i] + Spd_R[i] );
    }
@@ -1051,18 +1057,14 @@ void stereo_dft_enc_compute_itd(
    }

    /*calculate total cohSNR for frame in dB*/
#ifdef FIX_BASOP_812_NAN_COHSNR
    if ( mEr > 1.0f )
    {
#endif
        cohSNR = 20 * log10f( mEr );
#ifdef FIX_BASOP_812_NAN_COHSNR
    }
    else
    {
        cohSNR = 0;
    }
#endif

    /* collect UNCLR classifier parameters */
    {
Loading