Loading apps/decoder.c +72 −3 Original line number Diff line number Diff line Loading @@ -160,7 +160,10 @@ typedef struct char *hrtfFileName; IVAS_DEC_HRTF_HANDLE *hHrtfTD; #ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF; #endif IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics; IVAS_BIN_RENDERER_TYPE binaural_renderer; Loading @@ -168,8 +171,12 @@ typedef struct IVAS_BIN_RENDERER_TYPE binaural_renderer_sec; IVAS_BIN_RENDERER_TYPE binaural_renderer_sec_old; #ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM IVAS_AUDIO_CONFIG hrtf_set_audio_cfg; #else IVAS_AUDIO_CONFIG intern_audio_config; int16_t room_reverb_flag; #endif } IVAS_DEC_HRTF_BINARY_WRAPPER; Loading @@ -182,7 +189,11 @@ static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg ); static void usage_dec( void ); static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, IVAS_DEC_HANDLE hIvasDec ); #ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM static ivas_error load_hrtf_from_file( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, IVAS_DEC_HANDLE hIvasDec, const IVAS_AUDIO_CONFIG OutputConfig, const int32_t output_Fs ); #else static ivas_error IVAS_DEC_LoadHrtfFromFile( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, IVAS_DEC_HANDLE hIvasDec, const int32_t output_Fs ); #endif #ifdef DEBUGGING static ivas_error printBitstreamInfoVoip( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec ); static int16_t app_own_random( int16_t *seed ); Loading Loading @@ -237,7 +248,9 @@ int main( #endif hHrtfBinary.hHrtfTD = NULL; /* just to avoid compilation warning */ #ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM hHrtfBinary.hSetOfHRTF = NULL; /* just to avoid compilation warning */ #endif hHrtfBinary.hHrtfStatistics = NULL; /* just to avoid compilation warning */ splitRendBits.bits_buf = splitRendBitsBuf; Loading Loading @@ -712,7 +725,7 @@ int main( } /*------------------------------------------------------------------------------------------* * Load HRTF binary file data * Initialize HRTF binary file data *------------------------------------------------------------------------------------------*/ if ( arg.hrtfReaderEnabled ) Loading @@ -721,8 +734,12 @@ int main( hHrtfBinary.hrtfFileName = arg.hrtfFileName; hHrtfBinary.binaural_renderer = IVAS_BIN_RENDERER_TYPE_NONE; hHrtfBinary.binaural_renderer_sec = IVAS_BIN_RENDERER_TYPE_NONE; #ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM hHrtfBinary.hrtf_set_audio_cfg = IVAS_AUDIO_CONFIG_INVALID; #else hHrtfBinary.room_reverb_flag = 0; hHrtfBinary.intern_audio_config = IVAS_AUDIO_CONFIG_INVALID; #endif } /*------------------------------------------------------------------------------------------* Loading Loading @@ -801,7 +818,9 @@ cleanup: if ( arg.hrtfReaderEnabled ) { destroy_td_hrtf( hHrtfBinary.hHrtfTD ); #ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM destroy_SetOfHRTF( hHrtfBinary.hSetOfHRTF ); #endif destroy_hrtf_statistics( hHrtfBinary.hHrtfStatistics ); } Loading Loading @@ -2353,7 +2372,11 @@ static ivas_error decodeG192( /* Read main parameters from the bitstream to set-up the decoder */ hHrtfBinary->binaural_renderer_old = hHrtfBinary->binaural_renderer; hHrtfBinary->binaural_renderer_sec_old = hHrtfBinary->binaural_renderer_sec; #ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM if ( ( error = IVAS_DEC_ReadFormat( hIvasDec, &hHrtfBinary->binaural_renderer, &hHrtfBinary->binaural_renderer_sec, &hHrtfBinary->hrtf_set_audio_cfg ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_ReadFormat( hIvasDec, &hHrtfBinary->binaural_renderer, &hHrtfBinary->binaural_renderer_sec, &hHrtfBinary->room_reverb_flag, &hHrtfBinary->intern_audio_config ) ) != IVAS_ERR_OK ) #endif { return error; } Loading @@ -2364,7 +2387,11 @@ static ivas_error decodeG192( /* Load HRTF binary file data */ if ( arg.hrtfReaderEnabled ) { #ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM if ( ( error = load_hrtf_from_file( hHrtfBinary, hIvasDec, arg.outputConfig, arg.output_Fs ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_LoadHrtfFromFile( hHrtfBinary, hIvasDec, arg.output_Fs ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nIVAS_DEC_LoadHrtfFromFile failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -3260,7 +3287,11 @@ static ivas_error decodeVoIP( /* Read main parameters from the bitstream to set-up the decoder */ hHrtf->binaural_renderer_old = hHrtf->binaural_renderer; hHrtf->binaural_renderer_sec_old = hHrtf->binaural_renderer_sec; #ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM if ( ( error = IVAS_DEC_ReadFormat( hIvasDec, &hHrtf->binaural_renderer, &hHrtf->binaural_renderer_sec, &hHrtf->hrtf_set_audio_cfg ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_ReadFormat( hIvasDec, &hHrtf->binaural_renderer, &hHrtf->binaural_renderer_sec, &hHrtf->room_reverb_flag, &hHrtf->intern_audio_config ) ) != IVAS_ERR_OK ) #endif { return error; } Loading @@ -3271,7 +3302,11 @@ static ivas_error decodeVoIP( /* Load HRTF binary file data */ if ( arg.hrtfReaderEnabled ) { #ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM if ( ( error = load_hrtf_from_file( hHrtf, hIvasDec, arg.outputConfig, arg.output_Fs ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_LoadHrtfFromFile( hHrtf, hIvasDec, arg.output_Fs ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nIVAS_DEC_LoadHrtfFromFile failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -3662,6 +3697,20 @@ static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec( #endif #ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM /*---------------------------------------------------------------------* * load_hrtf_from_file() * * Load HRTF coefficients from external binary file *---------------------------------------------------------------------*/ static ivas_error load_hrtf_from_file( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, /* i/o: HRTF binary wrapper handle */ IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const IVAS_AUDIO_CONFIG OutputConfig, /* i : output audio configuration */ const int32_t output_Fs /* i : output sampling rate */ ) #else /*---------------------------------------------------------------------* * IVAS_DEC_LoadHrtfFromFile() * Loading @@ -3672,6 +3721,7 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, IVAS_DEC_HANDLE hIvasDec, const int32_t output_Fs ) #endif { ivas_error error; IVAS_BIN_RENDERER_TYPE binaural_renderer, binaural_renderer_sec; Loading @@ -3697,11 +3747,13 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile( destroy_td_hrtf( hHrtfBinary->hHrtfTD ); } #ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM if ( !( binaural_renderer == IVAS_BIN_RENDERER_TYPE_CREND || binaural_renderer == IVAS_BIN_RENDERER_TYPE_DEFAULT ) && hHrtfBinary->hSetOfHRTF != NULL ) { destroy_SetOfHRTF( hHrtfBinary->hSetOfHRTF ); } #endif if ( ( error = IVAS_DEC_HRTF_binary_close( hIvasDec, hHrtfBinary->binaural_renderer_old ) ) != IVAS_ERR_OK ) { return error; Loading Loading @@ -3745,13 +3797,22 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile( if ( binaural_renderer == IVAS_BIN_RENDERER_TYPE_CREND || binaural_renderer == IVAS_BIN_RENDERER_TYPE_DEFAULT ) { #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM IVAS_DEC_HRTF_CREND_HANDLE *hHrtfCrend = NULL; if ( ( error = IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hHrtfCrend ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hHrtfBinary->hSetOfHRTF ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nIVAS_DEC_GetHrtfCRendHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); return error; } #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM if ( ( error = load_Crend_HRTF_from_binary( *hHrtfCrend, hHrtfBinary->hrtfReader, OutputConfig, hHrtfBinary->hrtf_set_audio_cfg, output_Fs ) ) != IVAS_ERR_OK ) #else if ( ( error = create_SetOfHRTF_from_binary( *hHrtfBinary->hSetOfHRTF, hHrtfBinary->hrtfReader, output_Fs ) ) != IVAS_ERR_OK ) #endif { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { Loading @@ -3760,7 +3821,11 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile( } else { #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM destroy_crend_hrtf( hHrtfCrend ); #else destroy_SetOfHRTF( hHrtfBinary->hSetOfHRTF ); #endif } } } Loading @@ -3774,7 +3839,11 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile( return error; } #ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, OutputConfig, hHrtfBinary->hrtf_set_audio_cfg, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK ) #else if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, hHrtfBinary->room_reverb_flag, hHrtfBinary->intern_audio_config, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK ) #endif { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { Loading apps/renderer.c +31 −0 Original line number Diff line number Diff line Loading @@ -665,7 +665,11 @@ int main( SplitRendBFIFileReader *splitRendBFIReader = NULL; Vector3PairFileReader *referenceVectorReader = NULL; hrtfFileReader *hrtfFileReader = NULL; #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM IVAS_DEC_HRTF_CREND_HANDLE *hHrtfCrend = NULL; #else IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF = NULL; #endif IVAS_DEC_HRTF_FASTCONV_HANDLE *hHrtfFastConv = NULL; IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin = NULL; IVAS_DEC_HRTF_HANDLE *hHrtfTD = NULL; Loading Loading @@ -920,13 +924,27 @@ int main( } #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM if ( ( error = IVAS_REND_GetHrtfCRendHandle( hIvasRend, &hHrtfCrend ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_REND_GetHrtfCRendHandle( hIvasRend, &hSetOfHRTF ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nIVAS_Rend_GetHrtfCRendHandle failed: %s\n\n", ivas_error_to_string( error ) ); goto cleanup; } #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM IVAS_AUDIO_CONFIG hrtf_set_audio_cfg = IVAS_AUDIO_CONFIG_7_1_4; if ( args.inConfig.ambisonicsBuses->audioConfig != IVAS_AUDIO_CONFIG_INVALID && args.outConfig.audioConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR ) { hrtf_set_audio_cfg = args.inConfig.ambisonicsBuses->audioConfig; } if ( ( error = load_Crend_HRTF_from_binary( *hHrtfCrend, hrtfFileReader, args.outConfig.audioConfig, hrtf_set_audio_cfg, args.sampleRate ) ) != IVAS_ERR_OK ) #else if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfFileReader, args.sampleRate ) ) != IVAS_ERR_OK ) #endif { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { Loading @@ -935,7 +953,11 @@ int main( } else { #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM destroy_crend_hrtf( hHrtfCrend ); #else destroy_SetOfHRTF( hSetOfHRTF ); #endif } } Loading @@ -945,7 +967,11 @@ int main( goto cleanup; } #ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, args.outConfig.audioConfig, args.inConfig.ambisonicsBuses->audioConfig, hrtfFileReader ) ) != IVAS_ERR_OK ) #else if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, 0, IVAS_AUDIO_CONFIG_INVALID, hrtfFileReader ) ) != IVAS_ERR_OK ) #endif { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { Loading Loading @@ -1952,7 +1978,9 @@ cleanup: Vector3PairFileReader_close( &referenceVectorReader ); destroy_td_hrtf( hHrtfTD ); #ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM destroy_SetOfHRTF( hSetOfHRTF ); #endif destroy_hrtf_statistics( hHrtfStatistics ); IVAS_REND_Close( &hIvasRend ); IsmPositionProvider_close( positionProvider ); Loading Loading @@ -2495,6 +2523,9 @@ static CmdlnArgs defaultArgs( args.outConfig.audioConfig = IVAS_AUDIO_CONFIG_INVALID; args.outConfig.outSetupCustom.num_spk = 0; args.outConfig.outSetupCustom.num_lfe = 0; #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM args.inConfig.ambisonicsBuses->audioConfig = IVAS_AUDIO_CONFIG_INVALID; #endif for ( int32_t i = 0; i < RENDERER_MAX_ISM_INPUTS; ++i ) { Loading ci/complexity_measurements/genWebpageData.py +12 −0 Original line number Diff line number Diff line Loading @@ -425,6 +425,18 @@ def create_display_strings( displays.append(display) if which == "wmops_per_op": # flot.js' "stack: true" depends on the order of data arrays # reorder here instead of reworking above loop displays_encs = displays[0].split(", \n") displays_decs = displays[1].split(", \n") displays = [ displays_encs[0], displays_decs[0], displays_encs[1], displays_decs[1], ] return displays Loading ci/complexity_measurements/getWmops.sh +6 −2 Original line number Diff line number Diff line Loading @@ -73,7 +73,8 @@ config_file="scripts/config/ci_linux_ltv.json" # get wmops newsletter ivas_format_for_filename=${ivas_format// /-} wmopsFilenameFlcLast=wmops_newsletter_${ivas_format_for_filename}_to_${output_format}__${commit_sha}_${date} wmopsFilenameFlc=${destDir}/wmops/logs/${wmopsFilenameFlcLast} wmopsFilenameFlcDir=${destDir}/wmops/logs wmopsFilenameFlc=${wmopsFilenameFlcDir}/${wmopsFilenameFlcLast} ret_val=0 Loading @@ -92,6 +93,9 @@ ret_val=$? ### WMOPS ${scriptDir}/parseNewsletterWmops.py ${wmopsFilenameFlc}_WMOPS.csv ${wmopsFilenameFlcLast}_WMOPS.csv ${commit_sha} ${shortDate} ${fullDate} >>${destDir}/wmops/log_wmops_all.txt # create copy of WMOPS csv file with special name to easily get it from artifacts when comparing BASOP to float numbers cp ${wmopsFilenameFlc}_WMOPS.csv ${wmopsFilenameFlcDir}/latest_WMOPS.csv # get memory info for webpage ### RAM ${scriptDir}/mergeNewsletterRam.py ${wmopsFilenameFlc}_HEAP.csv ${wmopsFilenameFlc}_STACK.csv >${wmopsFilenameFlc}_RAM.csv Loading ci/complexity_measurements/index_complexity.html +72 −29 Original line number Diff line number Diff line Loading @@ -648,30 +648,61 @@ function WMOPS_perOP() { previousPoint = item.datapoint; $("#tooltip").remove(); var encData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[0]; var decData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[1]; var encData, decData; var encRefData, decRefData; var text = ""; if (Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays.length == 2) { encData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[0]; decData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[1]; var x = item.datapoint[0]; var y = item.datapoint[1]; var scoreEnc = parseFloat(encData.data[x][1]); var scoreDec = parseFloat(decData.data[x][1]); var scoreEnc = Math.max(parseFloat(encData.data[x][1]), 0); var scoreDec = Math.max(parseFloat(decData.data[x][1]), 0); var scoreCodec = Math.round((scoreEnc + scoreDec) * 100) / 100; var text = ""; text += "<b><u>Mode: " + Graphs_WMOPS_perOP.wmops_worstcase_per_op.runs[x].operatingPoint + "</u></b><br>"; text += 'Score: ' + Math.round(y * 100) / 100; if (graph.direction == -1) text += " WMOPS"; if( item.series.id == "worstCaseEnc" ){ text += " (enc)"; text += "Worst case enc: " + scoreEnc + " WMOPS<br>"; text += "Worst case dec: " + scoreDec + " WMOPS<br>"; text += "Worst case codec: " + scoreCodec + " WMOPS<br><br>"; var nEntriesWmopsGraph = Graphs_WMOPS.wmops_worstcase.runs.length - 1; text += "<a href=\"logs/" + Graphs_WMOPS.wmops_worstcase.runs[nEntriesWmopsGraph].logFile + "\">Logfile</a><br>"; } if( item.series.id == "worstCaseDec" ){ text += " (enc + dec)"; else if (Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays.length == 4) { encData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[0]; decData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[1]; encRefData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[2]; decRefData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[3]; var x = item.datapoint[0]; var y = item.datapoint[1]; var run = Graphs_WMOPS_perOP.wmops_worstcase_per_op.runs[x]; var op = run.operatingPoint; var codec = op.split(" - ")[1]; var scoreEnc, scoreDec; if (codec == "FLT REF") { x = (x - 1) / 2; scoreEnc = Math.max(parseFloat(encRefData.data[x][1]), 0); scoreDec = Math.max(parseFloat(decRefData.data[x][1]), 0); } else if (codec == "BASOP") { x = x / 2; scoreEnc = Math.max(parseFloat(encData.data[x][1]), 0); scoreDec = Math.max(parseFloat(decData.data[x][1]), 0); } text += "<br><br>"; var scoreCodec = Math.round((scoreEnc + scoreDec) * 100) / 100; text += "<b><u>Mode: " + op + "</u></b><br>"; text += "Worst case enc: " + scoreEnc + " WMOPS<br>"; text += "Worst case dec: " + scoreDec + " WMOPS<br>"; Loading @@ -679,7 +710,7 @@ function WMOPS_perOP() { var nEntriesWmopsGraph = Graphs_WMOPS.wmops_worstcase.runs.length - 1; text += "<a href=\"logs/" + Graphs_WMOPS.wmops_worstcase.runs[nEntriesWmopsGraph].logFile + "\">Logfile</a><br>"; } showToolTip(item.pageX, item.pageY, text); }); Loading @@ -689,7 +720,19 @@ function WMOPS_perOP() { $(document).ready(function () { // need to get worst case of enc + dec combined, because values are stacked in the graph var max = get_max_y_val_for_plotting(Graphs_WMOPS.wmops_worstcase.displays, 50); var displays = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays; var encData, decData; if (displays.length == 2) { encData = [displays[0]]; decData = [displays[1]]; } else if (displays.length == 4) { encData = [displays[0], displays[2]]; decData = [displays[1], displays[3]]; } var max_enc = get_max_y_val_for_plotting(encData, 1); var max_dec = get_max_y_val_for_plotting(decData, 1); var max = Math.ceil( (max_enc + max_dec ) / 50) * 50; drawGraph($("#wmops_per_op-graph"), Graphs_WMOPS_perOP.wmops_worstcase_per_op, max); }); Loading Loading
apps/decoder.c +72 −3 Original line number Diff line number Diff line Loading @@ -160,7 +160,10 @@ typedef struct char *hrtfFileName; IVAS_DEC_HRTF_HANDLE *hHrtfTD; #ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF; #endif IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics; IVAS_BIN_RENDERER_TYPE binaural_renderer; Loading @@ -168,8 +171,12 @@ typedef struct IVAS_BIN_RENDERER_TYPE binaural_renderer_sec; IVAS_BIN_RENDERER_TYPE binaural_renderer_sec_old; #ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM IVAS_AUDIO_CONFIG hrtf_set_audio_cfg; #else IVAS_AUDIO_CONFIG intern_audio_config; int16_t room_reverb_flag; #endif } IVAS_DEC_HRTF_BINARY_WRAPPER; Loading @@ -182,7 +189,11 @@ static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg ); static void usage_dec( void ); static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, IVAS_DEC_HANDLE hIvasDec ); #ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM static ivas_error load_hrtf_from_file( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, IVAS_DEC_HANDLE hIvasDec, const IVAS_AUDIO_CONFIG OutputConfig, const int32_t output_Fs ); #else static ivas_error IVAS_DEC_LoadHrtfFromFile( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, IVAS_DEC_HANDLE hIvasDec, const int32_t output_Fs ); #endif #ifdef DEBUGGING static ivas_error printBitstreamInfoVoip( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec ); static int16_t app_own_random( int16_t *seed ); Loading Loading @@ -237,7 +248,9 @@ int main( #endif hHrtfBinary.hHrtfTD = NULL; /* just to avoid compilation warning */ #ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM hHrtfBinary.hSetOfHRTF = NULL; /* just to avoid compilation warning */ #endif hHrtfBinary.hHrtfStatistics = NULL; /* just to avoid compilation warning */ splitRendBits.bits_buf = splitRendBitsBuf; Loading Loading @@ -712,7 +725,7 @@ int main( } /*------------------------------------------------------------------------------------------* * Load HRTF binary file data * Initialize HRTF binary file data *------------------------------------------------------------------------------------------*/ if ( arg.hrtfReaderEnabled ) Loading @@ -721,8 +734,12 @@ int main( hHrtfBinary.hrtfFileName = arg.hrtfFileName; hHrtfBinary.binaural_renderer = IVAS_BIN_RENDERER_TYPE_NONE; hHrtfBinary.binaural_renderer_sec = IVAS_BIN_RENDERER_TYPE_NONE; #ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM hHrtfBinary.hrtf_set_audio_cfg = IVAS_AUDIO_CONFIG_INVALID; #else hHrtfBinary.room_reverb_flag = 0; hHrtfBinary.intern_audio_config = IVAS_AUDIO_CONFIG_INVALID; #endif } /*------------------------------------------------------------------------------------------* Loading Loading @@ -801,7 +818,9 @@ cleanup: if ( arg.hrtfReaderEnabled ) { destroy_td_hrtf( hHrtfBinary.hHrtfTD ); #ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM destroy_SetOfHRTF( hHrtfBinary.hSetOfHRTF ); #endif destroy_hrtf_statistics( hHrtfBinary.hHrtfStatistics ); } Loading Loading @@ -2353,7 +2372,11 @@ static ivas_error decodeG192( /* Read main parameters from the bitstream to set-up the decoder */ hHrtfBinary->binaural_renderer_old = hHrtfBinary->binaural_renderer; hHrtfBinary->binaural_renderer_sec_old = hHrtfBinary->binaural_renderer_sec; #ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM if ( ( error = IVAS_DEC_ReadFormat( hIvasDec, &hHrtfBinary->binaural_renderer, &hHrtfBinary->binaural_renderer_sec, &hHrtfBinary->hrtf_set_audio_cfg ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_ReadFormat( hIvasDec, &hHrtfBinary->binaural_renderer, &hHrtfBinary->binaural_renderer_sec, &hHrtfBinary->room_reverb_flag, &hHrtfBinary->intern_audio_config ) ) != IVAS_ERR_OK ) #endif { return error; } Loading @@ -2364,7 +2387,11 @@ static ivas_error decodeG192( /* Load HRTF binary file data */ if ( arg.hrtfReaderEnabled ) { #ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM if ( ( error = load_hrtf_from_file( hHrtfBinary, hIvasDec, arg.outputConfig, arg.output_Fs ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_LoadHrtfFromFile( hHrtfBinary, hIvasDec, arg.output_Fs ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nIVAS_DEC_LoadHrtfFromFile failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -3260,7 +3287,11 @@ static ivas_error decodeVoIP( /* Read main parameters from the bitstream to set-up the decoder */ hHrtf->binaural_renderer_old = hHrtf->binaural_renderer; hHrtf->binaural_renderer_sec_old = hHrtf->binaural_renderer_sec; #ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM if ( ( error = IVAS_DEC_ReadFormat( hIvasDec, &hHrtf->binaural_renderer, &hHrtf->binaural_renderer_sec, &hHrtf->hrtf_set_audio_cfg ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_ReadFormat( hIvasDec, &hHrtf->binaural_renderer, &hHrtf->binaural_renderer_sec, &hHrtf->room_reverb_flag, &hHrtf->intern_audio_config ) ) != IVAS_ERR_OK ) #endif { return error; } Loading @@ -3271,7 +3302,11 @@ static ivas_error decodeVoIP( /* Load HRTF binary file data */ if ( arg.hrtfReaderEnabled ) { #ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM if ( ( error = load_hrtf_from_file( hHrtf, hIvasDec, arg.outputConfig, arg.output_Fs ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_LoadHrtfFromFile( hHrtf, hIvasDec, arg.output_Fs ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nIVAS_DEC_LoadHrtfFromFile failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -3662,6 +3697,20 @@ static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec( #endif #ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM /*---------------------------------------------------------------------* * load_hrtf_from_file() * * Load HRTF coefficients from external binary file *---------------------------------------------------------------------*/ static ivas_error load_hrtf_from_file( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, /* i/o: HRTF binary wrapper handle */ IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const IVAS_AUDIO_CONFIG OutputConfig, /* i : output audio configuration */ const int32_t output_Fs /* i : output sampling rate */ ) #else /*---------------------------------------------------------------------* * IVAS_DEC_LoadHrtfFromFile() * Loading @@ -3672,6 +3721,7 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, IVAS_DEC_HANDLE hIvasDec, const int32_t output_Fs ) #endif { ivas_error error; IVAS_BIN_RENDERER_TYPE binaural_renderer, binaural_renderer_sec; Loading @@ -3697,11 +3747,13 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile( destroy_td_hrtf( hHrtfBinary->hHrtfTD ); } #ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM if ( !( binaural_renderer == IVAS_BIN_RENDERER_TYPE_CREND || binaural_renderer == IVAS_BIN_RENDERER_TYPE_DEFAULT ) && hHrtfBinary->hSetOfHRTF != NULL ) { destroy_SetOfHRTF( hHrtfBinary->hSetOfHRTF ); } #endif if ( ( error = IVAS_DEC_HRTF_binary_close( hIvasDec, hHrtfBinary->binaural_renderer_old ) ) != IVAS_ERR_OK ) { return error; Loading Loading @@ -3745,13 +3797,22 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile( if ( binaural_renderer == IVAS_BIN_RENDERER_TYPE_CREND || binaural_renderer == IVAS_BIN_RENDERER_TYPE_DEFAULT ) { #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM IVAS_DEC_HRTF_CREND_HANDLE *hHrtfCrend = NULL; if ( ( error = IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hHrtfCrend ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hHrtfBinary->hSetOfHRTF ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nIVAS_DEC_GetHrtfCRendHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); return error; } #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM if ( ( error = load_Crend_HRTF_from_binary( *hHrtfCrend, hHrtfBinary->hrtfReader, OutputConfig, hHrtfBinary->hrtf_set_audio_cfg, output_Fs ) ) != IVAS_ERR_OK ) #else if ( ( error = create_SetOfHRTF_from_binary( *hHrtfBinary->hSetOfHRTF, hHrtfBinary->hrtfReader, output_Fs ) ) != IVAS_ERR_OK ) #endif { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { Loading @@ -3760,7 +3821,11 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile( } else { #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM destroy_crend_hrtf( hHrtfCrend ); #else destroy_SetOfHRTF( hHrtfBinary->hSetOfHRTF ); #endif } } } Loading @@ -3774,7 +3839,11 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile( return error; } #ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, OutputConfig, hHrtfBinary->hrtf_set_audio_cfg, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK ) #else if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, hHrtfBinary->room_reverb_flag, hHrtfBinary->intern_audio_config, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK ) #endif { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { Loading
apps/renderer.c +31 −0 Original line number Diff line number Diff line Loading @@ -665,7 +665,11 @@ int main( SplitRendBFIFileReader *splitRendBFIReader = NULL; Vector3PairFileReader *referenceVectorReader = NULL; hrtfFileReader *hrtfFileReader = NULL; #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM IVAS_DEC_HRTF_CREND_HANDLE *hHrtfCrend = NULL; #else IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF = NULL; #endif IVAS_DEC_HRTF_FASTCONV_HANDLE *hHrtfFastConv = NULL; IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin = NULL; IVAS_DEC_HRTF_HANDLE *hHrtfTD = NULL; Loading Loading @@ -920,13 +924,27 @@ int main( } #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM if ( ( error = IVAS_REND_GetHrtfCRendHandle( hIvasRend, &hHrtfCrend ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_REND_GetHrtfCRendHandle( hIvasRend, &hSetOfHRTF ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nIVAS_Rend_GetHrtfCRendHandle failed: %s\n\n", ivas_error_to_string( error ) ); goto cleanup; } #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM IVAS_AUDIO_CONFIG hrtf_set_audio_cfg = IVAS_AUDIO_CONFIG_7_1_4; if ( args.inConfig.ambisonicsBuses->audioConfig != IVAS_AUDIO_CONFIG_INVALID && args.outConfig.audioConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR ) { hrtf_set_audio_cfg = args.inConfig.ambisonicsBuses->audioConfig; } if ( ( error = load_Crend_HRTF_from_binary( *hHrtfCrend, hrtfFileReader, args.outConfig.audioConfig, hrtf_set_audio_cfg, args.sampleRate ) ) != IVAS_ERR_OK ) #else if ( ( error = create_SetOfHRTF_from_binary( *hSetOfHRTF, hrtfFileReader, args.sampleRate ) ) != IVAS_ERR_OK ) #endif { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { Loading @@ -935,7 +953,11 @@ int main( } else { #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM destroy_crend_hrtf( hHrtfCrend ); #else destroy_SetOfHRTF( hSetOfHRTF ); #endif } } Loading @@ -945,7 +967,11 @@ int main( goto cleanup; } #ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, args.outConfig.audioConfig, args.inConfig.ambisonicsBuses->audioConfig, hrtfFileReader ) ) != IVAS_ERR_OK ) #else if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, 0, IVAS_AUDIO_CONFIG_INVALID, hrtfFileReader ) ) != IVAS_ERR_OK ) #endif { if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA ) { Loading Loading @@ -1952,7 +1978,9 @@ cleanup: Vector3PairFileReader_close( &referenceVectorReader ); destroy_td_hrtf( hHrtfTD ); #ifndef FIX_1227_Crend_HRTF_LOADING_OPTIM destroy_SetOfHRTF( hSetOfHRTF ); #endif destroy_hrtf_statistics( hHrtfStatistics ); IVAS_REND_Close( &hIvasRend ); IsmPositionProvider_close( positionProvider ); Loading Loading @@ -2495,6 +2523,9 @@ static CmdlnArgs defaultArgs( args.outConfig.audioConfig = IVAS_AUDIO_CONFIG_INVALID; args.outConfig.outSetupCustom.num_spk = 0; args.outConfig.outSetupCustom.num_lfe = 0; #ifdef FIX_1227_Crend_HRTF_LOADING_OPTIM args.inConfig.ambisonicsBuses->audioConfig = IVAS_AUDIO_CONFIG_INVALID; #endif for ( int32_t i = 0; i < RENDERER_MAX_ISM_INPUTS; ++i ) { Loading
ci/complexity_measurements/genWebpageData.py +12 −0 Original line number Diff line number Diff line Loading @@ -425,6 +425,18 @@ def create_display_strings( displays.append(display) if which == "wmops_per_op": # flot.js' "stack: true" depends on the order of data arrays # reorder here instead of reworking above loop displays_encs = displays[0].split(", \n") displays_decs = displays[1].split(", \n") displays = [ displays_encs[0], displays_decs[0], displays_encs[1], displays_decs[1], ] return displays Loading
ci/complexity_measurements/getWmops.sh +6 −2 Original line number Diff line number Diff line Loading @@ -73,7 +73,8 @@ config_file="scripts/config/ci_linux_ltv.json" # get wmops newsletter ivas_format_for_filename=${ivas_format// /-} wmopsFilenameFlcLast=wmops_newsletter_${ivas_format_for_filename}_to_${output_format}__${commit_sha}_${date} wmopsFilenameFlc=${destDir}/wmops/logs/${wmopsFilenameFlcLast} wmopsFilenameFlcDir=${destDir}/wmops/logs wmopsFilenameFlc=${wmopsFilenameFlcDir}/${wmopsFilenameFlcLast} ret_val=0 Loading @@ -92,6 +93,9 @@ ret_val=$? ### WMOPS ${scriptDir}/parseNewsletterWmops.py ${wmopsFilenameFlc}_WMOPS.csv ${wmopsFilenameFlcLast}_WMOPS.csv ${commit_sha} ${shortDate} ${fullDate} >>${destDir}/wmops/log_wmops_all.txt # create copy of WMOPS csv file with special name to easily get it from artifacts when comparing BASOP to float numbers cp ${wmopsFilenameFlc}_WMOPS.csv ${wmopsFilenameFlcDir}/latest_WMOPS.csv # get memory info for webpage ### RAM ${scriptDir}/mergeNewsletterRam.py ${wmopsFilenameFlc}_HEAP.csv ${wmopsFilenameFlc}_STACK.csv >${wmopsFilenameFlc}_RAM.csv Loading
ci/complexity_measurements/index_complexity.html +72 −29 Original line number Diff line number Diff line Loading @@ -648,30 +648,61 @@ function WMOPS_perOP() { previousPoint = item.datapoint; $("#tooltip").remove(); var encData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[0]; var decData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[1]; var encData, decData; var encRefData, decRefData; var text = ""; if (Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays.length == 2) { encData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[0]; decData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[1]; var x = item.datapoint[0]; var y = item.datapoint[1]; var scoreEnc = parseFloat(encData.data[x][1]); var scoreDec = parseFloat(decData.data[x][1]); var scoreEnc = Math.max(parseFloat(encData.data[x][1]), 0); var scoreDec = Math.max(parseFloat(decData.data[x][1]), 0); var scoreCodec = Math.round((scoreEnc + scoreDec) * 100) / 100; var text = ""; text += "<b><u>Mode: " + Graphs_WMOPS_perOP.wmops_worstcase_per_op.runs[x].operatingPoint + "</u></b><br>"; text += 'Score: ' + Math.round(y * 100) / 100; if (graph.direction == -1) text += " WMOPS"; if( item.series.id == "worstCaseEnc" ){ text += " (enc)"; text += "Worst case enc: " + scoreEnc + " WMOPS<br>"; text += "Worst case dec: " + scoreDec + " WMOPS<br>"; text += "Worst case codec: " + scoreCodec + " WMOPS<br><br>"; var nEntriesWmopsGraph = Graphs_WMOPS.wmops_worstcase.runs.length - 1; text += "<a href=\"logs/" + Graphs_WMOPS.wmops_worstcase.runs[nEntriesWmopsGraph].logFile + "\">Logfile</a><br>"; } if( item.series.id == "worstCaseDec" ){ text += " (enc + dec)"; else if (Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays.length == 4) { encData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[0]; decData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[1]; encRefData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[2]; decRefData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[3]; var x = item.datapoint[0]; var y = item.datapoint[1]; var run = Graphs_WMOPS_perOP.wmops_worstcase_per_op.runs[x]; var op = run.operatingPoint; var codec = op.split(" - ")[1]; var scoreEnc, scoreDec; if (codec == "FLT REF") { x = (x - 1) / 2; scoreEnc = Math.max(parseFloat(encRefData.data[x][1]), 0); scoreDec = Math.max(parseFloat(decRefData.data[x][1]), 0); } else if (codec == "BASOP") { x = x / 2; scoreEnc = Math.max(parseFloat(encData.data[x][1]), 0); scoreDec = Math.max(parseFloat(decData.data[x][1]), 0); } text += "<br><br>"; var scoreCodec = Math.round((scoreEnc + scoreDec) * 100) / 100; text += "<b><u>Mode: " + op + "</u></b><br>"; text += "Worst case enc: " + scoreEnc + " WMOPS<br>"; text += "Worst case dec: " + scoreDec + " WMOPS<br>"; Loading @@ -679,7 +710,7 @@ function WMOPS_perOP() { var nEntriesWmopsGraph = Graphs_WMOPS.wmops_worstcase.runs.length - 1; text += "<a href=\"logs/" + Graphs_WMOPS.wmops_worstcase.runs[nEntriesWmopsGraph].logFile + "\">Logfile</a><br>"; } showToolTip(item.pageX, item.pageY, text); }); Loading @@ -689,7 +720,19 @@ function WMOPS_perOP() { $(document).ready(function () { // need to get worst case of enc + dec combined, because values are stacked in the graph var max = get_max_y_val_for_plotting(Graphs_WMOPS.wmops_worstcase.displays, 50); var displays = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays; var encData, decData; if (displays.length == 2) { encData = [displays[0]]; decData = [displays[1]]; } else if (displays.length == 4) { encData = [displays[0], displays[2]]; decData = [displays[1], displays[3]]; } var max_enc = get_max_y_val_for_plotting(encData, 1); var max_dec = get_max_y_val_for_plotting(decData, 1); var max = Math.ceil( (max_enc + max_dec ) / 50) * 50; drawGraph($("#wmops_per_op-graph"), Graphs_WMOPS_perOP.wmops_worstcase_per_op, max); }); Loading