From 3a9743d05de925224ac0cda0453434498fd5b263 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Wed, 14 Jun 2023 07:11:37 +0200 Subject: [PATCH 001/175] 5ms API first step, not completely BE yet --- apps/decoder.c | 795 ++++++++++++++++--- lib_com/ivas_error.h | 5 + lib_com/options.h | 3 + lib_dec/ivas_binRenderer_internal.c | 8 + lib_dec/ivas_dirac_dec.c | 24 +- lib_dec/ivas_init_dec.c | 11 +- lib_dec/ivas_ism_dec.c | 5 +- lib_dec/ivas_ism_param_dec.c | 37 +- lib_dec/ivas_ism_renderer.c | 32 + lib_dec/ivas_jbm_dec.c | 76 +- lib_dec/ivas_masa_dec.c | 6 + lib_dec/ivas_mc_param_dec.c | 14 +- lib_dec/ivas_mct_dec.c | 5 +- lib_dec/ivas_objectRenderer_internal.c | 13 +- lib_dec/ivas_sba_dec.c | 6 +- lib_dec/ivas_spar_decoder.c | 4 + lib_dec/ivas_stat_dec.h | 4 + lib_dec/lib_dec.c | 691 ++++++++++++++-- lib_dec/lib_dec.h | 37 +- lib_rend/ivas_crend.c | 8 + lib_rend/ivas_dirac_dec_binaural_functions.c | 12 + lib_rend/ivas_objectRenderer.c | 4 + lib_rend/ivas_rotation.c | 14 + lib_rend/ivas_stat_rend.h | 5 + lib_rend/lib_rend.c | 14 +- 25 files changed, 1632 insertions(+), 201 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 7ceda8f6f3..5113b8e242 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -85,6 +85,9 @@ static #ifdef JBM_TSM_ON_TCS #define JBM_FRONTEND_FETCH_FRAMESIZE_MS 20 #endif +#ifdef API_5MS +#define HEADROTATION_FETCH_FRAMESIZE_MS 5 +#endif typedef struct { @@ -121,7 +124,9 @@ typedef struct bool renderConfigEnabled; char *renderConfigFilename; IVAS_DEC_COMPLEXITY_LEVEL complexityLevel; - +#ifdef API_5MS + bool tsmEnabled; +#endif #ifdef DEBUGGING IVAS_DEC_FORCED_REND_MODE forcedRendMode; #ifdef DEBUG_FOA_AGC @@ -131,7 +136,9 @@ typedef struct bool noBadFrameDelay; #endif #ifdef VARIABLE_SPEED_DECODING +#ifndef API_5MS bool variableSpeedMode; +#endif bool tsmScaleFileEnabled; char *tsmScaleFileName; uint16_t tsmScale; @@ -388,7 +395,11 @@ int main( *------------------------------------------------------------------------------------------*/ #ifdef FIX_356_ISM_METADATA_SYNC #ifdef FIX_439_OTR_PARAMS +#ifdef API_5MS + if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.tsmEnabled, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) +#else if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) +#endif #else if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) #endif @@ -412,12 +423,17 @@ int main( if ( arg.voipMode ) { +#ifdef API_5MS + if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) +#else if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, IVAS_DEC_VOIP_MODE_VOIP, 100, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) +#endif { fprintf( stderr, "\nCould not enable VOIP: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } } +#ifndef API_5MS #ifdef VARIABLE_SPEED_DECODING #ifdef DEBUGGING else if ( arg.variableSpeedMode ) @@ -431,6 +447,7 @@ int main( #endif #endif #endif +#endif #ifdef DEBUGGING /*-----------------------------------------------------------------* @@ -465,7 +482,11 @@ int main( #ifdef VARIABLE_SPEED_DECODING #ifdef DEBUGGING +#ifdef API_5MS + if ( arg.tsmEnabled ) +#else if ( arg.variableSpeedMode ) +#endif { if ( arg.tsmScaleFileEnabled ) { @@ -671,6 +692,7 @@ int main( #endif error = decodeVoIP( arg, hBsReader, hIvasDec ); } +#ifndef API_5MS #ifdef VARIABLE_SPEED_DECODING #ifdef DEBUGGING else if ( arg.variableSpeedMode ) @@ -678,6 +700,7 @@ int main( error = decodeVariableSpeed( arg, hBsReader, headRotReader, refRotReader, referenceVectorReader, hIvasDec ); } #endif +#endif #endif else { @@ -913,10 +936,14 @@ static bool parseCmdlIVAS_dec( arg->inputFormat = IVAS_DEC_INPUT_FORMAT_G192; arg->Opt_non_diegetic_pan = 0; arg->non_diegetic_pan_gain = 0.f; - +#ifdef API_5MS + arg->tsmEnabled = false; +#endif #ifdef DEBUGGING #ifdef VARIABLE_SPEED_DECODING +#ifndef API_5MS arg->variableSpeedMode = false; +#endif arg->tsmScale = 100; arg->tsmScaleFileEnabled = false; arg->tsmScaleFileName = NULL; @@ -1067,7 +1094,11 @@ static bool parseCmdlIVAS_dec( { i++; int32_t tmp = 100; +#ifdef API_5MS + arg->tsmEnabled = true; +#else arg->variableSpeedMode = true; +#endif if ( i < argc - 3 ) { if ( !is_digits_only( argv[i] ) ) @@ -1626,7 +1657,7 @@ static ivas_error initOnFirstGoodFrame( * * Read G.192 bitstream and decode in regular decoder *---------------------------------------------------------------------*/ - +#ifdef API_5MS static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, @@ -1650,20 +1681,58 @@ static ivas_error decodeG192( int16_t numInitialBadFrames = 0; /* Number of bad frames received until first good frame is decoded */ int16_t nOutChannels = 0; int16_t delayNumSamples = -1; - int16_t delayNumSamples_orig[3]; /* stores: overall delay, dec+rend delay, and binauralization delay */ + int16_t delayNumSamples_orig[3]; int16_t nOutSamples = 0; int32_t delayTimeScale = 0; ivas_error error = IVAS_ERR_UNKNOWN; uint16_t numObj = 0; IVAS_DEC_BS_FORMAT bsFormat = IVAS_DEC_BS_UNKOWN; - IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; - + uint16_t nSamplesAvailableNext; + bool needNewFrame; + int16_t nSamplesRendered, nSamplesRendered_loop, nSamplesToRender; +#ifdef DEBUGGING +#ifdef VARIABLE_SPEED_DECODING + TsmScaleFileReader *tsmScaleFileReader = NULL; + int16_t scale; +#endif +#endif IsmFileWriter *ismWriters[IVAS_MAX_NUM_OBJECTS]; + IVAS_VECTOR3 Pos; + int16_t vec_pos_update, vec_pos_len; + + for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; ++i ) { ismWriters[i] = NULL; } + /* we always start with needing a new frame */ + needNewFrame = true; + +#ifdef DEBUGGING +#ifdef VARIABLE_SPEED_DECODING + /*------------------------------------------------------------------------------------------* + * Open TSM scale file or set global TSM scale + *------------------------------------------------------------------------------------------*/ + + if ( arg.tsmEnabled ) + { + if ( arg.tsmScaleFileEnabled ) + { + if ( ( tsmScaleFileReader = TsmScaleFileReader_open( arg.tsmScaleFileName ) ) == NULL ) + { + fprintf( stderr, "\nError: Can't open TSM scale file %s \n\n", arg.tsmScaleFileName ); + goto cleanup; + } + } + else + { + IVAS_DEC_VoIP_SetScale( hIvasDec, arg.tsmScale, arg.tsmScale ); + } + } +#endif +#endif + if ( !arg.quietModeEnabled ) { fprintf( stdout, "\n------ Running the decoder ------\n\n" ); @@ -1680,7 +1749,19 @@ static ivas_error decodeG192( reset_stack(); reset_wmops(); #endif + nSamplesAvailableNext = 0; + vec_pos_update = 0; + if ( arg.enableHeadRotation ) + { + nOutSamples = (int16_t) ( arg.output_Fs / 1000 * HEADROTATION_FETCH_FRAMESIZE_MS ); + vec_pos_len = IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; + } + else + { + nOutSamples = (int16_t) ( arg.output_Fs / 1000 * VARIABLE_SPEED_FETCH_FRAMESIZE_MS ); + vec_pos_len = 1; + } /*------------------------------------------------------------------------------------------* * Loop for every packet (frame) of bitstream data * - Read the bitstream packet @@ -1690,42 +1771,10 @@ static ivas_error decodeG192( while ( 1 ) { - /* Read next frame */ - if ( ( error = BS_Reader_ReadFrame_short( hBsReader, bit_stream, &num_bits, &bfi ) ) != IVAS_ERR_OK ) - { - if ( error == IVAS_ERR_END_OF_FILE ) - { - break; - } - fprintf( stderr, "\nError: input bitstream file couldn't be read: %s \n\n", arg.inputBitstreamFilename ); - goto cleanup; - } - -#ifdef DEBUGGING - /* Random FEC simulation */ - if ( arg.FER > 0.0f ) - { - float ftmp = (float) app_own_random( &fec_seed ) + 32768.0f; - if ( ftmp <= arg.FER / 100.0f * 65535.0f ) - { - bfi = 1; - } - else - { - bfi = 0; - } - } -#endif - - /* Feed into decoder */ - if ( ( error = IVAS_DEC_FeedFrame_Serial( hIvasDec, bit_stream, num_bits, bfi ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError: could not feed frame to decoder: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } + /* Read next frame if not enough samples availble */ /* reference vector */ - if ( arg.enableReferenceVectorTracking ) + if ( arg.enableReferenceVectorTracking && vec_pos_update == 0 ) { IVAS_VECTOR3 listenerPosition, referencePosition; if ( ( error = Vector3PairFileReader_read( referenceVectorReader, &listenerPosition, &referencePosition ) ) != IVAS_ERR_OK ) @@ -1740,8 +1789,9 @@ static ivas_error decodeG192( goto cleanup; } } + /* Reference rotation */ - if ( arg.enableReferenceRotation ) + if ( arg.enableReferenceRotation && vec_pos_update == 0 ) { IVAS_QUATERNION quaternion; if ( ( error = HeadRotationFileReading( refRotReader, &quaternion, NULL ) ) != IVAS_ERR_OK ) @@ -1756,31 +1806,95 @@ static ivas_error decodeG192( goto cleanup; } } + /* Head-tracking input simulation */ if ( arg.enableHeadRotation ) { - IVAS_QUATERNION Quaternions[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; + IVAS_QUATERNION Quaternion; - for ( i = 0; i < IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) + if ( ( error = HeadRotationFileReading( headRotReader, &Quaternion, &Pos ) ) != IVAS_ERR_OK ) { - if ( ( error = HeadRotationFileReading( headRotReader, &Quaternions[i], &Pos[i] ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( headRotReader ) ); - goto cleanup; - } + fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( headRotReader ) ); + goto cleanup; } - if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions, Pos ) ) != IVAS_ERR_OK ) + + if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternion, Pos ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } } - /* Run decoder for one frame (get rendered output) */ - if ( ( error = IVAS_DEC_GetSamples( hIvasDec, pcmBuf, &nOutSamples ) ) != IVAS_ERR_OK ) + + /* decode and get samples */ + nSamplesRendered = 0; + nSamplesToRender = nOutSamples; + do { - fprintf( stderr, "\nError: could not get samples from decoder: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; + if ( needNewFrame ) + { +#ifdef DEBUGGING +#ifdef VARIABLE_SPEED_DECODING + if ( arg.tsmScaleFileEnabled ) + { + if ( ( error = TsmScaleFileReader_readScale( tsmScaleFileReader, &scale ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError: input bitstream file couldn't be read: %s \n\n", arg.inputBitstreamFilename ); + goto cleanup; + } + IVAS_DEC_VoIP_SetScale( hIvasDec, scale, scale ); + } +#endif +#endif + + if ( ( error = BS_Reader_ReadFrame_short( hBsReader, bit_stream, &num_bits, &bfi ) ) != IVAS_ERR_OK ) + { + if ( error == IVAS_ERR_END_OF_FILE ) + { + break; + } + fprintf( stderr, "\nError: input bitstream file couldn't be read: %s \n\n", arg.inputBitstreamFilename ); + goto cleanup; + } + +#ifdef DEBUGGING + /* Random FEC simulation */ + if ( arg.FER > 0.0f ) + { + float ftmp = (float) app_own_random( &fec_seed ) + 32768.0f; + if ( ftmp <= arg.FER / 100.0f * 65535.0f ) + { + bfi = 1; + } + else + { + bfi = 0; + } + } +#endif + + /* Feed into decoder */ + if ( ( error = IVAS_DEC_FeedFrame_Serial( hIvasDec, bit_stream, num_bits, bfi ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError: could not feed frame to decoder: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } + error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, pcmBuf + nOutChannels * nSamplesRendered, &nSamplesRendered_loop, &needNewFrame ); + nSamplesRendered += nSamplesRendered_loop; + nSamplesToRender -= nSamplesRendered_loop; + if ( error != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + + } while ( nSamplesRendered < nOutSamples && error == IVAS_ERR_OK ); + + if ( error == IVAS_ERR_END_OF_FILE ) + { + break; } /* Continue checking for first good frame until it is found */ @@ -1838,7 +1952,7 @@ static ivas_error decodeG192( } } - /* Write ISM metadata to external file(s) */ + /* Write ISm metadata to external file(s) */ if ( decodedGoodFrame && arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) { if ( bsFormat == IVAS_DEC_BS_OBJ ) @@ -1884,6 +1998,7 @@ static ivas_error decodeG192( } frame++; + vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; if ( !arg.quietModeEnabled ) { fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); @@ -1895,77 +2010,552 @@ static ivas_error decodeG192( #endif } #ifdef WMOPS - update_mem(); update_wmops(); +#ifdef MEM_COUNT_DETAILS + export_mem( "mem_analysis.csv" ); +#endif #endif } - /*------------------------------------------------------------------------------------------* - * Add zeros at the end to have equal length of synthesized signals - *------------------------------------------------------------------------------------------*/ - - memset( pcmBuf, 0, delayNumSamples_orig[0] * nOutChannels * sizeof( int16_t ) ); - - if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, delayNumSamples_orig[0] * nOutChannels ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError writing output file: %s\n", ivas_error_to_string( error ) ); - goto cleanup; - } /*------------------------------------------------------------------------------------------* - * Printouts after decoding has finished + * Flush what is still left in the VoIP Buffers.... *------------------------------------------------------------------------------------------*/ - if ( !arg.quietModeEnabled ) + while ( nSamplesAvailableNext > 0 ) { - printf( "\n\nDecoder+renderer delay: %4.2f ms (%3u samples at timescale %5u)\n", 1000.f * delayNumSamples_orig[1] / (float) delayTimeScale, delayNumSamples_orig[1], delayTimeScale ); + int16_t nSamplesFlushed; - if ( delayNumSamples_orig[2] > 0 ) - { - printf( "HRIR/BRIR delay: %4.2f ms (%3u samples at timescale %5u)\n", 1000.f * delayNumSamples_orig[2] / (float) delayTimeScale, delayNumSamples_orig[2], delayTimeScale ); - printf( "Total delay: %4.2f ms (%3u samples at timescale %5u)\n", 1000.f * ( delayNumSamples_orig[1] + delayNumSamples_orig[2] ) / (float) delayTimeScale, delayNumSamples_orig[1] + delayNumSamples_orig[2], delayTimeScale ); - } - } + /* Feed into decoder */ - /* Print output metadata file name(s) */ - if ( arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) - { - if ( bsFormat == IVAS_DEC_BS_OBJ ) + /* reference vector */ + if ( arg.enableReferenceVectorTracking ) { - for ( i = 0; i < numObj; i++ ) + IVAS_VECTOR3 listenerPosition, referencePosition; + if ( ( error = Vector3PairFileReader_read( referenceVectorReader, &listenerPosition, &referencePosition ) ) != IVAS_ERR_OK ) { - fprintf( stdout, "\nOutput metadata file: %s", IsmFileWriter_getFilePath( ismWriters[i] ) ); + fprintf( stderr, "\nError %s while reading listener and reference positions from %s\n", IVAS_DEC_GetErrorMessage( error ), Vector3PairFileReader_getFilePath( referenceVectorReader ) ); + goto cleanup; + } + + if ( ( error = IVAS_DEC_FeedRefVectorData( hIvasDec, listenerPosition, referencePosition ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedRefVectorData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; } - fprintf( stdout, "\n" ); } - else if ( bsFormat == IVAS_DEC_BS_MASA ) + /* Reference rotation */ + if ( arg.enableReferenceRotation ) { - fprintf( stdout, "\nOutput metadata file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); - } - } + IVAS_QUATERNION quaternion; + if ( ( error = HeadRotationFileReading( refRotReader, &quaternion, NULL ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading reference rotation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( refRotReader ) ); + goto cleanup; + } - /*------------------------------------------------------------------------------------------* - * Close files and deallocate resources - *------------------------------------------------------------------------------------------*/ + if ( ( error = IVAS_DEC_FeedRefRotData( hIvasDec, quaternion ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedRefRotData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } + /* Head-tracking input simulation */ + if ( arg.enableHeadRotation ) + { + IVAS_QUATERNION Quaternion; - decodingFailed = false; /* This will stay set to true if cleanup is reached via a goto due to an error */ -cleanup: + if ( ( error = HeadRotationFileReading( headRotReader, &Quaternion, &Pos ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( headRotReader ) ); + goto cleanup; + } - AudioFileWriter_close( &afWriter ); - MasaFileWriter_close( &masaWriter ); - for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; i++ ) - { - IsmFileWriter_close( &ismWriters[i] ); - } - if ( decodingFailed && error == IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternion, Pos ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } + + /* decode and get samples */ + if ( ( error = IVAS_DEC_VoIP_Flush( hIvasDec, nOutSamples, pcmBuf, &nSamplesAvailableNext, &nSamplesFlushed ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_VoIP_Flush: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + /* Write current frame */ + if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, nSamplesFlushed * nOutChannels ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nOutput audio file writer error\n" ); + goto cleanup; + } + + /* Write ISm metadata to external file(s) */ + if ( decodedGoodFrame && arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) + { + if ( bsFormat == IVAS_DEC_BS_OBJ ) + { + if ( ( error = IVAS_DEC_GetNumObjects( hIvasDec, &numObj ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetNumObjects: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + for ( i = 0; i < numObj; ++i ) + { + IVAS_ISM_METADATA IsmMetadata; + + if ( ( error = IVAS_DEC_GetObjectMetadata( hIvasDec, &IsmMetadata, 0, i ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetObjectMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + if ( ( IsmFileWriter_writeFrame( IsmMetadata, ismWriters[i] ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing ISM metadata to file %s\n", IsmFileWriter_getFilePath( ismWriters[i] ) ); + goto cleanup; + } + } + } + else if ( bsFormat == IVAS_DEC_BS_MASA ) + { + MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta; + if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); + goto cleanup; + } + } + } + + frame++; + if ( !arg.quietModeEnabled ) + { + fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); +#ifdef DEBUGGING + if ( IVAS_DEC_GetBerDetectFlag( hIvasDec ) ) + { + fprintf( stdout, "\n Decoding error: BER detected in frame %d !!!!!\n", frame - 1 ); + } +#endif + } + } + + /*------------------------------------------------------------------------------------------* + * Printouts after decoding has finished + *------------------------------------------------------------------------------------------*/ + + if ( !arg.quietModeEnabled ) + { + printf( "\n\nDecoder+renderer delay: %4.2f ms (%3u samples at timescale %5u)\n", 1000.f * delayNumSamples_orig[1] / (float) delayTimeScale, delayNumSamples_orig[1], delayTimeScale ); + + if ( delayNumSamples_orig[2] > 0 ) + { + printf( "HRIR/BRIR delay: %4.2f ms (%3u samples at timescale %5u)\n", 1000.f * delayNumSamples_orig[2] / (float) delayTimeScale, delayNumSamples_orig[2], delayTimeScale ); + printf( "Total delay: %4.2f ms (%3u samples at timescale %5u)\n", 1000.f * ( delayNumSamples_orig[1] + delayNumSamples_orig[2] ) / (float) delayTimeScale, delayNumSamples_orig[1] + delayNumSamples_orig[2], delayTimeScale ); + } + } + + /* Print output metadata file name(s) */ + if ( arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) + { + if ( bsFormat == IVAS_DEC_BS_OBJ ) + { + for ( i = 0; i < numObj; i++ ) + { + fprintf( stdout, "\nOutput metadata file: %s", IsmFileWriter_getFilePath( ismWriters[i] ) ); + } + fprintf( stdout, "\n" ); + } + else if ( bsFormat == IVAS_DEC_BS_MASA ) + { + fprintf( stdout, "\nOutput metadata file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); + } + } + + /* add zeros at the end to have equal length of synthesized signals */ + memset( pcmBuf, 0, delayNumSamples_orig[0] * nOutChannels * sizeof( int16_t ) ); + if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, delayNumSamples_orig[0] * nOutChannels ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing output file: %s\n", ivas_error_to_string( error ) ); + goto cleanup; + } + + /*------------------------------------------------------------------------------------------* + * Close files and deallocate resources + *------------------------------------------------------------------------------------------*/ + + decodingFailed = false; /* This will stay set to true if cleanup is reached via a goto due to an error */ + +cleanup: + + AudioFileWriter_close( &afWriter ); + MasaFileWriter_close( &masaWriter ); + TsmScaleFileReader_close( &tsmScaleFileReader ); + for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; i++ ) + { + IsmFileWriter_close( &ismWriters[i] ); + } + + if ( decodingFailed && error == IVAS_ERR_OK ) + { + return IVAS_ERR_UNKNOWN; + } + + return error; +} +#else +static ivas_error decodeG192( + DecArguments arg, + BS_READER_HANDLE hBsReader, + HeadRotFileReader *headRotReader, + HeadRotFileReader *refRotReader, + Vector3PairFileReader *referenceVectorReader, + IVAS_DEC_HANDLE hIvasDec, + int16_t *pcmBuf ) + +{ + bool decodingFailed = true; /* Assume failure until cleanup is reached without errors */ + uint16_t bit_stream[IVAS_MAX_BITS_PER_FRAME + 4 * 8]; + int16_t i, num_bits; + int16_t bfi = 0; +#ifdef DEBUGGING + int16_t fec_seed = 12558; /* FEC_SEED */ +#endif + AudioFileWriter *afWriter = NULL; + MasaFileWriter *masaWriter = NULL; + bool decodedGoodFrame = false; + int16_t numInitialBadFrames = 0; /* Number of bad frames received until first good frame is decoded */ + int16_t nOutChannels = 0; + int16_t delayNumSamples = -1; + int16_t delayNumSamples_orig[3]; /* stores: overall delay, dec+rend delay, and binauralization delay */ + int16_t nOutSamples = 0; + int32_t delayTimeScale = 0; + ivas_error error = IVAS_ERR_UNKNOWN; + uint16_t numObj = 0; + IVAS_DEC_BS_FORMAT bsFormat = IVAS_DEC_BS_UNKOWN; + IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; + + IsmFileWriter *ismWriters[IVAS_MAX_NUM_OBJECTS]; + for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; ++i ) + { + ismWriters[i] = NULL; + } + + if ( !arg.quietModeEnabled ) + { + fprintf( stdout, "\n------ Running the decoder ------\n\n" ); + fprintf( stdout, "Frames processed: " ); + } + else + { + fprintf( stdout, "\n-- Start the decoder (quiet mode) --\n\n" ); + } + + delayNumSamples_orig[0] = -1; + +#ifdef WMOPS + reset_stack(); + reset_wmops(); +#endif + + /*------------------------------------------------------------------------------------------* + * Loop for every packet (frame) of bitstream data + * - Read the bitstream packet + * - Run the decoder + * - Write the synthesized signal into output file + *------------------------------------------------------------------------------------------*/ + + while ( 1 ) + { + /* Read next frame */ + if ( ( error = BS_Reader_ReadFrame_short( hBsReader, bit_stream, &num_bits, &bfi ) ) != IVAS_ERR_OK ) + { + if ( error == IVAS_ERR_END_OF_FILE ) + { + break; + } + fprintf( stderr, "\nError: input bitstream file couldn't be read: %s \n\n", arg.inputBitstreamFilename ); + goto cleanup; + } + +#ifdef DEBUGGING + /* Random FEC simulation */ + if ( arg.FER > 0.0f ) + { + float ftmp = (float) app_own_random( &fec_seed ) + 32768.0f; + if ( ftmp <= arg.FER / 100.0f * 65535.0f ) + { + bfi = 1; + } + else + { + bfi = 0; + } + } +#endif + + /* Feed into decoder */ + if ( ( error = IVAS_DEC_FeedFrame_Serial( hIvasDec, bit_stream, num_bits, bfi ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError: could not feed frame to decoder: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + /* reference vector */ + if ( arg.enableReferenceVectorTracking ) + { + IVAS_VECTOR3 listenerPosition, referencePosition; + if ( ( error = Vector3PairFileReader_read( referenceVectorReader, &listenerPosition, &referencePosition ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading listener and reference positions from %s\n", IVAS_DEC_GetErrorMessage( error ), Vector3PairFileReader_getFilePath( referenceVectorReader ) ); + goto cleanup; + } + + if ( ( error = IVAS_DEC_FeedRefVectorData( hIvasDec, listenerPosition, referencePosition ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedRefVectorData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } + /* Reference rotation */ + if ( arg.enableReferenceRotation ) + { + IVAS_QUATERNION quaternion; + if ( ( error = HeadRotationFileReading( refRotReader, &quaternion, NULL ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading reference rotation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( refRotReader ) ); + goto cleanup; + } + + if ( ( error = IVAS_DEC_FeedRefRotData( hIvasDec, quaternion ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedRefRotData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } + /* Head-tracking input simulation */ + if ( arg.enableHeadRotation ) + { + IVAS_QUATERNION Quaternions[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; + + for ( i = 0; i < IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) + { + if ( ( error = HeadRotationFileReading( headRotReader, &Quaternions[i], &Pos[i] ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( headRotReader ) ); + goto cleanup; + } + } + + if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions, Pos ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } + /* Run decoder for one frame (get rendered output) */ + if ( ( error = IVAS_DEC_GetSamples( hIvasDec, pcmBuf, &nOutSamples ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError: could not get samples from decoder: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + /* Continue checking for first good frame until it is found */ + if ( !decodedGoodFrame ) + { + if ( ( error = IVAS_DEC_HasDecodedFirstGoodFrame( hIvasDec, &decodedGoodFrame ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_HasDecodedFirstGoodFrame, code: %d\n", error ); + goto cleanup; + } + + /* Once good frame decoded, catch up */ + if ( decodedGoodFrame ) + { + error = initOnFirstGoodFrame( + hIvasDec, + arg, + numInitialBadFrames, + nOutSamples, + delayNumSamples_orig, + &delayNumSamples, + &delayTimeScale, + &bsFormat, + &afWriter, + &masaWriter, + ismWriters, + &nOutChannels, + &numObj ); + if ( error != IVAS_ERR_OK ) + { + goto cleanup; + } + } + else + { + ++numInitialBadFrames; + } + } + + /* Write current frame */ + if ( decodedGoodFrame ) + { + if ( delayNumSamples < nOutSamples ) + { + if ( ( error = AudioFileWriter_write( afWriter, &pcmBuf[delayNumSamples * nOutChannels], nOutSamples * nOutChannels - ( delayNumSamples * nOutChannels ) ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nOutput audio file writer error\n" ); + goto cleanup; + } + delayNumSamples = 0; + } + else + { + delayNumSamples -= nOutSamples; + } + } + + /* Write ISM metadata to external file(s) */ + if ( decodedGoodFrame && arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) + { + if ( bsFormat == IVAS_DEC_BS_OBJ ) + { + if ( ( error = IVAS_DEC_GetNumObjects( hIvasDec, &numObj ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetNumObjects: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + for ( i = 0; i < numObj; ++i ) + { + IVAS_ISM_METADATA IsmMetadata; + + if ( ( error = IVAS_DEC_GetObjectMetadata( hIvasDec, &IsmMetadata, 0, i ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetObjectMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + if ( ( IsmFileWriter_writeFrame( IsmMetadata, ismWriters[i] ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing ISM metadata to file %s\n", IsmFileWriter_getFilePath( ismWriters[i] ) ); + goto cleanup; + } + } + } + else if ( bsFormat == IVAS_DEC_BS_MASA ) + { + MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta; + if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); + goto cleanup; + } + } + } + + frame++; + if ( !arg.quietModeEnabled ) + { + fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); +#ifdef DEBUGGING + if ( IVAS_DEC_GetBerDetectFlag( hIvasDec ) ) + { + fprintf( stdout, "\n Decoding error: BER detected in frame %d !!!!!\n", frame - 1 ); + } +#endif + } +#ifdef WMOPS + update_mem(); + update_wmops(); +#endif + } + + /*------------------------------------------------------------------------------------------* + * Add zeros at the end to have equal length of synthesized signals + *------------------------------------------------------------------------------------------*/ + + memset( pcmBuf, 0, delayNumSamples_orig[0] * nOutChannels * sizeof( int16_t ) ); + + if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, delayNumSamples_orig[0] * nOutChannels ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing output file: %s\n", ivas_error_to_string( error ) ); + goto cleanup; + } + + /*------------------------------------------------------------------------------------------* + * Printouts after decoding has finished + *------------------------------------------------------------------------------------------*/ + + if ( !arg.quietModeEnabled ) + { + printf( "\n\nDecoder+renderer delay: %4.2f ms (%3u samples at timescale %5u)\n", 1000.f * delayNumSamples_orig[1] / (float) delayTimeScale, delayNumSamples_orig[1], delayTimeScale ); + + if ( delayNumSamples_orig[2] > 0 ) + { + printf( "HRIR/BRIR delay: %4.2f ms (%3u samples at timescale %5u)\n", 1000.f * delayNumSamples_orig[2] / (float) delayTimeScale, delayNumSamples_orig[2], delayTimeScale ); + printf( "Total delay: %4.2f ms (%3u samples at timescale %5u)\n", 1000.f * ( delayNumSamples_orig[1] + delayNumSamples_orig[2] ) / (float) delayTimeScale, delayNumSamples_orig[1] + delayNumSamples_orig[2], delayTimeScale ); + } + } + + /* Print output metadata file name(s) */ + if ( arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) + { + if ( bsFormat == IVAS_DEC_BS_OBJ ) + { + for ( i = 0; i < numObj; i++ ) + { + fprintf( stdout, "\nOutput metadata file: %s", IsmFileWriter_getFilePath( ismWriters[i] ) ); + } + fprintf( stdout, "\n" ); + } + else if ( bsFormat == IVAS_DEC_BS_MASA ) + { + fprintf( stdout, "\nOutput metadata file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); + } + } + + /*------------------------------------------------------------------------------------------* + * Close files and deallocate resources + *------------------------------------------------------------------------------------------*/ + + decodingFailed = false; /* This will stay set to true if cleanup is reached via a goto due to an error */ + +cleanup: + + AudioFileWriter_close( &afWriter ); + MasaFileWriter_close( &masaWriter ); + for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; i++ ) + { + IsmFileWriter_close( &ismWriters[i] ); + } + + if ( decodingFailed && error == IVAS_ERR_OK ) { return IVAS_ERR_UNKNOWN; } return error; } +#endif #ifdef DEBUGGING /*---------------------------------------------------------------------* @@ -2241,9 +2831,11 @@ static ivas_error decodeVoIP( while ( 1 ) { int16_t nOutSamples = 0; +#ifndef API_5MS #if defined( JBM_TSM_ON_TCS ) || defined( VARIABLE_SPEED_DECODING ) uint16_t nSamplesAvailableNext = 0; #endif +#endif #ifdef JBM_TSM_ON_TCS #ifdef DEBUG_JBM_CMD_OPTION nOutSamples = (int16_t) ( arg.output_Fs / 1000 * arg.frontendFetchSizeMs ); @@ -2309,10 +2901,12 @@ static ivas_error decodeVoIP( /* decode and get samples */ if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, systemTime_ms +#ifndef API_5MS #if defined( JBM_TSM_ON_TCS ) || defined( VARIABLE_SPEED_DECODING ) , &nSamplesAvailableNext #endif +#endif #ifdef SUPPORT_JBM_TRACEFILE , writeJbmTraceFileFrameWrapper, @@ -2522,6 +3116,7 @@ cleanup: #ifdef DEBUGGING +#ifndef API_5MS #ifdef VARIABLE_SPEED_DECODING /*---------------------------------------------------------------------* * decodeVariableSpeed() @@ -2694,7 +3289,7 @@ static ivas_error decodeVariableSpeed( fprintf( stderr, "\nError: input bitstream file couldn't be read: %s \n\n", arg.inputBitstreamFilename ); goto cleanup; } - IVAS_DEC_VoIP_SetScale( hIvasDec, scale ); + IVAS_DEC_VoIP_SetScale( hIvasDec, scale, scale ); } if ( ( error = BS_Reader_ReadFrame_short( hBsReader, bit_stream, &num_bits, &bfi ) ) != IVAS_ERR_OK ) @@ -3057,7 +3652,7 @@ cleanup: return error; } #endif - +#endif /*---------------------------------------------------------------------* * parseForcedRendModeDec() diff --git a/lib_com/ivas_error.h b/lib_com/ivas_error.h index 56e09c558d..c444553021 100644 --- a/lib_com/ivas_error.h +++ b/lib_com/ivas_error.h @@ -93,6 +93,11 @@ typedef enum #ifdef VARIABLE_SPEED_DECODING IVAS_ERR_VS_FRAME_NEEDED, #endif +#ifdef API_5MS + IVAS_ERR_TSM_NOT_ENABLED, + IVAS_ERR_FETCH_SIZE_NO_MULTIPLE_OF_5MS, + IVAS_ERR_NEED_NEW_FRAME, +#endif #endif /*----------------------------------------* diff --git a/lib_com/options.h b/lib_com/options.h index 42d6a6a471..85195e86cc 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -227,6 +227,9 @@ #define FIX_170_DTX_MASA /* Nokia: Fix issue 170, relaxing the use of DTX in MASA format */ #define FIX_510 /* FhG: fix issue 510, misleading error message for invalid input format */ #define FIX_509 /* FhG: fix issue 509, too low number of bitsream indices in SBA */ +#define FIX_XXX_JITTER_SBA_BINAURAL_GAIN + +#define API_5MS /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index 240205706f..2cea0226c5 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -1221,14 +1221,22 @@ void ivas_binRenderer( } /* Head rotation in HOA3 or CICPx */ +#ifdef API_5MS + if ( hHeadTrackData && hBinRenderer->rotInCldfb ) +#else if ( hHeadTrackData && hHeadTrackData->num_quaternions >= 0 && hBinRenderer->rotInCldfb ) +#endif { if ( hBinRenderer->hInputSetup->is_loudspeaker_setup == 0 ) { /* Rotation in SHD (HOA3) */ if ( hHeadTrackData->shd_rot_max_order == -1 ) { +#ifdef API_5MS + QuatToRotMat( hHeadTrackData->Quaternion, hHeadTrackData->Rmat ); +#else QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], hHeadTrackData->Rmat ); +#endif #ifdef JBM_TSM_ON_TCS rotateFrame_shd_cldfb( RealBuffer, ImagBuffer, hHeadTrackData->Rmat, hBinRenderer->hInputSetup->nchan_out_woLFE, numTimeSlots, 3 ); #else diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 502420781f..8ab712b762 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1166,7 +1166,11 @@ ivas_error ivas_dirac_dec_config( /* allocate transport channels*/ if ( flag_config == DIRAC_OPEN ) { +#ifdef API_5MS + if ( st_ivas->hTcBuffer == NULL ) +#else if ( st_ivas->hDecoderConfig->voip_active == 1 && st_ivas->hTcBuffer == NULL ) +#endif { #ifndef SBA_MODE_CLEAN_UP if ( st_ivas->sba_mode == SBA_MODE_DIRAC ) @@ -2592,12 +2596,12 @@ void ivas_dirac_dec( *------------------------------------------------------------------------*/ void ivas_dirac_dec_render( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ - const int16_t nchan_transport, /* i : number of transport channels */ - const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ - uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ - uint16_t *nSamplesAvailable, /* o : number of CLDFB slots still to render */ - float *output_f[] /* o : rendered time signal */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const int16_t nchan_transport, /* i : number of transport channels */ + const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ + uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ + uint16_t *nSamplesAvailableNext, /* o : number of CLDFB slots still to render */ + float *output_f[] /* o : rendered time signal */ ) { int16_t slots_to_render, first_sf, last_sf, subframe_idx; @@ -2653,7 +2657,7 @@ void ivas_dirac_dec_render( } } - *nSamplesAvailable = ( hDirAC->num_slots - hDirAC->slots_rendered ) * slot_size; + *nSamplesAvailableNext = ( hDirAC->num_slots - hDirAC->slots_rendered ) * slot_size; return; } @@ -2888,7 +2892,11 @@ void ivas_dirac_dec_render_sf( if ( st_ivas->hHeadTrackData ) #endif { - QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], st_ivas->hHeadTrackData->Rmat ); +#ifdef API_5MS + QuatToRotMat( st_ivas->hHeadTrackData->Quaternion, st_ivas->hHeadTrackData->Rmat ); +#else + QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], st_ivas->hHeadTrackData->Rmat ); +#endif p_Rmat = &st_ivas->hHeadTrackData->Rmat[0][0]; diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index b232078417..d696217825 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -1367,7 +1367,9 @@ ivas_error ivas_init_decoder( } #ifdef JBM_TSM_ON_TCS +#ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active ) +#endif { granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ); n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels( st_ivas ); @@ -1412,7 +1414,9 @@ ivas_error ivas_init_decoder( st_ivas->binaural_latency_ns = st_ivas->hCrendWrapper->binaural_latency_ns; #ifdef JBM_TSM_ON_TCS +#ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active ) +#endif { granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ); n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels( st_ivas ); @@ -1522,8 +1526,11 @@ ivas_error ivas_init_decoder( /*-----------------------------------------------------------------* * Allocate and initialize JBM struct + buffer *-----------------------------------------------------------------*/ - +#ifdef API_5MS + if ( st_ivas->hTcBuffer == NULL ) +#else if ( st_ivas->hDecoderConfig->voip_active && st_ivas->hTcBuffer == NULL ) +#endif { /* no module has yet open the TC buffer, open a default one */ n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels( st_ivas ); @@ -1534,6 +1541,7 @@ ivas_error ivas_init_decoder( } } +#ifndef API_5MS if ( st_ivas->hTcBuffer == NULL ) { /* we need the handle anyway, but without the buffer*/ @@ -1542,6 +1550,7 @@ ivas_error ivas_init_decoder( return error; } } +#endif #endif return error; diff --git a/lib_dec/ivas_ism_dec.c b/lib_dec/ivas_ism_dec.c index fe98ca0dcb..59baa05d9b 100644 --- a/lib_dec/ivas_ism_dec.c +++ b/lib_dec/ivas_ism_dec.c @@ -130,7 +130,9 @@ static ivas_error ivas_ism_bitrate_switching( } #ifdef JBM_TSM_ON_TCS +#ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active ) +#endif { /* transfer subframe info from DirAC or ParamMC to central tc buffer */ if ( last_ism_mode == ISM_MODE_PARAM && st_ivas->hDirAC != NULL && ( st_ivas->renderer_type != RENDERER_MONO_DOWNMIX && st_ivas->renderer_type != RENDERER_DISABLE ) ) @@ -331,8 +333,9 @@ static ivas_error ivas_ism_bitrate_switching( /*-----------------------------------------------------------------* * Reconfigure TC buffer *-----------------------------------------------------------------*/ - +#ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active == 1 ) +#endif { int16_t tc_nchan_full_new; DECODER_TC_BUFFER_HANDLE hTcBuffer; diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index da4ce92107..f782e32460 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -648,7 +648,11 @@ ivas_error ivas_param_ism_dec_open( { /* Initialize Param ISM Rendering handle */ #ifdef JBM_TSM_ON_TCS +#ifdef API_5MS + if ( st_ivas->hDecoderConfig->tsm_active ) +#else if ( st_ivas->hDecoderConfig->voip_active ) +#endif { if ( ( error = ivas_param_ism_rendering_init( hDirAC->hParamIsmRendering, hOutSetup, st_ivas->nchan_transport, MAX_JBM_CLDFB_TIMESLOTS, output_config ) ) != IVAS_ERR_OK ) { @@ -710,7 +714,9 @@ ivas_error ivas_param_ism_dec_open( st_ivas->hDirAC = hDirAC; #ifdef JBM_TSM_ON_TCS +#ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active ) +#endif { if ( st_ivas->renderer_type != RENDERER_MONO_DOWNMIX && st_ivas->renderer_type != RENDERER_DISABLE ) { @@ -724,7 +730,31 @@ ivas_error ivas_param_ism_dec_open( } else { +#ifdef API_5MS + int16_t n_slots_to_alloc; + if ( st_ivas->hDecoderConfig->tsm_active == 1 ) + { + n_slots_to_alloc = MAX_JBM_CLDFB_TIMESLOTS; + } + else + { + n_slots_to_alloc = CLDFB_SLOTS_PER_SUBFRAME * MAX_PARAM_SPATIAL_SUBFRAMES; + } + if ( ( hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc = (float *) malloc( n_slots_to_alloc * nchan_transport * hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) + + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM JBM Rendering handle\n" ) ); + } + set_zero( hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc, n_slots_to_alloc * nchan_transport * hDirAC->num_freq_bands ); + + if ( ( hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc = (float *) malloc( n_slots_to_alloc * nchan_transport * hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM JBM Rendering handle\n" ) ); + } + set_zero( hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc, n_slots_to_alloc * nchan_transport * hDirAC->num_freq_bands ); +#else if ( ( hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc = (float *) malloc( MAX_JBM_CLDFB_TIMESLOTS * nchan_transport * hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) + { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM JBM Rendering handle\n" ) ); } @@ -735,6 +765,7 @@ ivas_error ivas_param_ism_dec_open( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM JBM Rendering handle\n" ) ); } set_zero( hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc, MAX_JBM_CLDFB_TIMESLOTS * nchan_transport * hDirAC->num_freq_bands ); +#endif } if ( st_ivas->hTcBuffer == NULL ) { @@ -758,11 +789,13 @@ ivas_error ivas_param_ism_dec_open( } } } +#ifndef API_5MS else { hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc = NULL; hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc = NULL; } +#endif #endif pop_wmops(); @@ -1450,7 +1483,7 @@ void ivas_param_ism_dec_render( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ - uint16_t *nSamplesAvailable, /* o : number of CLDFB slots still to render */ + uint16_t *nSamplesAvailableNext, /* o : number of CLDFB slots still to render */ float *output_f[] /* o : rendered time signal */ ) { @@ -1532,7 +1565,7 @@ void ivas_param_ism_dec_render( } } - *nSamplesAvailable = ( hDirAC->num_slots - hDirAC->slots_rendered ) * slot_size; + *nSamplesAvailableNext = ( hDirAC->num_slots - hDirAC->slots_rendered ) * slot_size; return; } diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index 031c6cf18f..329f17e81e 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -87,7 +87,11 @@ ivas_error ivas_ism_renderer_open( } #ifdef JBM_TSM_ON_TCS +#ifdef API_5MS + if ( st_ivas->hDecoderConfig->tsm_active ) +#else if ( st_ivas->hDecoderConfig->voip_active ) +#endif { init_interpolator_length = NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_CLDFB_TIMESLOTS * CLDFB_SLOT_NS ); interpolator_length = (uint16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); @@ -159,10 +163,18 @@ void ivas_ism_render( set_f( output_f[i], 0.0f, output_frame ); } +#ifdef API_5MS + if ( st_ivas->hHeadTrackData != NULL ) +#else if ( st_ivas->hHeadTrackData != NULL && st_ivas->hHeadTrackData->num_quaternions >= 0 ) +#endif { /* Calculate rotation matrix from the quaternion */ +#ifdef API_5MS + QuatToRotMat( st_ivas->hHeadTrackData->Quaternion, Rmat ); +#else QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], Rmat ); +#endif } for ( i = 0; i < nchan_ism; i++ ) @@ -177,7 +189,11 @@ void ivas_ism_render( else { /* Head rotation: rotate the object positions depending the head's orientation */ +#ifdef API_5MS + if ( st_ivas->hHeadTrackData != NULL && !st_ivas->hIsmMetaData[i]->non_diegetic_flag ) +#else if ( st_ivas->hHeadTrackData != NULL && st_ivas->hHeadTrackData->num_quaternions >= 0 && !st_ivas->hIsmMetaData[i]->non_diegetic_flag ) +#endif { rotateAziEle( st_ivas->hIsmMetaData[i]->azimuth, st_ivas->hIsmMetaData[i]->elevation, &azimuth, &elevation, Rmat, st_ivas->hIntSetup.is_planar_setup ); } @@ -262,10 +278,18 @@ void ivas_ism_render_sf( set_f( output_f[i], 0.0f, n_samples_to_render ); } +#ifdef API_5MS + if ( st_ivas->hHeadTrackData != NULL ) +#else if ( st_ivas->hHeadTrackData != NULL && st_ivas->hHeadTrackData->num_quaternions >= 0 ) +#endif { /* Calculate rotation matrix from the quaternion */ +#ifdef API_5MS + QuatToRotMat( st_ivas->hHeadTrackData->Quaternion, Rmat ); +#else QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], Rmat ); +#endif ivas_jbm_dec_get_adapted_linear_interpolator( n_samples_to_render, n_samples_to_render, @@ -277,7 +301,11 @@ void ivas_ism_render_sf( { /* Head rotation: rotate the object positions depending the head's orientation */ #ifdef FIX_473_JITTER_NONDIEGETIC_PANNING +#ifdef API_5MS + if ( st_ivas->hHeadTrackData != NULL && !st_ivas->hIsmMetaData[i]->non_diegetic_flag ) +#else if ( st_ivas->hHeadTrackData != NULL && st_ivas->hHeadTrackData->num_quaternions >= 0 && !st_ivas->hIsmMetaData[i]->non_diegetic_flag ) +#endif #else if ( st_ivas->hHeadTrackData != NULL && st_ivas->hHeadTrackData->num_quaternions >= 0 ) #endif @@ -311,7 +339,11 @@ void ivas_ism_render_sf( } /* update here only in case of head rotation */ +#ifdef API_5MS + if ( st_ivas->hHeadTrackData != NULL ) +#else if ( st_ivas->hHeadTrackData != NULL && st_ivas->hHeadTrackData->num_quaternions >= 0 ) +#endif { st_ivas->hIsmRendererData->prev_gains[i][j] = gain; } diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 987c55f221..5a96069893 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -329,12 +329,30 @@ ivas_error ivas_jbm_dec_tc( } else if ( st_ivas->ivas_format == SBA_FORMAT && ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) { +#ifdef FIX_XXX_JITTER_SBA_BINAURAL_GAIN + float gain; + + if ( nchan_remapped == 1 ) + { + gain = 1.4454f; + } + else + { + gain = 1.3657f; + } + + for ( n = 0; n < nchan_remapped; n++ ) + { + v_multc( output[n], gain, output[n], output_frame ); + } +#else float gain = 0.8414f; /* Todo: Temporary gain for roughly matching the loudness. To be tuned later together with other outputs. */ for ( n = 0; n < nchan_remapped; n++ ) { v_multc( output[n], gain, output[n], output_frame ); } +#endif } } else if ( st_ivas->ivas_format == MC_FORMAT ) @@ -861,6 +879,12 @@ ivas_error ivas_jbm_dec_render( { ivas_param_mc_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); } +#ifdef API_5MS + else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) + { + return IVAS_ERR_NOT_IMPLEMENTED; + } +#endif else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) { int16_t offset = st_ivas->hDirAC->slots_rendered * st_ivas->hDirAC->slot_size; @@ -1369,6 +1393,12 @@ int16_t ivas_jbm_dec_get_num_tc_channels( } } } +#ifdef API_5MS + else if ( st_ivas->ivas_format == MONO_FORMAT && st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) + { + num_tc = MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN; + } +#endif return num_tc; } @@ -1522,9 +1552,26 @@ ivas_error ivas_jbm_dec_tc_buffer_open( } else { +#ifdef API_5MS + int16_t n_samp_full, n_samp_residual; +#else int16_t n_samp_full = ( NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_L_FRAME_NS ) + hTcBuffer->n_samples_granularity - 1 ); int16_t n_samp_residual = hTcBuffer->n_samples_granularity - 1; +#endif int32_t offset; +#ifdef API_5MS + if ( st_ivas->hDecoderConfig->tsm_active ) + { + n_samp_full = ( NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_L_FRAME_NS ) + hTcBuffer->n_samples_granularity - 1 ); + n_samp_residual = hTcBuffer->n_samples_granularity - 1; + } + else + { + n_samp_full = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + n_samp_residual = 0; + } +#endif + nsamp_to_allocate = hTcBuffer->nchan_buffer_full * n_samp_full; nsamp_to_allocate += nchan_residual * n_samp_residual; @@ -1628,8 +1675,18 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( /* realloc buffers */ free( hTcBuffer->tc_buffer ); - n_samp_full = ( NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_L_FRAME_NS ) + hTcBuffer->n_samples_granularity - 1 ); - n_samp_residual = hTcBuffer->n_samples_granularity - 1; +#ifdef API_5MS + if ( st_ivas->hDecoderConfig->tsm_active ) + { + n_samp_full = ( NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_L_FRAME_NS ) + hTcBuffer->n_samples_granularity - 1 ); + n_samp_residual = hTcBuffer->n_samples_granularity - 1; + } + else + { + n_samp_full = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + n_samp_residual = 0; + } +#endif nsamp_to_allocate = hTcBuffer->nchan_buffer_full * n_samp_full; nsamp_to_allocate += nchan_residual * n_samp_residual; @@ -1811,11 +1868,26 @@ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode( case RENDERER_PARAM_ISM: case RENDERER_BINAURAL_MIXER_CONV: case RENDERER_BINAURAL_MIXER_CONV_ROOM: +#ifdef API_5MS + buffer_mode = TC_BUFFER_MODE_RENDERER; + break; + case RENDERER_NON_DIEGETIC_DOWNMIX: + if ( st_ivas->ivas_format == MONO_FORMAT ) + { + buffer_mode = TC_BUFFER_MODE_BUFFER; + } + else + { + buffer_mode = TC_BUFFER_MODE_RENDERER; + } + break; +#else #ifdef FIX_473_JITTER_NONDIEGETIC_PANNING case RENDERER_NON_DIEGETIC_DOWNMIX: #endif buffer_mode = TC_BUFFER_MODE_RENDERER; break; +#endif case RENDERER_MC_PARAMMC: if ( st_ivas->hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) { diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index 8d6cebe036..96502f3326 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -416,7 +416,11 @@ ivas_error ivas_masa_dec_open( #ifdef JBM_TSM_ON_TCS /* allocate transport channels*/ +#ifdef API_5MS + if ( st_ivas->hTcBuffer == NULL && st_ivas->renderer_type != RENDERER_DISABLE && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) +#else if ( st_ivas->hDecoderConfig->voip_active == 1 && st_ivas->hTcBuffer == NULL && st_ivas->renderer_type != RENDERER_DISABLE && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) +#endif { int16_t nchan_to_allocate; TC_BUFFER_MODE buffer_mode; @@ -1300,7 +1304,9 @@ ivas_error ivas_masa_dec_reconfigure( ivas_masa_set_elements( ivas_total_brate, st_ivas->mc_mode, st_ivas->nchan_transport, st_ivas->hQMetaData, &tmp, &tmp, &tmp ); #ifdef JBM_TSM_ON_TCS +#ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active == 1 ) +#endif { int16_t tc_nchan_to_allocate; int16_t tc_nchan_transport; diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index 4be35d188e..d058f4d5ba 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -479,7 +479,11 @@ ivas_error ivas_param_mc_dec_open( ivas_param_mc_dec_init( hParamMC, nchan_transport, nchan_out_cov ); #ifdef JBM_TSM_ON_TCS +#ifdef API_5MS + if ( hParamMC->synthesis_conf != PARAM_MC_SYNTH_MONO_STEREO ) +#else if ( st_ivas->hDecoderConfig->voip_active && hParamMC->synthesis_conf != PARAM_MC_SYNTH_MONO_STEREO ) +#endif { if ( ( hParamMC->Cldfb_RealBuffer_tc = (float *) malloc( MAX_JBM_CLDFB_TIMESLOTS * nchan_transport * hParamMC->num_freq_bands * sizeof( float ) ) ) == NULL ) { @@ -1576,7 +1580,7 @@ void ivas_param_mc_dec_render( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ - uint16_t *nSamplesAvailable, /* o : number of CLDFB slots still to render */ + uint16_t *nSamplesAvailableNext, /* o : number of CLDFB slots still to render */ float *output_f[] /* o : rendered time signal */ ) { @@ -1840,7 +1844,7 @@ void ivas_param_mc_dec_render( param_mc_update_mixing_matrices( hParamMC, hParamMC->h_output_synthesis_cov_state.mixing_matrix, hParamMC->h_output_synthesis_cov_state.mixing_matrix_res, nchan_transport, nchan_out_cov ); } hParamMC->subframes_rendered = last_sf; - *nSamplesAvailable = ( hParamMC->num_slots - hParamMC->slots_rendered ) * NS2SA( output_Fs, CLDFB_SLOT_NS ); + *nSamplesAvailableNext = ( hParamMC->num_slots - hParamMC->slots_rendered ) * NS2SA( output_Fs, CLDFB_SLOT_NS ); pop_wmops(); return; @@ -1863,7 +1867,7 @@ void ivas_param_mc_dec( PARAM_MC_DEC_HANDLE hParamMC; float Cldfb_RealBuffer_in[PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_NSLOTS * CLDFB_NO_CHANNELS_MAX]; float Cldfb_ImagBuffer_in[PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_NSLOTS * CLDFB_NO_CHANNELS_MAX]; - uint16_t nSamplesAsked, nSamplesAvailable, nSamplesRendered; + uint16_t nSamplesAsked, nSamplesAvailableNext, nSamplesRendered; hParamMC = st_ivas->hParamMC; assert( hParamMC ); @@ -1875,10 +1879,10 @@ void ivas_param_mc_dec( nSamplesAsked = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); ivas_param_mc_dec_digest_tc( st_ivas, DEFAULT_JBM_CLDFB_TIMESLOTS, output_f ); - ivas_param_mc_dec_render( st_ivas, nSamplesAsked, &nSamplesRendered, &nSamplesAvailable, output_f ); + ivas_param_mc_dec_render( st_ivas, nSamplesAsked, &nSamplesRendered, &nSamplesAvailableNext, output_f ); #ifdef DEBUGGING assert( nSamplesRendered == nSamplesAsked ); - assert( nSamplesAvailable == 0 ); + assert( nSamplesAvailableNext == 0 ); #endif /* set handle pointers back to NULL */ diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index 46c4343800..81eb631741 100755 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -750,7 +750,9 @@ static ivas_error ivas_mc_dec_reconfig( ivas_output_init( &( st_ivas->hIntSetup ), st_ivas->intern_config ); #ifdef JBM_TSM_ON_TCS +#ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active ) +#endif { /* transfer subframe info from DirAC or ParamMC to central tc buffer */ if ( last_mc_mode == MC_MODE_PARAMMC ) @@ -1294,8 +1296,9 @@ static ivas_error ivas_mc_dec_reconfig( /*-----------------------------------------------------------------* * Reconfigure TC buffer *-----------------------------------------------------------------*/ - +#ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active == 1 ) +#endif { int16_t tc_nchan_full_new; DECODER_TC_BUFFER_HANDLE hTcBuffer; diff --git a/lib_dec/ivas_objectRenderer_internal.c b/lib_dec/ivas_objectRenderer_internal.c index ba14104ed9..c1347b85d9 100644 --- a/lib_dec/ivas_objectRenderer_internal.c +++ b/lib_dec/ivas_objectRenderer_internal.c @@ -90,8 +90,13 @@ ivas_error ivas_td_binaural_renderer( st_ivas->hReverb, st_ivas->transport_config, st_ivas->hBinRendererTd, st_ivas->nchan_transport, LFE_CHANNEL, st_ivas->ivas_format, +#ifdef API_5MS + st_ivas->hIsmMetaData, st_ivas->hDecoderConfig->Opt_Headrotation, ( st_ivas->hHeadTrackData != NULL ) ? &st_ivas->hHeadTrackData->Quaternion : NULL, + ( st_ivas->hHeadTrackData != NULL ) ? &st_ivas->hHeadTrackData->Pos : NULL, ism_md_subframe_update, output, output_frame ); +#else st_ivas->hIsmMetaData, st_ivas->hDecoderConfig->Opt_Headrotation, ( st_ivas->hHeadTrackData != NULL ) ? st_ivas->hHeadTrackData->Quaternions : NULL, ( st_ivas->hHeadTrackData != NULL ) ? st_ivas->hHeadTrackData->Pos : NULL, ism_md_subframe_update, output, output_frame ); +#endif #else return ivas_td_binaural_renderer_unwrap( st_ivas->hReverb, @@ -195,9 +200,15 @@ ivas_error ivas_td_binaural_renderer_sf( #endif /* Update the listener's location/orientation */ +#ifdef API_5MS + TDREND_Update_listener_orientation( st_ivas->hBinRendererTd, st_ivas->hDecoderConfig->Opt_Headrotation, + ( st_ivas->hHeadTrackData != NULL ) ? &st_ivas->hHeadTrackData->Quaternion : NULL, + ( st_ivas->hHeadTrackData != NULL ) ? &st_ivas->hHeadTrackData->Pos : NULL ); +#else TDREND_Update_listener_orientation( st_ivas->hBinRendererTd, st_ivas->hDecoderConfig->Opt_Headrotation, ( st_ivas->hHeadTrackData != NULL ) ? &st_ivas->hHeadTrackData->Quaternions[0] : NULL, ( st_ivas->hHeadTrackData != NULL ) ? st_ivas->hHeadTrackData->Pos : NULL ); +#endif if ( ( st_ivas->hRenderConfig != NULL ) && ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) ) { @@ -209,7 +220,7 @@ ivas_error ivas_td_binaural_renderer_sf( /* Render subframe */ #ifdef FIX_356_ISM_METADATA_SYNC - if ( ( error = TDREND_GetMix( st_ivas->hBinRendererTd, output_f_local, output_frame, 0, ism_md_subframe_update_jbm ) ) != IVAS_ERR_OK ) + if ( ( error = TDREND_GetMix( st_ivas->hBinRendererTd, output_f_local, output_frame, 0, ism_md_subframe_update_jbm != subframe_idx ) ) != IVAS_ERR_OK ) #else if ( ( error = TDREND_GetMix( st_ivas->hBinRendererTd, output_f_local, output_frame, 0 ) ) != IVAS_ERR_OK ) #endif diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 2d4c4cb2ab..d0e90ce9e2 100644 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -377,7 +377,9 @@ ivas_error ivas_sba_dec_reconfigure( * JBM TC buffer *-----------------------------------------------------------------*/ +#ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active == 1 ) +#endif { int16_t tc_nchan_to_allocate; int16_t tc_nchan_tc; @@ -524,7 +526,7 @@ void ivas_sba_dec_render( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ - uint16_t *nSamplesAvailable, /* o : number of CLDFB slots still to render */ + uint16_t *nSamplesAvailableNext, /* o : number of CLDFB slots still to render */ float *output_f[] /* o : rendered time signal */ ) { @@ -593,7 +595,7 @@ void ivas_sba_dec_render( } } - *nSamplesAvailable = ( hSpar->num_slots - hSpar->slots_rendered ) * slot_size; + *nSamplesAvailableNext = ( hSpar->num_slots - hSpar->slots_rendered ) * slot_size; return; } diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index 0d028b2359..3b28fb77ee 100755 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -221,7 +221,11 @@ ivas_error ivas_spar_dec_open( } /* allocate transport channels*/ +#ifdef API_5MS + if ( st_ivas->hTcBuffer == NULL ) +#else if ( st_ivas->hDecoderConfig->voip_active == 1 && st_ivas->hTcBuffer == NULL ) +#endif { int16_t nchan_to_allocate; int16_t nchan_tc; diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index aacaa7aa0f..8a53910080 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -1224,9 +1224,13 @@ typedef struct decoder_config_structure #ifdef DEBUGGING int16_t force_rend; /* forced TD/CLDFB binaural renderer (for ISM and MC) */ #endif +#ifdef API_5MS + int16_t tsm_active; +#else #ifdef JBM_TSM_ON_TCS int16_t voip_active; #endif +#endif #ifdef FIX_356_ISM_METADATA_SYNC int16_t Opt_delay_comp; /* flag indicating delay compensation active */ #endif diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 69b6e127fd..a090d90621 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -53,20 +53,26 @@ struct IVAS_DEC_VOIP { uint16_t nSamplesFrame; /* Total number of samples in a frame (includes number of channels) */ JB4_HANDLE hJBM; +#ifndef API_5MS PCMDSP_APA_HANDLE hTimeScaler; +#endif uint16_t lastDecodedWasActive; +#ifndef API_5MS #ifdef JBM_TSM_ON_TCS float *apaExecBuffer; /* Buffer for APA scaling */ #else int16_t *apaExecBuffer; /* Buffer for APA scaling */ +#endif #endif JB4_DATAUNIT_HANDLE hCurrentDataUnit; /* Points to the currently processed data unit */ uint16_t *bs_conversion_buf; /* Buffer for bitstream conversion from packed to serial */ +#ifndef API_5MS #ifdef VARIABLE_SPEED_DECODING IVAS_DEC_VOIP_MODE voipMode; uint16_t speedFac; bool needNewFrame; #endif + #ifdef JBM_TSM_ON_TCS JBM_RENDERER_TYPE rendererType; PCMDSP_FIFO_HANDLE hFifoOut; @@ -75,6 +81,7 @@ struct IVAS_DEC_VOIP #else PCMDSP_FIFO_HANDLE hFifoAfterTimeScaler; #endif +#endif #ifdef SUPPORT_JBM_TRACEFILE IVAS_JBM_TRACE_DATA JbmTraceData; #endif @@ -92,8 +99,20 @@ struct IVAS_DEC bool hasDecodedFirstGoodFrame; /* False on init. Gets set to true after first good frame has been decoded -> all bitstream information is known from that point on */ bool isInitialized; - int16_t bitstreamformat; /* Bitstream format flag (G.192/MIME/VOIP_G192_RTP/VOIP_RTPDUMP) */ - bool Opt_VOIP; /* flag indicating VOIP mode with JBM */ + int16_t bitstreamformat; /* Bitstream format flag (G.192/MIME/VOIP_G192_RTP/VOIP_RTPDUMP) */ + bool Opt_VOIP; /* flag indicating VOIP mode with JBM */ +#ifdef API_5MS + bool Opt_TSM; /* flag indicating TSM mode*/ + int16_t tsm_scale; /* scale for TSM operation */ + int16_t tsm_max_scaling; + float *apaExecBuffer; /* Buffer for APA scaling */ + PCMDSP_APA_HANDLE hTimeScaler; + bool needNewFrame; + bool hasBeenFedFrame; + uint16_t nSamplesAvailableNext; + int16_t nSamplesRendered; + int16_t nTransportChannelsOld; +#endif int16_t amrwb_rfc4867_flag; /* MIME from rfc4867 is used */ int16_t sdp_hf_only; /* RTP payload format parameter: only Header-Full format without zero padding for size collision avoidance */ int16_t prev_ft_speech; /* RXDTX handler: previous frametype flag for G.192 format AMRWB SID_FIRST detection */ @@ -123,7 +142,7 @@ static void init_decoder_config( DECODER_CONFIG_HANDLE hDecoderConfig, const int #ifdef JBM_TSM_ON_TCS static int16_t IVAS_DEC_VoIP_GetRenderGranularity( Decoder_Struct *st_ivas ); static JBM_RENDERER_TYPE IVAS_DEC_VoIP_GetRendererConfig( IVAS_DEC_HANDLE hIvasDec ); -static ivas_error IVAS_DEC_VoIP_reconfigure( IVAS_DEC_HANDLE hIvasDec, const uint16_t nTransportChannels, const uint16_t l_ts ); +static ivas_error IVAS_DEC_reconfigure( IVAS_DEC_HANDLE hIvasDec, const uint16_t nTransportChannels, const uint16_t l_ts ); static ivas_error IVAS_DEC_Setup( IVAS_DEC_HANDLE hIvasDec, uint16_t *nTcBufferGranularity, uint8_t *nTransportChannels, uint8_t *nOutChannels, uint16_t *nSamplesRendered, int16_t *data ); static ivas_error IVAS_DEC_GetTcSamples( IVAS_DEC_HANDLE hIvasDec, float *pcmBuf, int16_t *nOutSamples ); static ivas_error IVAS_DEC_RendererFeedTcSamples( IVAS_DEC_HANDLE hIvasDec, const int16_t nSamplesForRendering, int16_t *nSamplesResidual, float *pcmBuf ); @@ -165,6 +184,18 @@ ivas_error IVAS_DEC_Open( } hIvasDec = *phIvasDec; hIvasDec->hVoIP = NULL; +#ifdef API_5MS + hIvasDec->apaExecBuffer = NULL; + hIvasDec->hTimeScaler = NULL; + hIvasDec->Opt_TSM = false; + hIvasDec->tsm_scale = 100; + hIvasDec->needNewFrame = false; + hIvasDec->nTransportChannelsOld = 0; + hIvasDec->nSamplesAvailableNext = 0; + hIvasDec->nSamplesRendered = 0; + hIvasDec->nSamplesFrame = 0; + hIvasDec->hasBeenFedFrame = false; +#endif hIvasDec->hasBeenFedFirstGoodFrame = false; hIvasDec->hasDecodedFirstGoodFrame = false; hIvasDec->isInitialized = false; @@ -275,10 +306,13 @@ static void init_decoder_config( #endif hDecoderConfig->Opt_non_diegetic_pan = 0; hDecoderConfig->non_diegetic_pan_gain = 0; - +#ifdef API_5MS + hDecoderConfig->tsm_active = 0; +#else #ifdef JBM_TSM_ON_TCS hDecoderConfig->voip_active = 0; #endif +#endif #ifdef FIX_356_ISM_METADATA_SYNC hDecoderConfig->Opt_delay_comp = 0; @@ -316,6 +350,14 @@ void IVAS_DEC_Close( ( *phIvasDec )->st_ivas = NULL; } +#ifdef API_5MS + apa_exit( &( *phIvasDec )->hTimeScaler ); + + if ( ( *phIvasDec )->apaExecBuffer != NULL ) + { + free( ( *phIvasDec )->apaExecBuffer ); + } +#endif free( *phIvasDec ); *phIvasDec = NULL; phIvasDec = NULL; @@ -442,9 +484,12 @@ ivas_error IVAS_DEC_Configure( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const uint32_t sampleRate, /* i : output sampling frequency */ const IVAS_DEC_AUDIO_CONFIG outputFormat, /* i : output format */ - const int16_t customLsOutputEnabled, /* i : enable custom loudspeaker setup handle */ - const int16_t hrtfReaderEnabled, /* i : enable HRTF binary file input */ - const int16_t enableHeadRotation, /* i : enable head rotation for binaural output */ +#ifdef API_5MS + const int16_t tsmEnabled, /* i : enable TSM */ +#endif + const int16_t customLsOutputEnabled, /* i : enable custom loudspeaker setup handle */ + const int16_t hrtfReaderEnabled, /* i : enable HRTF binary file input */ + const int16_t enableHeadRotation, /* i : enable head rotation for binaural output */ #ifdef FIX_439_OTR_PARAMS const HEAD_ORIENT_TRK_T orientation_tracking, /* i : head orientation tracking type */ #endif @@ -526,6 +571,16 @@ ivas_error IVAS_DEC_Configure( hIvasDec->st_ivas->ivas_format = MONO_FORMAT; } +#ifdef API_5MS + hDecoderConfig->tsm_active = tsmEnabled; + hIvasDec->Opt_TSM = tsmEnabled; + hIvasDec->nSamplesFrame = (uint16_t) ( hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + hIvasDec->nSamplesAvailableNext = 0; + hIvasDec->nSamplesRendered = 0; + hIvasDec->tsm_scale = 100; + hIvasDec->tsm_max_scaling = 100; +#endif + return error; } @@ -540,9 +595,11 @@ ivas_error IVAS_DEC_Configure( ivas_error IVAS_DEC_EnableVoIP( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ +#ifndef API_5MS #ifdef VARIABLE_SPEED_DECODING const IVAS_DEC_VOIP_MODE voipMode, /* i : VoIP or variable speed */ const uint16_t speedFac, /* i : speed factor for variable speed */ +#endif #endif const int16_t jbmSafetyMargin, /* i : allowed delay reserve for JBM, in milliseconds */ const IVAS_DEC_INPUT_FORMAT inputFormat /* i : format of the input bitstream */ @@ -566,9 +623,14 @@ ivas_error IVAS_DEC_EnableVoIP( hDecoderConfig = hIvasDec->st_ivas->hDecoderConfig; hIvasDec->Opt_VOIP = 1; +#ifdef API_5MS + hIvasDec->Opt_TSM = 1; + hDecoderConfig->tsm_active = 1; +#else #ifdef JBM_TSM_ON_TCS hDecoderConfig->voip_active = 1; #endif +#endif #ifdef JBM_TSM_ON_TCS if ( hDecoderConfig->output_config != AUDIO_CONFIG_EXTERNAL ) @@ -602,25 +664,31 @@ ivas_error IVAS_DEC_EnableVoIP( hIvasDec->hVoIP->lastDecodedWasActive = 0; hIvasDec->hVoIP->hCurrentDataUnit = NULL; +#ifndef API_5MS #ifdef VARIABLE_SPEED_DECODING hIvasDec->hVoIP->voipMode = voipMode; hIvasDec->hVoIP->speedFac = speedFac; hIvasDec->hVoIP->needNewFrame = false; #endif +#endif #ifdef JBM_TSM_ON_TCS hIvasDec->hVoIP->nSamplesFrame = (uint16_t) ( hDecoderConfig->output_Fs / FRAMES_PER_SEC ); +#ifndef API_5MS hIvasDec->hVoIP->nSamplesAvailableNext = 0; hIvasDec->hVoIP->rendererType = JBM_RENDERER_NONE; hIvasDec->hVoIP->hFifoOut = NULL; +#endif #else hIvasDec->hVoIP->nSamplesFrame = (uint16_t) ( hDecoderConfig->output_Fs * hDecoderConfig->nchan_out / FRAMES_PER_SEC ); #endif +#ifndef API_5MS #ifdef JBM_TSM_ON_TCS /* postpone init of the buffers until we know the real number of TCs*/ hIvasDec->hVoIP->apaExecBuffer = NULL; hIvasDec->hVoIP->nTransportChannelsOld = 0; #else +#endif hIvasDec->hVoIP->apaExecBuffer = malloc( sizeof( int16_t ) * APA_BUF_PER_CHANNEL * hDecoderConfig->nchan_out ); if ( hIvasDec->hVoIP->apaExecBuffer == NULL ) @@ -640,10 +708,12 @@ ivas_error IVAS_DEC_EnableVoIP( } /* initialize JBM */ +#ifndef API_5MS #ifdef VARIABLE_SPEED_DECODING hIvasDec->hVoIP->hJBM = NULL; if ( hIvasDec->hVoIP->voipMode == IVAS_DEC_VOIP_MODE_VOIP ) { +#endif #endif if ( ( error = JB4_Create( &hIvasDec->hVoIP->hJBM ) != IVAS_ERR_OK ) != IVAS_ERR_OK ) { @@ -653,9 +723,11 @@ ivas_error IVAS_DEC_EnableVoIP( { return IVAS_ERR_FAILED_ALLOC; } +#ifndef API_5MS #ifdef VARIABLE_SPEED_DECODING } #endif +#endif #ifndef JBM_TSM_ON_TCS if ( hDecoderConfig->output_Fs == 8000 ) { @@ -683,6 +755,7 @@ ivas_error IVAS_DEC_EnableVoIP( } #endif +#ifndef API_5MS #ifdef JBM_TSM_ON_TCS /* postpone init of time scaler and output FIFO until we know the real number of TCs */ hIvasDec->hVoIP->hTimeScaler = NULL; @@ -721,6 +794,7 @@ ivas_error IVAS_DEC_EnableVoIP( return IVAS_ERR_INIT_ERROR; } #endif +#endif #endif return error; @@ -766,9 +840,13 @@ ivas_error IVAS_DEC_FeedFrame_Serial( { hIvasDec->st_ivas->hDecoderConfig->ivas_total_brate = ACELP_8k00; } +#ifdef API_5MS + hIvasDec->isInitialized = true; +#endif } - +#ifndef API_5MS hIvasDec->isInitialized = true; +#endif } if ( !bfi ) /* TODO(mcjbm): Is this ok for bfi == 2 (partial frame)? Is there enough info to fully configure decoder? */ @@ -810,11 +888,18 @@ ivas_error IVAS_DEC_FeedFrame_Serial( st->use_partial_copy = 1; } +#ifdef API_5MS + hIvasDec->needNewFrame = false; + hIvasDec->hasBeenFedFrame = true; + hIvasDec->nSamplesRendered = 0; + hIvasDec->nSamplesAvailableNext = hIvasDec->nSamplesFrame; +#else #ifdef VARIABLE_SPEED_DECODING if ( hIvasDec->hVoIP != NULL && hIvasDec->hVoIP->voipMode == IVAS_DEC_VOIP_MODE_VARIABLE_SPEED ) { hIvasDec->hVoIP->needNewFrame = false; } +#endif #endif return error; @@ -826,7 +911,7 @@ ivas_error IVAS_DEC_FeedFrame_Serial( * * Main function to decode to PCM data *---------------------------------------------------------------------*/ - +#ifndef API_5MS ivas_error IVAS_DEC_GetSamples( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ @@ -876,6 +961,136 @@ ivas_error IVAS_DEC_GetSamples( return error; } +#else +ivas_error IVAS_DEC_GetSamples( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const int16_t nSamplesAsked, /* i: number of samples wanted by the caller */ + int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ + int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ + bool *needNewFrame /* indication that the decoder needs a new frame */ +) +{ + Decoder_Struct *st_ivas; + ivas_error error; + int16_t nOutSamplesElse, result, nSamplesToRender; + uint16_t nSamplesRendered, nSamplesRendered_loop, l_ts, nTimeScalerOutSamples; + uint8_t nTransportChannels, nOutChannels; + error = IVAS_ERR_OK; + nSamplesRendered = 0; + nOutChannels = 0; + + if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + st_ivas = hIvasDec->st_ivas; + + if ( !hIvasDec->hasBeenFedFrame && hIvasDec->nSamplesAvailableNext == 0 ) + { + /* no frame was fed, do nothing but ask for a frame */ + *needNewFrame = true; + *nOutSamples = 0; + hIvasDec->needNewFrame = true; + return error; + } + + /* check if we are still at the beginning with bad frames, put out zeroes, keep track of subframes */ + if ( !hIvasDec->isInitialized && hIvasDec->st_ivas->bfi ) + { + hIvasDec->hasBeenFedFrame = false; + set_s( pcmBuf, 0, hIvasDec->st_ivas->hDecoderConfig->nchan_out * nSamplesAsked ); + hIvasDec->nSamplesRendered += nSamplesAsked; + *nOutSamples = nSamplesAsked; + hIvasDec->nSamplesAvailableNext -= nSamplesAsked; + if ( hIvasDec->nSamplesAvailableNext == 0 ) + { + hIvasDec->needNewFrame = true; + *needNewFrame = true; + } + } + else + { + /* check if we need to run the setup function, tc decoding and feeding the renderer */ + if ( !hIvasDec->isInitialized || hIvasDec->hasBeenFedFrame ) + { + int16_t nResidualSamples, nSamplesTcsScaled; + /* setup */ + if ( ( error = IVAS_DEC_Setup( hIvasDec, &l_ts, &nTransportChannels, &nOutChannels, &nSamplesRendered_loop, pcmBuf + nSamplesRendered * nOutChannels ) ) != IVAS_ERR_OK ) + { + return error; + } + nSamplesRendered += nSamplesRendered_loop; + if ( nTransportChannels != hIvasDec->nTransportChannelsOld ) + { + IVAS_DEC_reconfigure( hIvasDec, nTransportChannels, l_ts ); + } + /* decode TCs only */ + if ( ( error = IVAS_DEC_GetTcSamples( hIvasDec, hIvasDec->apaExecBuffer, &nOutSamplesElse ) ) != IVAS_ERR_OK ) + { + return error; + } + + if ( hIvasDec->Opt_TSM ) + { + if ( apa_set_scale( hIvasDec->hTimeScaler, hIvasDec->tsm_scale ) != 0 ) + { + return IVAS_ERR_UNKNOWN; + } + result = apa_exec( hIvasDec->hTimeScaler, hIvasDec->apaExecBuffer, hIvasDec->nSamplesFrame * nTransportChannels, (uint16_t) hIvasDec->tsm_max_scaling, hIvasDec->apaExecBuffer, &nTimeScalerOutSamples ); + if ( result != 0 ) + { + return IVAS_ERR_UNKNOWN; + } + assert( nTimeScalerOutSamples <= APA_BUF ); + } + else + { + nTimeScalerOutSamples = hIvasDec->nSamplesFrame * nTransportChannels; + } + nSamplesTcsScaled = nTimeScalerOutSamples / nTransportChannels; + + /* render IVAS frames */ + + + if ( ( error = IVAS_DEC_RendererFeedTcSamples( hIvasDec, nSamplesTcsScaled, &nResidualSamples, hIvasDec->apaExecBuffer ) ) != IVAS_ERR_OK ) + { + return error; + } + + if ( hIvasDec->Opt_TSM ) + { + /* feed residual samples to TSM for the next call */ + if ( apa_set_renderer_residual_samples( hIvasDec->hTimeScaler, (uint16_t) nResidualSamples ) != 0 ) + { + return IVAS_ERR_UNKNOWN; + } + } + hIvasDec->hasBeenFedFrame = false; + } + /* render IVAS frames directly to the output buffer */ + nSamplesToRender = nSamplesAsked - nSamplesRendered; + if ( ( error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesRendered_loop, &hIvasDec->nSamplesAvailableNext, pcmBuf + nSamplesRendered * nOutChannels ) ) != IVAS_ERR_OK ) + { + return error; + } + nSamplesRendered += nSamplesRendered_loop; + nSamplesToRender -= nSamplesRendered_loop; + if ( hIvasDec->nSamplesAvailableNext == 0 ) + { + *needNewFrame = true; + hIvasDec->needNewFrame = true; + } + else + { + *needNewFrame = false; + } + } + + *nOutSamples = nSamplesRendered; + + return error; +} +#endif #ifdef JBM_TSM_ON_TCS @@ -1265,15 +1480,26 @@ ivas_error IVAS_DEC_GetMasaMetadata( *---------------------------------------------------------------------*/ ivas_error IVAS_DEC_FeedHeadTrackData( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ +#ifdef API_5MS + IVAS_QUATERNION orientation, /* i : head-tracking data, listener orientation */ + IVAS_VECTOR3 Pos /* i : listener position */ +#else IVAS_QUATERNION *orientation, /* i : head-tracking data, listener orientation */ IVAS_VECTOR3 *Pos /* i : listener position */ +#endif ) { HEAD_TRACK_DATA_HANDLE hHeadTrackData; +#ifndef API_5MS int16_t i; +#endif +#ifdef API_5MS + if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) +#else if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || orientation == NULL ) +#endif { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } @@ -1286,6 +1512,18 @@ ivas_error IVAS_DEC_FeedHeadTrackData( } /* Move head-tracking data to the decoder handle */ +#ifdef API_5MS + /* check for Euler angle signaling */ + if ( orientation.w == -3.0f ) + { + Euler2Quat( deg2rad( orientation.x ), deg2rad( orientation.y ), deg2rad( orientation.z ), &orientation ); + } + + ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, orientation, FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &hHeadTrackData->Quaternion ); + hHeadTrackData->Pos.x = Pos.x; + hHeadTrackData->Pos.y = Pos.y; + hHeadTrackData->Pos.z = Pos.z; +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { /* check for Euler angle signaling */ @@ -1301,6 +1539,7 @@ ivas_error IVAS_DEC_FeedHeadTrackData( } hIvasDec->st_ivas->hHeadTrackData->num_quaternions = 0; +#endif return IVAS_ERR_OK; } @@ -1824,7 +2063,6 @@ ivas_error IVAS_DEC_VoIP_FeedFrame( } #ifdef VARIABLE_SPEED_DECODING -#ifdef DEBUGGING /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_SetScale( ) * @@ -1833,20 +2071,220 @@ ivas_error IVAS_DEC_VoIP_FeedFrame( ivas_error IVAS_DEC_VoIP_SetScale( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - const int16_t scale /* i : TSM scale to set */ +#ifdef API_5MS + const int16_t maxScaling, +#endif + const int16_t scale /* i : TSM scale to set */ ) { ivas_error error; error = IVAS_ERR_OK; +#ifdef API_5MS + if ( hIvasDec->Opt_TSM == false ) + { + return IVAS_ERR_TSM_NOT_ENABLED; + } + else + { + hIvasDec->tsm_scale = scale; + hIvasDec->tsm_max_scaling = maxScaling; + } +#else hIvasDec->hVoIP->speedFac = scale; +#endif return error; } #endif + + +#ifdef API_5MS +/*---------------------------------------------------------------------* + * IVAS_DEC_VoIP_GetSamples( ) + * + * Main function to decode one frame in VoIP + *---------------------------------------------------------------------*/ + +ivas_error IVAS_DEC_VoIP_GetSamples( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + uint16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ + int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ + const uint32_t systemTimestamp_ms /* i : current system timestamp */ +#ifdef SUPPORT_JBM_TRACEFILE + , + JbmTraceFileWriterFn jbmWriterFn, + void *jbmWriter +#endif + +) +{ + Decoder_Struct *st_ivas; + DECODER_CONFIG_HANDLE hDecoderConfig; + IVAS_DEC_VOIP *hVoIP; + uint32_t extBufferedTime_ms, scale, maxScaling; +#ifndef API_5MS + uint16_t nTimeScalerOutSamples; +#endif + JB4_DATAUNIT_HANDLE dataUnit; +#ifndef API_5MS + int16_t nOutSamplesElse; +#endif + uint16_t extBufferedSamples; + int16_t timeScalingDone; + int16_t result; + ivas_error error; +#ifdef JBM_TSM_ON_TCS + int16_t nSamplesRendered; + uint16_t nSamplesTcsScaled; + uint8_t nTransportChannels; + uint8_t nOutChannels; #endif + error = IVAS_ERR_OK; + + st_ivas = hIvasDec->st_ivas; + hDecoderConfig = st_ivas->hDecoderConfig; + hVoIP = hIvasDec->hVoIP; + timeScalingDone = 0; + + nOutChannels = (uint8_t) st_ivas->hDecoderConfig->nchan_out; + nTransportChannels = 0; + nSamplesTcsScaled = hVoIP->nSamplesFrame; + nSamplesRendered = 0; + + if ( nSamplesPerChannel == 0 ) + { + return IVAS_ERR_WRONG_PARAMS; + } + + /* make sure that the FIFO after decoder/scaler contains at least one sound card frame (i.e. 20ms) */ + while ( nSamplesRendered < nSamplesPerChannel ) + { + if ( hIvasDec->nSamplesAvailableNext == 0 ) + { + int16_t nSamplesBuffered; + nSamplesBuffered = 0; + if ( hIvasDec->hasBeenFedFirstGoodFrame ) + { + IVAS_DEC_GetBufferedNumberOfSamples( hIvasDec, &nSamplesBuffered ); + } + extBufferedSamples = nSamplesRendered + nSamplesBuffered; + + extBufferedTime_ms = extBufferedSamples * 1000 / hDecoderConfig->output_Fs; + + dataUnit = NULL; + + + /* pop one access unit from the jitter buffer */ + result = JB4_PopDataUnit( hVoIP->hJBM, systemTimestamp_ms, extBufferedTime_ms, &dataUnit, &scale, &maxScaling ); + if ( result != 0 ) + { + return IVAS_ERR_UNKNOWN; + } + + + maxScaling = maxScaling * hDecoderConfig->output_Fs / 1000; + /* avoid time scaling multiple times in one sound card slot */ + if ( scale != 100U ) + { + if ( timeScalingDone ) + { + scale = 100; + } + else + { + timeScalingDone = 1; + } + } + + /* limit scale to range supported by time scaler */ + if ( scale < APA_MIN_SCALE ) + { + scale = APA_MIN_SCALE; + } + else if ( scale > APA_MAX_SCALE ) + { + scale = APA_MAX_SCALE; + } + + IVAS_DEC_VoIP_SetScale( hIvasDec, (int16_t) maxScaling, (int16_t) scale ); + + /* copy bitstream into decoder state */ + if ( dataUnit ) + { + hIvasDec->hVoIP->hCurrentDataUnit = dataUnit; + + bsCompactToSerial( dataUnit->data, hIvasDec->hVoIP->bs_conversion_buf, dataUnit->dataSize ); + IVAS_DEC_FeedFrame_Serial( hIvasDec, hIvasDec->hVoIP->bs_conversion_buf, dataUnit->dataSize, 0 ); + } + else if ( hIvasDec->hasDecodedFirstGoodFrame ) + { + /* Decoder has been initialized with first good frame - do PLC */ + IVAS_DEC_FeedFrame_Serial( hIvasDec, hIvasDec->hVoIP->bs_conversion_buf, 0, 1 ); + } + +#ifdef SUPPORT_JBM_TRACEFILE + /* jbmWriterFn and jbmWriter may be NULL if tracefile writing was not requested on CLI */ + if ( jbmWriterFn != NULL && jbmWriter != NULL ) + { + /* write JBM trace data entry */ + store_JbmData( hVoIP, dataUnit, systemTimestamp_ms, extBufferedSamples, hDecoderConfig->output_Fs ); + if ( ( jbmWriterFn( &hVoIP->JbmTraceData, jbmWriter ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing JBM Trace data to file\n" ); + return IVAS_ERR_UNKNOWN; + } + } +#endif + if ( dataUnit ) + { + if ( dataUnit->partial_frame != 0 ) + { + hVoIP->lastDecodedWasActive = 1; + } + else + { + hVoIP->lastDecodedWasActive = !dataUnit->silenceIndicator; + } + /* data unit memory is no longer used */ + JB4_FreeDataUnit( hVoIP->hJBM, dataUnit ); + } + if ( !hIvasDec->hasBeenFedFirstGoodFrame ) + { + hIvasDec->nSamplesAvailableNext = hIvasDec->nSamplesFrame; + hIvasDec->nSamplesRendered = 0; + } + } + /* decode */ + if ( !hIvasDec->hasBeenFedFirstGoodFrame ) + { + /* codec mode to use not known yet - simply output silence */ + /* directly set output zero */ + int16_t nSamplesToZero = min( nSamplesPerChannel, hIvasDec->nSamplesAvailableNext ); + set_s( pcmBuf + nSamplesRendered * nOutChannels, 0, nSamplesToZero * nOutChannels ); + nSamplesRendered += nSamplesToZero; + hIvasDec->nSamplesRendered += nSamplesToZero; + hIvasDec->nSamplesAvailableNext -= nSamplesToZero; + } + else + { + int16_t nSamplesToRender, nSamplesRendered_loop; + bool tmp; + nSamplesToRender = nSamplesPerChannel - nSamplesRendered; + + /* render IVAS frames directly to the output buffer */ + if ( ( error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, pcmBuf + nSamplesRendered * nOutChannels, &nSamplesRendered_loop, &tmp ) ) != IVAS_ERR_OK ) + { + return error; + } + nSamplesRendered += nSamplesRendered_loop; + } + } + return error; +} +#else /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_GetSamples( ) * @@ -2076,7 +2514,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( nSamplesRendered += nSamplesRendered_loop; if ( nTransportChannels != hVoIP->nTransportChannelsOld ) { - IVAS_DEC_VoIP_reconfigure( hIvasDec, nTransportChannels, l_ts ); + IVAS_DEC_reconfigure( hIvasDec, nTransportChannels, l_ts ); } /* decode TCs only */ @@ -2159,8 +2597,8 @@ ivas_error IVAS_DEC_VoIP_GetSamples( #ifdef VARIABLE_SPEED_DECODING if ( hVoIP->mode == IVAS_DEC_VOIP_MODE_VARIABLE_SPEED ) { - int16_t nSamplesAvailable = pcmdsp_fifo_nReadableSamplesPerChannel( hVoIP->hFifoAfterTimeScaler ); - if ( nSamplesAvailable < nSamplesPerChannel ) + int16_t nSamplesAvailableNext = pcmdsp_fifo_nReadableSamplesPerChannel( hVoIP->hFifoAfterTimeScaler ); + if ( nSamplesAvailableNext < nSamplesPerChannel ) { hVoIP->needNewFrame = true; } @@ -2312,6 +2750,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( return error; } +#endif /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_Flush( ) @@ -2331,7 +2770,9 @@ ivas_error IVAS_DEC_VoIP_Flush( ivas_error error; IVAS_DEC_VOIP *hVoIP; #ifdef JBM_TSM_ON_TCS +#ifndef API_5MS int16_t rendererPcmBuf[( MAX_OUTPUT_CHANNELS * L_FRAME_MAX * APA_MAX_SCALE ) / 100]; +#endif uint16_t nSamplesToRender; uint16_t nSamplesFlushedLocal; #endif @@ -2340,11 +2781,16 @@ ivas_error IVAS_DEC_VoIP_Flush( hVoIP = hIvasDec->hVoIP; #if defined( JBM_TSM_ON_TCS ) +#ifdef API_5MS + *nSamplesFlushed = min( nSamplesPerChannel, hIvasDec->nSamplesAvailableNext ); +#else *nSamplesFlushed = min( nSamplesPerChannel, hVoIP->nSamplesAvailableNext ); +#endif #else *nSamplesFlushed = min( nSamplesPerChannel, pcmdsp_fifo_nReadableSamplesPerChannel( hVoIP->hFifoAfterTimeScaler ) ); #endif +#ifndef API_5MS #ifdef JBM_TSM_ON_TCS if ( hVoIP->rendererType == JBM_RENDERER_NONE ) { @@ -2368,6 +2814,7 @@ ivas_error IVAS_DEC_VoIP_Flush( } else { + nSamplesToRender = (uint16_t) *nSamplesFlushed; /* render IVAS frames */ if ( ( error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesFlushedLocal, &hVoIP->nSamplesAvailableNext, rendererPcmBuf ) ) != IVAS_ERR_OK ) @@ -2389,7 +2836,15 @@ ivas_error IVAS_DEC_VoIP_Flush( *nSamplesFlushed = (int16_t) nSamplesFlushedLocal; } #endif +#else + nSamplesToRender = (uint16_t) *nSamplesFlushed; + /* render IVAS frames */ + if ( ( error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesFlushedLocal, &hIvasDec->nSamplesAvailableNext, pcmBuf ) ) != IVAS_ERR_OK ) + { + return error; + } +#endif return error; } #endif @@ -2410,7 +2865,11 @@ bool IVAS_DEC_VoIP_IsEmpty( ) { #ifdef JBM_TSM_ON_TCS +#ifdef API_5MS + return ( ( JB4_bufferedDataUnits( hIvasDec->hVoIP->hJBM ) == 0 ) && ( hIvasDec->nSamplesAvailableNext < nSamplesAsked ) ); +#else return ( ( JB4_bufferedDataUnits( hIvasDec->hVoIP->hJBM ) == 0 ) && ( hIvasDec->hVoIP->nSamplesAvailableNext < nSamplesAsked ) ); +#endif #else return JB4_bufferedDataUnits( hIvasDec->hVoIP->hJBM ) == 0; #endif @@ -2452,6 +2911,7 @@ static void IVAS_DEC_Close_VoIP( { JB4_Destroy( &hVoIP->hJBM ); +#ifndef API_5MS apa_exit( &hVoIP->hTimeScaler ); #ifdef JBM_TSM_ON_TCS @@ -2464,7 +2924,7 @@ static void IVAS_DEC_Close_VoIP( { free( hVoIP->apaExecBuffer ); } - +#endif if ( hVoIP->bs_conversion_buf != NULL ) { #define WMC_TOOL_SKIP @@ -2805,17 +3265,25 @@ static ivas_error printConfigInfo_dec( } } +#ifdef API_5MS + /*-----------------------------------------------------------------* + * Print VoIP mode info + *-----------------------------------------------------------------*/ + if ( st_ivas->hDecoderConfig->tsm_active ) + { + fprintf( stdout, "TSM mode: ON\n" ); + } +#else #ifdef JBM_TSM_ON_TCS /*-----------------------------------------------------------------* * Print VoIP mode info *-----------------------------------------------------------------*/ - if ( st_ivas->hDecoderConfig->voip_active ) { fprintf( stdout, "VoIP mode: ON\n" ); } #endif - +#endif return IVAS_ERR_OK; } @@ -3269,64 +3737,103 @@ static JBM_RENDERER_TYPE IVAS_DEC_VoIP_GetRendererConfig( * *---------------------------------------------------------------------*/ -ivas_error IVAS_DEC_VoIP_reconfigure( +ivas_error IVAS_DEC_reconfigure( IVAS_DEC_HANDLE hIvasDec, const uint16_t nTransportChannels, const uint16_t l_ts ) { IVAS_DEC_VOIP *hVoIP; +#ifdef API_5MS + int16_t apa_buffer_size; +#endif + ivas_error error; + hVoIP = hIvasDec->hVoIP; +#ifdef API_5MS + apa_buffer_size = hIvasDec->nSamplesFrame; +#endif +#ifdef API_5MS + if ( hIvasDec->apaExecBuffer == NULL ) +#else if ( hIvasDec->hVoIP->hTimeScaler == NULL ) +#endif { - +#ifndef API_5MS uint16_t wss, css; float startQuality; +#endif DECODER_CONFIG_HANDLE hDecoderConfig; +#ifdef API_5MS + if ( hIvasDec->Opt_TSM ) + { + uint16_t wss, css; + float startQuality; + + startQuality = 1.0f; + apa_buffer_size = APA_BUF_PER_CHANNEL; +#else #ifdef VARIABLE_SPEED_DECODING startQuality = hVoIP->voipMode == IVAS_DEC_VOIP_MODE_VARIABLE_SPEED ? -2.0f : 1.0f; #else startQuality = 1.0f; +#endif #endif - /* get current renderer type*/ - hVoIP->rendererType = IVAS_DEC_VoIP_GetRendererConfig( hIvasDec ); - hDecoderConfig = hIvasDec->st_ivas->hDecoderConfig; - if ( hDecoderConfig->output_Fs == 8000 ) - { - wss = 1; - css = 1; - } - else if ( hDecoderConfig->output_Fs == 16000 ) - { - wss = 2; - css = 1; - } - else if ( hDecoderConfig->output_Fs == 32000 ) - { - wss = 4; - css = 2; - } - else if ( hDecoderConfig->output_Fs == 48000 ) - { - wss = 6; - css = 3; - } - else - { - return IVAS_ERR_INIT_ERROR; - } + /* get current renderer type*/ +#ifndef API_5MS + hVoIP->rendererType = IVAS_DEC_VoIP_GetRendererConfig( hIvasDec ); +#endif + hDecoderConfig = hIvasDec->st_ivas->hDecoderConfig; - if ( ( hIvasDec->hVoIP->apaExecBuffer = malloc( sizeof( float ) * APA_BUF_PER_CHANNEL * nTransportChannels ) ) == NULL ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); - } - set_zero( hIvasDec->hVoIP->apaExecBuffer, APA_BUF_PER_CHANNEL * nTransportChannels ); + if ( hDecoderConfig->output_Fs == 8000 ) + { + wss = 1; + css = 1; + } + else if ( hDecoderConfig->output_Fs == 16000 ) + { + wss = 2; + css = 1; + } + else if ( hDecoderConfig->output_Fs == 32000 ) + { + wss = 4; + css = 2; + } + else if ( hDecoderConfig->output_Fs == 48000 ) + { + wss = 6; + css = 3; + } + else + { + return IVAS_ERR_INIT_ERROR; + } +#ifndef API_5MS + if ( ( hIvasDec->hVoIP->apaExecBuffer = malloc( sizeof( float ) * APA_BUF_PER_CHANNEL * nTransportChannels ) ) == NULL ) + + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); + } + set_zero( hIvasDec->hVoIP->apaExecBuffer, APA_BUF_PER_CHANNEL * nTransportChannels ); +#endif +#ifdef API_5MS + if ( apa_init( &hIvasDec->hTimeScaler, + nTransportChannels ) != IVAS_ERR_OK || + apa_set_rate( hIvasDec->hTimeScaler, hDecoderConfig->output_Fs ) != 0 || + apa_set_complexity_options( hIvasDec->hTimeScaler, wss, css ) != 0 || + apa_set_quality( hIvasDec->hTimeScaler, startQuality, 4, 4 ) != 0 || + apa_set_renderer_granularity( hIvasDec->hTimeScaler, l_ts ) != 0 ) + { + return IVAS_ERR_INIT_ERROR; + } +#else if ( apa_init( &hIvasDec->hVoIP->hTimeScaler, nTransportChannels ) != IVAS_ERR_OK || apa_set_rate( hIvasDec->hVoIP->hTimeScaler, hDecoderConfig->output_Fs ) != 0 || @@ -3336,51 +3843,91 @@ ivas_error IVAS_DEC_VoIP_reconfigure( { return IVAS_ERR_INIT_ERROR; } +#endif - if ( hVoIP->hFifoOut == NULL && hVoIP->rendererType == JBM_RENDERER_NONE ) - { - /* we still need the FIFO out buffer */ - if ( pcmdsp_fifo_create( &hIvasDec->hVoIP->hFifoOut ) != 0 || - pcmdsp_fifo_init( hIvasDec->hVoIP->hFifoOut, (uint16_t) ( hDecoderConfig->output_Fs * 4 / FRAMES_PER_SEC ) /* 4 frames */, hDecoderConfig->nchan_out, sizeof( int16_t ) ) != 0 ) +#ifndef API_5MS + if ( hVoIP->hFifoOut == NULL && hVoIP->rendererType == JBM_RENDERER_NONE ) { - return IVAS_ERR_INIT_ERROR; + /* we still need the FIFO out buffer */ + if ( pcmdsp_fifo_create( &hIvasDec->hVoIP->hFifoOut ) != 0 || + pcmdsp_fifo_init( hIvasDec->hVoIP->hFifoOut, (uint16_t) ( hDecoderConfig->output_Fs * 4 / FRAMES_PER_SEC ) /* 4 frames */, hDecoderConfig->nchan_out, sizeof( int16_t ) ) != 0 ) + { + return IVAS_ERR_INIT_ERROR; + } } - } #ifdef VARIABLE_SPEED_DECODING - else if ( hIvasDec->hVoIP->voipMode == IVAS_DEC_VOIP_MODE_VARIABLE_SPEED ) - { - if ( pcmdsp_fifo_create( &hIvasDec->hVoIP->hFifoOut ) != 0 || - pcmdsp_fifo_init( hIvasDec->hVoIP->hFifoOut, (uint16_t) ( hDecoderConfig->output_Fs * 4 / FRAMES_PER_SEC ) /* 4 frames */, hDecoderConfig->nchan_out, sizeof( int16_t ) ) != 0 ) + else if ( hIvasDec->hVoIP->voipMode == IVAS_DEC_VOIP_MODE_VARIABLE_SPEED ) { - return IVAS_ERR_INIT_ERROR; + if ( pcmdsp_fifo_create( &hIvasDec->hVoIP->hFifoOut ) != 0 || + pcmdsp_fifo_init( hIvasDec->hVoIP->hFifoOut, (uint16_t) ( hDecoderConfig->output_Fs * 4 / FRAMES_PER_SEC ) /* 4 frames */, hDecoderConfig->nchan_out, sizeof( int16_t ) ) != 0 ) + { + return IVAS_ERR_INIT_ERROR; + } } - } +#endif #endif - if ( hIvasDec->mode == IVAS_DEC_MODE_EVS ) - { - if ( apa_set_evs_compat_mode( hIvasDec->hVoIP->hTimeScaler, true ) != 0 ) + if ( hIvasDec->mode == IVAS_DEC_MODE_EVS ) { - return IVAS_ERR_INIT_ERROR; +#ifdef API_5MS + if ( apa_set_evs_compat_mode( hIvasDec->hTimeScaler, true ) != 0 ) +#else + if ( apa_set_evs_compat_mode( hIvasDec->hVoIP->hTimeScaler, true ) != 0 ) +#endif + { + return IVAS_ERR_INIT_ERROR; + } } +#ifdef API_5MS } +#endif + if ( ( hIvasDec->apaExecBuffer = malloc( sizeof( float ) * apa_buffer_size * nTransportChannels ) ) == NULL ) + + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); + } + + set_zero( hIvasDec->apaExecBuffer, apa_buffer_size * nTransportChannels ); } else { - if ( apa_reconfigure( hVoIP->hTimeScaler, nTransportChannels, l_ts ) != 0 ) +#ifdef API_5MS + if ( hIvasDec->Opt_TSM ) { - return IVAS_ERR_INIT_ERROR; + if ( apa_reconfigure( hIvasDec->hTimeScaler, nTransportChannels, l_ts ) != 0 ) +#else + if ( apa_reconfigure( hVoIP->hTimeScaler, nTransportChannels, l_ts ) != 0 ) +#endif + { + return IVAS_ERR_INIT_ERROR; + } +#ifdef API_5MS + apa_buffer_size = APA_BUF_PER_CHANNEL; } - +#endif /* realloc apa_exe_buffer */ +#ifdef API_5MS + free( hIvasDec->apaExecBuffer ); + if ( ( hIvasDec->apaExecBuffer = malloc( sizeof( float ) * apa_buffer_size * nTransportChannels ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); + } + set_zero( hIvasDec->apaExecBuffer, apa_buffer_size * nTransportChannels ); +#else free( hIvasDec->hVoIP->apaExecBuffer ); if ( ( hIvasDec->hVoIP->apaExecBuffer = malloc( sizeof( float ) * APA_BUF_PER_CHANNEL * nTransportChannels ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); } set_zero( hIvasDec->hVoIP->apaExecBuffer, APA_BUF_PER_CHANNEL * nTransportChannels ); +#endif } + +#ifdef API_5MS + hIvasDec->nTransportChannelsOld = nTransportChannels; +#else hIvasDec->hVoIP->nTransportChannelsOld = (uint8_t) nTransportChannels; +#endif error = IVAS_ERR_OK; diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 0539d75188..50d899e8f6 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -83,7 +83,7 @@ typedef enum _IVAS_DEC_COMPLEXITY_LEVEL IVAS_DEC_COMPLEXITY_LEVEL_THREE = 3 } IVAS_DEC_COMPLEXITY_LEVEL; - +#ifndef API_5MS #ifdef VARIABLE_SPEED_DECODING typedef enum { @@ -91,6 +91,7 @@ typedef enum IVAS_DEC_VOIP_MODE_VARIABLE_SPEED = 1 } IVAS_DEC_VOIP_MODE; #endif +#endif #ifdef DEBUGGING typedef enum _IVAS_DEC_FORCED_REND_MODE @@ -144,11 +145,14 @@ ivas_error IVAS_DEC_Configure( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const uint32_t sampleRate, /* i : output sampling frequency */ const IVAS_DEC_AUDIO_CONFIG outputFormat, /* i : output format */ +#ifdef API_5MS + const int16_t tsmEnabled, /* i : enable TSM */ +#endif const int16_t customLsOutputEnabled, /* i : enable custom loudspeaker setup handle */ const int16_t hrtfReaderEnabled, /* i : enable HRTF binary file input */ const int16_t enableHeadRotation, /* i : enable head rotation for binaural output */ #ifdef FIX_439_OTR_PARAMS - const HEAD_ORIENT_TRK_T orientation_tracking, /* i : head orientation tracking type */ + const HEAD_ORIENT_TRK_T orientation_tracking, /* i : head orientation tracking type */ #endif const int16_t renderConfigEnabled, /* i : enable Renderer config. file for binaural output */ const int16_t Opt_non_diegetic_pan, /* i : diegetic or not */ @@ -177,9 +181,17 @@ ivas_error IVAS_DEC_FeedFrame_Serial( /*! r: decoder error code */ ivas_error IVAS_DEC_GetSamples( +#ifdef API_5MS + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const int16_t nSamplesAsked, /* i: number of samples wanted by the caller */ + int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ + int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ + bool *needNewFrame /* indication that the decoder needs a new frame */ +#else IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ int16_t *nOutSamples /* o : number of samples per channel written to output buffer */ +#endif ); /*! r: error code */ @@ -199,8 +211,13 @@ ivas_error IVAS_DEC_GetMasaMetadata( /*! r: error code */ ivas_error IVAS_DEC_FeedHeadTrackData( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - IVAS_QUATERNION *orientation, /* i : head-tracking data */ - IVAS_VECTOR3 *Pos /* i : listener position */ +#ifdef API_5MS + IVAS_QUATERNION orientation, /* i : head-tracking data, listener orientation */ + IVAS_VECTOR3 Pos /* i : listener position */ +#else + IVAS_QUATERNION *orientation, /* i : head-tracking data, listener orientation */ + IVAS_VECTOR3 *Pos /* i : listener position */ +#endif ); /*! r: error code */ @@ -226,6 +243,13 @@ ivas_error IVAS_DEC_VoIP_FeedFrame( const bool qBit /* i : Q bit for AMR-WB IO */ ); +#ifdef API_5MS +ivas_error IVAS_DEC_VoIP_SetScale( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const int16_t maxScaling, /* i : maximum allowed TSM scale */ + const int16_t scale /* i : TSM scale to set */ +); +#else #ifdef VARIABLE_SPEED_DECODING #ifdef DEBUGGING /*! r: error code */ @@ -235,6 +259,7 @@ ivas_error IVAS_DEC_VoIP_SetScale( ); #endif #endif +#endif /*! r: error code */ ivas_error IVAS_DEC_VoIP_GetSamples( @@ -242,10 +267,12 @@ ivas_error IVAS_DEC_VoIP_GetSamples( uint16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ const uint32_t systemTimestamp_ms /* i : current system timestamp */ +#ifndef API_5MS #if defined( JBM_TSM_ON_TCS ) || defined(VARIABLE_SPEED_DECODING ) , uint16_t *sampleAvailableNext /* o : samples available for the next call */ #endif +#endif #ifdef SUPPORT_JBM_TRACEFILE , JbmTraceFileWriterFn jbmWriterFn, void* jbmWriter @@ -267,9 +294,11 @@ ivas_error IVAS_DEC_VoIP_Flush( /*! r: error code */ ivas_error IVAS_DEC_EnableVoIP( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ +#ifndef API_5MS #ifdef VARIABLE_SPEED_DECODING const IVAS_DEC_VOIP_MODE voipMode, /* i : VoIP or variable speed */ const uint16_t speedFac, /* i : speed factor for variable speed */ +#endif #endif const int16_t jbmSafetyMargin, /* i : allowed delay reserve for JBM, in milliseconds */ const IVAS_DEC_INPUT_FORMAT inputFormat /* i : format of the input bitstream */ diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index 76af4a17c8..4fa4a61760 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -1517,7 +1517,11 @@ ivas_error ivas_rend_crendProcess( for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { +#ifdef API_5MS + if ( hDecoderConfig && hDecoderConfig->Opt_Headrotation && hHeadTrackData ) +#else if ( hDecoderConfig && hDecoderConfig->Opt_Headrotation && hHeadTrackData && hHeadTrackData->num_quaternions >= 0 ) +#endif { /* Orientation tracking */ @@ -1656,7 +1660,11 @@ ivas_error ivas_rend_crendProcessSubframe( { subframe_len = hTcBuffer->subframe_nbslots[subframe_idx] * hTcBuffer->n_samples_granularity; +#ifdef API_5MS + if ( hDecoderConfig && hDecoderConfig->Opt_Headrotation && hHeadTrackData ) +#else if ( hDecoderConfig && hDecoderConfig->Opt_Headrotation && hHeadTrackData && hHeadTrackData->num_quaternions >= 0 ) +#endif { /* Rotation in SHD for: MC with elevation (5_1_2 / 5_1_4 / 7_1_4) -> BINAURAL diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index c3e76e7306..0791d274f3 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -236,7 +236,11 @@ ivas_error ivas_dirac_dec_init_binaural_data( #ifdef JBM_TSM_ON_TCS /* allocate transport channels*/ +#ifdef API_5MS + if ( st_ivas->hTcBuffer == NULL ) +#else if ( st_ivas->hDecoderConfig->voip_active == 1 && st_ivas->hTcBuffer == NULL ) +#endif { int16_t nchan_to_allocate; @@ -688,9 +692,17 @@ static void ivas_dirac_dec_binaural_internal( ivas_sba_prototype_renderer( st_ivas, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, subframe ); } +#ifdef API_5MS + if ( st_ivas->hHeadTrackData ) +#else if ( st_ivas->hHeadTrackData && st_ivas->hHeadTrackData->num_quaternions >= 0 ) +#endif { +#ifdef API_5MS + QuatToRotMat( st_ivas->hHeadTrackData->Quaternion, Rmat ); +#else QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[subframe], Rmat ); +#endif if ( nchan_transport == 2 ) { diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 2f5b406c66..9636f58bbb 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -319,7 +319,11 @@ ivas_error ivas_td_binaural_renderer_unwrap( } #endif /* Update the listener's location/orientation */ +#ifdef API_5MS + TDREND_Update_listener_orientation( hBinRendererTd, Opt_Headrotation, ( Quaternions != NULL ) ? Quaternions : NULL, ( Pos != NULL ) ? Pos : NULL ); +#else TDREND_Update_listener_orientation( hBinRendererTd, Opt_Headrotation, ( Quaternions != NULL ) ? &Quaternions[subframe_idx] : NULL, ( Pos != NULL ) ? &Pos[subframe_idx] : NULL ); +#endif if ( hReverb != NULL && hReverb->pConfig.roomAcoustics.late_reverb_on ) { diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 79ef75e470..649e387c0a 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -64,7 +64,9 @@ ivas_error ivas_headTrack_open( } /* Initialization */ +#ifndef API_5MS ( *hHeadTrackData )->num_quaternions = 0; +#endif ( *hHeadTrackData )->lrSwitchInterpVal = 0.0f; ( *hHeadTrackData )->lrSwitchedCurrent = 0; ( *hHeadTrackData )->lrSwitchedNext = 0; @@ -286,7 +288,11 @@ void rotateFrame_shd( } /* get next quaternion */ +#ifdef API_5MS + QuatToRotMat( hHeadTrackData->Quaternion, hHeadTrackData->Rmat ); +#else QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], hHeadTrackData->Rmat ); +#endif /* calculate ambisonics rotation matrices for the previous and current frames */ SHrotmatgen( SHrotmat_prev, hHeadTrackData->Rmat_prev, shd_rot_max_order ); @@ -392,7 +398,11 @@ void rotateFrame_sd( } /* Get next quaternion and calculate rotation matrix */ +#ifdef API_5MS + QuatToRotMat( hHeadTrackData->Quaternion, hHeadTrackData->Rmat ); +#else QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], hHeadTrackData->Rmat ); +#endif for ( ch_in = 0; ch_in < nchan; ch_in++ ) { @@ -632,7 +642,11 @@ void rotateFrame_sd_cldfb( } /* Get next quaternion and calculate rotation matrix */ +#ifdef API_5MS + QuatToRotMat( hHeadTrackData->Quaternion, Rmat ); +#else QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], Rmat ); +#endif /* rotation of Euler angles */ for ( n = 0; n < nInChannels; n++ ) diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index 877076db9a..e7acc00e97 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -260,9 +260,14 @@ typedef struct typedef struct ivas_binaural_head_track_struct { +#ifdef API_5MS + IVAS_QUATERNION Quaternion; + IVAS_VECTOR3 Pos; +#else int16_t num_quaternions; IVAS_QUATERNION Quaternions[MAX_PARAM_SPATIAL_SUBFRAMES]; IVAS_VECTOR3 Pos[MAX_PARAM_SPATIAL_SUBFRAMES]; +#endif float Rmat[3][3]; float Rmat_prev[3][3]; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index cd4f16aaa7..f53cbd5695 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -2473,10 +2473,13 @@ static DecoderDummy *initDecoderDummy( decDummy->hDecoderConfig->output_Fs = sampleRate; decDummy->hDecoderConfig->nchan_out = numOutChannels; decDummy->hDecoderConfig->Opt_Headrotation = 0; +#ifdef API_5MS + decDummy->hDecoderConfig->tsm_active = 0; +#else #ifdef JBM_TSM_ON_TCS decDummy->hDecoderConfig->voip_active = 0; #endif - +#endif decDummy->hBinRenderer = NULL; decDummy->hEFAPdata = NULL; decDummy->hCrendWrapper = NULL; @@ -2513,6 +2516,12 @@ static DecoderDummy *initDecoderDummy( set_zero( decDummy->hHeadTrackData->chEneIIR[1], MASA_FREQUENCY_BANDS ); set_zero( decDummy->hHeadTrackData->procChEneIIR[0], MASA_FREQUENCY_BANDS ); set_zero( decDummy->hHeadTrackData->procChEneIIR[1], MASA_FREQUENCY_BANDS ); +#ifdef API_5MS + decDummy->hHeadTrackData->Quaternion.w = 1.0f; + decDummy->hHeadTrackData->Quaternion.x = 0.0f; + decDummy->hHeadTrackData->Quaternion.y = 0.0f; + decDummy->hHeadTrackData->Quaternion.z = 0.0f; +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { decDummy->hHeadTrackData->Quaternions[i].w = 1.0f; @@ -2520,8 +2529,9 @@ static DecoderDummy *initDecoderDummy( decDummy->hHeadTrackData->Quaternions[i].y = 0.0f; decDummy->hHeadTrackData->Quaternions[i].z = 0.0f; } -#endif decDummy->hHeadTrackData->num_quaternions = 0; +#endif +#endif decDummy->hHeadTrackData->lrSwitchInterpVal = 0.0f; decDummy->hHeadTrackData->lrSwitchedCurrent = 0; decDummy->hHeadTrackData->lrSwitchedNext = 0; -- GitLab From fde3a29385ef0720a21fb9ba897eada28c736ca9 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 15 Jun 2023 08:07:25 +0200 Subject: [PATCH 002/175] temp fix for orientation tracking init --- lib_com/options.h | 2 +- lib_dec/ivas_init_dec.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 85195e86cc..11128d2641 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -228,7 +228,7 @@ #define FIX_510 /* FhG: fix issue 510, misleading error message for invalid input format */ #define FIX_509 /* FhG: fix issue 509, too low number of bitsream indices in SBA */ #define FIX_XXX_JITTER_SBA_BINAURAL_GAIN - +#define FIX_XXX_HEADTRACKER_INIT #define API_5MS /* ################## End DEVELOPMENT switches ######################### */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index d696217825..57eac86767 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -631,6 +631,12 @@ ivas_error ivas_init_decoder_front( { return error; } +#ifdef FIX_XXX_HEADTRACKER_INIT + if ( ( error = ivas_orient_trk_SetTrackingType( st_ivas->hHeadTrackData->OrientationTracker, st_ivas->hDecoderConfig->orientation_tracking ) ) != IVAS_ERR_OK ) + { + return error; + } +#endif } /*-------------------------------------------------------------------* @@ -781,6 +787,7 @@ ivas_error ivas_init_decoder( } } +#ifndef FIX_XXX_HEADTRACKER_INIT /*-----------------------------------------------------------------* * Set head/orientation tracking *-----------------------------------------------------------------*/ @@ -834,7 +841,7 @@ ivas_error ivas_init_decoder( } #endif } - +#endif /*-----------------------------------------------------------------* * Allocate and initialize SCE/CPE and other handles *-----------------------------------------------------------------*/ -- GitLab From 8d73b36a1595651fbf1f967b8ea516103181b76b Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 15 Jun 2023 13:06:03 +0200 Subject: [PATCH 003/175] fix compiling, re-add all 5ms API stuff that got lost in the latest merge from main --- apps/decoder.c | 46 ++- lib_com/ivas_prot.h | 2 + lib_dec/ivas_binRenderer_internal.c | 35 ++- lib_dec/ivas_dirac_dec.c | 24 +- lib_dec/ivas_ism_renderer.c | 21 ++ lib_dec/ivas_mc_param_dec.c | 15 +- lib_dec/ivas_objectRenderer_internal.c | 12 + lib_dec/ivas_stat_dec.h | 2 +- lib_dec/lib_dec.c | 91 +++--- lib_dec/lib_dec.h | 24 +- lib_rend/ivas_crend.c | 14 + lib_rend/ivas_dirac_dec_binaural_functions.c | 12 + lib_rend/ivas_objectRenderer.c | 11 +- lib_rend/ivas_prot_rend.h | 9 +- lib_rend/ivas_rotation.c | 288 ++++++++++++++++++- lib_rend/ivas_stat_rend.h | 27 +- lib_rend/lib_rend.c | 107 +++++++ 17 files changed, 637 insertions(+), 103 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 3f8be70cbd..d8f16e7768 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -403,8 +403,8 @@ int main( * Configure the decoder *------------------------------------------------------------------------------------------*/ #ifdef API_5MS - if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.tsmEnabled, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) -#else + if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.tsmEnabled, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) +#else if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) #endif { @@ -1635,8 +1635,9 @@ static ivas_error initOnFirstGoodFrame( static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, - HeadRotFileReader *headRotReader, - HeadRotFileReader *refRotReader, + RotFileReader *headRotReader, + RotFileReader *externalOrientationFileReader, + RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ) @@ -1770,7 +1771,7 @@ static ivas_error decodeG192( IVAS_QUATERNION quaternion; if ( ( error = HeadRotationFileReading( refRotReader, &quaternion, NULL ) ) != IVAS_ERR_OK ) { - fprintf( stderr, "\nError %s while reading reference rotation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( refRotReader ) ); + fprintf( stderr, "\nError %s while reading reference rotation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( refRotReader ) ); goto cleanup; } @@ -1781,6 +1782,30 @@ static ivas_error decodeG192( } } + if ( arg.enableExternalOrientation ) + { + IVAS_QUATERNION Quaternion; + int8_t enableHeadRotation; + int8_t enableExternalOrientation; + int8_t enableRotationInterpolation; + int16_t numFramesToTargetOrientation; + + + if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &Quaternion, &enableHeadRotation, &enableExternalOrientation, &enableRotationInterpolation, &numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading external orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), + RotationFileReader_getFilePath( externalOrientationFileReader ) ); + goto cleanup; + } + + + if ( ( error = IVAS_DEC_FeedExternalOrientationData( hIvasDec, Quaternion, enableHeadRotation, enableExternalOrientation, enableRotationInterpolation, numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedExternalOrientationData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } + /* Head-tracking input simulation */ if ( arg.enableHeadRotation ) { @@ -1788,7 +1813,7 @@ static ivas_error decodeG192( if ( ( error = HeadRotationFileReading( headRotReader, &Quaternion, &Pos ) ) != IVAS_ERR_OK ) { - fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( headRotReader ) ); + fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( headRotReader ) ); goto cleanup; } @@ -2024,7 +2049,7 @@ static ivas_error decodeG192( IVAS_QUATERNION quaternion; if ( ( error = HeadRotationFileReading( refRotReader, &quaternion, NULL ) ) != IVAS_ERR_OK ) { - fprintf( stderr, "\nError %s while reading reference rotation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( refRotReader ) ); + fprintf( stderr, "\nError %s while reading reference rotation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( refRotReader ) ); goto cleanup; } @@ -2042,7 +2067,7 @@ static ivas_error decodeG192( if ( ( error = HeadRotationFileReading( headRotReader, &Quaternion, &Pos ) ) != IVAS_ERR_OK ) { - fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( headRotReader ) ); + fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( headRotReader ) ); goto cleanup; } @@ -2055,7 +2080,7 @@ static ivas_error decodeG192( } /* decode and get samples */ - if ( ( error = IVAS_DEC_VoIP_Flush( hIvasDec, nOutSamples, pcmBuf, &nSamplesAvailableNext, &nSamplesFlushed ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, pcmBuf, &nSamplesFlushed ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_VoIP_Flush: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; @@ -2833,7 +2858,8 @@ static ivas_error decodeVoIP( int16_t nOutSamples = 0; #ifndef API_5MS uint16_t nSamplesAvailableNext = 0; -#endif#ifdef DEBUG_JBM_CMD_OPTION +#endif +#ifdef DEBUG_JBM_CMD_OPTION nOutSamples = (int16_t) ( arg.output_Fs / 1000 * arg.frontendFetchSizeMs ); #else nOutSamples = (int16_t) ( arg.output_Fs / 1000 * JBM_FRONTEND_FETCH_FRAMESIZE_MS ); diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 646d025ec3..7d3042d861 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -5148,7 +5148,9 @@ void ivas_binaural_cldfb_sf( void ivas_binRenderer( BINAURAL_RENDERER_HANDLE hBinRenderer, /* i/o: fastconv binaural renderer handle */ COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined head and external orientation handle */ +#ifndef API_5MS int16_t subframe_idx, /* i : subframe index */ +#endif const int16_t numTimeSlots, /* i: : number of time slots to process */ float Cldfb_RealBuffer_Binaural[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : Binaural signals */ float Cldfb_ImagBuffer_Binaural[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : Binaural signals */ diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index 48eda8b313..eb2e33b80a 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -994,7 +994,11 @@ void ivas_binaural_cldfb( } /* Implement binaural rendering */ +#ifdef API_5MS + ivas_binRenderer( st_ivas->hBinRenderer, st_ivas->hCombinedOrientationData, JBM_CLDFB_SLOTS_IN_SUBFRAME, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer ); +#else ivas_binRenderer( st_ivas->hBinRenderer, st_ivas->hCombinedOrientationData, subframeIdx, JBM_CLDFB_SLOTS_IN_SUBFRAME, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer ); +#endif /* Implement CLDFB synthesis */ for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) @@ -1086,8 +1090,11 @@ void ivas_binaural_cldfb_sf( } /* Implement binaural rendering */ +#ifdef API_5MS + ivas_binRenderer( st_ivas->hBinRenderer, st_ivas->hCombinedOrientationData, st_ivas->hTcBuffer->subframe_nbslots[subframeIdx], Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer ); +#else ivas_binRenderer( st_ivas->hBinRenderer, st_ivas->hCombinedOrientationData, subframeIdx, st_ivas->hTcBuffer->subframe_nbslots[subframeIdx], Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer ); - +#endif /* Implement CLDFB synthesis */ for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) { @@ -1120,9 +1127,11 @@ void ivas_binaural_cldfb_sf( *-------------------------------------------------------------------------*/ void ivas_binRenderer( - BINAURAL_RENDERER_HANDLE hBinRenderer, /* i/o: binaural renderer handle */ - COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined head and external orientation handle */ - int16_t subframe_idx, /* i : subframe index */ + BINAURAL_RENDERER_HANDLE hBinRenderer, /* i/o: binaural renderer handle */ + COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined head and external orientation handle */ +#ifndef API_5MS + int16_t subframe_idx, /* i : subframe index */ +#endif const int16_t numTimeSlots, /* i : number of time slots to render*/ float Cldfb_RealBuffer_Binaural[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : Binaural signals */ float Cldfb_ImagBuffer_Binaural[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : Binaural signals */ @@ -1146,8 +1155,10 @@ void ivas_binRenderer( } /* Head rotation in HOA3 or CICPx */ - if ( - hCombinedOrientationData != NULL && hCombinedOrientationData->enableCombinedOrientation[subframe_idx] && hBinRenderer->rotInCldfb ) +#ifdef API_5MS + if ( hCombinedOrientationData != NULL && hCombinedOrientationData->enableCombinedOrientation && hBinRenderer->rotInCldfb ) +#else + if ( hCombinedOrientationData != NULL && hCombinedOrientationData->enableCombinedOrientation[subframe_idx] && hBinRenderer->rotInCldfb ) #endif { if ( hBinRenderer->hInputSetup->is_loudspeaker_setup == 0 ) @@ -1155,17 +1166,29 @@ void ivas_binRenderer( /* Rotation in SHD (HOA3) */ if ( hCombinedOrientationData->shd_rot_max_order == -1 ) { +#ifdef API_5MS + rotateFrame_shd_cldfb( RealBuffer, ImagBuffer, hCombinedOrientationData->Rmat, hBinRenderer->hInputSetup->nchan_out_woLFE, numTimeSlots, 3 ); +#else rotateFrame_shd_cldfb( RealBuffer, ImagBuffer, hCombinedOrientationData->Rmat[subframe_idx], hBinRenderer->hInputSetup->nchan_out_woLFE, numTimeSlots, 3 ); +#endif } else if ( hCombinedOrientationData->shd_rot_max_order > 0 ) { +#ifdef API_5MS + rotateFrame_shd_cldfb( RealBuffer, ImagBuffer, hCombinedOrientationData->Rmat, hBinRenderer->hInputSetup->nchan_out_woLFE, numTimeSlots, hCombinedOrientationData->shd_rot_max_order ); +#else rotateFrame_shd_cldfb( RealBuffer, ImagBuffer, hCombinedOrientationData->Rmat[subframe_idx], hBinRenderer->hInputSetup->nchan_out_woLFE, numTimeSlots, hCombinedOrientationData->shd_rot_max_order ); +#endif } } else { /* Rotation in SD (CICPx) */ +#ifdef API_5MS + rotateFrame_sd_cldfb( hCombinedOrientationData->Rmat, RealBuffer, ImagBuffer, hBinRenderer->hInputSetup, hBinRenderer->hEFAPdata, numTimeSlots, hBinRenderer->conv_band ); +#else rotateFrame_sd_cldfb( hCombinedOrientationData->Rmat[subframe_idx], RealBuffer, ImagBuffer, hBinRenderer->hInputSetup, hBinRenderer->hEFAPdata, numTimeSlots, hBinRenderer->conv_band ); +#endif } } diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index e7c3b7c371..19f99cad4e 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -2456,9 +2456,17 @@ void ivas_dirac_dec_render_sf( set_zero( onset_filter_subframe, hDirAC->num_freq_bands ); } +#ifdef API_5MS + if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation ) +#else if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation[subframe_idx] ) +#endif { +#ifdef API_5MS + p_Rmat = &st_ivas->hCombinedOrientationData->Rmat[0][0]; +#else p_Rmat = &st_ivas->hCombinedOrientationData->Rmat[subframe_idx][0][0]; +#endif if ( st_ivas->hCombinedOrientationData->shd_rot_max_order == 0 ) { @@ -2522,7 +2530,11 @@ void ivas_dirac_dec_render_sf( set_zero( surCohRatio, hDirAC->num_freq_bands ); } } +#ifdef API_5MS + if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation && st_ivas->hCombinedOrientationData->shd_rot_max_order == 1 ) +#else if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation[subframe_idx] && st_ivas->hCombinedOrientationData->shd_rot_max_order == 1 ) +#endif { ivas_dirac_dec_compute_directional_responses( hDirAC, st_ivas->hVBAPdata, @@ -2615,7 +2627,11 @@ void ivas_dirac_dec_render_sf( if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) { +#ifdef API_5MS + if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation && st_ivas->hCombinedOrientationData->shd_rot_max_order == 0 ) +#else if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation[subframe_idx] && st_ivas->hCombinedOrientationData->shd_rot_max_order == 0 ) +#endif { protoSignalComputation_shd( Cldfb_RealBuffer, Cldfb_ImagBuffer, hDirAC->h_output_synthesis_psd_state.proto_direct_buffer_f, @@ -2848,8 +2864,12 @@ void ivas_dirac_dec_render_sf( ivas_dirac_dec_compute_diffuse_proto( hDirAC, slot_idx ); } - /*Compute PSDs*/ +/*Compute PSDs*/ +#ifdef API_5MS + if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation && st_ivas->hCombinedOrientationData->shd_rot_max_order > 0 ) +#else if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation[subframe_idx] && st_ivas->hCombinedOrientationData->shd_rot_max_order > 0 ) +#endif { ivas_dirac_dec_output_synthesis_process_slot( reference_power, p_onset_filter, @@ -2942,7 +2962,9 @@ void ivas_dirac_dec_render_sf( /* Perform binaural rendering */ ivas_binRenderer( st_ivas->hBinRenderer, st_ivas->hCombinedOrientationData, +#ifndef API_5MS subframe_idx, +#endif hDirAC->subframe_nbslots[subframe_idx], Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index 6dcc6dcd15..037f4a8b50 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -159,10 +159,17 @@ void ivas_ism_render( else { /* Combined rotation: rotate the object positions depending the head and external orientations */ +#ifdef API_5MS + if ( st_ivas->hCombinedOrientationData != NULL && st_ivas->hCombinedOrientationData->enableCombinedOrientation == 1 ) +#else if ( st_ivas->hCombinedOrientationData != NULL && st_ivas->hCombinedOrientationData->enableCombinedOrientation[0] == 1 ) #endif { +#ifdef API_5MS + rotateAziEle( st_ivas->hIsmMetaData[i]->azimuth, st_ivas->hIsmMetaData[i]->elevation, &azimuth, &elevation, st_ivas->hCombinedOrientationData->Rmat, st_ivas->hIntSetup.is_planar_setup ); +#else rotateAziEle( st_ivas->hIsmMetaData[i]->azimuth, st_ivas->hIsmMetaData[i]->elevation, &azimuth, &elevation, st_ivas->hCombinedOrientationData->Rmat[0], st_ivas->hIntSetup.is_planar_setup ); +#endif } else { @@ -243,6 +250,9 @@ void ivas_ism_render_sf( set_f( output_f[i], 0.0f, n_samples_to_render ); } +#ifdef API_5MS + if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation ) +#else if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation[0] ) #endif { @@ -256,9 +266,17 @@ void ivas_ism_render_sf( { /* Combined rotation: rotate the object positions depending the head and external orientations */ +#ifdef API_5MS + if ( st_ivas->hCombinedOrientationData != NULL && st_ivas->hCombinedOrientationData->enableCombinedOrientation == 1 ) +#else if ( st_ivas->hCombinedOrientationData != NULL && st_ivas->hCombinedOrientationData->enableCombinedOrientation[0] == 1 ) +#endif { +#ifdef API_5MS + rotateAziEle( st_ivas->hIsmMetaData[i]->azimuth, st_ivas->hIsmMetaData[i]->elevation, &azimuth, &elevation, st_ivas->hCombinedOrientationData->Rmat, st_ivas->hIntSetup.is_planar_setup ); +#else rotateAziEle( st_ivas->hIsmMetaData[i]->azimuth, st_ivas->hIsmMetaData[i]->elevation, &azimuth, &elevation, st_ivas->hCombinedOrientationData->Rmat[0], st_ivas->hIntSetup.is_planar_setup ); +#endif if ( st_ivas->hEFAPdata != NULL ) { efap_determine_gains( st_ivas->hEFAPdata, st_ivas->hIsmRendererData->gains[i], azimuth, elevation, EFAP_MODE_EFAP ); @@ -287,6 +305,9 @@ void ivas_ism_render_sf( } /* update here only in case of head rotation */ +#ifdef API_5MS + if ( st_ivas->hCombinedOrientationData != NULL && st_ivas->hCombinedOrientationData->enableCombinedOrientation == 1 ) +#else if ( st_ivas->hCombinedOrientationData != NULL && st_ivas->hCombinedOrientationData->enableCombinedOrientation[0] == 1 ) #endif { diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index a8a5f0c944..16159ad005 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -1541,11 +1541,11 @@ void ivas_param_mc_dec_digest_tc( *------------------------------------------------------------------------*/ void ivas_param_mc_dec_render( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ - const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ - uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ - uint16_t *nSamplesAvailableNext, /* o : number of CLDFB slots still to render */ - float *output_f[] /* o : rendered time signal */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ + uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ + uint16_t *nSamplesAvailableNext, /* o : number of CLDFB slots still to render */ + float *output_f[] /* o : rendered time signal */ ) { PARAM_MC_DEC_HANDLE hParamMC; @@ -1755,7 +1755,10 @@ void ivas_param_mc_dec_render( if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { ivas_binRenderer( st_ivas->hBinRenderer, - st_ivas->hCombinedOrientationData, subframe_idx, + st_ivas->hCombinedOrientationData, +#ifndef API_5MS + subframe_idx, +#endif hParamMC->subframe_nbslots[subframe_idx], Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer ); } diff --git a/lib_dec/ivas_objectRenderer_internal.c b/lib_dec/ivas_objectRenderer_internal.c index a4c23b6110..3802c4fc09 100644 --- a/lib_dec/ivas_objectRenderer_internal.c +++ b/lib_dec/ivas_objectRenderer_internal.c @@ -86,9 +86,15 @@ ivas_error ivas_td_binaural_renderer( st_ivas->transport_config, st_ivas->hBinRendererTd, st_ivas->nchan_transport, LFE_CHANNEL, st_ivas->ivas_format, st_ivas->hIsmMetaData, +#ifdef API_5MS + ( st_ivas->hCombinedOrientationData != NULL ) ? &st_ivas->hCombinedOrientationData->enableCombinedOrientation : NULL, + ( st_ivas->hCombinedOrientationData != NULL ) ? &st_ivas->hCombinedOrientationData->Quaternion : NULL, + ( st_ivas->hCombinedOrientationData != NULL ) ? &st_ivas->hCombinedOrientationData->listenerPos : NULL, +#else ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->enableCombinedOrientation : NULL, ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->Quaternions : NULL, ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->listenerPos : NULL, +#endif ism_md_subframe_update, output, output_frame ); } @@ -178,6 +184,12 @@ ivas_error ivas_td_binaural_renderer_sf( } /* Update the listener's location/orientation */ +#ifdef API_5MS + TDREND_Update_listener_orientation( st_ivas->hBinRendererTd, + ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->enableCombinedOrientation : 0, + ( st_ivas->hCombinedOrientationData != NULL ) ? &st_ivas->hCombinedOrientationData->Quaternion : NULL, + ( st_ivas->hCombinedOrientationData != NULL ) ? &st_ivas->hCombinedOrientationData->listenerPos : NULL ); +#else TDREND_Update_listener_orientation( st_ivas->hBinRendererTd, ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->enableCombinedOrientation[subframe_idx] : 0, ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->Quaternions : NULL, diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index c31389ddf9..18fedf54aa 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -1197,8 +1197,8 @@ typedef struct decoder_config_structure #ifdef API_5MS int16_t tsm_active; #else - int16_t voip_active; +#endif int16_t Opt_delay_comp; /* flag indicating delay compensation active */ } DECODER_CONFIG, *DECODER_CONFIG_HANDLE; diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 841250b0c9..351ddf8722 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -445,9 +445,9 @@ static IVAS_DEC_BS_FORMAT mapIvasFormat( *---------------------------------------------------------------------*/ ivas_error IVAS_DEC_Configure( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - const uint32_t sampleRate, /* i : output sampling frequency */ - const IVAS_DEC_AUDIO_CONFIG outputFormat, /* i : output format */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const uint32_t sampleRate, /* i : output sampling frequency */ + const IVAS_DEC_AUDIO_CONFIG outputFormat, /* i : output format */ #ifdef API_5MS const int16_t tsmEnabled, /* i : enable TSM */ #endif @@ -611,6 +611,7 @@ ivas_error IVAS_DEC_EnableVoIP( hIvasDec->hVoIP->voipMode = voipMode; hIvasDec->hVoIP->speedFac = speedFac; hIvasDec->hVoIP->needNewFrame = false; +#endif #endif hIvasDec->hVoIP->nSamplesFrame = (uint16_t) ( hDecoderConfig->output_Fs / FRAMES_PER_SEC ); #ifndef API_5MS @@ -654,35 +655,8 @@ ivas_error IVAS_DEC_EnableVoIP( } #endif #endif -#ifndef JBM_TSM_ON_TCS - if ( hDecoderConfig->output_Fs == 8000 ) - { - wss = 1; - css = 1; - } - else if ( hDecoderConfig->output_Fs == 16000 ) - { - wss = 2; - css = 1; - } - else if ( hDecoderConfig->output_Fs == 32000 ) - { - wss = 4; - css = 2; - } - else if ( hDecoderConfig->output_Fs == 48000 ) - { - wss = 6; - css = 3; - } - else - { - return IVAS_ERR_INIT_ERROR; - } -#endif #ifndef API_5MS -#ifdef JBM_TSM_ON_TCS /* postpone init of time scaler and output FIFO until we know the real number of TCs */ hIvasDec->hVoIP->hTimeScaler = NULL; #ifdef VARIABLE_SPEED_DECODING @@ -692,7 +666,6 @@ ivas_error IVAS_DEC_EnableVoIP( } #endif #endif - return error; } @@ -1493,18 +1466,32 @@ ivas_error IVAS_DEC_FeedRefVectorData( *---------------------------------------------------------------------*/ ivas_error IVAS_DEC_FeedExternalOrientationData( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ +#ifdef API_5MS + IVAS_QUATERNION orientation, /* i : external orientation data */ + int8_t enableHeadRotation, /* i : flag to enable head rotation for this frame */ + int8_t enableExternalOrientation, /* i : flag to enable external orientation for this frame */ + int8_t enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ + int16_t numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ +#else IVAS_QUATERNION *orientation, /* i : external orientation data */ int8_t *enableHeadRotation, /* i : flag to enable head rotation for this frame */ int8_t *enableExternalOrientation, /* i : flag to enable external orientation for this frame */ int8_t *enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ int16_t *numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ +#endif ) { EXTERNAL_ORIENTATION_HANDLE hExternalOrientationData; +#ifndef API_5MS int16_t i; +#endif +#ifdef API_5MS + if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) +#else if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || orientation == NULL ) +#endif { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } @@ -1517,6 +1504,14 @@ ivas_error IVAS_DEC_FeedExternalOrientationData( } /* Move external orientation data to the decoder handle (invert orientations) */ +#ifdef API_5MS + QuaternionInverse( orientation, &hExternalOrientationData->Quaternion ); + + hExternalOrientationData->enableHeadRotation = enableHeadRotation; + hExternalOrientationData->enableExternalOrientation = enableExternalOrientation; + hExternalOrientationData->enableRotationInterpolation = enableRotationInterpolation; + hExternalOrientationData->numFramesToTargetOrientation = numFramesToTargetOrientation; +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { QuaternionInverse( orientation[i], &hExternalOrientationData->Quaternions[i] ); @@ -1526,6 +1521,7 @@ ivas_error IVAS_DEC_FeedExternalOrientationData( hExternalOrientationData->enableRotationInterpolation[i] = enableRotationInterpolation[i]; hExternalOrientationData->numFramesToTargetOrientation[i] = numFramesToTargetOrientation[i]; } +#endif return IVAS_ERR_OK; } @@ -2062,12 +2058,10 @@ ivas_error IVAS_DEC_VoIP_GetSamples( int16_t timeScalingDone; int16_t result; ivas_error error; -#ifdef JBM_TSM_ON_TCS int16_t nSamplesRendered; uint16_t nSamplesTcsScaled; uint8_t nTransportChannels; uint8_t nOutChannels; -#endif error = IVAS_ERR_OK; @@ -2477,23 +2471,6 @@ ivas_error IVAS_DEC_VoIP_GetSamples( assert( nTimeScalerOutSamples <= APA_BUF ); nSamplesTcsScaled = nTimeScalerOutSamples / nTransportChannels; -#else - /* append scaled samples to FIFO */ - if ( pcmdsp_fifo_write( hVoIP->hFifoAfterTimeScaler, (uint8_t *) hVoIP->apaExecBuffer, (uint16_t) ( nTimeScalerOutSamples / hDecoderConfig->nchan_out ) ) != 0 ) - { - return IVAS_ERR_UNKNOWN; - } -#ifdef VARIABLE_SPEED_DECODING - if ( hVoIP->mode == IVAS_DEC_VOIP_MODE_VARIABLE_SPEED ) - { - int16_t nSamplesAvailableNext = pcmdsp_fifo_nReadableSamplesPerChannel( hVoIP->hFifoAfterTimeScaler ); - if ( nSamplesAvailableNext < nSamplesPerChannel ) - { - hVoIP->needNewFrame = true; - } - } -#endif -#endif if ( hIvasDec->hasBeenFedFirstGoodFrame && hVoIP->rendererType != JBM_RENDERER_NONE ) { @@ -2622,12 +2599,14 @@ ivas_error IVAS_DEC_VoIP_GetSamples( * Function to flush remaining audio in VoIP *---------------------------------------------------------------------*/ -ivas_error IVAS_DEC_VoIP_Flush( +ivas_error IVAS_DEC_Flush( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const int16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ - uint16_t *nSamplesAvailableNext, /* o : number of samples still available */ - int16_t *nSamplesFlushed /* o : number of samples flushed */ +#ifndef API_5MS + uint16_t *nSamplesAvailableNext, /* o : number of samples still available */ +#endif + int16_t *nSamplesFlushed /* o : number of samples flushed */ ) { ivas_error error; @@ -2645,6 +2624,7 @@ ivas_error IVAS_DEC_VoIP_Flush( *nSamplesFlushed = min( nSamplesPerChannel, hIvasDec->nSamplesAvailableNext ); #else *nSamplesFlushed = min( nSamplesPerChannel, hVoIP->nSamplesAvailableNext ); +#endif #ifndef API_5MS if ( hVoIP->rendererType == JBM_RENDERER_NONE ) @@ -2707,7 +2687,8 @@ bool IVAS_DEC_VoIP_IsEmpty( return ( ( JB4_bufferedDataUnits( hIvasDec->hVoIP->hJBM ) == 0 ) && ( hIvasDec->nSamplesAvailableNext < nSamplesAsked ) ); #else return ( ( JB4_bufferedDataUnits( hIvasDec->hVoIP->hJBM ) == 0 ) && ( hIvasDec->hVoIP->nSamplesAvailableNext < nSamplesAsked ) ); -#endif} +#endif +} /*---------------------------------------------------------------------* diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index f17b6b6835..24d0bf1b57 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -227,11 +227,19 @@ ivas_error IVAS_DEC_FeedRefVectorData( /*! r: error code */ ivas_error IVAS_DEC_FeedExternalOrientationData( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - IVAS_QUATERNION *orientation, /* i : external orientation data */ - int8_t *enableHeadRotation, /* i : flag to enable head rotation for this frame */ - int8_t *enableExternalOrientation, /* i : flag to enable external orientation for this frame */ - int8_t *enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ - int16_t *numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ +#ifdef API_5MS + IVAS_QUATERNION orientation, /* i : external orientation data */ + int8_t enableHeadRotation, /* i : flag to enable head rotation for this frame */ + int8_t enableExternalOrientation, /* i : flag to enable external orientation for this frame */ + int8_t enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ + int16_t numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ +#else + IVAS_QUATERNION *orientation, /* i : external orientation data */ + int8_t *enableHeadRotation, /* i : flag to enable head rotation for this frame */ + int8_t *enableExternalOrientation, /* i : flag to enable external orientation for this frame */ + int8_t *enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ + int16_t *numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ +#endif ); /*! r: error code */ @@ -279,11 +287,13 @@ ivas_error IVAS_DEC_VoIP_GetSamples( #endif ); -ivas_error IVAS_DEC_VoIP_Flush( +ivas_error IVAS_DEC_Flush( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const int16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ - uint16_t *nSamplesAvailableNext, /* o : number of samples still available */ +#ifndef API_5MS + uint16_t *nSamplesAvailableNext, /* o : number of samples still available */ +#endif int16_t *nSamplesFlushed /* o : number of samples flushed */ ); diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index b2b4887499..e5bdd05ed1 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -1348,6 +1348,12 @@ ivas_error ivas_rend_crendProcess( combinedOrientationEnabled = 0; if ( hCombinedOrientationData != NULL ) { +#ifdef API_5MS + if ( hCombinedOrientationData->enableCombinedOrientation != 0 ) + { + combinedOrientationEnabled = 1; + } +#else for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { if ( hCombinedOrientationData->enableCombinedOrientation[subframe_idx] != 0 ) @@ -1356,6 +1362,7 @@ ivas_error ivas_rend_crendProcess( break; } } +#endif } push_wmops( "ivas_rend_crendProcess" ); @@ -1470,6 +1477,12 @@ ivas_error ivas_rend_crendProcessSubframe( combinedOrientationEnabled = 0; if ( hCombinedOrientationData != NULL ) { +#ifdef API_5MS + if ( hCombinedOrientationData->enableCombinedOrientation != 0 ) + { + combinedOrientationEnabled = 1; + } +#else for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { if ( hCombinedOrientationData->enableCombinedOrientation[subframe_idx] != 0 ) @@ -1478,6 +1491,7 @@ ivas_error ivas_rend_crendProcessSubframe( break; } } +#endif } push_wmops( "ivas_rend_crendProcessSubframe" ); diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index 41605cb678..c698ad1d3f 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -656,7 +656,11 @@ static void ivas_dirac_dec_binaural_internal( { for ( j = 0; j < 3; j++ ) { +#ifdef API_5MS + Rmat[i][j] = hCombinedOrientationData->Rmat[i][j]; +#else Rmat[i][j] = hCombinedOrientationData->Rmat[subframe][i][j]; +#endif } } @@ -669,7 +673,11 @@ static void ivas_dirac_dec_binaural_internal( } ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matrices( st_ivas, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, Rmat, subframe, +#ifdef API_5MS + hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation > 0 ); +#else hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0 ); +#endif if ( st_ivas->ivas_format == ISM_FORMAT ) { @@ -685,7 +693,11 @@ static void ivas_dirac_dec_binaural_internal( } ivas_dirac_dec_binaural_determine_processing_matrices( st_ivas, max_band_decorr, Rmat, +#ifdef API_5MS + hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation > 0 ); +#else hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0 ); +#endif ivas_dirac_dec_binaural_process_output( st_ivas, output_f, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, max_band_decorr, numInChannels, subframe ); st_ivas->hDirAC->hDiffuseDist = NULL; diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 86ec0125d5..842925d11a 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -302,8 +302,11 @@ ivas_error ivas_td_binaural_renderer_unwrap( TDREND_Update_object_positions( hBinRendererTd, num_src, ivas_format, hIsmMetaData ); } /* Update the listener's location/orientation */ +#ifdef API_5MS + TDREND_Update_listener_orientation( hBinRendererTd, ( enableCombinedOrientation != NULL ) ? *enableCombinedOrientation : 0, ( Quaternions != NULL ) ? Quaternions : NULL, ( Pos != NULL ) ? Pos : NULL ); +#else TDREND_Update_listener_orientation( hBinRendererTd, ( enableCombinedOrientation != NULL ) ? enableCombinedOrientation[subframe_idx] : 0, ( Quaternions != NULL ) ? &Quaternions[subframe_idx] : NULL, ( Pos != NULL ) ? &Pos[subframe_idx] : NULL ); - +#endif if ( hReverb != NULL ) { if ( ( error = ivas_reverb_process( hReverb, transport_config, 0, output, p_reverb_signal, subframe_idx ) ) != IVAS_ERR_OK ) @@ -676,9 +679,15 @@ ivas_error ivas_td_binaural_renderer_ext( } if ( ( error = ivas_td_binaural_renderer_unwrap( hReverb, transport_config, pTDRend->hBinRendererTd, num_src, lfe_idx, ivas_format, hIsmMetaData, +#ifdef API_5MS + ( hCombinedOrientationData != NULL ) ? &( *hCombinedOrientationData )->enableCombinedOrientation : NULL, + ( hCombinedOrientationData != NULL ) ? &( *hCombinedOrientationData )->Quaternion : NULL, + ( hCombinedOrientationData != NULL ) ? &( *hCombinedOrientationData )->listenerPos : NULL, +#else ( hCombinedOrientationData != NULL ) ? ( *hCombinedOrientationData )->enableCombinedOrientation : NULL, ( hCombinedOrientationData != NULL ) ? ( *hCombinedOrientationData )->Quaternions : NULL, ( hCombinedOrientationData != NULL ) ? ( *hCombinedOrientationData )->listenerPos : NULL, +#endif ism_md_subframe_update_ext, p_output, output_frame ) ) != IVAS_ERR_OK ) { return error; diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 4ea5cb4484..29a5ace8f4 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -859,15 +859,20 @@ ivas_error combine_external_and_head_orientations_rend( ivas_error combine_external_and_head_orientations( IVAS_QUATERNION *headRotQuaternions, /* i : quaternions for head rotation */ IVAS_VECTOR3 *listenerPos, /* i : listener position */ - int16_t numHeadRotQuaternions, /* i : number of head rotation quaternions */ +#ifndef API_5MS + int16_t numHeadRotQuaternions, /* i : number of head rotation quaternions */ +#endif EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, /* i : external orientation handle */ COMBINED_ORIENTATION_HANDLE hCombinedOrientationData /* i/o: combined orientation handle */ ); void external_target_interpolation( EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, /* i : external orientation handle */ - COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i/o: combined orientation handle */ + COMBINED_ORIENTATION_HANDLE hCombinedOrientationData /* i/o: combined orientation handle */ +#ifndef API_5MS + , const int16_t i +#endif ); bool are_orientations_same( diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index dbeda48727..184f382ee8 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -286,7 +286,11 @@ void rotateFrame_shd( /* calculate ambisonics rotation matrices for the previous and current frames */ SHrotmatgen( SHrotmat_prev, hCombinedOrientationData->Rmat_prev, shd_rot_max_order ); +#ifdef API_5MS + SHrotmatgen( SHrotmat, hCombinedOrientationData->Rmat, shd_rot_max_order ); +#else SHrotmatgen( SHrotmat, hCombinedOrientationData->Rmat[subframe_idx], shd_rot_max_order ); +#endif for ( i = 0; i < subframe_len; i++ ) { @@ -338,7 +342,11 @@ void rotateFrame_shd( /* move Rmat to Rmat_prev */ for ( i = 0; i < 3; i++ ) { +#ifdef API_5MS + mvr2r( hCombinedOrientationData->Rmat[i], hCombinedOrientationData->Rmat_prev[i], 3 ); +#else mvr2r( hCombinedOrientationData->Rmat[subframe_idx][i], hCombinedOrientationData->Rmat_prev[i], 3 ); +#endif } return; @@ -426,7 +434,11 @@ void rotateFrame_sd( /* gains for current subframe rotation */ +#ifdef API_5MS + rotateAziEle( hTransSetup.ls_azimuth[ch_in_woLFE], hTransSetup.ls_elevation[ch_in_woLFE], &azimuth, &elevation, hCombinedOrientationData->Rmat, hTransSetup.is_planar_setup ); +#else rotateAziEle( hTransSetup.ls_azimuth[ch_in_woLFE], hTransSetup.ls_elevation[ch_in_woLFE], &azimuth, &elevation, hCombinedOrientationData->Rmat[subframe_idx], hTransSetup.is_planar_setup ); +#endif if ( hEFAPdata != NULL && ( hTransSetup.ls_azimuth[ch_in_woLFE] != azimuth || hTransSetup.ls_elevation[ch_in_woLFE] != elevation ) ) { efap_determine_gains( hEFAPdata, tmp_gains, azimuth, elevation, EFAP_MODE_EFAP ); @@ -463,7 +475,11 @@ void rotateFrame_sd( /* move Rmat to Rmat_prev */ for ( i = 0; i < 3; i++ ) { +#ifdef API_5MS + mvr2r( hCombinedOrientationData->Rmat[i], hCombinedOrientationData->Rmat_prev[i], 3 ); +#else mvr2r( hCombinedOrientationData->Rmat[subframe_idx][i], hCombinedOrientationData->Rmat_prev[i], 3 ); +#endif } /* copy to output */ @@ -692,7 +708,9 @@ ivas_error ivas_external_orientation_open( EXTERNAL_ORIENTATION_HANDLE *hExtOrientationData /* o : external orientation handle */ ) { +#ifndef API_5MS int16_t i; +#endif IVAS_QUATERNION identity; identity.w = 1.0f; @@ -705,6 +723,13 @@ ivas_error ivas_external_orientation_open( } /* Enable head rotation and disable external orientation as default */ +#ifdef API_5MS + ( *hExtOrientationData )->enableHeadRotation = 1; + ( *hExtOrientationData )->enableExternalOrientation = 0; + ( *hExtOrientationData )->enableRotationInterpolation = 0; + ( *hExtOrientationData )->numFramesToTargetOrientation = 0; + ( *hExtOrientationData )->Quaternion = identity; +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { ( *hExtOrientationData )->enableHeadRotation[i] = 1; @@ -713,7 +738,7 @@ ivas_error ivas_external_orientation_open( ( *hExtOrientationData )->numFramesToTargetOrientation[i] = 0; ( *hExtOrientationData )->Quaternions[i] = identity; } - +#endif return IVAS_ERR_OK; } @@ -750,7 +775,10 @@ ivas_error ivas_combined_orientation_open( COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData /* o : combined orientation handle */ ) { - int16_t i, j; +#ifndef API_5MS + int16_t i; +#endif + int16_t j; IVAS_QUATERNION identity; IVAS_VECTOR3 origo; @@ -775,6 +803,19 @@ ivas_error ivas_combined_orientation_open( ( *hCombinedOrientationData )->Quaternions_ext_interpolation_start = identity; ( *hCombinedOrientationData )->Quaternions_ext_interpolation_target = identity; +#ifdef API_5MS + ( *hCombinedOrientationData )->enableCombinedOrientation = 0; + ( *hCombinedOrientationData )->Quaternion = identity; + ( *hCombinedOrientationData )->Quaternion_prev_headRot = identity; + ( *hCombinedOrientationData )->Quaternion_prev_extOrientation = identity; + ( *hCombinedOrientationData )->listenerPos = origo; + + for ( j = 0; j < 3; j++ ) + { + set_zero( ( *hCombinedOrientationData )->Rmat[j], 3 ); + ( *hCombinedOrientationData )->Rmat[j][j] = 1.0f; + } +#else /* Initialise orientations to identity */ for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { @@ -790,7 +831,7 @@ ivas_error ivas_combined_orientation_open( ( *hCombinedOrientationData )->Rmat[i][j][j] = 1.0f; } } - +#endif for ( j = 0; j < 3; j++ ) { set_zero( ( *hCombinedOrientationData )->Rmat_prev[j], 3 ); @@ -842,19 +883,29 @@ ivas_error combine_external_and_head_orientations_dec( { IVAS_QUATERNION *headRotQuaternions = NULL; IVAS_VECTOR3 *listenerPos = NULL; +#ifndef API_5MS int16_t numHeadRotQuaternions = 0; +#endif if ( hHeadTrackData != NULL ) { +#ifdef API_5MS + headRotQuaternions = &hHeadTrackData->Quaternion; + listenerPos = &hHeadTrackData->Pos; +#else numHeadRotQuaternions = hHeadTrackData->num_quaternions; if ( hHeadTrackData->num_quaternions >= 0 ) { headRotQuaternions = hHeadTrackData->Quaternions; listenerPos = hHeadTrackData->Pos; } +#endif } - +#ifdef API_5MS + return combine_external_and_head_orientations( headRotQuaternions, listenerPos, hExtOrientationData, hCombinedOrientationData ); +#else return combine_external_and_head_orientations( headRotQuaternions, listenerPos, numHeadRotQuaternions, hExtOrientationData, hCombinedOrientationData ); +#endif } @@ -872,8 +923,10 @@ ivas_error combine_external_and_head_orientations_rend( { IVAS_QUATERNION *headRotQuaternions = NULL; IVAS_VECTOR3 *listenerPos = NULL; +#ifndef API_5MS int16_t numHeadRotQuaternions = 0; int16_t i; +#endif if ( hHeadTrackData != NULL ) { @@ -886,6 +939,13 @@ ivas_error combine_external_and_head_orientations_rend( else if ( hExtOrientationData != NULL ) { /* Head rotation data not available, use the freezed value or disable */ +#ifdef API_5MS + if ( hExtOrientationData->enableHeadRotation != 2 ) + { + hExtOrientationData->enableHeadRotation = 0; + } + +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { if ( hExtOrientationData->enableHeadRotation[i] != 2 ) @@ -893,9 +953,13 @@ ivas_error combine_external_and_head_orientations_rend( hExtOrientationData->enableHeadRotation[i] = 0; } } +#endif } - +#ifdef API_5MS + return combine_external_and_head_orientations( headRotQuaternions, listenerPos, hExtOrientationData, hCombinedOrientationData ); +#else return combine_external_and_head_orientations( headRotQuaternions, listenerPos, numHeadRotQuaternions, hExtOrientationData, hCombinedOrientationData ); +#endif } @@ -907,14 +971,19 @@ ivas_error combine_external_and_head_orientations_rend( *------------------------------------------------------------------------*/ ivas_error combine_external_and_head_orientations( - IVAS_QUATERNION *headRotQuaternions, /* i : quaternions for head rotation */ - IVAS_VECTOR3 *listenerPos, /* i : listener position */ - int16_t numHeadRotQuaternions, /* i : number of head rotation quaternions */ + IVAS_QUATERNION *headRotQuaternions, /* i : quaternions for head rotation */ + IVAS_VECTOR3 *listenerPos, /* i : listener position */ +#ifndef API_5MS + int16_t numHeadRotQuaternions, /* i : number of head rotation quaternions */ +#endif EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, /* i : external orientation handle */ COMBINED_ORIENTATION_HANDLE hCombinedOrientationData /* i/o: combined orientation handle */ ) { - int16_t i, j; +#ifndef API_5MS + int16_t i; +#endif + int16_t j; IVAS_QUATERNION identity; IVAS_VECTOR3 origo; @@ -942,6 +1011,18 @@ ivas_error combine_external_and_head_orientations( hCombinedOrientationData->interpolationIncrement = 1.0f; hCombinedOrientationData->Quaternions_ext_interpolation_start = identity; hCombinedOrientationData->Quaternions_ext_interpolation_target = identity; +#ifdef API_5MS + + hCombinedOrientationData->enableCombinedOrientation = 0; + hCombinedOrientationData->Quaternion = identity; + hCombinedOrientationData->listenerPos = origo; + + for ( j = 0; j < 3; j++ ) + { + set_zero( hCombinedOrientationData->Rmat[j], 3 ); + hCombinedOrientationData->Rmat[j][j] = 1.0f; + } +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { hCombinedOrientationData->enableCombinedOrientation[i] = 0; @@ -954,10 +1035,15 @@ ivas_error combine_external_and_head_orientations( hCombinedOrientationData->Rmat[i][j][j] = 1.0f; } } +#endif } else if ( hExtOrientationData == NULL && headRotQuaternions != NULL ) { /* Head rotation only */ +#ifdef API_5MS + hCombinedOrientationData->Quaternion = *headRotQuaternions; + +#else if ( numHeadRotQuaternions >= 0 ) { for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) @@ -965,11 +1051,47 @@ ivas_error combine_external_and_head_orientations( hCombinedOrientationData->Quaternions[i] = headRotQuaternions[i]; } } +#endif } if ( hExtOrientationData != NULL ) { /* External orientations */ +#ifdef API_5MS + + if ( hExtOrientationData->enableRotationInterpolation == 1 && hExtOrientationData->enableExternalOrientation > 0 ) + { + if ( hCombinedOrientationData->isInterpolationOngoing == TRUE && hCombinedOrientationData->interpolationCoefficient <= 1.0f && are_orientations_same( &hCombinedOrientationData->Quaternions_ext_interpolation_target, &hExtOrientationData->Quaternion ) == true ) + { + /* Continue interpolation */ + QuaternionSlerp( hCombinedOrientationData->Quaternions_ext_interpolation_start, hCombinedOrientationData->Quaternions_ext_interpolation_target, hCombinedOrientationData->interpolationCoefficient, &hCombinedOrientationData->Quaternion ); + hCombinedOrientationData->interpolationCoefficient += hCombinedOrientationData->interpolationIncrement; + } + else + { + /* Stop interpolation or check for new interpolation */ + hCombinedOrientationData->isInterpolationOngoing = FALSE; + hCombinedOrientationData->interpolationCoefficient = 1.0f; + hCombinedOrientationData->interpolationIncrement = 1.0f; + external_target_interpolation( hExtOrientationData, hCombinedOrientationData ); + } + } + else + { + /* Interpolation disabled, use the current orientation values */ + + /* Use the most recent external orientation */ + if ( hExtOrientationData->enableExternalOrientation == 1 ) + { + hCombinedOrientationData->Quaternion = hExtOrientationData->Quaternion; + } + /* Use the freezed external orientation */ + else if ( hExtOrientationData->enableExternalOrientation == 2 ) + { + hCombinedOrientationData->Quaternion = hCombinedOrientationData->Quaternion_prev_extOrientation; + } + } +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { if ( hExtOrientationData->enableRotationInterpolation[i] == 1 && hExtOrientationData->enableExternalOrientation[i] > 0 ) @@ -1005,11 +1127,46 @@ ivas_error combine_external_and_head_orientations( } } } +#endif } if ( hExtOrientationData != NULL && headRotQuaternions != NULL ) { /* Combine head and external orientations */ +#ifdef API_5MS + + /* Use the most recent head rotation */ + if ( hExtOrientationData->enableHeadRotation == 1 ) + { + if ( hExtOrientationData->enableExternalOrientation > 0 ) + { + QuaternionProduct( hCombinedOrientationData->Quaternion, *headRotQuaternions, &hCombinedOrientationData->Quaternion ); + } + else + { + hCombinedOrientationData->Quaternion = *headRotQuaternions; + } + } + /* Use the freezed head rotation */ + else if ( hExtOrientationData->enableHeadRotation == 2 ) + { + if ( hExtOrientationData->enableExternalOrientation > 0 ) + { + QuaternionProduct( hCombinedOrientationData->Quaternion, hCombinedOrientationData->Quaternion_prev_headRot, &hCombinedOrientationData->Quaternion ); + } + else + { + hCombinedOrientationData->Quaternion = hCombinedOrientationData->Quaternion_prev_headRot; + } + } + + /* Reset the combined orientations to identity */ + if ( hExtOrientationData->enableHeadRotation == 0 && hExtOrientationData->enableExternalOrientation == 0 ) + { + hCombinedOrientationData->Quaternion = identity; + } + +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { /* Use the most recent head rotation */ @@ -1043,20 +1200,36 @@ ivas_error combine_external_and_head_orientations( hCombinedOrientationData->Quaternions[i] = identity; } } +#endif } if ( headRotQuaternions != NULL || hExtOrientationData != NULL ) { /* Calculate the combined rotation matrix */ +#ifdef API_5MS + QuatToRotMat( hCombinedOrientationData->Quaternion, hCombinedOrientationData->Rmat ); +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { QuatToRotMat( hCombinedOrientationData->Quaternions[i], hCombinedOrientationData->Rmat[i] ); } +#endif } /* Save the current orientations */ if ( hExtOrientationData != NULL ) { +#ifdef API_5MS + if ( hExtOrientationData->enableExternalOrientation > 0 ) + { + hCombinedOrientationData->Quaternion_prev_extOrientation = hCombinedOrientationData->Quaternion; + } + else + { + hCombinedOrientationData->Quaternion_prev_extOrientation = identity; + } + +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { if ( hExtOrientationData->enableExternalOrientation[i] > 0 ) @@ -1068,9 +1241,29 @@ ivas_error combine_external_and_head_orientations( hCombinedOrientationData->Quaternions_prev_extOrientation[i] = identity; } } +#endif } if ( headRotQuaternions != NULL ) { +#ifdef API_5MS + if ( hExtOrientationData != NULL ) + { + if ( hExtOrientationData->enableHeadRotation > 0 ) + { + hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternions; + } + else + { + hCombinedOrientationData->Quaternion_prev_headRot = identity; + } + } + else + { + hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternions; + } + hCombinedOrientationData->listenerPos = *listenerPos; + +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { if ( hExtOrientationData != NULL ) @@ -1097,11 +1290,16 @@ ivas_error combine_external_and_head_orientations( } hCombinedOrientationData->listenerPos[i] = listenerPos[i]; } +#endif } /* Check if combined orientation is enabled */ if ( headRotQuaternions != NULL && hExtOrientationData == NULL ) { +#ifdef API_5MS + hCombinedOrientationData->enableCombinedOrientation = 1; + +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { if ( numHeadRotQuaternions >= 0 ) @@ -1113,9 +1311,20 @@ ivas_error combine_external_and_head_orientations( hCombinedOrientationData->enableCombinedOrientation[i] = 0; } } +#endif } else if ( headRotQuaternions == NULL && hExtOrientationData != NULL ) { +#ifdef API_5MS + if ( hExtOrientationData->enableExternalOrientation > 0 ) + { + hCombinedOrientationData->enableCombinedOrientation = 1; + } + else + { + hCombinedOrientationData->enableCombinedOrientation = 0; + } +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { if ( hExtOrientationData->enableExternalOrientation[i] > 0 ) @@ -1127,9 +1336,20 @@ ivas_error combine_external_and_head_orientations( hCombinedOrientationData->enableCombinedOrientation[i] = 0; } } +#endif } else if ( headRotQuaternions != NULL && hExtOrientationData != NULL ) { +#ifdef API_5MS + if ( hExtOrientationData->enableExternalOrientation > 0 || hExtOrientationData->enableHeadRotation > 0 ) + { + hCombinedOrientationData->enableCombinedOrientation = 1; + } + else + { + hCombinedOrientationData->enableCombinedOrientation = 0; + } +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { if ( hExtOrientationData->enableExternalOrientation[i] > 0 || ( hExtOrientationData->enableHeadRotation[i] > 0 && numHeadRotQuaternions >= 0 ) ) @@ -1141,13 +1361,18 @@ ivas_error combine_external_and_head_orientations( hCombinedOrientationData->enableCombinedOrientation[i] = 0; } } +#endif } else { +#ifdef API_5MS + hCombinedOrientationData->enableCombinedOrientation = 0; +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { hCombinedOrientationData->enableCombinedOrientation[i] = 0; } +#endif } return IVAS_ERR_OK; @@ -1161,35 +1386,68 @@ ivas_error combine_external_and_head_orientations( *------------------------------------------------------------------------*/ void external_target_interpolation( - EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, /* i : external orientation handle */ - COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i/o: combined orientation handle */ - const int16_t i ) + EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, /* i : external orientation handle */ + COMBINED_ORIENTATION_HANDLE hCombinedOrientationData /* i/o: combined orientation handle */ +#ifndef API_5MS + , + const int16_t i +#endif +) { /* Sanity check for number of frames */ +#ifdef API_5MS + hExtOrientationData->numFramesToTargetOrientation = min( hExtOrientationData->numFramesToTargetOrientation, hCombinedOrientationData->maximumFramesToTargetOrientation ); + hExtOrientationData->numFramesToTargetOrientation = max( hExtOrientationData->numFramesToTargetOrientation, 0 ); +#else hExtOrientationData->numFramesToTargetOrientation[i] = min( hExtOrientationData->numFramesToTargetOrientation[i], hCombinedOrientationData->maximumFramesToTargetOrientation ); hExtOrientationData->numFramesToTargetOrientation[i] = max( hExtOrientationData->numFramesToTargetOrientation[i], 0 ); +#endif /* Interpolate from the current orientation to the target orientation */ +#ifdef API_5MS + if ( hExtOrientationData->numFramesToTargetOrientation > 0 ) +#else if ( hExtOrientationData->numFramesToTargetOrientation[i] > 0 ) +#endif { - if ( are_orientations_same( &hCombinedOrientationData->Quaternions_ext_interpolation_target, &hExtOrientationData->Quaternions[i] ) == false ) +#ifdef API_5MS + if ( are_orientations_same( &hCombinedOrientationData->Quaternions_ext_interpolation_target, &hExtOrientationData->Quaternion ) == false ) +#else + if ( are_orientations_same( &hCombinedOrientationData->Quaternions_ext_interpolation_target, &hExtOrientationData->Quaternion ) == false ) +#endif { /* Target orientation is different from the previous target, update the values */ /* Set the received orientation as the target */ +#ifdef API_5MS + hCombinedOrientationData->Quaternions_ext_interpolation_target = hExtOrientationData->Quaternion; +#else hCombinedOrientationData->Quaternions_ext_interpolation_target = hExtOrientationData->Quaternions[i]; +#endif /* Use the most recent external orientation as the starting orientation */ +#ifdef API_5MS + hCombinedOrientationData->Quaternions_ext_interpolation_start = hCombinedOrientationData->Quaternion_prev_extOrientation; +#else hCombinedOrientationData->Quaternions_ext_interpolation_start = hCombinedOrientationData->Quaternions_prev_extOrientation[i]; +#endif /* Calculate the interpolation increment and coefficient */ +#ifdef API_5MS + hCombinedOrientationData->interpolationIncrement = 1.0f / ( (float) hExtOrientationData->numFramesToTargetOrientation * (float) MAX_PARAM_SPATIAL_SUBFRAMES ); +#else hCombinedOrientationData->interpolationIncrement = 1.0f / ( (float) hExtOrientationData->numFramesToTargetOrientation[i] * (float) MAX_PARAM_SPATIAL_SUBFRAMES ); +#endif hCombinedOrientationData->interpolationCoefficient = hCombinedOrientationData->interpolationIncrement; } /* Interpolate */ hCombinedOrientationData->isInterpolationOngoing = TRUE; +#ifdef API_5MS + QuaternionSlerp( hCombinedOrientationData->Quaternions_ext_interpolation_start, hCombinedOrientationData->Quaternions_ext_interpolation_target, hCombinedOrientationData->interpolationCoefficient, &hCombinedOrientationData->Quaternion ); +#else QuaternionSlerp( hCombinedOrientationData->Quaternions_ext_interpolation_start, hCombinedOrientationData->Quaternions_ext_interpolation_target, hCombinedOrientationData->interpolationCoefficient, &hCombinedOrientationData->Quaternions[i] ); +#endif hCombinedOrientationData->interpolationCoefficient += hCombinedOrientationData->interpolationIncrement; } else @@ -1198,7 +1456,11 @@ void external_target_interpolation( hCombinedOrientationData->isInterpolationOngoing = FALSE; hCombinedOrientationData->interpolationCoefficient = 1.0f; hCombinedOrientationData->interpolationIncrement = 1.0f; +#ifdef API_5MS + hCombinedOrientationData->Quaternion = hExtOrientationData->Quaternion; +#else hCombinedOrientationData->Quaternions[i] = hExtOrientationData->Quaternions[i]; +#endif } } diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index 3dde2563f2..14de5e7d55 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -286,12 +286,19 @@ typedef struct ivas_binaural_head_track_struct typedef struct ivas_external_orientation_struct { +#ifdef API_5MS + int8_t enableHeadRotation; /* 0 - disable, 1 - enable, 2 - freeze to previous rotation */ + int8_t enableExternalOrientation; /* 0 - disable, 1 - enable, 2 - freeze to previous orientation */ + int8_t enableRotationInterpolation; /* 0 - disable, 1 - enable */ + int16_t numFramesToTargetOrientation; /* Number of frames until target orientation is reached */ + IVAS_QUATERNION Quaternion; /* External orientation in quaternions */ +#else int8_t enableHeadRotation[MAX_PARAM_SPATIAL_SUBFRAMES]; /* 0 - disable, 1 - enable, 2 - freeze to previous rotation */ int8_t enableExternalOrientation[MAX_PARAM_SPATIAL_SUBFRAMES]; /* 0 - disable, 1 - enable, 2 - freeze to previous orientation */ int8_t enableRotationInterpolation[MAX_PARAM_SPATIAL_SUBFRAMES]; /* 0 - disable, 1 - enable */ int16_t numFramesToTargetOrientation[MAX_PARAM_SPATIAL_SUBFRAMES]; /* Number of frames until target orientation is reached */ IVAS_QUATERNION Quaternions[MAX_PARAM_SPATIAL_SUBFRAMES]; /* External orientation in quaternions */ - +#endif } EXTERNAL_ORIENTATION_DATA, *EXTERNAL_ORIENTATION_HANDLE; /*----------------------------------------------------------------------------------* @@ -300,7 +307,11 @@ typedef struct ivas_external_orientation_struct typedef struct ivas_combined_orientation_struct { +#ifdef API_5MS + int16_t enableCombinedOrientation; +#else int16_t enableCombinedOrientation[MAX_PARAM_SPATIAL_SUBFRAMES]; +#endif float interpolationCoefficient; float interpolationIncrement; int16_t maximumFramesToTargetOrientation; @@ -308,17 +319,31 @@ typedef struct ivas_combined_orientation_struct uint8_t lrSwitchedCurrent; float lrSwitchInterpVal; bool isInterpolationOngoing; +#ifdef API_5MS + IVAS_QUATERNION Quaternion; + IVAS_QUATERNION Quaternion_prev_headRot; + IVAS_QUATERNION Quaternion_prev_extOrientation; +#else IVAS_QUATERNION Quaternions[MAX_PARAM_SPATIAL_SUBFRAMES]; IVAS_QUATERNION Quaternions_prev_headRot[MAX_PARAM_SPATIAL_SUBFRAMES]; IVAS_QUATERNION Quaternions_prev_extOrientation[MAX_PARAM_SPATIAL_SUBFRAMES]; +#endif IVAS_QUATERNION Quaternions_ext_interpolation_start; IVAS_QUATERNION Quaternions_ext_interpolation_target; +#ifdef API_5MS + float Rmat[3][3]; +#else float Rmat[MAX_PARAM_SPATIAL_SUBFRAMES][3][3]; +#endif float Rmat_prev[3][3]; float chEneIIR[2][MASA_FREQUENCY_BANDS]; /* independent of the format. MASA bands are suitable for the task and readily available in ROM. */ float procChEneIIR[2][MASA_FREQUENCY_BANDS]; int16_t shd_rot_max_order; +#ifdef API_5MS + IVAS_VECTOR3 listenerPos; +#else IVAS_VECTOR3 listenerPos[MAX_PARAM_SPATIAL_SUBFRAMES]; +#endif } COMBINED_ORIENTATION_DATA, *COMBINED_ORIENTATION_HANDLE; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index c1963fa031..89b51e7745 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -2632,6 +2632,7 @@ static DecoderDummy *initDecoderDummy( decDummy->hHeadTrackData->Quaternions[i].y = 0.0f; decDummy->hHeadTrackData->Quaternions[i].z = 0.0f; } +#endif decDummy->hHeadTrackData->lrSwitchInterpVal = 0.0f; decDummy->hHeadTrackData->lrSwitchedCurrent = 0; decDummy->hHeadTrackData->lrSwitchedNext = 0; @@ -4254,21 +4255,35 @@ ivas_error IVAS_REND_SetExternalOrientation( if ( orientation == NULL ) { +#ifdef API_5MS + hIvasRend->hExternalOrientationData->enableExternalOrientation = 0; +#else for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; ++i ) { hIvasRend->hExternalOrientationData->enableExternalOrientation[i] = 0; } +#endif } else { for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; ++i ) { +#ifdef API_5MS + /* just fix compilation issues, ToDo: change ext renderer also to 5ms */ + QuaternionInverse( orientation[i], &hIvasRend->hExternalOrientationData->Quaternion ); + + hIvasRend->hExternalOrientationData->enableHeadRotation = enableHeadRotation[i]; + hIvasRend->hExternalOrientationData->enableExternalOrientation = enableExternalOrientation[i]; + hIvasRend->hExternalOrientationData->enableRotationInterpolation = enableRotationInterpolation[i]; + hIvasRend->hExternalOrientationData->numFramesToTargetOrientation = numFramesToTargetOrientation[i]; +#else QuaternionInverse( orientation[i], &hIvasRend->hExternalOrientationData->Quaternions[i] ); hIvasRend->hExternalOrientationData->enableHeadRotation[i] = enableHeadRotation[i]; hIvasRend->hExternalOrientationData->enableExternalOrientation[i] = enableExternalOrientation[i]; hIvasRend->hExternalOrientationData->enableRotationInterpolation[i] = enableRotationInterpolation[i]; hIvasRend->hExternalOrientationData->numFramesToTargetOrientation[i] = numFramesToTargetOrientation[i]; +#endif } } @@ -4317,7 +4332,12 @@ ivas_error IVAS_REND_GetCombinedOrientation( { for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; ++i ) { +#ifdef API_5MS + /* fix compilation only,ToDo adapt ext renderer to 5ms , this functions looks stale anyway */ + pOrientation[i] = hIvasRend->hCombinedOrientationData->Quaternion; +#else pOrientation[i] = hIvasRend->hCombinedOrientationData->Quaternions[i]; +#endif } } @@ -4476,7 +4496,12 @@ static ivas_error rotateFrameMc( { for ( j = 0; j < 3; j++ ) { +#ifdef API_5MS + /* fix compiling only, ToDo adapt ext renderer to 5ms */ + Rmat[i][j] = ( *hCombinedOrientationData )->Rmat[i][j]; +#else Rmat[i][j] = ( *hCombinedOrientationData )->Rmat[subframe_idx][i][j]; +#endif } } else @@ -4593,7 +4618,12 @@ static ivas_error rotateFrameSba( { for ( l = 0; l < 3; l++ ) { +#ifdef API_5MS + /* fix compilation only, ToDo adapt ext renderer to 5ms */ + Rmat[i][l] = ( *hCombinedOrientationData )->Rmat[i][l]; +#else Rmat[i][l] = ( *hCombinedOrientationData )->Rmat[subframe_idx][i][l]; +#endif } } else @@ -4731,14 +4761,23 @@ static ivas_error renderIsmToBinauralRoom( combinedOrientationEnabled = 0; if ( hCombinedOrientationData != NULL ) { +#ifdef API_5MS + /* fix compilation only, ToDo adapt ext renderer to 5ms */ + if ( ( *hCombinedOrientationData )->enableCombinedOrientation != 0 ) + { + combinedOrientationEnabled = 1; + } +#else for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { + if ( ( *hCombinedOrientationData )->enableCombinedOrientation[subframe_idx] != 0 ) { combinedOrientationEnabled = 1; break; } } +#endif } @@ -4750,6 +4789,16 @@ static ivas_error renderIsmToBinauralRoom( { for ( i = 0; i < 3; i++ ) { +#ifdef API_5MS + /* at least this looks like it is adapted to 5ms already since it "loops" only over the first subframe, ToDo needs to be checked */ + if ( hCombinedOrientationData != NULL && ( *hCombinedOrientationData )->enableCombinedOrientation ) + { + for ( j = 0; j < 3; j++ ) + { + Rmat[i][j] = ( *hCombinedOrientationData )->Rmat[i][j]; + } + } +#else if ( hCombinedOrientationData != NULL && ( *hCombinedOrientationData )->enableCombinedOrientation[subframe_idx] ) { for ( j = 0; j < 3; j++ ) @@ -4757,6 +4806,7 @@ static ivas_error renderIsmToBinauralRoom( Rmat[i][j] = ( *hCombinedOrientationData )->Rmat[subframe_idx][i][j]; } } +#endif else { /* Set to identity */ @@ -5156,7 +5206,9 @@ static ivas_error renderMcToBinaural( IVAS_REND_AudioBuffer tmpRotBuffer; const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData; int8_t combinedOrientationEnabled; +#ifndef API_5MS int16_t subframe_idx; +#endif float *p_tmpRendBuffer[MAX_OUTPUT_CHANNELS]; int16_t i; @@ -5173,6 +5225,14 @@ static ivas_error renderMcToBinaural( combinedOrientationEnabled = 0; if ( hCombinedOrientationData != NULL ) { +#ifdef API_5MS + /* fix compiling only, ToDo ext renderer needs to adapted to 5ms */ + if ( ( *hCombinedOrientationData )->enableCombinedOrientation != 0 ) + { + combinedOrientationEnabled = 1; + } + +#else for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { if ( ( *hCombinedOrientationData )->enableCombinedOrientation[subframe_idx] != 0 ) @@ -5181,6 +5241,7 @@ static ivas_error renderMcToBinaural( break; } } +#endif } if ( ( inConfig == IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) || ( combinedOrientationEnabled @@ -5254,7 +5315,9 @@ static ivas_error renderMcToBinauralRoom( int16_t i; const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData; int8_t combinedOrientationEnabled; +#ifndef API_5MS int16_t subframe_idx; +#endif for ( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) { @@ -5269,6 +5332,13 @@ static ivas_error renderMcToBinauralRoom( combinedOrientationEnabled = 0; if ( hCombinedOrientationData != NULL ) { +#ifdef API_5MS + /* fix compiling only, ToDo ext renderer needs to adapted to 5ms */ + if ( ( *hCombinedOrientationData )->enableCombinedOrientation != 0 ) + { + combinedOrientationEnabled = 1; + } +#else for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { if ( ( *hCombinedOrientationData )->enableCombinedOrientation[subframe_idx] != 0 ) @@ -5277,6 +5347,7 @@ static ivas_error renderMcToBinauralRoom( break; } } +#endif } if ( ( mcInput->hReverb != NULL && outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) && ( ( inConfig == IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) || ( combinedOrientationEnabled && ( inConfig == IVAS_REND_AUDIO_CONFIG_5_1 || inConfig == IVAS_REND_AUDIO_CONFIG_7_1 ) ) ) ) @@ -5349,7 +5420,9 @@ static ivas_error renderMcCustomLsToBinauralRoom( float *p_tmpCrendBuffer[MAX_OUTPUT_CHANNELS]; const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData; int8_t combinedOrientationEnabled; +#ifndef API_5MS int16_t subframe_idx; +#endif push_wmops( "renderMcCustomLsToBinauralRoom" ); @@ -5364,6 +5437,13 @@ static ivas_error renderMcCustomLsToBinauralRoom( combinedOrientationEnabled = 0; if ( hCombinedOrientationData != NULL ) { +#ifdef API_5MS + /* fix compilin only, ToDo adapt renderer to 5ms */ + if ( ( *hCombinedOrientationData )->enableCombinedOrientation != 0 ) + { + combinedOrientationEnabled = 1; + } +#else for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { if ( ( *hCombinedOrientationData )->enableCombinedOrientation[subframe_idx] != 0 ) @@ -5372,6 +5452,7 @@ static ivas_error renderMcCustomLsToBinauralRoom( break; } } +#endif } /* apply rotation */ @@ -5635,7 +5716,9 @@ static ivas_error renderSbaToBinaural( int16_t i; const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData; int8_t combinedOrientationEnabled; +#ifndef API_5MS int16_t subframe_idx; +#endif push_wmops( "renderSbaToBinaural" ); @@ -5648,6 +5731,13 @@ static ivas_error renderSbaToBinaural( combinedOrientationEnabled = 0; if ( hCombinedOrientationData != NULL ) { +#ifdef API_5MS + /* fix compiling only, ToDo ext renderer needs to adapted to 5ms */ + if ( ( *hCombinedOrientationData )->enableCombinedOrientation != 0 ) + { + combinedOrientationEnabled = 1; + } +#else for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { if ( ( *hCombinedOrientationData )->enableCombinedOrientation[subframe_idx] != 0 ) @@ -5656,6 +5746,7 @@ static ivas_error renderSbaToBinaural( break; } } +#endif } /* apply rotation */ @@ -5711,7 +5802,9 @@ static ivas_error renderSbaToBinauralRoom( float *p_tmpCrendBuffer[MAX_OUTPUT_CHANNELS]; const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData; int8_t combinedOrientationEnabled; +#ifndef API_5MS int16_t subframe_idx; +#endif tmpRotBuffer = outAudio; /* avoid compilation warning */ @@ -5726,6 +5819,13 @@ static ivas_error renderSbaToBinauralRoom( combinedOrientationEnabled = 0; if ( hCombinedOrientationData != NULL ) { +#ifdef API_5MS + /* fix compiling only, ToDo ext renderer needs to adapted to 5ms */ + if ( ( *hCombinedOrientationData )->enableCombinedOrientation != 0 ) + { + combinedOrientationEnabled = 1; + } +#else for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { if ( ( *hCombinedOrientationData )->enableCombinedOrientation[subframe_idx] != 0 ) @@ -5734,6 +5834,7 @@ static ivas_error renderSbaToBinauralRoom( break; } } +#endif } /* apply rotation */ @@ -6201,8 +6302,14 @@ static ivas_error renderActiveInputsMasa( { for ( sf_idx = 0; sf_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; ++sf_idx ) { +#ifdef API_5MS + /* fix compilation only, ToDo adapt ext renderer to 5ms */ + pCurrentInput->decDummy->hHeadTrackData->Quaternion = hIvasRend->headRotData.headPositions[sf_idx]; + pCurrentInput->decDummy->hHeadTrackData->Pos = hIvasRend->headRotData.Pos[sf_idx]; +#else pCurrentInput->decDummy->hHeadTrackData->Quaternions[sf_idx] = hIvasRend->headRotData.headPositions[sf_idx]; pCurrentInput->decDummy->hHeadTrackData->Pos[sf_idx] = hIvasRend->headRotData.Pos[sf_idx]; +#endif } } -- GitLab From 167aafc1b91d5e80f17084f9579de437b2483e75 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Thu, 15 Jun 2023 13:46:31 +0200 Subject: [PATCH 004/175] Add tests for 5ms renderer framing The feature is not implemented yet so they will fail --- tests/renderer/constants.py | 3 ++ tests/renderer/test_renderer.py | 68 ++++++++++++++++++++++----------- tests/renderer/utils.py | 4 ++ 3 files changed, 52 insertions(+), 23 deletions(-) diff --git a/tests/renderer/constants.py b/tests/renderer/constants.py index 877a1454c2..5780ee964b 100644 --- a/tests/renderer/constants.py +++ b/tests/renderer/constants.py @@ -200,6 +200,9 @@ HR_TRAJECTORIES_TO_TEST = [ "rotate_yaw_pitch_roll1", ] +""" 5ms framing """ +FRAMING_5MS_TO_TEST = [True, False] + """ Per-testcase xfail SNR thresholds (dB) """ pass_snr = dict() # not relevant for tests anymore, should be deprecated soon _pass_snr = { diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index 22f439c8b1..beed8e897b 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -35,24 +35,28 @@ from .utils import * @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS[2:]) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) -def test_ambisonics(test_info, in_fmt, out_fmt): - run_renderer(in_fmt, out_fmt) +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_ambisonics(test_info, in_fmt, out_fmt, framing_5ms): + run_renderer(in_fmt, out_fmt, framing_5ms=framing_5ms) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) -def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt): - run_renderer(in_fmt, out_fmt) +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): + run_renderer(in_fmt, out_fmt, framing_5ms=framing_5ms) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) -def test_ambisonics_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_ambisonics_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing_5ms): run_renderer( in_fmt, out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), + framing_5ms=framing_5ms, ) @@ -250,23 +254,26 @@ def test_ambisonics_binaural_headrotation_refveclev_vs_refvec( @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS[2:]) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) -def test_multichannel(test_info, in_fmt, out_fmt): - run_renderer(in_fmt, out_fmt) +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_multichannel(test_info, in_fmt, out_fmt, framing_5ms): + run_renderer(in_fmt, out_fmt, framing_5ms=framing_5ms) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) -def test_multichannel_binaural_static(test_info, in_fmt, out_fmt): +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_multichannel_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") - run_renderer(in_fmt, out_fmt) + run_renderer(in_fmt, out_fmt, framing_5ms=framing_5ms) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) -def test_multichannel_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_multichannel_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing_5ms): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") @@ -275,12 +282,14 @@ def test_multichannel_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file in_fmt, out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), + framing_5ms=framing_5ms, ) else: run_renderer( in_fmt, out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), + framing_5ms=framing_5ms, ) @@ -318,28 +327,31 @@ def test_multichannel_binaural_headrotation_refvec_rotating(test_info, in_fmt, o @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS[2:]) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) -def test_ism(test_info, in_fmt, out_fmt): - run_renderer(in_fmt, out_fmt, in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt]) +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_ism(test_info, in_fmt, out_fmt, framing_5ms): + run_renderer(in_fmt, out_fmt, in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt], framing_5ms=framing_5ms) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) -def test_ism_binaural_static(test_info, in_fmt, out_fmt): +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_ism_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): try: in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] except: in_meta_files = None if out_fmt == "BINAURAL": - run_renderer(in_fmt, out_fmt, in_meta_files=in_meta_files) + run_renderer(in_fmt, out_fmt, in_meta_files=in_meta_files, framing_5ms=framing_5ms) else: - run_renderer(in_fmt, out_fmt, in_meta_files=in_meta_files) + run_renderer(in_fmt, out_fmt, in_meta_files=in_meta_files, framing_5ms=framing_5ms) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) -def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing_5ms): try: in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] except: @@ -351,6 +363,7 @@ def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), in_meta_files=in_meta_files, + framing_5ms=framing_5ms, ) else: run_renderer( @@ -358,6 +371,7 @@ def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), in_meta_files=in_meta_files, + framing_5ms=framing_5ms, ) @@ -399,8 +413,9 @@ def test_ism_binaural_headrotation_refvec_rotating(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) -def test_masa(test_info, in_fmt, out_fmt): - run_renderer(in_fmt, out_fmt, in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt]) +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_masa(test_info, in_fmt, out_fmt, framing_5ms): + run_renderer(in_fmt, out_fmt, in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt], framing_5ms=framing_5ms) """ Custom loudspeaker layouts """ @@ -408,8 +423,9 @@ def test_masa(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS[2:]) @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) -def test_custom_ls_input(test_info, in_layout, out_fmt): - run_renderer(CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt) +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_custom_ls_input(test_info, in_layout, out_fmt, framing_5ms): + run_renderer(CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, framing_5ms=framing_5ms) @pytest.mark.parametrize("out_fmt", CUSTOM_LS_TO_TEST) @@ -432,21 +448,25 @@ def test_custom_ls_input_output(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) -def test_custom_ls_input_binaural(test_info, in_layout, out_fmt): +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_custom_ls_input_binaural(test_info, in_layout, out_fmt, framing_5ms): run_renderer( CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, + framing_5ms=framing_5ms, ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) -def test_custom_ls_input_binaural_headrotation(test_info, in_layout, out_fmt, trj_file): +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_custom_ls_input_binaural_headrotation(test_info, in_layout, out_fmt, trj_file, framing_5ms): run_renderer( CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), + framing_5ms=framing_5ms, ) @@ -455,11 +475,13 @@ def test_custom_ls_input_binaural_headrotation(test_info, in_layout, out_fmt, tr @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS[2:]) @pytest.mark.parametrize("in_fmt", METADATA_SCENES_TO_TEST) -def test_metadata(test_info, in_fmt, out_fmt): +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_metadata(test_info, in_fmt, out_fmt, framing_5ms): run_renderer( "META", out_fmt, metadata_input=TEST_VECTOR_DIR.joinpath(f"{in_fmt}.txt"), + framing_5ms=framing_5ms, ) diff --git a/tests/renderer/utils.py b/tests/renderer/utils.py index 356902ff47..ac5c57695a 100644 --- a/tests/renderer/utils.py +++ b/tests/renderer/utils.py @@ -114,6 +114,7 @@ def run_renderer( output_path_base: str = OUTPUT_PATH_CUT, binary_suffix: str = "", is_comparetest: Optional[bool] = False, + framing_5ms: Optional[bool] = False, ) -> Tuple[np.ndarray, int]: """CuT creation with standalone renderer""" if trj_file is not None: @@ -200,6 +201,9 @@ def run_renderer( if config_file is not None: cmd.extend(["-rc", str(config_file)]) + if framing_5ms: + cmd.extend(["-fr5"]) + run_cmd(cmd) return pyaudio3dtools.audiofile.readfile(out_file) -- GitLab From 52b5489763af0a72c31f3febebe5dcc6d9dcad83 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 15 Jun 2023 13:55:13 +0200 Subject: [PATCH 005/175] fix compiling issues with API_5MS inactive --- apps/decoder.c | 10 +++++++--- lib_com/options.h | 1 + lib_dec/ivas_jbm_dec.c | 3 +++ lib_dec/lib_dec.c | 10 ++++++++++ lib_rend/ivas_objectRenderer.c | 8 ++++++++ lib_rend/ivas_objectRenderer_hrFilt.c | 3 ++- lib_rend/ivas_rotation.c | 2 +- 7 files changed, 32 insertions(+), 5 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index d8f16e7768..d8229ce705 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -2080,7 +2080,7 @@ static ivas_error decodeG192( } /* decode and get samples */ - if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, pcmBuf, &nSamplesFlushed ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, pcmBuf, &nSamplesFlushed ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_VoIP_Flush: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; @@ -2858,7 +2858,7 @@ static ivas_error decodeVoIP( int16_t nOutSamples = 0; #ifndef API_5MS uint16_t nSamplesAvailableNext = 0; -#endif +#endif #ifdef DEBUG_JBM_CMD_OPTION nOutSamples = (int16_t) ( arg.output_Fs / 1000 * arg.frontendFetchSizeMs ); #else @@ -3325,7 +3325,11 @@ static ivas_error decodeVariableSpeed( fprintf( stderr, "\nError: input bitstream file couldn't be read: %s \n\n", arg.inputBitstreamFilename ); goto cleanup; } +#ifdef API_5MS IVAS_DEC_VoIP_SetScale( hIvasDec, scale, scale ); +#else + IVAS_DEC_VoIP_SetScale( hIvasDec, scale ); +#endif } if ( ( error = BS_Reader_ReadFrame_short( hBsReader, bit_stream, &num_bits, &bfi ) ) != IVAS_ERR_OK ) @@ -3581,7 +3585,7 @@ static ivas_error decodeVariableSpeed( } /* decode and get samples */ - if ( ( error = IVAS_DEC_VoIP_Flush( hIvasDec, nOutSamples, pcmBuf, &nSamplesAvailableNext, &nSamplesFlushed ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, pcmBuf, &nSamplesAvailableNext, &nSamplesFlushed ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_VoIP_Flush: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; diff --git a/lib_com/options.h b/lib_com/options.h index bee9901a56..9caeda123a 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -156,6 +156,7 @@ #define FIX_XXX_JITTER_SBA_BINAURAL_GAIN #define FIX_XXX_HEADTRACKER_INIT +#define FIX_XXX_TDOBJRENDERER_INPUT #define API_5MS /* ################## End DEVELOPMENT switches ######################### */ diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 2c0a05465c..8e6b0541db 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1645,6 +1645,9 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( n_samp_full = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); n_samp_residual = 0; } +#else + n_samp_full = ( NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_L_FRAME_NS ) + hTcBuffer->n_samples_granularity - 1 ); + n_samp_residual = hTcBuffer->n_samples_granularity - 1; #endif nsamp_to_allocate = hTcBuffer->nchan_buffer_full * n_samp_full; nsamp_to_allocate += nchan_residual * n_samp_residual; diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 351ddf8722..86d46fe2b0 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -3655,6 +3655,7 @@ ivas_error IVAS_DEC_reconfigure( #ifdef API_5MS } #endif +#ifdef API_5MS if ( ( hIvasDec->apaExecBuffer = malloc( sizeof( float ) * apa_buffer_size * nTransportChannels ) ) == NULL ) { @@ -3662,6 +3663,15 @@ ivas_error IVAS_DEC_reconfigure( } set_zero( hIvasDec->apaExecBuffer, apa_buffer_size * nTransportChannels ); +#else + if ( ( hVoIP->apaExecBuffer = malloc( sizeof( float ) * APA_BUF_PER_CHANNEL * nTransportChannels ) ) == NULL ) + + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); + } + + set_zero( hVoIP->apaExecBuffer, APA_BUF_PER_CHANNEL * nTransportChannels ); +#endif } else { diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 842925d11a..9f39aa8b93 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -397,9 +397,17 @@ ivas_error TDREND_GetMix( { pan_left = ( SrcSpatial_p->Pos_p[1] + 1.f ) * 0.5f; pan_right = 1.f - pan_left; +#ifdef FIX_XXX_TDOBJRENDERER_INPUT + v_multc_acc( Src_p->InputFrame_p, pan_left, output_buf[0], subframe_length ); + v_multc_acc( Src_p->InputFrame_p, pan_right, output_buf[1], subframe_length ); +#else v_multc_acc( &Src_p->InputFrame_p[subframe_idx * subframe_length], pan_left, output_buf[0], subframe_length ); v_multc_acc( &Src_p->InputFrame_p[subframe_idx * subframe_length], pan_right, output_buf[1], subframe_length ); +#endif } +#ifdef FIX_XXX_TDOBJRENDERER_INPUT + Src_p->InputFrame_p += subframe_length; +#endif } /* Populate output variable */ diff --git a/lib_rend/ivas_objectRenderer_hrFilt.c b/lib_rend/ivas_objectRenderer_hrFilt.c index 6463261ec4..084da6550c 100644 --- a/lib_rend/ivas_objectRenderer_hrFilt.c +++ b/lib_rend/ivas_objectRenderer_hrFilt.c @@ -79,8 +79,9 @@ ivas_error TDREND_REND_RenderSourceHRFilt( v_add( LeftOutputFrame, output_buf[0], output_buf[0], subframe_length ); v_add( RightOutputFrame, output_buf[1], output_buf[1], subframe_length ); +#ifndef FIX_XXX_TDOBJRENDERER_INPUT Src_p->InputFrame_p += subframe_length; /* Increment input pointer */ - +#endif return IVAS_ERR_OK; } diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 184f382ee8..0997626bbb 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -1413,7 +1413,7 @@ void external_target_interpolation( #ifdef API_5MS if ( are_orientations_same( &hCombinedOrientationData->Quaternions_ext_interpolation_target, &hExtOrientationData->Quaternion ) == false ) #else - if ( are_orientations_same( &hCombinedOrientationData->Quaternions_ext_interpolation_target, &hExtOrientationData->Quaternion ) == false ) + if ( are_orientations_same( &hCombinedOrientationData->Quaternions_ext_interpolation_target, &hExtOrientationData->Quaternions[i] ) == false ) #endif { /* Target orientation is different from the previous target, update the values */ -- GitLab From c0f7678d6bb651ce2b856a32b854929c395f6664 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Thu, 15 Jun 2023 14:07:16 +0200 Subject: [PATCH 006/175] Copy CI yml from from other repo for easier editing --- .gitlab-ci-custom.yml | 1092 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 1088 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci-custom.yml b/.gitlab-ci-custom.yml index 86c1f487e0..bef4bdb69e 100644 --- a/.gitlab-ci-custom.yml +++ b/.gitlab-ci-custom.yml @@ -1,4 +1,1088 @@ -include: - - project: $CUSTOM_CI_PROJECT - ref: $CUSTOM_CI_REF - file: $CUSTOM_CI_FILE +# include: +# - project: $CUSTOM_CI_PROJECT +# ref: $CUSTOM_CI_REF +# file: $CUSTOM_CI_FILE + +# Copied from ivas-ci:main + +variables: + # Variables as used in external repo (may be altered in value, see comments) + TESTV_DIR: "/usr/local/testv" + LTV_DIR: "/usr/local/ltv" + BUILD_OUTPUT: "build_output.txt" + EVS_BE_TEST_DIR: "/usr/local/be_2_evs_test" + SANITIZER_TESTS: "CLANG1 CLANG2" + OUT_FORMATS_CHANNEL_BASED: "stereo mono 5_1 5_1_2 5_1_4 7_1 7_1_4" + OUT_FORMATS_SCENE_BASED: "FOA HOA2 HOA3" + OUT_FORMATS_BINAURAL: "BINAURAL BINAURAL_ROOM_IR BINAURAL_ROOM_REVERB" + EXIT_CODE_NON_BE: 123 + EXIT_CODE_FAIL: 1 + # Variables for FhG internal jobs + UPSTREAM_URL: "https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/" + INTERNAL_TESTV_DIR: "/testv" + INTERNAL_CI_REPO_CLONE_DIR: "ivas-internal-ci" + + +# This sets when pipelines are created. Jobs have more specific rules to restrict them. +workflow: + rules: + # see https://docs.gitlab.com/ee/ci/yaml/workflow.html#switch-between-branch-pipelines-and-merge-request-pipelines + - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push" + when: never + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' # Runs for merge requests + - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Pushes to main + - if: $CI_PIPELINE_SOURCE == 'schedule' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Scheduled in main + - if: $CI_PIPELINE_SOURCE == 'web' # Scheduled in main + + +stages: + - mirroring-pre-test + - build + - test + - compare + - validate + - mirroring-post-test + +# --------------------------------------------------------------- +# Generic script anchors +# --------------------------------------------------------------- + +# These can be used later on to do common tasks + +# Prints useful information for every job and should be used at the beginning of each job +.print-common-info: &print-common-info + - | + echo "Printing common information for build job." + echo "Current job is run on commit $CI_COMMIT_SHA" + echo "Commit time was $CI_COMMIT_TIMESTAMP" + date | xargs echo "System time is" + +.get-previous-merge-commit-sha: &get-previous-merge-commit-sha + - previous_merge_commit=$(git --no-pager log --merges HEAD~1 -n 1 --pretty=format:%H) + +.mr-fetch-target-branch: &mr-fetch-target-branch + # first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching + # depending on chaching, the branch may not be there, so prevent failure of this command -> should maybe be done smarter later + - git branch -D $CI_MERGE_REQUEST_TARGET_BRANCH_NAME || true + # needed when depth is lower than the number of commits in the branch + - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME + +.mr-get-target-commit: &mr-get-target-commit + # compare to last target branch commit before pipeline was created + - target_commit=$(git log $CI_MERGE_REQUEST_TARGET_BRANCH_NAME -1 --oneline --before=${CI_PIPELINE_CREATED_AT} --format=%H) + +# [INTERNAL] clone the ivas-internal-ci repo +.get-ivas-internal-ci-repo: &get-ivas-internal-ci-repo + - git clone --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@$CI_SERVER_HOST/$CUSTOM_CI_PROJECT $INTERNAL_CI_REPO_CLONE_DIR + +# [INTERNAL] use this anchor to copy over the "old" internal testv/ files +.overwrite-testv-with-internal-ones: &overwrite-testv-with-internal-ones + - cp $INTERNAL_CI_REPO_CLONE_DIR/internal-testv/* scripts/testv/ + +# [INTERNAL] use for getting the sanitizer testvectors from ivas-internal-ci +.get-internal-ltv-signals: &get-internal-ltv-signals + # overwrite config + - cp $INTERNAL_CI_REPO_CLONE_DIR/scripts/ci_sanitizers_fhg_testv.json scripts/config/ci_linux_ltv.json + # copy files + - if [ ! -d "$LTV_DIR" ]; then mkdir -p $LTV_DIR; fi + - cp $INTERNAL_CI_REPO_CLONE_DIR/internal-ltv/* $LTV_DIR/ + +# --------------------------------------------------------------- +# Job templates +# --------------------------------------------------------------- + +# When designing templates, try not to use too much inheritance and +# if multiple templates and extended on, remember that on conflict, +# latest overwrites the parameter. + +# templates for rules +.rules-basis: + rules: + - if: $MIRROR_ACCESS_TOKEN # Don't run in the mirror update pipeline (only then MIRROR_ACCESS_TOKEN is defined) + when: never + - when: on_success + - if: $CI_PIPELINE_SOURCE == 'schedule' # Don't run in any scheduled pipelines by default (use schedule templates below to enable again for certain conditions) + when: never + - when: on_success + +.rules-merge-request: + extends: .rules-basis + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + - if: $CI_PIPELINE_SOURCE == 'push' + when: never + +.rules-main-push: + extends: .rules-basis + rules: + - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + +.rules-main-scheduled: + extends: .rules-basis + rules: + - if: $CI_PIPELINE_SOURCE == 'schedule' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + + +# templates to define stages and platforms + +# differs from forge -> we use docker image here +.test-job-linux: + tags: + - exec::docker + image: $CUSTOM_CI_REGISTRY/ubuntu_22.04:latest + +# differs from forge -> we use docker image here +.build-job-linux: + stage: build + # more time internally to accomodate for the shared runners + timeout: "4 minutes" + tags: + - exec::docker + image: $CUSTOM_CI_REGISTRY/ubuntu_22.04:latest + + +# template for test jobs on linux that need the TESTV_DIR +.test-job-linux-needs-testv-dir: + extends: .test-job-linux + tags: + - exec::docker + - res::ivas-testv + before_script: + - if [ ! -d "$TESTV_DIR" ]; then mkdir -p $TESTV_DIR; fi + - cp -r scripts/testv/* $TESTV_DIR/ + +# [INTERNAL] use the internal testvectors for self_test.prm items +.test-job-linux-needs-internal-testv-dir: + extends: .test-job-linux + tags: + - exec::docker + - res::ivas-testv + before_script: + - if [ ! -d "$TESTV_DIR" ]; then mkdir -p $TESTV_DIR; fi + # first copy external testvectors, then overwrite with internal ones + # this way, newly added vectors that have no internal pendent are not missing + - cp -r scripts/testv/* $TESTV_DIR/ + - cp -r $INTERNAL_TESTV_DIR/* $TESTV_DIR/ + +# [INTERNAL] copy "old" internal testvectors to scripts/testv to use them in self_test.prm-based test +.test-job-linux-with-internal-selftest-vectors: + extends: .test-job-linux + tags: + - exec::docker + - res::ivas-testv + before_script: + - cp -r $INTERNAL_TESTV_DIR/* ./scripts/testv/ + +# template for build jobs to include the check for warnings +.build-job-with-check-for-warnings: + extends: .build-job-linux + stage: build + allow_failure: + exit_codes: + - 123 + + +# --------------------------------------------------------------- +# Build jobs +# --------------------------------------------------------------- + +build-codec-linux-make: + extends: + - .build-job-with-check-for-warnings + - .rules-basis + script: + - *print-common-info + - make -j 2>&1 | tee $BUILD_OUTPUT + # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...< + - ci/check_for_warnings.py $BUILD_OUTPUT || exit $? + +build-codec-linux-cmake: + extends: + - .build-job-with-check-for-warnings + - .rules-basis + script: + - *print-common-info + - mkdir build + - cd build + - cmake .. + - cd .. + - make -C build -j 2>&1 | tee $BUILD_OUTPUT + # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...< + - ci/check_for_warnings.py $BUILD_OUTPUT || exit $? + +build-codec-instrumented-linux: + extends: + - .build-job-linux + - .rules-basis + script: + - *print-common-info + - bash ci/build_codec_instrumented_linux.sh + +# make sure that the codec builds with msan, asan and usan +build-codec-sanitizers-linux: + extends: + - .build-job-linux + - .rules-basis + script: + - *print-common-info + - bash ci/build_codec_sanitizers_linux.sh + + +# --------------------------------------------------------------- +# Test jobs for merge requests +# --------------------------------------------------------------- + +# test that runs all modes with 1s input signals +codec-smoke-test: + extends: + - .test-job-linux-needs-internal-testv-dir + - .rules-merge-request + timeout: "5 minutes" + stage: test + needs: [ "build-codec-linux-cmake" ] + script: + - *print-common-info + - bash ci/smoke_test.sh + ### analyze for failures + - if cat smoke_test_output.txt | grep -c "failed"; then echo "Smoke test without PLC failed"; exit 1; fi + - if cat smoke_test_output_plc.txt | grep -c "failed"; then echo "Smoke test with PLC failed"; exit 1; fi + artifacts: + name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" + when: always + paths: + - out/logs/ + - smoke_test_output.txt + - smoke_test_output_plc.txt + expose_as: 'Smoke test results' + + +# code selftest testvectors with memory-sanitizer binaries +msan-on-merge-request-linux: + extends: + - .test-job-linux + - .rules-merge-request + stage: test + needs: [ "build-codec-sanitizers-linux" ] + script: + - *print-common-info + - make clean + - make -j CLANG=1 + - python3 scripts/self_test.py --create | tee test_output.txt + - run_errors=$(cat test_output.txt | grep -ic "run errors") || true + - if [ $run_errors != 0 ] ; then echo "Run errors in self_test.py with Clang memory-sanitizer"; exit 1; fi + artifacts: + name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" + paths: + - scripts/ref/logs/ + - test_output.txt + expose_as: 'Msan selftest results' + + +# code selftest testvectors with address-sanitizer binaries +asan-on-merge-request-linux: + extends: + - .test-job-linux + - .rules-merge-request + stage: test + needs: [ "build-codec-sanitizers-linux" ] + script: + - *print-common-info + - make clean + - make -j CLANG=2 + - python3 scripts/self_test.py --create | tee test_output.txt + - run_errors=$(cat test_output.txt | grep -ic "run errors") || true + - if [ $run_errors != 0 ] ; then echo "Run errors in self_test.py with Clang address-sanitizer"; exit 1; fi + artifacts: + name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" + paths: + - scripts/ref/logs/ + - test_output.txt + expose_as: 'Asan selftest results' + +# test renderer executable +renderer-smoke-test: + extends: + - .test-job-linux + - .rules-merge-request + needs: ["build-codec-linux-make"] + stage: test + script: + - make -j IVAS_rend + - python3 -m pytest -q -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer.py + artifacts: + name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results" + when: always + paths: + - report-junit.xml + expose_as: "renderer make pytest results" + reports: + junit: + - report-junit.xml + +# test renderer executable with cmake + asan +renderer-asan: + extends: + - .test-job-linux + - .rules-merge-request + needs: ["build-codec-linux-cmake"] + stage: test + script: + - python3 ci/disable_ram_counting.py + - cmake -B cmake-build -G "Unix Makefiles" -DCLANG=asan -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true + - cmake --build cmake-build -- -j + - python3 -m pytest -q -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer.py + + artifacts: + name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results" + when: always + paths: + - report-junit.xml + expose_as: "renderer asan pytest results" + reports: + junit: + - report-junit.xml + +# test renderer executable with cmake + msan +renderer-msan: + extends: + - .test-job-linux + - .rules-merge-request + needs: ["build-codec-linux-cmake"] + stage: test + script: + - python3 ci/disable_ram_counting.py + - cmake -B cmake-build -G "Unix Makefiles" -DCLANG=msan -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true + - cmake --build cmake-build -- -j + - python3 -m pytest -q -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer.py + + artifacts: + name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results" + when: always + paths: + - report-junit.xml + expose_as: "renderer msan pytest results" + reports: + junit: + - report-junit.xml + + +.merge-request-comparison-setup-codec: + &merge-request-comparison-setup-codec ### build test binaries, initial clean for paranoia reasons + - make clean + - mkdir build + - cd build + - cmake .. + - make -j + - mv IVAS_cod ../IVAS_cod_test + - mv IVAS_dec ../IVAS_dec_test + - mv IVAS_rend .. + - cd .. + - rm -rf build/* + + ### store the current commit hash + - source_branch_commit_sha=$(git rev-parse HEAD) + + ### checkout version to compare against + - *mr-fetch-target-branch + + - *mr-get-target-commit + - git checkout $target_commit + + ### build reference binaries + - cd build + - cmake .. + - make -j + - mv IVAS_cod ../IVAS_cod_ref + - mv IVAS_dec ../IVAS_dec_ref + - cd .. + + # rename test binaries back + - mv IVAS_cod_test IVAS_cod + - mv IVAS_dec_test IVAS_dec + +.merge-request-comparison-check: &merge-request-comparison-check + - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi + - if [ $exit_code -eq 1 ] && [ $non_be_flag == 0 ]; then echo "Non-bitexact cases without non-BE tag encountered!"; exit $EXIT_CODE_FAIL; fi + - if [ $exit_code -eq 1 ] && [ $non_be_flag != 0 ]; then echo "Non-bitexact cases with non-BE tag encountered"; exit $EXIT_CODE_NON_BE; fi + - exit 0 + +# compare renderer bitexactness between target and source branch +renderer-pytest-on-merge-request: + extends: + - .test-job-linux + - .rules-merge-request + needs: ["build-codec-linux-make"] + # TODO: set reasonable timeout, will most likely take less + timeout: "20 minutes" + stage: compare + script: + - *print-common-info + + # some helper variables - "|| true" to prevent failures from grep not finding anything + - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[rend\(erer\)*[ -]*non[ -]*be\]") || true + # TODO: needs splitting the test between reference and cut generation + #- ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true + + # store the current commit hash + - source_branch_commit_sha=$(git rev-parse HEAD) + + - *mr-fetch-target-branch + - *mr-get-target-commit + - git checkout $target_commit + + # build reference binaries + - make -j IVAS_rend + - mv IVAS_rend IVAS_rend_ref + + # back to source branch + - git checkout $source_branch_commit_sha + - make clean + - make -j IVAS_rend + + # run test + - exit_code=0 + - python3 -m pytest -q --log-level ERROR -n auto -rA --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/renderer/test_renderer_be_comparison.py || exit_code=$? + - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true + + - *merge-request-comparison-check + + allow_failure: + exit_codes: + - 123 + artifacts: + name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results" + when: always + paths: + - report-junit.xml + - report.html + expose_as: "pytest renderer results" + reports: + junit: + - report-junit.xml + +# compare bit exactness between target and source branch +# [INTERNAL] this uses our own testvectors internally! +ivas-pytest-on-merge-request: + extends: + - .test-job-linux + - .rules-merge-request + stage: compare + needs: ["build-codec-linux-cmake", "codec-smoke-test"] + timeout: "10 minutes" + script: + - *print-common-info + - *merge-request-comparison-setup-codec + - *get-ivas-internal-ci-repo + - *overwrite-testv-with-internal-ones + + # some helper variables - "|| true" to prevent failures from grep not finding anything + - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[non[ -]*be\]") || true + - ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true + + ### If ref_using_main is not set, checkoug the source branch to use scripts and input from there + - if [ $ref_using_main == 0 ]; then git checkout $source_branch_commit_sha; fi + + ### prepare pytest + # create short test vectors + - python3 tests/create_short_testvectors.py + # create references + - python3 -m pytest tests -v --update_ref 1 -m create_ref + - python3 -m pytest tests -v --update_ref 1 -m create_ref_part2 + + ### Run test using branch scripts and input + - if [ $ref_using_main == 1 ]; then git checkout $source_branch_commit_sha; fi + + ### run pytest + - exit_code=0 + - python3 -m pytest tests -v --junit-xml=report-junit.xml || exit_code=$? + - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true + + - *merge-request-comparison-check + + allow_failure: + exit_codes: + - 123 + artifacts: + name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" + when: always + paths: + - report-junit.xml + expose_as: "pytest ivas results" + reports: + junit: + - report-junit.xml + +# compare external renderer bitexactness between target and source branch +external-renderer-pytest-on-merge-request: + extends: + - .test-job-linux + - .rules-merge-request + needs: ["build-codec-linux-make"] + # TODO: set reasonable timeout, will most likely take less + timeout: "20 minutes" + stage: compare + script: + - *print-common-info + + # some helper variables - "|| true" to prevent failures from grep not finding anything + - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[rend\(erer\)*[ -]*non[ -]*be\]") || true + # TODO: needs splitting the test between reference and cut generation + #- ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true + + # store the current commit hash + - source_branch_commit_sha=$(git rev-parse HEAD) + + - *mr-fetch-target-branch + - *mr-get-target-commit + - git checkout $target_commit + + # build reference binaries + - make -j IVAS_rend + - mv IVAS_rend IVAS_rend_ref + + # back to source branch + - git checkout $source_branch_commit_sha + - make clean + - make -j IVAS_rend + + # run test + - exit_code=0 + - python3 -m pytest -q --log-level ERROR -n auto -rA --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/renderer/test_renderer_be_comparison.py || exit_code=$? + - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true + + - *merge-request-comparison-check + + allow_failure: + exit_codes: + - 123 + artifacts: + name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results" + when: always + paths: + - report-junit.xml + - report.html + expose_as: "pytest external renderer results" + reports: + junit: + - report-junit.xml + +evs-pytest-on-merge-request: + extends: + - .test-job-linux + - .rules-merge-request + stage: compare + needs: ["build-codec-linux-cmake", "codec-smoke-test"] + timeout: "10 minutes" + script: + - *print-common-info + - *merge-request-comparison-setup-codec + - *get-ivas-internal-ci-repo + - *overwrite-testv-with-internal-ones + + # some helper variables - "|| true" to prevent failures from grep not finding anything + - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[evs[ -]*non[ -]*be\]") || true + - ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true + + ### If ref_using_main is not set, checkoug the source branch to use scripts and input from there + - if [ $ref_using_main == 0 ]; then git checkout $source_branch_commit_sha; fi + + ### prepare pytest + # create references + - python3 -m pytest tests/test_param_file.py -v --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm + + ### Run test using branch scripts and input + - if [ $ref_using_main == 1 ]; then git checkout $source_branch_commit_sha; fi + + ### run pytest for EVS cases + - exit_code=0 + - python3 -m pytest tests/test_param_file.py -v --param_file scripts/config/self_test_evs.prm --junit-xml=report-junit-evs.xml || exit_code=$? + - zero_errors=$(cat report-junit-evs.xml | grep -c 'errors="0"') || true + + - *merge-request-comparison-check + + allow_failure: + exit_codes: + - 123 + artifacts: + name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" + when: always + paths: + - report-junit-evs.xml + expose_as: "pytest evs results" + reports: + junit: + - report-junit-evs.xml + +clang-format-check: + extends: + - .test-job-linux + - .rules-merge-request + variables: + ARTIFACT_BASE_NAME: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--formatting-fix" + stage: validate + needs: [] + timeout: "5 minutes" + script: + # Set up variables. This can't be done in the "variables" section because variables are not expanded properly there + - PATCH_FILE_NAME="$ARTIFACT_BASE_NAME".patch + - > + INSTRUCTIONS_GITLAB="To fix formatting issues:\n + - download the diff patch available as artifact of this job\n + - unzip the artifact and place the patch file in the root directory of your local IVAS repo\n + - run: git apply $PATCH_FILE_NAME\n + - commit new changes" + - > + INSTRUCTIONS_README="To fix formatting issues:\n + - place the patch file in the root directory of your local IVAS repo\n + - run: git apply $PATCH_FILE_NAME\n + - commit new changes" + + - scripts/check-format.sh -af -p 8 || format_problems=$? + - if [ $format_problems == 0 ] ; then exit 0; fi + + - mkdir tmp-formatting-fix + - git diff > "tmp-formatting-fix/$PATCH_FILE_NAME" + + # Print instructions to job output + - echo -e "$INSTRUCTIONS_GITLAB" + + # Include readme in the artifact, in case someone misses the job printout (e.g. getting the artifact via MR interface) + - echo -e "$INSTRUCTIONS_README" > "tmp-formatting-fix/readme.txt" + + - exit $format_problems + artifacts: + paths: + - tmp-formatting-fix/ + when: on_failure + name: "$ARTIFACT_BASE_NAME" + expose_as: 'formatting patch' + + +# --------------------------------------------------------------- +# Test jobs for main branch +# --------------------------------------------------------------- + +# check bitexactness to EVS +# difference to forge: on the forge, this job runs only on pushes to main +# those are mirrored to our repo anyway, so no push-to-main triggers exist in +# our internal repo. Testing BE to EVS is probably only useful before moving a +# feature branch from internal to external repo. Therefore, this job internally +# runs on MR pipelines +be-2-evs-linux: + extends: + - .test-job-linux + # manual rules here to have .rules-main-push + run on MR + rules: + - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + # this is different from the forge repo -> allow manual run of the EVS-BE test + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + when: manual + allow_failure: true + tags: + - be-2-evs-temp + stage: test + needs: [ "build-codec-linux-cmake" ] + timeout: "20 minutes" + script: + - *print-common-info + + - mkdir build + - cd build + - cmake .. + - make -j + - cd .. + + # copy over to never change the testvector dir + - cp -r $EVS_BE_TEST_DIR ./evs_be_test + - cp build/IVAS_cod ./evs_be_test/bin/EVS_cod + - cp build/IVAS_dec ./evs_be_test/bin/EVS_dec + + - cd evs_be_test + - python3 ../ci/run_evs_be_test.py + +codec-comparison-on-main-push: + extends: + - .test-job-linux + - .rules-main-push + stage: compare + needs: [ "build-codec-linux-cmake" ] + timeout: "30 minutes" # To be revisited + script: + - *print-common-info + - latest_commit=$(git rev-parse HEAD) # Latest commit + - *get-previous-merge-commit-sha # Stored in previous_merge_commit shell variable now + - echo "Comparing changes from $previous_merge_commit to $latest_commit" + - git --no-pager diff --stat $previous_merge_commit..$latest_commit + + # Rest is more or less placeholder adapted from MR self test. This should be replaced with more complex tests. + + ### build test binaries, initial clean for paranoia reasons + - make clean + - mkdir build + - cd build + - cmake .. + - make -j + - mv IVAS_cod ../IVAS_cod_test + - mv IVAS_dec ../IVAS_dec_test + - cd .. + - rm -rf build/* + + ### compare to the previous merge commit in the main branch + - git fetch origin main + - git checkout $previous_merge_commit + + ### build reference binaries + - cd build + - cmake .. + - make -j + - mv IVAS_cod ../IVAS_cod_ref + - mv IVAS_dec ../IVAS_dec_ref + - cd .. + + ### re-checkout the latest commit in the main branch + - git checkout $latest_commit + + # helper variable - "|| true" to prevent failures from grep not finding anything + - non_be_flag=$(echo $CI_COMMIT_MESSAGE | grep -c --ignore-case "\[non[ -]*be\]") || true + + ### prepare pytest + # create short test vectors + - python3 tests/create_short_testvectors.py + # rename test binaries back + - mv IVAS_cod_test IVAS_cod + - mv IVAS_dec_test IVAS_dec + # create references + - python3 -m pytest tests -v --update_ref 1 -m create_ref + - python3 -m pytest tests -v --update_ref 1 -m create_ref_part2 + + ### run pytest + - exit_code=0 + - python3 -m pytest tests -v --junit-xml=report-junit.xml || exit_code=$? + - if [ $exit_code -eq 1 ] && [ $non_be_flag == 0 ]; then echo "pytest run had failures and non-BE flag not present"; exit $EXIT_CODE_FAIL; fi + - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true + - if [ $exit_code -eq 1 ] && [ $zero_errors == 1 ]; then echo "pytest run had failures, but no errors and non-BE flag present"; exit $EXIT_CODE_NON_BE; fi + - if [ $exit_code -ne 0 ]; then echo "pytest run had errors"; exit $EXIT_CODE_FAIL; fi; + allow_failure: + exit_codes: + - 123 + artifacts: + name: "main-push--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" + when: always + paths: + - report-junit.xml + expose_as: 'Results of comparison to previous merge commit' + reports: + junit: report-junit.xml + + +# --------------------------------------------------------------- +# Scheduled jobs on main +# --------------------------------------------------------------- +.sanitizer-test-template: + extends: + - .test-job-linux + tags: + - sanitizer_test_main + stage: test + artifacts: + name: "$CI_JOB_NAME--main--sha-$CI_COMMIT_SHORT_SHA" + when: always + paths: + - ep_015.g192 + - ./LOGS_PLC + - ./LOGS_noPLC + +sanitizer-test-mono: + extends: .sanitizer-test-template + rules: + - if: $SANITIZER_TEST_MONO + timeout: "2 hours" + script: + - *get-ivas-internal-ci-repo + - *get-internal-ltv-signals + - ls -altr $LTV_DIR + - ls -altr + - cat scripts/config/ci_linux_ltv.json + - python3 ci/run_scheduled_sanitizer_test.py mono mono --tests $SANITIZER_TESTS + +sanitizer-test-stereo: + extends: .sanitizer-test-template + rules: + - if: $SANITIZER_TEST_STEREO + timeout: "2 hours" + script: + - *get-ivas-internal-ci-repo + - *get-internal-ltv-signals + - ls -altr $LTV_DIR + - ls -altr + - cat scripts/config/ci_linux_ltv.json + - python3 ci/run_scheduled_sanitizer_test.py stereo $OUT_FORMATS_CHANNEL_BASED --tests $SANITIZER_TESTS + +sanitizer-test-stereodmxevs: + extends: .sanitizer-test-template + rules: + - if: $SANITIZER_TEST_STEREODMXEVS + timeout: "2 hours" + script: + - *get-ivas-internal-ci-repo + - *get-internal-ltv-signals + - ls -altr $LTV_DIR + - ls -altr + - cat scripts/config/ci_linux_ltv.json + - python3 ci/run_scheduled_sanitizer_test.py StereoDmxEVS mono --tests $SANITIZER_TESTS + +sanitizer-test-ism1: + extends: .sanitizer-test-template + rules: + - if: $SANITIZER_TEST_ISM1 + timeout: "2 hours" + script: + - *get-ivas-internal-ci-repo + - *get-internal-ltv-signals + - ls -altr $LTV_DIR + - ls -altr + - cat scripts/config/ci_linux_ltv.json + - python3 ci/run_scheduled_sanitizer_test.py ISM1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS + +sanitizer-test-ism2: + extends: .sanitizer-test-template + rules: + - if: $SANITIZER_TEST_ISM2 + timeout: "2 hours" + script: + - *get-ivas-internal-ci-repo + - *get-internal-ltv-signals + - ls -altr $LTV_DIR + - ls -altr + - cat scripts/config/ci_linux_ltv.json + - python3 ci/run_scheduled_sanitizer_test.py ISM2 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS + +sanitizer-test-ism3: + extends: .sanitizer-test-template + rules: + - if: $SANITIZER_TEST_ISM3 + timeout: "3 hours" + script: + - *get-ivas-internal-ci-repo + - *get-internal-ltv-signals + - ls -altr $LTV_DIR + - ls -altr + - cat scripts/config/ci_linux_ltv.json + - python3 ci/run_scheduled_sanitizer_test.py ISM3 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS + +sanitizer-test-ism4: + extends: .sanitizer-test-template + rules: + - if: $SANITIZER_TEST_ISM4 + timeout: "4 hours" + script: + - *get-ivas-internal-ci-repo + - *get-internal-ltv-signals + - ls -altr $LTV_DIR + - ls -altr + - cat scripts/config/ci_linux_ltv.json + - python3 ci/run_scheduled_sanitizer_test.py ISM4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS + +sanitizer-test-masa: + extends: .sanitizer-test-template + rules: + - if: $SANITIZER_TEST_MASA + timeout: "2 hours" + script: + - *get-ivas-internal-ci-repo + - *get-internal-ltv-signals + - ls -altr $LTV_DIR + - ls -altr + - cat scripts/config/ci_linux_ltv.json + - python3 ci/run_scheduled_sanitizer_test.py MASA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS + +sanitizer-test-mc-5_1: + extends: .sanitizer-test-template + rules: + - if: $SANITIZER_TEST_MC51 + timeout: "3 hours" + script: + - *get-ivas-internal-ci-repo + - *get-internal-ltv-signals + - ls -altr $LTV_DIR + - ls -altr + - cat scripts/config/ci_linux_ltv.json + - python3 ci/run_scheduled_sanitizer_test.py 5_1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS + +sanitizer-test-mc-5_1_2: + extends: .sanitizer-test-template + rules: + - if: $SANITIZER_TEST_MC512 + timeout: "3 hours" + script: + - *get-ivas-internal-ci-repo + - *get-internal-ltv-signals + - ls -altr $LTV_DIR + - ls -altr + - cat scripts/config/ci_linux_ltv.json + - python3 ci/run_scheduled_sanitizer_test.py 5_1_2 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS + +sanitizer-test-mc-5_1_4: + extends: .sanitizer-test-template + rules: + - if: $SANITIZER_TEST_MC514 + timeout: "3 hours" + script: + - *get-ivas-internal-ci-repo + - *get-internal-ltv-signals + - ls -altr $LTV_DIR + - ls -altr + - cat scripts/config/ci_linux_ltv.json + - python3 ci/run_scheduled_sanitizer_test.py 5_1_4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS + +sanitizer-test-mc-7_1: + extends: .sanitizer-test-template + rules: + - if: $SANITIZER_TEST_MC71 + timeout: "3 hours" + script: + - *get-ivas-internal-ci-repo + - *get-internal-ltv-signals + - ls -altr $LTV_DIR + - ls -altr + - cat scripts/config/ci_linux_ltv.json + - python3 ci/run_scheduled_sanitizer_test.py 7_1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS + +sanitizer-test-mc-7_1_4: + extends: .sanitizer-test-template + rules: + - if: $SANITIZER_TEST_MC714 + timeout: "3 hours" + script: + - *get-ivas-internal-ci-repo + - *get-internal-ltv-signals + - ls -altr $LTV_DIR + - ls -altr + - cat scripts/config/ci_linux_ltv.json + - python3 ci/run_scheduled_sanitizer_test.py 7_1_4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS + +sanitizer-test-sba: + extends: .sanitizer-test-template + rules: + - if: $SANITIZER_TEST_SBA + timeout: "4 hours" + script: + - *get-ivas-internal-ci-repo + - *get-internal-ltv-signals + - ls -altr $LTV_DIR + - ls -altr + - cat scripts/config/ci_linux_ltv.json + - python3 ci/run_scheduled_sanitizer_test.py SBA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS + +sanitizer-test-planarsba: + extends: .sanitizer-test-template + rules: + - if: $SANITIZER_TEST_PLANARSBA + timeout: "3 hours" + script: + - *get-ivas-internal-ci-repo + - *get-internal-ltv-signals + - ls -altr $LTV_DIR + - ls -altr + - cat scripts/config/ci_linux_ltv.json + - python3 ci/run_scheduled_sanitizer_test.py PlanarSBA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS + + +# GCOV/LCOV coverage analysis of self_test suite +coverage-test-on-main-scheduled: + extends: + - .test-job-linux-needs-internal-testv-dir + - .rules-main-scheduled + tags: + - coverage-test + stage: test + rules: + # only run in scheduled pipeline that passes this env vars + - if: $COVERAGE_TEST + script: + - *print-common-info + - make GCOV=1 -j + - python3 tests/create_short_testvectors.py + - python3 -m pytest tests -v -n 0 --update_ref 1 -m create_ref --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec + - python3 -m pytest tests -v -n 0 --update_ref 1 -m create_ref_part2 --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec + - python3 -m pytest tests/test_param_file.py -v -n 0 --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec + - lcov -c -d obj -o coverage.info + - genhtml coverage.info -o coverage + artifacts: + name: "main-coverage-sha-$CI_COMMIT_SHORT_SHA" + when: always + paths: + - coverage.info + - coverage + +# --------------------------------------------------------------- +# FhG internal - mirroring +# --------------------------------------------------------------- + +# Pull state of a branch on 3GPP repo, push to a mirror repo +.mirror-update: + extends: .test-job-linux + tags: + - host::r10499 + script: + # Set up git LFS for mirroring (see: https://github.com/git-lfs/git-lfs/issues/1762) + - git lfs install --skip-smudge --local + + # Select target branch: + # * if mirroring without testing, push to $CI_COMMIT_BRANCH at mirroring-pre-test stage + # * if mirroring with testing, push to: + # * $CI_COMMIT_BRANCH-mirror-untested at mirroring-pre-test stage + # * $CI_COMMIT_BRANCH at mirroring-post-test stage + - MIRROR_TARGET_BRANCH=$CI_COMMIT_BRANCH + - if [[ $MIRROR_TESTING == 'true' && $CI_JOB_STAGE == 'mirroring-pre-test' ]]; then MIRROR_TARGET_BRANCH="${CI_COMMIT_BRANCH}-mirror-untested"; fi + + # Check out or create mirror target branch - by default the runner checks out by commit hash, which results in detached head state + - git checkout -B $MIRROR_TARGET_BRANCH + + # Pull commits from upstream + - git pull --ff-only $UPSTREAM_URL $MIRROR_SOURCE_BRANCH + - git lfs fetch --all $UPSTREAM_URL $MIRROR_SOURCE_BRANCH + + # Push to mirror. Option `-o ci.skip` tells GitLab to skip CI for the pushed commits (testing already done in current pipeline if enabled) + - git push -o ci.skip "https://${GITLAB_USER_LOGIN}:${MIRROR_ACCESS_TOKEN}@${CI_REPOSITORY_URL#*@}" "HEAD:${MIRROR_TARGET_BRANCH}" + +mirror-update-untested: + rules: + - if: $MIRROR_ACCESS_TOKEN + extends: + - .mirror-update + stage: mirroring-pre-test + +mirror-update-tested: + rules: + - if: $MIRROR_ACCESS_TOKEN && $MIRROR_TESTING == 'true' + extends: + - .mirror-update + stage: mirroring-post-test + + +# --------------------------------------------------------------- +# FhG internal - tests +# --------------------------------------------------------------- + +build-codec-debug-windows-vs2017: + extends: + - .rules-basis + tags: + - os::windows + stage: build + script: + - $ENV:PATH + - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug | tee $BUILD_OUTPUT + - python ci/check_for_warnings.py $BUILD_OUTPUT + +build-codec-release-windows-vs2017: + extends: + - .rules-basis + tags: + - os::windows + stage: build + script: + - $ENV:PATH + - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Release | tee $BUILD_OUTPUT + - python ci/check_for_warnings.py $BUILD_OUTPUT -- GitLab From 426deb6a6d2599cd385df3e88559dcb9170b632c Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Thu, 15 Jun 2023 14:11:08 +0200 Subject: [PATCH 007/175] Allow less importnat CI jobs to fail (for now) --- .gitlab-ci-custom.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci-custom.yml b/.gitlab-ci-custom.yml index bef4bdb69e..84aa4f65ba 100644 --- a/.gitlab-ci-custom.yml +++ b/.gitlab-ci-custom.yml @@ -217,6 +217,7 @@ build-codec-instrumented-linux: script: - *print-common-info - bash ci/build_codec_instrumented_linux.sh + allow_failure: true # TODO(sgi): Remove # make sure that the codec builds with msan, asan and usan build-codec-sanitizers-linux: @@ -254,6 +255,7 @@ codec-smoke-test: - smoke_test_output.txt - smoke_test_output_plc.txt expose_as: 'Smoke test results' + allow_failure: true # TODO(sgi): Remove # code selftest testvectors with memory-sanitizer binaries @@ -656,6 +658,7 @@ clang-format-check: when: on_failure name: "$ARTIFACT_BASE_NAME" expose_as: 'formatting patch' + allow_failure: true # TODO(sgi): Remove # --------------------------------------------------------------- -- GitLab From f104d3bbe0976522dd25f4d1232248ec8f3a1f2d Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 15 Jun 2023 14:30:43 +0200 Subject: [PATCH 008/175] fix asan, put out at least zeroes for ParamUpmix in the JBM path --- lib_com/options.h | 1 + lib_dec/ivas_jbm_dec.c | 8 +++++++- lib_dec/ivas_sba_rendering_internal.c | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 9caeda123a..6e3e1010c2 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -157,6 +157,7 @@ #define FIX_XXX_JITTER_SBA_BINAURAL_GAIN #define FIX_XXX_HEADTRACKER_INIT #define FIX_XXX_TDOBJRENDERER_INPUT +#define FIX_XXX_ISM_SBA_ASAN #define API_5MS /* ################## End DEVELOPMENT switches ######################### */ diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 8e6b0541db..310e787511 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -846,7 +846,13 @@ ivas_error ivas_jbm_dec_render( #ifdef API_5MS else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) { - return IVAS_ERR_NOT_IMPLEMENTED; + /* zero output for now, not yet implemented... */ + int16_t ch; + *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); + for ( ch = 0; ch < nchan_out; ch++ ) + { + set_zero( p_output[ch], *nSamplesRendered ); + } } #endif else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) diff --git a/lib_dec/ivas_sba_rendering_internal.c b/lib_dec/ivas_sba_rendering_internal.c index 6f3dd13b7a..8e92a1f622 100644 --- a/lib_dec/ivas_sba_rendering_internal.c +++ b/lib_dec/ivas_sba_rendering_internal.c @@ -365,15 +365,22 @@ void ivas_ism2sba_sf( for ( j = 0; j < sba_num_chans; j++ ) { g2 = hIsmRendererData->interpolator + offset; +#ifndef FIX_XXX_ISM_SBA_ASAN g1 = 1 - *g2; +#endif tc = buffer_in[i] + offset; out = buffer_out[j]; gain = hIsmRendererData->gains[i][j]; prev_gain = hIsmRendererData->prev_gains[i][j]; for ( k = 0; k < n_samples_to_render; k++ ) { +#ifdef FIX_XXX_ISM_SBA_ASAN + g1 = 1.0f - *g2; +#endif *( out++ ) += ( ( *( g2++ ) ) * gain + g1 * prev_gain ) * ( *( tc++ ) ); +#ifndef FIX_XXX_ISM_SBA_ASAN g1 = 1.0f - *g2; +#endif } } } -- GitLab From d4c03c2e3af4ef2360acd80400b16df8b161476c Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 15 Jun 2023 15:08:55 +0200 Subject: [PATCH 009/175] make sure 7.1.4 br does not crash any longer, still ParamUpmix needs to be fully implemented in the JBM path --- apps/decoder.c | 7 ++++++- lib_dec/ivas_jbm_dec.c | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/apps/decoder.c b/apps/decoder.c index d8229ce705..a8093c7a71 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -86,6 +86,7 @@ static #define JBM_FRONTEND_FETCH_FRAMESIZE_MS 20 #ifdef API_5MS #define HEADROTATION_FETCH_FRAMESIZE_MS 5 +#define DEFAULT_FETCH_FRAMESIZE_MS 20 #endif typedef struct @@ -1734,7 +1735,7 @@ static ivas_error decodeG192( } else { - nOutSamples = (int16_t) ( arg.output_Fs / 1000 * VARIABLE_SPEED_FETCH_FRAMESIZE_MS ); + nOutSamples = (int16_t) ( arg.output_Fs / 1000 * DEFAULT_FETCH_FRAMESIZE_MS ); vec_pos_len = 1; } /*------------------------------------------------------------------------------------------* @@ -2201,7 +2202,11 @@ cleanup: AudioFileWriter_close( &afWriter ); MasaFileWriter_close( &masaWriter ); +#ifdef DEBUGGING +#ifdef VARIABLE_SPEED_DECODING TsmScaleFileReader_close( &tsmScaleFileReader ); +#endif +#endif for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; i++ ) { IsmFileWriter_close( &ismWriters[i] ); diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 310e787511..c7d9996aab 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -477,6 +477,21 @@ ivas_error ivas_jbm_dec_tc( ivas_mono_stereo_downmix_mcmasa( st_ivas, output, output_frame ); } } +#ifdef API_5MS + else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) + { + + /* at least decode everything here, the rest is ToDo, for this we just output zeroes atm */ + ivas_lfe_dec( st_ivas->hLFE, st, output_frame, st_ivas->bfi, output_lfe_ch ); + + ivas_mc_paramupmix_dec_read_BS( st_ivas, st, st_ivas->hMCParamUpmix, &nb_bits_metadata[0] ); + + if ( ( error = ivas_mct_dec( st_ivas, output, output_frame, nb_bits_metadata[0] ) ) != IVAS_ERR_OK ) + { + return error; + } + } +#endif } -- GitLab From de03fd1e6595cc31021a4988dc827a9210142ffe Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 15 Jun 2023 15:41:27 +0200 Subject: [PATCH 010/175] fix external orientation update rate --- apps/decoder.c | 34 +++++++++++++++++----------------- lib_rend/ivas_rotation.c | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index a8093c7a71..34527b8c82 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1783,45 +1783,45 @@ static ivas_error decodeG192( } } - if ( arg.enableExternalOrientation ) + /* Head-tracking input simulation */ + if ( arg.enableHeadRotation ) { IVAS_QUATERNION Quaternion; - int8_t enableHeadRotation; - int8_t enableExternalOrientation; - int8_t enableRotationInterpolation; - int16_t numFramesToTargetOrientation; - - if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &Quaternion, &enableHeadRotation, &enableExternalOrientation, &enableRotationInterpolation, &numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) + if ( ( error = HeadRotationFileReading( headRotReader, &Quaternion, &Pos ) ) != IVAS_ERR_OK ) { - fprintf( stderr, "\nError %s while reading external orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), - RotationFileReader_getFilePath( externalOrientationFileReader ) ); + fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( headRotReader ) ); goto cleanup; } - if ( ( error = IVAS_DEC_FeedExternalOrientationData( hIvasDec, Quaternion, enableHeadRotation, enableExternalOrientation, enableRotationInterpolation, numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternion, Pos ) ) != IVAS_ERR_OK ) { - fprintf( stderr, "\nIVAS_DEC_FeedExternalOrientationData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } } - /* Head-tracking input simulation */ - if ( arg.enableHeadRotation ) + if ( arg.enableExternalOrientation ) { IVAS_QUATERNION Quaternion; + int8_t enableHeadRotation; + int8_t enableExternalOrientation; + int8_t enableRotationInterpolation; + int16_t numFramesToTargetOrientation; - if ( ( error = HeadRotationFileReading( headRotReader, &Quaternion, &Pos ) ) != IVAS_ERR_OK ) + + if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &Quaternion, &enableHeadRotation, &enableExternalOrientation, &enableRotationInterpolation, &numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) { - fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( headRotReader ) ); + fprintf( stderr, "\nError %s while reading external orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), + RotationFileReader_getFilePath( externalOrientationFileReader ) ); goto cleanup; } - if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternion, Pos ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_FeedExternalOrientationData( hIvasDec, Quaternion, enableHeadRotation, enableExternalOrientation, enableRotationInterpolation, numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) { - fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + fprintf( stderr, "\nIVAS_DEC_FeedExternalOrientationData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } } diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 0997626bbb..efd281ce84 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -1434,7 +1434,7 @@ void external_target_interpolation( /* Calculate the interpolation increment and coefficient */ #ifdef API_5MS - hCombinedOrientationData->interpolationIncrement = 1.0f / ( (float) hExtOrientationData->numFramesToTargetOrientation * (float) MAX_PARAM_SPATIAL_SUBFRAMES ); + hCombinedOrientationData->interpolationIncrement = 1.0f / ( (float) hExtOrientationData->numFramesToTargetOrientation ); #else hCombinedOrientationData->interpolationIncrement = 1.0f / ( (float) hExtOrientationData->numFramesToTargetOrientation[i] * (float) MAX_PARAM_SPATIAL_SUBFRAMES ); #endif -- GitLab From b61cb8986ce97d473c30c3ce8eb1bca94ffcf33a Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 15 Jun 2023 16:12:09 +0200 Subject: [PATCH 011/175] disable unused code --- lib_com/ivas_prot.h | 2 ++ lib_dec/ivas_dec.c | 2 ++ lib_dec/jbm_jb4sb.h | 4 ++-- lib_dec/jbm_pcmdsp_fifo.c | 2 ++ lib_dec/jbm_pcmdsp_fifo.h | 4 ++-- lib_dec/lib_dec.c | 7 +++++-- 6 files changed, 15 insertions(+), 6 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 7d3042d861..0a56c5081e 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -308,10 +308,12 @@ void stereo_dmx_evs_close_encoder( STEREO_DMX_EVS_ENC_HANDLE *hStereoDmxEVS /* i/o: Stereo downmix for EVS encoder handle */ ); +#ifndef API_5MS ivas_error ivas_dec( Decoder_Struct *st_ivas, /* i : IVAS decoder structure */ int16_t *data /* o : output synthesis signal */ ); +#endif ivas_error ivas_dec_setup( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index fd0bf5b530..3287ebbb47 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -32,6 +32,7 @@ #include #include "options.h" +#ifndef API_5MS #include "cnst.h" #include "ivas_cnst.h" #include "rom_com.h" @@ -755,3 +756,4 @@ ivas_error ivas_dec( pop_wmops(); return error; } +#endif \ No newline at end of file diff --git a/lib_dec/jbm_jb4sb.h b/lib_dec/jbm_jb4sb.h index 00f5ccbb40..599730975d 100644 --- a/lib_dec/jbm_jb4sb.h +++ b/lib_dec/jbm_jb4sb.h @@ -77,13 +77,13 @@ struct JB4_DATAUNIT int16_t partialCopyOffset; int16_t nextCoderType; }; - +#ifndef API_5MS typedef enum { JBM_RENDERER_NONE, JBM_RENDERER_IVAS, } JBM_RENDERER_TYPE; - +#endif typedef struct JB4_DATAUNIT *JB4_DATAUNIT_HANDLE; diff --git a/lib_dec/jbm_pcmdsp_fifo.c b/lib_dec/jbm_pcmdsp_fifo.c index a3e8936464..d3c93679fe 100644 --- a/lib_dec/jbm_pcmdsp_fifo.c +++ b/lib_dec/jbm_pcmdsp_fifo.c @@ -38,6 +38,7 @@ #include #include "options.h" +#ifndef API_5MS #include "prot.h" #include "ivas_prot.h" #ifdef DEBUGGING @@ -267,3 +268,4 @@ uint16_t pcmdsp_fifo_nReadableSamplesPerChannel( { return h->size; } +#endif \ No newline at end of file diff --git a/lib_dec/jbm_pcmdsp_fifo.h b/lib_dec/jbm_pcmdsp_fifo.h index b601cc2e0e..62ebc15d08 100644 --- a/lib_dec/jbm_pcmdsp_fifo.h +++ b/lib_dec/jbm_pcmdsp_fifo.h @@ -41,7 +41,7 @@ #include #include "options.h" - +#ifndef API_5MS /** Ringbuffer (FIFO) with fixed capacity for audio samples. */ struct PCMDSP_FIFO @@ -81,5 +81,5 @@ int16_t pcmdsp_fifo_write_zero( PCMDSP_FIFO_HANDLE h, uint16_t nSamplesPerChanne int16_t pcmdsp_fifo_read( PCMDSP_FIFO_HANDLE h, uint16_t nSamplesPerChannel, uint8_t *samples ); uint16_t pcmdsp_fifo_nReadableSamplesPerChannel( const PCMDSP_FIFO_HANDLE h ); - +#endif #endif /* JBM_PCMDSP_FIFO_H */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 86d46fe2b0..0def4c244d 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -123,7 +123,9 @@ static ivas_error evs_dec_main( Decoder_Struct *st_ivas, const int16_t nOutSampl static ivas_error input_format_API_to_internal( IVAS_DEC_INPUT_FORMAT input_format, int16_t *bitstream_format_internal, int16_t *sdp_hf_only, const bool is_voip_enabled ); static void init_decoder_config( DECODER_CONFIG_HANDLE hDecoderConfig ); static int16_t IVAS_DEC_VoIP_GetRenderGranularity( Decoder_Struct *st_ivas ); +#ifndef API_5MS static JBM_RENDERER_TYPE IVAS_DEC_VoIP_GetRendererConfig( IVAS_DEC_HANDLE hIvasDec ); +#endif static ivas_error IVAS_DEC_reconfigure( IVAS_DEC_HANDLE hIvasDec, const uint16_t nTransportChannels, const uint16_t l_ts ); static ivas_error IVAS_DEC_Setup( IVAS_DEC_HANDLE hIvasDec, uint16_t *nTcBufferGranularity, uint8_t *nTransportChannels, uint8_t *nOutChannels, uint16_t *nSamplesRendered, int16_t *data ); static ivas_error IVAS_DEC_GetTcSamples( IVAS_DEC_HANDLE hIvasDec, float *pcmBuf, int16_t *nOutSamples ); @@ -1985,7 +1987,7 @@ ivas_error IVAS_DEC_VoIP_FeedFrame( return IVAS_ERR_OK; } -#ifdef VARIABLE_SPEED_DECODING +#if defined( VARIABLE_SPEED_DECODING ) || defined( API_5MS ) /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_SetScale( ) * @@ -3480,6 +3482,7 @@ static int16_t IVAS_DEC_VoIP_GetRenderGranularity( } +#ifndef API_5MS /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_GetRendererConfig() * @@ -3503,7 +3506,7 @@ static JBM_RENDERER_TYPE IVAS_DEC_VoIP_GetRendererConfig( return rendererType; } - +#endif /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_reconfigure() -- GitLab From 7fb10d40a051ab031a939821cb5bfdbd1dfddb40 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Thu, 15 Jun 2023 17:49:42 +0200 Subject: [PATCH 012/175] Remove RENDERER_HEAD_POSITIONS_PER_FRAME - code compiles, but untested --- apps/renderer.c | 170 +++++++++++++++++++++++++++++------ lib_com/common_api_types.h | 2 + lib_com/options.h | 1 + lib_rend/ivas_prot_rend.h | 4 + lib_rend/ivas_rotation.c | 69 +++++++++++++++ lib_rend/ivas_stat_rend.h | 7 ++ lib_rend/lib_rend.c | 175 ++++++++++++++++++++++++++++++++++++- lib_rend/lib_rend.h | 21 ++++- 8 files changed, 418 insertions(+), 31 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index 760065be91..9be54daca5 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -157,6 +157,9 @@ typedef struct float lfeConfigElevation; bool lfeCustomRoutingEnabled; char inLfePanningMatrixFile[RENDERER_MAX_CLI_ARG_LENGTH]; +#ifdef LIB_REND_API_5MS + bool framing_5ms; +#endif } CmdlnArgs; typedef enum @@ -181,6 +184,9 @@ typedef enum CmdLnOptionId_inputGain, CmdLnOptionId_referenceVectorFile, CmdLnOptionId_exteriorOrientationFile, +#ifdef LIB_REND_API_5MS + CmdLnOptionId_framing5ms, +#endif } CmdLnOptionId; static const CmdLnParser_Option cliOptions[] = { @@ -302,6 +308,14 @@ static const CmdLnParser_Option cliOptions[] = { .matchShort = "exof", .description = "External orientation trajectory file for simulation of external orientations", }, +#ifdef LIB_REND_API_5MS + { + .id = CmdLnOptionId_framing5ms, + .match = "framing_5ms", + .matchShort = "fr5", + .description = "Process audio with 5 ms framing. Time resolution of metadata (e.g. ISM positions) remains unchanged w.r.t. 20 ms framing", + }, +#endif }; @@ -560,7 +574,9 @@ int main( int32_t delayTimeScale = 0; int16_t i, numChannels; ivas_error error = IVAS_ERR_OK; +#ifndef LIB_REND_API_5MS IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; +#endif #ifdef WMOPS reset_wmops(); @@ -733,7 +749,13 @@ int main( fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } - const int16_t frameSize_smpls = (int16_t) ( 20 * args.sampleRate / 1000 ); + const int16_t frameSize_smpls = (int16_t) ( +#ifdef LIB_REND_API_5MS + ( args.framing_5ms ? 5 : 20 ) +#else + 20 +#endif + * args.sampleRate / 1000 ); IVAS_REND_InputId mcIds[RENDERER_MAX_MC_INPUTS] = { 0 }; IVAS_REND_InputId ismIds[RENDERER_MAX_ISM_INPUTS] = { 0 }; @@ -1019,10 +1041,17 @@ int main( fprintf( stdout, "\n\n-- Start the renderer (quiet mode) --\n\n" ); } +#ifdef LIB_REND_API_5MS + ObjectPositionBuffer mtdBuffer; +#endif + while ( 1 ) { int16_t num_in_channels; num_in_channels = inBuffer.config.numChannels; +#ifdef LIB_REND_API_5MS + const bool isCurrentFrameMultipleOf20ms = !args.framing_5ms || frame % 4 == 0; +#endif /* Read the input data */ if ( ( error = AudioFileReader_read( audioReader, inpInt16Buffer, (int16_t) inBufferSize, &numSamplesRead ) ) != IVAS_ERR_OK ) @@ -1040,50 +1069,85 @@ int main( /* Convert from int to float and from interleaved to packed */ convertInputBuffer( inpInt16Buffer, numSamplesRead, frameSize_smpls, num_in_channels, inFloatBuffer ); - +#ifdef LIB_REND_API_5MS + if ( isCurrentFrameMultipleOf20ms ) + { +#else ObjectPositionBuffer mtdBuffer; - IsmPositionProvider_getNextFrame( positionProvider, &mtdBuffer ); +#endif + IsmPositionProvider_getNextFrame( positionProvider, &mtdBuffer ); - if ( referenceVectorReader != NULL ) - { - IVAS_VECTOR3 listenerPos, refPos; - if ( ( error = Vector3PairFileReader_read( referenceVectorReader, &listenerPos, &refPos ) ) != IVAS_ERR_OK ) + if ( referenceVectorReader != NULL ) { - fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); - exit( -1 ); + IVAS_VECTOR3 listenerPos, refPos; + if ( ( error = Vector3PairFileReader_read( referenceVectorReader, &listenerPos, &refPos ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + if ( ( error = IVAS_REND_SetReferenceVector( hIvasRend, listenerPos, refPos ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } } - if ( ( error = IVAS_REND_SetReferenceVector( hIvasRend, listenerPos, refPos ) ) != IVAS_ERR_OK ) + /* Read from reference rotation trajectory file if specified */ + if ( referenceRotReader != NULL ) { - fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); - exit( -1 ); + IVAS_QUATERNION quaternion; + if ( ( error = HeadRotationFileReading( referenceRotReader, &quaternion, NULL ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + + if ( ( error = IVAS_REND_SetReferenceRotation( hIvasRend, quaternion ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error setting Reference Rotation: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } } +#ifdef LIB_REND_API_5MS } - /* Read from reference rotation trajectory file if specified */ - if ( referenceRotReader != NULL ) +#endif + + /* Read from head rotation trajectory file if specified */ + if ( headRotReader != NULL ) { - IVAS_QUATERNION quaternion; - if ( ( error = HeadRotationFileReading( referenceRotReader, &quaternion, NULL ) ) != IVAS_ERR_OK ) +#ifdef LIB_REND_API_5MS + IVAS_QUATERNION headRot; + IVAS_VECTOR3 Pos; + + if ( ( error = HeadRotationFileReading( headRotReader, &headRot, &Pos ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } - - if ( ( error = IVAS_REND_SetReferenceRotation( hIvasRend, quaternion ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_REND_SetHeadRotation( hIvasRend, headRot, Pos ) ) != IVAS_ERR_OK ) { - fprintf( stderr, "Error setting Reference Rotation: %s\n", ivas_error_to_string( error ) ); + fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } - } - /* Read from head rotation trajectory file if specified */ - if ( headRotReader != NULL ) - { - IVAS_QUATERNION quatBuffer[RENDERER_HEAD_POSITIONS_PER_FRAME]; - - for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) + if ( !args.framing_5ms ) { - if ( ( error = HeadRotationFileReading( headRotReader, &quatBuffer[i], &Pos[i] ) ) != IVAS_ERR_OK ) + /* Skip over 3 following head positions - they are given on 5ms grid */ + for ( int16_t i = 0; i < 3; ++i ) + { + if ( ( error = HeadRotationFileReading( headRotReader, &headRot, &Pos ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + } + } +#else + IVAS_QUATERNION quatBuffer[RENDERER_HEAD_POSITIONS_PER_FRAME]; + + for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) { + if ( ( error = HeadRotationFileReading( headRotReader, &quatBuffer[i], &Pos[i] ) ) != IVAS_ERR_OK ) + { fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } @@ -1093,20 +1157,61 @@ int main( fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } +#endif } else { +#ifdef LIB_REND_API_5MS + if ( ( error = IVAS_REND_DisableHeadRotation( hIvasRend ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error disabling head rotation: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } +#else error = IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ); if ( error != IVAS_ERR_OK && error != IVAS_ERR_INVALID_OUTPUT_FORMAT ) { fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } +#endif } /* Read from external orientation file if specified */ if ( externalOrientationFileReader != NULL ) { +#ifdef LIB_REND_API_5MS + IVAS_QUATERNION quat; + int8_t enableHeadRotation; + int8_t enableExternalOrientation; + int8_t enableRotationInterpolation; + int16_t numFramesToTargetOrientation; + + if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &quat, &enableHeadRotation, &enableExternalOrientation, &enableRotationInterpolation, &numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error in External Orientation File Reading: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + + if ( ( error = IVAS_REND_SetExternalOrientation( hIvasRend, &quat, enableHeadRotation, enableExternalOrientation, enableRotationInterpolation, numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error setting External Orientation: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + + if ( !args.framing_5ms ) + { + /* Skip over 3 following entries in file - they are given on 5ms grid */ + for ( int16_t i = 0; i < 3; ++i ) + { + if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &quat, &enableHeadRotation, &enableExternalOrientation, &enableRotationInterpolation, &numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error in External Orientation File Reading: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + } + } +#else IVAS_QUATERNION quatBuffer[RENDERER_HEAD_POSITIONS_PER_FRAME]; int8_t enableHeadRotation[RENDERER_HEAD_POSITIONS_PER_FRAME]; int8_t enableExternalOrientation[RENDERER_HEAD_POSITIONS_PER_FRAME]; @@ -1127,6 +1232,7 @@ int main( fprintf( stderr, "Error setting External Orientation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } +#endif } /* Combine external orientations and head rotation */ @@ -1281,6 +1387,7 @@ int main( delayNumSamples -= (int16_t) outBufferSize; } + /* TODO(sgi): Masa output most likely broken with 5ms framing */ /* Write MASA metadata for MASA outputs */ if ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_MASA1 || args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_MASA2 ) { @@ -1900,6 +2007,9 @@ static CmdlnArgs defaultArgs( args.lfeCustomRoutingEnabled = false; clearString( args.inLfePanningMatrixFile ); +#ifdef LIB_REND_API_5MS + args.framing_5ms = false; +#endif return args; } @@ -2029,6 +2139,12 @@ static void parseOption( exit( -1 ); } break; +#ifdef LIB_REND_API_5MS + case CmdLnOptionId_framing5ms: + assert( numOptionValues == 0 ); + args->framing_5ms = false; + break; +#endif default: assert( 0 && "This should be unreachable - all command line options should be explicitly handled." ); break; diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index 2dc926dfc2..49c6f395fd 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -50,7 +50,9 @@ #define IVAS_CLDFB_NO_CHANNELS_MAX ( 60 ) #define IVAS_MAX_INPUT_LFE_CHANNELS 4 +#ifndef LIB_REND_API_5MS #define RENDERER_HEAD_POSITIONS_PER_FRAME 4 +#endif /*----------------------------------------------------------------------------------* diff --git a/lib_com/options.h b/lib_com/options.h index bee9901a56..4a88b47d83 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -157,6 +157,7 @@ #define FIX_XXX_JITTER_SBA_BINAURAL_GAIN #define FIX_XXX_HEADTRACKER_INIT #define API_5MS +#define LIB_REND_API_5MS /* FhG: Adds 5ms framing capability to lib_rend */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 29a5ace8f4..8d987a3f3c 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -857,7 +857,11 @@ ivas_error combine_external_and_head_orientations_rend( ); ivas_error combine_external_and_head_orientations( +#ifdef LIB_REND_API_5MS + IVAS_QUATERNION *headRotQuaternion, /* i : quaternion for head rotation */ +#else IVAS_QUATERNION *headRotQuaternions, /* i : quaternions for head rotation */ +#endif IVAS_VECTOR3 *listenerPos, /* i : listener position */ #ifndef API_5MS int16_t numHeadRotQuaternions, /* i : number of head rotation quaternions */ diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 184f382ee8..468d28b026 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -902,7 +902,11 @@ ivas_error combine_external_and_head_orientations_dec( #endif } #ifdef API_5MS +#ifdef LIB_REND_API_5MS return combine_external_and_head_orientations( headRotQuaternions, listenerPos, hExtOrientationData, hCombinedOrientationData ); +#else + return combine_external_and_head_orientations( headRotQuaternions, listenerPos, hExtOrientationData, hCombinedOrientationData ); +#endif #else return combine_external_and_head_orientations( headRotQuaternions, listenerPos, numHeadRotQuaternions, hExtOrientationData, hCombinedOrientationData ); #endif @@ -932,8 +936,13 @@ ivas_error combine_external_and_head_orientations_rend( { if ( hHeadTrackData->headRotEnabled ) { +#ifdef LIB_REND_API_5MS + headRotQuaternions = &hHeadTrackData->headPosition; + listenerPos = &hHeadTrackData->Pos; +#else headRotQuaternions = hHeadTrackData->headPositions; listenerPos = hHeadTrackData->Pos; +#endif } } else if ( hExtOrientationData != NULL ) @@ -971,7 +980,11 @@ ivas_error combine_external_and_head_orientations_rend( *------------------------------------------------------------------------*/ ivas_error combine_external_and_head_orientations( +#ifdef LIB_REND_API_5MS + IVAS_QUATERNION *headRotQuaternion, /* i : quaternion for head rotation */ +#else IVAS_QUATERNION *headRotQuaternions, /* i : quaternions for head rotation */ +#endif IVAS_VECTOR3 *listenerPos, /* i : listener position */ #ifndef API_5MS int16_t numHeadRotQuaternions, /* i : number of head rotation quaternions */ @@ -994,7 +1007,11 @@ ivas_error combine_external_and_head_orientations( /* Form combined orientations or return if no data available */ if ( hCombinedOrientationData == NULL ) { +#ifdef LIB_REND_API_5MS + if ( headRotQuaternion != NULL || hExtOrientationData != NULL ) +#else if ( headRotQuaternions != NULL || hExtOrientationData != NULL ) +#endif { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } @@ -1003,7 +1020,11 @@ ivas_error combine_external_and_head_orientations( return IVAS_ERR_OK; } } +#ifdef LIB_REND_API_5MS + else if ( headRotQuaternion == NULL && hExtOrientationData == NULL ) +#else else if ( headRotQuaternions == NULL && hExtOrientationData == NULL ) +#endif { /* Reset the combined orientations and rotations */ hCombinedOrientationData->isInterpolationOngoing = FALSE; @@ -1037,11 +1058,19 @@ ivas_error combine_external_and_head_orientations( } #endif } +#ifdef LIB_REND_API_5MS + else if ( hExtOrientationData == NULL && headRotQuaternion != NULL ) +#else else if ( hExtOrientationData == NULL && headRotQuaternions != NULL ) +#endif { /* Head rotation only */ #ifdef API_5MS +#ifdef LIB_REND_API_5MS + hCombinedOrientationData->Quaternion = *headRotQuaternion; +#else hCombinedOrientationData->Quaternion = *headRotQuaternions; +#endif #else if ( numHeadRotQuaternions >= 0 ) @@ -1130,7 +1159,11 @@ ivas_error combine_external_and_head_orientations( #endif } +#ifdef LIB_REND_API_5MS + if ( hExtOrientationData != NULL && headRotQuaternion != NULL ) +#else if ( hExtOrientationData != NULL && headRotQuaternions != NULL ) +#endif { /* Combine head and external orientations */ #ifdef API_5MS @@ -1140,11 +1173,19 @@ ivas_error combine_external_and_head_orientations( { if ( hExtOrientationData->enableExternalOrientation > 0 ) { +#ifdef LIB_REND_API_5MS + QuaternionProduct( hCombinedOrientationData->Quaternion, *headRotQuaternion, &hCombinedOrientationData->Quaternion ); +#else QuaternionProduct( hCombinedOrientationData->Quaternion, *headRotQuaternions, &hCombinedOrientationData->Quaternion ); +#endif } else { +#ifdef LIB_REND_API_5MS + hCombinedOrientationData->Quaternion = *headRotQuaternion; +#else hCombinedOrientationData->Quaternion = *headRotQuaternions; +#endif } } /* Use the freezed head rotation */ @@ -1203,7 +1244,11 @@ ivas_error combine_external_and_head_orientations( #endif } +#ifdef LIB_REND_API_5MS + if ( headRotQuaternion != NULL || hExtOrientationData != NULL ) +#else if ( headRotQuaternions != NULL || hExtOrientationData != NULL ) +#endif { /* Calculate the combined rotation matrix */ #ifdef API_5MS @@ -1243,14 +1288,22 @@ ivas_error combine_external_and_head_orientations( } #endif } +#ifdef LIB_REND_API_5MS + if ( headRotQuaternion != NULL ) +#else if ( headRotQuaternions != NULL ) +#endif { #ifdef API_5MS if ( hExtOrientationData != NULL ) { if ( hExtOrientationData->enableHeadRotation > 0 ) { +#ifdef LIB_REND_API_5MS + hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternion; +#else hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternions; +#endif } else { @@ -1259,7 +1312,11 @@ ivas_error combine_external_and_head_orientations( } else { +#ifdef LIB_REND_API_5MS + hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternion; +#else hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternions; +#endif } hCombinedOrientationData->listenerPos = *listenerPos; @@ -1294,7 +1351,11 @@ ivas_error combine_external_and_head_orientations( } /* Check if combined orientation is enabled */ +#ifdef LIB_REND_API_5MS + if ( headRotQuaternion != NULL && hExtOrientationData == NULL ) +#else if ( headRotQuaternions != NULL && hExtOrientationData == NULL ) +#endif { #ifdef API_5MS hCombinedOrientationData->enableCombinedOrientation = 1; @@ -1313,7 +1374,11 @@ ivas_error combine_external_and_head_orientations( } #endif } +#ifdef LIB_REND_API_5MS + else if ( headRotQuaternion == NULL && hExtOrientationData != NULL ) +#else else if ( headRotQuaternions == NULL && hExtOrientationData != NULL ) +#endif { #ifdef API_5MS if ( hExtOrientationData->enableExternalOrientation > 0 ) @@ -1338,7 +1403,11 @@ ivas_error combine_external_and_head_orientations( } #endif } +#ifdef LIB_REND_API_5MS + else if ( headRotQuaternion != NULL && hExtOrientationData != NULL ) +#else else if ( headRotQuaternions != NULL && hExtOrientationData != NULL ) +#endif { #ifdef API_5MS if ( hExtOrientationData->enableExternalOrientation > 0 || hExtOrientationData->enableHeadRotation > 0 ) diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index 14de5e7d55..7306c45e99 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -248,9 +248,16 @@ typedef struct ivas_orient_trk_state_t typedef struct { int8_t headRotEnabled; +#ifdef LIB_REND_API_5MS + IVAS_QUATERNION headPosition; + IVAS_VECTOR3 Pos; + float crossfade_5ms[L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES]; + float crossfade_20ms[L_FRAME48k]; +#else IVAS_QUATERNION headPositions[RENDERER_HEAD_POSITIONS_PER_FRAME]; IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; float crossfade[L_FRAME48k / RENDERER_HEAD_POSITIONS_PER_FRAME]; +#endif ivas_orient_trk_state_t *hOrientationTracker; } IVAS_REND_HeadRotData; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 89b51e7745..6f6b32de1b 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -930,6 +930,25 @@ static ivas_error initHeadRotation( /* Head rotation is enabled by default */ hIvasRend->headRotData.headRotEnabled = 1; +#ifdef LIB_REND_API_5MS + /* Initialize 5ms crossfade */ + crossfade_len = L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES; /* TODO(sgi): @tmu why do we assume 48 kHz here? */ + tmp = 1.f / ( crossfade_len - 1 ); + for ( i = 0; i < crossfade_len; i++ ) + { + hIvasRend->headRotData.crossfade_5ms[i] = i * tmp; + } + /* Initialize 20ms crossfade */ + crossfade_len = L_FRAME48k; /* TODO(sgi): @tmu why do we assume 48 kHz here? */ + tmp = 1.f / ( crossfade_len - 1 ); + for ( i = 0; i < crossfade_len; i++ ) + { + hIvasRend->headRotData.crossfade_20ms[i] = i * tmp; + } + + /* Initialize with unit quaternion */ + hIvasRend->headRotData.headPosition = quaternionInit(); +#else /* Initialize 5ms crossfade */ crossfade_len = L_FRAME48k / RENDERER_HEAD_POSITIONS_PER_FRAME; tmp = 1.f / ( crossfade_len - 1 ); @@ -943,6 +962,7 @@ static ivas_error initHeadRotation( { hIvasRend->headRotData.headPositions[i] = quaternionInit(); } +#endif if ( ( hIvasRend->headRotData.hOrientationTracker = (ivas_orient_trk_state_t *) malloc( sizeof( ivas_orient_trk_state_t ) ) ) == NULL ) { @@ -4063,12 +4083,19 @@ int16_t IVAS_REND_FeedRenderConfig( *-------------------------------------------------------------------*/ ivas_error IVAS_REND_SetHeadRotation( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ +#ifdef LIB_REND_API_5MS + const IVAS_QUATERNION headRot, /* i : head orientations for next rendering call */ + const IVAS_VECTOR3 Pos /* i : listener positions for next rendering call */ +#else const IVAS_QUATERNION headRot[RENDERER_HEAD_POSITIONS_PER_FRAME], /* i : head orientations for next rendering call */ const IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME] /* i : listener positions for next rendering call */ +#endif ) { +#ifndef LIB_REND_API_5MS int16_t i; +#endif IVAS_QUATERNION rotQuat; /* Validate function arguments */ @@ -4083,6 +4110,20 @@ ivas_error IVAS_REND_SetHeadRotation( return IVAS_ERR_INVALID_OUTPUT_FORMAT; } +#ifdef LIB_REND_API_5MS + /* check for Euler angle signaling */ + if ( headRot.w == -3.0f ) + { + Euler2Quat( deg2rad( headRot.x ), deg2rad( headRot.y ), deg2rad( headRot.z ), &rotQuat ); + } + else + { + rotQuat = headRot; + } + + ivas_orient_trk_Process( hIvasRend->headRotData.hOrientationTracker, rotQuat, FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &hIvasRend->headRotData.headPosition ); + hIvasRend->headRotData.Pos = Pos; +#else if ( headRot == NULL ) { hIvasRend->headRotData.headRotEnabled = 0; @@ -4106,10 +4147,27 @@ ivas_error IVAS_REND_SetHeadRotation( hIvasRend->headRotData.Pos[i] = Pos[i]; } } +#endif return IVAS_ERR_OK; } +#ifdef LIB_REND_API_5MS +ivas_error IVAS_REND_DisableHeadRotation( + IVAS_REND_HANDLE hIvasRend /* i/o: Renderer handle */ +) +{ + /* Validate function arguments */ + if ( hIvasRend == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + + hIvasRend->headRotData.headRotEnabled = 0; + return IVAS_ERR_OK; +} +#endif + /*-------------------------------------------------------------------* * IVAS_REND_SetOrientationTrackingMode() @@ -4237,15 +4295,24 @@ ivas_error IVAS_REND_SetReferenceVector( *---------------------------------------------------------------------*/ ivas_error IVAS_REND_SetExternalOrientation( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - IVAS_QUATERNION *orientation, /* i : external orientation data */ + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_QUATERNION *orientation, /* i : external orientation data */ +#ifdef LIB_REND_API_5MS + int8_t enableHeadRotation, /* i : flag to enable head rotation for this frame */ + int8_t enableExternalOrientation, /* i : flag to enable external orientation for this frame */ + int8_t enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ + int16_t numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ /* TODO(sgi): make independent of framing */ +#else int8_t *enableHeadRotation, /* i : flag to enable head rotation for this frame */ int8_t *enableExternalOrientation, /* i : flag to enable external orientation for this frame */ int8_t *enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ int16_t *numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ +#endif ) { +#ifndef LIB_REND_API_5MS int16_t i; +#endif /* Validate function arguments */ if ( hIvasRend == NULL || hIvasRend->hExternalOrientationData == NULL ) @@ -4266,6 +4333,14 @@ ivas_error IVAS_REND_SetExternalOrientation( } else { +#ifdef LIB_REND_API_5MS + QuaternionInverse( *orientation, &hIvasRend->hExternalOrientationData->Quaternion ); + + hIvasRend->hExternalOrientationData->enableHeadRotation = enableHeadRotation; + hIvasRend->hExternalOrientationData->enableExternalOrientation = enableExternalOrientation; + hIvasRend->hExternalOrientationData->enableRotationInterpolation = enableRotationInterpolation; + hIvasRend->hExternalOrientationData->numFramesToTargetOrientation = numFramesToTargetOrientation; +#else for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; ++i ) { #ifdef API_5MS @@ -4285,6 +4360,7 @@ ivas_error IVAS_REND_SetExternalOrientation( hIvasRend->hExternalOrientationData->numFramesToTargetOrientation[i] = numFramesToTargetOrientation[i]; #endif } +#endif } return IVAS_ERR_OK; @@ -4321,7 +4397,9 @@ ivas_error IVAS_REND_GetCombinedOrientation( IVAS_QUATERNION *pOrientation /* i/o: Quaternion pointer processed orientation */ ) { +#ifndef LIB_REND_API_5MS int16_t i; +#endif if ( hIvasRend == NULL || pOrientation == NULL ) { @@ -4330,6 +4408,9 @@ ivas_error IVAS_REND_GetCombinedOrientation( if ( hIvasRend->hCombinedOrientationData != NULL ) { +#ifdef LIB_REND_API_5MS + *pOrientation = hIvasRend->hCombinedOrientationData->Quaternion; +#else for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; ++i ) { #ifdef API_5MS @@ -4339,6 +4420,7 @@ ivas_error IVAS_REND_GetCombinedOrientation( pOrientation[i] = hIvasRend->hCombinedOrientationData->Quaternions[i]; #endif } +#endif } return IVAS_ERR_OK; @@ -4447,7 +4529,11 @@ static ivas_error rotateFrameMc( { int16_t i; int16_t j; +#ifdef LIB_REND_API_5MS + const float *crossfade; +#else int16_t subframe_idx, subframe_len; +#endif int16_t azimuth, elevation; int16_t is_planar_setup, lfe_idx; int16_t nchan; @@ -4462,6 +4548,21 @@ static ivas_error rotateFrameMc( push_wmops( "rotateFrameMc" ); +#ifdef LIB_REND_API_5MS + if ( inAudio.config.numSamplesPerChannel == L_FRAME48k ) + { + crossfade = headRotData->crossfade_20ms; + } + else if ( inAudio.config.numSamplesPerChannel == L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES ) + { + crossfade = headRotData->crossfade_5ms; + } + else + { + return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "Only 5 and 20 ms framing is supported" ); + } +#endif + if ( inConfig != IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) { if ( ( error = getAudioConfigNumChannels( inConfig, &nchan ) ) != IVAS_ERR_OK ) @@ -4486,10 +4587,13 @@ static ivas_error rotateFrameMc( gains[ch_in][ch_in] = 1.f; } +#ifndef LIB_REND_API_5MS + /* TODO(sgi): @tmu please review changes in this function */ /* subframe loop */ subframe_len = inAudio.config.numSamplesPerChannel / RENDERER_HEAD_POSITIONS_PER_FRAME; for ( subframe_idx = 0; subframe_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; subframe_idx++ ) { +#endif for ( i = 0; i < 3; i++ ) { if ( hCombinedOrientationData != NULL ) @@ -4551,6 +4655,18 @@ static ivas_error rotateFrameMc( { for ( ch_in = 0; ch_in < nchan; ch_in++ ) { +#ifdef LIB_REND_API_5MS + writePtr = getSmplPtr( outAudio, ch_out, 0 ); + readPtr = getSmplPtr( inAudio, ch_in, 0 ); + /* crossfade with previous rotation gains */ + for ( i = 0; i < inAudio.config.numSamplesPerChannel; i++ ) + { + *writePtr++ += + ( *readPtr ) * ( ( 1 - crossfade[i] ) * gains_prev[ch_in][ch_out] ) + + ( *readPtr ) * ( crossfade[i] * gains[ch_in][ch_out] ); + readPtr++; + } +#else writePtr = getSmplPtr( outAudio, ch_out, subframe_idx * subframe_len ); readPtr = getSmplPtr( inAudio, ch_in, subframe_idx * subframe_len ); /* crossfade with previous rotation gains */ @@ -4561,6 +4677,7 @@ static ivas_error rotateFrameMc( ( *readPtr ) * ( headRotData->crossfade[i] * gains[ch_in][ch_out] ); readPtr++; } +#endif } } @@ -4569,7 +4686,9 @@ static ivas_error rotateFrameMc( { mvr2r( gains[i], gains_prev[i], nchan ); } +#ifndef LIB_REND_API_5MS } +#endif pop_wmops(); @@ -4588,7 +4707,11 @@ static ivas_error rotateFrameSba( int16_t i, l, n, m; int16_t m1, m2; int16_t shd_rot_max_order; +#ifdef LIB_REND_API_5MS + const float *crossfade; +#else int16_t subframe_idx, subframe_len; +#endif float *readPtr, *writePtr; rotation_matrix Rmat; float tmpRot[2 * HEADROT_ORDER + 1]; @@ -4597,15 +4720,33 @@ static ivas_error rotateFrameSba( push_wmops( "rotateFrameSba" ); +#ifdef LIB_REND_API_5MS + if ( inAudio.config.numSamplesPerChannel == L_FRAME48k ) + { + crossfade = headRotData->crossfade_20ms; + } + else if ( inAudio.config.numSamplesPerChannel == L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES ) + { + crossfade = headRotData->crossfade_5ms; + } + else + { + return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "Only 5 and 20 ms framing is supported" ); + } +#endif + if ( ( error = getAmbisonicsOrder( inConfig, &shd_rot_max_order ) ) != IVAS_ERR_OK ) { return error; } +#ifndef LIB_REND_API_5MS + /* TODO(sgi): @tmu please review changes in this function */ /* subframe loop */ subframe_len = inAudio.config.numSamplesPerChannel / RENDERER_HEAD_POSITIONS_PER_FRAME; for ( subframe_idx = 0; subframe_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; subframe_idx++ ) { +#endif /* initialize rotation matrices with zeros */ for ( i = 0; i < HEADROT_SHMAT_DIM; i++ ) { @@ -4637,7 +4778,11 @@ static ivas_error rotateFrameSba( /* calculate ambisonics rotation matrices for the previous and current frames */ SHrotmatgen( gains, Rmat, shd_rot_max_order ); +#ifdef LIB_REND_API_5MS + for ( i = 0; i < inAudio.config.numSamplesPerChannel; i++ ) +#else for ( i = 0; i < subframe_len; i++ ) +#endif { /* As the rotation matrix becomes block diagonal in a SH basis, we can*/ /* apply each angular-momentum block individually to save complexity. */ @@ -4654,16 +4799,27 @@ static ivas_error rotateFrameSba( for ( m = m1; m < m2; m++ ) { +#ifdef LIB_REND_API_5MS + readPtr = getSmplPtr( inAudio, m, i ); + /* crossfade with previous rotation gains */ + tmpRot[n - m1] += crossfade[i] * gains[n][m] * ( *readPtr ) + + ( 1 - crossfade[i] ) * gains_prev[n][m] * ( *readPtr ); +#else readPtr = getSmplPtr( inAudio, m, subframe_idx * subframe_len + i ); /* crossfade with previous rotation gains */ tmpRot[n - m1] += headRotData->crossfade[i] * gains[n][m] * ( *readPtr ) + ( 1 - headRotData->crossfade[i] ) * gains_prev[n][m] * ( *readPtr ); +#endif } } /* write back the result */ for ( n = m1; n < m2; n++ ) { +#ifdef LIB_REND_API_5MS + writePtr = getSmplPtr( outAudio, n, i ); +#else writePtr = getSmplPtr( outAudio, n, subframe_idx * subframe_len + i ); +#endif ( *writePtr ) = tmpRot[n - m1]; } m1 = m2; @@ -4691,7 +4847,9 @@ static ivas_error rotateFrameSba( { mvr2r( gains[i], gains_prev[i], HEADROT_SHMAT_DIM ); } +#ifndef LIB_REND_API_5MS } +#endif pop_wmops(); @@ -4734,7 +4892,9 @@ static ivas_error renderIsmToBinauralRoom( { int16_t i; int16_t azi_rot, ele_rot; +#ifndef LIB_REND_API_5MS int16_t subframe_idx, subframe_len; +#endif int16_t tmp; rotation_matrix Rmat; float tmpRendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; @@ -4783,10 +4943,12 @@ static ivas_error renderIsmToBinauralRoom( if ( combinedOrientationEnabled ) { +#ifndef LIB_REND_API_5MS subframe_len = ismInput->base.inputBuffer.config.numSamplesPerChannel / RENDERER_HEAD_POSITIONS_PER_FRAME; // for ( subframe_idx = 0; subframe_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; subframe_idx++ ) for ( subframe_idx = 0; subframe_idx < 1; subframe_idx++ ) { +#endif for ( i = 0; i < 3; i++ ) { #ifdef API_5MS @@ -4814,8 +4976,10 @@ static ivas_error renderIsmToBinauralRoom( Rmat[i][i] = 1.0f; } } +#ifndef LIB_REND_API_5MS } (void) subframe_len; // avoid warning +#endif } /* TODO tmu : see issue #518 */ @@ -6300,6 +6464,10 @@ static ivas_error renderActiveInputsMasa( if ( getAudioConfigType( hIvasRend->outputConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL && pCurrentInput->decDummy->hHeadTrackData != NULL ) { +#ifdef LIB_REND_API_5MS + pCurrentInput->decDummy->hHeadTrackData->Quaternion = hIvasRend->headRotData.headPosition; + pCurrentInput->decDummy->hHeadTrackData->Pos = hIvasRend->headRotData.Pos; +#else for ( sf_idx = 0; sf_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; ++sf_idx ) { #ifdef API_5MS @@ -6311,6 +6479,7 @@ static ivas_error renderActiveInputsMasa( pCurrentInput->decDummy->hHeadTrackData->Pos[sf_idx] = hIvasRend->headRotData.Pos[sf_idx]; #endif } +#endif } if ( ( error = renderInputMasa( pCurrentInput, hIvasRend->outputConfig, outAudio ) ) != IVAS_ERR_OK ) diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index d8d6127b20..701e0d5062 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -247,9 +247,21 @@ int16_t IVAS_REND_FeedRenderConfig( ivas_error IVAS_REND_SetHeadRotation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ +#ifdef LIB_REND_API_5MS + const IVAS_QUATERNION headRot, /* i : head orientations for next rendering call */ + const IVAS_VECTOR3 Pos /* i : listener positions for next rendering call */ +#else const IVAS_QUATERNION headRot[RENDERER_HEAD_POSITIONS_PER_FRAME], /* i : head orientations for next rendering call */ const IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME] /* i : listener positions for next rendering call */ +#endif +); + +#ifdef LIB_REND_API_5MS +/* Head rotation becomes enabled by calling IVAS_REND_SetHeadRotation. Use this to disable. */ +ivas_error IVAS_REND_DisableHeadRotation( + IVAS_REND_HANDLE hIvasRend /* i/o: Renderer handle */ ); +#endif ivas_error IVAS_REND_SetOrientationTrackingMode( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ @@ -280,10 +292,17 @@ ivas_error IVAS_REND_SetReferenceVector( ivas_error IVAS_REND_SetExternalOrientation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ IVAS_QUATERNION *orientation, /* i : external orientation data */ +#ifdef LIB_REND_API_5MS + int8_t enableHeadRotation, /* i : flag to enable head rotation for this frame */ + int8_t enableExternalOrientation, /* i : flag to enable external orientation for this frame */ + int8_t enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ + int16_t numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ +#else int8_t *enableHeadRotation, /* i : flag to enable head rotation for this frame */ int8_t *enableExternalOrientation, /* i : flag to enable external orientation for this frame */ int8_t *enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ int16_t *numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ +#endif ); ivas_error IVAS_REND_CombineHeadAndExternalOrientation( @@ -292,7 +311,7 @@ ivas_error IVAS_REND_CombineHeadAndExternalOrientation( ivas_error IVAS_REND_GetCombinedOrientation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - IVAS_QUATERNION *pRotation /* i/o: Quaternion pointer processed orientation */ + IVAS_QUATERNION *pOrientation /* i/o: Quaternion pointer processed orientation */ ); ivas_error IVAS_REND_GetMasaMetadata( -- GitLab From 6e1fe92ff2cf0a510017bb86ab4b6f72b3ffd7cd Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 16 Jun 2023 09:37:32 +0200 Subject: [PATCH 013/175] [tmp] Revert "Remove RENDERER_HEAD_POSITIONS_PER_FRAME - code compiles, but untested" This reverts commit 7fb10d40a051ab031a939821cb5bfdbd1dfddb40. --- apps/renderer.c | 170 ++++++----------------------------- lib_com/common_api_types.h | 2 - lib_com/options.h | 1 - lib_rend/ivas_prot_rend.h | 4 - lib_rend/ivas_rotation.c | 69 --------------- lib_rend/ivas_stat_rend.h | 7 -- lib_rend/lib_rend.c | 175 +------------------------------------ lib_rend/lib_rend.h | 21 +---- 8 files changed, 31 insertions(+), 418 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index 9be54daca5..760065be91 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -157,9 +157,6 @@ typedef struct float lfeConfigElevation; bool lfeCustomRoutingEnabled; char inLfePanningMatrixFile[RENDERER_MAX_CLI_ARG_LENGTH]; -#ifdef LIB_REND_API_5MS - bool framing_5ms; -#endif } CmdlnArgs; typedef enum @@ -184,9 +181,6 @@ typedef enum CmdLnOptionId_inputGain, CmdLnOptionId_referenceVectorFile, CmdLnOptionId_exteriorOrientationFile, -#ifdef LIB_REND_API_5MS - CmdLnOptionId_framing5ms, -#endif } CmdLnOptionId; static const CmdLnParser_Option cliOptions[] = { @@ -308,14 +302,6 @@ static const CmdLnParser_Option cliOptions[] = { .matchShort = "exof", .description = "External orientation trajectory file for simulation of external orientations", }, -#ifdef LIB_REND_API_5MS - { - .id = CmdLnOptionId_framing5ms, - .match = "framing_5ms", - .matchShort = "fr5", - .description = "Process audio with 5 ms framing. Time resolution of metadata (e.g. ISM positions) remains unchanged w.r.t. 20 ms framing", - }, -#endif }; @@ -574,9 +560,7 @@ int main( int32_t delayTimeScale = 0; int16_t i, numChannels; ivas_error error = IVAS_ERR_OK; -#ifndef LIB_REND_API_5MS IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; -#endif #ifdef WMOPS reset_wmops(); @@ -749,13 +733,7 @@ int main( fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } - const int16_t frameSize_smpls = (int16_t) ( -#ifdef LIB_REND_API_5MS - ( args.framing_5ms ? 5 : 20 ) -#else - 20 -#endif - * args.sampleRate / 1000 ); + const int16_t frameSize_smpls = (int16_t) ( 20 * args.sampleRate / 1000 ); IVAS_REND_InputId mcIds[RENDERER_MAX_MC_INPUTS] = { 0 }; IVAS_REND_InputId ismIds[RENDERER_MAX_ISM_INPUTS] = { 0 }; @@ -1041,17 +1019,10 @@ int main( fprintf( stdout, "\n\n-- Start the renderer (quiet mode) --\n\n" ); } -#ifdef LIB_REND_API_5MS - ObjectPositionBuffer mtdBuffer; -#endif - while ( 1 ) { int16_t num_in_channels; num_in_channels = inBuffer.config.numChannels; -#ifdef LIB_REND_API_5MS - const bool isCurrentFrameMultipleOf20ms = !args.framing_5ms || frame % 4 == 0; -#endif /* Read the input data */ if ( ( error = AudioFileReader_read( audioReader, inpInt16Buffer, (int16_t) inBufferSize, &numSamplesRead ) ) != IVAS_ERR_OK ) @@ -1069,85 +1040,50 @@ int main( /* Convert from int to float and from interleaved to packed */ convertInputBuffer( inpInt16Buffer, numSamplesRead, frameSize_smpls, num_in_channels, inFloatBuffer ); -#ifdef LIB_REND_API_5MS - if ( isCurrentFrameMultipleOf20ms ) - { -#else + ObjectPositionBuffer mtdBuffer; -#endif - IsmPositionProvider_getNextFrame( positionProvider, &mtdBuffer ); + IsmPositionProvider_getNextFrame( positionProvider, &mtdBuffer ); - if ( referenceVectorReader != NULL ) + if ( referenceVectorReader != NULL ) + { + IVAS_VECTOR3 listenerPos, refPos; + if ( ( error = Vector3PairFileReader_read( referenceVectorReader, &listenerPos, &refPos ) ) != IVAS_ERR_OK ) { - IVAS_VECTOR3 listenerPos, refPos; - if ( ( error = Vector3PairFileReader_read( referenceVectorReader, &listenerPos, &refPos ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); - exit( -1 ); - } - if ( ( error = IVAS_REND_SetReferenceVector( hIvasRend, listenerPos, refPos ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); - exit( -1 ); - } + fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); } - /* Read from reference rotation trajectory file if specified */ - if ( referenceRotReader != NULL ) + if ( ( error = IVAS_REND_SetReferenceVector( hIvasRend, listenerPos, refPos ) ) != IVAS_ERR_OK ) { - IVAS_QUATERNION quaternion; - if ( ( error = HeadRotationFileReading( referenceRotReader, &quaternion, NULL ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); - exit( -1 ); - } - - if ( ( error = IVAS_REND_SetReferenceRotation( hIvasRend, quaternion ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Error setting Reference Rotation: %s\n", ivas_error_to_string( error ) ); - exit( -1 ); - } + fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); } -#ifdef LIB_REND_API_5MS } -#endif - - /* Read from head rotation trajectory file if specified */ - if ( headRotReader != NULL ) + /* Read from reference rotation trajectory file if specified */ + if ( referenceRotReader != NULL ) { -#ifdef LIB_REND_API_5MS - IVAS_QUATERNION headRot; - IVAS_VECTOR3 Pos; - - if ( ( error = HeadRotationFileReading( headRotReader, &headRot, &Pos ) ) != IVAS_ERR_OK ) + IVAS_QUATERNION quaternion; + if ( ( error = HeadRotationFileReading( referenceRotReader, &quaternion, NULL ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } - if ( ( error = IVAS_REND_SetHeadRotation( hIvasRend, headRot, Pos ) ) != IVAS_ERR_OK ) + + if ( ( error = IVAS_REND_SetReferenceRotation( hIvasRend, quaternion ) ) != IVAS_ERR_OK ) { - fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); + fprintf( stderr, "Error setting Reference Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } + } - if ( !args.framing_5ms ) - { - /* Skip over 3 following head positions - they are given on 5ms grid */ - for ( int16_t i = 0; i < 3; ++i ) - { - if ( ( error = HeadRotationFileReading( headRotReader, &headRot, &Pos ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); - exit( -1 ); - } - } - } -#else - IVAS_QUATERNION quatBuffer[RENDERER_HEAD_POSITIONS_PER_FRAME]; + /* Read from head rotation trajectory file if specified */ + if ( headRotReader != NULL ) + { + IVAS_QUATERNION quatBuffer[RENDERER_HEAD_POSITIONS_PER_FRAME]; - for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) + for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) + { + if ( ( error = HeadRotationFileReading( headRotReader, &quatBuffer[i], &Pos[i] ) ) != IVAS_ERR_OK ) { - if ( ( error = HeadRotationFileReading( headRotReader, &quatBuffer[i], &Pos[i] ) ) != IVAS_ERR_OK ) - { fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } @@ -1157,61 +1093,20 @@ int main( fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } -#endif } else { -#ifdef LIB_REND_API_5MS - if ( ( error = IVAS_REND_DisableHeadRotation( hIvasRend ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Error disabling head rotation: %s\n", ivas_error_to_string( error ) ); - exit( -1 ); - } -#else error = IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ); if ( error != IVAS_ERR_OK && error != IVAS_ERR_INVALID_OUTPUT_FORMAT ) { fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } -#endif } /* Read from external orientation file if specified */ if ( externalOrientationFileReader != NULL ) { -#ifdef LIB_REND_API_5MS - IVAS_QUATERNION quat; - int8_t enableHeadRotation; - int8_t enableExternalOrientation; - int8_t enableRotationInterpolation; - int16_t numFramesToTargetOrientation; - - if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &quat, &enableHeadRotation, &enableExternalOrientation, &enableRotationInterpolation, &numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Error in External Orientation File Reading: %s\n", ivas_error_to_string( error ) ); - exit( -1 ); - } - - if ( ( error = IVAS_REND_SetExternalOrientation( hIvasRend, &quat, enableHeadRotation, enableExternalOrientation, enableRotationInterpolation, numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Error setting External Orientation: %s\n", ivas_error_to_string( error ) ); - exit( -1 ); - } - - if ( !args.framing_5ms ) - { - /* Skip over 3 following entries in file - they are given on 5ms grid */ - for ( int16_t i = 0; i < 3; ++i ) - { - if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &quat, &enableHeadRotation, &enableExternalOrientation, &enableRotationInterpolation, &numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Error in External Orientation File Reading: %s\n", ivas_error_to_string( error ) ); - exit( -1 ); - } - } - } -#else IVAS_QUATERNION quatBuffer[RENDERER_HEAD_POSITIONS_PER_FRAME]; int8_t enableHeadRotation[RENDERER_HEAD_POSITIONS_PER_FRAME]; int8_t enableExternalOrientation[RENDERER_HEAD_POSITIONS_PER_FRAME]; @@ -1232,7 +1127,6 @@ int main( fprintf( stderr, "Error setting External Orientation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } -#endif } /* Combine external orientations and head rotation */ @@ -1387,7 +1281,6 @@ int main( delayNumSamples -= (int16_t) outBufferSize; } - /* TODO(sgi): Masa output most likely broken with 5ms framing */ /* Write MASA metadata for MASA outputs */ if ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_MASA1 || args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_MASA2 ) { @@ -2007,9 +1900,6 @@ static CmdlnArgs defaultArgs( args.lfeCustomRoutingEnabled = false; clearString( args.inLfePanningMatrixFile ); -#ifdef LIB_REND_API_5MS - args.framing_5ms = false; -#endif return args; } @@ -2139,12 +2029,6 @@ static void parseOption( exit( -1 ); } break; -#ifdef LIB_REND_API_5MS - case CmdLnOptionId_framing5ms: - assert( numOptionValues == 0 ); - args->framing_5ms = false; - break; -#endif default: assert( 0 && "This should be unreachable - all command line options should be explicitly handled." ); break; diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index 49c6f395fd..2dc926dfc2 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -50,9 +50,7 @@ #define IVAS_CLDFB_NO_CHANNELS_MAX ( 60 ) #define IVAS_MAX_INPUT_LFE_CHANNELS 4 -#ifndef LIB_REND_API_5MS #define RENDERER_HEAD_POSITIONS_PER_FRAME 4 -#endif /*----------------------------------------------------------------------------------* diff --git a/lib_com/options.h b/lib_com/options.h index 4a88b47d83..bee9901a56 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -157,7 +157,6 @@ #define FIX_XXX_JITTER_SBA_BINAURAL_GAIN #define FIX_XXX_HEADTRACKER_INIT #define API_5MS -#define LIB_REND_API_5MS /* FhG: Adds 5ms framing capability to lib_rend */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 8d987a3f3c..29a5ace8f4 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -857,11 +857,7 @@ ivas_error combine_external_and_head_orientations_rend( ); ivas_error combine_external_and_head_orientations( -#ifdef LIB_REND_API_5MS - IVAS_QUATERNION *headRotQuaternion, /* i : quaternion for head rotation */ -#else IVAS_QUATERNION *headRotQuaternions, /* i : quaternions for head rotation */ -#endif IVAS_VECTOR3 *listenerPos, /* i : listener position */ #ifndef API_5MS int16_t numHeadRotQuaternions, /* i : number of head rotation quaternions */ diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 468d28b026..184f382ee8 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -902,11 +902,7 @@ ivas_error combine_external_and_head_orientations_dec( #endif } #ifdef API_5MS -#ifdef LIB_REND_API_5MS return combine_external_and_head_orientations( headRotQuaternions, listenerPos, hExtOrientationData, hCombinedOrientationData ); -#else - return combine_external_and_head_orientations( headRotQuaternions, listenerPos, hExtOrientationData, hCombinedOrientationData ); -#endif #else return combine_external_and_head_orientations( headRotQuaternions, listenerPos, numHeadRotQuaternions, hExtOrientationData, hCombinedOrientationData ); #endif @@ -936,13 +932,8 @@ ivas_error combine_external_and_head_orientations_rend( { if ( hHeadTrackData->headRotEnabled ) { -#ifdef LIB_REND_API_5MS - headRotQuaternions = &hHeadTrackData->headPosition; - listenerPos = &hHeadTrackData->Pos; -#else headRotQuaternions = hHeadTrackData->headPositions; listenerPos = hHeadTrackData->Pos; -#endif } } else if ( hExtOrientationData != NULL ) @@ -980,11 +971,7 @@ ivas_error combine_external_and_head_orientations_rend( *------------------------------------------------------------------------*/ ivas_error combine_external_and_head_orientations( -#ifdef LIB_REND_API_5MS - IVAS_QUATERNION *headRotQuaternion, /* i : quaternion for head rotation */ -#else IVAS_QUATERNION *headRotQuaternions, /* i : quaternions for head rotation */ -#endif IVAS_VECTOR3 *listenerPos, /* i : listener position */ #ifndef API_5MS int16_t numHeadRotQuaternions, /* i : number of head rotation quaternions */ @@ -1007,11 +994,7 @@ ivas_error combine_external_and_head_orientations( /* Form combined orientations or return if no data available */ if ( hCombinedOrientationData == NULL ) { -#ifdef LIB_REND_API_5MS - if ( headRotQuaternion != NULL || hExtOrientationData != NULL ) -#else if ( headRotQuaternions != NULL || hExtOrientationData != NULL ) -#endif { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } @@ -1020,11 +1003,7 @@ ivas_error combine_external_and_head_orientations( return IVAS_ERR_OK; } } -#ifdef LIB_REND_API_5MS - else if ( headRotQuaternion == NULL && hExtOrientationData == NULL ) -#else else if ( headRotQuaternions == NULL && hExtOrientationData == NULL ) -#endif { /* Reset the combined orientations and rotations */ hCombinedOrientationData->isInterpolationOngoing = FALSE; @@ -1058,19 +1037,11 @@ ivas_error combine_external_and_head_orientations( } #endif } -#ifdef LIB_REND_API_5MS - else if ( hExtOrientationData == NULL && headRotQuaternion != NULL ) -#else else if ( hExtOrientationData == NULL && headRotQuaternions != NULL ) -#endif { /* Head rotation only */ #ifdef API_5MS -#ifdef LIB_REND_API_5MS - hCombinedOrientationData->Quaternion = *headRotQuaternion; -#else hCombinedOrientationData->Quaternion = *headRotQuaternions; -#endif #else if ( numHeadRotQuaternions >= 0 ) @@ -1159,11 +1130,7 @@ ivas_error combine_external_and_head_orientations( #endif } -#ifdef LIB_REND_API_5MS - if ( hExtOrientationData != NULL && headRotQuaternion != NULL ) -#else if ( hExtOrientationData != NULL && headRotQuaternions != NULL ) -#endif { /* Combine head and external orientations */ #ifdef API_5MS @@ -1173,19 +1140,11 @@ ivas_error combine_external_and_head_orientations( { if ( hExtOrientationData->enableExternalOrientation > 0 ) { -#ifdef LIB_REND_API_5MS - QuaternionProduct( hCombinedOrientationData->Quaternion, *headRotQuaternion, &hCombinedOrientationData->Quaternion ); -#else QuaternionProduct( hCombinedOrientationData->Quaternion, *headRotQuaternions, &hCombinedOrientationData->Quaternion ); -#endif } else { -#ifdef LIB_REND_API_5MS - hCombinedOrientationData->Quaternion = *headRotQuaternion; -#else hCombinedOrientationData->Quaternion = *headRotQuaternions; -#endif } } /* Use the freezed head rotation */ @@ -1244,11 +1203,7 @@ ivas_error combine_external_and_head_orientations( #endif } -#ifdef LIB_REND_API_5MS - if ( headRotQuaternion != NULL || hExtOrientationData != NULL ) -#else if ( headRotQuaternions != NULL || hExtOrientationData != NULL ) -#endif { /* Calculate the combined rotation matrix */ #ifdef API_5MS @@ -1288,22 +1243,14 @@ ivas_error combine_external_and_head_orientations( } #endif } -#ifdef LIB_REND_API_5MS - if ( headRotQuaternion != NULL ) -#else if ( headRotQuaternions != NULL ) -#endif { #ifdef API_5MS if ( hExtOrientationData != NULL ) { if ( hExtOrientationData->enableHeadRotation > 0 ) { -#ifdef LIB_REND_API_5MS - hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternion; -#else hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternions; -#endif } else { @@ -1312,11 +1259,7 @@ ivas_error combine_external_and_head_orientations( } else { -#ifdef LIB_REND_API_5MS - hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternion; -#else hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternions; -#endif } hCombinedOrientationData->listenerPos = *listenerPos; @@ -1351,11 +1294,7 @@ ivas_error combine_external_and_head_orientations( } /* Check if combined orientation is enabled */ -#ifdef LIB_REND_API_5MS - if ( headRotQuaternion != NULL && hExtOrientationData == NULL ) -#else if ( headRotQuaternions != NULL && hExtOrientationData == NULL ) -#endif { #ifdef API_5MS hCombinedOrientationData->enableCombinedOrientation = 1; @@ -1374,11 +1313,7 @@ ivas_error combine_external_and_head_orientations( } #endif } -#ifdef LIB_REND_API_5MS - else if ( headRotQuaternion == NULL && hExtOrientationData != NULL ) -#else else if ( headRotQuaternions == NULL && hExtOrientationData != NULL ) -#endif { #ifdef API_5MS if ( hExtOrientationData->enableExternalOrientation > 0 ) @@ -1403,11 +1338,7 @@ ivas_error combine_external_and_head_orientations( } #endif } -#ifdef LIB_REND_API_5MS - else if ( headRotQuaternion != NULL && hExtOrientationData != NULL ) -#else else if ( headRotQuaternions != NULL && hExtOrientationData != NULL ) -#endif { #ifdef API_5MS if ( hExtOrientationData->enableExternalOrientation > 0 || hExtOrientationData->enableHeadRotation > 0 ) diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index 7306c45e99..14de5e7d55 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -248,16 +248,9 @@ typedef struct ivas_orient_trk_state_t typedef struct { int8_t headRotEnabled; -#ifdef LIB_REND_API_5MS - IVAS_QUATERNION headPosition; - IVAS_VECTOR3 Pos; - float crossfade_5ms[L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES]; - float crossfade_20ms[L_FRAME48k]; -#else IVAS_QUATERNION headPositions[RENDERER_HEAD_POSITIONS_PER_FRAME]; IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; float crossfade[L_FRAME48k / RENDERER_HEAD_POSITIONS_PER_FRAME]; -#endif ivas_orient_trk_state_t *hOrientationTracker; } IVAS_REND_HeadRotData; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 6f6b32de1b..89b51e7745 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -930,25 +930,6 @@ static ivas_error initHeadRotation( /* Head rotation is enabled by default */ hIvasRend->headRotData.headRotEnabled = 1; -#ifdef LIB_REND_API_5MS - /* Initialize 5ms crossfade */ - crossfade_len = L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES; /* TODO(sgi): @tmu why do we assume 48 kHz here? */ - tmp = 1.f / ( crossfade_len - 1 ); - for ( i = 0; i < crossfade_len; i++ ) - { - hIvasRend->headRotData.crossfade_5ms[i] = i * tmp; - } - /* Initialize 20ms crossfade */ - crossfade_len = L_FRAME48k; /* TODO(sgi): @tmu why do we assume 48 kHz here? */ - tmp = 1.f / ( crossfade_len - 1 ); - for ( i = 0; i < crossfade_len; i++ ) - { - hIvasRend->headRotData.crossfade_20ms[i] = i * tmp; - } - - /* Initialize with unit quaternion */ - hIvasRend->headRotData.headPosition = quaternionInit(); -#else /* Initialize 5ms crossfade */ crossfade_len = L_FRAME48k / RENDERER_HEAD_POSITIONS_PER_FRAME; tmp = 1.f / ( crossfade_len - 1 ); @@ -962,7 +943,6 @@ static ivas_error initHeadRotation( { hIvasRend->headRotData.headPositions[i] = quaternionInit(); } -#endif if ( ( hIvasRend->headRotData.hOrientationTracker = (ivas_orient_trk_state_t *) malloc( sizeof( ivas_orient_trk_state_t ) ) ) == NULL ) { @@ -4083,19 +4063,12 @@ int16_t IVAS_REND_FeedRenderConfig( *-------------------------------------------------------------------*/ ivas_error IVAS_REND_SetHeadRotation( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ -#ifdef LIB_REND_API_5MS - const IVAS_QUATERNION headRot, /* i : head orientations for next rendering call */ - const IVAS_VECTOR3 Pos /* i : listener positions for next rendering call */ -#else + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ const IVAS_QUATERNION headRot[RENDERER_HEAD_POSITIONS_PER_FRAME], /* i : head orientations for next rendering call */ const IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME] /* i : listener positions for next rendering call */ -#endif ) { -#ifndef LIB_REND_API_5MS int16_t i; -#endif IVAS_QUATERNION rotQuat; /* Validate function arguments */ @@ -4110,20 +4083,6 @@ ivas_error IVAS_REND_SetHeadRotation( return IVAS_ERR_INVALID_OUTPUT_FORMAT; } -#ifdef LIB_REND_API_5MS - /* check for Euler angle signaling */ - if ( headRot.w == -3.0f ) - { - Euler2Quat( deg2rad( headRot.x ), deg2rad( headRot.y ), deg2rad( headRot.z ), &rotQuat ); - } - else - { - rotQuat = headRot; - } - - ivas_orient_trk_Process( hIvasRend->headRotData.hOrientationTracker, rotQuat, FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &hIvasRend->headRotData.headPosition ); - hIvasRend->headRotData.Pos = Pos; -#else if ( headRot == NULL ) { hIvasRend->headRotData.headRotEnabled = 0; @@ -4147,27 +4106,10 @@ ivas_error IVAS_REND_SetHeadRotation( hIvasRend->headRotData.Pos[i] = Pos[i]; } } -#endif return IVAS_ERR_OK; } -#ifdef LIB_REND_API_5MS -ivas_error IVAS_REND_DisableHeadRotation( - IVAS_REND_HANDLE hIvasRend /* i/o: Renderer handle */ -) -{ - /* Validate function arguments */ - if ( hIvasRend == NULL ) - { - return IVAS_ERR_UNEXPECTED_NULL_POINTER; - } - - hIvasRend->headRotData.headRotEnabled = 0; - return IVAS_ERR_OK; -} -#endif - /*-------------------------------------------------------------------* * IVAS_REND_SetOrientationTrackingMode() @@ -4295,24 +4237,15 @@ ivas_error IVAS_REND_SetReferenceVector( *---------------------------------------------------------------------*/ ivas_error IVAS_REND_SetExternalOrientation( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - IVAS_QUATERNION *orientation, /* i : external orientation data */ -#ifdef LIB_REND_API_5MS - int8_t enableHeadRotation, /* i : flag to enable head rotation for this frame */ - int8_t enableExternalOrientation, /* i : flag to enable external orientation for this frame */ - int8_t enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ - int16_t numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ /* TODO(sgi): make independent of framing */ -#else + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_QUATERNION *orientation, /* i : external orientation data */ int8_t *enableHeadRotation, /* i : flag to enable head rotation for this frame */ int8_t *enableExternalOrientation, /* i : flag to enable external orientation for this frame */ int8_t *enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ int16_t *numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ -#endif ) { -#ifndef LIB_REND_API_5MS int16_t i; -#endif /* Validate function arguments */ if ( hIvasRend == NULL || hIvasRend->hExternalOrientationData == NULL ) @@ -4333,14 +4266,6 @@ ivas_error IVAS_REND_SetExternalOrientation( } else { -#ifdef LIB_REND_API_5MS - QuaternionInverse( *orientation, &hIvasRend->hExternalOrientationData->Quaternion ); - - hIvasRend->hExternalOrientationData->enableHeadRotation = enableHeadRotation; - hIvasRend->hExternalOrientationData->enableExternalOrientation = enableExternalOrientation; - hIvasRend->hExternalOrientationData->enableRotationInterpolation = enableRotationInterpolation; - hIvasRend->hExternalOrientationData->numFramesToTargetOrientation = numFramesToTargetOrientation; -#else for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; ++i ) { #ifdef API_5MS @@ -4360,7 +4285,6 @@ ivas_error IVAS_REND_SetExternalOrientation( hIvasRend->hExternalOrientationData->numFramesToTargetOrientation[i] = numFramesToTargetOrientation[i]; #endif } -#endif } return IVAS_ERR_OK; @@ -4397,9 +4321,7 @@ ivas_error IVAS_REND_GetCombinedOrientation( IVAS_QUATERNION *pOrientation /* i/o: Quaternion pointer processed orientation */ ) { -#ifndef LIB_REND_API_5MS int16_t i; -#endif if ( hIvasRend == NULL || pOrientation == NULL ) { @@ -4408,9 +4330,6 @@ ivas_error IVAS_REND_GetCombinedOrientation( if ( hIvasRend->hCombinedOrientationData != NULL ) { -#ifdef LIB_REND_API_5MS - *pOrientation = hIvasRend->hCombinedOrientationData->Quaternion; -#else for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; ++i ) { #ifdef API_5MS @@ -4420,7 +4339,6 @@ ivas_error IVAS_REND_GetCombinedOrientation( pOrientation[i] = hIvasRend->hCombinedOrientationData->Quaternions[i]; #endif } -#endif } return IVAS_ERR_OK; @@ -4529,11 +4447,7 @@ static ivas_error rotateFrameMc( { int16_t i; int16_t j; -#ifdef LIB_REND_API_5MS - const float *crossfade; -#else int16_t subframe_idx, subframe_len; -#endif int16_t azimuth, elevation; int16_t is_planar_setup, lfe_idx; int16_t nchan; @@ -4548,21 +4462,6 @@ static ivas_error rotateFrameMc( push_wmops( "rotateFrameMc" ); -#ifdef LIB_REND_API_5MS - if ( inAudio.config.numSamplesPerChannel == L_FRAME48k ) - { - crossfade = headRotData->crossfade_20ms; - } - else if ( inAudio.config.numSamplesPerChannel == L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES ) - { - crossfade = headRotData->crossfade_5ms; - } - else - { - return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "Only 5 and 20 ms framing is supported" ); - } -#endif - if ( inConfig != IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) { if ( ( error = getAudioConfigNumChannels( inConfig, &nchan ) ) != IVAS_ERR_OK ) @@ -4587,13 +4486,10 @@ static ivas_error rotateFrameMc( gains[ch_in][ch_in] = 1.f; } -#ifndef LIB_REND_API_5MS - /* TODO(sgi): @tmu please review changes in this function */ /* subframe loop */ subframe_len = inAudio.config.numSamplesPerChannel / RENDERER_HEAD_POSITIONS_PER_FRAME; for ( subframe_idx = 0; subframe_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; subframe_idx++ ) { -#endif for ( i = 0; i < 3; i++ ) { if ( hCombinedOrientationData != NULL ) @@ -4655,18 +4551,6 @@ static ivas_error rotateFrameMc( { for ( ch_in = 0; ch_in < nchan; ch_in++ ) { -#ifdef LIB_REND_API_5MS - writePtr = getSmplPtr( outAudio, ch_out, 0 ); - readPtr = getSmplPtr( inAudio, ch_in, 0 ); - /* crossfade with previous rotation gains */ - for ( i = 0; i < inAudio.config.numSamplesPerChannel; i++ ) - { - *writePtr++ += - ( *readPtr ) * ( ( 1 - crossfade[i] ) * gains_prev[ch_in][ch_out] ) + - ( *readPtr ) * ( crossfade[i] * gains[ch_in][ch_out] ); - readPtr++; - } -#else writePtr = getSmplPtr( outAudio, ch_out, subframe_idx * subframe_len ); readPtr = getSmplPtr( inAudio, ch_in, subframe_idx * subframe_len ); /* crossfade with previous rotation gains */ @@ -4677,7 +4561,6 @@ static ivas_error rotateFrameMc( ( *readPtr ) * ( headRotData->crossfade[i] * gains[ch_in][ch_out] ); readPtr++; } -#endif } } @@ -4686,9 +4569,7 @@ static ivas_error rotateFrameMc( { mvr2r( gains[i], gains_prev[i], nchan ); } -#ifndef LIB_REND_API_5MS } -#endif pop_wmops(); @@ -4707,11 +4588,7 @@ static ivas_error rotateFrameSba( int16_t i, l, n, m; int16_t m1, m2; int16_t shd_rot_max_order; -#ifdef LIB_REND_API_5MS - const float *crossfade; -#else int16_t subframe_idx, subframe_len; -#endif float *readPtr, *writePtr; rotation_matrix Rmat; float tmpRot[2 * HEADROT_ORDER + 1]; @@ -4720,33 +4597,15 @@ static ivas_error rotateFrameSba( push_wmops( "rotateFrameSba" ); -#ifdef LIB_REND_API_5MS - if ( inAudio.config.numSamplesPerChannel == L_FRAME48k ) - { - crossfade = headRotData->crossfade_20ms; - } - else if ( inAudio.config.numSamplesPerChannel == L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES ) - { - crossfade = headRotData->crossfade_5ms; - } - else - { - return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "Only 5 and 20 ms framing is supported" ); - } -#endif - if ( ( error = getAmbisonicsOrder( inConfig, &shd_rot_max_order ) ) != IVAS_ERR_OK ) { return error; } -#ifndef LIB_REND_API_5MS - /* TODO(sgi): @tmu please review changes in this function */ /* subframe loop */ subframe_len = inAudio.config.numSamplesPerChannel / RENDERER_HEAD_POSITIONS_PER_FRAME; for ( subframe_idx = 0; subframe_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; subframe_idx++ ) { -#endif /* initialize rotation matrices with zeros */ for ( i = 0; i < HEADROT_SHMAT_DIM; i++ ) { @@ -4778,11 +4637,7 @@ static ivas_error rotateFrameSba( /* calculate ambisonics rotation matrices for the previous and current frames */ SHrotmatgen( gains, Rmat, shd_rot_max_order ); -#ifdef LIB_REND_API_5MS - for ( i = 0; i < inAudio.config.numSamplesPerChannel; i++ ) -#else for ( i = 0; i < subframe_len; i++ ) -#endif { /* As the rotation matrix becomes block diagonal in a SH basis, we can*/ /* apply each angular-momentum block individually to save complexity. */ @@ -4799,27 +4654,16 @@ static ivas_error rotateFrameSba( for ( m = m1; m < m2; m++ ) { -#ifdef LIB_REND_API_5MS - readPtr = getSmplPtr( inAudio, m, i ); - /* crossfade with previous rotation gains */ - tmpRot[n - m1] += crossfade[i] * gains[n][m] * ( *readPtr ) + - ( 1 - crossfade[i] ) * gains_prev[n][m] * ( *readPtr ); -#else readPtr = getSmplPtr( inAudio, m, subframe_idx * subframe_len + i ); /* crossfade with previous rotation gains */ tmpRot[n - m1] += headRotData->crossfade[i] * gains[n][m] * ( *readPtr ) + ( 1 - headRotData->crossfade[i] ) * gains_prev[n][m] * ( *readPtr ); -#endif } } /* write back the result */ for ( n = m1; n < m2; n++ ) { -#ifdef LIB_REND_API_5MS - writePtr = getSmplPtr( outAudio, n, i ); -#else writePtr = getSmplPtr( outAudio, n, subframe_idx * subframe_len + i ); -#endif ( *writePtr ) = tmpRot[n - m1]; } m1 = m2; @@ -4847,9 +4691,7 @@ static ivas_error rotateFrameSba( { mvr2r( gains[i], gains_prev[i], HEADROT_SHMAT_DIM ); } -#ifndef LIB_REND_API_5MS } -#endif pop_wmops(); @@ -4892,9 +4734,7 @@ static ivas_error renderIsmToBinauralRoom( { int16_t i; int16_t azi_rot, ele_rot; -#ifndef LIB_REND_API_5MS int16_t subframe_idx, subframe_len; -#endif int16_t tmp; rotation_matrix Rmat; float tmpRendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; @@ -4943,12 +4783,10 @@ static ivas_error renderIsmToBinauralRoom( if ( combinedOrientationEnabled ) { -#ifndef LIB_REND_API_5MS subframe_len = ismInput->base.inputBuffer.config.numSamplesPerChannel / RENDERER_HEAD_POSITIONS_PER_FRAME; // for ( subframe_idx = 0; subframe_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; subframe_idx++ ) for ( subframe_idx = 0; subframe_idx < 1; subframe_idx++ ) { -#endif for ( i = 0; i < 3; i++ ) { #ifdef API_5MS @@ -4976,10 +4814,8 @@ static ivas_error renderIsmToBinauralRoom( Rmat[i][i] = 1.0f; } } -#ifndef LIB_REND_API_5MS } (void) subframe_len; // avoid warning -#endif } /* TODO tmu : see issue #518 */ @@ -6464,10 +6300,6 @@ static ivas_error renderActiveInputsMasa( if ( getAudioConfigType( hIvasRend->outputConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL && pCurrentInput->decDummy->hHeadTrackData != NULL ) { -#ifdef LIB_REND_API_5MS - pCurrentInput->decDummy->hHeadTrackData->Quaternion = hIvasRend->headRotData.headPosition; - pCurrentInput->decDummy->hHeadTrackData->Pos = hIvasRend->headRotData.Pos; -#else for ( sf_idx = 0; sf_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; ++sf_idx ) { #ifdef API_5MS @@ -6479,7 +6311,6 @@ static ivas_error renderActiveInputsMasa( pCurrentInput->decDummy->hHeadTrackData->Pos[sf_idx] = hIvasRend->headRotData.Pos[sf_idx]; #endif } -#endif } if ( ( error = renderInputMasa( pCurrentInput, hIvasRend->outputConfig, outAudio ) ) != IVAS_ERR_OK ) diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index 701e0d5062..d8d6127b20 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -247,21 +247,9 @@ int16_t IVAS_REND_FeedRenderConfig( ivas_error IVAS_REND_SetHeadRotation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ -#ifdef LIB_REND_API_5MS - const IVAS_QUATERNION headRot, /* i : head orientations for next rendering call */ - const IVAS_VECTOR3 Pos /* i : listener positions for next rendering call */ -#else const IVAS_QUATERNION headRot[RENDERER_HEAD_POSITIONS_PER_FRAME], /* i : head orientations for next rendering call */ const IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME] /* i : listener positions for next rendering call */ -#endif -); - -#ifdef LIB_REND_API_5MS -/* Head rotation becomes enabled by calling IVAS_REND_SetHeadRotation. Use this to disable. */ -ivas_error IVAS_REND_DisableHeadRotation( - IVAS_REND_HANDLE hIvasRend /* i/o: Renderer handle */ ); -#endif ivas_error IVAS_REND_SetOrientationTrackingMode( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ @@ -292,17 +280,10 @@ ivas_error IVAS_REND_SetReferenceVector( ivas_error IVAS_REND_SetExternalOrientation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ IVAS_QUATERNION *orientation, /* i : external orientation data */ -#ifdef LIB_REND_API_5MS - int8_t enableHeadRotation, /* i : flag to enable head rotation for this frame */ - int8_t enableExternalOrientation, /* i : flag to enable external orientation for this frame */ - int8_t enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ - int16_t numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ -#else int8_t *enableHeadRotation, /* i : flag to enable head rotation for this frame */ int8_t *enableExternalOrientation, /* i : flag to enable external orientation for this frame */ int8_t *enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ int16_t *numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ -#endif ); ivas_error IVAS_REND_CombineHeadAndExternalOrientation( @@ -311,7 +292,7 @@ ivas_error IVAS_REND_CombineHeadAndExternalOrientation( ivas_error IVAS_REND_GetCombinedOrientation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - IVAS_QUATERNION *pOrientation /* i/o: Quaternion pointer processed orientation */ + IVAS_QUATERNION *pRotation /* i/o: Quaternion pointer processed orientation */ ); ivas_error IVAS_REND_GetMasaMetadata( -- GitLab From ffc8eb1a0f76e13a734dbe9056582957bf588105 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 16 Jun 2023 09:39:16 +0200 Subject: [PATCH 014/175] Revert "[tmp] Revert "Remove RENDERER_HEAD_POSITIONS_PER_FRAME - code compiles, but untested"" This reverts commit 6e1fe92ff2cf0a510017bb86ab4b6f72b3ffd7cd. --- apps/renderer.c | 170 +++++++++++++++++++++++++++++------ lib_com/common_api_types.h | 2 + lib_com/options.h | 1 + lib_rend/ivas_prot_rend.h | 4 + lib_rend/ivas_rotation.c | 69 +++++++++++++++ lib_rend/ivas_stat_rend.h | 7 ++ lib_rend/lib_rend.c | 175 ++++++++++++++++++++++++++++++++++++- lib_rend/lib_rend.h | 21 ++++- 8 files changed, 418 insertions(+), 31 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index 760065be91..9be54daca5 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -157,6 +157,9 @@ typedef struct float lfeConfigElevation; bool lfeCustomRoutingEnabled; char inLfePanningMatrixFile[RENDERER_MAX_CLI_ARG_LENGTH]; +#ifdef LIB_REND_API_5MS + bool framing_5ms; +#endif } CmdlnArgs; typedef enum @@ -181,6 +184,9 @@ typedef enum CmdLnOptionId_inputGain, CmdLnOptionId_referenceVectorFile, CmdLnOptionId_exteriorOrientationFile, +#ifdef LIB_REND_API_5MS + CmdLnOptionId_framing5ms, +#endif } CmdLnOptionId; static const CmdLnParser_Option cliOptions[] = { @@ -302,6 +308,14 @@ static const CmdLnParser_Option cliOptions[] = { .matchShort = "exof", .description = "External orientation trajectory file for simulation of external orientations", }, +#ifdef LIB_REND_API_5MS + { + .id = CmdLnOptionId_framing5ms, + .match = "framing_5ms", + .matchShort = "fr5", + .description = "Process audio with 5 ms framing. Time resolution of metadata (e.g. ISM positions) remains unchanged w.r.t. 20 ms framing", + }, +#endif }; @@ -560,7 +574,9 @@ int main( int32_t delayTimeScale = 0; int16_t i, numChannels; ivas_error error = IVAS_ERR_OK; +#ifndef LIB_REND_API_5MS IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; +#endif #ifdef WMOPS reset_wmops(); @@ -733,7 +749,13 @@ int main( fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } - const int16_t frameSize_smpls = (int16_t) ( 20 * args.sampleRate / 1000 ); + const int16_t frameSize_smpls = (int16_t) ( +#ifdef LIB_REND_API_5MS + ( args.framing_5ms ? 5 : 20 ) +#else + 20 +#endif + * args.sampleRate / 1000 ); IVAS_REND_InputId mcIds[RENDERER_MAX_MC_INPUTS] = { 0 }; IVAS_REND_InputId ismIds[RENDERER_MAX_ISM_INPUTS] = { 0 }; @@ -1019,10 +1041,17 @@ int main( fprintf( stdout, "\n\n-- Start the renderer (quiet mode) --\n\n" ); } +#ifdef LIB_REND_API_5MS + ObjectPositionBuffer mtdBuffer; +#endif + while ( 1 ) { int16_t num_in_channels; num_in_channels = inBuffer.config.numChannels; +#ifdef LIB_REND_API_5MS + const bool isCurrentFrameMultipleOf20ms = !args.framing_5ms || frame % 4 == 0; +#endif /* Read the input data */ if ( ( error = AudioFileReader_read( audioReader, inpInt16Buffer, (int16_t) inBufferSize, &numSamplesRead ) ) != IVAS_ERR_OK ) @@ -1040,50 +1069,85 @@ int main( /* Convert from int to float and from interleaved to packed */ convertInputBuffer( inpInt16Buffer, numSamplesRead, frameSize_smpls, num_in_channels, inFloatBuffer ); - +#ifdef LIB_REND_API_5MS + if ( isCurrentFrameMultipleOf20ms ) + { +#else ObjectPositionBuffer mtdBuffer; - IsmPositionProvider_getNextFrame( positionProvider, &mtdBuffer ); +#endif + IsmPositionProvider_getNextFrame( positionProvider, &mtdBuffer ); - if ( referenceVectorReader != NULL ) - { - IVAS_VECTOR3 listenerPos, refPos; - if ( ( error = Vector3PairFileReader_read( referenceVectorReader, &listenerPos, &refPos ) ) != IVAS_ERR_OK ) + if ( referenceVectorReader != NULL ) { - fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); - exit( -1 ); + IVAS_VECTOR3 listenerPos, refPos; + if ( ( error = Vector3PairFileReader_read( referenceVectorReader, &listenerPos, &refPos ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + if ( ( error = IVAS_REND_SetReferenceVector( hIvasRend, listenerPos, refPos ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } } - if ( ( error = IVAS_REND_SetReferenceVector( hIvasRend, listenerPos, refPos ) ) != IVAS_ERR_OK ) + /* Read from reference rotation trajectory file if specified */ + if ( referenceRotReader != NULL ) { - fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); - exit( -1 ); + IVAS_QUATERNION quaternion; + if ( ( error = HeadRotationFileReading( referenceRotReader, &quaternion, NULL ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + + if ( ( error = IVAS_REND_SetReferenceRotation( hIvasRend, quaternion ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error setting Reference Rotation: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } } +#ifdef LIB_REND_API_5MS } - /* Read from reference rotation trajectory file if specified */ - if ( referenceRotReader != NULL ) +#endif + + /* Read from head rotation trajectory file if specified */ + if ( headRotReader != NULL ) { - IVAS_QUATERNION quaternion; - if ( ( error = HeadRotationFileReading( referenceRotReader, &quaternion, NULL ) ) != IVAS_ERR_OK ) +#ifdef LIB_REND_API_5MS + IVAS_QUATERNION headRot; + IVAS_VECTOR3 Pos; + + if ( ( error = HeadRotationFileReading( headRotReader, &headRot, &Pos ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } - - if ( ( error = IVAS_REND_SetReferenceRotation( hIvasRend, quaternion ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_REND_SetHeadRotation( hIvasRend, headRot, Pos ) ) != IVAS_ERR_OK ) { - fprintf( stderr, "Error setting Reference Rotation: %s\n", ivas_error_to_string( error ) ); + fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } - } - /* Read from head rotation trajectory file if specified */ - if ( headRotReader != NULL ) - { - IVAS_QUATERNION quatBuffer[RENDERER_HEAD_POSITIONS_PER_FRAME]; - - for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) + if ( !args.framing_5ms ) { - if ( ( error = HeadRotationFileReading( headRotReader, &quatBuffer[i], &Pos[i] ) ) != IVAS_ERR_OK ) + /* Skip over 3 following head positions - they are given on 5ms grid */ + for ( int16_t i = 0; i < 3; ++i ) + { + if ( ( error = HeadRotationFileReading( headRotReader, &headRot, &Pos ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + } + } +#else + IVAS_QUATERNION quatBuffer[RENDERER_HEAD_POSITIONS_PER_FRAME]; + + for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) { + if ( ( error = HeadRotationFileReading( headRotReader, &quatBuffer[i], &Pos[i] ) ) != IVAS_ERR_OK ) + { fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } @@ -1093,20 +1157,61 @@ int main( fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } +#endif } else { +#ifdef LIB_REND_API_5MS + if ( ( error = IVAS_REND_DisableHeadRotation( hIvasRend ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error disabling head rotation: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } +#else error = IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ); if ( error != IVAS_ERR_OK && error != IVAS_ERR_INVALID_OUTPUT_FORMAT ) { fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } +#endif } /* Read from external orientation file if specified */ if ( externalOrientationFileReader != NULL ) { +#ifdef LIB_REND_API_5MS + IVAS_QUATERNION quat; + int8_t enableHeadRotation; + int8_t enableExternalOrientation; + int8_t enableRotationInterpolation; + int16_t numFramesToTargetOrientation; + + if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &quat, &enableHeadRotation, &enableExternalOrientation, &enableRotationInterpolation, &numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error in External Orientation File Reading: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + + if ( ( error = IVAS_REND_SetExternalOrientation( hIvasRend, &quat, enableHeadRotation, enableExternalOrientation, enableRotationInterpolation, numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error setting External Orientation: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + + if ( !args.framing_5ms ) + { + /* Skip over 3 following entries in file - they are given on 5ms grid */ + for ( int16_t i = 0; i < 3; ++i ) + { + if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &quat, &enableHeadRotation, &enableExternalOrientation, &enableRotationInterpolation, &numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error in External Orientation File Reading: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + } + } +#else IVAS_QUATERNION quatBuffer[RENDERER_HEAD_POSITIONS_PER_FRAME]; int8_t enableHeadRotation[RENDERER_HEAD_POSITIONS_PER_FRAME]; int8_t enableExternalOrientation[RENDERER_HEAD_POSITIONS_PER_FRAME]; @@ -1127,6 +1232,7 @@ int main( fprintf( stderr, "Error setting External Orientation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } +#endif } /* Combine external orientations and head rotation */ @@ -1281,6 +1387,7 @@ int main( delayNumSamples -= (int16_t) outBufferSize; } + /* TODO(sgi): Masa output most likely broken with 5ms framing */ /* Write MASA metadata for MASA outputs */ if ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_MASA1 || args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_MASA2 ) { @@ -1900,6 +2007,9 @@ static CmdlnArgs defaultArgs( args.lfeCustomRoutingEnabled = false; clearString( args.inLfePanningMatrixFile ); +#ifdef LIB_REND_API_5MS + args.framing_5ms = false; +#endif return args; } @@ -2029,6 +2139,12 @@ static void parseOption( exit( -1 ); } break; +#ifdef LIB_REND_API_5MS + case CmdLnOptionId_framing5ms: + assert( numOptionValues == 0 ); + args->framing_5ms = false; + break; +#endif default: assert( 0 && "This should be unreachable - all command line options should be explicitly handled." ); break; diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index 2dc926dfc2..49c6f395fd 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -50,7 +50,9 @@ #define IVAS_CLDFB_NO_CHANNELS_MAX ( 60 ) #define IVAS_MAX_INPUT_LFE_CHANNELS 4 +#ifndef LIB_REND_API_5MS #define RENDERER_HEAD_POSITIONS_PER_FRAME 4 +#endif /*----------------------------------------------------------------------------------* diff --git a/lib_com/options.h b/lib_com/options.h index 6e3e1010c2..544100fb35 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -159,6 +159,7 @@ #define FIX_XXX_TDOBJRENDERER_INPUT #define FIX_XXX_ISM_SBA_ASAN #define API_5MS +#define LIB_REND_API_5MS /* FhG: Adds 5ms framing capability to lib_rend */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 29a5ace8f4..8d987a3f3c 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -857,7 +857,11 @@ ivas_error combine_external_and_head_orientations_rend( ); ivas_error combine_external_and_head_orientations( +#ifdef LIB_REND_API_5MS + IVAS_QUATERNION *headRotQuaternion, /* i : quaternion for head rotation */ +#else IVAS_QUATERNION *headRotQuaternions, /* i : quaternions for head rotation */ +#endif IVAS_VECTOR3 *listenerPos, /* i : listener position */ #ifndef API_5MS int16_t numHeadRotQuaternions, /* i : number of head rotation quaternions */ diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index efd281ce84..f01120ddc0 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -902,7 +902,11 @@ ivas_error combine_external_and_head_orientations_dec( #endif } #ifdef API_5MS +#ifdef LIB_REND_API_5MS return combine_external_and_head_orientations( headRotQuaternions, listenerPos, hExtOrientationData, hCombinedOrientationData ); +#else + return combine_external_and_head_orientations( headRotQuaternions, listenerPos, hExtOrientationData, hCombinedOrientationData ); +#endif #else return combine_external_and_head_orientations( headRotQuaternions, listenerPos, numHeadRotQuaternions, hExtOrientationData, hCombinedOrientationData ); #endif @@ -932,8 +936,13 @@ ivas_error combine_external_and_head_orientations_rend( { if ( hHeadTrackData->headRotEnabled ) { +#ifdef LIB_REND_API_5MS + headRotQuaternions = &hHeadTrackData->headPosition; + listenerPos = &hHeadTrackData->Pos; +#else headRotQuaternions = hHeadTrackData->headPositions; listenerPos = hHeadTrackData->Pos; +#endif } } else if ( hExtOrientationData != NULL ) @@ -971,7 +980,11 @@ ivas_error combine_external_and_head_orientations_rend( *------------------------------------------------------------------------*/ ivas_error combine_external_and_head_orientations( +#ifdef LIB_REND_API_5MS + IVAS_QUATERNION *headRotQuaternion, /* i : quaternion for head rotation */ +#else IVAS_QUATERNION *headRotQuaternions, /* i : quaternions for head rotation */ +#endif IVAS_VECTOR3 *listenerPos, /* i : listener position */ #ifndef API_5MS int16_t numHeadRotQuaternions, /* i : number of head rotation quaternions */ @@ -994,7 +1007,11 @@ ivas_error combine_external_and_head_orientations( /* Form combined orientations or return if no data available */ if ( hCombinedOrientationData == NULL ) { +#ifdef LIB_REND_API_5MS + if ( headRotQuaternion != NULL || hExtOrientationData != NULL ) +#else if ( headRotQuaternions != NULL || hExtOrientationData != NULL ) +#endif { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } @@ -1003,7 +1020,11 @@ ivas_error combine_external_and_head_orientations( return IVAS_ERR_OK; } } +#ifdef LIB_REND_API_5MS + else if ( headRotQuaternion == NULL && hExtOrientationData == NULL ) +#else else if ( headRotQuaternions == NULL && hExtOrientationData == NULL ) +#endif { /* Reset the combined orientations and rotations */ hCombinedOrientationData->isInterpolationOngoing = FALSE; @@ -1037,11 +1058,19 @@ ivas_error combine_external_and_head_orientations( } #endif } +#ifdef LIB_REND_API_5MS + else if ( hExtOrientationData == NULL && headRotQuaternion != NULL ) +#else else if ( hExtOrientationData == NULL && headRotQuaternions != NULL ) +#endif { /* Head rotation only */ #ifdef API_5MS +#ifdef LIB_REND_API_5MS + hCombinedOrientationData->Quaternion = *headRotQuaternion; +#else hCombinedOrientationData->Quaternion = *headRotQuaternions; +#endif #else if ( numHeadRotQuaternions >= 0 ) @@ -1130,7 +1159,11 @@ ivas_error combine_external_and_head_orientations( #endif } +#ifdef LIB_REND_API_5MS + if ( hExtOrientationData != NULL && headRotQuaternion != NULL ) +#else if ( hExtOrientationData != NULL && headRotQuaternions != NULL ) +#endif { /* Combine head and external orientations */ #ifdef API_5MS @@ -1140,11 +1173,19 @@ ivas_error combine_external_and_head_orientations( { if ( hExtOrientationData->enableExternalOrientation > 0 ) { +#ifdef LIB_REND_API_5MS + QuaternionProduct( hCombinedOrientationData->Quaternion, *headRotQuaternion, &hCombinedOrientationData->Quaternion ); +#else QuaternionProduct( hCombinedOrientationData->Quaternion, *headRotQuaternions, &hCombinedOrientationData->Quaternion ); +#endif } else { +#ifdef LIB_REND_API_5MS + hCombinedOrientationData->Quaternion = *headRotQuaternion; +#else hCombinedOrientationData->Quaternion = *headRotQuaternions; +#endif } } /* Use the freezed head rotation */ @@ -1203,7 +1244,11 @@ ivas_error combine_external_and_head_orientations( #endif } +#ifdef LIB_REND_API_5MS + if ( headRotQuaternion != NULL || hExtOrientationData != NULL ) +#else if ( headRotQuaternions != NULL || hExtOrientationData != NULL ) +#endif { /* Calculate the combined rotation matrix */ #ifdef API_5MS @@ -1243,14 +1288,22 @@ ivas_error combine_external_and_head_orientations( } #endif } +#ifdef LIB_REND_API_5MS + if ( headRotQuaternion != NULL ) +#else if ( headRotQuaternions != NULL ) +#endif { #ifdef API_5MS if ( hExtOrientationData != NULL ) { if ( hExtOrientationData->enableHeadRotation > 0 ) { +#ifdef LIB_REND_API_5MS + hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternion; +#else hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternions; +#endif } else { @@ -1259,7 +1312,11 @@ ivas_error combine_external_and_head_orientations( } else { +#ifdef LIB_REND_API_5MS + hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternion; +#else hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternions; +#endif } hCombinedOrientationData->listenerPos = *listenerPos; @@ -1294,7 +1351,11 @@ ivas_error combine_external_and_head_orientations( } /* Check if combined orientation is enabled */ +#ifdef LIB_REND_API_5MS + if ( headRotQuaternion != NULL && hExtOrientationData == NULL ) +#else if ( headRotQuaternions != NULL && hExtOrientationData == NULL ) +#endif { #ifdef API_5MS hCombinedOrientationData->enableCombinedOrientation = 1; @@ -1313,7 +1374,11 @@ ivas_error combine_external_and_head_orientations( } #endif } +#ifdef LIB_REND_API_5MS + else if ( headRotQuaternion == NULL && hExtOrientationData != NULL ) +#else else if ( headRotQuaternions == NULL && hExtOrientationData != NULL ) +#endif { #ifdef API_5MS if ( hExtOrientationData->enableExternalOrientation > 0 ) @@ -1338,7 +1403,11 @@ ivas_error combine_external_and_head_orientations( } #endif } +#ifdef LIB_REND_API_5MS + else if ( headRotQuaternion != NULL && hExtOrientationData != NULL ) +#else else if ( headRotQuaternions != NULL && hExtOrientationData != NULL ) +#endif { #ifdef API_5MS if ( hExtOrientationData->enableExternalOrientation > 0 || hExtOrientationData->enableHeadRotation > 0 ) diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index 14de5e7d55..7306c45e99 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -248,9 +248,16 @@ typedef struct ivas_orient_trk_state_t typedef struct { int8_t headRotEnabled; +#ifdef LIB_REND_API_5MS + IVAS_QUATERNION headPosition; + IVAS_VECTOR3 Pos; + float crossfade_5ms[L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES]; + float crossfade_20ms[L_FRAME48k]; +#else IVAS_QUATERNION headPositions[RENDERER_HEAD_POSITIONS_PER_FRAME]; IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; float crossfade[L_FRAME48k / RENDERER_HEAD_POSITIONS_PER_FRAME]; +#endif ivas_orient_trk_state_t *hOrientationTracker; } IVAS_REND_HeadRotData; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 89b51e7745..6f6b32de1b 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -930,6 +930,25 @@ static ivas_error initHeadRotation( /* Head rotation is enabled by default */ hIvasRend->headRotData.headRotEnabled = 1; +#ifdef LIB_REND_API_5MS + /* Initialize 5ms crossfade */ + crossfade_len = L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES; /* TODO(sgi): @tmu why do we assume 48 kHz here? */ + tmp = 1.f / ( crossfade_len - 1 ); + for ( i = 0; i < crossfade_len; i++ ) + { + hIvasRend->headRotData.crossfade_5ms[i] = i * tmp; + } + /* Initialize 20ms crossfade */ + crossfade_len = L_FRAME48k; /* TODO(sgi): @tmu why do we assume 48 kHz here? */ + tmp = 1.f / ( crossfade_len - 1 ); + for ( i = 0; i < crossfade_len; i++ ) + { + hIvasRend->headRotData.crossfade_20ms[i] = i * tmp; + } + + /* Initialize with unit quaternion */ + hIvasRend->headRotData.headPosition = quaternionInit(); +#else /* Initialize 5ms crossfade */ crossfade_len = L_FRAME48k / RENDERER_HEAD_POSITIONS_PER_FRAME; tmp = 1.f / ( crossfade_len - 1 ); @@ -943,6 +962,7 @@ static ivas_error initHeadRotation( { hIvasRend->headRotData.headPositions[i] = quaternionInit(); } +#endif if ( ( hIvasRend->headRotData.hOrientationTracker = (ivas_orient_trk_state_t *) malloc( sizeof( ivas_orient_trk_state_t ) ) ) == NULL ) { @@ -4063,12 +4083,19 @@ int16_t IVAS_REND_FeedRenderConfig( *-------------------------------------------------------------------*/ ivas_error IVAS_REND_SetHeadRotation( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ +#ifdef LIB_REND_API_5MS + const IVAS_QUATERNION headRot, /* i : head orientations for next rendering call */ + const IVAS_VECTOR3 Pos /* i : listener positions for next rendering call */ +#else const IVAS_QUATERNION headRot[RENDERER_HEAD_POSITIONS_PER_FRAME], /* i : head orientations for next rendering call */ const IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME] /* i : listener positions for next rendering call */ +#endif ) { +#ifndef LIB_REND_API_5MS int16_t i; +#endif IVAS_QUATERNION rotQuat; /* Validate function arguments */ @@ -4083,6 +4110,20 @@ ivas_error IVAS_REND_SetHeadRotation( return IVAS_ERR_INVALID_OUTPUT_FORMAT; } +#ifdef LIB_REND_API_5MS + /* check for Euler angle signaling */ + if ( headRot.w == -3.0f ) + { + Euler2Quat( deg2rad( headRot.x ), deg2rad( headRot.y ), deg2rad( headRot.z ), &rotQuat ); + } + else + { + rotQuat = headRot; + } + + ivas_orient_trk_Process( hIvasRend->headRotData.hOrientationTracker, rotQuat, FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &hIvasRend->headRotData.headPosition ); + hIvasRend->headRotData.Pos = Pos; +#else if ( headRot == NULL ) { hIvasRend->headRotData.headRotEnabled = 0; @@ -4106,10 +4147,27 @@ ivas_error IVAS_REND_SetHeadRotation( hIvasRend->headRotData.Pos[i] = Pos[i]; } } +#endif return IVAS_ERR_OK; } +#ifdef LIB_REND_API_5MS +ivas_error IVAS_REND_DisableHeadRotation( + IVAS_REND_HANDLE hIvasRend /* i/o: Renderer handle */ +) +{ + /* Validate function arguments */ + if ( hIvasRend == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + + hIvasRend->headRotData.headRotEnabled = 0; + return IVAS_ERR_OK; +} +#endif + /*-------------------------------------------------------------------* * IVAS_REND_SetOrientationTrackingMode() @@ -4237,15 +4295,24 @@ ivas_error IVAS_REND_SetReferenceVector( *---------------------------------------------------------------------*/ ivas_error IVAS_REND_SetExternalOrientation( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - IVAS_QUATERNION *orientation, /* i : external orientation data */ + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_QUATERNION *orientation, /* i : external orientation data */ +#ifdef LIB_REND_API_5MS + int8_t enableHeadRotation, /* i : flag to enable head rotation for this frame */ + int8_t enableExternalOrientation, /* i : flag to enable external orientation for this frame */ + int8_t enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ + int16_t numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ /* TODO(sgi): make independent of framing */ +#else int8_t *enableHeadRotation, /* i : flag to enable head rotation for this frame */ int8_t *enableExternalOrientation, /* i : flag to enable external orientation for this frame */ int8_t *enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ int16_t *numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ +#endif ) { +#ifndef LIB_REND_API_5MS int16_t i; +#endif /* Validate function arguments */ if ( hIvasRend == NULL || hIvasRend->hExternalOrientationData == NULL ) @@ -4266,6 +4333,14 @@ ivas_error IVAS_REND_SetExternalOrientation( } else { +#ifdef LIB_REND_API_5MS + QuaternionInverse( *orientation, &hIvasRend->hExternalOrientationData->Quaternion ); + + hIvasRend->hExternalOrientationData->enableHeadRotation = enableHeadRotation; + hIvasRend->hExternalOrientationData->enableExternalOrientation = enableExternalOrientation; + hIvasRend->hExternalOrientationData->enableRotationInterpolation = enableRotationInterpolation; + hIvasRend->hExternalOrientationData->numFramesToTargetOrientation = numFramesToTargetOrientation; +#else for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; ++i ) { #ifdef API_5MS @@ -4285,6 +4360,7 @@ ivas_error IVAS_REND_SetExternalOrientation( hIvasRend->hExternalOrientationData->numFramesToTargetOrientation[i] = numFramesToTargetOrientation[i]; #endif } +#endif } return IVAS_ERR_OK; @@ -4321,7 +4397,9 @@ ivas_error IVAS_REND_GetCombinedOrientation( IVAS_QUATERNION *pOrientation /* i/o: Quaternion pointer processed orientation */ ) { +#ifndef LIB_REND_API_5MS int16_t i; +#endif if ( hIvasRend == NULL || pOrientation == NULL ) { @@ -4330,6 +4408,9 @@ ivas_error IVAS_REND_GetCombinedOrientation( if ( hIvasRend->hCombinedOrientationData != NULL ) { +#ifdef LIB_REND_API_5MS + *pOrientation = hIvasRend->hCombinedOrientationData->Quaternion; +#else for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; ++i ) { #ifdef API_5MS @@ -4339,6 +4420,7 @@ ivas_error IVAS_REND_GetCombinedOrientation( pOrientation[i] = hIvasRend->hCombinedOrientationData->Quaternions[i]; #endif } +#endif } return IVAS_ERR_OK; @@ -4447,7 +4529,11 @@ static ivas_error rotateFrameMc( { int16_t i; int16_t j; +#ifdef LIB_REND_API_5MS + const float *crossfade; +#else int16_t subframe_idx, subframe_len; +#endif int16_t azimuth, elevation; int16_t is_planar_setup, lfe_idx; int16_t nchan; @@ -4462,6 +4548,21 @@ static ivas_error rotateFrameMc( push_wmops( "rotateFrameMc" ); +#ifdef LIB_REND_API_5MS + if ( inAudio.config.numSamplesPerChannel == L_FRAME48k ) + { + crossfade = headRotData->crossfade_20ms; + } + else if ( inAudio.config.numSamplesPerChannel == L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES ) + { + crossfade = headRotData->crossfade_5ms; + } + else + { + return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "Only 5 and 20 ms framing is supported" ); + } +#endif + if ( inConfig != IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) { if ( ( error = getAudioConfigNumChannels( inConfig, &nchan ) ) != IVAS_ERR_OK ) @@ -4486,10 +4587,13 @@ static ivas_error rotateFrameMc( gains[ch_in][ch_in] = 1.f; } +#ifndef LIB_REND_API_5MS + /* TODO(sgi): @tmu please review changes in this function */ /* subframe loop */ subframe_len = inAudio.config.numSamplesPerChannel / RENDERER_HEAD_POSITIONS_PER_FRAME; for ( subframe_idx = 0; subframe_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; subframe_idx++ ) { +#endif for ( i = 0; i < 3; i++ ) { if ( hCombinedOrientationData != NULL ) @@ -4551,6 +4655,18 @@ static ivas_error rotateFrameMc( { for ( ch_in = 0; ch_in < nchan; ch_in++ ) { +#ifdef LIB_REND_API_5MS + writePtr = getSmplPtr( outAudio, ch_out, 0 ); + readPtr = getSmplPtr( inAudio, ch_in, 0 ); + /* crossfade with previous rotation gains */ + for ( i = 0; i < inAudio.config.numSamplesPerChannel; i++ ) + { + *writePtr++ += + ( *readPtr ) * ( ( 1 - crossfade[i] ) * gains_prev[ch_in][ch_out] ) + + ( *readPtr ) * ( crossfade[i] * gains[ch_in][ch_out] ); + readPtr++; + } +#else writePtr = getSmplPtr( outAudio, ch_out, subframe_idx * subframe_len ); readPtr = getSmplPtr( inAudio, ch_in, subframe_idx * subframe_len ); /* crossfade with previous rotation gains */ @@ -4561,6 +4677,7 @@ static ivas_error rotateFrameMc( ( *readPtr ) * ( headRotData->crossfade[i] * gains[ch_in][ch_out] ); readPtr++; } +#endif } } @@ -4569,7 +4686,9 @@ static ivas_error rotateFrameMc( { mvr2r( gains[i], gains_prev[i], nchan ); } +#ifndef LIB_REND_API_5MS } +#endif pop_wmops(); @@ -4588,7 +4707,11 @@ static ivas_error rotateFrameSba( int16_t i, l, n, m; int16_t m1, m2; int16_t shd_rot_max_order; +#ifdef LIB_REND_API_5MS + const float *crossfade; +#else int16_t subframe_idx, subframe_len; +#endif float *readPtr, *writePtr; rotation_matrix Rmat; float tmpRot[2 * HEADROT_ORDER + 1]; @@ -4597,15 +4720,33 @@ static ivas_error rotateFrameSba( push_wmops( "rotateFrameSba" ); +#ifdef LIB_REND_API_5MS + if ( inAudio.config.numSamplesPerChannel == L_FRAME48k ) + { + crossfade = headRotData->crossfade_20ms; + } + else if ( inAudio.config.numSamplesPerChannel == L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES ) + { + crossfade = headRotData->crossfade_5ms; + } + else + { + return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "Only 5 and 20 ms framing is supported" ); + } +#endif + if ( ( error = getAmbisonicsOrder( inConfig, &shd_rot_max_order ) ) != IVAS_ERR_OK ) { return error; } +#ifndef LIB_REND_API_5MS + /* TODO(sgi): @tmu please review changes in this function */ /* subframe loop */ subframe_len = inAudio.config.numSamplesPerChannel / RENDERER_HEAD_POSITIONS_PER_FRAME; for ( subframe_idx = 0; subframe_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; subframe_idx++ ) { +#endif /* initialize rotation matrices with zeros */ for ( i = 0; i < HEADROT_SHMAT_DIM; i++ ) { @@ -4637,7 +4778,11 @@ static ivas_error rotateFrameSba( /* calculate ambisonics rotation matrices for the previous and current frames */ SHrotmatgen( gains, Rmat, shd_rot_max_order ); +#ifdef LIB_REND_API_5MS + for ( i = 0; i < inAudio.config.numSamplesPerChannel; i++ ) +#else for ( i = 0; i < subframe_len; i++ ) +#endif { /* As the rotation matrix becomes block diagonal in a SH basis, we can*/ /* apply each angular-momentum block individually to save complexity. */ @@ -4654,16 +4799,27 @@ static ivas_error rotateFrameSba( for ( m = m1; m < m2; m++ ) { +#ifdef LIB_REND_API_5MS + readPtr = getSmplPtr( inAudio, m, i ); + /* crossfade with previous rotation gains */ + tmpRot[n - m1] += crossfade[i] * gains[n][m] * ( *readPtr ) + + ( 1 - crossfade[i] ) * gains_prev[n][m] * ( *readPtr ); +#else readPtr = getSmplPtr( inAudio, m, subframe_idx * subframe_len + i ); /* crossfade with previous rotation gains */ tmpRot[n - m1] += headRotData->crossfade[i] * gains[n][m] * ( *readPtr ) + ( 1 - headRotData->crossfade[i] ) * gains_prev[n][m] * ( *readPtr ); +#endif } } /* write back the result */ for ( n = m1; n < m2; n++ ) { +#ifdef LIB_REND_API_5MS + writePtr = getSmplPtr( outAudio, n, i ); +#else writePtr = getSmplPtr( outAudio, n, subframe_idx * subframe_len + i ); +#endif ( *writePtr ) = tmpRot[n - m1]; } m1 = m2; @@ -4691,7 +4847,9 @@ static ivas_error rotateFrameSba( { mvr2r( gains[i], gains_prev[i], HEADROT_SHMAT_DIM ); } +#ifndef LIB_REND_API_5MS } +#endif pop_wmops(); @@ -4734,7 +4892,9 @@ static ivas_error renderIsmToBinauralRoom( { int16_t i; int16_t azi_rot, ele_rot; +#ifndef LIB_REND_API_5MS int16_t subframe_idx, subframe_len; +#endif int16_t tmp; rotation_matrix Rmat; float tmpRendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; @@ -4783,10 +4943,12 @@ static ivas_error renderIsmToBinauralRoom( if ( combinedOrientationEnabled ) { +#ifndef LIB_REND_API_5MS subframe_len = ismInput->base.inputBuffer.config.numSamplesPerChannel / RENDERER_HEAD_POSITIONS_PER_FRAME; // for ( subframe_idx = 0; subframe_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; subframe_idx++ ) for ( subframe_idx = 0; subframe_idx < 1; subframe_idx++ ) { +#endif for ( i = 0; i < 3; i++ ) { #ifdef API_5MS @@ -4814,8 +4976,10 @@ static ivas_error renderIsmToBinauralRoom( Rmat[i][i] = 1.0f; } } +#ifndef LIB_REND_API_5MS } (void) subframe_len; // avoid warning +#endif } /* TODO tmu : see issue #518 */ @@ -6300,6 +6464,10 @@ static ivas_error renderActiveInputsMasa( if ( getAudioConfigType( hIvasRend->outputConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL && pCurrentInput->decDummy->hHeadTrackData != NULL ) { +#ifdef LIB_REND_API_5MS + pCurrentInput->decDummy->hHeadTrackData->Quaternion = hIvasRend->headRotData.headPosition; + pCurrentInput->decDummy->hHeadTrackData->Pos = hIvasRend->headRotData.Pos; +#else for ( sf_idx = 0; sf_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; ++sf_idx ) { #ifdef API_5MS @@ -6311,6 +6479,7 @@ static ivas_error renderActiveInputsMasa( pCurrentInput->decDummy->hHeadTrackData->Pos[sf_idx] = hIvasRend->headRotData.Pos[sf_idx]; #endif } +#endif } if ( ( error = renderInputMasa( pCurrentInput, hIvasRend->outputConfig, outAudio ) ) != IVAS_ERR_OK ) diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index d8d6127b20..701e0d5062 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -247,9 +247,21 @@ int16_t IVAS_REND_FeedRenderConfig( ivas_error IVAS_REND_SetHeadRotation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ +#ifdef LIB_REND_API_5MS + const IVAS_QUATERNION headRot, /* i : head orientations for next rendering call */ + const IVAS_VECTOR3 Pos /* i : listener positions for next rendering call */ +#else const IVAS_QUATERNION headRot[RENDERER_HEAD_POSITIONS_PER_FRAME], /* i : head orientations for next rendering call */ const IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME] /* i : listener positions for next rendering call */ +#endif +); + +#ifdef LIB_REND_API_5MS +/* Head rotation becomes enabled by calling IVAS_REND_SetHeadRotation. Use this to disable. */ +ivas_error IVAS_REND_DisableHeadRotation( + IVAS_REND_HANDLE hIvasRend /* i/o: Renderer handle */ ); +#endif ivas_error IVAS_REND_SetOrientationTrackingMode( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ @@ -280,10 +292,17 @@ ivas_error IVAS_REND_SetReferenceVector( ivas_error IVAS_REND_SetExternalOrientation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ IVAS_QUATERNION *orientation, /* i : external orientation data */ +#ifdef LIB_REND_API_5MS + int8_t enableHeadRotation, /* i : flag to enable head rotation for this frame */ + int8_t enableExternalOrientation, /* i : flag to enable external orientation for this frame */ + int8_t enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ + int16_t numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ +#else int8_t *enableHeadRotation, /* i : flag to enable head rotation for this frame */ int8_t *enableExternalOrientation, /* i : flag to enable external orientation for this frame */ int8_t *enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ int16_t *numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ +#endif ); ivas_error IVAS_REND_CombineHeadAndExternalOrientation( @@ -292,7 +311,7 @@ ivas_error IVAS_REND_CombineHeadAndExternalOrientation( ivas_error IVAS_REND_GetCombinedOrientation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - IVAS_QUATERNION *pRotation /* i/o: Quaternion pointer processed orientation */ + IVAS_QUATERNION *pOrientation /* i/o: Quaternion pointer processed orientation */ ); ivas_error IVAS_REND_GetMasaMetadata( -- GitLab From 2cc42c0ad07941392da5a305308df7f6d11c509f Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 16 Jun 2023 09:48:27 +0200 Subject: [PATCH 015/175] Fix concurrent access to the same file from different test cases --- tests/renderer/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/renderer/utils.py b/tests/renderer/utils.py index ac5c57695a..ebad130ca2 100644 --- a/tests/renderer/utils.py +++ b/tests/renderer/utils.py @@ -142,6 +142,10 @@ def run_renderer( else: config_name = "" + if framing_5ms: + framing_name = "_5ms_framing" + else: + framing_name = "" if not isinstance(out_fmt, str): @@ -166,7 +170,7 @@ def run_renderer( out_file = str( output_path_base.joinpath( - f"{in_name}_to_{out_name}{trj_name}{non_diegetic_pan}{refrot_name}{refvec_name}{refveclev_name}{config_name}{name_extension}.wav" + f"{in_name}_to_{out_name}{trj_name}{non_diegetic_pan}{refrot_name}{refvec_name}{refveclev_name}{config_name}{framing_name}{name_extension}.wav" ) ) -- GitLab From bc55845248974ad25b0a883544d30849e1be61a7 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 16 Jun 2023 09:53:42 +0200 Subject: [PATCH 016/175] Allow warnings in Visual Studio build jobs --- .gitlab-ci-custom.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab-ci-custom.yml b/.gitlab-ci-custom.yml index 84aa4f65ba..f3453eedff 100644 --- a/.gitlab-ci-custom.yml +++ b/.gitlab-ci-custom.yml @@ -1078,6 +1078,8 @@ build-codec-debug-windows-vs2017: - $ENV:PATH - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug | tee $BUILD_OUTPUT - python ci/check_for_warnings.py $BUILD_OUTPUT + allow_failure: + exit_codes: 123 build-codec-release-windows-vs2017: extends: @@ -1089,3 +1091,5 @@ build-codec-release-windows-vs2017: - $ENV:PATH - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Release | tee $BUILD_OUTPUT - python ci/check_for_warnings.py $BUILD_OUTPUT + allow_failure: + exit_codes: 123 \ No newline at end of file -- GitLab From 11685f61025044c7ba7f342c3a0a91dd545a782f Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 16 Jun 2023 10:23:27 +0200 Subject: [PATCH 017/175] Fix stack-use-after-scope in rotateFrameMc --- lib_rend/lib_rend.c | 67 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 60 insertions(+), 7 deletions(-) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 6f6b32de1b..b0472c96fc 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -741,7 +741,11 @@ static ivas_error getNumNonLfeChannelsInSpeakerLayout( static ivas_error getMcConfigValues( IVAS_REND_AudioConfig inConfig, +#ifdef LIB_REND_API_5MS + const LSSETUP_CUSTOM_STRUCT *pInCustomLs, +#else LSSETUP_CUSTOM_STRUCT inCustomLs, +#endif const float **azimuth, const float **elevation, int16_t *lfe_idx, @@ -754,6 +758,22 @@ static ivas_error getMcConfigValues( switch ( inConfig ) { case IVAS_REND_AUDIO_CONFIG_LS_CUSTOM: +#ifdef LIB_REND_API_5MS + *azimuth = (const float *) &pInCustomLs->ls_azimuth; + *elevation = (const float *) &pInCustomLs->ls_elevation; + if ( pInCustomLs->num_lfe > 0 ) + { + *lfe_idx = pInCustomLs->lfe_idx[0]; + } + for ( i = 0; i < pInCustomLs->num_spk; i++ ) + { + if ( pInCustomLs->ls_elevation[i] != 0 ) + { + *is_planar = 0; + break; + } + } +#else *azimuth = (const float *) &inCustomLs.ls_azimuth; *elevation = (const float *) &inCustomLs.ls_elevation; if ( inCustomLs.num_lfe > 0 ) @@ -768,6 +788,7 @@ static ivas_error getMcConfigValues( break; } } +#endif break; case IVAS_REND_AUDIO_CONFIG_MONO: case IVAS_REND_AUDIO_CONFIG_STEREO: @@ -4517,9 +4538,13 @@ static void renderBufferChannel( } static ivas_error rotateFrameMc( - IVAS_REND_AudioBuffer inAudio, /* i : Input Audio buffer */ - IVAS_REND_AudioConfig inConfig, /* i : Input Audio config */ - LSSETUP_CUSTOM_STRUCT inCustomLs, /* i : Input Custom LS setup */ + IVAS_REND_AudioBuffer inAudio, /* i : Input Audio buffer */ + IVAS_REND_AudioConfig inConfig, /* i : Input Audio config */ +#ifdef LIB_REND_API_5MS + const LSSETUP_CUSTOM_STRUCT *pInCustomLs, /* i : Input Custom LS setup */ +#else + LSSETUP_CUSTOM_STRUCT inCustomLs, /* i : Input Custom LS setup */ +#endif const IVAS_REND_HeadRotData *headRotData, /* i : Head rotation data */ const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData, /* i : Combined head and external orientations */ rotation_gains gains_prev, /* i/o: Previous frame rotation gains */ @@ -4572,10 +4597,20 @@ static ivas_error rotateFrameMc( } else { +#ifdef LIB_REND_API_5MS + nchan = pInCustomLs->num_spk + pInCustomLs->num_lfe; +#else nchan = inCustomLs.num_spk + inCustomLs.num_lfe; +#endif } - if ( ( error = getMcConfigValues( inConfig, inCustomLs, &ls_azimuth, &ls_elevation, &lfe_idx, &is_planar_setup ) ) != IVAS_ERR_OK ) + if ( ( error = getMcConfigValues( inConfig, +#ifdef LIB_REND_API_5MS + pInCustomLs, +#else + inCustomLs, +#endif + &ls_azimuth, &ls_elevation, &lfe_idx, &is_planar_setup ) ) != IVAS_ERR_OK ) { return error; } @@ -5431,7 +5466,13 @@ static ivas_error renderMcToBinaural( tmpRotBuffer.data = malloc( tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels * sizeof( float ) ); set_zero( tmpRotBuffer.data, tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels ); - if ( ( error = rotateFrameMc( mcInput->base.inputBuffer, mcInput->base.inConfig, mcInput->customLsInput, mcInput->base.ctx.pHeadRotData, + if ( ( error = rotateFrameMc( mcInput->base.inputBuffer, mcInput->base.inConfig, +#ifdef LIB_REND_API_5MS + &mcInput->customLsInput, +#else + mcInput->customLsInput, +#endif + mcInput->base.ctx.pHeadRotData, mcInput->base.ctx.pCombinedOrientationData, mcInput->rot_gains_prev, mcInput->efapInWrapper.hEfap, tmpRotBuffer ) ) != IVAS_ERR_OK ) { @@ -5534,7 +5575,13 @@ static ivas_error renderMcToBinauralRoom( tmpRotBuffer.data = malloc( tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels * sizeof( float ) ); set_zero( tmpRotBuffer.data, tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels ); - if ( ( error = rotateFrameMc( mcInput->base.inputBuffer, mcInput->base.inConfig, mcInput->customLsInput, mcInput->base.ctx.pHeadRotData, + if ( ( error = rotateFrameMc( mcInput->base.inputBuffer, mcInput->base.inConfig, +#ifdef LIB_REND_API_5MS + &mcInput->customLsInput, +#else + mcInput->customLsInput, +#endif + mcInput->base.ctx.pHeadRotData, mcInput->base.ctx.pCombinedOrientationData, mcInput->rot_gains_prev, mcInput->efapInWrapper.hEfap, tmpRotBuffer ) ) != IVAS_ERR_OK ) { @@ -5626,7 +5673,13 @@ static ivas_error renderMcCustomLsToBinauralRoom( tmpRotBuffer.data = malloc( tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels * sizeof( float ) ); set_zero( tmpRotBuffer.data, tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels ); - if ( ( error = rotateFrameMc( mcInput->base.inputBuffer, mcInput->base.inConfig, mcInput->customLsInput, mcInput->base.ctx.pHeadRotData, + if ( ( error = rotateFrameMc( mcInput->base.inputBuffer, mcInput->base.inConfig, +#ifdef LIB_REND_API_5MS + &mcInput->customLsInput, +#else + mcInput->customLsInput, +#endif + mcInput->base.ctx.pHeadRotData, mcInput->base.ctx.pCombinedOrientationData, mcInput->rot_gains_prev, mcInput->efapInWrapper.hEfap, tmpRotBuffer ) ) != IVAS_ERR_OK ) { -- GitLab From ae80a29f3fd9691895257d905c4227992898e1ec Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 16 Jun 2023 20:27:02 +0200 Subject: [PATCH 018/175] Add IVAS_rend_ref to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a2f6a6b95f..1829cde3a7 100644 --- a/.gitignore +++ b/.gitignore @@ -50,6 +50,7 @@ scripts/testv/*_cut*.pcm # default reference binary name IVAS_cod_ref IVAS_dec_ref +IVAS_rend_ref # Python files that pop up when running scripts __pycache__/ -- GitLab From b7b09e85d6fc2fa437905c1bd92fee1b069f77a1 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Mon, 19 Jun 2023 09:56:03 +0200 Subject: [PATCH 019/175] Actually enable 5ms mode when flag is set --- apps/renderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/renderer.c b/apps/renderer.c index 9be54daca5..73125900c1 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -2142,7 +2142,7 @@ static void parseOption( #ifdef LIB_REND_API_5MS case CmdLnOptionId_framing5ms: assert( numOptionValues == 0 ); - args->framing_5ms = false; + args->framing_5ms = true; break; #endif default: -- GitLab From 03cc1fe55b6ee8b09ed6feff6e7379696c79642c Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Mon, 19 Jun 2023 11:22:36 +0200 Subject: [PATCH 020/175] Fix rendering too many subframes in TD rend --- lib_dec/ivas_objectRenderer_internal.c | 7 ++++++- lib_rend/ivas_objectRenderer.c | 19 ++++++++++++++++++- lib_rend/ivas_prot_rend.h | 3 +++ lib_rend/lib_rend.c | 4 ++++ 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_objectRenderer_internal.c b/lib_dec/ivas_objectRenderer_internal.c index 3802c4fc09..567a91f4fb 100644 --- a/lib_dec/ivas_objectRenderer_internal.c +++ b/lib_dec/ivas_objectRenderer_internal.c @@ -95,7 +95,12 @@ ivas_error ivas_td_binaural_renderer( ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->Quaternions : NULL, ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->listenerPos : NULL, #endif - ism_md_subframe_update, output, output_frame ); + ism_md_subframe_update, output, output_frame +#ifdef LIB_REND_API_5MS + , + MAX_PARAM_SPATIAL_SUBFRAMES +#endif + ); } diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 9f39aa8b93..346dbc695c 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -266,6 +266,10 @@ ivas_error ivas_td_binaural_renderer_unwrap( const int16_t ism_md_subframe_update, /* i: Number of subframes to delay ism metadata to sync with audio */ float *output[], /* i/o: SCE channels / Binaural synthesis */ const int16_t output_frame /* i : output frame length */ +#ifdef LIB_REND_API_5MS + , + const int16_t num_subframes /* i : number of subframes to render */ +#endif ) { int16_t subframe_length; @@ -281,7 +285,11 @@ ivas_error ivas_td_binaural_renderer_unwrap( p_reverb_signal[ch] = reverb_signal[ch]; } +#ifdef LIB_REND_API_5MS + subframe_length = output_frame / num_subframes; +#else subframe_length = output_frame / MAX_PARAM_SPATIAL_SUBFRAMES; +#endif c_indx = 0; for ( nS = 0; nS < num_src; nS++ ) @@ -294,7 +302,11 @@ ivas_error ivas_td_binaural_renderer_unwrap( } } +#ifdef LIB_REND_API_5MS + for ( subframe_idx = 0; subframe_idx < num_subframes; subframe_idx++ ) +#else for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) +#endif { if ( subframe_idx == ism_md_subframe_update ) { @@ -696,7 +708,12 @@ ivas_error ivas_td_binaural_renderer_ext( ( hCombinedOrientationData != NULL ) ? ( *hCombinedOrientationData )->Quaternions : NULL, ( hCombinedOrientationData != NULL ) ? ( *hCombinedOrientationData )->listenerPos : NULL, #endif - ism_md_subframe_update_ext, p_output, output_frame ) ) != IVAS_ERR_OK ) + ism_md_subframe_update_ext, p_output, output_frame +#ifdef LIB_REND_API_5MS + , + 1 +#endif + ) ) != IVAS_ERR_OK ) { return error; } diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 8d987a3f3c..d96f5228f2 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -234,6 +234,9 @@ ivas_error ivas_td_binaural_renderer_unwrap( const int16_t ism_md_subframe_update, float *output[], /* i/o: SCE channels / Binaural synthesis */ const int16_t output_frame /* i : output frame length */ +#ifdef LIB_REND_API_5MS + ,const int16_t num_subframes /* i : number of subframes to render */ +#endif ); ivas_error ivas_td_binaural_renderer_ext( diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index b0472c96fc..158110012f 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -56,7 +56,11 @@ #define MAX_BUFFER_LENGTH ( MAX_BUFFER_LENGTH_PER_CHANNEL * MAX_INPUT_CHANNELS ) /* Frame size required when rendering to binaural */ +#ifdef LIB_REND_API_5MS +#define BINAURAL_RENDERING_FRAME_SIZE_MS 5 +#else #define BINAURAL_RENDERING_FRAME_SIZE_MS 20 +#endif /*-------------------------------------------------------------------* -- GitLab From 1a5757ea6813d98bc56276fcd797e854558b3f0e Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Tue, 20 Jun 2023 08:26:50 +0200 Subject: [PATCH 021/175] try to fix BE for the external orientation, did not succeed, seems to be a deeper problem. Make self test summary more verbous --- apps/decoder.c | 2 +- lib_rend/ivas_rotation.c | 4 ++++ scripts/self_test.py | 23 +++++++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/apps/decoder.c b/apps/decoder.c index 34527b8c82..2d33228a3b 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1819,7 +1819,7 @@ static ivas_error decodeG192( } - if ( ( error = IVAS_DEC_FeedExternalOrientationData( hIvasDec, Quaternion, enableHeadRotation, enableExternalOrientation, enableRotationInterpolation, numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_FeedExternalOrientationData( hIvasDec, Quaternion, enableHeadRotation, enableExternalOrientation, enableRotationInterpolation, numFramesToTargetOrientation * vec_pos_len ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedExternalOrientationData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index efd281ce84..faee209b70 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -795,7 +795,11 @@ ivas_error ivas_combined_orientation_open( /* Initialization */ ( *hCombinedOrientationData )->interpolationCoefficient = 1.0f; ( *hCombinedOrientationData )->interpolationIncrement = 1.0f; +#ifdef API_5MS + ( *hCombinedOrientationData )->maximumFramesToTargetOrientation = 2000; +#else ( *hCombinedOrientationData )->maximumFramesToTargetOrientation = 500; +#endif ( *hCombinedOrientationData )->lrSwitchedNext = 0; ( *hCombinedOrientationData )->lrSwitchedCurrent = 0; ( *hCombinedOrientationData )->lrSwitchInterpVal = 0.0f; diff --git a/scripts/self_test.py b/scripts/self_test.py index d7118832db..321f83419b 100755 --- a/scripts/self_test.py +++ b/scripts/self_test.py @@ -186,6 +186,13 @@ class SelfTest(IvasScriptsCommon.IvasScript): "--dectest", help="Test decoder binary (default:{})".format(default_dec_test), ) + self.parser.add_argument( + "--list_conditions", + "-l", + help="List all comditions in the parameter file", + action="store_true", + default=False, + ) if shutil.which("valgrind"): self.valgrind = [ "valgrind", @@ -858,6 +865,7 @@ class SelfTest(IvasScriptsCommon.IvasScript): # add the detailed results for this condition self.fail_results["detailedResults"].append(result_str) + self.fail_results["failed_modes"].append(mode) self.logger.progress( "Comparing conditions: {}/{} ({} running), {} failed ".format( self.stat["num_tests_done"], @@ -1140,6 +1148,11 @@ class SelfTest(IvasScriptsCommon.IvasScript): self.parse_args() + if self.args["list_conditions"] is True: + run_dict = self.parse_self_test_prm(self.args["test_prm"]) + for mode in run_dict.keys(): + self.logger.console(f"- {run_dict[mode]['cmd']['table_name']}") + return # create/update test vectors (export from SVN server if not existing) svn_action = None if not os.path.exists(TESTV_DIR): @@ -1540,6 +1553,7 @@ class SelfTest(IvasScriptsCommon.IvasScript): "corrupt_test_conditions": {"cnt": 0, "conditions": []}, "diff_nsamples_conditions": {"cnt": 0, "conditions": []}, "detailedResults": [], + "failed_modes":[], } self.run_pesq = self.args["pesq"] failed_ref_conditions = {} @@ -1948,6 +1962,15 @@ class SelfTest(IvasScriptsCommon.IvasScript): for l in r: self.logger.info(l) + self.logger.info("\n\n") + self.logger.info("Summary of all tests") + self.logger.info("---------------------\n") + for mode in run_dict.keys(): + if mode in self.fail_results["failed_modes"]: + self.logger.info(f"[FAIL] {run_dict[mode]['cmd']['table_name']}") + else: + self.logger.info(f"[OK] {run_dict[mode]['cmd']['table_name']}") + if __name__ == "__main__": if sys.version_info[0] < 3 or sys.version_info[1] < 7: -- GitLab From 5f0f350b3761ef3ab6b232506ae1c6b270a883b8 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Tue, 20 Jun 2023 08:54:06 +0200 Subject: [PATCH 022/175] 5ms API Squashed commit of the following: commit a019f87f21a295491b97c43a1c3122339d07bb27 Merge: 1a5757ea daca8536 Author: Stefan Bayer Date: Tue Jun 20 08:39:14 2023 +0200 Merge remote-tracking branch 'remotes/origin/main' into b_20230601_API_5ms_rendering_bay commit 1a5757ea6813d98bc56276fcd797e854558b3f0e Author: Stefan Bayer Date: Tue Jun 20 08:26:50 2023 +0200 try to fix BE for the external orientation, did not succeed, seems to be a deeper problem. Make self test summary more verbous commit b61cb8986ce97d473c30c3ce8eb1bca94ffcf33a Author: Stefan Bayer Date: Thu Jun 15 16:12:09 2023 +0200 disable unused code commit de03fd1e6595cc31021a4988dc827a9210142ffe Author: Stefan Bayer Date: Thu Jun 15 15:41:27 2023 +0200 fix external orientation update rate commit d4c03c2e3af4ef2360acd80400b16df8b161476c Author: Stefan Bayer Date: Thu Jun 15 15:08:55 2023 +0200 make sure 7.1.4 br does not crash any longer, still ParamUpmix needs to be fully implemented in the JBM path commit f104d3bbe0976522dd25f4d1232248ec8f3a1f2d Author: Stefan Bayer Date: Thu Jun 15 14:30:43 2023 +0200 fix asan, put out at least zeroes for ParamUpmix in the JBM path commit 52b5489763af0a72c31f3febebe5dcc6d9dcad83 Author: Stefan Bayer Date: Thu Jun 15 13:55:13 2023 +0200 fix compiling issues with API_5MS inactive commit 8d73b36a1595651fbf1f967b8ea516103181b76b Author: Stefan Bayer Date: Thu Jun 15 13:06:03 2023 +0200 fix compiling, re-add all 5ms API stuff that got lost in the latest merge from main commit 612455369970bcf8fe4192aedd3efd85ade44308 Merge: fde3a293 96ad022e Author: Stefan Bayer Date: Thu Jun 15 08:38:42 2023 +0200 Merge remote-tracking branch 'remotes/origin/main' into b_20230601_API_5ms_rendering_bay commit fde3a29385ef0720a21fb9ba897eada28c736ca9 Author: Stefan Bayer Date: Thu Jun 15 08:07:25 2023 +0200 temp fix for orientation tracking init commit 3a9743d05de925224ac0cda0453434498fd5b263 Author: Stefan Bayer Date: Wed Jun 14 07:11:37 2023 +0200 5ms API first step, not completely BE yet --- apps/decoder.c | 862 ++++++++++++++++--- lib_com/ivas_error.h | 5 + lib_com/ivas_prot.h | 6 +- lib_com/options.h | 5 + lib_dec/ivas_binRenderer_internal.c | 30 +- lib_dec/ivas_dec.c | 2 + lib_dec/ivas_dirac_dec.c | 42 +- lib_dec/ivas_init_dec.c | 20 +- lib_dec/ivas_ism_dec.c | 5 +- lib_dec/ivas_ism_param_dec.c | 37 +- lib_dec/ivas_ism_renderer.c | 28 + lib_dec/ivas_jbm_dec.c | 78 ++ lib_dec/ivas_masa_dec.c | 6 + lib_dec/ivas_mc_param_dec.c | 27 +- lib_dec/ivas_mct_dec.c | 5 +- lib_dec/ivas_objectRenderer_internal.c | 15 +- lib_dec/ivas_sba_dec.c | 6 +- lib_dec/ivas_sba_rendering_internal.c | 7 + lib_dec/ivas_spar_decoder.c | 4 + lib_dec/ivas_stat_dec.h | 4 + lib_dec/jbm_jb4sb.h | 4 +- lib_dec/jbm_pcmdsp_fifo.c | 2 + lib_dec/jbm_pcmdsp_fifo.h | 4 +- lib_dec/lib_dec.c | 735 ++++++++++++++-- lib_dec/lib_dec.h | 64 +- lib_rend/ivas_crend.c | 14 + lib_rend/ivas_dirac_dec_binaural_functions.c | 16 + lib_rend/ivas_objectRenderer.c | 19 +- lib_rend/ivas_objectRenderer_hrFilt.c | 3 +- lib_rend/ivas_rotation.c | 307 ++++++- lib_rend/ivas_stat_rend.h | 32 +- lib_rend/lib_rend.c | 119 ++- scripts/self_test.py | 23 + 33 files changed, 2275 insertions(+), 261 deletions(-) mode change 100755 => 100644 lib_com/options.h diff --git a/apps/decoder.c b/apps/decoder.c index e210ebe95e..71a296ed00 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -84,6 +84,10 @@ static #define VARIABLE_SPEED_FETCH_FRAMESIZE_MS 20 #endif #define JBM_FRONTEND_FETCH_FRAMESIZE_MS 20 +#ifdef API_5MS +#define HEADROTATION_FETCH_FRAMESIZE_MS 5 +#define DEFAULT_FETCH_FRAMESIZE_MS 20 +#endif typedef struct { @@ -122,7 +126,9 @@ typedef struct bool renderConfigEnabled; char *renderConfigFilename; IVAS_DEC_COMPLEXITY_LEVEL complexityLevel; - +#ifdef API_5MS + bool tsmEnabled; +#endif #ifdef DEBUGGING IVAS_DEC_FORCED_REND_MODE forcedRendMode; #ifdef DEBUG_FOA_AGC @@ -132,7 +138,9 @@ typedef struct bool noBadFrameDelay; #endif #ifdef VARIABLE_SPEED_DECODING +#ifndef API_5MS bool variableSpeedMode; +#endif bool tsmScaleFileEnabled; char *tsmScaleFileName; uint16_t tsmScale; @@ -395,8 +403,11 @@ int main( /*------------------------------------------------------------------------------------------* * Configure the decoder *------------------------------------------------------------------------------------------*/ +#ifdef API_5MS + if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.tsmEnabled, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) +#else if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) - +#endif { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; @@ -408,16 +419,17 @@ int main( if ( arg.voipMode ) { -#ifdef VARIABLE_SPEED_DECODING - if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, IVAS_DEC_VOIP_MODE_VOIP, 100, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) -#else +#ifdef API_5MS if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) +#else + if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, IVAS_DEC_VOIP_MODE_VOIP, 100, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nCould not enable VOIP: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } } +#ifndef API_5MS #ifdef VARIABLE_SPEED_DECODING else if ( arg.variableSpeedMode ) { @@ -428,6 +440,7 @@ int main( } } #endif +#endif #ifdef DEBUGGING /*-----------------------------------------------------------------* @@ -461,7 +474,11 @@ int main( IVAS_DEC_PrintConfigWithBitstream( hIvasDec, arg.quietModeEnabled, bit_stream, num_bits ); #ifdef VARIABLE_SPEED_DECODING +#ifdef API_5MS + if ( arg.tsmEnabled ) +#else if ( arg.variableSpeedMode ) +#endif { if ( arg.tsmScaleFileEnabled ) { @@ -639,6 +656,7 @@ int main( { error = decodeVoIP( arg, hBsReader, hIvasDec ); } +#ifndef API_5MS #ifdef VARIABLE_SPEED_DECODING else if ( arg.variableSpeedMode ) { @@ -646,6 +664,7 @@ int main( externalOrientationFileReader, refRotReader, referenceVectorReader, hIvasDec ); } +#endif #endif else { @@ -882,10 +901,14 @@ static bool parseCmdlIVAS_dec( arg->inputFormat = IVAS_DEC_INPUT_FORMAT_G192; arg->Opt_non_diegetic_pan = 0; arg->non_diegetic_pan_gain = 0.f; - +#ifdef API_5MS + arg->tsmEnabled = false; +#endif #ifdef DEBUGGING #ifdef VARIABLE_SPEED_DECODING +#ifndef API_5MS arg->variableSpeedMode = false; +#endif arg->tsmScale = 100; arg->tsmScaleFileEnabled = false; arg->tsmScaleFileName = NULL; @@ -1034,7 +1057,11 @@ static bool parseCmdlIVAS_dec( { i++; int32_t tmp = 100; +#ifdef API_5MS + arg->tsmEnabled = true; +#else arg->variableSpeedMode = true; +#endif if ( i < argc - 3 ) { if ( !is_digits_only( argv[i] ) ) @@ -1609,7 +1636,7 @@ static ivas_error initOnFirstGoodFrame( * * Read G.192 bitstream and decode in regular decoder *---------------------------------------------------------------------*/ - +#ifdef API_5MS static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, @@ -1634,20 +1661,58 @@ static ivas_error decodeG192( int16_t numInitialBadFrames = 0; /* Number of bad frames received until first good frame is decoded */ int16_t nOutChannels = 0; int16_t delayNumSamples = -1; - int16_t delayNumSamples_orig[3]; /* stores: overall delay, dec+rend delay, and binauralization delay */ + int16_t delayNumSamples_orig[3]; int16_t nOutSamples = 0; int32_t delayTimeScale = 0; ivas_error error = IVAS_ERR_UNKNOWN; uint16_t numObj = 0; IVAS_DEC_BS_FORMAT bsFormat = IVAS_DEC_BS_UNKOWN; - IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; - + uint16_t nSamplesAvailableNext; + bool needNewFrame; + int16_t nSamplesRendered, nSamplesRendered_loop, nSamplesToRender; +#ifdef DEBUGGING +#ifdef VARIABLE_SPEED_DECODING + TsmScaleFileReader *tsmScaleFileReader = NULL; + int16_t scale; +#endif +#endif IsmFileWriter *ismWriters[IVAS_MAX_NUM_OBJECTS]; + IVAS_VECTOR3 Pos; + int16_t vec_pos_update, vec_pos_len; + + for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; ++i ) { ismWriters[i] = NULL; } + /* we always start with needing a new frame */ + needNewFrame = true; + +#ifdef DEBUGGING +#ifdef VARIABLE_SPEED_DECODING + /*------------------------------------------------------------------------------------------* + * Open TSM scale file or set global TSM scale + *------------------------------------------------------------------------------------------*/ + + if ( arg.tsmEnabled ) + { + if ( arg.tsmScaleFileEnabled ) + { + if ( ( tsmScaleFileReader = TsmScaleFileReader_open( arg.tsmScaleFileName ) ) == NULL ) + { + fprintf( stderr, "\nError: Can't open TSM scale file %s \n\n", arg.tsmScaleFileName ); + goto cleanup; + } + } + else + { + IVAS_DEC_VoIP_SetScale( hIvasDec, arg.tsmScale, arg.tsmScale ); + } + } +#endif +#endif + if ( !arg.quietModeEnabled ) { fprintf( stdout, "\n------ Running the decoder ------\n\n" ); @@ -1664,7 +1729,19 @@ static ivas_error decodeG192( reset_stack(); reset_wmops(); #endif + nSamplesAvailableNext = 0; + vec_pos_update = 0; + if ( arg.enableHeadRotation ) + { + nOutSamples = (int16_t) ( arg.output_Fs / 1000 * HEADROTATION_FETCH_FRAMESIZE_MS ); + vec_pos_len = IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; + } + else + { + nOutSamples = (int16_t) ( arg.output_Fs / 1000 * DEFAULT_FETCH_FRAMESIZE_MS ); + vec_pos_len = 1; + } /*------------------------------------------------------------------------------------------* * Loop for every packet (frame) of bitstream data * - Read the bitstream packet @@ -1674,42 +1751,10 @@ static ivas_error decodeG192( while ( 1 ) { - /* Read next frame */ - if ( ( error = BS_Reader_ReadFrame_short( hBsReader, bit_stream, &num_bits, &bfi ) ) != IVAS_ERR_OK ) - { - if ( error == IVAS_ERR_END_OF_FILE ) - { - break; - } - fprintf( stderr, "\nError: input bitstream file couldn't be read: %s \n\n", arg.inputBitstreamFilename ); - goto cleanup; - } - -#ifdef DEBUGGING - /* Random FEC simulation */ - if ( arg.FER > 0.0f ) - { - float ftmp = (float) app_own_random( &fec_seed ) + 32768.0f; - if ( ftmp <= arg.FER / 100.0f * 65535.0f ) - { - bfi = 1; - } - else - { - bfi = 0; - } - } -#endif - - /* Feed into decoder */ - if ( ( error = IVAS_DEC_FeedFrame_Serial( hIvasDec, bit_stream, num_bits, bfi ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError: could not feed frame to decoder: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } + /* Read next frame if not enough samples availble */ /* reference vector */ - if ( arg.enableReferenceVectorTracking ) + if ( arg.enableReferenceVectorTracking && vec_pos_update == 0 ) { IVAS_VECTOR3 listenerPosition, referencePosition; if ( ( error = Vector3PairFileReader_read( referenceVectorReader, &listenerPosition, &referencePosition ) ) != IVAS_ERR_OK ) @@ -1724,14 +1769,14 @@ static ivas_error decodeG192( goto cleanup; } } + /* Reference rotation */ - if ( arg.enableReferenceRotation ) + if ( arg.enableReferenceRotation && vec_pos_update == 0 ) { IVAS_QUATERNION quaternion; if ( ( error = HeadRotationFileReading( refRotReader, &quaternion, NULL ) ) != IVAS_ERR_OK ) { - fprintf( stderr, "\nError %s while reading reference rotation from %s\n", IVAS_DEC_GetErrorMessage( error ), - RotationFileReader_getFilePath( refRotReader ) ); + fprintf( stderr, "\nError %s while reading reference rotation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( refRotReader ) ); goto cleanup; } @@ -1741,22 +1786,20 @@ static ivas_error decodeG192( goto cleanup; } } + /* Head-tracking input simulation */ if ( arg.enableHeadRotation ) { - IVAS_QUATERNION Quaternions[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; + IVAS_QUATERNION Quaternion; - for ( i = 0; i < IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) + if ( ( error = HeadRotationFileReading( headRotReader, &Quaternion, &Pos ) ) != IVAS_ERR_OK ) { - if ( ( error = HeadRotationFileReading( headRotReader, &Quaternions[i], &Pos[i] ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), - RotationFileReader_getFilePath( headRotReader ) ); - goto cleanup; - } + fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( headRotReader ) ); + goto cleanup; } - if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions, Pos ) ) != IVAS_ERR_OK ) + + if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternion, Pos ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; @@ -1765,35 +1808,97 @@ static ivas_error decodeG192( if ( arg.enableExternalOrientation ) { - IVAS_QUATERNION Quaternions[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; - int8_t enableHeadRotation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; - int8_t enableExternalOrientation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; - int8_t enableRotationInterpolation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; - int16_t numFramesToTargetOrientation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; + IVAS_QUATERNION Quaternion; + int8_t enableHeadRotation; + int8_t enableExternalOrientation; + int8_t enableRotationInterpolation; + int16_t numFramesToTargetOrientation; - for ( i = 0; i < IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) + + if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &Quaternion, &enableHeadRotation, &enableExternalOrientation, &enableRotationInterpolation, &numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) { + fprintf( stderr, "\nError %s while reading external orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), + RotationFileReader_getFilePath( externalOrientationFileReader ) ); + goto cleanup; + } - if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &Quaternions[i], &enableHeadRotation[i], &enableExternalOrientation[i], &enableRotationInterpolation[i], &numFramesToTargetOrientation[i] ) ) != IVAS_ERR_OK ) + + if ( ( error = IVAS_DEC_FeedExternalOrientationData( hIvasDec, Quaternion, enableHeadRotation, enableExternalOrientation, enableRotationInterpolation, numFramesToTargetOrientation * vec_pos_len ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedExternalOrientationData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } + + /* decode and get samples */ + nSamplesRendered = 0; + nSamplesToRender = nOutSamples; + do + { + if ( needNewFrame ) + { +#ifdef DEBUGGING +#ifdef VARIABLE_SPEED_DECODING + if ( arg.tsmScaleFileEnabled ) { - fprintf( stderr, "\nError %s while reading external orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), - RotationFileReader_getFilePath( externalOrientationFileReader ) ); + if ( ( error = TsmScaleFileReader_readScale( tsmScaleFileReader, &scale ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError: input bitstream file couldn't be read: %s \n\n", arg.inputBitstreamFilename ); + goto cleanup; + } + IVAS_DEC_VoIP_SetScale( hIvasDec, scale, scale ); + } +#endif +#endif + + if ( ( error = BS_Reader_ReadFrame_short( hBsReader, bit_stream, &num_bits, &bfi ) ) != IVAS_ERR_OK ) + { + if ( error == IVAS_ERR_END_OF_FILE ) + { + break; + } + fprintf( stderr, "\nError: input bitstream file couldn't be read: %s \n\n", arg.inputBitstreamFilename ); goto cleanup; } - } - if ( ( error = IVAS_DEC_FeedExternalOrientationData( hIvasDec, Quaternions, enableHeadRotation, enableExternalOrientation, enableRotationInterpolation, numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) +#ifdef DEBUGGING + /* Random FEC simulation */ + if ( arg.FER > 0.0f ) + { + float ftmp = (float) app_own_random( &fec_seed ) + 32768.0f; + if ( ftmp <= arg.FER / 100.0f * 65535.0f ) + { + bfi = 1; + } + else + { + bfi = 0; + } + } +#endif + + /* Feed into decoder */ + if ( ( error = IVAS_DEC_FeedFrame_Serial( hIvasDec, bit_stream, num_bits, bfi ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError: could not feed frame to decoder: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } + error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, pcmBuf + nOutChannels * nSamplesRendered, &nSamplesRendered_loop, &needNewFrame ); + nSamplesRendered += nSamplesRendered_loop; + nSamplesToRender -= nSamplesRendered_loop; + if ( error != IVAS_ERR_OK ) { - fprintf( stderr, "\nIVAS_DEC_FeedExternalOrientationData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } - } - /* Run decoder for one frame (get rendered output) */ - if ( ( error = IVAS_DEC_GetSamples( hIvasDec, pcmBuf, &nOutSamples ) ) != IVAS_ERR_OK ) + + } while ( nSamplesRendered < nOutSamples && error == IVAS_ERR_OK ); + + if ( error == IVAS_ERR_END_OF_FILE ) { - fprintf( stderr, "\nError: could not get samples from decoder: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; + break; } /* Continue checking for first good frame until it is found */ @@ -1851,7 +1956,7 @@ static ivas_error decodeG192( } } - /* Write ISM metadata to external file(s) */ + /* Write ISm metadata to external file(s) */ if ( decodedGoodFrame && arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) { if ( bsFormat == IVAS_DEC_BS_OBJ ) @@ -1901,6 +2006,7 @@ static ivas_error decodeG192( } frame++; + vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; if ( !arg.quietModeEnabled ) { fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); @@ -1912,60 +2018,576 @@ static ivas_error decodeG192( #endif } #ifdef WMOPS - update_mem(); update_wmops(); +#ifdef MEM_COUNT_DETAILS + export_mem( "mem_analysis.csv" ); +#endif #endif } - /*------------------------------------------------------------------------------------------* - * Add zeros at the end to have equal length of synthesized signals - *------------------------------------------------------------------------------------------*/ - - memset( pcmBuf, 0, delayNumSamples_orig[0] * nOutChannels * sizeof( int16_t ) ); - - if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, delayNumSamples_orig[0] * nOutChannels ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError writing output file: %s\n", ivas_error_to_string( error ) ); - goto cleanup; - } /*------------------------------------------------------------------------------------------* - * Printouts after decoding has finished + * Flush what is still left in the VoIP Buffers.... *------------------------------------------------------------------------------------------*/ - if ( !arg.quietModeEnabled ) + while ( nSamplesAvailableNext > 0 ) { - printf( "\n\nDecoder+renderer delay: %4.2f ms (%3u samples at timescale %5u)\n", 1000.f * delayNumSamples_orig[1] / (float) delayTimeScale, delayNumSamples_orig[1], delayTimeScale ); + int16_t nSamplesFlushed; - if ( delayNumSamples_orig[2] > 0 ) - { - printf( "HRIR/BRIR delay: %4.2f ms (%3u samples at timescale %5u)\n", 1000.f * delayNumSamples_orig[2] / (float) delayTimeScale, delayNumSamples_orig[2], delayTimeScale ); - printf( "Total delay: %4.2f ms (%3u samples at timescale %5u)\n", 1000.f * ( delayNumSamples_orig[1] + delayNumSamples_orig[2] ) / (float) delayTimeScale, delayNumSamples_orig[1] + delayNumSamples_orig[2], delayTimeScale ); - } - } + /* Feed into decoder */ - /* Print output metadata file name(s) */ - if ( arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) - { - if ( bsFormat == IVAS_DEC_BS_OBJ ) + /* reference vector */ + if ( arg.enableReferenceVectorTracking ) { - for ( i = 0; i < numObj; i++ ) + IVAS_VECTOR3 listenerPosition, referencePosition; + if ( ( error = Vector3PairFileReader_read( referenceVectorReader, &listenerPosition, &referencePosition ) ) != IVAS_ERR_OK ) { - fprintf( stdout, "\nOutput metadata file: %s", IsmFileWriter_getFilePath( ismWriters[i] ) ); + fprintf( stderr, "\nError %s while reading listener and reference positions from %s\n", IVAS_DEC_GetErrorMessage( error ), Vector3PairFileReader_getFilePath( referenceVectorReader ) ); + goto cleanup; + } + + if ( ( error = IVAS_DEC_FeedRefVectorData( hIvasDec, listenerPosition, referencePosition ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedRefVectorData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; } - fprintf( stdout, "\n" ); } - else if ( bsFormat == IVAS_DEC_BS_MASA ) + /* Reference rotation */ + if ( arg.enableReferenceRotation ) { - fprintf( stdout, "\nOutput metadata file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); - } - } - - /*------------------------------------------------------------------------------------------* - * Close files and deallocate resources - *------------------------------------------------------------------------------------------*/ + IVAS_QUATERNION quaternion; + if ( ( error = HeadRotationFileReading( refRotReader, &quaternion, NULL ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading reference rotation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( refRotReader ) ); + goto cleanup; + } - decodingFailed = false; /* This will stay set to true if cleanup is reached via a goto due to an error */ + if ( ( error = IVAS_DEC_FeedRefRotData( hIvasDec, quaternion ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedRefRotData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } + /* Head-tracking input simulation */ + if ( arg.enableHeadRotation ) + { + IVAS_QUATERNION Quaternion; + + + if ( ( error = HeadRotationFileReading( headRotReader, &Quaternion, &Pos ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( headRotReader ) ); + goto cleanup; + } + + + if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternion, Pos ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } + + /* decode and get samples */ + if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, pcmBuf, &nSamplesFlushed ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_VoIP_Flush: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + /* Write current frame */ + if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, nSamplesFlushed * nOutChannels ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nOutput audio file writer error\n" ); + goto cleanup; + } + + /* Write ISm metadata to external file(s) */ + if ( decodedGoodFrame && arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) + { + if ( bsFormat == IVAS_DEC_BS_OBJ ) + { + if ( ( error = IVAS_DEC_GetNumObjects( hIvasDec, &numObj ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetNumObjects: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + for ( i = 0; i < numObj; ++i ) + { + IVAS_ISM_METADATA IsmMetadata; + + if ( ( error = IVAS_DEC_GetObjectMetadata( hIvasDec, &IsmMetadata, 0, i ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetObjectMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + if ( ( IsmFileWriter_writeFrame( IsmMetadata, ismWriters[i] ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing ISM metadata to file %s\n", IsmFileWriter_getFilePath( ismWriters[i] ) ); + goto cleanup; + } + } + } + else if ( bsFormat == IVAS_DEC_BS_MASA ) + { + MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta; +#ifdef FIX_470_MASA_JBM_EXT + if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK ) +#else + if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta ) ) != IVAS_ERR_OK ) +#endif + { + fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); + goto cleanup; + } + } + } + + frame++; + if ( !arg.quietModeEnabled ) + { + fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); +#ifdef DEBUGGING + if ( IVAS_DEC_GetBerDetectFlag( hIvasDec ) ) + { + fprintf( stdout, "\n Decoding error: BER detected in frame %d !!!!!\n", frame - 1 ); + } +#endif + } + } + + /*------------------------------------------------------------------------------------------* + * Printouts after decoding has finished + *------------------------------------------------------------------------------------------*/ + + if ( !arg.quietModeEnabled ) + { + printf( "\n\nDecoder+renderer delay: %4.2f ms (%3u samples at timescale %5u)\n", 1000.f * delayNumSamples_orig[1] / (float) delayTimeScale, delayNumSamples_orig[1], delayTimeScale ); + + if ( delayNumSamples_orig[2] > 0 ) + { + printf( "HRIR/BRIR delay: %4.2f ms (%3u samples at timescale %5u)\n", 1000.f * delayNumSamples_orig[2] / (float) delayTimeScale, delayNumSamples_orig[2], delayTimeScale ); + printf( "Total delay: %4.2f ms (%3u samples at timescale %5u)\n", 1000.f * ( delayNumSamples_orig[1] + delayNumSamples_orig[2] ) / (float) delayTimeScale, delayNumSamples_orig[1] + delayNumSamples_orig[2], delayTimeScale ); + } + } + + /* Print output metadata file name(s) */ + if ( arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) + { + if ( bsFormat == IVAS_DEC_BS_OBJ ) + { + for ( i = 0; i < numObj; i++ ) + { + fprintf( stdout, "\nOutput metadata file: %s", IsmFileWriter_getFilePath( ismWriters[i] ) ); + } + fprintf( stdout, "\n" ); + } + else if ( bsFormat == IVAS_DEC_BS_MASA ) + { + fprintf( stdout, "\nOutput metadata file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); + } + } + + /* add zeros at the end to have equal length of synthesized signals */ + memset( pcmBuf, 0, delayNumSamples_orig[0] * nOutChannels * sizeof( int16_t ) ); + if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, delayNumSamples_orig[0] * nOutChannels ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing output file: %s\n", ivas_error_to_string( error ) ); + goto cleanup; + } + + /*------------------------------------------------------------------------------------------* + * Close files and deallocate resources + *------------------------------------------------------------------------------------------*/ + + decodingFailed = false; /* This will stay set to true if cleanup is reached via a goto due to an error */ + +cleanup: + + AudioFileWriter_close( &afWriter ); + MasaFileWriter_close( &masaWriter ); +#ifdef DEBUGGING +#ifdef VARIABLE_SPEED_DECODING + TsmScaleFileReader_close( &tsmScaleFileReader ); +#endif +#endif + for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; i++ ) + { + IsmFileWriter_close( &ismWriters[i] ); + } + + if ( decodingFailed && error == IVAS_ERR_OK ) + { + return IVAS_ERR_UNKNOWN; + } + + return error; +} +#else +static ivas_error decodeG192( + DecArguments arg, + BS_READER_HANDLE hBsReader, + RotFileReader *headRotReader, + RotFileReader *externalOrientationFileReader, + RotFileReader *refRotReader, + Vector3PairFileReader *referenceVectorReader, + IVAS_DEC_HANDLE hIvasDec, + int16_t *pcmBuf ) + +{ + bool decodingFailed = true; /* Assume failure until cleanup is reached without errors */ + uint16_t bit_stream[IVAS_MAX_BITS_PER_FRAME + 4 * 8]; + int16_t i, num_bits; + int16_t bfi = 0; +#ifdef DEBUGGING + int16_t fec_seed = 12558; /* FEC_SEED */ +#endif + AudioFileWriter *afWriter = NULL; + MasaFileWriter *masaWriter = NULL; + bool decodedGoodFrame = false; + int16_t numInitialBadFrames = 0; /* Number of bad frames received until first good frame is decoded */ + int16_t nOutChannels = 0; + int16_t delayNumSamples = -1; + int16_t delayNumSamples_orig[3]; /* stores: overall delay, dec+rend delay, and binauralization delay */ + int16_t nOutSamples = 0; + int32_t delayTimeScale = 0; + ivas_error error = IVAS_ERR_UNKNOWN; + uint16_t numObj = 0; + IVAS_DEC_BS_FORMAT bsFormat = IVAS_DEC_BS_UNKOWN; + IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; + + IsmFileWriter *ismWriters[IVAS_MAX_NUM_OBJECTS]; + for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; ++i ) + { + ismWriters[i] = NULL; + } + + if ( !arg.quietModeEnabled ) + { + fprintf( stdout, "\n------ Running the decoder ------\n\n" ); + fprintf( stdout, "Frames processed: " ); + } + else + { + fprintf( stdout, "\n-- Start the decoder (quiet mode) --\n\n" ); + } + + delayNumSamples_orig[0] = -1; + +#ifdef WMOPS + reset_stack(); + reset_wmops(); +#endif + + /*------------------------------------------------------------------------------------------* + * Loop for every packet (frame) of bitstream data + * - Read the bitstream packet + * - Run the decoder + * - Write the synthesized signal into output file + *------------------------------------------------------------------------------------------*/ + + while ( 1 ) + { + /* Read next frame */ + if ( ( error = BS_Reader_ReadFrame_short( hBsReader, bit_stream, &num_bits, &bfi ) ) != IVAS_ERR_OK ) + { + if ( error == IVAS_ERR_END_OF_FILE ) + { + break; + } + fprintf( stderr, "\nError: input bitstream file couldn't be read: %s \n\n", arg.inputBitstreamFilename ); + goto cleanup; + } + +#ifdef DEBUGGING + /* Random FEC simulation */ + if ( arg.FER > 0.0f ) + { + float ftmp = (float) app_own_random( &fec_seed ) + 32768.0f; + if ( ftmp <= arg.FER / 100.0f * 65535.0f ) + { + bfi = 1; + } + else + { + bfi = 0; + } + } +#endif + + /* Feed into decoder */ + if ( ( error = IVAS_DEC_FeedFrame_Serial( hIvasDec, bit_stream, num_bits, bfi ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError: could not feed frame to decoder: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + /* reference vector */ + if ( arg.enableReferenceVectorTracking ) + { + IVAS_VECTOR3 listenerPosition, referencePosition; + if ( ( error = Vector3PairFileReader_read( referenceVectorReader, &listenerPosition, &referencePosition ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading listener and reference positions from %s\n", IVAS_DEC_GetErrorMessage( error ), Vector3PairFileReader_getFilePath( referenceVectorReader ) ); + goto cleanup; + } + + if ( ( error = IVAS_DEC_FeedRefVectorData( hIvasDec, listenerPosition, referencePosition ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedRefVectorData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } + /* Reference rotation */ + if ( arg.enableReferenceRotation ) + { + IVAS_QUATERNION quaternion; + if ( ( error = HeadRotationFileReading( refRotReader, &quaternion, NULL ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading reference rotation from %s\n", IVAS_DEC_GetErrorMessage( error ), + RotationFileReader_getFilePath( refRotReader ) ); + goto cleanup; + } + + if ( ( error = IVAS_DEC_FeedRefRotData( hIvasDec, quaternion ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedRefRotData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } + /* Head-tracking input simulation */ + if ( arg.enableHeadRotation ) + { + IVAS_QUATERNION Quaternions[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; + + for ( i = 0; i < IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) + { + if ( ( error = HeadRotationFileReading( headRotReader, &Quaternions[i], &Pos[i] ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), + RotationFileReader_getFilePath( headRotReader ) ); + goto cleanup; + } + } + + if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions, Pos ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } + + if ( arg.enableExternalOrientation ) + { + IVAS_QUATERNION Quaternions[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; + int8_t enableHeadRotation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; + int8_t enableExternalOrientation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; + int8_t enableRotationInterpolation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; + int16_t numFramesToTargetOrientation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; + + for ( i = 0; i < IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) + { + + if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &Quaternions[i], &enableHeadRotation[i], &enableExternalOrientation[i], &enableRotationInterpolation[i], &numFramesToTargetOrientation[i] ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading external orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), + RotationFileReader_getFilePath( externalOrientationFileReader ) ); + goto cleanup; + } + } + + if ( ( error = IVAS_DEC_FeedExternalOrientationData( hIvasDec, Quaternions, enableHeadRotation, enableExternalOrientation, enableRotationInterpolation, numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedExternalOrientationData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } + + /* Run decoder for one frame (get rendered output) */ + if ( ( error = IVAS_DEC_GetSamples( hIvasDec, pcmBuf, &nOutSamples ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError: could not get samples from decoder: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + /* Continue checking for first good frame until it is found */ + if ( !decodedGoodFrame ) + { + if ( ( error = IVAS_DEC_HasDecodedFirstGoodFrame( hIvasDec, &decodedGoodFrame ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_HasDecodedFirstGoodFrame, code: %d\n", error ); + goto cleanup; + } + + /* Once good frame decoded, catch up */ + if ( decodedGoodFrame ) + { + error = initOnFirstGoodFrame( + hIvasDec, + arg, + numInitialBadFrames, + nOutSamples, + delayNumSamples_orig, + &delayNumSamples, + &delayTimeScale, + &bsFormat, + &afWriter, + &masaWriter, + ismWriters, + &nOutChannels, + &numObj ); + if ( error != IVAS_ERR_OK ) + { + goto cleanup; + } + } + else + { + ++numInitialBadFrames; + } + } + + /* Write current frame */ + if ( decodedGoodFrame ) + { + if ( delayNumSamples < nOutSamples ) + { + if ( ( error = AudioFileWriter_write( afWriter, &pcmBuf[delayNumSamples * nOutChannels], nOutSamples * nOutChannels - ( delayNumSamples * nOutChannels ) ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nOutput audio file writer error\n" ); + goto cleanup; + } + delayNumSamples = 0; + } + else + { + delayNumSamples -= nOutSamples; + } + } + + /* Write ISM metadata to external file(s) */ + if ( decodedGoodFrame && arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) + { + if ( bsFormat == IVAS_DEC_BS_OBJ ) + { + if ( ( error = IVAS_DEC_GetNumObjects( hIvasDec, &numObj ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetNumObjects: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + for ( i = 0; i < numObj; ++i ) + { + IVAS_ISM_METADATA IsmMetadata; + + if ( ( error = IVAS_DEC_GetObjectMetadata( hIvasDec, &IsmMetadata, 0, i ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetObjectMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + if ( ( IsmFileWriter_writeFrame( IsmMetadata, ismWriters[i] ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing ISM metadata to file %s\n", IsmFileWriter_getFilePath( ismWriters[i] ) ); + goto cleanup; + } + } + } + else if ( bsFormat == IVAS_DEC_BS_MASA ) + { + MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta; +#ifdef FIX_470_MASA_JBM_EXT + if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK ) +#else + if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta ) ) != IVAS_ERR_OK ) +#endif + { + fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); + goto cleanup; + } + } + } + + frame++; + if ( !arg.quietModeEnabled ) + { + fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); +#ifdef DEBUGGING + if ( IVAS_DEC_GetBerDetectFlag( hIvasDec ) ) + { + fprintf( stdout, "\n Decoding error: BER detected in frame %d !!!!!\n", frame - 1 ); + } +#endif + } +#ifdef WMOPS + update_mem(); + update_wmops(); +#endif + } + + /*------------------------------------------------------------------------------------------* + * Add zeros at the end to have equal length of synthesized signals + *------------------------------------------------------------------------------------------*/ + + memset( pcmBuf, 0, delayNumSamples_orig[0] * nOutChannels * sizeof( int16_t ) ); + + if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, delayNumSamples_orig[0] * nOutChannels ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing output file: %s\n", ivas_error_to_string( error ) ); + goto cleanup; + } + + /*------------------------------------------------------------------------------------------* + * Printouts after decoding has finished + *------------------------------------------------------------------------------------------*/ + + if ( !arg.quietModeEnabled ) + { + printf( "\n\nDecoder+renderer delay: %4.2f ms (%3u samples at timescale %5u)\n", 1000.f * delayNumSamples_orig[1] / (float) delayTimeScale, delayNumSamples_orig[1], delayTimeScale ); + + if ( delayNumSamples_orig[2] > 0 ) + { + printf( "HRIR/BRIR delay: %4.2f ms (%3u samples at timescale %5u)\n", 1000.f * delayNumSamples_orig[2] / (float) delayTimeScale, delayNumSamples_orig[2], delayTimeScale ); + printf( "Total delay: %4.2f ms (%3u samples at timescale %5u)\n", 1000.f * ( delayNumSamples_orig[1] + delayNumSamples_orig[2] ) / (float) delayTimeScale, delayNumSamples_orig[1] + delayNumSamples_orig[2], delayTimeScale ); + } + } + + /* Print output metadata file name(s) */ + if ( arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) + { + if ( bsFormat == IVAS_DEC_BS_OBJ ) + { + for ( i = 0; i < numObj; i++ ) + { + fprintf( stdout, "\nOutput metadata file: %s", IsmFileWriter_getFilePath( ismWriters[i] ) ); + } + fprintf( stdout, "\n" ); + } + else if ( bsFormat == IVAS_DEC_BS_MASA ) + { + fprintf( stdout, "\nOutput metadata file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); + } + } + + /*------------------------------------------------------------------------------------------* + * Close files and deallocate resources + *------------------------------------------------------------------------------------------*/ + + decodingFailed = false; /* This will stay set to true if cleanup is reached via a goto due to an error */ cleanup: @@ -1983,6 +2605,7 @@ cleanup: return error; } +#endif #ifdef DEBUGGING /*---------------------------------------------------------------------* @@ -2254,7 +2877,9 @@ static ivas_error decodeVoIP( while ( 1 ) { int16_t nOutSamples = 0; +#ifndef API_5MS uint16_t nSamplesAvailableNext = 0; +#endif #ifdef DEBUG_JBM_CMD_OPTION nOutSamples = (int16_t) ( arg.output_Fs / 1000 * arg.frontendFetchSizeMs ); #else @@ -2311,7 +2936,11 @@ static ivas_error decodeVoIP( /* decode and get samples */ - if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, systemTime_ms, &nSamplesAvailableNext + if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, systemTime_ms +#ifndef API_5MS + , + &nSamplesAvailableNext +#endif #ifdef SUPPORT_JBM_TRACEFILE , writeJbmTraceFileFrameWrapper, @@ -2519,6 +3148,7 @@ cleanup: #ifdef DEBUGGING +#ifndef API_5MS #ifdef VARIABLE_SPEED_DECODING /*---------------------------------------------------------------------* * decodeVariableSpeed() @@ -2720,7 +3350,11 @@ static ivas_error decodeVariableSpeed( fprintf( stderr, "\nError: input bitstream file couldn't be read: %s \n\n", arg.inputBitstreamFilename ); goto cleanup; } +#ifdef API_5MS + IVAS_DEC_VoIP_SetScale( hIvasDec, scale, scale ); +#else IVAS_DEC_VoIP_SetScale( hIvasDec, scale ); +#endif } if ( ( error = BS_Reader_ReadFrame_short( hBsReader, bit_stream, &num_bits, &bfi ) ) != IVAS_ERR_OK ) @@ -2980,7 +3614,7 @@ static ivas_error decodeVariableSpeed( } /* decode and get samples */ - if ( ( error = IVAS_DEC_VoIP_Flush( hIvasDec, nOutSamples, pcmBuf, &nSamplesAvailableNext, &nSamplesFlushed ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, pcmBuf, &nSamplesAvailableNext, &nSamplesFlushed ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_VoIP_Flush: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; @@ -3119,7 +3753,7 @@ cleanup: return error; } #endif - +#endif /*---------------------------------------------------------------------* * parseForcedRendModeDec() diff --git a/lib_com/ivas_error.h b/lib_com/ivas_error.h index c86d947125..251be0d38a 100644 --- a/lib_com/ivas_error.h +++ b/lib_com/ivas_error.h @@ -94,6 +94,11 @@ typedef enum #ifdef VARIABLE_SPEED_DECODING IVAS_ERR_VS_FRAME_NEEDED, #endif +#ifdef API_5MS + IVAS_ERR_TSM_NOT_ENABLED, + IVAS_ERR_FETCH_SIZE_NO_MULTIPLE_OF_5MS, + IVAS_ERR_NEED_NEW_FRAME, +#endif #endif /*----------------------------------------* diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index ba48326231..9d7e6b5806 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -311,10 +311,12 @@ void stereo_dmx_evs_close_encoder( STEREO_DMX_EVS_ENC_HANDLE *hStereoDmxEVS /* i/o: Stereo downmix for EVS encoder handle */ ); +#ifndef API_5MS ivas_error ivas_dec( Decoder_Struct *st_ivas, /* i : IVAS decoder structure */ int16_t *data /* o : output synthesis signal */ ); +#endif ivas_error ivas_dec_setup( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ @@ -5172,8 +5174,10 @@ void ivas_binaural_cldfb_sf( void ivas_binRenderer( BINAURAL_RENDERER_HANDLE hBinRenderer, /* i/o: fastconv binaural renderer handle */ COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined head and external orientation handle */ +#ifndef API_5MS int16_t subframe_idx, /* i : subframe index */ - const int16_t numTimeSlots, /* i : number of time slots to process */ +#endif + const int16_t numTimeSlots, /* i: : number of time slots to process */ float Cldfb_RealBuffer_Binaural[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : Binaural signals */ float Cldfb_ImagBuffer_Binaural[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : Binaural signals */ float RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i : LS signals */ diff --git a/lib_com/options.h b/lib_com/options.h old mode 100755 new mode 100644 index 8a4dc67706..c6d3a9c108 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -166,6 +166,11 @@ #define FIX_558_PLC_DISCONT /* FhG: issue 558: fix discontinuities in DFT Stereo when switching from TCX concealment to ACELP */ #define FIX_564 /* Nokia: Issue 564: Fix gains in JBM path for SBA with parametric binaural renderer */ #define FIX_566_2DIR_MASA_384K /* Nokia: Issued 566: Bugfix in 384k MASA metadata encoding of second direction */ +#define FIX_XXX_JITTER_SBA_BINAURAL_GAIN +#define FIX_XXX_HEADTRACKER_INIT +#define FIX_XXX_TDOBJRENDERER_INPUT +#define FIX_XXX_ISM_SBA_ASAN +#define API_5MS /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index 5bd09236e0..efc3b11215 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -994,7 +994,11 @@ void ivas_binaural_cldfb( } /* Implement binaural rendering */ +#ifdef API_5MS + ivas_binRenderer( st_ivas->hBinRenderer, st_ivas->hCombinedOrientationData, JBM_CLDFB_SLOTS_IN_SUBFRAME, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer ); +#else ivas_binRenderer( st_ivas->hBinRenderer, st_ivas->hCombinedOrientationData, subframeIdx, JBM_CLDFB_SLOTS_IN_SUBFRAME, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer ); +#endif /* Implement CLDFB synthesis */ for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) @@ -1086,8 +1090,11 @@ void ivas_binaural_cldfb_sf( } /* Implement binaural rendering */ +#ifdef API_5MS + ivas_binRenderer( st_ivas->hBinRenderer, st_ivas->hCombinedOrientationData, st_ivas->hTcBuffer->subframe_nbslots[subframeIdx], Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer ); +#else ivas_binRenderer( st_ivas->hBinRenderer, st_ivas->hCombinedOrientationData, subframeIdx, st_ivas->hTcBuffer->subframe_nbslots[subframeIdx], Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer ); - +#endif /* Implement CLDFB synthesis */ for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) { @@ -1122,7 +1129,9 @@ void ivas_binaural_cldfb_sf( void ivas_binRenderer( BINAURAL_RENDERER_HANDLE hBinRenderer, /* i/o: binaural renderer handle */ COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined head and external orientation handle*/ +#ifndef API_5MS int16_t subframe_idx, /* i : subframe index */ +#endif const int16_t numTimeSlots, /* i : number of time slots to render */ float Cldfb_RealBuffer_Binaural[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : Binaural signals */ float Cldfb_ImagBuffer_Binaural[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : Binaural signals */ @@ -1146,25 +1155,40 @@ void ivas_binRenderer( } /* Head rotation in HOA3 or CICPx */ - if ( - hCombinedOrientationData != NULL && hCombinedOrientationData->enableCombinedOrientation[subframe_idx] && hBinRenderer->rotInCldfb ) +#ifdef API_5MS + if ( hCombinedOrientationData != NULL && hCombinedOrientationData->enableCombinedOrientation && hBinRenderer->rotInCldfb ) +#else + if ( hCombinedOrientationData != NULL && hCombinedOrientationData->enableCombinedOrientation[subframe_idx] && hBinRenderer->rotInCldfb ) +#endif { if ( hBinRenderer->hInputSetup->is_loudspeaker_setup == 0 ) { /* Rotation in SHD (HOA3) */ if ( hCombinedOrientationData->shd_rot_max_order == -1 ) { +#ifdef API_5MS + rotateFrame_shd_cldfb( RealBuffer, ImagBuffer, hCombinedOrientationData->Rmat, hBinRenderer->hInputSetup->nchan_out_woLFE, numTimeSlots, 3 ); +#else rotateFrame_shd_cldfb( RealBuffer, ImagBuffer, hCombinedOrientationData->Rmat[subframe_idx], hBinRenderer->hInputSetup->nchan_out_woLFE, numTimeSlots, 3 ); +#endif } else if ( hCombinedOrientationData->shd_rot_max_order > 0 ) { +#ifdef API_5MS + rotateFrame_shd_cldfb( RealBuffer, ImagBuffer, hCombinedOrientationData->Rmat, hBinRenderer->hInputSetup->nchan_out_woLFE, numTimeSlots, hCombinedOrientationData->shd_rot_max_order ); +#else rotateFrame_shd_cldfb( RealBuffer, ImagBuffer, hCombinedOrientationData->Rmat[subframe_idx], hBinRenderer->hInputSetup->nchan_out_woLFE, numTimeSlots, hCombinedOrientationData->shd_rot_max_order ); +#endif } } else { /* Rotation in SD (CICPx) */ +#ifdef API_5MS + rotateFrame_sd_cldfb( hCombinedOrientationData->Rmat, RealBuffer, ImagBuffer, hBinRenderer->hInputSetup, hBinRenderer->hEFAPdata, numTimeSlots, hBinRenderer->conv_band ); +#else rotateFrame_sd_cldfb( hCombinedOrientationData->Rmat[subframe_idx], RealBuffer, ImagBuffer, hBinRenderer->hInputSetup, hBinRenderer->hEFAPdata, numTimeSlots, hBinRenderer->conv_band ); +#endif } } diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index 02c74efa37..1f588ac2cc 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -32,6 +32,7 @@ #include #include "options.h" +#ifndef API_5MS #include "cnst.h" #include "ivas_cnst.h" #include "rom_com.h" @@ -760,3 +761,4 @@ ivas_error ivas_dec( pop_wmops(); return error; } +#endif \ No newline at end of file diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index fc24c8bdef..f692ef1931 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1053,7 +1053,11 @@ ivas_error ivas_dirac_dec_config( /* allocate transport channels*/ if ( flag_config == DIRAC_OPEN ) { +#ifdef API_5MS + if ( st_ivas->hTcBuffer == NULL ) +#else if ( st_ivas->hDecoderConfig->voip_active == 1 && st_ivas->hTcBuffer == NULL ) +#endif { if ( st_ivas->ivas_format == SBA_FORMAT ) { @@ -2261,12 +2265,12 @@ void ivas_dirac_dec( *------------------------------------------------------------------------*/ void ivas_dirac_dec_render( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ - const int16_t nchan_transport, /* i : number of transport channels */ - const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ - uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ - uint16_t *nSamplesAvailable, /* o : number of CLDFB slots still to render */ - float *output_f[] /* o : rendered time signal */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const int16_t nchan_transport, /* i : number of transport channels */ + const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ + uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ + uint16_t *nSamplesAvailableNext, /* o : number of CLDFB slots still to render */ + float *output_f[] /* o : rendered time signal */ ) { int16_t slots_to_render, first_sf, last_sf, subframe_idx; @@ -2323,7 +2327,7 @@ void ivas_dirac_dec_render( } } - *nSamplesAvailable = ( hDirAC->num_slots - hDirAC->slots_rendered ) * slot_size; + *nSamplesAvailableNext = ( hDirAC->num_slots - hDirAC->slots_rendered ) * slot_size; return; } @@ -2447,9 +2451,17 @@ void ivas_dirac_dec_render_sf( set_zero( onset_filter_subframe, hDirAC->num_freq_bands ); } +#ifdef API_5MS + if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation ) +#else if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation[subframe_idx] ) +#endif { +#ifdef API_5MS + p_Rmat = &st_ivas->hCombinedOrientationData->Rmat[0][0]; +#else p_Rmat = &st_ivas->hCombinedOrientationData->Rmat[subframe_idx][0][0]; +#endif if ( st_ivas->hCombinedOrientationData->shd_rot_max_order == 0 ) { @@ -2513,7 +2525,11 @@ void ivas_dirac_dec_render_sf( set_zero( surCohRatio, hDirAC->num_freq_bands ); } } +#ifdef API_5MS + if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation && st_ivas->hCombinedOrientationData->shd_rot_max_order == 1 ) +#else if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation[subframe_idx] && st_ivas->hCombinedOrientationData->shd_rot_max_order == 1 ) +#endif { ivas_dirac_dec_compute_directional_responses( hDirAC, st_ivas->hVBAPdata, @@ -2606,7 +2622,11 @@ void ivas_dirac_dec_render_sf( if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) { +#ifdef API_5MS + if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation && st_ivas->hCombinedOrientationData->shd_rot_max_order == 0 ) +#else if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation[subframe_idx] && st_ivas->hCombinedOrientationData->shd_rot_max_order == 0 ) +#endif { protoSignalComputation_shd( Cldfb_RealBuffer, Cldfb_ImagBuffer, hDirAC->h_output_synthesis_psd_state.proto_direct_buffer_f, @@ -2837,8 +2857,12 @@ void ivas_dirac_dec_render_sf( ivas_dirac_dec_compute_diffuse_proto( hDirAC, slot_idx ); } - /*Compute PSDs*/ +/*Compute PSDs*/ +#ifdef API_5MS + if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation && st_ivas->hCombinedOrientationData->shd_rot_max_order > 0 ) +#else if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation[subframe_idx] && st_ivas->hCombinedOrientationData->shd_rot_max_order > 0 ) +#endif { ivas_dirac_dec_output_synthesis_process_slot( reference_power, p_onset_filter, @@ -2929,7 +2953,9 @@ void ivas_dirac_dec_render_sf( /* Perform binaural rendering */ ivas_binRenderer( st_ivas->hBinRenderer, st_ivas->hCombinedOrientationData, +#ifndef API_5MS subframe_idx, +#endif hDirAC->subframe_nbslots[subframe_idx], Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 3c0370c880..f23bac7367 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -618,6 +618,12 @@ ivas_error ivas_init_decoder_front( { return error; } +#ifdef FIX_XXX_HEADTRACKER_INIT + if ( ( error = ivas_orient_trk_SetTrackingType( st_ivas->hHeadTrackData->OrientationTracker, st_ivas->hDecoderConfig->orientation_tracking ) ) != IVAS_ERR_OK ) + { + return error; + } +#endif } /*-------------------------------------------------------------------* @@ -786,6 +792,7 @@ ivas_error ivas_init_decoder( } } +#ifndef FIX_XXX_HEADTRACKER_INIT /*-----------------------------------------------------------------* * Set head/orientation tracking *-----------------------------------------------------------------*/ @@ -797,7 +804,7 @@ ivas_error ivas_init_decoder( return error; } } - +#endif /*-----------------------------------------------------------------* * Allocate and initialize SCE/CPE and other handles *-----------------------------------------------------------------*/ @@ -1289,7 +1296,9 @@ ivas_error ivas_init_decoder( } } +#ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active ) +#endif { granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ); n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels( st_ivas ); @@ -1332,7 +1341,9 @@ ivas_error ivas_init_decoder( st_ivas->binaural_latency_ns = st_ivas->hCrendWrapper->binaural_latency_ns; +#ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active ) +#endif { granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ); n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels( st_ivas ); @@ -1436,8 +1447,11 @@ ivas_error ivas_init_decoder( /*-----------------------------------------------------------------* * Allocate and initialize JBM struct + buffer *-----------------------------------------------------------------*/ - +#ifdef API_5MS + if ( st_ivas->hTcBuffer == NULL ) +#else if ( st_ivas->hDecoderConfig->voip_active && st_ivas->hTcBuffer == NULL ) +#endif { /* no module has yet open the TC buffer, open a default one */ n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels( st_ivas ); @@ -1448,6 +1462,7 @@ ivas_error ivas_init_decoder( } } +#ifndef API_5MS if ( st_ivas->hTcBuffer == NULL ) { /* we need the handle anyway, but without the buffer*/ @@ -1456,6 +1471,7 @@ ivas_error ivas_init_decoder( return error; } } +#endif #ifdef FIX_470_MASA_JBM_EXT if ( st_ivas->hJbmMetadata == NULL ) diff --git a/lib_dec/ivas_ism_dec.c b/lib_dec/ivas_ism_dec.c index 6da3c05e75..64c00effb7 100644 --- a/lib_dec/ivas_ism_dec.c +++ b/lib_dec/ivas_ism_dec.c @@ -119,7 +119,9 @@ static ivas_error ivas_ism_bitrate_switching( ivas_output_init( &( st_ivas->hIntSetup ), st_ivas->hDecoderConfig->output_config ); } +#ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active ) +#endif { /* transfer subframe info from DirAC or ParamMC to central tc buffer */ if ( last_ism_mode == ISM_MODE_PARAM && st_ivas->hDirAC != NULL && ( st_ivas->renderer_type != RENDERER_MONO_DOWNMIX && st_ivas->renderer_type != RENDERER_DISABLE ) ) @@ -290,8 +292,9 @@ static ivas_error ivas_ism_bitrate_switching( /*-----------------------------------------------------------------* * Reconfigure TC buffer *-----------------------------------------------------------------*/ - +#ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active == 1 ) +#endif { int16_t tc_nchan_full_new; DECODER_TC_BUFFER_HANDLE hTcBuffer; diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 2497f5ab98..f73b40b666 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -516,7 +516,11 @@ ivas_error ivas_param_ism_dec_open( if ( !( output_config == AUDIO_CONFIG_MONO || output_config == AUDIO_CONFIG_STEREO ) ) { /* Initialize Param ISM Rendering handle */ +#ifdef API_5MS + if ( st_ivas->hDecoderConfig->tsm_active ) +#else if ( st_ivas->hDecoderConfig->voip_active ) +#endif { if ( ( error = ivas_param_ism_rendering_init( hDirAC->hParamIsmRendering, hOutSetup, st_ivas->nchan_transport, MAX_JBM_CLDFB_TIMESLOTS, output_config ) ) != IVAS_ERR_OK ) { @@ -568,7 +572,9 @@ ivas_error ivas_param_ism_dec_open( st_ivas->hDirAC = hDirAC; +#ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active ) +#endif { if ( st_ivas->renderer_type != RENDERER_MONO_DOWNMIX && st_ivas->renderer_type != RENDERER_DISABLE ) { @@ -582,7 +588,31 @@ ivas_error ivas_param_ism_dec_open( } else { +#ifdef API_5MS + int16_t n_slots_to_alloc; + if ( st_ivas->hDecoderConfig->tsm_active == 1 ) + { + n_slots_to_alloc = MAX_JBM_CLDFB_TIMESLOTS; + } + else + { + n_slots_to_alloc = CLDFB_SLOTS_PER_SUBFRAME * MAX_PARAM_SPATIAL_SUBFRAMES; + } + if ( ( hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc = (float *) malloc( n_slots_to_alloc * nchan_transport * hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) + + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM JBM Rendering handle\n" ) ); + } + set_zero( hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc, n_slots_to_alloc * nchan_transport * hDirAC->num_freq_bands ); + + if ( ( hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc = (float *) malloc( n_slots_to_alloc * nchan_transport * hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM JBM Rendering handle\n" ) ); + } + set_zero( hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc, n_slots_to_alloc * nchan_transport * hDirAC->num_freq_bands ); +#else if ( ( hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc = (float *) malloc( MAX_JBM_CLDFB_TIMESLOTS * nchan_transport * hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) + { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM JBM Rendering handle\n" ) ); } @@ -593,6 +623,7 @@ ivas_error ivas_param_ism_dec_open( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM JBM Rendering handle\n" ) ); } set_zero( hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc, MAX_JBM_CLDFB_TIMESLOTS * nchan_transport * hDirAC->num_freq_bands ); +#endif } if ( st_ivas->hTcBuffer == NULL ) { @@ -616,11 +647,13 @@ ivas_error ivas_param_ism_dec_open( } } } +#ifndef API_5MS else { hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc = NULL; hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc = NULL; } +#endif pop_wmops(); return error; @@ -1362,7 +1395,7 @@ void ivas_param_ism_dec_render( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ - uint16_t *nSamplesAvailable, /* o : number of CLDFB slots still to render */ + uint16_t *nSamplesAvailableNext, /* o : number of CLDFB slots still to render */ float *output_f[] /* o : rendered time signal */ ) { @@ -1444,7 +1477,7 @@ void ivas_param_ism_dec_render( } } - *nSamplesAvailable = ( hDirAC->num_slots - hDirAC->slots_rendered ) * slot_size; + *nSamplesAvailableNext = ( hDirAC->num_slots - hDirAC->slots_rendered ) * slot_size; return; } diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index 77563629ae..037f4a8b50 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -82,7 +82,11 @@ ivas_error ivas_ism_renderer_open( set_f( st_ivas->hIsmRendererData->gains[i], 0.0f, MAX_OUTPUT_CHANNELS ); } +#ifdef API_5MS + if ( st_ivas->hDecoderConfig->tsm_active ) +#else if ( st_ivas->hDecoderConfig->voip_active ) +#endif { init_interpolator_length = NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_CLDFB_TIMESLOTS * CLDFB_SLOT_NS ); interpolator_length = (uint16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); @@ -155,9 +159,17 @@ void ivas_ism_render( else { /* Combined rotation: rotate the object positions depending the head and external orientations */ +#ifdef API_5MS + if ( st_ivas->hCombinedOrientationData != NULL && st_ivas->hCombinedOrientationData->enableCombinedOrientation == 1 ) +#else if ( st_ivas->hCombinedOrientationData != NULL && st_ivas->hCombinedOrientationData->enableCombinedOrientation[0] == 1 ) +#endif { +#ifdef API_5MS + rotateAziEle( st_ivas->hIsmMetaData[i]->azimuth, st_ivas->hIsmMetaData[i]->elevation, &azimuth, &elevation, st_ivas->hCombinedOrientationData->Rmat, st_ivas->hIntSetup.is_planar_setup ); +#else rotateAziEle( st_ivas->hIsmMetaData[i]->azimuth, st_ivas->hIsmMetaData[i]->elevation, &azimuth, &elevation, st_ivas->hCombinedOrientationData->Rmat[0], st_ivas->hIntSetup.is_planar_setup ); +#endif } else { @@ -238,7 +250,11 @@ void ivas_ism_render_sf( set_f( output_f[i], 0.0f, n_samples_to_render ); } +#ifdef API_5MS + if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation ) +#else if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation[0] ) +#endif { ivas_jbm_dec_get_adapted_linear_interpolator( n_samples_to_render, n_samples_to_render, @@ -250,9 +266,17 @@ void ivas_ism_render_sf( { /* Combined rotation: rotate the object positions depending the head and external orientations */ +#ifdef API_5MS + if ( st_ivas->hCombinedOrientationData != NULL && st_ivas->hCombinedOrientationData->enableCombinedOrientation == 1 ) +#else if ( st_ivas->hCombinedOrientationData != NULL && st_ivas->hCombinedOrientationData->enableCombinedOrientation[0] == 1 ) +#endif { +#ifdef API_5MS + rotateAziEle( st_ivas->hIsmMetaData[i]->azimuth, st_ivas->hIsmMetaData[i]->elevation, &azimuth, &elevation, st_ivas->hCombinedOrientationData->Rmat, st_ivas->hIntSetup.is_planar_setup ); +#else rotateAziEle( st_ivas->hIsmMetaData[i]->azimuth, st_ivas->hIsmMetaData[i]->elevation, &azimuth, &elevation, st_ivas->hCombinedOrientationData->Rmat[0], st_ivas->hIntSetup.is_planar_setup ); +#endif if ( st_ivas->hEFAPdata != NULL ) { efap_determine_gains( st_ivas->hEFAPdata, st_ivas->hIsmRendererData->gains[i], azimuth, elevation, EFAP_MODE_EFAP ); @@ -281,7 +305,11 @@ void ivas_ism_render_sf( } /* update here only in case of head rotation */ +#ifdef API_5MS + if ( st_ivas->hCombinedOrientationData != NULL && st_ivas->hCombinedOrientationData->enableCombinedOrientation == 1 ) +#else if ( st_ivas->hCombinedOrientationData != NULL && st_ivas->hCombinedOrientationData->enableCombinedOrientation[0] == 1 ) +#endif { st_ivas->hIsmRendererData->prev_gains[i][j] = gain; } diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 858d78ab28..42c834c70f 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -476,6 +476,21 @@ ivas_error ivas_jbm_dec_tc( ivas_mono_stereo_downmix_mcmasa( st_ivas, output, output_frame ); } } +#ifdef API_5MS + else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) + { + + /* at least decode everything here, the rest is ToDo, for this we just output zeroes atm */ + ivas_lfe_dec( st_ivas->hLFE, st, output_frame, st_ivas->bfi, output_lfe_ch ); + + ivas_mc_paramupmix_dec_read_BS( st_ivas, st, st_ivas->hMCParamUpmix, &nb_bits_metadata[0] ); + + if ( ( error = ivas_mct_dec( st_ivas, output, output_frame, nb_bits_metadata[0] ) ) != IVAS_ERR_OK ) + { + return error; + } + } +#endif } @@ -848,6 +863,18 @@ ivas_error ivas_jbm_dec_render( { ivas_param_mc_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); } +#ifdef API_5MS + else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) + { + /* zero output for now, not yet implemented... */ + int16_t ch; + *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); + for ( ch = 0; ch < nchan_out; ch++ ) + { + set_zero( p_output[ch], *nSamplesRendered ); + } + } +#endif else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) { int16_t offset = st_ivas->hDirAC->slots_rendered * st_ivas->hDirAC->slot_size; @@ -1417,6 +1444,12 @@ int16_t ivas_jbm_dec_get_num_tc_channels( } } } +#ifdef API_5MS + else if ( st_ivas->ivas_format == MONO_FORMAT && st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) + { + num_tc = MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN; + } +#endif return num_tc; } @@ -1570,9 +1603,26 @@ ivas_error ivas_jbm_dec_tc_buffer_open( } else { +#ifdef API_5MS + int16_t n_samp_full, n_samp_residual; +#else int16_t n_samp_full = ( NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_L_FRAME_NS ) + hTcBuffer->n_samples_granularity - 1 ); int16_t n_samp_residual = hTcBuffer->n_samples_granularity - 1; +#endif int32_t offset; +#ifdef API_5MS + if ( st_ivas->hDecoderConfig->tsm_active ) + { + n_samp_full = ( NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_L_FRAME_NS ) + hTcBuffer->n_samples_granularity - 1 ); + n_samp_residual = hTcBuffer->n_samples_granularity - 1; + } + else + { + n_samp_full = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + n_samp_residual = 0; + } +#endif + nsamp_to_allocate = hTcBuffer->nchan_buffer_full * n_samp_full; nsamp_to_allocate += nchan_residual * n_samp_residual; @@ -1676,8 +1726,21 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( /* realloc buffers */ free( hTcBuffer->tc_buffer ); +#ifdef API_5MS + if ( st_ivas->hDecoderConfig->tsm_active ) + { + n_samp_full = ( NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_L_FRAME_NS ) + hTcBuffer->n_samples_granularity - 1 ); + n_samp_residual = hTcBuffer->n_samples_granularity - 1; + } + else + { + n_samp_full = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + n_samp_residual = 0; + } +#else n_samp_full = ( NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_L_FRAME_NS ) + hTcBuffer->n_samples_granularity - 1 ); n_samp_residual = hTcBuffer->n_samples_granularity - 1; +#endif nsamp_to_allocate = hTcBuffer->nchan_buffer_full * n_samp_full; nsamp_to_allocate += nchan_residual * n_samp_residual; @@ -1859,9 +1922,24 @@ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode( case RENDERER_PARAM_ISM: case RENDERER_BINAURAL_MIXER_CONV: case RENDERER_BINAURAL_MIXER_CONV_ROOM: +#ifdef API_5MS + buffer_mode = TC_BUFFER_MODE_RENDERER; + break; + case RENDERER_NON_DIEGETIC_DOWNMIX: + if ( st_ivas->ivas_format == MONO_FORMAT ) + { + buffer_mode = TC_BUFFER_MODE_BUFFER; + } + else + { + buffer_mode = TC_BUFFER_MODE_RENDERER; + } + break; +#else case RENDERER_NON_DIEGETIC_DOWNMIX: buffer_mode = TC_BUFFER_MODE_RENDERER; break; +#endif case RENDERER_MC_PARAMMC: if ( st_ivas->hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) { diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index 0576fe8121..bc519c5766 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -384,7 +384,11 @@ ivas_error ivas_masa_dec_open( st_ivas->hMasa = hMasa; /* allocate transport channels*/ +#ifdef API_5MS + if ( st_ivas->hTcBuffer == NULL && st_ivas->renderer_type != RENDERER_DISABLE && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) +#else if ( st_ivas->hDecoderConfig->voip_active == 1 && st_ivas->hTcBuffer == NULL && st_ivas->renderer_type != RENDERER_DISABLE && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) +#endif { int16_t nchan_to_allocate; TC_BUFFER_MODE buffer_mode; @@ -1076,7 +1080,9 @@ ivas_error ivas_masa_dec_reconfigure( ivas_masa_set_elements( ivas_total_brate, st_ivas->mc_mode, st_ivas->nchan_transport, st_ivas->hQMetaData, &tmp, &tmp, &tmp ); +#ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active == 1 ) +#endif { int16_t tc_nchan_to_allocate; int16_t tc_nchan_transport; diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index 32fbf135ba..16159ad005 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -459,7 +459,11 @@ ivas_error ivas_param_mc_dec_open( ivas_param_mc_dec_init( hParamMC, nchan_transport, nchan_out_cov ); +#ifdef API_5MS + if ( hParamMC->synthesis_conf != PARAM_MC_SYNTH_MONO_STEREO ) +#else if ( st_ivas->hDecoderConfig->voip_active && hParamMC->synthesis_conf != PARAM_MC_SYNTH_MONO_STEREO ) +#endif { if ( ( hParamMC->Cldfb_RealBuffer_tc = (float *) malloc( MAX_JBM_CLDFB_TIMESLOTS * nchan_transport * hParamMC->num_freq_bands * sizeof( float ) ) ) == NULL ) { @@ -1537,11 +1541,11 @@ void ivas_param_mc_dec_digest_tc( *------------------------------------------------------------------------*/ void ivas_param_mc_dec_render( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ - const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ - uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ - uint16_t *nSamplesAvailable, /* o : number of CLDFB slots still to render */ - float *output_f[] /* o : rendered time signal */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ + uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ + uint16_t *nSamplesAvailableNext, /* o : number of CLDFB slots still to render */ + float *output_f[] /* o : rendered time signal */ ) { PARAM_MC_DEC_HANDLE hParamMC; @@ -1751,7 +1755,10 @@ void ivas_param_mc_dec_render( if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { ivas_binRenderer( st_ivas->hBinRenderer, - st_ivas->hCombinedOrientationData, subframe_idx, + st_ivas->hCombinedOrientationData, +#ifndef API_5MS + subframe_idx, +#endif hParamMC->subframe_nbslots[subframe_idx], Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer ); } @@ -1807,7 +1814,7 @@ void ivas_param_mc_dec_render( param_mc_update_mixing_matrices( hParamMC, hParamMC->h_output_synthesis_cov_state.mixing_matrix, hParamMC->h_output_synthesis_cov_state.mixing_matrix_res, nchan_transport, nchan_out_cov ); } hParamMC->subframes_rendered = last_sf; - *nSamplesAvailable = ( hParamMC->num_slots - hParamMC->slots_rendered ) * NS2SA( output_Fs, CLDFB_SLOT_NS ); + *nSamplesAvailableNext = ( hParamMC->num_slots - hParamMC->slots_rendered ) * NS2SA( output_Fs, CLDFB_SLOT_NS ); pop_wmops(); return; @@ -1828,7 +1835,7 @@ void ivas_param_mc_dec( PARAM_MC_DEC_HANDLE hParamMC; float Cldfb_RealBuffer_in[PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_NSLOTS * CLDFB_NO_CHANNELS_MAX]; float Cldfb_ImagBuffer_in[PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_NSLOTS * CLDFB_NO_CHANNELS_MAX]; - uint16_t nSamplesAsked, nSamplesAvailable, nSamplesRendered; + uint16_t nSamplesAsked, nSamplesAvailableNext, nSamplesRendered; hParamMC = st_ivas->hParamMC; assert( hParamMC ); @@ -1840,10 +1847,10 @@ void ivas_param_mc_dec( nSamplesAsked = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); ivas_param_mc_dec_digest_tc( st_ivas, DEFAULT_JBM_CLDFB_TIMESLOTS, output_f ); - ivas_param_mc_dec_render( st_ivas, nSamplesAsked, &nSamplesRendered, &nSamplesAvailable, output_f ); + ivas_param_mc_dec_render( st_ivas, nSamplesAsked, &nSamplesRendered, &nSamplesAvailableNext, output_f ); #ifdef DEBUGGING assert( nSamplesRendered == nSamplesAsked ); - assert( nSamplesAvailable == 0 ); + assert( nSamplesAvailableNext == 0 ); #endif /* set handle pointers back to NULL */ diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index 51d6856987..e52f30e9d0 100755 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -726,7 +726,9 @@ static ivas_error ivas_mc_dec_reconfig( /* side effect of the renderer selection can be a changed internal config */ ivas_output_init( &( st_ivas->hIntSetup ), st_ivas->intern_config ); +#ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active ) +#endif { /* transfer subframe info from DirAC or ParamMC to central tc buffer */ if ( last_mc_mode == MC_MODE_PARAMMC ) @@ -1259,8 +1261,9 @@ static ivas_error ivas_mc_dec_reconfig( /*-----------------------------------------------------------------* * Reconfigure TC buffer *-----------------------------------------------------------------*/ - +#ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active == 1 ) +#endif { int16_t tc_nchan_full_new; DECODER_TC_BUFFER_HANDLE hTcBuffer; diff --git a/lib_dec/ivas_objectRenderer_internal.c b/lib_dec/ivas_objectRenderer_internal.c index 3be8a2c62e..3802c4fc09 100644 --- a/lib_dec/ivas_objectRenderer_internal.c +++ b/lib_dec/ivas_objectRenderer_internal.c @@ -86,9 +86,15 @@ ivas_error ivas_td_binaural_renderer( st_ivas->transport_config, st_ivas->hBinRendererTd, st_ivas->nchan_transport, LFE_CHANNEL, st_ivas->ivas_format, st_ivas->hIsmMetaData, +#ifdef API_5MS + ( st_ivas->hCombinedOrientationData != NULL ) ? &st_ivas->hCombinedOrientationData->enableCombinedOrientation : NULL, + ( st_ivas->hCombinedOrientationData != NULL ) ? &st_ivas->hCombinedOrientationData->Quaternion : NULL, + ( st_ivas->hCombinedOrientationData != NULL ) ? &st_ivas->hCombinedOrientationData->listenerPos : NULL, +#else ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->enableCombinedOrientation : NULL, ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->Quaternions : NULL, ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->listenerPos : NULL, +#endif ism_md_subframe_update, output, output_frame ); } @@ -178,10 +184,17 @@ ivas_error ivas_td_binaural_renderer_sf( } /* Update the listener's location/orientation */ +#ifdef API_5MS + TDREND_Update_listener_orientation( st_ivas->hBinRendererTd, + ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->enableCombinedOrientation : 0, + ( st_ivas->hCombinedOrientationData != NULL ) ? &st_ivas->hCombinedOrientationData->Quaternion : NULL, + ( st_ivas->hCombinedOrientationData != NULL ) ? &st_ivas->hCombinedOrientationData->listenerPos : NULL ); +#else TDREND_Update_listener_orientation( st_ivas->hBinRendererTd, ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->enableCombinedOrientation[subframe_idx] : 0, ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->Quaternions : NULL, ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->listenerPos : NULL ); +#endif if ( st_ivas->hRenderConfig != NULL && st_ivas->hIntSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { @@ -192,7 +205,7 @@ ivas_error ivas_td_binaural_renderer_sf( } /* Render subframe */ - if ( ( error = TDREND_GetMix( st_ivas->hBinRendererTd, output_f_local, output_frame, 0, ism_md_subframe_update_jbm ) ) != IVAS_ERR_OK ) + if ( ( error = TDREND_GetMix( st_ivas->hBinRendererTd, output_f_local, output_frame, 0, ism_md_subframe_update_jbm != subframe_idx ) ) != IVAS_ERR_OK ) { return error; } diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 22258a9365..50bb1b3ddf 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -348,7 +348,9 @@ ivas_error ivas_sba_dec_reconfigure( * JBM TC buffer *-----------------------------------------------------------------*/ +#ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active == 1 ) +#endif { int16_t tc_nchan_to_allocate; int16_t tc_nchan_tc; @@ -472,7 +474,7 @@ void ivas_sba_dec_render( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ - uint16_t *nSamplesAvailable, /* o : number of CLDFB slots still to render */ + uint16_t *nSamplesAvailableNext, /* o : number of CLDFB slots still to render */ float *output_f[] /* o : rendered time signal */ ) { @@ -539,7 +541,7 @@ void ivas_sba_dec_render( } } - *nSamplesAvailable = ( hSpar->num_slots - hSpar->slots_rendered ) * slot_size; + *nSamplesAvailableNext = ( hSpar->num_slots - hSpar->slots_rendered ) * slot_size; return; } diff --git a/lib_dec/ivas_sba_rendering_internal.c b/lib_dec/ivas_sba_rendering_internal.c index 6f3dd13b7a..8e92a1f622 100644 --- a/lib_dec/ivas_sba_rendering_internal.c +++ b/lib_dec/ivas_sba_rendering_internal.c @@ -365,15 +365,22 @@ void ivas_ism2sba_sf( for ( j = 0; j < sba_num_chans; j++ ) { g2 = hIsmRendererData->interpolator + offset; +#ifndef FIX_XXX_ISM_SBA_ASAN g1 = 1 - *g2; +#endif tc = buffer_in[i] + offset; out = buffer_out[j]; gain = hIsmRendererData->gains[i][j]; prev_gain = hIsmRendererData->prev_gains[i][j]; for ( k = 0; k < n_samples_to_render; k++ ) { +#ifdef FIX_XXX_ISM_SBA_ASAN + g1 = 1.0f - *g2; +#endif *( out++ ) += ( ( *( g2++ ) ) * gain + g1 * prev_gain ) * ( *( tc++ ) ); +#ifndef FIX_XXX_ISM_SBA_ASAN g1 = 1.0f - *g2; +#endif } } } diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index 9d4d67393f..df60891a58 100755 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -213,7 +213,11 @@ ivas_error ivas_spar_dec_open( } /* allocate transport channels*/ +#ifdef API_5MS + if ( st_ivas->hTcBuffer == NULL ) +#else if ( st_ivas->hDecoderConfig->voip_active == 1 && st_ivas->hTcBuffer == NULL ) +#endif { int16_t nchan_to_allocate; int16_t nchan_tc; diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index 315cfbad66..941ff4e6d4 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -1194,7 +1194,11 @@ typedef struct decoder_config_structure #ifdef DEBUGGING int16_t force_rend; /* forced TD/CLDFB binaural renderer (for ISM and MC) */ #endif +#ifdef API_5MS + int16_t tsm_active; +#else int16_t voip_active; +#endif int16_t Opt_delay_comp; /* flag indicating delay compensation active */ } DECODER_CONFIG, *DECODER_CONFIG_HANDLE; diff --git a/lib_dec/jbm_jb4sb.h b/lib_dec/jbm_jb4sb.h index 00f5ccbb40..599730975d 100644 --- a/lib_dec/jbm_jb4sb.h +++ b/lib_dec/jbm_jb4sb.h @@ -77,13 +77,13 @@ struct JB4_DATAUNIT int16_t partialCopyOffset; int16_t nextCoderType; }; - +#ifndef API_5MS typedef enum { JBM_RENDERER_NONE, JBM_RENDERER_IVAS, } JBM_RENDERER_TYPE; - +#endif typedef struct JB4_DATAUNIT *JB4_DATAUNIT_HANDLE; diff --git a/lib_dec/jbm_pcmdsp_fifo.c b/lib_dec/jbm_pcmdsp_fifo.c index a3e8936464..d3c93679fe 100644 --- a/lib_dec/jbm_pcmdsp_fifo.c +++ b/lib_dec/jbm_pcmdsp_fifo.c @@ -38,6 +38,7 @@ #include #include "options.h" +#ifndef API_5MS #include "prot.h" #include "ivas_prot.h" #ifdef DEBUGGING @@ -267,3 +268,4 @@ uint16_t pcmdsp_fifo_nReadableSamplesPerChannel( { return h->size; } +#endif \ No newline at end of file diff --git a/lib_dec/jbm_pcmdsp_fifo.h b/lib_dec/jbm_pcmdsp_fifo.h index b601cc2e0e..62ebc15d08 100644 --- a/lib_dec/jbm_pcmdsp_fifo.h +++ b/lib_dec/jbm_pcmdsp_fifo.h @@ -41,7 +41,7 @@ #include #include "options.h" - +#ifndef API_5MS /** Ringbuffer (FIFO) with fixed capacity for audio samples. */ struct PCMDSP_FIFO @@ -81,5 +81,5 @@ int16_t pcmdsp_fifo_write_zero( PCMDSP_FIFO_HANDLE h, uint16_t nSamplesPerChanne int16_t pcmdsp_fifo_read( PCMDSP_FIFO_HANDLE h, uint16_t nSamplesPerChannel, uint8_t *samples ); uint16_t pcmdsp_fifo_nReadableSamplesPerChannel( const PCMDSP_FIFO_HANDLE h ); - +#endif #endif /* JBM_PCMDSP_FIFO_H */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 5cc4bdd9b9..1e4dd48a60 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -53,11 +53,16 @@ struct IVAS_DEC_VOIP { uint16_t nSamplesFrame; /* Total number of samples in a frame (includes number of channels) */ JB4_HANDLE hJBM; +#ifndef API_5MS PCMDSP_APA_HANDLE hTimeScaler; +#endif uint16_t lastDecodedWasActive; - float *apaExecBuffer; /* Buffer for APA scaling */ +#ifndef API_5MS + float *apaExecBuffer; /* Buffer for APA scaling */ +#endif JB4_DATAUNIT_HANDLE hCurrentDataUnit; /* Points to the currently processed data unit */ uint16_t *bs_conversion_buf; /* Buffer for bitstream conversion from packed to serial */ +#ifndef API_5MS #ifdef VARIABLE_SPEED_DECODING IVAS_DEC_VOIP_MODE voipMode; uint16_t speedFac; @@ -67,6 +72,7 @@ struct IVAS_DEC_VOIP PCMDSP_FIFO_HANDLE hFifoOut; uint8_t nTransportChannelsOld; uint16_t nSamplesAvailableNext; +#endif #ifdef SUPPORT_JBM_TRACEFILE IVAS_JBM_TRACE_DATA JbmTraceData; #endif @@ -84,8 +90,20 @@ struct IVAS_DEC bool hasDecodedFirstGoodFrame; /* False on init. Gets set to true after first good frame has been decoded -> all bitstream information is known from that point on */ bool isInitialized; - int16_t bitstreamformat; /* Bitstream format flag (G.192/MIME/VOIP_G192_RTP/VOIP_RTPDUMP) */ - bool Opt_VOIP; /* flag indicating VOIP mode with JBM */ + int16_t bitstreamformat; /* Bitstream format flag (G.192/MIME/VOIP_G192_RTP/VOIP_RTPDUMP) */ + bool Opt_VOIP; /* flag indicating VOIP mode with JBM */ +#ifdef API_5MS + bool Opt_TSM; /* flag indicating TSM mode*/ + int16_t tsm_scale; /* scale for TSM operation */ + int16_t tsm_max_scaling; + float *apaExecBuffer; /* Buffer for APA scaling */ + PCMDSP_APA_HANDLE hTimeScaler; + bool needNewFrame; + bool hasBeenFedFrame; + uint16_t nSamplesAvailableNext; + int16_t nSamplesRendered; + int16_t nTransportChannelsOld; +#endif int16_t amrwb_rfc4867_flag; /* MIME from rfc4867 is used */ int16_t sdp_hf_only; /* RTP payload format parameter: only Header-Full format without zero padding for size collision avoidance */ int16_t prev_ft_speech; /* RXDTX handler: previous frametype flag for G.192 format AMRWB SID_FIRST detection */ @@ -105,8 +123,10 @@ static ivas_error evs_dec_main( Decoder_Struct *st_ivas, const int16_t nOutSampl static ivas_error input_format_API_to_internal( IVAS_DEC_INPUT_FORMAT input_format, int16_t *bitstream_format_internal, int16_t *sdp_hf_only, const bool is_voip_enabled ); static void init_decoder_config( DECODER_CONFIG_HANDLE hDecoderConfig ); static int16_t IVAS_DEC_VoIP_GetRenderGranularity( Decoder_Struct *st_ivas ); +#ifndef API_5MS static JBM_RENDERER_TYPE IVAS_DEC_VoIP_GetRendererConfig( IVAS_DEC_HANDLE hIvasDec ); -static ivas_error IVAS_DEC_VoIP_reconfigure( IVAS_DEC_HANDLE hIvasDec, const uint16_t nTransportChannels, const uint16_t l_ts ); +#endif +static ivas_error IVAS_DEC_reconfigure( IVAS_DEC_HANDLE hIvasDec, const uint16_t nTransportChannels, const uint16_t l_ts ); static ivas_error IVAS_DEC_Setup( IVAS_DEC_HANDLE hIvasDec, uint16_t *nTcBufferGranularity, uint8_t *nTransportChannels, uint8_t *nOutChannels, uint16_t *nSamplesRendered, int16_t *data ); static ivas_error IVAS_DEC_GetTcSamples( IVAS_DEC_HANDLE hIvasDec, float *pcmBuf, int16_t *nOutSamples ); static ivas_error IVAS_DEC_RendererFeedTcSamples( IVAS_DEC_HANDLE hIvasDec, const int16_t nSamplesForRendering, int16_t *nSamplesResidual, float *pcmBuf ); @@ -143,6 +163,18 @@ ivas_error IVAS_DEC_Open( } hIvasDec = *phIvasDec; hIvasDec->hVoIP = NULL; +#ifdef API_5MS + hIvasDec->apaExecBuffer = NULL; + hIvasDec->hTimeScaler = NULL; + hIvasDec->Opt_TSM = false; + hIvasDec->tsm_scale = 100; + hIvasDec->needNewFrame = false; + hIvasDec->nTransportChannelsOld = 0; + hIvasDec->nSamplesAvailableNext = 0; + hIvasDec->nSamplesRendered = 0; + hIvasDec->nSamplesFrame = 0; + hIvasDec->hasBeenFedFrame = false; +#endif hIvasDec->hasBeenFedFirstGoodFrame = false; hIvasDec->hasDecodedFirstGoodFrame = false; hIvasDec->isInitialized = false; @@ -238,8 +270,11 @@ static void init_decoder_config( hDecoderConfig->orientation_tracking = HEAD_ORIENT_TRK_NONE; hDecoderConfig->Opt_non_diegetic_pan = 0; hDecoderConfig->non_diegetic_pan_gain = 0; - +#ifdef API_5MS + hDecoderConfig->tsm_active = 0; +#else hDecoderConfig->voip_active = 0; +#endif hDecoderConfig->Opt_delay_comp = 0; @@ -277,6 +312,14 @@ void IVAS_DEC_Close( ( *phIvasDec )->st_ivas = NULL; } +#ifdef API_5MS + apa_exit( &( *phIvasDec )->hTimeScaler ); + + if ( ( *phIvasDec )->apaExecBuffer != NULL ) + { + free( ( *phIvasDec )->apaExecBuffer ); + } +#endif free( *phIvasDec ); *phIvasDec = NULL; phIvasDec = NULL; @@ -404,9 +447,12 @@ static IVAS_DEC_BS_FORMAT mapIvasFormat( *---------------------------------------------------------------------*/ ivas_error IVAS_DEC_Configure( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - const uint32_t sampleRate, /* i : output sampling frequency */ - const IVAS_DEC_AUDIO_CONFIG outputFormat, /* i : output format */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const uint32_t sampleRate, /* i : output sampling frequency */ + const IVAS_DEC_AUDIO_CONFIG outputFormat, /* i : output format */ +#ifdef API_5MS + const int16_t tsmEnabled, /* i : enable TSM */ +#endif const int16_t customLsOutputEnabled, /* i : enable custom loudspeaker setup handle */ const int16_t hrtfReaderEnabled, /* i : enable HRTF binary file input */ const int16_t enableHeadRotation, /* i : enable head rotation for binaural output */ @@ -483,6 +529,16 @@ ivas_error IVAS_DEC_Configure( hIvasDec->st_ivas->ivas_format = MONO_FORMAT; } +#ifdef API_5MS + hDecoderConfig->tsm_active = tsmEnabled; + hIvasDec->Opt_TSM = tsmEnabled; + hIvasDec->nSamplesFrame = (uint16_t) ( hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + hIvasDec->nSamplesAvailableNext = 0; + hIvasDec->nSamplesRendered = 0; + hIvasDec->tsm_scale = 100; + hIvasDec->tsm_max_scaling = 100; +#endif + return error; } @@ -497,9 +553,11 @@ ivas_error IVAS_DEC_Configure( ivas_error IVAS_DEC_EnableVoIP( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ +#ifndef API_5MS #ifdef VARIABLE_SPEED_DECODING const IVAS_DEC_VOIP_MODE voipMode, /* i : VoIP or variable speed */ const uint16_t speedFac, /* i : speed factor for variable speed */ +#endif #endif const int16_t jbmSafetyMargin, /* i : allowed delay reserve for JBM, in milliseconds */ const IVAS_DEC_INPUT_FORMAT inputFormat /* i : format of the input bitstream */ @@ -519,7 +577,12 @@ ivas_error IVAS_DEC_EnableVoIP( hDecoderConfig = hIvasDec->st_ivas->hDecoderConfig; hIvasDec->Opt_VOIP = 1; +#ifdef API_5MS + hIvasDec->Opt_TSM = 1; + hDecoderConfig->tsm_active = 1; +#else hDecoderConfig->voip_active = 1; +#endif if ( hDecoderConfig->output_config != AUDIO_CONFIG_EXTERNAL ) { @@ -545,12 +608,15 @@ ivas_error IVAS_DEC_EnableVoIP( hIvasDec->hVoIP->lastDecodedWasActive = 0; hIvasDec->hVoIP->hCurrentDataUnit = NULL; +#ifndef API_5MS #ifdef VARIABLE_SPEED_DECODING hIvasDec->hVoIP->voipMode = voipMode; hIvasDec->hVoIP->speedFac = speedFac; hIvasDec->hVoIP->needNewFrame = false; +#endif #endif hIvasDec->hVoIP->nSamplesFrame = (uint16_t) ( hDecoderConfig->output_Fs / FRAMES_PER_SEC ); +#ifndef API_5MS hIvasDec->hVoIP->nSamplesAvailableNext = 0; hIvasDec->hVoIP->rendererType = JBM_RENDERER_NONE; hIvasDec->hVoIP->hFifoOut = NULL; @@ -558,6 +624,7 @@ ivas_error IVAS_DEC_EnableVoIP( /* postpone init of the buffers until we know the real number of TCs*/ hIvasDec->hVoIP->apaExecBuffer = NULL; hIvasDec->hVoIP->nTransportChannelsOld = 0; +#endif #define WMC_TOOL_SKIP /* Bitstream conversion is not counted towards complexity and memory usage */ @@ -570,10 +637,12 @@ ivas_error IVAS_DEC_EnableVoIP( } /* initialize JBM */ +#ifndef API_5MS #ifdef VARIABLE_SPEED_DECODING hIvasDec->hVoIP->hJBM = NULL; if ( hIvasDec->hVoIP->voipMode == IVAS_DEC_VOIP_MODE_VOIP ) { +#endif #endif if ( ( error = JB4_Create( &hIvasDec->hVoIP->hJBM ) != IVAS_ERR_OK ) != IVAS_ERR_OK ) { @@ -583,10 +652,13 @@ ivas_error IVAS_DEC_EnableVoIP( { return IVAS_ERR_FAILED_ALLOC; } +#ifndef API_5MS #ifdef VARIABLE_SPEED_DECODING } #endif +#endif +#ifndef API_5MS /* postpone init of time scaler and output FIFO until we know the real number of TCs */ hIvasDec->hVoIP->hTimeScaler = NULL; #ifdef VARIABLE_SPEED_DECODING @@ -595,7 +667,7 @@ ivas_error IVAS_DEC_EnableVoIP( hIvasDec->hVoIP->needNewFrame = true; } #endif - +#endif return error; } @@ -639,9 +711,13 @@ ivas_error IVAS_DEC_FeedFrame_Serial( { hIvasDec->st_ivas->hDecoderConfig->ivas_total_brate = ACELP_8k00; } +#ifdef API_5MS + hIvasDec->isInitialized = true; +#endif } - +#ifndef API_5MS hIvasDec->isInitialized = true; +#endif } if ( !bfi ) /* TODO(mcjbm): Is this ok for bfi == 2 (partial frame)? Is there enough info to fully configure decoder? */ @@ -683,11 +759,18 @@ ivas_error IVAS_DEC_FeedFrame_Serial( st->use_partial_copy = 1; } +#ifdef API_5MS + hIvasDec->needNewFrame = false; + hIvasDec->hasBeenFedFrame = true; + hIvasDec->nSamplesRendered = 0; + hIvasDec->nSamplesAvailableNext = hIvasDec->nSamplesFrame; +#else #ifdef VARIABLE_SPEED_DECODING if ( hIvasDec->hVoIP != NULL && hIvasDec->hVoIP->voipMode == IVAS_DEC_VOIP_MODE_VARIABLE_SPEED ) { hIvasDec->hVoIP->needNewFrame = false; } +#endif #endif return error; @@ -699,7 +782,7 @@ ivas_error IVAS_DEC_FeedFrame_Serial( * * Main function to decode to PCM data *---------------------------------------------------------------------*/ - +#ifndef API_5MS ivas_error IVAS_DEC_GetSamples( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ @@ -745,6 +828,136 @@ ivas_error IVAS_DEC_GetSamples( return error; } +#else +ivas_error IVAS_DEC_GetSamples( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const int16_t nSamplesAsked, /* i: number of samples wanted by the caller */ + int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ + int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ + bool *needNewFrame /* indication that the decoder needs a new frame */ +) +{ + Decoder_Struct *st_ivas; + ivas_error error; + int16_t nOutSamplesElse, result, nSamplesToRender; + uint16_t nSamplesRendered, nSamplesRendered_loop, l_ts, nTimeScalerOutSamples; + uint8_t nTransportChannels, nOutChannels; + error = IVAS_ERR_OK; + nSamplesRendered = 0; + nOutChannels = 0; + + if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + st_ivas = hIvasDec->st_ivas; + + if ( !hIvasDec->hasBeenFedFrame && hIvasDec->nSamplesAvailableNext == 0 ) + { + /* no frame was fed, do nothing but ask for a frame */ + *needNewFrame = true; + *nOutSamples = 0; + hIvasDec->needNewFrame = true; + return error; + } + + /* check if we are still at the beginning with bad frames, put out zeroes, keep track of subframes */ + if ( !hIvasDec->isInitialized && hIvasDec->st_ivas->bfi ) + { + hIvasDec->hasBeenFedFrame = false; + set_s( pcmBuf, 0, hIvasDec->st_ivas->hDecoderConfig->nchan_out * nSamplesAsked ); + hIvasDec->nSamplesRendered += nSamplesAsked; + *nOutSamples = nSamplesAsked; + hIvasDec->nSamplesAvailableNext -= nSamplesAsked; + if ( hIvasDec->nSamplesAvailableNext == 0 ) + { + hIvasDec->needNewFrame = true; + *needNewFrame = true; + } + } + else + { + /* check if we need to run the setup function, tc decoding and feeding the renderer */ + if ( !hIvasDec->isInitialized || hIvasDec->hasBeenFedFrame ) + { + int16_t nResidualSamples, nSamplesTcsScaled; + /* setup */ + if ( ( error = IVAS_DEC_Setup( hIvasDec, &l_ts, &nTransportChannels, &nOutChannels, &nSamplesRendered_loop, pcmBuf + nSamplesRendered * nOutChannels ) ) != IVAS_ERR_OK ) + { + return error; + } + nSamplesRendered += nSamplesRendered_loop; + if ( nTransportChannels != hIvasDec->nTransportChannelsOld ) + { + IVAS_DEC_reconfigure( hIvasDec, nTransportChannels, l_ts ); + } + /* decode TCs only */ + if ( ( error = IVAS_DEC_GetTcSamples( hIvasDec, hIvasDec->apaExecBuffer, &nOutSamplesElse ) ) != IVAS_ERR_OK ) + { + return error; + } + + if ( hIvasDec->Opt_TSM ) + { + if ( apa_set_scale( hIvasDec->hTimeScaler, hIvasDec->tsm_scale ) != 0 ) + { + return IVAS_ERR_UNKNOWN; + } + result = apa_exec( hIvasDec->hTimeScaler, hIvasDec->apaExecBuffer, hIvasDec->nSamplesFrame * nTransportChannels, (uint16_t) hIvasDec->tsm_max_scaling, hIvasDec->apaExecBuffer, &nTimeScalerOutSamples ); + if ( result != 0 ) + { + return IVAS_ERR_UNKNOWN; + } + assert( nTimeScalerOutSamples <= APA_BUF ); + } + else + { + nTimeScalerOutSamples = hIvasDec->nSamplesFrame * nTransportChannels; + } + nSamplesTcsScaled = nTimeScalerOutSamples / nTransportChannels; + + /* render IVAS frames */ + + + if ( ( error = IVAS_DEC_RendererFeedTcSamples( hIvasDec, nSamplesTcsScaled, &nResidualSamples, hIvasDec->apaExecBuffer ) ) != IVAS_ERR_OK ) + { + return error; + } + + if ( hIvasDec->Opt_TSM ) + { + /* feed residual samples to TSM for the next call */ + if ( apa_set_renderer_residual_samples( hIvasDec->hTimeScaler, (uint16_t) nResidualSamples ) != 0 ) + { + return IVAS_ERR_UNKNOWN; + } + } + hIvasDec->hasBeenFedFrame = false; + } + /* render IVAS frames directly to the output buffer */ + nSamplesToRender = nSamplesAsked - nSamplesRendered; + if ( ( error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesRendered_loop, &hIvasDec->nSamplesAvailableNext, pcmBuf + nSamplesRendered * nOutChannels ) ) != IVAS_ERR_OK ) + { + return error; + } + nSamplesRendered += nSamplesRendered_loop; + nSamplesToRender -= nSamplesRendered_loop; + if ( hIvasDec->nSamplesAvailableNext == 0 ) + { + *needNewFrame = true; + hIvasDec->needNewFrame = true; + } + else + { + *needNewFrame = false; + } + } + + *nOutSamples = nSamplesRendered; + + return error; +} +#endif /*---------------------------------------------------------------------* @@ -1144,15 +1357,26 @@ ivas_error IVAS_DEC_GetMasaMetadata( *---------------------------------------------------------------------*/ ivas_error IVAS_DEC_FeedHeadTrackData( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ +#ifdef API_5MS + IVAS_QUATERNION orientation, /* i : head-tracking data, listener orientation */ + IVAS_VECTOR3 Pos /* i : listener position */ +#else IVAS_QUATERNION *orientation, /* i : head-tracking data, listener orientation */ IVAS_VECTOR3 *Pos /* i : listener position */ +#endif ) { HEAD_TRACK_DATA_HANDLE hHeadTrackData; +#ifndef API_5MS int16_t i; +#endif +#ifdef API_5MS + if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) +#else if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || orientation == NULL ) +#endif { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } @@ -1165,6 +1389,18 @@ ivas_error IVAS_DEC_FeedHeadTrackData( } /* Move head-tracking data to the decoder handle */ +#ifdef API_5MS + /* check for Euler angle signaling */ + if ( orientation.w == -3.0f ) + { + Euler2Quat( deg2rad( orientation.x ), deg2rad( orientation.y ), deg2rad( orientation.z ), &orientation ); + } + + ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, orientation, FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &hHeadTrackData->Quaternion ); + hHeadTrackData->Pos.x = Pos.x; + hHeadTrackData->Pos.y = Pos.y; + hHeadTrackData->Pos.z = Pos.z; +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { /* check for Euler angle signaling */ @@ -1180,6 +1416,7 @@ ivas_error IVAS_DEC_FeedHeadTrackData( } hIvasDec->st_ivas->hHeadTrackData->num_quaternions = 0; +#endif return IVAS_ERR_OK; } @@ -1244,18 +1481,32 @@ ivas_error IVAS_DEC_FeedRefVectorData( *---------------------------------------------------------------------*/ ivas_error IVAS_DEC_FeedExternalOrientationData( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ +#ifdef API_5MS + IVAS_QUATERNION orientation, /* i : external orientation data */ + int8_t enableHeadRotation, /* i : flag to enable head rotation for this frame */ + int8_t enableExternalOrientation, /* i : flag to enable external orientation for this frame */ + int8_t enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ + int16_t numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ +#else IVAS_QUATERNION *orientation, /* i : external orientation data */ int8_t *enableHeadRotation, /* i : flag to enable head rotation for this frame */ int8_t *enableExternalOrientation, /* i : flag to enable external orientation for this frame */ int8_t *enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ int16_t *numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ +#endif ) { EXTERNAL_ORIENTATION_HANDLE hExternalOrientationData; +#ifndef API_5MS int16_t i; +#endif +#ifdef API_5MS + if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) +#else if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || orientation == NULL ) +#endif { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } @@ -1268,6 +1519,14 @@ ivas_error IVAS_DEC_FeedExternalOrientationData( } /* Move external orientation data to the decoder handle (invert orientations) */ +#ifdef API_5MS + QuaternionInverse( orientation, &hExternalOrientationData->Quaternion ); + + hExternalOrientationData->enableHeadRotation = enableHeadRotation; + hExternalOrientationData->enableExternalOrientation = enableExternalOrientation; + hExternalOrientationData->enableRotationInterpolation = enableRotationInterpolation; + hExternalOrientationData->numFramesToTargetOrientation = numFramesToTargetOrientation; +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { QuaternionInverse( orientation[i], &hExternalOrientationData->Quaternions[i] ); @@ -1277,6 +1536,7 @@ ivas_error IVAS_DEC_FeedExternalOrientationData( hExternalOrientationData->enableRotationInterpolation[i] = enableRotationInterpolation[i]; hExternalOrientationData->numFramesToTargetOrientation[i] = numFramesToTargetOrientation[i]; } +#endif return IVAS_ERR_OK; } @@ -1740,8 +2000,7 @@ ivas_error IVAS_DEC_VoIP_FeedFrame( return IVAS_ERR_OK; } -#ifdef VARIABLE_SPEED_DECODING -#ifdef DEBUGGING +#if defined( VARIABLE_SPEED_DECODING ) || defined( API_5MS ) /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_SetScale( ) * @@ -1750,20 +2009,218 @@ ivas_error IVAS_DEC_VoIP_FeedFrame( ivas_error IVAS_DEC_VoIP_SetScale( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - const int16_t scale /* i : TSM scale to set */ +#ifdef API_5MS + const int16_t maxScaling, +#endif + const int16_t scale /* i : TSM scale to set */ ) { ivas_error error; error = IVAS_ERR_OK; +#ifdef API_5MS + if ( hIvasDec->Opt_TSM == false ) + { + return IVAS_ERR_TSM_NOT_ENABLED; + } + else + { + hIvasDec->tsm_scale = scale; + hIvasDec->tsm_max_scaling = maxScaling; + } +#else hIvasDec->hVoIP->speedFac = scale; +#endif return error; } #endif + + +#ifdef API_5MS +/*---------------------------------------------------------------------* + * IVAS_DEC_VoIP_GetSamples( ) + * + * Main function to decode one frame in VoIP + *---------------------------------------------------------------------*/ + +ivas_error IVAS_DEC_VoIP_GetSamples( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + uint16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ + int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ + const uint32_t systemTimestamp_ms /* i : current system timestamp */ +#ifdef SUPPORT_JBM_TRACEFILE + , + JbmTraceFileWriterFn jbmWriterFn, + void *jbmWriter +#endif + +) +{ + Decoder_Struct *st_ivas; + DECODER_CONFIG_HANDLE hDecoderConfig; + IVAS_DEC_VOIP *hVoIP; + uint32_t extBufferedTime_ms, scale, maxScaling; +#ifndef API_5MS + uint16_t nTimeScalerOutSamples; +#endif + JB4_DATAUNIT_HANDLE dataUnit; +#ifndef API_5MS + int16_t nOutSamplesElse; +#endif + uint16_t extBufferedSamples; + int16_t timeScalingDone; + int16_t result; + ivas_error error; + int16_t nSamplesRendered; + uint16_t nSamplesTcsScaled; + uint8_t nTransportChannels; + uint8_t nOutChannels; + + error = IVAS_ERR_OK; + + st_ivas = hIvasDec->st_ivas; + hDecoderConfig = st_ivas->hDecoderConfig; + hVoIP = hIvasDec->hVoIP; + timeScalingDone = 0; + + nOutChannels = (uint8_t) st_ivas->hDecoderConfig->nchan_out; + nTransportChannels = 0; + nSamplesTcsScaled = hVoIP->nSamplesFrame; + nSamplesRendered = 0; + + if ( nSamplesPerChannel == 0 ) + { + return IVAS_ERR_WRONG_PARAMS; + } + + /* make sure that the FIFO after decoder/scaler contains at least one sound card frame (i.e. 20ms) */ + while ( nSamplesRendered < nSamplesPerChannel ) + { + if ( hIvasDec->nSamplesAvailableNext == 0 ) + { + int16_t nSamplesBuffered; + nSamplesBuffered = 0; + if ( hIvasDec->hasBeenFedFirstGoodFrame ) + { + IVAS_DEC_GetBufferedNumberOfSamples( hIvasDec, &nSamplesBuffered ); + } + extBufferedSamples = nSamplesRendered + nSamplesBuffered; + + extBufferedTime_ms = extBufferedSamples * 1000 / hDecoderConfig->output_Fs; + + dataUnit = NULL; + + + /* pop one access unit from the jitter buffer */ + result = JB4_PopDataUnit( hVoIP->hJBM, systemTimestamp_ms, extBufferedTime_ms, &dataUnit, &scale, &maxScaling ); + if ( result != 0 ) + { + return IVAS_ERR_UNKNOWN; + } + + + maxScaling = maxScaling * hDecoderConfig->output_Fs / 1000; + /* avoid time scaling multiple times in one sound card slot */ + if ( scale != 100U ) + { + if ( timeScalingDone ) + { + scale = 100; + } + else + { + timeScalingDone = 1; + } + } + + /* limit scale to range supported by time scaler */ + if ( scale < APA_MIN_SCALE ) + { + scale = APA_MIN_SCALE; + } + else if ( scale > APA_MAX_SCALE ) + { + scale = APA_MAX_SCALE; + } + + IVAS_DEC_VoIP_SetScale( hIvasDec, (int16_t) maxScaling, (int16_t) scale ); + + /* copy bitstream into decoder state */ + if ( dataUnit ) + { + hIvasDec->hVoIP->hCurrentDataUnit = dataUnit; + + bsCompactToSerial( dataUnit->data, hIvasDec->hVoIP->bs_conversion_buf, dataUnit->dataSize ); + IVAS_DEC_FeedFrame_Serial( hIvasDec, hIvasDec->hVoIP->bs_conversion_buf, dataUnit->dataSize, 0 ); + } + else if ( hIvasDec->hasDecodedFirstGoodFrame ) + { + /* Decoder has been initialized with first good frame - do PLC */ + IVAS_DEC_FeedFrame_Serial( hIvasDec, hIvasDec->hVoIP->bs_conversion_buf, 0, 1 ); + } + +#ifdef SUPPORT_JBM_TRACEFILE + /* jbmWriterFn and jbmWriter may be NULL if tracefile writing was not requested on CLI */ + if ( jbmWriterFn != NULL && jbmWriter != NULL ) + { + /* write JBM trace data entry */ + store_JbmData( hVoIP, dataUnit, systemTimestamp_ms, extBufferedSamples, hDecoderConfig->output_Fs ); + if ( ( jbmWriterFn( &hVoIP->JbmTraceData, jbmWriter ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing JBM Trace data to file\n" ); + return IVAS_ERR_UNKNOWN; + } + } #endif + if ( dataUnit ) + { + if ( dataUnit->partial_frame != 0 ) + { + hVoIP->lastDecodedWasActive = 1; + } + else + { + hVoIP->lastDecodedWasActive = !dataUnit->silenceIndicator; + } + /* data unit memory is no longer used */ + JB4_FreeDataUnit( hVoIP->hJBM, dataUnit ); + } + if ( !hIvasDec->hasBeenFedFirstGoodFrame ) + { + hIvasDec->nSamplesAvailableNext = hIvasDec->nSamplesFrame; + hIvasDec->nSamplesRendered = 0; + } + } + /* decode */ + if ( !hIvasDec->hasBeenFedFirstGoodFrame ) + { + /* codec mode to use not known yet - simply output silence */ + /* directly set output zero */ + int16_t nSamplesToZero = min( nSamplesPerChannel, hIvasDec->nSamplesAvailableNext ); + set_s( pcmBuf + nSamplesRendered * nOutChannels, 0, nSamplesToZero * nOutChannels ); + nSamplesRendered += nSamplesToZero; + hIvasDec->nSamplesRendered += nSamplesToZero; + hIvasDec->nSamplesAvailableNext -= nSamplesToZero; + } + else + { + int16_t nSamplesToRender, nSamplesRendered_loop; + bool tmp; + nSamplesToRender = nSamplesPerChannel - nSamplesRendered; + /* render IVAS frames directly to the output buffer */ + if ( ( error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, pcmBuf + nSamplesRendered * nOutChannels, &nSamplesRendered_loop, &tmp ) ) != IVAS_ERR_OK ) + { + return error; + } + nSamplesRendered += nSamplesRendered_loop; + } + } + return error; +} +#else /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_GetSamples( ) * @@ -1969,7 +2426,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( nSamplesRendered += nSamplesRendered_loop; if ( nTransportChannels != hVoIP->nTransportChannelsOld ) { - IVAS_DEC_VoIP_reconfigure( hIvasDec, nTransportChannels, l_ts ); + IVAS_DEC_reconfigure( hIvasDec, nTransportChannels, l_ts ); } /* decode TCs only */ @@ -2149,6 +2606,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( return error; } +#endif /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_Flush( ) @@ -2156,25 +2614,34 @@ ivas_error IVAS_DEC_VoIP_GetSamples( * Function to flush remaining audio in VoIP *---------------------------------------------------------------------*/ -ivas_error IVAS_DEC_VoIP_Flush( +ivas_error IVAS_DEC_Flush( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const int16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ - uint16_t *nSamplesAvailableNext, /* o : number of samples still available */ - int16_t *nSamplesFlushed /* o : number of samples flushed */ +#ifndef API_5MS + uint16_t *nSamplesAvailableNext, /* o : number of samples still available */ +#endif + int16_t *nSamplesFlushed /* o : number of samples flushed */ ) { ivas_error error; IVAS_DEC_VOIP *hVoIP; +#ifndef API_5MS int16_t rendererPcmBuf[( MAX_OUTPUT_CHANNELS * L_FRAME_MAX * APA_MAX_SCALE ) / 100]; +#endif uint16_t nSamplesToRender; uint16_t nSamplesFlushedLocal; error = IVAS_ERR_OK; hVoIP = hIvasDec->hVoIP; +#ifdef API_5MS + *nSamplesFlushed = min( nSamplesPerChannel, hIvasDec->nSamplesAvailableNext ); +#else *nSamplesFlushed = min( nSamplesPerChannel, hVoIP->nSamplesAvailableNext ); +#endif +#ifndef API_5MS if ( hVoIP->rendererType == JBM_RENDERER_NONE ) { /* fetch a user-specified number of samples from FIFO */ @@ -2187,6 +2654,7 @@ ivas_error IVAS_DEC_VoIP_Flush( } else { + nSamplesToRender = (uint16_t) *nSamplesFlushed; /* render IVAS frames */ if ( ( error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesFlushedLocal, &hVoIP->nSamplesAvailableNext, rendererPcmBuf ) ) != IVAS_ERR_OK ) @@ -2207,7 +2675,15 @@ ivas_error IVAS_DEC_VoIP_Flush( *nSamplesAvailableNext = hVoIP->nSamplesAvailableNext; *nSamplesFlushed = (int16_t) nSamplesFlushedLocal; } +#else + nSamplesToRender = (uint16_t) *nSamplesFlushed; + /* render IVAS frames */ + if ( ( error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesFlushedLocal, &hIvasDec->nSamplesAvailableNext, pcmBuf ) ) != IVAS_ERR_OK ) + { + return error; + } +#endif return error; } @@ -2222,7 +2698,11 @@ bool IVAS_DEC_VoIP_IsEmpty( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const int16_t nSamplesAsked ) { +#ifdef API_5MS + return ( ( JB4_bufferedDataUnits( hIvasDec->hVoIP->hJBM ) == 0 ) && ( hIvasDec->nSamplesAvailableNext < nSamplesAsked ) ); +#else return ( ( JB4_bufferedDataUnits( hIvasDec->hVoIP->hJBM ) == 0 ) && ( hIvasDec->hVoIP->nSamplesAvailableNext < nSamplesAsked ) ); +#endif } @@ -2261,6 +2741,7 @@ static void IVAS_DEC_Close_VoIP( { JB4_Destroy( &hVoIP->hJBM ); +#ifndef API_5MS apa_exit( &hVoIP->hTimeScaler ); pcmdsp_fifo_destroy( &hVoIP->hFifoOut ); @@ -2269,7 +2750,7 @@ static void IVAS_DEC_Close_VoIP( { free( hVoIP->apaExecBuffer ); } - +#endif if ( hVoIP->bs_conversion_buf != NULL ) { #define WMC_TOOL_SKIP @@ -2598,15 +3079,23 @@ static ivas_error printConfigInfo_dec( } } +#ifdef API_5MS + /*-----------------------------------------------------------------* + * Print VoIP mode info + *-----------------------------------------------------------------*/ + if ( st_ivas->hDecoderConfig->tsm_active ) + { + fprintf( stdout, "TSM mode: ON\n" ); + } +#else /*-----------------------------------------------------------------* * Print VoIP mode info *-----------------------------------------------------------------*/ - if ( st_ivas->hDecoderConfig->voip_active ) { fprintf( stdout, "VoIP mode: ON\n" ); } - +#endif return IVAS_ERR_OK; } @@ -3006,6 +3495,7 @@ static int16_t IVAS_DEC_VoIP_GetRenderGranularity( } +#ifndef API_5MS /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_GetRendererConfig() * @@ -3029,7 +3519,7 @@ static JBM_RENDERER_TYPE IVAS_DEC_VoIP_GetRendererConfig( return rendererType; } - +#endif /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_reconfigure() @@ -3037,64 +3527,103 @@ static JBM_RENDERER_TYPE IVAS_DEC_VoIP_GetRendererConfig( * *---------------------------------------------------------------------*/ -ivas_error IVAS_DEC_VoIP_reconfigure( +ivas_error IVAS_DEC_reconfigure( IVAS_DEC_HANDLE hIvasDec, const uint16_t nTransportChannels, const uint16_t l_ts ) { IVAS_DEC_VOIP *hVoIP; +#ifdef API_5MS + int16_t apa_buffer_size; +#endif + ivas_error error; + hVoIP = hIvasDec->hVoIP; +#ifdef API_5MS + apa_buffer_size = hIvasDec->nSamplesFrame; +#endif +#ifdef API_5MS + if ( hIvasDec->apaExecBuffer == NULL ) +#else if ( hIvasDec->hVoIP->hTimeScaler == NULL ) +#endif { - +#ifndef API_5MS uint16_t wss, css; float startQuality; +#endif DECODER_CONFIG_HANDLE hDecoderConfig; +#ifdef API_5MS + if ( hIvasDec->Opt_TSM ) + { + uint16_t wss, css; + float startQuality; + + startQuality = 1.0f; + apa_buffer_size = APA_BUF_PER_CHANNEL; +#else #ifdef VARIABLE_SPEED_DECODING startQuality = hVoIP->voipMode == IVAS_DEC_VOIP_MODE_VARIABLE_SPEED ? -2.0f : 1.0f; #else startQuality = 1.0f; +#endif #endif - /* get current renderer type*/ - hVoIP->rendererType = IVAS_DEC_VoIP_GetRendererConfig( hIvasDec ); - hDecoderConfig = hIvasDec->st_ivas->hDecoderConfig; - if ( hDecoderConfig->output_Fs == 8000 ) - { - wss = 1; - css = 1; - } - else if ( hDecoderConfig->output_Fs == 16000 ) - { - wss = 2; - css = 1; - } - else if ( hDecoderConfig->output_Fs == 32000 ) - { - wss = 4; - css = 2; - } - else if ( hDecoderConfig->output_Fs == 48000 ) - { - wss = 6; - css = 3; - } - else - { - return IVAS_ERR_INIT_ERROR; - } + /* get current renderer type*/ +#ifndef API_5MS + hVoIP->rendererType = IVAS_DEC_VoIP_GetRendererConfig( hIvasDec ); +#endif + hDecoderConfig = hIvasDec->st_ivas->hDecoderConfig; - if ( ( hIvasDec->hVoIP->apaExecBuffer = malloc( sizeof( float ) * APA_BUF_PER_CHANNEL * nTransportChannels ) ) == NULL ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); - } - set_zero( hIvasDec->hVoIP->apaExecBuffer, APA_BUF_PER_CHANNEL * nTransportChannels ); + if ( hDecoderConfig->output_Fs == 8000 ) + { + wss = 1; + css = 1; + } + else if ( hDecoderConfig->output_Fs == 16000 ) + { + wss = 2; + css = 1; + } + else if ( hDecoderConfig->output_Fs == 32000 ) + { + wss = 4; + css = 2; + } + else if ( hDecoderConfig->output_Fs == 48000 ) + { + wss = 6; + css = 3; + } + else + { + return IVAS_ERR_INIT_ERROR; + } +#ifndef API_5MS + if ( ( hIvasDec->hVoIP->apaExecBuffer = malloc( sizeof( float ) * APA_BUF_PER_CHANNEL * nTransportChannels ) ) == NULL ) + + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); + } + set_zero( hIvasDec->hVoIP->apaExecBuffer, APA_BUF_PER_CHANNEL * nTransportChannels ); +#endif +#ifdef API_5MS + if ( apa_init( &hIvasDec->hTimeScaler, + nTransportChannels ) != IVAS_ERR_OK || + apa_set_rate( hIvasDec->hTimeScaler, hDecoderConfig->output_Fs ) != 0 || + apa_set_complexity_options( hIvasDec->hTimeScaler, wss, css ) != 0 || + apa_set_quality( hIvasDec->hTimeScaler, startQuality, 4, 4 ) != 0 || + apa_set_renderer_granularity( hIvasDec->hTimeScaler, l_ts ) != 0 ) + { + return IVAS_ERR_INIT_ERROR; + } +#else if ( apa_init( &hIvasDec->hVoIP->hTimeScaler, nTransportChannels ) != IVAS_ERR_OK || apa_set_rate( hIvasDec->hVoIP->hTimeScaler, hDecoderConfig->output_Fs ) != 0 || @@ -3104,51 +3633,101 @@ ivas_error IVAS_DEC_VoIP_reconfigure( { return IVAS_ERR_INIT_ERROR; } +#endif - if ( hVoIP->hFifoOut == NULL && hVoIP->rendererType == JBM_RENDERER_NONE ) - { - /* we still need the FIFO out buffer */ - if ( pcmdsp_fifo_create( &hIvasDec->hVoIP->hFifoOut ) != 0 || - pcmdsp_fifo_init( hIvasDec->hVoIP->hFifoOut, (uint16_t) ( hDecoderConfig->output_Fs * 4 / FRAMES_PER_SEC ) /* 4 frames */, hDecoderConfig->nchan_out, sizeof( int16_t ) ) != 0 ) +#ifndef API_5MS + if ( hVoIP->hFifoOut == NULL && hVoIP->rendererType == JBM_RENDERER_NONE ) { - return IVAS_ERR_INIT_ERROR; + /* we still need the FIFO out buffer */ + if ( pcmdsp_fifo_create( &hIvasDec->hVoIP->hFifoOut ) != 0 || + pcmdsp_fifo_init( hIvasDec->hVoIP->hFifoOut, (uint16_t) ( hDecoderConfig->output_Fs * 4 / FRAMES_PER_SEC ) /* 4 frames */, hDecoderConfig->nchan_out, sizeof( int16_t ) ) != 0 ) + { + return IVAS_ERR_INIT_ERROR; + } } - } #ifdef VARIABLE_SPEED_DECODING - else if ( hIvasDec->hVoIP->voipMode == IVAS_DEC_VOIP_MODE_VARIABLE_SPEED ) - { - if ( pcmdsp_fifo_create( &hIvasDec->hVoIP->hFifoOut ) != 0 || - pcmdsp_fifo_init( hIvasDec->hVoIP->hFifoOut, (uint16_t) ( hDecoderConfig->output_Fs * 4 / FRAMES_PER_SEC ) /* 4 frames */, hDecoderConfig->nchan_out, sizeof( int16_t ) ) != 0 ) + else if ( hIvasDec->hVoIP->voipMode == IVAS_DEC_VOIP_MODE_VARIABLE_SPEED ) { - return IVAS_ERR_INIT_ERROR; + if ( pcmdsp_fifo_create( &hIvasDec->hVoIP->hFifoOut ) != 0 || + pcmdsp_fifo_init( hIvasDec->hVoIP->hFifoOut, (uint16_t) ( hDecoderConfig->output_Fs * 4 / FRAMES_PER_SEC ) /* 4 frames */, hDecoderConfig->nchan_out, sizeof( int16_t ) ) != 0 ) + { + return IVAS_ERR_INIT_ERROR; + } } - } +#endif #endif - if ( hIvasDec->mode == IVAS_DEC_MODE_EVS ) - { - if ( apa_set_evs_compat_mode( hIvasDec->hVoIP->hTimeScaler, true ) != 0 ) + if ( hIvasDec->mode == IVAS_DEC_MODE_EVS ) { - return IVAS_ERR_INIT_ERROR; +#ifdef API_5MS + if ( apa_set_evs_compat_mode( hIvasDec->hTimeScaler, true ) != 0 ) +#else + if ( apa_set_evs_compat_mode( hIvasDec->hVoIP->hTimeScaler, true ) != 0 ) +#endif + { + return IVAS_ERR_INIT_ERROR; + } } +#ifdef API_5MS + } +#endif +#ifdef API_5MS + if ( ( hIvasDec->apaExecBuffer = malloc( sizeof( float ) * apa_buffer_size * nTransportChannels ) ) == NULL ) + + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); + } + + set_zero( hIvasDec->apaExecBuffer, apa_buffer_size * nTransportChannels ); +#else + if ( ( hVoIP->apaExecBuffer = malloc( sizeof( float ) * APA_BUF_PER_CHANNEL * nTransportChannels ) ) == NULL ) + + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); } + + set_zero( hVoIP->apaExecBuffer, APA_BUF_PER_CHANNEL * nTransportChannels ); +#endif } else { - if ( apa_reconfigure( hVoIP->hTimeScaler, nTransportChannels, l_ts ) != 0 ) +#ifdef API_5MS + if ( hIvasDec->Opt_TSM ) { - return IVAS_ERR_INIT_ERROR; + if ( apa_reconfigure( hIvasDec->hTimeScaler, nTransportChannels, l_ts ) != 0 ) +#else + if ( apa_reconfigure( hVoIP->hTimeScaler, nTransportChannels, l_ts ) != 0 ) +#endif + { + return IVAS_ERR_INIT_ERROR; + } +#ifdef API_5MS + apa_buffer_size = APA_BUF_PER_CHANNEL; } - +#endif /* realloc apa_exe_buffer */ +#ifdef API_5MS + free( hIvasDec->apaExecBuffer ); + if ( ( hIvasDec->apaExecBuffer = malloc( sizeof( float ) * apa_buffer_size * nTransportChannels ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); + } + set_zero( hIvasDec->apaExecBuffer, apa_buffer_size * nTransportChannels ); +#else free( hIvasDec->hVoIP->apaExecBuffer ); if ( ( hIvasDec->hVoIP->apaExecBuffer = malloc( sizeof( float ) * APA_BUF_PER_CHANNEL * nTransportChannels ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); } set_zero( hIvasDec->hVoIP->apaExecBuffer, APA_BUF_PER_CHANNEL * nTransportChannels ); +#endif } + +#ifdef API_5MS + hIvasDec->nTransportChannelsOld = nTransportChannels; +#else hIvasDec->hVoIP->nTransportChannelsOld = (uint8_t) nTransportChannels; +#endif error = IVAS_ERR_OK; diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index ebcdd099c8..7d2afa166e 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -84,7 +84,7 @@ typedef enum _IVAS_DEC_COMPLEXITY_LEVEL IVAS_DEC_COMPLEXITY_LEVEL_THREE = 3 } IVAS_DEC_COMPLEXITY_LEVEL; - +#ifndef API_5MS #ifdef VARIABLE_SPEED_DECODING typedef enum { @@ -92,6 +92,7 @@ typedef enum IVAS_DEC_VOIP_MODE_VARIABLE_SPEED = 1 } IVAS_DEC_VOIP_MODE; #endif +#endif #ifdef DEBUGGING typedef enum _IVAS_DEC_FORCED_REND_MODE @@ -141,11 +142,14 @@ ivas_error IVAS_DEC_Configure( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const uint32_t sampleRate, /* i : output sampling frequency */ const IVAS_DEC_AUDIO_CONFIG outputFormat, /* i : output format */ +#ifdef API_5MS + const int16_t tsmEnabled, /* i : enable TSM */ +#endif const int16_t customLsOutputEnabled, /* i : enable custom loudspeaker setup handle */ const int16_t hrtfReaderEnabled, /* i : enable HRTF binary file input */ const int16_t enableHeadRotation, /* i : enable head rotation for binaural output */ const int16_t enableExternalOrientation, /* i : enable external orientations */ - const HEAD_ORIENT_TRK_T orientation_tracking, /* i : head orientation tracking type */ + const HEAD_ORIENT_TRK_T orientation_tracking, /* i : head orientation tracking type */ const int16_t renderConfigEnabled, /* i : enable Renderer config. file for binaural output */ const int16_t Opt_non_diegetic_pan, /* i : diegetic or not */ const float non_diegetic_pan_gain, /* i : non diegetic panning gain */ @@ -169,9 +173,17 @@ ivas_error IVAS_DEC_FeedFrame_Serial( /*! r: decoder error code */ ivas_error IVAS_DEC_GetSamples( +#ifdef API_5MS + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const int16_t nSamplesAsked, /* i: number of samples wanted by the caller */ + int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ + int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ + bool *needNewFrame /* indication that the decoder needs a new frame */ +#else IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ int16_t *nOutSamples /* o : number of samples per channel written to output buffer */ +#endif ); /*! r: error code */ @@ -197,8 +209,13 @@ ivas_error IVAS_DEC_GetMasaMetadata( /*! r: error code */ ivas_error IVAS_DEC_FeedHeadTrackData( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - IVAS_QUATERNION *orientation, /* i : head-tracking data */ - IVAS_VECTOR3 *Pos /* i : listener position */ +#ifdef API_5MS + IVAS_QUATERNION orientation, /* i : head-tracking data, listener orientation */ + IVAS_VECTOR3 Pos /* i : listener position */ +#else + IVAS_QUATERNION *orientation, /* i : head-tracking data, listener orientation */ + IVAS_VECTOR3 *Pos /* i : listener position */ +#endif ); /*! r: error code */ @@ -216,11 +233,19 @@ ivas_error IVAS_DEC_FeedRefVectorData( /*! r: error code */ ivas_error IVAS_DEC_FeedExternalOrientationData( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - IVAS_QUATERNION *orientation, /* i : external orientation data */ - int8_t *enableHeadRotation, /* i : flag to enable head rotation for this frame */ - int8_t *enableExternalOrientation, /* i : flag to enable external orientation for this frame */ - int8_t *enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ - int16_t *numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ +#ifdef API_5MS + IVAS_QUATERNION orientation, /* i : external orientation data */ + int8_t enableHeadRotation, /* i : flag to enable head rotation for this frame */ + int8_t enableExternalOrientation, /* i : flag to enable external orientation for this frame */ + int8_t enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ + int16_t numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ +#else + IVAS_QUATERNION *orientation, /* i : external orientation data */ + int8_t *enableHeadRotation, /* i : flag to enable head rotation for this frame */ + int8_t *enableExternalOrientation, /* i : flag to enable external orientation for this frame */ + int8_t *enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ + int16_t *numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ +#endif ); /*! r: error code */ @@ -234,6 +259,13 @@ ivas_error IVAS_DEC_VoIP_FeedFrame( const bool qBit /* i : Q bit for AMR-WB IO */ ); +#ifdef API_5MS +ivas_error IVAS_DEC_VoIP_SetScale( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const int16_t maxScaling, /* i : maximum allowed TSM scale */ + const int16_t scale /* i : TSM scale to set */ +); +#else #ifdef VARIABLE_SPEED_DECODING #ifdef DEBUGGING /*! r: error code */ @@ -243,25 +275,31 @@ ivas_error IVAS_DEC_VoIP_SetScale( ); #endif #endif +#endif /*! r: error code */ ivas_error IVAS_DEC_VoIP_GetSamples( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ uint16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ - const uint32_t systemTimestamp_ms, /* i : current system timestamp */ + const uint32_t systemTimestamp_ms /* i : current system timestamp */ +#ifndef API_5MS + , uint16_t *sampleAvailableNext /* o : samples available for the next call */ +#endif #ifdef SUPPORT_JBM_TRACEFILE , JbmTraceFileWriterFn jbmWriterFn, void* jbmWriter #endif ); -ivas_error IVAS_DEC_VoIP_Flush( +ivas_error IVAS_DEC_Flush( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const int16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ - uint16_t *nSamplesAvailableNext, /* o : number of samples still available */ +#ifndef API_5MS + uint16_t *nSamplesAvailableNext, /* o : number of samples still available */ +#endif int16_t *nSamplesFlushed /* o : number of samples flushed */ ); @@ -270,9 +308,11 @@ ivas_error IVAS_DEC_VoIP_Flush( /*! r: error code */ ivas_error IVAS_DEC_EnableVoIP( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ +#ifndef API_5MS #ifdef VARIABLE_SPEED_DECODING const IVAS_DEC_VOIP_MODE voipMode, /* i : VoIP or variable speed */ const uint16_t speedFac, /* i : speed factor for variable speed */ +#endif #endif const int16_t jbmSafetyMargin, /* i : allowed delay reserve for JBM, in milliseconds */ const IVAS_DEC_INPUT_FORMAT inputFormat /* i : format of the input bitstream */ diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index b2b4887499..e5bdd05ed1 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -1348,6 +1348,12 @@ ivas_error ivas_rend_crendProcess( combinedOrientationEnabled = 0; if ( hCombinedOrientationData != NULL ) { +#ifdef API_5MS + if ( hCombinedOrientationData->enableCombinedOrientation != 0 ) + { + combinedOrientationEnabled = 1; + } +#else for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { if ( hCombinedOrientationData->enableCombinedOrientation[subframe_idx] != 0 ) @@ -1356,6 +1362,7 @@ ivas_error ivas_rend_crendProcess( break; } } +#endif } push_wmops( "ivas_rend_crendProcess" ); @@ -1470,6 +1477,12 @@ ivas_error ivas_rend_crendProcessSubframe( combinedOrientationEnabled = 0; if ( hCombinedOrientationData != NULL ) { +#ifdef API_5MS + if ( hCombinedOrientationData->enableCombinedOrientation != 0 ) + { + combinedOrientationEnabled = 1; + } +#else for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { if ( hCombinedOrientationData->enableCombinedOrientation[subframe_idx] != 0 ) @@ -1478,6 +1491,7 @@ ivas_error ivas_rend_crendProcessSubframe( break; } } +#endif } push_wmops( "ivas_rend_crendProcessSubframe" ); diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index 4616993f79..c9aaf13a49 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -235,7 +235,11 @@ ivas_error ivas_dirac_dec_init_binaural_data( st_ivas->hDiracDecBin = hBinaural; /* allocate transport channels*/ +#ifdef API_5MS + if ( st_ivas->hTcBuffer == NULL ) +#else if ( st_ivas->hDecoderConfig->voip_active == 1 && st_ivas->hTcBuffer == NULL ) +#endif { int16_t nchan_to_allocate; @@ -672,7 +676,11 @@ static void ivas_dirac_dec_binaural_internal( { for ( j = 0; j < 3; j++ ) { +#ifdef API_5MS + Rmat[i][j] = hCombinedOrientationData->Rmat[i][j]; +#else Rmat[i][j] = hCombinedOrientationData->Rmat[subframe][i][j]; +#endif } } @@ -685,7 +693,11 @@ static void ivas_dirac_dec_binaural_internal( } ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matrices( st_ivas, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, Rmat, subframe, +#ifdef API_5MS + hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation > 0 ); +#else hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0 ); +#endif if ( st_ivas->ivas_format == ISM_FORMAT ) { @@ -701,7 +713,11 @@ static void ivas_dirac_dec_binaural_internal( } ivas_dirac_dec_binaural_determine_processing_matrices( st_ivas, max_band_decorr, Rmat, +#ifdef API_5MS + hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation > 0 ); +#else hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0 ); +#endif ivas_dirac_dec_binaural_process_output( st_ivas, output_f, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, max_band_decorr, numInChannels, subframe ); st_ivas->hDirAC->hDiffuseDist = NULL; diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 2ba225b2f1..ddd75c28d1 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -301,8 +301,11 @@ ivas_error ivas_td_binaural_renderer_unwrap( TDREND_Update_object_positions( hBinRendererTd, num_src, ivas_format, hIsmMetaData ); } /* Update the listener's location/orientation */ +#ifdef API_5MS + TDREND_Update_listener_orientation( hBinRendererTd, ( enableCombinedOrientation != NULL ) ? *enableCombinedOrientation : 0, ( Quaternions != NULL ) ? Quaternions : NULL, ( Pos != NULL ) ? Pos : NULL ); +#else TDREND_Update_listener_orientation( hBinRendererTd, ( enableCombinedOrientation != NULL ) ? enableCombinedOrientation[subframe_idx] : 0, ( Quaternions != NULL ) ? &Quaternions[subframe_idx] : NULL, ( Pos != NULL ) ? &Pos[subframe_idx] : NULL ); - +#endif if ( hReverb != NULL ) { if ( ( error = ivas_reverb_process( hReverb, transport_config, 0, output, p_reverb_signal, subframe_idx ) ) != IVAS_ERR_OK ) @@ -393,9 +396,17 @@ ivas_error TDREND_GetMix( { pan_left = ( SrcSpatial_p->Pos_p[1] + 1.f ) * 0.5f; pan_right = 1.f - pan_left; +#ifdef FIX_XXX_TDOBJRENDERER_INPUT + v_multc_acc( Src_p->InputFrame_p, pan_left, output_buf[0], subframe_length ); + v_multc_acc( Src_p->InputFrame_p, pan_right, output_buf[1], subframe_length ); +#else v_multc_acc( &Src_p->InputFrame_p[subframe_idx * subframe_length], pan_left, output_buf[0], subframe_length ); v_multc_acc( &Src_p->InputFrame_p[subframe_idx * subframe_length], pan_right, output_buf[1], subframe_length ); +#endif } +#ifdef FIX_XXX_TDOBJRENDERER_INPUT + Src_p->InputFrame_p += subframe_length; +#endif } /* Populate output variable */ @@ -675,9 +686,15 @@ ivas_error ivas_td_binaural_renderer_ext( } if ( ( error = ivas_td_binaural_renderer_unwrap( hReverb, transport_config, pTDRend->hBinRendererTd, num_src, lfe_idx, ivas_format, hIsmMetaData, +#ifdef API_5MS + ( hCombinedOrientationData != NULL ) ? &( *hCombinedOrientationData )->enableCombinedOrientation : NULL, + ( hCombinedOrientationData != NULL ) ? &( *hCombinedOrientationData )->Quaternion : NULL, + ( hCombinedOrientationData != NULL ) ? &( *hCombinedOrientationData )->listenerPos : NULL, +#else ( hCombinedOrientationData != NULL ) ? ( *hCombinedOrientationData )->enableCombinedOrientation : NULL, ( hCombinedOrientationData != NULL ) ? ( *hCombinedOrientationData )->Quaternions : NULL, ( hCombinedOrientationData != NULL ) ? ( *hCombinedOrientationData )->listenerPos : NULL, +#endif ism_md_subframe_update_ext, p_output, output_frame ) ) != IVAS_ERR_OK ) { return error; diff --git a/lib_rend/ivas_objectRenderer_hrFilt.c b/lib_rend/ivas_objectRenderer_hrFilt.c index 6463261ec4..084da6550c 100644 --- a/lib_rend/ivas_objectRenderer_hrFilt.c +++ b/lib_rend/ivas_objectRenderer_hrFilt.c @@ -79,8 +79,9 @@ ivas_error TDREND_REND_RenderSourceHRFilt( v_add( LeftOutputFrame, output_buf[0], output_buf[0], subframe_length ); v_add( RightOutputFrame, output_buf[1], output_buf[1], subframe_length ); +#ifndef FIX_XXX_TDOBJRENDERER_INPUT Src_p->InputFrame_p += subframe_length; /* Increment input pointer */ - +#endif return IVAS_ERR_OK; } diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 2cd2744b5a..0c4114ce2a 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -48,10 +48,15 @@ * Local funtion declarations *-----------------------------------------------------------------------*/ +#ifdef API_5MS +static ivas_error combine_external_and_head_orientations( IVAS_QUATERNION *headRotQuaternions, IVAS_VECTOR3 *listenerPos, EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, COMBINED_ORIENTATION_HANDLE hCombinedOrientationData ); + +static void external_target_interpolation( EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, COMBINED_ORIENTATION_HANDLE hCombinedOrientationData ); +#else static ivas_error combine_external_and_head_orientations( IVAS_QUATERNION *headRotQuaternions, IVAS_VECTOR3 *listenerPos, int16_t numHeadRotQuaternions, EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, COMBINED_ORIENTATION_HANDLE hCombinedOrientationData ); static void external_target_interpolation( EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, const int16_t i ); - +#endif static bool are_orientations_same( const IVAS_QUATERNION *orientation1, const IVAS_QUATERNION *orientation2 ); @@ -75,7 +80,9 @@ ivas_error ivas_headTrack_open( } /* Initialization */ +#ifndef API_5MS ( *hHeadTrackData )->num_quaternions = 0; +#endif ( *hHeadTrackData )->lrSwitchInterpVal = 0.0f; ( *hHeadTrackData )->lrSwitchedCurrent = 0; ( *hHeadTrackData )->lrSwitchedNext = 0; @@ -295,7 +302,11 @@ void rotateFrame_shd( /* calculate ambisonics rotation matrices for the previous and current frames */ SHrotmatgen( SHrotmat_prev, hCombinedOrientationData->Rmat_prev, shd_rot_max_order ); +#ifdef API_5MS + SHrotmatgen( SHrotmat, hCombinedOrientationData->Rmat, shd_rot_max_order ); +#else SHrotmatgen( SHrotmat, hCombinedOrientationData->Rmat[subframe_idx], shd_rot_max_order ); +#endif for ( i = 0; i < subframe_len; i++ ) { @@ -347,7 +358,11 @@ void rotateFrame_shd( /* move Rmat to Rmat_prev */ for ( i = 0; i < 3; i++ ) { +#ifdef API_5MS + mvr2r( hCombinedOrientationData->Rmat[i], hCombinedOrientationData->Rmat_prev[i], 3 ); +#else mvr2r( hCombinedOrientationData->Rmat[subframe_idx][i], hCombinedOrientationData->Rmat_prev[i], 3 ); +#endif } return; @@ -435,7 +450,11 @@ void rotateFrame_sd( /* gains for current subframe rotation */ +#ifdef API_5MS + rotateAziEle( hTransSetup.ls_azimuth[ch_in_woLFE], hTransSetup.ls_elevation[ch_in_woLFE], &azimuth, &elevation, hCombinedOrientationData->Rmat, hTransSetup.is_planar_setup ); +#else rotateAziEle( hTransSetup.ls_azimuth[ch_in_woLFE], hTransSetup.ls_elevation[ch_in_woLFE], &azimuth, &elevation, hCombinedOrientationData->Rmat[subframe_idx], hTransSetup.is_planar_setup ); +#endif if ( hEFAPdata != NULL && ( hTransSetup.ls_azimuth[ch_in_woLFE] != azimuth || hTransSetup.ls_elevation[ch_in_woLFE] != elevation ) ) { efap_determine_gains( hEFAPdata, tmp_gains, azimuth, elevation, EFAP_MODE_EFAP ); @@ -472,7 +491,11 @@ void rotateFrame_sd( /* move Rmat to Rmat_prev */ for ( i = 0; i < 3; i++ ) { +#ifdef API_5MS + mvr2r( hCombinedOrientationData->Rmat[i], hCombinedOrientationData->Rmat_prev[i], 3 ); +#else mvr2r( hCombinedOrientationData->Rmat[subframe_idx][i], hCombinedOrientationData->Rmat_prev[i], 3 ); +#endif } /* copy to output */ @@ -701,7 +724,9 @@ ivas_error ivas_external_orientation_open( EXTERNAL_ORIENTATION_HANDLE *hExtOrientationData /* o : external orientation handle */ ) { +#ifndef API_5MS int16_t i; +#endif IVAS_QUATERNION identity; identity.w = 1.0f; @@ -714,6 +739,13 @@ ivas_error ivas_external_orientation_open( } /* Enable head rotation and disable external orientation as default */ +#ifdef API_5MS + ( *hExtOrientationData )->enableHeadRotation = 1; + ( *hExtOrientationData )->enableExternalOrientation = 0; + ( *hExtOrientationData )->enableRotationInterpolation = 0; + ( *hExtOrientationData )->numFramesToTargetOrientation = 0; + ( *hExtOrientationData )->Quaternion = identity; +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { ( *hExtOrientationData )->enableHeadRotation[i] = 1; @@ -722,7 +754,7 @@ ivas_error ivas_external_orientation_open( ( *hExtOrientationData )->numFramesToTargetOrientation[i] = 0; ( *hExtOrientationData )->Quaternions[i] = identity; } - +#endif return IVAS_ERR_OK; } @@ -759,7 +791,10 @@ ivas_error ivas_combined_orientation_open( COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData /* o : combined orientation handle */ ) { - int16_t i, j; +#ifndef API_5MS + int16_t i; +#endif + int16_t j; IVAS_QUATERNION identity; IVAS_VECTOR3 origo; @@ -776,7 +811,11 @@ ivas_error ivas_combined_orientation_open( /* Initialization */ ( *hCombinedOrientationData )->interpolationCoefficient = 1.0f; ( *hCombinedOrientationData )->interpolationIncrement = 1.0f; +#ifdef API_5MS + ( *hCombinedOrientationData )->maximumFramesToTargetOrientation = 2000; +#else ( *hCombinedOrientationData )->maximumFramesToTargetOrientation = 500; +#endif ( *hCombinedOrientationData )->lrSwitchedNext = 0; ( *hCombinedOrientationData )->lrSwitchedCurrent = 0; ( *hCombinedOrientationData )->lrSwitchInterpVal = 0.0f; @@ -784,6 +823,19 @@ ivas_error ivas_combined_orientation_open( ( *hCombinedOrientationData )->Quaternions_ext_interpolation_start = identity; ( *hCombinedOrientationData )->Quaternions_ext_interpolation_target = identity; +#ifdef API_5MS + ( *hCombinedOrientationData )->enableCombinedOrientation = 0; + ( *hCombinedOrientationData )->Quaternion = identity; + ( *hCombinedOrientationData )->Quaternion_prev_headRot = identity; + ( *hCombinedOrientationData )->Quaternion_prev_extOrientation = identity; + ( *hCombinedOrientationData )->listenerPos = origo; + + for ( j = 0; j < 3; j++ ) + { + set_zero( ( *hCombinedOrientationData )->Rmat[j], 3 ); + ( *hCombinedOrientationData )->Rmat[j][j] = 1.0f; + } +#else /* Initialise orientations to identity */ for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { @@ -799,7 +851,7 @@ ivas_error ivas_combined_orientation_open( ( *hCombinedOrientationData )->Rmat[i][j][j] = 1.0f; } } - +#endif for ( j = 0; j < 3; j++ ) { set_zero( ( *hCombinedOrientationData )->Rmat_prev[j], 3 ); @@ -851,19 +903,29 @@ ivas_error combine_external_and_head_orientations_dec( { IVAS_QUATERNION *headRotQuaternions = NULL; IVAS_VECTOR3 *listenerPos = NULL; +#ifndef API_5MS int16_t numHeadRotQuaternions = 0; +#endif if ( hHeadTrackData != NULL ) { +#ifdef API_5MS + headRotQuaternions = &hHeadTrackData->Quaternion; + listenerPos = &hHeadTrackData->Pos; +#else numHeadRotQuaternions = hHeadTrackData->num_quaternions; if ( hHeadTrackData->num_quaternions >= 0 ) { headRotQuaternions = hHeadTrackData->Quaternions; listenerPos = hHeadTrackData->Pos; } +#endif } - +#ifdef API_5MS + return combine_external_and_head_orientations( headRotQuaternions, listenerPos, hExtOrientationData, hCombinedOrientationData ); +#else return combine_external_and_head_orientations( headRotQuaternions, listenerPos, numHeadRotQuaternions, hExtOrientationData, hCombinedOrientationData ); +#endif } @@ -881,8 +943,10 @@ ivas_error combine_external_and_head_orientations_rend( { IVAS_QUATERNION *headRotQuaternions = NULL; IVAS_VECTOR3 *listenerPos = NULL; +#ifndef API_5MS int16_t numHeadRotQuaternions = 0; int16_t i; +#endif if ( hHeadTrackData != NULL ) { @@ -895,6 +959,13 @@ ivas_error combine_external_and_head_orientations_rend( else if ( hExtOrientationData != NULL ) { /* Head rotation data not available, use the freezed value or disable */ +#ifdef API_5MS + if ( hExtOrientationData->enableHeadRotation != 2 ) + { + hExtOrientationData->enableHeadRotation = 0; + } + +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { if ( hExtOrientationData->enableHeadRotation[i] != 2 ) @@ -902,9 +973,13 @@ ivas_error combine_external_and_head_orientations_rend( hExtOrientationData->enableHeadRotation[i] = 0; } } +#endif } - +#ifdef API_5MS + return combine_external_and_head_orientations( headRotQuaternions, listenerPos, hExtOrientationData, hCombinedOrientationData ); +#else return combine_external_and_head_orientations( headRotQuaternions, listenerPos, numHeadRotQuaternions, hExtOrientationData, hCombinedOrientationData ); +#endif } @@ -915,15 +990,20 @@ ivas_error combine_external_and_head_orientations_rend( * NOTE that the external orientations are inversed. *------------------------------------------------------------------------*/ -static ivas_error combine_external_and_head_orientations( - IVAS_QUATERNION *headRotQuaternions, /* i : quaternions for head rotation */ - IVAS_VECTOR3 *listenerPos, /* i : listener position */ - int16_t numHeadRotQuaternions, /* i : number of head rotation quaternions */ - EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, /* i : external orientation handle */ - COMBINED_ORIENTATION_HANDLE hCombinedOrientationData /* i/o: combined orientation handle */ +ivas_error combine_external_and_head_orientations( + IVAS_QUATERNION *headRotQuaternions, /* i : quaternions for head rotation */ + IVAS_VECTOR3 *listenerPos, /* i : listener position */ +#ifndef API_5MS + int16_t numHeadRotQuaternions, /* i : number of head rotation quaternions */ +#endif + EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, /* i : external orientation handle */ + COMBINED_ORIENTATION_HANDLE hCombinedOrientationData /* i/o: combined orientation handle */ ) { - int16_t i, j; +#ifndef API_5MS + int16_t i; +#endif + int16_t j; IVAS_QUATERNION identity; IVAS_VECTOR3 origo; @@ -951,6 +1031,18 @@ static ivas_error combine_external_and_head_orientations( hCombinedOrientationData->interpolationIncrement = 1.0f; hCombinedOrientationData->Quaternions_ext_interpolation_start = identity; hCombinedOrientationData->Quaternions_ext_interpolation_target = identity; +#ifdef API_5MS + + hCombinedOrientationData->enableCombinedOrientation = 0; + hCombinedOrientationData->Quaternion = identity; + hCombinedOrientationData->listenerPos = origo; + + for ( j = 0; j < 3; j++ ) + { + set_zero( hCombinedOrientationData->Rmat[j], 3 ); + hCombinedOrientationData->Rmat[j][j] = 1.0f; + } +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { hCombinedOrientationData->enableCombinedOrientation[i] = 0; @@ -963,10 +1055,15 @@ static ivas_error combine_external_and_head_orientations( hCombinedOrientationData->Rmat[i][j][j] = 1.0f; } } +#endif } else if ( hExtOrientationData == NULL && headRotQuaternions != NULL ) { /* Head rotation only */ +#ifdef API_5MS + hCombinedOrientationData->Quaternion = *headRotQuaternions; + +#else if ( numHeadRotQuaternions >= 0 ) { for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) @@ -974,11 +1071,47 @@ static ivas_error combine_external_and_head_orientations( hCombinedOrientationData->Quaternions[i] = headRotQuaternions[i]; } } +#endif } if ( hExtOrientationData != NULL ) { /* External orientations */ +#ifdef API_5MS + + if ( hExtOrientationData->enableRotationInterpolation == 1 && hExtOrientationData->enableExternalOrientation > 0 ) + { + if ( hCombinedOrientationData->isInterpolationOngoing == TRUE && hCombinedOrientationData->interpolationCoefficient <= 1.0f && are_orientations_same( &hCombinedOrientationData->Quaternions_ext_interpolation_target, &hExtOrientationData->Quaternion ) == true ) + { + /* Continue interpolation */ + QuaternionSlerp( hCombinedOrientationData->Quaternions_ext_interpolation_start, hCombinedOrientationData->Quaternions_ext_interpolation_target, hCombinedOrientationData->interpolationCoefficient, &hCombinedOrientationData->Quaternion ); + hCombinedOrientationData->interpolationCoefficient += hCombinedOrientationData->interpolationIncrement; + } + else + { + /* Stop interpolation or check for new interpolation */ + hCombinedOrientationData->isInterpolationOngoing = FALSE; + hCombinedOrientationData->interpolationCoefficient = 1.0f; + hCombinedOrientationData->interpolationIncrement = 1.0f; + external_target_interpolation( hExtOrientationData, hCombinedOrientationData ); + } + } + else + { + /* Interpolation disabled, use the current orientation values */ + + /* Use the most recent external orientation */ + if ( hExtOrientationData->enableExternalOrientation == 1 ) + { + hCombinedOrientationData->Quaternion = hExtOrientationData->Quaternion; + } + /* Use the freezed external orientation */ + else if ( hExtOrientationData->enableExternalOrientation == 2 ) + { + hCombinedOrientationData->Quaternion = hCombinedOrientationData->Quaternion_prev_extOrientation; + } + } +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { if ( hExtOrientationData->enableRotationInterpolation[i] == 1 && hExtOrientationData->enableExternalOrientation[i] > 0 ) @@ -1014,11 +1147,46 @@ static ivas_error combine_external_and_head_orientations( } } } +#endif } if ( hExtOrientationData != NULL && headRotQuaternions != NULL ) { /* Combine head and external orientations */ +#ifdef API_5MS + + /* Use the most recent head rotation */ + if ( hExtOrientationData->enableHeadRotation == 1 ) + { + if ( hExtOrientationData->enableExternalOrientation > 0 ) + { + QuaternionProduct( hCombinedOrientationData->Quaternion, *headRotQuaternions, &hCombinedOrientationData->Quaternion ); + } + else + { + hCombinedOrientationData->Quaternion = *headRotQuaternions; + } + } + /* Use the freezed head rotation */ + else if ( hExtOrientationData->enableHeadRotation == 2 ) + { + if ( hExtOrientationData->enableExternalOrientation > 0 ) + { + QuaternionProduct( hCombinedOrientationData->Quaternion, hCombinedOrientationData->Quaternion_prev_headRot, &hCombinedOrientationData->Quaternion ); + } + else + { + hCombinedOrientationData->Quaternion = hCombinedOrientationData->Quaternion_prev_headRot; + } + } + + /* Reset the combined orientations to identity */ + if ( hExtOrientationData->enableHeadRotation == 0 && hExtOrientationData->enableExternalOrientation == 0 ) + { + hCombinedOrientationData->Quaternion = identity; + } + +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { /* Use the most recent head rotation */ @@ -1052,20 +1220,36 @@ static ivas_error combine_external_and_head_orientations( hCombinedOrientationData->Quaternions[i] = identity; } } +#endif } if ( headRotQuaternions != NULL || hExtOrientationData != NULL ) { /* Calculate the combined rotation matrix */ +#ifdef API_5MS + QuatToRotMat( hCombinedOrientationData->Quaternion, hCombinedOrientationData->Rmat ); +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { QuatToRotMat( hCombinedOrientationData->Quaternions[i], hCombinedOrientationData->Rmat[i] ); } +#endif } /* Save the current orientations */ if ( hExtOrientationData != NULL ) { +#ifdef API_5MS + if ( hExtOrientationData->enableExternalOrientation > 0 ) + { + hCombinedOrientationData->Quaternion_prev_extOrientation = hCombinedOrientationData->Quaternion; + } + else + { + hCombinedOrientationData->Quaternion_prev_extOrientation = identity; + } + +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { if ( hExtOrientationData->enableExternalOrientation[i] > 0 ) @@ -1077,9 +1261,29 @@ static ivas_error combine_external_and_head_orientations( hCombinedOrientationData->Quaternions_prev_extOrientation[i] = identity; } } +#endif } if ( headRotQuaternions != NULL ) { +#ifdef API_5MS + if ( hExtOrientationData != NULL ) + { + if ( hExtOrientationData->enableHeadRotation > 0 ) + { + hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternions; + } + else + { + hCombinedOrientationData->Quaternion_prev_headRot = identity; + } + } + else + { + hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternions; + } + hCombinedOrientationData->listenerPos = *listenerPos; + +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { if ( hExtOrientationData != NULL ) @@ -1106,11 +1310,16 @@ static ivas_error combine_external_and_head_orientations( } hCombinedOrientationData->listenerPos[i] = listenerPos[i]; } +#endif } /* Check if combined orientation is enabled */ if ( headRotQuaternions != NULL && hExtOrientationData == NULL ) { +#ifdef API_5MS + hCombinedOrientationData->enableCombinedOrientation = 1; + +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { if ( numHeadRotQuaternions >= 0 ) @@ -1122,9 +1331,20 @@ static ivas_error combine_external_and_head_orientations( hCombinedOrientationData->enableCombinedOrientation[i] = 0; } } +#endif } else if ( headRotQuaternions == NULL && hExtOrientationData != NULL ) { +#ifdef API_5MS + if ( hExtOrientationData->enableExternalOrientation > 0 ) + { + hCombinedOrientationData->enableCombinedOrientation = 1; + } + else + { + hCombinedOrientationData->enableCombinedOrientation = 0; + } +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { if ( hExtOrientationData->enableExternalOrientation[i] > 0 ) @@ -1136,9 +1356,20 @@ static ivas_error combine_external_and_head_orientations( hCombinedOrientationData->enableCombinedOrientation[i] = 0; } } +#endif } else if ( headRotQuaternions != NULL && hExtOrientationData != NULL ) { +#ifdef API_5MS + if ( hExtOrientationData->enableExternalOrientation > 0 || hExtOrientationData->enableHeadRotation > 0 ) + { + hCombinedOrientationData->enableCombinedOrientation = 1; + } + else + { + hCombinedOrientationData->enableCombinedOrientation = 0; + } +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { if ( hExtOrientationData->enableExternalOrientation[i] > 0 || ( hExtOrientationData->enableHeadRotation[i] > 0 && numHeadRotQuaternions >= 0 ) ) @@ -1150,13 +1381,18 @@ static ivas_error combine_external_and_head_orientations( hCombinedOrientationData->enableCombinedOrientation[i] = 0; } } +#endif } else { +#ifdef API_5MS + hCombinedOrientationData->enableCombinedOrientation = 0; +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { hCombinedOrientationData->enableCombinedOrientation[i] = 0; } +#endif } return IVAS_ERR_OK; @@ -1169,36 +1405,69 @@ static ivas_error combine_external_and_head_orientations( * *------------------------------------------------------------------------*/ -static void external_target_interpolation( - EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, /* i : external orientation handle */ - COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i/o: combined orientation handle */ - const int16_t i ) +void external_target_interpolation( + EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, /* i : external orientation handle */ + COMBINED_ORIENTATION_HANDLE hCombinedOrientationData /* i/o: combined orientation handle */ +#ifndef API_5MS + , + const int16_t i +#endif +) { /* Sanity check for number of frames */ +#ifdef API_5MS + hExtOrientationData->numFramesToTargetOrientation = min( hExtOrientationData->numFramesToTargetOrientation, hCombinedOrientationData->maximumFramesToTargetOrientation ); + hExtOrientationData->numFramesToTargetOrientation = max( hExtOrientationData->numFramesToTargetOrientation, 0 ); +#else hExtOrientationData->numFramesToTargetOrientation[i] = min( hExtOrientationData->numFramesToTargetOrientation[i], hCombinedOrientationData->maximumFramesToTargetOrientation ); hExtOrientationData->numFramesToTargetOrientation[i] = max( hExtOrientationData->numFramesToTargetOrientation[i], 0 ); +#endif /* Interpolate from the current orientation to the target orientation */ +#ifdef API_5MS + if ( hExtOrientationData->numFramesToTargetOrientation > 0 ) +#else if ( hExtOrientationData->numFramesToTargetOrientation[i] > 0 ) +#endif { +#ifdef API_5MS + if ( are_orientations_same( &hCombinedOrientationData->Quaternions_ext_interpolation_target, &hExtOrientationData->Quaternion ) == false ) +#else if ( are_orientations_same( &hCombinedOrientationData->Quaternions_ext_interpolation_target, &hExtOrientationData->Quaternions[i] ) == false ) +#endif { /* Target orientation is different from the previous target, update the values */ /* Set the received orientation as the target */ +#ifdef API_5MS + hCombinedOrientationData->Quaternions_ext_interpolation_target = hExtOrientationData->Quaternion; +#else hCombinedOrientationData->Quaternions_ext_interpolation_target = hExtOrientationData->Quaternions[i]; +#endif /* Use the most recent external orientation as the starting orientation */ +#ifdef API_5MS + hCombinedOrientationData->Quaternions_ext_interpolation_start = hCombinedOrientationData->Quaternion_prev_extOrientation; +#else hCombinedOrientationData->Quaternions_ext_interpolation_start = hCombinedOrientationData->Quaternions_prev_extOrientation[i]; +#endif /* Calculate the interpolation increment and coefficient */ +#ifdef API_5MS + hCombinedOrientationData->interpolationIncrement = 1.0f / ( (float) hExtOrientationData->numFramesToTargetOrientation ); +#else hCombinedOrientationData->interpolationIncrement = 1.0f / ( (float) hExtOrientationData->numFramesToTargetOrientation[i] * (float) MAX_PARAM_SPATIAL_SUBFRAMES ); +#endif hCombinedOrientationData->interpolationCoefficient = hCombinedOrientationData->interpolationIncrement; } /* Interpolate */ hCombinedOrientationData->isInterpolationOngoing = TRUE; +#ifdef API_5MS + QuaternionSlerp( hCombinedOrientationData->Quaternions_ext_interpolation_start, hCombinedOrientationData->Quaternions_ext_interpolation_target, hCombinedOrientationData->interpolationCoefficient, &hCombinedOrientationData->Quaternion ); +#else QuaternionSlerp( hCombinedOrientationData->Quaternions_ext_interpolation_start, hCombinedOrientationData->Quaternions_ext_interpolation_target, hCombinedOrientationData->interpolationCoefficient, &hCombinedOrientationData->Quaternions[i] ); +#endif hCombinedOrientationData->interpolationCoefficient += hCombinedOrientationData->interpolationIncrement; } else @@ -1207,7 +1476,11 @@ static void external_target_interpolation( hCombinedOrientationData->isInterpolationOngoing = FALSE; hCombinedOrientationData->interpolationCoefficient = 1.0f; hCombinedOrientationData->interpolationIncrement = 1.0f; +#ifdef API_5MS + hCombinedOrientationData->Quaternion = hExtOrientationData->Quaternion; +#else hCombinedOrientationData->Quaternions[i] = hExtOrientationData->Quaternions[i]; +#endif } return; diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index c763630325..14de5e7d55 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -257,9 +257,14 @@ typedef struct typedef struct ivas_binaural_head_track_struct { +#ifdef API_5MS + IVAS_QUATERNION Quaternion; + IVAS_VECTOR3 Pos; +#else int16_t num_quaternions; IVAS_QUATERNION Quaternions[MAX_PARAM_SPATIAL_SUBFRAMES]; IVAS_VECTOR3 Pos[MAX_PARAM_SPATIAL_SUBFRAMES]; +#endif float Rmat[3][3]; float Rmat_prev[3][3]; @@ -281,12 +286,19 @@ typedef struct ivas_binaural_head_track_struct typedef struct ivas_external_orientation_struct { +#ifdef API_5MS + int8_t enableHeadRotation; /* 0 - disable, 1 - enable, 2 - freeze to previous rotation */ + int8_t enableExternalOrientation; /* 0 - disable, 1 - enable, 2 - freeze to previous orientation */ + int8_t enableRotationInterpolation; /* 0 - disable, 1 - enable */ + int16_t numFramesToTargetOrientation; /* Number of frames until target orientation is reached */ + IVAS_QUATERNION Quaternion; /* External orientation in quaternions */ +#else int8_t enableHeadRotation[MAX_PARAM_SPATIAL_SUBFRAMES]; /* 0 - disable, 1 - enable, 2 - freeze to previous rotation */ int8_t enableExternalOrientation[MAX_PARAM_SPATIAL_SUBFRAMES]; /* 0 - disable, 1 - enable, 2 - freeze to previous orientation */ int8_t enableRotationInterpolation[MAX_PARAM_SPATIAL_SUBFRAMES]; /* 0 - disable, 1 - enable */ int16_t numFramesToTargetOrientation[MAX_PARAM_SPATIAL_SUBFRAMES]; /* Number of frames until target orientation is reached */ IVAS_QUATERNION Quaternions[MAX_PARAM_SPATIAL_SUBFRAMES]; /* External orientation in quaternions */ - +#endif } EXTERNAL_ORIENTATION_DATA, *EXTERNAL_ORIENTATION_HANDLE; /*----------------------------------------------------------------------------------* @@ -295,7 +307,11 @@ typedef struct ivas_external_orientation_struct typedef struct ivas_combined_orientation_struct { +#ifdef API_5MS + int16_t enableCombinedOrientation; +#else int16_t enableCombinedOrientation[MAX_PARAM_SPATIAL_SUBFRAMES]; +#endif float interpolationCoefficient; float interpolationIncrement; int16_t maximumFramesToTargetOrientation; @@ -303,17 +319,31 @@ typedef struct ivas_combined_orientation_struct uint8_t lrSwitchedCurrent; float lrSwitchInterpVal; bool isInterpolationOngoing; +#ifdef API_5MS + IVAS_QUATERNION Quaternion; + IVAS_QUATERNION Quaternion_prev_headRot; + IVAS_QUATERNION Quaternion_prev_extOrientation; +#else IVAS_QUATERNION Quaternions[MAX_PARAM_SPATIAL_SUBFRAMES]; IVAS_QUATERNION Quaternions_prev_headRot[MAX_PARAM_SPATIAL_SUBFRAMES]; IVAS_QUATERNION Quaternions_prev_extOrientation[MAX_PARAM_SPATIAL_SUBFRAMES]; +#endif IVAS_QUATERNION Quaternions_ext_interpolation_start; IVAS_QUATERNION Quaternions_ext_interpolation_target; +#ifdef API_5MS + float Rmat[3][3]; +#else float Rmat[MAX_PARAM_SPATIAL_SUBFRAMES][3][3]; +#endif float Rmat_prev[3][3]; float chEneIIR[2][MASA_FREQUENCY_BANDS]; /* independent of the format. MASA bands are suitable for the task and readily available in ROM. */ float procChEneIIR[2][MASA_FREQUENCY_BANDS]; int16_t shd_rot_max_order; +#ifdef API_5MS + IVAS_VECTOR3 listenerPos; +#else IVAS_VECTOR3 listenerPos[MAX_PARAM_SPATIAL_SUBFRAMES]; +#endif } COMBINED_ORIENTATION_DATA, *COMBINED_ORIENTATION_HANDLE; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 4e75d5fea8..89b51e7745 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -2583,8 +2583,11 @@ static DecoderDummy *initDecoderDummy( decDummy->hDecoderConfig->output_Fs = sampleRate; decDummy->hDecoderConfig->nchan_out = numOutChannels; decDummy->hDecoderConfig->Opt_Headrotation = 0; +#ifdef API_5MS + decDummy->hDecoderConfig->tsm_active = 0; +#else decDummy->hDecoderConfig->voip_active = 0; - +#endif decDummy->hBinRenderer = NULL; decDummy->hEFAPdata = NULL; decDummy->hCrendWrapper = NULL; @@ -2616,6 +2619,12 @@ static DecoderDummy *initDecoderDummy( set_zero( decDummy->hHeadTrackData->chEneIIR[1], MASA_FREQUENCY_BANDS ); set_zero( decDummy->hHeadTrackData->procChEneIIR[0], MASA_FREQUENCY_BANDS ); set_zero( decDummy->hHeadTrackData->procChEneIIR[1], MASA_FREQUENCY_BANDS ); +#ifdef API_5MS + decDummy->hHeadTrackData->Quaternion.w = 1.0f; + decDummy->hHeadTrackData->Quaternion.x = 0.0f; + decDummy->hHeadTrackData->Quaternion.y = 0.0f; + decDummy->hHeadTrackData->Quaternion.z = 0.0f; +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { decDummy->hHeadTrackData->Quaternions[i].w = 1.0f; @@ -2623,7 +2632,7 @@ static DecoderDummy *initDecoderDummy( decDummy->hHeadTrackData->Quaternions[i].y = 0.0f; decDummy->hHeadTrackData->Quaternions[i].z = 0.0f; } - decDummy->hHeadTrackData->num_quaternions = 0; +#endif decDummy->hHeadTrackData->lrSwitchInterpVal = 0.0f; decDummy->hHeadTrackData->lrSwitchedCurrent = 0; decDummy->hHeadTrackData->lrSwitchedNext = 0; @@ -4246,21 +4255,35 @@ ivas_error IVAS_REND_SetExternalOrientation( if ( orientation == NULL ) { +#ifdef API_5MS + hIvasRend->hExternalOrientationData->enableExternalOrientation = 0; +#else for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; ++i ) { hIvasRend->hExternalOrientationData->enableExternalOrientation[i] = 0; } +#endif } else { for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; ++i ) { +#ifdef API_5MS + /* just fix compilation issues, ToDo: change ext renderer also to 5ms */ + QuaternionInverse( orientation[i], &hIvasRend->hExternalOrientationData->Quaternion ); + + hIvasRend->hExternalOrientationData->enableHeadRotation = enableHeadRotation[i]; + hIvasRend->hExternalOrientationData->enableExternalOrientation = enableExternalOrientation[i]; + hIvasRend->hExternalOrientationData->enableRotationInterpolation = enableRotationInterpolation[i]; + hIvasRend->hExternalOrientationData->numFramesToTargetOrientation = numFramesToTargetOrientation[i]; +#else QuaternionInverse( orientation[i], &hIvasRend->hExternalOrientationData->Quaternions[i] ); hIvasRend->hExternalOrientationData->enableHeadRotation[i] = enableHeadRotation[i]; hIvasRend->hExternalOrientationData->enableExternalOrientation[i] = enableExternalOrientation[i]; hIvasRend->hExternalOrientationData->enableRotationInterpolation[i] = enableRotationInterpolation[i]; hIvasRend->hExternalOrientationData->numFramesToTargetOrientation[i] = numFramesToTargetOrientation[i]; +#endif } } @@ -4309,7 +4332,12 @@ ivas_error IVAS_REND_GetCombinedOrientation( { for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; ++i ) { +#ifdef API_5MS + /* fix compilation only,ToDo adapt ext renderer to 5ms , this functions looks stale anyway */ + pOrientation[i] = hIvasRend->hCombinedOrientationData->Quaternion; +#else pOrientation[i] = hIvasRend->hCombinedOrientationData->Quaternions[i]; +#endif } } @@ -4468,7 +4496,12 @@ static ivas_error rotateFrameMc( { for ( j = 0; j < 3; j++ ) { +#ifdef API_5MS + /* fix compiling only, ToDo adapt ext renderer to 5ms */ + Rmat[i][j] = ( *hCombinedOrientationData )->Rmat[i][j]; +#else Rmat[i][j] = ( *hCombinedOrientationData )->Rmat[subframe_idx][i][j]; +#endif } } else @@ -4585,7 +4618,12 @@ static ivas_error rotateFrameSba( { for ( l = 0; l < 3; l++ ) { +#ifdef API_5MS + /* fix compilation only, ToDo adapt ext renderer to 5ms */ + Rmat[i][l] = ( *hCombinedOrientationData )->Rmat[i][l]; +#else Rmat[i][l] = ( *hCombinedOrientationData )->Rmat[subframe_idx][i][l]; +#endif } } else @@ -4723,14 +4761,23 @@ static ivas_error renderIsmToBinauralRoom( combinedOrientationEnabled = 0; if ( hCombinedOrientationData != NULL ) { +#ifdef API_5MS + /* fix compilation only, ToDo adapt ext renderer to 5ms */ + if ( ( *hCombinedOrientationData )->enableCombinedOrientation != 0 ) + { + combinedOrientationEnabled = 1; + } +#else for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { + if ( ( *hCombinedOrientationData )->enableCombinedOrientation[subframe_idx] != 0 ) { combinedOrientationEnabled = 1; break; } } +#endif } @@ -4742,6 +4789,16 @@ static ivas_error renderIsmToBinauralRoom( { for ( i = 0; i < 3; i++ ) { +#ifdef API_5MS + /* at least this looks like it is adapted to 5ms already since it "loops" only over the first subframe, ToDo needs to be checked */ + if ( hCombinedOrientationData != NULL && ( *hCombinedOrientationData )->enableCombinedOrientation ) + { + for ( j = 0; j < 3; j++ ) + { + Rmat[i][j] = ( *hCombinedOrientationData )->Rmat[i][j]; + } + } +#else if ( hCombinedOrientationData != NULL && ( *hCombinedOrientationData )->enableCombinedOrientation[subframe_idx] ) { for ( j = 0; j < 3; j++ ) @@ -4749,6 +4806,7 @@ static ivas_error renderIsmToBinauralRoom( Rmat[i][j] = ( *hCombinedOrientationData )->Rmat[subframe_idx][i][j]; } } +#endif else { /* Set to identity */ @@ -5148,7 +5206,9 @@ static ivas_error renderMcToBinaural( IVAS_REND_AudioBuffer tmpRotBuffer; const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData; int8_t combinedOrientationEnabled; +#ifndef API_5MS int16_t subframe_idx; +#endif float *p_tmpRendBuffer[MAX_OUTPUT_CHANNELS]; int16_t i; @@ -5165,6 +5225,14 @@ static ivas_error renderMcToBinaural( combinedOrientationEnabled = 0; if ( hCombinedOrientationData != NULL ) { +#ifdef API_5MS + /* fix compiling only, ToDo ext renderer needs to adapted to 5ms */ + if ( ( *hCombinedOrientationData )->enableCombinedOrientation != 0 ) + { + combinedOrientationEnabled = 1; + } + +#else for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { if ( ( *hCombinedOrientationData )->enableCombinedOrientation[subframe_idx] != 0 ) @@ -5173,6 +5241,7 @@ static ivas_error renderMcToBinaural( break; } } +#endif } if ( ( inConfig == IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) || ( combinedOrientationEnabled @@ -5246,7 +5315,9 @@ static ivas_error renderMcToBinauralRoom( int16_t i; const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData; int8_t combinedOrientationEnabled; +#ifndef API_5MS int16_t subframe_idx; +#endif for ( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) { @@ -5261,6 +5332,13 @@ static ivas_error renderMcToBinauralRoom( combinedOrientationEnabled = 0; if ( hCombinedOrientationData != NULL ) { +#ifdef API_5MS + /* fix compiling only, ToDo ext renderer needs to adapted to 5ms */ + if ( ( *hCombinedOrientationData )->enableCombinedOrientation != 0 ) + { + combinedOrientationEnabled = 1; + } +#else for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { if ( ( *hCombinedOrientationData )->enableCombinedOrientation[subframe_idx] != 0 ) @@ -5269,6 +5347,7 @@ static ivas_error renderMcToBinauralRoom( break; } } +#endif } if ( ( mcInput->hReverb != NULL && outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) && ( ( inConfig == IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) || ( combinedOrientationEnabled && ( inConfig == IVAS_REND_AUDIO_CONFIG_5_1 || inConfig == IVAS_REND_AUDIO_CONFIG_7_1 ) ) ) ) @@ -5341,7 +5420,9 @@ static ivas_error renderMcCustomLsToBinauralRoom( float *p_tmpCrendBuffer[MAX_OUTPUT_CHANNELS]; const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData; int8_t combinedOrientationEnabled; +#ifndef API_5MS int16_t subframe_idx; +#endif push_wmops( "renderMcCustomLsToBinauralRoom" ); @@ -5356,6 +5437,13 @@ static ivas_error renderMcCustomLsToBinauralRoom( combinedOrientationEnabled = 0; if ( hCombinedOrientationData != NULL ) { +#ifdef API_5MS + /* fix compilin only, ToDo adapt renderer to 5ms */ + if ( ( *hCombinedOrientationData )->enableCombinedOrientation != 0 ) + { + combinedOrientationEnabled = 1; + } +#else for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { if ( ( *hCombinedOrientationData )->enableCombinedOrientation[subframe_idx] != 0 ) @@ -5364,6 +5452,7 @@ static ivas_error renderMcCustomLsToBinauralRoom( break; } } +#endif } /* apply rotation */ @@ -5627,7 +5716,9 @@ static ivas_error renderSbaToBinaural( int16_t i; const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData; int8_t combinedOrientationEnabled; +#ifndef API_5MS int16_t subframe_idx; +#endif push_wmops( "renderSbaToBinaural" ); @@ -5640,6 +5731,13 @@ static ivas_error renderSbaToBinaural( combinedOrientationEnabled = 0; if ( hCombinedOrientationData != NULL ) { +#ifdef API_5MS + /* fix compiling only, ToDo ext renderer needs to adapted to 5ms */ + if ( ( *hCombinedOrientationData )->enableCombinedOrientation != 0 ) + { + combinedOrientationEnabled = 1; + } +#else for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { if ( ( *hCombinedOrientationData )->enableCombinedOrientation[subframe_idx] != 0 ) @@ -5648,6 +5746,7 @@ static ivas_error renderSbaToBinaural( break; } } +#endif } /* apply rotation */ @@ -5703,7 +5802,9 @@ static ivas_error renderSbaToBinauralRoom( float *p_tmpCrendBuffer[MAX_OUTPUT_CHANNELS]; const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData; int8_t combinedOrientationEnabled; +#ifndef API_5MS int16_t subframe_idx; +#endif tmpRotBuffer = outAudio; /* avoid compilation warning */ @@ -5718,6 +5819,13 @@ static ivas_error renderSbaToBinauralRoom( combinedOrientationEnabled = 0; if ( hCombinedOrientationData != NULL ) { +#ifdef API_5MS + /* fix compiling only, ToDo ext renderer needs to adapted to 5ms */ + if ( ( *hCombinedOrientationData )->enableCombinedOrientation != 0 ) + { + combinedOrientationEnabled = 1; + } +#else for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { if ( ( *hCombinedOrientationData )->enableCombinedOrientation[subframe_idx] != 0 ) @@ -5726,6 +5834,7 @@ static ivas_error renderSbaToBinauralRoom( break; } } +#endif } /* apply rotation */ @@ -6193,8 +6302,14 @@ static ivas_error renderActiveInputsMasa( { for ( sf_idx = 0; sf_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; ++sf_idx ) { +#ifdef API_5MS + /* fix compilation only, ToDo adapt ext renderer to 5ms */ + pCurrentInput->decDummy->hHeadTrackData->Quaternion = hIvasRend->headRotData.headPositions[sf_idx]; + pCurrentInput->decDummy->hHeadTrackData->Pos = hIvasRend->headRotData.Pos[sf_idx]; +#else pCurrentInput->decDummy->hHeadTrackData->Quaternions[sf_idx] = hIvasRend->headRotData.headPositions[sf_idx]; pCurrentInput->decDummy->hHeadTrackData->Pos[sf_idx] = hIvasRend->headRotData.Pos[sf_idx]; +#endif } } diff --git a/scripts/self_test.py b/scripts/self_test.py index d7118832db..321f83419b 100755 --- a/scripts/self_test.py +++ b/scripts/self_test.py @@ -186,6 +186,13 @@ class SelfTest(IvasScriptsCommon.IvasScript): "--dectest", help="Test decoder binary (default:{})".format(default_dec_test), ) + self.parser.add_argument( + "--list_conditions", + "-l", + help="List all comditions in the parameter file", + action="store_true", + default=False, + ) if shutil.which("valgrind"): self.valgrind = [ "valgrind", @@ -858,6 +865,7 @@ class SelfTest(IvasScriptsCommon.IvasScript): # add the detailed results for this condition self.fail_results["detailedResults"].append(result_str) + self.fail_results["failed_modes"].append(mode) self.logger.progress( "Comparing conditions: {}/{} ({} running), {} failed ".format( self.stat["num_tests_done"], @@ -1140,6 +1148,11 @@ class SelfTest(IvasScriptsCommon.IvasScript): self.parse_args() + if self.args["list_conditions"] is True: + run_dict = self.parse_self_test_prm(self.args["test_prm"]) + for mode in run_dict.keys(): + self.logger.console(f"- {run_dict[mode]['cmd']['table_name']}") + return # create/update test vectors (export from SVN server if not existing) svn_action = None if not os.path.exists(TESTV_DIR): @@ -1540,6 +1553,7 @@ class SelfTest(IvasScriptsCommon.IvasScript): "corrupt_test_conditions": {"cnt": 0, "conditions": []}, "diff_nsamples_conditions": {"cnt": 0, "conditions": []}, "detailedResults": [], + "failed_modes":[], } self.run_pesq = self.args["pesq"] failed_ref_conditions = {} @@ -1948,6 +1962,15 @@ class SelfTest(IvasScriptsCommon.IvasScript): for l in r: self.logger.info(l) + self.logger.info("\n\n") + self.logger.info("Summary of all tests") + self.logger.info("---------------------\n") + for mode in run_dict.keys(): + if mode in self.fail_results["failed_modes"]: + self.logger.info(f"[FAIL] {run_dict[mode]['cmd']['table_name']}") + else: + self.logger.info(f"[OK] {run_dict[mode]['cmd']['table_name']}") + if __name__ == "__main__": if sys.version_info[0] < 3 or sys.version_info[1] < 7: -- GitLab From 43982584c91aefd85c71a829190c91d57238146a Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Tue, 20 Jun 2023 09:57:09 +0200 Subject: [PATCH 023/175] fix Linux comppile and instrumentation problems, clang-format --- lib_com/ivas_error.h | 10 +++++----- lib_com/options.h | 1 - lib_dec/ivas_binRenderer_internal.c | 6 +++--- lib_dec/ivas_dec.c | 2 +- lib_dec/ivas_ism_param_dec.c | 10 +++++----- lib_dec/ivas_sba_dec.c | 10 +++++----- lib_dec/jbm_pcmdsp_fifo.c | 2 +- lib_dec/lib_dec.c | 25 +++++++++---------------- lib_rend/ivas_stat_rend.h | 2 +- 9 files changed, 30 insertions(+), 38 deletions(-) diff --git a/lib_com/ivas_error.h b/lib_com/ivas_error.h index 251be0d38a..63914dda53 100644 --- a/lib_com/ivas_error.h +++ b/lib_com/ivas_error.h @@ -86,6 +86,11 @@ typedef enum IVAS_ERR_ISM_INVALID_METADATA_VALUE, IVAS_ERR_INVALID_MASA_FORMAT_METADATA_FILE, IVAS_ERR_IO_CONFIG_PAIR_NOT_SUPPORTED, +#ifdef API_5MS + IVAS_ERR_TSM_NOT_ENABLED, + IVAS_ERR_FETCH_SIZE_NO_MULTIPLE_OF_5MS, + IVAS_ERR_NEED_NEW_FRAME, +#endif #ifdef DEBUGGING IVAS_ERR_INVALID_FORCE_MODE, #ifdef DEBUG_AGC_ENCODER_CMD_OPTION @@ -94,11 +99,6 @@ typedef enum #ifdef VARIABLE_SPEED_DECODING IVAS_ERR_VS_FRAME_NEEDED, #endif -#ifdef API_5MS - IVAS_ERR_TSM_NOT_ENABLED, - IVAS_ERR_FETCH_SIZE_NO_MULTIPLE_OF_5MS, - IVAS_ERR_NEED_NEW_FRAME, -#endif #endif /*----------------------------------------* diff --git a/lib_com/options.h b/lib_com/options.h index c6d3a9c108..34ad115fe2 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -166,7 +166,6 @@ #define FIX_558_PLC_DISCONT /* FhG: issue 558: fix discontinuities in DFT Stereo when switching from TCX concealment to ACELP */ #define FIX_564 /* Nokia: Issue 564: Fix gains in JBM path for SBA with parametric binaural renderer */ #define FIX_566_2DIR_MASA_384K /* Nokia: Issued 566: Bugfix in 384k MASA metadata encoding of second direction */ -#define FIX_XXX_JITTER_SBA_BINAURAL_GAIN #define FIX_XXX_HEADTRACKER_INIT #define FIX_XXX_TDOBJRENDERER_INPUT #define FIX_XXX_ISM_SBA_ASAN diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index efc3b11215..02ef041bc1 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -1127,10 +1127,10 @@ void ivas_binaural_cldfb_sf( *-------------------------------------------------------------------------*/ void ivas_binRenderer( - BINAURAL_RENDERER_HANDLE hBinRenderer, /* i/o: binaural renderer handle */ - COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined head and external orientation handle*/ + BINAURAL_RENDERER_HANDLE hBinRenderer, /* i/o: binaural renderer handle */ + COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined head and external orientation handle*/ #ifndef API_5MS - int16_t subframe_idx, /* i : subframe index */ + int16_t subframe_idx, /* i : subframe index */ #endif const int16_t numTimeSlots, /* i : number of time slots to render */ float Cldfb_RealBuffer_Binaural[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : Binaural signals */ diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index 1f588ac2cc..f9277264ea 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -761,4 +761,4 @@ ivas_error ivas_dec( pop_wmops(); return error; } -#endif \ No newline at end of file +#endif diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index f73b40b666..7a243dc266 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -1392,11 +1392,11 @@ static void ivas_ism_param_dec_render_sf( *-------------------------------------------------------------------------*/ void ivas_param_ism_dec_render( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ - const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ - uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ - uint16_t *nSamplesAvailableNext, /* o : number of CLDFB slots still to render */ - float *output_f[] /* o : rendered time signal */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ + uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ + uint16_t *nSamplesAvailableNext, /* o : number of CLDFB slots still to render */ + float *output_f[] /* o : rendered time signal */ ) { int16_t ch, slots_to_render, first_sf, last_sf, subframe_idx; diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 50bb1b3ddf..23c4d90387 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -471,11 +471,11 @@ ivas_error ivas_sba_dec_digest_tc( *-------------------------------------------------------------------*/ void ivas_sba_dec_render( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ - const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ - uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ - uint16_t *nSamplesAvailableNext, /* o : number of CLDFB slots still to render */ - float *output_f[] /* o : rendered time signal */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ + uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ + uint16_t *nSamplesAvailableNext, /* o : number of CLDFB slots still to render */ + float *output_f[] /* o : rendered time signal */ ) { int16_t slots_to_render, first_sf, last_sf, subframe_idx; diff --git a/lib_dec/jbm_pcmdsp_fifo.c b/lib_dec/jbm_pcmdsp_fifo.c index d3c93679fe..ad0a860944 100644 --- a/lib_dec/jbm_pcmdsp_fifo.c +++ b/lib_dec/jbm_pcmdsp_fifo.c @@ -268,4 +268,4 @@ uint16_t pcmdsp_fifo_nReadableSamplesPerChannel( { return h->size; } -#endif \ No newline at end of file +#endif diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 1e4dd48a60..5fbbee3df3 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -837,7 +837,6 @@ ivas_error IVAS_DEC_GetSamples( bool *needNewFrame /* indication that the decoder needs a new frame */ ) { - Decoder_Struct *st_ivas; ivas_error error; int16_t nOutSamplesElse, result, nSamplesToRender; uint16_t nSamplesRendered, nSamplesRendered_loop, l_ts, nTimeScalerOutSamples; @@ -850,7 +849,6 @@ ivas_error IVAS_DEC_GetSamples( { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } - st_ivas = hIvasDec->st_ivas; if ( !hIvasDec->hasBeenFedFrame && hIvasDec->nSamplesAvailableNext == 0 ) { @@ -1362,8 +1360,8 @@ ivas_error IVAS_DEC_FeedHeadTrackData( IVAS_QUATERNION orientation, /* i : head-tracking data, listener orientation */ IVAS_VECTOR3 Pos /* i : listener position */ #else - IVAS_QUATERNION *orientation, /* i : head-tracking data, listener orientation */ - IVAS_VECTOR3 *Pos /* i : listener position */ + IVAS_QUATERNION *orientation, /* i : head-tracking data, listener orientation */ + IVAS_VECTOR3 *Pos /* i : listener position */ #endif ) { @@ -2062,20 +2060,12 @@ ivas_error IVAS_DEC_VoIP_GetSamples( DECODER_CONFIG_HANDLE hDecoderConfig; IVAS_DEC_VOIP *hVoIP; uint32_t extBufferedTime_ms, scale, maxScaling; -#ifndef API_5MS - uint16_t nTimeScalerOutSamples; -#endif JB4_DATAUNIT_HANDLE dataUnit; -#ifndef API_5MS - int16_t nOutSamplesElse; -#endif uint16_t extBufferedSamples; int16_t timeScalingDone; int16_t result; ivas_error error; int16_t nSamplesRendered; - uint16_t nSamplesTcsScaled; - uint8_t nTransportChannels; uint8_t nOutChannels; error = IVAS_ERR_OK; @@ -2086,8 +2076,6 @@ ivas_error IVAS_DEC_VoIP_GetSamples( timeScalingDone = 0; nOutChannels = (uint8_t) st_ivas->hDecoderConfig->nchan_out; - nTransportChannels = 0; - nSamplesTcsScaled = hVoIP->nSamplesFrame; nSamplesRendered = 0; if ( nSamplesPerChannel == 0 ) @@ -2625,8 +2613,8 @@ ivas_error IVAS_DEC_Flush( ) { ivas_error error; - IVAS_DEC_VOIP *hVoIP; #ifndef API_5MS + IVAS_DEC_VOIP *hVoIP; int16_t rendererPcmBuf[( MAX_OUTPUT_CHANNELS * L_FRAME_MAX * APA_MAX_SCALE ) / 100]; #endif uint16_t nSamplesToRender; @@ -2634,7 +2622,9 @@ ivas_error IVAS_DEC_Flush( error = IVAS_ERR_OK; +#ifndef API_5MS hVoIP = hIvasDec->hVoIP; +#endif #ifdef API_5MS *nSamplesFlushed = min( nSamplesPerChannel, hIvasDec->nSamplesAvailableNext ); #else @@ -3533,15 +3523,18 @@ ivas_error IVAS_DEC_reconfigure( const uint16_t l_ts ) { +#ifndef API_5MS IVAS_DEC_VOIP *hVoIP; +#endif #ifdef API_5MS int16_t apa_buffer_size; #endif ivas_error error; - +#ifndef API_5MS hVoIP = hIvasDec->hVoIP; +#endif #ifdef API_5MS apa_buffer_size = hIvasDec->nSamplesFrame; #endif diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index 14de5e7d55..bd0aa1151c 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -291,7 +291,7 @@ typedef struct ivas_external_orientation_struct int8_t enableExternalOrientation; /* 0 - disable, 1 - enable, 2 - freeze to previous orientation */ int8_t enableRotationInterpolation; /* 0 - disable, 1 - enable */ int16_t numFramesToTargetOrientation; /* Number of frames until target orientation is reached */ - IVAS_QUATERNION Quaternion; /* External orientation in quaternions */ + IVAS_QUATERNION Quaternion; /* External orientation in quaternions */ #else int8_t enableHeadRotation[MAX_PARAM_SPATIAL_SUBFRAMES]; /* 0 - disable, 1 - enable, 2 - freeze to previous rotation */ int8_t enableExternalOrientation[MAX_PARAM_SPATIAL_SUBFRAMES]; /* 0 - disable, 1 - enable, 2 - freeze to previous orientation */ -- GitLab From ccd8dbb85b39d0a1f1b30c18442d730b0bb6378e Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Tue, 20 Jun 2023 12:02:47 +0200 Subject: [PATCH 024/175] Fix msan issue in crend --- lib_com/options.h | 1 + lib_debug/debug.h | 19 ++++++++++++++++ lib_rend/ivas_crend.c | 23 +++++++++++++++++++- lib_rend/ivas_prot_rend.h | 3 +++ lib_rend/lib_rend.c | 46 ++++++++++++++++++++++++++++++++++----- 5 files changed, 85 insertions(+), 7 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 544100fb35..fe524ca6a1 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -160,6 +160,7 @@ #define FIX_XXX_ISM_SBA_ASAN #define API_5MS #define LIB_REND_API_5MS /* FhG: Adds 5ms framing capability to lib_rend */ +#define SGI_DBG /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_debug/debug.h b/lib_debug/debug.h index 3d59cb00a0..3cfe128d98 100644 --- a/lib_debug/debug.h +++ b/lib_debug/debug.h @@ -36,6 +36,9 @@ #include "options.h" #include #include +#ifdef SGI_DBG +#include +#endif #ifdef DEBUG_SBA #include "sba_debug.h" #endif @@ -97,6 +100,22 @@ int16_t dbgwrite( const char *const filename #endif ); +#ifdef SGI_DBG +inline static void sgi_dbgwrite( + const float *const buffer, + const int16_t count, + const char *const filename ) +{ + float tmp[960]; + + for ( int i = 0; i < count; ++i ) + { + tmp[i] = buffer[i] / INT16_MAX; + } + + dbgwrite( tmp, sizeof( float ), count, 1, filename ); +} +#endif void dbgwrite_mat_repeat( float *buffer, /* i : write buffer */ diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index e5bdd05ed1..2aa19296dd 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -1332,9 +1332,18 @@ ivas_error ivas_rend_crendProcess( IVAS_OUTPUT_SETUP_HANDLE hIntSetup, EFAP_HANDLE hEFAPdata, float *output[], /* i/o: input/output audio channels */ - const int32_t output_Fs ) + const int32_t output_Fs +#ifdef LIB_REND_API_5MS + , + const int16_t num_subframes /* i : number of subframes to render */ +#endif +) { +#ifdef LIB_REND_API_5MS + int16_t i, subframe_idx, subframe_len; +#else int16_t i, subframe_idx, output_frame, subframe_len; +#endif int16_t nchan_out; float pcm_tmp[BINAURAL_CHANNELS][L_FRAME48k]; float *p_pcm_tmp[BINAURAL_CHANNELS]; @@ -1379,15 +1388,23 @@ ivas_error ivas_rend_crendProcess( return error; } +#ifdef LIB_REND_API_5MS + subframe_len = (int16_t) output_Fs / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES; +#else output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC ); subframe_len = output_frame / MAX_PARAM_SPATIAL_SUBFRAMES; +#endif for ( i = 0; i < BINAURAL_CHANNELS; i++ ) { p_pcm_tmp[i] = pcm_tmp[i]; } +#ifdef LIB_REND_API_5MS + for ( subframe_idx = 0; subframe_idx < num_subframes; subframe_idx++ ) +#else for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) +#endif { if ( hDecoderConfig && combinedOrientationEnabled ) { @@ -1432,7 +1449,11 @@ ivas_error ivas_rend_crendProcess( /* move to output */ for ( i = 0; i < nchan_out; i++ ) { +#ifdef LIB_REND_API_5MS + mvr2r( pcm_tmp[i], output[i], num_subframes * subframe_len ); +#else mvr2r( pcm_tmp[i], output[i], output_frame ); +#endif } pop_wmops(); diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index d96f5228f2..812c6575ad 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -509,6 +509,9 @@ ivas_error ivas_rend_crendProcess( EFAP_HANDLE hEFAPdata, float *output[], /* i/o: input/output audio channels */ const int32_t output_Fs +#ifdef LIB_REND_API_5MS + ,const int16_t num_subframes /* i : number of subframes to render */ +#endif ); ivas_error ivas_rend_crendProcessSubframe( diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 158110012f..e8f4843ade 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -5078,7 +5078,12 @@ static ivas_error renderIsmToBinauralRoom( copyBufferTo2dArray( tmpMcBuffer, tmpRendBuffer ); if ( ( error = ivas_rend_crendProcess( ismInput->crendWrapper, AUDIO_CONFIG_7_1_4, AUDIO_CONFIG_BINAURAL_ROOM_IR, - NULL, NULL, NULL, NULL, p_tmpRendBuffer, *ismInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) + NULL, NULL, NULL, NULL, p_tmpRendBuffer, *ismInput->base.ctx.pOutSampleRate +#ifdef LIB_REND_API_5MS + , + *ismInput->base.ctx.pOutSampleRate / FRAMES_PER_SEC / outAudio.config.numSamplesPerChannel +#endif + ) ) != IVAS_ERR_OK ) { return error; } @@ -5493,10 +5498,19 @@ static ivas_error renderMcToBinaural( /* call CREND */ if ( ( error = ivas_rend_crendProcess( mcInput->crendWrapper, getIvasAudioConfigFromRendAudioConfig( mcInput->base.inConfig ), getIvasAudioConfigFromRendAudioConfig( outConfig ), - NULL, NULL, NULL, NULL, p_tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) + NULL, NULL, NULL, NULL, p_tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate +#ifdef LIB_REND_API_5MS + , + *mcInput->base.ctx.pOutSampleRate / FRAMES_PER_SEC / outAudio.config.numSamplesPerChannel +#endif + ) ) != IVAS_ERR_OK ) { return error; } + +#ifdef SGI_DBG + sgi_dbgwrite( p_tmpRendBuffer[0], outAudio.config.numSamplesPerChannel, "res/p_tmpRendBuffer.pcm" ); +#endif } accumulate2dArrayToBuffer( tmpRendBuffer, &outAudio ); @@ -5602,7 +5616,12 @@ static ivas_error renderMcToBinauralRoom( /* call CREND */ if ( ( error = ivas_rend_crendProcess( mcInput->crendWrapper, getIvasAudioConfigFromRendAudioConfig( mcInput->base.inConfig ), getIvasAudioConfigFromRendAudioConfig( outConfig ), - NULL, NULL, NULL, NULL, p_tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) + NULL, NULL, NULL, NULL, p_tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate +#ifdef LIB_REND_API_5MS + , + *mcInput->base.ctx.pOutSampleRate / FRAMES_PER_SEC / outAudio.config.numSamplesPerChannel +#endif + ) ) != IVAS_ERR_OK ) { return error; } @@ -5712,7 +5731,12 @@ static ivas_error renderMcCustomLsToBinauralRoom( /* call CREND */ if ( ( error = ivas_rend_crendProcess( mcInput->crendWrapper, AUDIO_CONFIG_7_1_4, getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, NULL, NULL, NULL, - p_tmpCrendBuffer, *mcInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) + p_tmpCrendBuffer, *mcInput->base.ctx.pOutSampleRate +#ifdef LIB_REND_API_5MS + , + *mcInput->base.ctx.pOutSampleRate / FRAMES_PER_SEC / outAudio.config.numSamplesPerChannel +#endif + ) ) != IVAS_ERR_OK ) { return error; } @@ -5996,7 +6020,12 @@ static ivas_error renderSbaToBinaural( /* call CREND */ if ( ( error = ivas_rend_crendProcess( sbaInput->crendWrapper, getIvasAudioConfigFromRendAudioConfig( sbaInput->base.inConfig ), getIvasAudioConfigFromRendAudioConfig( outConfig ), - NULL, NULL, NULL, NULL, p_tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) + NULL, NULL, NULL, NULL, p_tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate +#ifdef LIB_REND_API_5MS + , + *sbaInput->base.ctx.pOutSampleRate / FRAMES_PER_SEC / outAudio.config.numSamplesPerChannel +#endif + ) ) != IVAS_ERR_OK ) { return error; } @@ -6097,7 +6126,12 @@ static ivas_error renderSbaToBinauralRoom( /* call CREND */ if ( ( error = ivas_rend_crendProcess( sbaInput->crendWrapper, AUDIO_CONFIG_7_1_4, getIvasAudioConfigFromRendAudioConfig( outConfig ), - NULL, NULL, NULL, NULL, p_tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) + NULL, NULL, NULL, NULL, p_tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate +#ifdef LIB_REND_API_5MS + , + *sbaInput->base.ctx.pOutSampleRate / FRAMES_PER_SEC / outAudio.config.numSamplesPerChannel +#endif + ) ) != IVAS_ERR_OK ) { return error; } -- GitLab From ed8d75678abbae0293c36c80be0c54ab0d50652c Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Tue, 20 Jun 2023 13:29:49 +0200 Subject: [PATCH 025/175] Fix msan issues --- lib_com/ivas_prot.h | 3 + lib_dec/ivas_dirac_dec.c | 8 +++ lib_rend/ivas_dirac_dec_binaural_functions.c | 7 +++ lib_rend/ivas_prot_rend.h | 3 + lib_rend/lib_rend.c | 62 +++++++++++++++----- 5 files changed, 67 insertions(+), 16 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 0a56c5081e..4c61d6bf7c 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -3605,6 +3605,9 @@ void ivas_dirac_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ const int16_t nchan_transport /* i : number of transport channels */ +#ifdef LIB_REND_API_5MS + ,const int16_t num_subframes /* i : number of subframes to render */ +#endif ); void ivas_dirac_dec_render( diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 19f99cad4e..6394a90566 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -2205,6 +2205,10 @@ void ivas_dirac_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ const int16_t nchan_transport /* i : number of transport channels */ +#ifdef LIB_REND_API_5MS + , + const int16_t num_subframes /* i : number of subframes to render */ +#endif ) { int16_t subframe_idx; @@ -2234,7 +2238,11 @@ void ivas_dirac_dec( ivas_dirac_dec_set_md_map( st_ivas, DEFAULT_JBM_CLDFB_TIMESLOTS ); +#ifdef LIB_REND_API_5MS + for ( subframe_idx = 0; subframe_idx < num_subframes; subframe_idx++ ) +#else for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) +#endif { ivas_dirac_dec_render_sf( st_ivas, output_f_local, nchan_transport, NULL, NULL ); for ( n = 0; n < nchan_out; n++ ) diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index c698ad1d3f..7456b9d7aa 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -423,6 +423,9 @@ void ivas_dirac_dec_binaural( COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined orientation handle */ float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ const int16_t nchan_transport /* i : number of transport channels */ +#ifdef LIB_REND_API_5MS + ,const int16_t num_subframes /* i : number of subframes to render */ +#endif ) { int16_t subframe; @@ -475,7 +478,11 @@ void ivas_dirac_dec_binaural( generate_masking_noise_lb_dirac( st->hFdCngDec->hFdCngCom, st_ivas->hTcBuffer->tc[nchan_transport], DEFAULT_JBM_CLDFB_TIMESLOTS, st->cna_dirac_flag && st->flag_cna ); } +#ifdef LIB_REND_API_5MS + for ( subframe = 0; subframe < num_subframes; subframe++ ) +#else for ( subframe = 0; subframe < MAX_PARAM_SPATIAL_SUBFRAMES; subframe++ ) +#endif { int16_t n_samples_sf = slot_size * st_ivas->hDirAC->subframe_nbslots[subframe]; diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 812c6575ad..2308848a40 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -154,6 +154,9 @@ void ivas_dirac_dec_binaural( COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined orientation handle */ float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ const int16_t nchan_transport /* i : number of transport channels */ +#ifdef LIB_REND_API_5MS + ,const int16_t num_subframes /* i : number of subframes to render */ +#endif ); void ivas_dirac_dec_binaural_render( diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index e8f4843ade..6a5656d0a4 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -4925,6 +4925,16 @@ static ivas_error renderIsmToBinaural( return IVAS_ERR_OK; } +#ifdef LIB_REND_API_5MS +static int16_t num_subframes_in_buffer( const IVAS_REND_AudioBuffer *buffer, int32_t sampleRate ) +{ +#ifdef DEBUGGING + assert( buffer->config.numSamplesPerChannel % (sampleRate / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES) == 0 ); +#endif + return buffer->config.numSamplesPerChannel / (sampleRate / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES); +} +#endif + static ivas_error renderIsmToBinauralRoom( input_ism *ismInput, IVAS_REND_AudioBuffer outAudio ) @@ -5081,9 +5091,9 @@ static ivas_error renderIsmToBinauralRoom( NULL, NULL, NULL, NULL, p_tmpRendBuffer, *ismInput->base.ctx.pOutSampleRate #ifdef LIB_REND_API_5MS , - *ismInput->base.ctx.pOutSampleRate / FRAMES_PER_SEC / outAudio.config.numSamplesPerChannel + num_subframes_in_buffer( &outAudio, *ismInput->base.ctx.pOutSampleRate ) #endif - ) ) != IVAS_ERR_OK ) + ) ) != IVAS_ERR_OK ) { return error; } @@ -5501,9 +5511,9 @@ static ivas_error renderMcToBinaural( NULL, NULL, NULL, NULL, p_tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate #ifdef LIB_REND_API_5MS , - *mcInput->base.ctx.pOutSampleRate / FRAMES_PER_SEC / outAudio.config.numSamplesPerChannel + num_subframes_in_buffer( &outAudio, *mcInput->base.ctx.pOutSampleRate ) #endif - ) ) != IVAS_ERR_OK ) + ) ) != IVAS_ERR_OK ) { return error; } @@ -5619,9 +5629,9 @@ static ivas_error renderMcToBinauralRoom( NULL, NULL, NULL, NULL, p_tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate #ifdef LIB_REND_API_5MS , - *mcInput->base.ctx.pOutSampleRate / FRAMES_PER_SEC / outAudio.config.numSamplesPerChannel + num_subframes_in_buffer( &outAudio, *mcInput->base.ctx.pOutSampleRate ) #endif - ) ) != IVAS_ERR_OK ) + ) ) != IVAS_ERR_OK ) { return error; } @@ -5734,9 +5744,9 @@ static ivas_error renderMcCustomLsToBinauralRoom( p_tmpCrendBuffer, *mcInput->base.ctx.pOutSampleRate #ifdef LIB_REND_API_5MS , - *mcInput->base.ctx.pOutSampleRate / FRAMES_PER_SEC / outAudio.config.numSamplesPerChannel + num_subframes_in_buffer( &outAudio, *mcInput->base.ctx.pOutSampleRate ) #endif - ) ) != IVAS_ERR_OK ) + ) ) != IVAS_ERR_OK ) { return error; } @@ -6023,9 +6033,9 @@ static ivas_error renderSbaToBinaural( NULL, NULL, NULL, NULL, p_tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate #ifdef LIB_REND_API_5MS , - *sbaInput->base.ctx.pOutSampleRate / FRAMES_PER_SEC / outAudio.config.numSamplesPerChannel + num_subframes_in_buffer( &outAudio, *sbaInput->base.ctx.pOutSampleRate ) #endif - ) ) != IVAS_ERR_OK ) + ) ) != IVAS_ERR_OK ) { return error; } @@ -6129,9 +6139,9 @@ static ivas_error renderSbaToBinauralRoom( NULL, NULL, NULL, NULL, p_tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate #ifdef LIB_REND_API_5MS , - *sbaInput->base.ctx.pOutSampleRate / FRAMES_PER_SEC / outAudio.config.numSamplesPerChannel + num_subframes_in_buffer( &outAudio, *sbaInput->base.ctx.pOutSampleRate ) #endif - ) ) != IVAS_ERR_OK ) + ) ) != IVAS_ERR_OK ) { return error; } @@ -6300,11 +6310,21 @@ static void renderMasaToMc( if ( masaInput->decDummy->renderer_type == RENDERER_STEREO_PARAMETRIC ) { - ivas_dirac_dec_binaural( masaInput->decDummy, *masaInput->base.ctx.pCombinedOrientationData, tmpBuffer, masaInput->base.inputBuffer.config.numChannels ); + ivas_dirac_dec_binaural( masaInput->decDummy, *masaInput->base.ctx.pCombinedOrientationData, tmpBuffer, masaInput->base.inputBuffer.config.numChannels +#ifdef LIB_REND_API_5MS + , + num_subframes_in_buffer( &outAudio, *masaInput->base.ctx.pOutSampleRate ) +#endif + ); } else { - ivas_dirac_dec( masaInput->decDummy, tmpBuffer, masaInput->base.inputBuffer.config.numChannels ); + ivas_dirac_dec( masaInput->decDummy, tmpBuffer, masaInput->base.inputBuffer.config.numChannels +#ifdef LIB_REND_API_5MS + , + num_subframes_in_buffer( &outAudio, *masaInput->base.ctx.pOutSampleRate ) +#endif + ); } accumulate2dArrayToBuffer( tmpBuffer, &outAudio ); @@ -6321,7 +6341,12 @@ static void renderMasaToSba( copyBufferTo2dArray( masaInput->base.inputBuffer, tmpBuffer ); copyMasaMetadataToDiracRenderer( &masaInput->masaMetadata, masaInput->decDummy->hDirAC ); - ivas_dirac_dec( masaInput->decDummy, tmpBuffer, masaInput->base.inputBuffer.config.numChannels ); + ivas_dirac_dec( masaInput->decDummy, tmpBuffer, masaInput->base.inputBuffer.config.numChannels +#ifdef LIB_REND_API_5MS + , + num_subframes_in_buffer( &outAudio, *masaInput->base.ctx.pOutSampleRate ) +#endif + ); accumulate2dArrayToBuffer( tmpBuffer, &outAudio ); @@ -6337,7 +6362,12 @@ static void renderMasaToBinaural( copyBufferTo2dArray( masaInput->base.inputBuffer, tmpBuffer ); copyMasaMetadataToDiracRenderer( &masaInput->masaMetadata, masaInput->decDummy->hDirAC ); - ivas_dirac_dec_binaural( masaInput->decDummy, *masaInput->base.ctx.pCombinedOrientationData, tmpBuffer, masaInput->base.inputBuffer.config.numChannels ); + ivas_dirac_dec_binaural( masaInput->decDummy, *masaInput->base.ctx.pCombinedOrientationData, tmpBuffer, masaInput->base.inputBuffer.config.numChannels +#ifdef LIB_REND_API_5MS + , + num_subframes_in_buffer( &outAudio, *masaInput->base.ctx.pOutSampleRate ) +#endif + ); accumulate2dArrayToBuffer( tmpBuffer, &outAudio ); -- GitLab From e28b3e16c201fb0ce772b6a91e68f692ed9be873 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Tue, 20 Jun 2023 13:58:01 +0200 Subject: [PATCH 026/175] Fix memleak --- lib_com/options.h | 1 + lib_rend/lib_rend.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index fe524ca6a1..7eb54cd66d 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -160,6 +160,7 @@ #define FIX_XXX_ISM_SBA_ASAN #define API_5MS #define LIB_REND_API_5MS /* FhG: Adds 5ms framing capability to lib_rend */ +#define LIB_REND_FIX_HRTFPARAMBIN_MEMLEAK #define SGI_DBG /* ################## End DEVELOPMENT switches ######################### */ diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 6a5656d0a4..942b8c546f 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -2803,6 +2803,12 @@ static void freeDecoderDummy( { free( pDecDummy->hCombinedOrientationData ); } +#ifdef LIB_REND_FIX_HRTFPARAMBIN_MEMLEAK + if ( pDecDummy->hHrtfParambin != NULL ) + { + free( pDecDummy->hHrtfParambin ); + } +#endif ivas_render_config_close( &pDecDummy->hRenderConfig ); -- GitLab From 0e6288ee6932bebed18fa425ff8e3f9a2fa24919 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 30 Jun 2023 14:54:02 +0200 Subject: [PATCH 027/175] Make gitignoring ref executables more generic --- .gitignore | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 1829cde3a7..a0132de63b 100644 --- a/.gitignore +++ b/.gitignore @@ -48,9 +48,9 @@ tests/dut tests/ref scripts/testv/*_cut*.pcm # default reference binary name -IVAS_cod_ref -IVAS_dec_ref -IVAS_rend_ref +IVAS_cod_ref* +IVAS_dec_ref* +IVAS_rend_ref* # Python files that pop up when running scripts __pycache__/ -- GitLab From 100970f829e71212866d28f3c440dfcdcf3e2efc Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 30 Jun 2023 15:00:45 +0200 Subject: [PATCH 028/175] Add ivas-razel-runner as submodule --- .gitmodules | 4 ++++ scripts/razel/ivas_razel_runner | 1 + 2 files changed, 5 insertions(+) create mode 100644 .gitmodules create mode 160000 scripts/razel/ivas_razel_runner diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..3ca7eb7d97 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "scripts/razel/ivas_razel_runner"] + path = scripts/razel/ivas_razel_runner + url = git@git01.iis.fhg.de:sgi/ivas-razel-runner.git + branch = rend diff --git a/scripts/razel/ivas_razel_runner b/scripts/razel/ivas_razel_runner new file mode 160000 index 0000000000..3096b12e17 --- /dev/null +++ b/scripts/razel/ivas_razel_runner @@ -0,0 +1 @@ +Subproject commit 3096b12e173137dfbafa9fe6658bdf461c6529f3 -- GitLab From 155596955316f0ab26d5435f337b3907b4c3ecc6 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 30 Jun 2023 15:12:31 +0200 Subject: [PATCH 029/175] Update ivas-razel-runner --- scripts/razel/ivas_razel_runner | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/razel/ivas_razel_runner b/scripts/razel/ivas_razel_runner index 3096b12e17..9bc7a9da1c 160000 --- a/scripts/razel/ivas_razel_runner +++ b/scripts/razel/ivas_razel_runner @@ -1 +1 @@ -Subproject commit 3096b12e173137dfbafa9fe6658bdf461c6529f3 +Subproject commit 9bc7a9da1c25a9b2845f0a816f8427c6c611d83a -- GitLab From c1eb02d624c0d2e2c8e408420520b913605c7f14 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 30 Jun 2023 15:15:28 +0200 Subject: [PATCH 030/175] Add test scripts for Razel --- scripts/razel/ivas_files_map_for_razel.py | 82 ++++++++++ scripts/razel/test_renderer_razel.py | 177 ++++++++++++++++++++++ 2 files changed, 259 insertions(+) create mode 100644 scripts/razel/ivas_files_map_for_razel.py create mode 100755 scripts/razel/test_renderer_razel.py diff --git a/scripts/razel/ivas_files_map_for_razel.py b/scripts/razel/ivas_files_map_for_razel.py new file mode 100644 index 0000000000..0939b0b53b --- /dev/null +++ b/scripts/razel/ivas_files_map_for_razel.py @@ -0,0 +1,82 @@ +from typing import Optional + +from ivas_razel_runner.include.core import ( + AudioConfig, + AudioFormat, + AudioSampleType, + CustomSpeakerLayoutFile, + File, + Files, + SceneDescriptionFile, + WavFile, +) +from ivas_razel_runner.include.ivas_rend import IvasRendInputFile + + +def in_file_for_audio_config(config: AudioConfig | SceneDescriptionFile) -> IvasRendInputFile: + if config == AudioFormat.MONO: + return WavFile("scripts/testv/stv48c.wav", True, 48000, 1, AudioSampleType.INT16) + if config == AudioFormat.STEREO: + return WavFile("scripts/testv/stvST48c.wav", True, 48000, 2, AudioSampleType.INT16) + if config == AudioFormat.ISM1: + return WavFile("scripts/testv/stv1ISM48s.wav", True, 48000, 1, AudioSampleType.INT16) + if config == AudioFormat.ISM2: + return WavFile("scripts/testv/stv2ISM48s.wav", True, 48000, 2, AudioSampleType.INT16) + if config == AudioFormat.ISM3: + return WavFile("scripts/testv/stv3ISM48s.wav", True, 48000, 3, AudioSampleType.INT16) + if config == AudioFormat.ISM4: + return WavFile("scripts/testv/stv4ISM48s.wav", True, 48000, 4, AudioSampleType.INT16) + if config == AudioFormat.MC_5_1: + return WavFile("scripts/testv/stv51MC48c.wav", True, 48000, 6, AudioSampleType.INT16) + if config == AudioFormat.MC_7_1: + return WavFile("scripts/testv/stv71MC48c.wav", True, 48000, 8, AudioSampleType.INT16) + if config == AudioFormat.MC_5_1_2: + return WavFile("scripts/testv/stv512MC48c.wav", True, 48000, 8, AudioSampleType.INT16) + if config == AudioFormat.MC_5_1_4: + return WavFile("scripts/testv/stv514MC48c.wav", True, 48000, 10, AudioSampleType.INT16) + if config == AudioFormat.MC_7_1_4: + return WavFile("scripts/testv/stv714MC48c.wav", True, 48000, 12, AudioSampleType.INT16) + if config == AudioFormat.FOA: + return WavFile("scripts/testv/stvFOA48c.wav", True, 48000, 4, AudioSampleType.INT16) + if config == AudioFormat.HOA2: + return WavFile("scripts/testv/stv2OA48c.wav", True, 48000, 9, AudioSampleType.INT16) + if config == AudioFormat.HOA3: + return WavFile("scripts/testv/stv3OA48c.wav", True, 48000, 16, AudioSampleType.INT16) + if config == AudioFormat.MASA1: + return WavFile("scripts/testv/stv2MASA1TC48c.wav", True, 48000, 1, AudioSampleType.INT16) + if config == AudioFormat.MASA2: + return WavFile("scripts/testv/stv2MASA2TC48c.wav", True, 48000, 2, AudioSampleType.INT16) + if isinstance(config, SceneDescriptionFile): + return config + if isinstance(config, CustomSpeakerLayoutFile): + # Assume test file is 5_1 for now + assert config.num_channels == AudioFormat.MC_5_1.num_channels + return WavFile("scripts/testv/stv51MC48c.wav", True, 48000, 6, AudioSampleType.INT16) + + raise RuntimeError(f"No input file for audio config {config}") + + +def md_files_for_audio_config(config: AudioConfig | SceneDescriptionFile) -> Optional[Files]: + if config == AudioFormat.ISM1: + return [File("scripts/testv/stvISM1.csv", True)] + if config == AudioFormat.ISM2: + return [File("scripts/testv/stvISM1.csv", True), File("scripts/testv/stvISM2.csv", True)] + if config == AudioFormat.ISM3: + return [ + File("scripts/testv/stvISM1.csv", True), + File("scripts/testv/stvISM2.csv", True), + File("scripts/testv/stvISM3.csv", True), + ] + if config == AudioFormat.ISM4: + return [ + File("scripts/testv/stvISM1.csv", True), + File("scripts/testv/stvISM2.csv", True), + File("scripts/testv/stvISM3.csv", True), + File("scripts/testv/stvISM4.csv", True), + ] + if config == AudioFormat.MASA1: + return [File("scripts/testv/stv2MASA1TC48c.met", True)] + if config == AudioFormat.MASA2: + return [File("scripts/testv/stv2MASA2TC48c.met", True)] + + return None diff --git a/scripts/razel/test_renderer_razel.py b/scripts/razel/test_renderer_razel.py new file mode 100755 index 0000000000..4a61dcfa57 --- /dev/null +++ b/scripts/razel/test_renderer_razel.py @@ -0,0 +1,177 @@ +#!/usr/bin/env python3 + +import itertools +import logging +from pathlib import Path + +from ivas_files_map_for_razel import in_file_for_audio_config, md_files_for_audio_config +from ivas_razel_runner.include.core import ( + AudioFile, + AudioFormat, + CustomSpeakerLayoutFile, + File, + FileFormat, + SceneDescriptionFile, + WavDiffArgs, + WavFile, +) +from ivas_razel_runner.include.ivas_rend import IvasRend, IvasRendConfig, UnsupportedConfigWarning +from ivas_razel_runner.include.sox import Sox +from razel import Razel + +####################################################### + +BINAURAL_FORMATS = [ + AudioFormat.BINAURAL, + AudioFormat.BINAURAL_ROOM_IR, + AudioFormat.BINAURAL_ROOM_REVERB, +] +DEFAULT_CUSTOM_SPEAKER_LAYOUT = CustomSpeakerLayoutFile("scripts/ls_layouts/cicp6.txt", 6) +DEFAULT_SCENE_DESCRIPTION_FILE = SceneDescriptionFile("_dev/in/scene_ism2.txt", in_file_for_audio_config(AudioFormat.ISM2)) # type: ignore + +####################################################### + +INPUT_FORMATS = IvasRend.get_valid_in_audio_configs(DEFAULT_CUSTOM_SPEAKER_LAYOUT, DEFAULT_SCENE_DESCRIPTION_FILE) +OUTPUT_FORMATS = IvasRend.get_valid_out_audio_configs(DEFAULT_CUSTOM_SPEAKER_LAYOUT) +HEAD_ROTATION_FILES = [File("scripts/testv/headrot_case00_3000_q.csv", True), None] +SAMPLING_RATES = [48000] # TODO(sgi): use others + +####################################################### + +KNOWN_BROKEN_BASELINE_CONFIGS = [ + lambda config: config.in_audio_config == AudioFormat.MASA1, + lambda config: isinstance(config.in_audio_config, SceneDescriptionFile), + lambda config: config.in_audio_config == AudioFormat.MASA2 + and isinstance(config.out_audio_config, CustomSpeakerLayoutFile), + lambda config: config.in_audio_config == AudioFormat.MASA2 + and config.out_audio_config in [AudioFormat.BINAURAL_ROOM_IR, AudioFormat.BINAURAL_ROOM_REVERB], +] +KNOWN_CLIPPING_CONFIGS = [ + lambda config: config.in_audio_config + in [AudioFormat.MC_5_1_2, AudioFormat.MC_5_1_4, AudioFormat.MC_5_1, AudioFormat.MC_7_1_4, AudioFormat.MC_7_1] + and config.out_audio_config in [AudioFormat.MONO, AudioFormat.FOA, AudioFormat.HOA2, AudioFormat.HOA3], + lambda config: isinstance(config.in_audio_config, CustomSpeakerLayoutFile) + and config.out_audio_config + in [AudioFormat.MONO, AudioFormat.STEREO, AudioFormat.FOA, AudioFormat.HOA2, AudioFormat.HOA3], + lambda config: config.in_audio_config + in [ + AudioFormat.MC_5_1, + AudioFormat.MC_5_1_2, + AudioFormat.MC_5_1_4, + AudioFormat.MC_7_1, + AudioFormat.MC_7_1_4, + AudioFormat.FOA, + AudioFormat.HOA2, + AudioFormat.HOA3, + ] + and config.out_audio_config in BINAURAL_FORMATS, +] +NON_BE_TO_REF_WITH_5MS_FRAMING = [ + lambda config: config.in_audio_config + in [ + AudioFormat.ISM1, + AudioFormat.ISM2, + AudioFormat.ISM3, + AudioFormat.ISM4, + ] + and config.out_audio_config != AudioFormat.MONO, + lambda config: config.in_audio_config + in [ + AudioFormat.MASA1, + AudioFormat.MASA2, + ], +] +NON_BE_TO_REF_WITH_20MS_FRAMING = [ + lambda config: config.out_audio_config in BINAURAL_FORMATS and config.head_rotation is not None, +] + +####################################################### + + +def main(): + root_workspace = Path(__file__).parent / ".." / ".." + Razel.init(str(root_workspace)) + logging.basicConfig(level=logging.INFO) + + rend_cut = IvasRend(str(root_workspace / "IVAS_rend")) + rend_ref = IvasRend(str(root_workspace / "IVAS_rend_ref_5ms")) + sox = Sox("sox") + AudioFile.set_audio_conversion_tool(sox) + + # Define exceptional configs - order matters here! + rend_ref.add_support_check_for_nonstandard_configs(match_broken_config) + rend_cut.add_support_check_for_nonstandard_configs(match_broken_config) + rend_ref.add_support_check_for_nonstandard_configs( + # Reference can do binaural rendering with 20 ms frames + lambda config: config.out_audio_config in BINAURAL_FORMATS + and config.in_audio_config not in [AudioFormat.MONO, AudioFormat.STEREO] + and not config.framing_5ms + ) + + for in_format, out_format, head_rotation_file in itertools.product( + INPUT_FORMATS, OUTPUT_FORMATS, HEAD_ROTATION_FILES + ): + in_file = in_file_for_audio_config(in_format) + md_files = md_files_for_audio_config(in_format) + config = IvasRendConfig(in_format, out_format, md_files, head_rotation=head_rotation_file, framing_5ms=False) + + if any(match(config) for match in KNOWN_CLIPPING_CONFIGS): + config.input_gain = 0.2 + + # These files' length is not a multiple of 5ms, which causes different output lengths with 5ms framing on/off + if in_file.basename in ["stvFOA48c.wav", "stv2OA48c.wav", "stv3OA48c.wav"]: + assert isinstance(in_file, WavFile) + in_file = in_file.trim(0, 20) + + # Run REF 20ms + try: + out_20ms_ref = rend_ref.render(in_file, config, FileFormat.WAV) + except UnsupportedConfigWarning as e: + logging.info("%s Skipping %s", e.reason, config) + out_20ms_ref = None + + # Run CUT 20ms + try: + out_20ms_cut = rend_cut.render(in_file, config, FileFormat.WAV) + except UnsupportedConfigWarning as e: + logging.info("%s Skipping %s", e.reason, config) + out_20ms_cut = None + + if out_20ms_ref and out_20ms_cut: + if any(match(config) for match in NON_BE_TO_REF_WITH_20MS_FRAMING): + assert isinstance(out_20ms_cut, WavFile) + out_20ms_cut.should_not_equal(out_20ms_ref) + out_20ms_cut.should_be_similar_to(out_20ms_ref, WavDiffArgs(mld_max=0.01)) + else: + out_20ms_cut.should_equal(out_20ms_ref) + + # Run CUT 5ms + config.framing_5ms = True + try: + out_5ms_cut = rend_cut.render(in_file, config, FileFormat.WAV) + except UnsupportedConfigWarning as e: + logging.info("%s Skipping %s", e.reason, config) + out_5ms_cut = None + + if out_5ms_cut and out_20ms_ref: + if any(match(config) for match in NON_BE_TO_REF_WITH_5MS_FRAMING): + assert isinstance(out_5ms_cut, WavFile) + out_5ms_cut.should_not_equal(out_20ms_ref) + out_5ms_cut.should_be_similar_to( + out_20ms_ref, WavDiffArgs(mld_max=16) + ) # TODO(sgi): also test ISM with no metadata (should be BE) + else: + out_5ms_cut.should_equal(out_20ms_ref) + + Razel.instance().run(["exec", "-k"]) + + +def match_broken_config(config): + if any(match(config) for match in KNOWN_BROKEN_BASELINE_CONFIGS): + raise UnsupportedConfigWarning("Known broken config.") + + return False + + +if __name__ == "__main__": + main() -- GitLab From 0adf96d7ec9542a2cf470b33e0ad16085d8babb4 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 30 Jun 2023 15:22:30 +0200 Subject: [PATCH 031/175] Add CI job for 5ms framing --- .gitlab-ci-custom.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/.gitlab-ci-custom.yml b/.gitlab-ci-custom.yml index f3453eedff..2ce99be7c9 100644 --- a/.gitlab-ci-custom.yml +++ b/.gitlab-ci-custom.yml @@ -368,6 +368,48 @@ renderer-msan: - report-junit.xml +renderer-5ms-framing-asan: + extends: + - .test-job-linux + - .rules-merge-request + needs: ["build-codec-linux-cmake"] + stage: test + script: + # Build reference executable - 5ms framing disabled + - cp lib_com/options.h lib_com/options.h.bak + - sed -i '/API_5MS/d' lib_com/options.h + - mkdir cmake-build && cmake -B cmake-build . && cmake --build cmake-build -- -j + - cp cmake-build/IVAS_rend IVAS_rend_ref + + # Build test executable + - mv -f lib_com/options.h.bak lib_com/options.h + - cmake -B cmake-build -DCLANG=asan . && cmake --build cmake-build -- -j + - cp cmake-build/IVAS_rend . + + # Run Razel test + - scripts/razel/test_renderer_razel.py + +renderer-5ms-framing-msan: + extends: + - .test-job-linux + - .rules-merge-request + needs: ["build-codec-linux-cmake"] + stage: test + script: + # Build reference executable - 5ms framing disabled + - cp lib_com/options.h lib_com/options.h.bak + - sed -i '/API_5MS/d' lib_com/options.h + - mkdir cmake-build && cmake -B cmake-build . && cmake --build cmake-build -- -j + - cp cmake-build/IVAS_rend IVAS_rend_ref + + # Build test executable + - mv -f lib_com/options.h.bak lib_com/options.h + - cmake -B cmake-build -DCLANG=msan . && cmake --build cmake-build -- -j + - cp cmake-build/IVAS_rend . + + # Run Razel test + - scripts/razel/test_renderer_razel.py + .merge-request-comparison-setup-codec: &merge-request-comparison-setup-codec ### build test binaries, initial clean for paranoia reasons - make clean -- GitLab From 963bc877016791fe92960e3589f9338aec2afdd3 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 30 Jun 2023 15:27:32 +0200 Subject: [PATCH 032/175] [tmp] debug submodule --- .gitlab-ci-custom.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci-custom.yml b/.gitlab-ci-custom.yml index 2ce99be7c9..9413dc8573 100644 --- a/.gitlab-ci-custom.yml +++ b/.gitlab-ci-custom.yml @@ -396,6 +396,7 @@ renderer-5ms-framing-msan: needs: ["build-codec-linux-cmake"] stage: test script: + - git submodule status # tmp DBG # Build reference executable - 5ms framing disabled - cp lib_com/options.h lib_com/options.h.bak - sed -i '/API_5MS/d' lib_com/options.h -- GitLab From 77f916883e1039e2157230dd098efa1b8599057b Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 30 Jun 2023 15:30:27 +0200 Subject: [PATCH 033/175] [tmp] debug submodule --- .gitlab-ci-custom.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci-custom.yml b/.gitlab-ci-custom.yml index 9413dc8573..f49a8fab71 100644 --- a/.gitlab-ci-custom.yml +++ b/.gitlab-ci-custom.yml @@ -396,7 +396,11 @@ renderer-5ms-framing-msan: needs: ["build-codec-linux-cmake"] stage: test script: - - git submodule status # tmp DBG + # tmp DBG + - git submodule status + - ls -la scripts/razel + - ls -la scripts/razel/ivas_razel_runner + # Build reference executable - 5ms framing disabled - cp lib_com/options.h lib_com/options.h.bak - sed -i '/API_5MS/d' lib_com/options.h -- GitLab From dba2648e8d82ec2ceabdc0aa608c22ce33abba75 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 30 Jun 2023 15:34:00 +0200 Subject: [PATCH 034/175] Fix submodule checkout --- .gitlab-ci-custom.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci-custom.yml b/.gitlab-ci-custom.yml index f49a8fab71..dc11fb76ac 100644 --- a/.gitlab-ci-custom.yml +++ b/.gitlab-ci-custom.yml @@ -21,6 +21,7 @@ variables: UPSTREAM_URL: "https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/" INTERNAL_TESTV_DIR: "/testv" INTERNAL_CI_REPO_CLONE_DIR: "ivas-internal-ci" + GIT_SUBMODULE_STRATEGY: recursive # This sets when pipelines are created. Jobs have more specific rules to restrict them. -- GitLab From 65413e7ff8a307605fa95732212322ed01f10898 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 30 Jun 2023 15:35:48 +0200 Subject: [PATCH 035/175] Remove debugging code --- .gitlab-ci-custom.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.gitlab-ci-custom.yml b/.gitlab-ci-custom.yml index dc11fb76ac..2771d66f37 100644 --- a/.gitlab-ci-custom.yml +++ b/.gitlab-ci-custom.yml @@ -397,11 +397,6 @@ renderer-5ms-framing-msan: needs: ["build-codec-linux-cmake"] stage: test script: - # tmp DBG - - git submodule status - - ls -la scripts/razel - - ls -la scripts/razel/ivas_razel_runner - # Build reference executable - 5ms framing disabled - cp lib_com/options.h lib_com/options.h.bak - sed -i '/API_5MS/d' lib_com/options.h -- GitLab From 6000eb10b67d3573789a03aa4bdca937e69c11b9 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 30 Jun 2023 16:23:29 +0200 Subject: [PATCH 036/175] Use relative submodule URL --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 3ca7eb7d97..192aece8ec 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "scripts/razel/ivas_razel_runner"] path = scripts/razel/ivas_razel_runner - url = git@git01.iis.fhg.de:sgi/ivas-razel-runner.git + url = ../../sgi/ivas-razel-runner.git branch = rend -- GitLab From 3935354834f02888e9ac5d05db41703c45cf85bf Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 30 Jun 2023 16:31:49 +0200 Subject: [PATCH 037/175] Try to fix search for clang --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8098dc1c68..ddd1816562 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,7 +61,7 @@ if(UNIX) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror-implicit-function-declaration -Wno-unused-parameter -Wno-unused-function") # CLANG if(CLANG) - find_program(clangBin NAMES /home/amm-archiv/soft/Linux/clang/current/bin/clang clang REQUIRED) + find_program(clangBin NAMES clang-13 /home/amm-archiv/soft/Linux/clang/current/bin/clang clang REQUIRED) set(CMAKE_C_COMPILER "${clangBin}" CACHE STRING "") if("${CLANG}" MATCHES "1" OR "${CLANG}" MATCHES "msan") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=memory") -- GitLab From 65c81e0533bc6603619e1d77fab4365bc9eba8c2 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 30 Jun 2023 16:41:34 +0200 Subject: [PATCH 038/175] Revert "Try to fix search for clang" This reverts commit 3935354834f02888e9ac5d05db41703c45cf85bf. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ddd1816562..8098dc1c68 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,7 +61,7 @@ if(UNIX) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror-implicit-function-declaration -Wno-unused-parameter -Wno-unused-function") # CLANG if(CLANG) - find_program(clangBin NAMES clang-13 /home/amm-archiv/soft/Linux/clang/current/bin/clang clang REQUIRED) + find_program(clangBin NAMES /home/amm-archiv/soft/Linux/clang/current/bin/clang clang REQUIRED) set(CMAKE_C_COMPILER "${clangBin}" CACHE STRING "") if("${CLANG}" MATCHES "1" OR "${CLANG}" MATCHES "msan") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=memory") -- GitLab From 6045854454599f4c7fe189b01496b26d36f66a8a Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 30 Jun 2023 16:44:46 +0200 Subject: [PATCH 039/175] Fix building reference without sanitizer --- .gitlab-ci-custom.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci-custom.yml b/.gitlab-ci-custom.yml index 2771d66f37..4eab63e877 100644 --- a/.gitlab-ci-custom.yml +++ b/.gitlab-ci-custom.yml @@ -379,12 +379,14 @@ renderer-5ms-framing-asan: # Build reference executable - 5ms framing disabled - cp lib_com/options.h lib_com/options.h.bak - sed -i '/API_5MS/d' lib_com/options.h - - mkdir cmake-build && cmake -B cmake-build . && cmake --build cmake-build -- -j - - cp cmake-build/IVAS_rend IVAS_rend_ref + - cmake -B cmake-build-ref . + - cmake --build cmake-build-ref -- -j + - cp cmake-build-ref/IVAS_rend IVAS_rend_ref # Build test executable - mv -f lib_com/options.h.bak lib_com/options.h - - cmake -B cmake-build -DCLANG=asan . && cmake --build cmake-build -- -j + - cmake -B cmake-build -DCLANG=asan . + - cmake --build cmake-build -- -j - cp cmake-build/IVAS_rend . # Run Razel test @@ -400,12 +402,14 @@ renderer-5ms-framing-msan: # Build reference executable - 5ms framing disabled - cp lib_com/options.h lib_com/options.h.bak - sed -i '/API_5MS/d' lib_com/options.h - - mkdir cmake-build && cmake -B cmake-build . && cmake --build cmake-build -- -j - - cp cmake-build/IVAS_rend IVAS_rend_ref + - cmake -B cmake-build-ref . + - cmake --build cmake-build-ref -- -j + - cp cmake-build-ref/IVAS_rend IVAS_rend_ref # Build test executable - mv -f lib_com/options.h.bak lib_com/options.h - - cmake -B cmake-build -DCLANG=msan . && cmake --build cmake-build -- -j + - cmake -B cmake-build -DCLANG=msan . + - cmake --build cmake-build -- -j - cp cmake-build/IVAS_rend . # Run Razel test -- GitLab From 9fba8fd275d248d1b173ca700d5ebc97055808b7 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 30 Jun 2023 16:46:28 +0200 Subject: [PATCH 040/175] Fix reference binary name --- .gitlab-ci-custom.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci-custom.yml b/.gitlab-ci-custom.yml index 4eab63e877..89cc0a6a4b 100644 --- a/.gitlab-ci-custom.yml +++ b/.gitlab-ci-custom.yml @@ -381,7 +381,7 @@ renderer-5ms-framing-asan: - sed -i '/API_5MS/d' lib_com/options.h - cmake -B cmake-build-ref . - cmake --build cmake-build-ref -- -j - - cp cmake-build-ref/IVAS_rend IVAS_rend_ref + - cp cmake-build-ref/IVAS_rend IVAS_rend_ref_5ms # Build test executable - mv -f lib_com/options.h.bak lib_com/options.h @@ -404,7 +404,7 @@ renderer-5ms-framing-msan: - sed -i '/API_5MS/d' lib_com/options.h - cmake -B cmake-build-ref . - cmake --build cmake-build-ref -- -j - - cp cmake-build-ref/IVAS_rend IVAS_rend_ref + - cp cmake-build-ref/IVAS_rend IVAS_rend_ref_5ms # Build test executable - mv -f lib_com/options.h.bak lib_com/options.h -- GitLab From 1866d6d87d90c2473651fda8adceb709d30db475 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 30 Jun 2023 17:02:08 +0200 Subject: [PATCH 041/175] Update ivas-razel-runner --- scripts/razel/ivas_razel_runner | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/razel/ivas_razel_runner b/scripts/razel/ivas_razel_runner index 9bc7a9da1c..9676b98c61 160000 --- a/scripts/razel/ivas_razel_runner +++ b/scripts/razel/ivas_razel_runner @@ -1 +1 @@ -Subproject commit 9bc7a9da1c25a9b2845f0a816f8427c6c611d83a +Subproject commit 9676b98c617410b94bbb61feb4fb2dc778887255 -- GitLab From b4c76218f33146a7da416f5a28e3ede9134b78dd Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Wed, 5 Jul 2023 11:11:42 +0200 Subject: [PATCH 042/175] fix synchronization of subframe information, fix compile problem when API_5MS is deactivated, memory optimization --- apps/decoder.c | 4 + lib_dec/ivas_dirac_dec.c | 4 + lib_dec/ivas_ism_param_dec.c | 19 +- lib_dec/ivas_jbm_dec.c | 712 +++++++++++++++++++++++++---------- lib_dec/ivas_mc_param_dec.c | 28 +- lib_dec/ivas_spar_decoder.c | 4 + lib_dec/lib_dec.c | 32 +- 7 files changed, 566 insertions(+), 237 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 71a296ed00..d7600702a8 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -421,8 +421,12 @@ int main( { #ifdef API_5MS if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) +#else +#ifndef VARIABLE_SPEED_DECODING + if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, IVAS_DEC_VOIP_MODE_VOIP, 100, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) +#endif #endif { fprintf( stderr, "\nCould not enable VOIP: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index f692ef1931..35cfeecfe3 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -2141,6 +2141,10 @@ void ivas_dirac_dec_set_md_map( hDirAC->subframes_rendered = 0; ivas_jbm_dec_get_adapted_subframes( nCldfbTs, hDirAC->subframe_nbslots, &hDirAC->nb_subframes ); +#ifdef API_5MS + st_ivas->hTcBuffer->nb_subframes = hDirAC->nb_subframes; + mvs2s( hDirAC->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, hDirAC->nb_subframes ); +#endif /* set mapping according to dirac_read_idx */ diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 7a243dc266..22c5822f30 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -1263,14 +1263,23 @@ void ivas_param_ism_dec_digest_tc( *-----------------------------------------------------------------*/ for ( slot_idx = 0; slot_idx < nCldfbSlots; slot_idx++ ) { - float RealBuffer[CLDFB_NO_CHANNELS_MAX]; - float ImagBuffer[CLDFB_NO_CHANNELS_MAX]; +#ifdef API_5MS + if ( st_ivas->hDecoderConfig->tsm_active ) + { +#endif - cldfbAnalysis_ts( &( transport_channels_f[ch][hDirAC->num_freq_bands * slot_idx] ), RealBuffer, ImagBuffer, hDirAC->num_freq_bands, st_ivas->cldfbAnaDec[ch] ); - mvr2r( RealBuffer, &hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc[slot_idx * hDirAC->num_freq_bands * nchan_transport + ch * hDirAC->num_freq_bands], hDirAC->num_freq_bands ); - mvr2r( ImagBuffer, &hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc[slot_idx * hDirAC->num_freq_bands * nchan_transport + ch * hDirAC->num_freq_bands], hDirAC->num_freq_bands ); + float RealBuffer[CLDFB_NO_CHANNELS_MAX]; + float ImagBuffer[CLDFB_NO_CHANNELS_MAX]; + cldfbAnalysis_ts( &( transport_channels_f[ch][hDirAC->num_freq_bands * slot_idx] ), RealBuffer, ImagBuffer, hDirAC->num_freq_bands, st_ivas->cldfbAnaDec[ch] ); + mvr2r( RealBuffer, &hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc[slot_idx * hDirAC->num_freq_bands * nchan_transport + ch * hDirAC->num_freq_bands], hDirAC->num_freq_bands ); + mvr2r( ImagBuffer, &hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc[slot_idx * hDirAC->num_freq_bands * nchan_transport + ch * hDirAC->num_freq_bands], hDirAC->num_freq_bands ); +#ifdef API_5MS + } + ivas_param_ism_collect_slot( hDirAC, &hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc[slot_idx * hDirAC->num_freq_bands * nchan_transport + ch * hDirAC->num_freq_bands], &hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc[slot_idx * hDirAC->num_freq_bands * nchan_transport + ch * hDirAC->num_freq_bands], ch, ref_power, cx_diag ); +#else ivas_param_ism_collect_slot( hDirAC, RealBuffer, ImagBuffer, ch, ref_power, cx_diag ); +#endif } } diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 42c834c70f..e36905725b 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -60,6 +60,9 @@ static void ivas_jbm_dec_copy_masa_meta_to_buffer( Decoder_Struct *st_ivas ); static void ivas_jbm_masa_sf_to_slot_map( Decoder_Struct *st_ivas, const int16_t nCldfbTs ); #endif +#ifdef API_5MS +static void ivas_jbm_dec_copy_tc_no_tsm( Decoder_Struct *st_ivas, float *tc[], const int16_t output_frame ); +#endif /*--------------------------------------------------------------------------* * ivas_jbm_dec_tc() @@ -497,9 +500,19 @@ ivas_error ivas_jbm_dec_tc( /*----------------------------------------------------------------* * Write IVAS transport channels *----------------------------------------------------------------*/ - - ivas_syn_output_f( p_output, output_frame, st_ivas->hTcBuffer->nchan_transport_jbm, data ); - +#ifdef API_5MS + if ( st_ivas->hDecoderConfig->tsm_active == 1 ) + { +#endif + ivas_syn_output_f( p_output, output_frame, st_ivas->hTcBuffer->nchan_transport_jbm, data ); +#ifdef API_5MS + } + else + { + /* directly copy to tc buffers */ + ivas_jbm_dec_copy_tc_no_tsm( st_ivas, p_output, output_frame ); + } +#endif /*----------------------------------------------------------------* * Common updates @@ -563,7 +576,18 @@ ivas_error ivas_jbm_dec_feed_tc_to_renderer( { p_data_f[n] = &data_f[n][0]; } - ivas_jbm_dec_copy_tc( st_ivas, nSamplesForRendering, nSamplesResidual, data, p_data_f ); +#ifdef API_5MS + if ( st_ivas->hDecoderConfig->tsm_active ) + { +#endif + ivas_jbm_dec_copy_tc( st_ivas, nSamplesForRendering, nSamplesResidual, data, p_data_f ); +#ifdef API_5MS + } + else + { + *nSamplesResidual = 0; + } +#endif n_render_timeslots = st_ivas->hTcBuffer->n_samples_available / st_ivas->hTcBuffer->n_samples_granularity; if ( st_ivas->hTcBuffer->tc_buffer_mode == TC_BUFFER_MODE_BUFFER ) @@ -642,7 +666,12 @@ ivas_error ivas_jbm_dec_render( { int16_t n, nchan_out; int16_t nchan_transport; +#ifdef API_5MS + uint16_t nSamplesRenderedLocal; + float output[MAX_OUTPUT_CHANNELS][L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES]; /* 'float' buffer for output synthesis, MAX_OUTPUT_CHANNELS channels */ +#else float output[MAX_OUTPUT_CHANNELS][L_FRAME48k]; /* 'float' buffer for output synthesis, MAX_OUTPUT_CHANNELS channels */ +#endif int16_t nchan_remapped; int32_t output_Fs; AUDIO_CONFIG output_config; @@ -664,294 +693,478 @@ ivas_error ivas_jbm_dec_render( nchan_out = st_ivas->hDecoderConfig->nchan_out; nchan_transport = st_ivas->hTcBuffer->nchan_transport_jbm; output_config = st_ivas->hDecoderConfig->output_config; +#ifndef API_5MS nSamplesAskedLocal = nSamplesAsked + st_ivas->hTcBuffer->n_samples_discard; +#endif - for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) +#ifdef API_5MS + nSamplesRenderedLocal = 0; + *nSamplesRendered = 0; + while ( *nSamplesRendered < nSamplesAsked && st_ivas->hTcBuffer->n_samples_available > 0 ) { - p_output[n] = &output[n][0]; - } + nSamplesAskedLocal = st_ivas->hTcBuffer->subframe_nbslots[st_ivas->hTcBuffer->subframes_rendered] * st_ivas->hTcBuffer->n_samples_granularity; +#endif - for ( n = 0; n < st_ivas->hTcBuffer->nchan_transport_internal; n++ ) - { - p_tc[n] = &st_ivas->hTcBuffer->tc[n][st_ivas->hTcBuffer->n_samples_rendered]; - } + for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) + { + p_output[n] = &output[n][0]; + } - /*----------------------------------------------------------------* - * Combine orientations - *----------------------------------------------------------------*/ + for ( n = 0; n < st_ivas->hTcBuffer->nchan_transport_internal; n++ ) + { + p_tc[n] = &st_ivas->hTcBuffer->tc[n][st_ivas->hTcBuffer->n_samples_rendered]; + } - if ( ( error = combine_external_and_head_orientations_dec( st_ivas->hHeadTrackData, st_ivas->hExtOrientationData, - st_ivas->hCombinedOrientationData ) ) != IVAS_ERR_OK ) - { - return error; - } + /*----------------------------------------------------------------* + * Combine orientations + *----------------------------------------------------------------*/ - /*----------------------------------------------------------------* - * Rendering - *----------------------------------------------------------------*/ + if ( ( error = combine_external_and_head_orientations_dec( st_ivas->hHeadTrackData, st_ivas->hExtOrientationData, + st_ivas->hCombinedOrientationData ) ) != IVAS_ERR_OK ) + { + return error; + } - if ( st_ivas->ivas_format == UNDEFINED_FORMAT ) - { - assert( 0 ); - } - else if ( st_ivas->hTcBuffer->tc_buffer_mode == TC_BUFFER_MODE_BUFFER ) - { + /*----------------------------------------------------------------* + * Rendering + *----------------------------------------------------------------*/ + + if ( st_ivas->ivas_format == UNDEFINED_FORMAT ) + { + assert( 0 ); + } + else if ( st_ivas->hTcBuffer->tc_buffer_mode == TC_BUFFER_MODE_BUFFER ) + { +#ifdef API_5MS + ivas_jbm_dec_tc_buffer_playout( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, p_output ); +#else ivas_jbm_dec_tc_buffer_playout( st_ivas, nSamplesAskedLocal, nSamplesRendered, p_output ); - } - else if ( st_ivas->ivas_format == STEREO_FORMAT ) - { - /* Rendering */ - if ( st_ivas->renderer_type == RENDERER_MC ) +#endif + } + else if ( st_ivas->ivas_format == STEREO_FORMAT ) { + /* Rendering */ + if ( st_ivas->renderer_type == RENDERER_MC ) + { +#ifdef API_5MS + nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); + ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, nSamplesRenderedLocal, p_tc, p_output ); +#else *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc, p_output ); +#endif + } } - } - else if ( st_ivas->ivas_format == ISM_FORMAT ) - { - /* Rendering */ - if ( st_ivas->ism_mode == ISM_MODE_PARAM ) + else if ( st_ivas->ivas_format == ISM_FORMAT ) { - if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) + /* Rendering */ + if ( st_ivas->ism_mode == ISM_MODE_PARAM ) { + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) + { +#ifdef API_5MS + ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, st_ivas->nchan_transport, p_output ); +#else ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, st_ivas->nchan_transport, p_output ); - } - else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) - { +#endif + } + else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) + { +#ifdef API_5MS + nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); +#else *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); - pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f; - pan_right = 1.f - pan_left; +#endif + pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f; + pan_right = 1.f - pan_left; +#ifdef API_5MS + v_multc( st_ivas->hTcBuffer->tc[0], pan_right, output[1], nSamplesRenderedLocal ); + v_multc( st_ivas->hTcBuffer->tc[0], pan_left, output[0], nSamplesRenderedLocal ); +#else v_multc( st_ivas->hTcBuffer->tc[0], pan_right, output[1], *nSamplesRendered ); v_multc( st_ivas->hTcBuffer->tc[0], pan_left, output[0], *nSamplesRendered ); - } - else if ( st_ivas->renderer_type == RENDERER_PARAM_ISM || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) - { - ivas_param_ism_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); - - if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) +#endif + } + else if ( st_ivas->renderer_type == RENDERER_PARAM_ISM || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { - /* Convert CICP19 -> Ambisonics */ +#ifdef API_5MS + ivas_param_ism_dec_render( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, p_output ); +#else + ivas_param_ism_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); +#endif + if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) + { + /* Convert CICP19 -> Ambisonics */ +#ifdef API_5MS + ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, nSamplesRenderedLocal, st_ivas->hOutSetup.ambisonics_order, 0.f ); +#else ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); +#endif + } } } - } - else /* ISM_MODE_DISC */ - { + else /* ISM_MODE_DISC */ + { +#ifdef API_5MS + nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); +#else *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); +#endif - /* Loudspeaker or Ambisonics rendering */ - if ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) - { - /* Convert to CICPxx; used also for ISM->CICP19->binaural_room rendering */ + /* Loudspeaker or Ambisonics rendering */ + if ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) + { + /* Convert to CICPxx; used also for ISM->CICP19->binaural_room rendering */ +#ifdef API_5MS + ivas_ism_render_sf( st_ivas, p_output, nSamplesRenderedLocal ); +#else ivas_ism_render_sf( st_ivas, p_output, *nSamplesRendered ); - } - else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) - { - pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f; - pan_right = 1.f - pan_left; +#endif + } + else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) + { + pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f; + pan_right = 1.f - pan_left; +#ifdef API_5MS + v_multc( st_ivas->hTcBuffer->tc[0], pan_right, output[1], nSamplesRenderedLocal ); + v_multc( st_ivas->hTcBuffer->tc[0], pan_left, output[0], nSamplesRenderedLocal ); +#else v_multc( st_ivas->hTcBuffer->tc[0], pan_right, output[1], *nSamplesRendered ); v_multc( st_ivas->hTcBuffer->tc[0], pan_left, output[0], *nSamplesRendered ); - } - else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) - { - /* Convert to Ambisonics; used also for ISM->HOA3->binaural rendering */ +#endif + } + else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) + { + /* Convert to Ambisonics; used also for ISM->HOA3->binaural rendering */ +#ifdef API_5MS + ivas_ism2sba_sf( st_ivas->hTcBuffer->tc, p_output, st_ivas->hIsmRendererData, st_ivas->nchan_transport, nSamplesRenderedLocal, st_ivas->hTcBuffer->n_samples_rendered, st_ivas->hIntSetup.ambisonics_order ); +#else ivas_ism2sba_sf( st_ivas->hTcBuffer->tc, p_output, st_ivas->hIsmRendererData, st_ivas->nchan_transport, *nSamplesRendered, st_ivas->hTcBuffer->n_samples_rendered, st_ivas->hIntSetup.ambisonics_order ); - } +#endif + } - /* Binaural rendering */ - if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) - { - if ( ( ivas_td_binaural_renderer_sf( st_ivas, p_output, *nSamplesRendered ) ) != IVAS_ERR_OK ) + /* Binaural rendering */ + if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) { - return error; +#ifdef API_5MS + if ( ( ivas_td_binaural_renderer_sf( st_ivas, p_output, nSamplesRenderedLocal ) ) != IVAS_ERR_OK ) +#else + if ( ( ivas_td_binaural_renderer_sf( st_ivas, p_output, *nSamplesRendered ) ) != IVAS_ERR_OK ) +#endif + { + return error; + } } - } - else if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) - { + else if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) + { +#ifdef API_5MS + if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, AUDIO_CONFIG_7_1_4, AUDIO_CONFIG_BINAURAL_ROOM_IR, st_ivas->hDecoderConfig, NULL, NULL, + NULL, st_ivas->hTcBuffer, p_output, p_output, nSamplesRenderedLocal, output_Fs ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, AUDIO_CONFIG_7_1_4, AUDIO_CONFIG_BINAURAL_ROOM_IR, st_ivas->hDecoderConfig, NULL, NULL, NULL, st_ivas->hTcBuffer, p_output, p_output, *nSamplesRendered, output_Fs ) ) != IVAS_ERR_OK ) - { - return error; - } +#endif + { + return error; + } +#ifdef API_5MS + ivas_binaural_add_LFE( st_ivas, nSamplesRenderedLocal, p_output, p_output ); +#else ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); - } +#endif + } #ifdef DEBUGGING - else if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) - { - ivas_binaural_cldfb_sf( st_ivas, *nSamplesRendered, p_output ); - } + else if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + { +#ifdef API_5MS + ivas_binaural_cldfb_sf( st_ivas, nSamplesRenderedLocal, p_output ); +#else + ivas_binaural_cldfb_sf( st_ivas, *nSamplesRendered, p_output ); #endif + } +#endif + } } - } - else if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == MASA_FORMAT ) - { - nchan_remapped = nchan_transport; - - /* Loudspeakers, Ambisonics or Binaural rendering */ - if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) + else if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == MASA_FORMAT ) { + nchan_remapped = nchan_transport; + + /* Loudspeakers, Ambisonics or Binaural rendering */ + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) + { +#ifdef API_5MS + ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, nchan_remapped, p_output ); +#else ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); - } - else if ( st_ivas->ivas_format == MASA_FORMAT ) - { - if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC ) +#endif + } + else if ( st_ivas->ivas_format == MASA_FORMAT ) { - *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); - for ( n = 0; n < nchan_remapped; n++ ) + if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC ) { +#ifdef API_5MS + nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); +#else + *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); +#endif + for ( n = 0; n < nchan_remapped; n++ ) + { +#ifdef API_5MS + mvr2r( st_ivas->hTcBuffer->tc[n] + st_ivas->hTcBuffer->n_samples_rendered, p_output[n], nSamplesRenderedLocal ); +#else mvr2r( st_ivas->hTcBuffer->tc[n] + st_ivas->hTcBuffer->n_samples_rendered, p_output[n], *nSamplesRendered ); - } +#endif + } +#ifdef API_5MS + if ( ( error = ivas_sba_linear_renderer( p_output, nSamplesRenderedLocal, nchan_remapped, output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_sba_linear_renderer( p_output, *nSamplesRendered, nchan_remapped, output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ) ) != IVAS_ERR_OK ) +#endif + { + return error; + } + } + else if ( st_ivas->renderer_type == RENDERER_DIRAC ) { - return error; +#ifdef API_5MS + ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, p_output ); +#else + ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); +#endif } } - else if ( st_ivas->renderer_type == RENDERER_DIRAC ) + else /* SBA_MODE_SPAR */ { - ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); - } - } - else /* SBA_MODE_SPAR */ - { +#ifdef API_5MS + ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, p_output ); +#else ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); +#endif + } } - } - else if ( st_ivas->ivas_format == MC_FORMAT ) - { - if ( st_ivas->mc_mode == MC_MODE_MCT ) + else if ( st_ivas->ivas_format == MC_FORMAT ) { - *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); - if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) ) + if ( st_ivas->mc_mode == MC_MODE_MCT ) { +#ifdef API_5MS + nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); +#else + *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); +#endif + if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) ) + { +#ifdef API_5MS + ivas_mc2sba( st_ivas->hTransSetup, p_tc, p_output, nSamplesRenderedLocal, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); +#else ivas_mc2sba( st_ivas->hTransSetup, p_tc, p_output, *nSamplesRendered, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); - } +#endif + } - /* Rendering */ - if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) - { + /* Rendering */ + if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) + { +#ifdef API_5MS + if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig, + st_ivas->hCombinedOrientationData, + &st_ivas->hIntSetup, st_ivas->hEFAPdata, st_ivas->hTcBuffer, p_tc, p_output, nSamplesRenderedLocal, output_Fs ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig, st_ivas->hCombinedOrientationData, &st_ivas->hIntSetup, st_ivas->hEFAPdata, st_ivas->hTcBuffer, p_tc, p_output, *nSamplesRendered, output_Fs ) ) != IVAS_ERR_OK ) - { - return error; - } - +#endif + { + return error; + } +#ifdef API_5MS + ivas_binaural_add_LFE( st_ivas, nSamplesRenderedLocal, st_ivas->hTcBuffer->tc, p_output ); +#else ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, st_ivas->hTcBuffer->tc, p_output ); - } - else if ( st_ivas->renderer_type == RENDERER_MC ) - { +#endif + } + else if ( st_ivas->renderer_type == RENDERER_MC ) + { +#ifdef API_5MS + nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); + ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, nSamplesRenderedLocal, p_tc, p_output ); +#else *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc, p_output ); - } - else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) - { - ivas_mc2sba( st_ivas->hIntSetup, p_tc, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); - } - else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) - { - if ( ( ivas_td_binaural_renderer_sf( st_ivas, p_output, *nSamplesRendered ) ) != IVAS_ERR_OK ) +#endif + } + else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { - return error; +#ifdef API_5MS + ivas_mc2sba( st_ivas->hIntSetup, p_tc, p_output, nSamplesRenderedLocal, st_ivas->hOutSetup.ambisonics_order, 0.f ); +#else + ivas_mc2sba( st_ivas->hIntSetup, p_tc, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); +#endif } - + else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) + { +#ifdef API_5MS + if ( ( ivas_td_binaural_renderer_sf( st_ivas, p_output, nSamplesRenderedLocal ) ) != IVAS_ERR_OK ) +#else + if ( ( ivas_td_binaural_renderer_sf( st_ivas, p_output, *nSamplesRendered ) ) != IVAS_ERR_OK ) +#endif + { + return error; + } +#ifdef API_5MS + ivas_binaural_add_LFE( st_ivas, nSamplesRenderedLocal, st_ivas->hTcBuffer->tc, p_output ); +#else ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, st_ivas->hTcBuffer->tc, p_output ); +#endif + } } - } - else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) - { + else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) + { +#ifdef API_5MS + ivas_param_mc_dec_render( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, p_output ); +#else ivas_param_mc_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); - } +#endif + } #ifdef API_5MS - else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) - { - /* zero output for now, not yet implemented... */ - int16_t ch; - *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); - for ( ch = 0; ch < nchan_out; ch++ ) + else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) { - set_zero( p_output[ch], *nSamplesRendered ); - } - } -#endif - else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) - { - int16_t offset = st_ivas->hDirAC->slots_rendered * st_ivas->hDirAC->slot_size; - nchan_remapped = st_ivas->nchan_transport; + /* zero output for now, not yet implemented... */ + int16_t ch; + nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); - if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) - { - ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); + for ( ch = 0; ch < nchan_out; ch++ ) + { + set_zero( p_output[ch], nSamplesRenderedLocal ); + } } - else if ( st_ivas->renderer_type == RENDERER_DIRAC || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) /* rendering to CICPxx and Ambisonics */ +#endif + else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) { - ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); + int16_t offset = st_ivas->hDirAC->slots_rendered * st_ivas->hDirAC->slot_size; + nchan_remapped = st_ivas->nchan_transport; - if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) + { +#ifdef API_5MS + ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, nchan_remapped, p_output ); +#else + ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); +#endif + } + else if ( st_ivas->renderer_type == RENDERER_DIRAC || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) /* rendering to CICPxx and Ambisonics */ { - /* we still need to copy the separate channel if available */ - if ( st_ivas->hOutSetup.separateChannelEnabled ) +#ifdef API_5MS + ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, p_output ); +#else + ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); +#endif + if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { + /* we still need to copy the separate channel if available */ + if ( st_ivas->hOutSetup.separateChannelEnabled ) + { +#ifdef API_5MS + mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], nSamplesRenderedLocal ); +#else mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); - } - +#endif + } +#ifdef API_5MS + ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, nSamplesRenderedLocal, st_ivas->hOutSetup.ambisonics_order, 0.f ); +#else ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); - } - else if ( st_ivas->intern_config == AUDIO_CONFIG_5_1 && ( output_config == AUDIO_CONFIG_5_1_2 || output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1 ) ) - { - for ( n = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; n < st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe; n++ ) +#endif + } + else if ( st_ivas->intern_config == AUDIO_CONFIG_5_1 && ( output_config == AUDIO_CONFIG_5_1_2 || output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1 ) ) { + for ( n = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; n < st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe; n++ ) + { +#ifdef API_5MS + set_zero( output[n], nSamplesRenderedLocal ); +#else set_zero( output[n], *nSamplesRendered ); +#endif + } } } - } - /* copy discrete C and TD LFE from internal TC to output */ - if ( st_ivas->hOutSetup.separateChannelEnabled ) - { - if ( output_config == AUDIO_CONFIG_5_1 || output_config == AUDIO_CONFIG_7_1 || - output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1_4 || - output_config == AUDIO_CONFIG_5_1_2 || ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe > 0 ) ) + /* copy discrete C and TD LFE from internal TC to output */ + if ( st_ivas->hOutSetup.separateChannelEnabled ) { + if ( output_config == AUDIO_CONFIG_5_1 || output_config == AUDIO_CONFIG_7_1 || + output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1_4 || + output_config == AUDIO_CONFIG_5_1_2 || ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe > 0 ) ) + { +#ifdef API_5MS + mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL] + offset, output[LFE_CHANNEL], nSamplesRenderedLocal ); + mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], nSamplesRenderedLocal ); +#else mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL] + offset, output[LFE_CHANNEL], *nSamplesRendered ); mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); - } - else if ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe == 0 ) - { - /* Delay the separated channel to sync with the DirAC rendering */ +#endif + } + else if ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe == 0 ) + { + /* Delay the separated channel to sync with the DirAC rendering */ +#ifdef API_5MS + mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], nSamplesRenderedLocal ); +#else mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); +#endif + } } } } - } - /*----------------------------------------------------------------* - * Write IVAS output channels - * - compensation for saturation - * - float to integer conversion - *----------------------------------------------------------------*/ + /*----------------------------------------------------------------* + * Write IVAS output channels + * - compensation for saturation + * - float to integer conversion + *----------------------------------------------------------------*/ +#ifdef API_5MS + st_ivas->hTcBuffer->n_samples_available -= nSamplesRenderedLocal; + st_ivas->hTcBuffer->n_samples_rendered += nSamplesRenderedLocal; +#else st_ivas->hTcBuffer->n_samples_available -= *nSamplesRendered; st_ivas->hTcBuffer->n_samples_rendered += *nSamplesRendered; +#endif - if ( st_ivas->hTcBuffer->n_samples_discard > 0 ) - { - for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) + if ( st_ivas->hTcBuffer->n_samples_discard > 0 ) { - p_output[n] += st_ivas->hTcBuffer->n_samples_discard; - } + for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) + { + p_output[n] += st_ivas->hTcBuffer->n_samples_discard; + } +#ifdef API_5MS + nSamplesRenderedLocal -= st_ivas->hTcBuffer->n_samples_discard; +#else *nSamplesRendered -= st_ivas->hTcBuffer->n_samples_discard; - st_ivas->hTcBuffer->n_samples_discard = 0; - } +#endif + st_ivas->hTcBuffer->n_samples_discard = 0; + } +#ifdef API_5MS + ivas_limiter_dec( st_ivas->hLimiter, p_output, nchan_out, nSamplesRenderedLocal, st_ivas->BER_detect ); +#else ivas_limiter_dec( st_ivas->hLimiter, p_output, nchan_out, *nSamplesRendered, st_ivas->BER_detect ); +#endif + +#ifdef API_5MS +#ifdef DEBUGGING + st_ivas->noClipping += +#endif + ivas_syn_output( p_output, nSamplesRenderedLocal, nchan_out, data + *nSamplesRendered * nchan_out ); + *nSamplesRendered += nSamplesRenderedLocal; + } +#else #ifdef DEBUGGING st_ivas->noClipping += #endif ivas_syn_output( p_output, *nSamplesRendered, nchan_out, data ); - +#endif *nSamplesAvailableNext = st_ivas->hTcBuffer->n_samples_available; pop_wmops(); @@ -1508,6 +1721,9 @@ static void ivas_jbm_dec_copy_tc( } hTcBuffer->n_samples_rendered = 0; +#ifdef API_5MS + hTcBuffer->subframes_rendered = 0; +#endif return; } @@ -1627,27 +1843,42 @@ ivas_error ivas_jbm_dec_tc_buffer_open( nsamp_to_allocate = hTcBuffer->nchan_buffer_full * n_samp_full; nsamp_to_allocate += nchan_residual * n_samp_residual; - if ( ( hTcBuffer->tc_buffer = (float *) malloc( nsamp_to_allocate * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for JBM TC Buffer\n" ) ); - } - set_zero( hTcBuffer->tc_buffer, nsamp_to_allocate ); - - offset = 0; - for ( ch_idx = 0; ch_idx < hTcBuffer->nchan_buffer_full; ch_idx++ ) - { - hTcBuffer->tc[ch_idx] = &hTcBuffer->tc_buffer[offset]; - offset += n_samp_full; - } - for ( ; ch_idx < hTcBuffer->nchan_transport_internal; ch_idx++ ) +#ifdef API_5MS + if ( nsamp_to_allocate == 0 ) { - hTcBuffer->tc[ch_idx] = &hTcBuffer->tc_buffer[offset]; - offset += n_samp_residual; + hTcBuffer->tc_buffer = NULL; + for ( ch_idx = 0; ch_idx < MAX_TRANSPORT_CHANNELS; ch_idx++ ) + { + hTcBuffer->tc[ch_idx] = NULL; + } } - for ( ; ch_idx < MAX_TRANSPORT_CHANNELS; ch_idx++ ) + else { - hTcBuffer->tc[ch_idx] = NULL; +#endif + if ( ( hTcBuffer->tc_buffer = (float *) malloc( nsamp_to_allocate * sizeof( float ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for JBM TC Buffer\n" ) ); + } + set_zero( hTcBuffer->tc_buffer, nsamp_to_allocate ); + + offset = 0; + for ( ch_idx = 0; ch_idx < hTcBuffer->nchan_buffer_full; ch_idx++ ) + { + hTcBuffer->tc[ch_idx] = &hTcBuffer->tc_buffer[offset]; + offset += n_samp_full; + } + for ( ; ch_idx < hTcBuffer->nchan_transport_internal; ch_idx++ ) + { + hTcBuffer->tc[ch_idx] = &hTcBuffer->tc_buffer[offset]; + offset += n_samp_residual; + } + for ( ; ch_idx < MAX_TRANSPORT_CHANNELS; ch_idx++ ) + { + hTcBuffer->tc[ch_idx] = NULL; + } +#ifdef API_5MS } +#endif } st_ivas->hTcBuffer = hTcBuffer; @@ -1985,6 +2216,75 @@ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode( return buffer_mode; } +#ifdef API_5MS +void ivas_jbm_dec_copy_tc_no_tsm( + Decoder_Struct *st_ivas, + float *tc[], + const int16_t output_frame ) +{ + int16_t n_ch_full_copy; + int16_t n_ch_cldfb; + int16_t ch_idx; + DECODER_TC_BUFFER_HANDLE hTcBuffer; + + hTcBuffer = st_ivas->hTcBuffer; + hTcBuffer->n_samples_buffered = output_frame; + hTcBuffer->n_samples_available = hTcBuffer->n_samples_buffered; + n_ch_full_copy = min( hTcBuffer->nchan_transport_jbm, hTcBuffer->nchan_buffer_full ); + n_ch_cldfb = hTcBuffer->nchan_transport_jbm - hTcBuffer->nchan_buffer_full; + /* copy full tcs*/ + for ( ch_idx = 0; ch_idx < n_ch_full_copy; ch_idx++ ) + { + mvr2r( tc[ch_idx], st_ivas->hTcBuffer->tc[ch_idx], hTcBuffer->n_samples_buffered ); + } + + /* CLDFB ana for ParamMC/ParamISM */ + if ( n_ch_cldfb > 0 ) + { + float *cldfb_real_buffer; + float *cldfb_imag_buffer; + int16_t cldfb_ch, slot_idx, num_freq_bands; + + cldfb_real_buffer = NULL; + cldfb_imag_buffer = NULL; + num_freq_bands = 0; + + if ( st_ivas->ivas_format == ISM_FORMAT ) + { + cldfb_real_buffer = st_ivas->hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc; + cldfb_imag_buffer = st_ivas->hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc; + num_freq_bands = st_ivas->hDirAC->num_freq_bands; + } + else if ( st_ivas->ivas_format == MC_FORMAT ) + { + cldfb_real_buffer = st_ivas->hParamMC->Cldfb_RealBuffer_tc; + cldfb_imag_buffer = st_ivas->hParamMC->Cldfb_ImagBuffer_tc; + num_freq_bands = st_ivas->hParamMC->num_freq_bands; + } +#ifdef DEBUGGING + else + { + assert( 0 && "Residual (direct CLDFB transport channels) only possible for ParamMC/ParamISM!" ); + } +#endif + /* CLDFB Analysis*/ + + for ( cldfb_ch = 0; cldfb_ch < n_ch_cldfb; cldfb_ch++, ch_idx++ ) + { + for ( slot_idx = 0; slot_idx < DEFAULT_JBM_CLDFB_TIMESLOTS; slot_idx++ ) + { + cldfbAnalysis_ts( &( tc[ch_idx][num_freq_bands * slot_idx] ), + &cldfb_real_buffer[slot_idx * num_freq_bands * n_ch_cldfb + cldfb_ch * num_freq_bands], + &cldfb_imag_buffer[slot_idx * num_freq_bands * n_ch_cldfb + cldfb_ch * num_freq_bands], + num_freq_bands, st_ivas->cldfbAnaDec[cldfb_ch] ); + } + } + } + hTcBuffer->n_samples_rendered = 0; + hTcBuffer->subframes_rendered = 0; +} +#endif + #ifdef FIX_470_MASA_JBM_EXT /*--------------------------------------------------------------------------* diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index 16159ad005..6fe970d227 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -1456,6 +1456,10 @@ void ivas_param_mc_dec_digest_tc( hParamMC->slots_rendered = 0; hParamMC->subframes_rendered = 0; ivas_jbm_dec_get_adapted_subframes( nCldfbSlots, hParamMC->subframe_nbslots, &hParamMC->nb_subframes ); +#ifdef API_5MS + st_ivas->hTcBuffer->nb_subframes = hParamMC->nb_subframes; + mvs2s( hParamMC->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, hParamMC->nb_subframes ); +#endif ivas_param_mc_dec_compute_interpolator( hParamMC->hMetadataPMC->bAttackPresent, hParamMC->hMetadataPMC->attackIndex, nCldfbSlots, hParamMC->h_output_synthesis_params.interpolator ); @@ -1468,18 +1472,24 @@ void ivas_param_mc_dec_digest_tc( /* slot loop for gathering the input data */ for ( slot_idx = 0; slot_idx < nCldfbSlots; slot_idx++ ) { - float RealBuffer[CLDFB_NO_CHANNELS_MAX]; - float ImagBuffer[CLDFB_NO_CHANNELS_MAX]; - - /* CLDFB Analysis*/ - for ( ch = 0; ch < nchan_transport; ch++ ) +#ifdef API_5MS + if ( st_ivas->hDecoderConfig->tsm_active ) { - cldfbAnalysis_ts( &( transport_channels_f[ch][hParamMC->num_freq_bands * slot_idx] ), RealBuffer, ImagBuffer, hParamMC->num_freq_bands, st_ivas->cldfbAnaDec[ch] ); +#endif + float RealBuffer[CLDFB_NO_CHANNELS_MAX]; + float ImagBuffer[CLDFB_NO_CHANNELS_MAX]; - mvr2r( RealBuffer, &hParamMC->Cldfb_RealBuffer_tc[slot_idx * hParamMC->num_freq_bands * nchan_transport + ch * hParamMC->num_freq_bands], hParamMC->num_freq_bands ); - mvr2r( ImagBuffer, &hParamMC->Cldfb_ImagBuffer_tc[slot_idx * hParamMC->num_freq_bands * nchan_transport + ch * hParamMC->num_freq_bands], hParamMC->num_freq_bands ); - } + /* CLDFB Analysis*/ + for ( ch = 0; ch < nchan_transport; ch++ ) + { + cldfbAnalysis_ts( &( transport_channels_f[ch][hParamMC->num_freq_bands * slot_idx] ), RealBuffer, ImagBuffer, hParamMC->num_freq_bands, st_ivas->cldfbAnaDec[ch] ); + mvr2r( RealBuffer, &hParamMC->Cldfb_RealBuffer_tc[slot_idx * hParamMC->num_freq_bands * nchan_transport + ch * hParamMC->num_freq_bands], hParamMC->num_freq_bands ); + mvr2r( ImagBuffer, &hParamMC->Cldfb_ImagBuffer_tc[slot_idx * hParamMC->num_freq_bands * nchan_transport + ch * hParamMC->num_freq_bands], hParamMC->num_freq_bands ); + } +#ifdef API_5MS + } +#endif if ( slot_idx >= 2 * hParamMC->hMetadataPMC->attackIndex ) { ivas_dirac_dec_output_synthesis_cov_param_mc_collect_slot( &hParamMC->Cldfb_RealBuffer_tc[slot_idx * hParamMC->num_freq_bands * nchan_transport], &hParamMC->Cldfb_ImagBuffer_tc[slot_idx * hParamMC->num_freq_bands * nchan_transport], cx, cx_imag, hParamMC, nchan_transport ); diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index df60891a58..ce339e80cc 100755 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -1166,6 +1166,10 @@ void ivas_spar_dec_set_render_map( hSpar->subframes_rendered = 0; set_s( hSpar->render_to_md_map, 0, MAX_JBM_SUBFRAMES_5MS * JBM_CLDFB_SLOTS_IN_SUBFRAME ); ivas_jbm_dec_get_adapted_subframes( nCldfbTs, hSpar->subframe_nbslots, &hSpar->nb_subframes ); +#ifdef API_5MS + st_ivas->hTcBuffer->nb_subframes = hSpar->nb_subframes; + mvs2s( hSpar->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, hSpar->nb_subframes ); +#endif ivas_jbm_dec_get_md_map( DEFAULT_JBM_CLDFB_TIMESLOTS, nCldfbTs, 1, 0, DEFAULT_JBM_CLDFB_TIMESLOTS, hSpar->render_to_md_map ); return; diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 5fbbee3df3..d33c55deff 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -3662,17 +3662,16 @@ ivas_error IVAS_DEC_reconfigure( } } #ifdef API_5MS - } -#endif -#ifdef API_5MS - if ( ( hIvasDec->apaExecBuffer = malloc( sizeof( float ) * apa_buffer_size * nTransportChannels ) ) == NULL ) + if ( ( hIvasDec->apaExecBuffer = malloc( sizeof( float ) * apa_buffer_size * nTransportChannels ) ) == NULL ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); - } + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); + } - set_zero( hIvasDec->apaExecBuffer, apa_buffer_size * nTransportChannels ); -#else + set_zero( hIvasDec->apaExecBuffer, apa_buffer_size * nTransportChannels ); + } +#endif +#ifndef API_5MS if ( ( hVoIP->apaExecBuffer = malloc( sizeof( float ) * APA_BUF_PER_CHANNEL * nTransportChannels ) ) == NULL ) { @@ -3696,17 +3695,16 @@ ivas_error IVAS_DEC_reconfigure( } #ifdef API_5MS apa_buffer_size = APA_BUF_PER_CHANNEL; + free( hIvasDec->apaExecBuffer ); + if ( ( hIvasDec->apaExecBuffer = malloc( sizeof( float ) * apa_buffer_size * nTransportChannels ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); + } + set_zero( hIvasDec->apaExecBuffer, apa_buffer_size * nTransportChannels ); } #endif /* realloc apa_exe_buffer */ -#ifdef API_5MS - free( hIvasDec->apaExecBuffer ); - if ( ( hIvasDec->apaExecBuffer = malloc( sizeof( float ) * apa_buffer_size * nTransportChannels ) ) == NULL ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); - } - set_zero( hIvasDec->apaExecBuffer, apa_buffer_size * nTransportChannels ); -#else +#ifndef API_5MS free( hIvasDec->hVoIP->apaExecBuffer ); if ( ( hIvasDec->hVoIP->apaExecBuffer = malloc( sizeof( float ) * APA_BUF_PER_CHANNEL * nTransportChannels ) ) == NULL ) { -- GitLab From ba524608b434a48d60d63f018acef51c2a62d1b6 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Wed, 5 Jul 2023 16:33:07 +0200 Subject: [PATCH 043/175] fix JBM problems --- lib_dec/ivas_jbm_dec.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index e36905725b..e5c6955bcf 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -702,6 +702,7 @@ ivas_error ivas_jbm_dec_render( *nSamplesRendered = 0; while ( *nSamplesRendered < nSamplesAsked && st_ivas->hTcBuffer->n_samples_available > 0 ) { + uint16_t subframes_rendered = st_ivas->hTcBuffer->subframes_rendered; nSamplesAskedLocal = st_ivas->hTcBuffer->subframe_nbslots[st_ivas->hTcBuffer->subframes_rendered] * st_ivas->hTcBuffer->n_samples_granularity; #endif @@ -749,6 +750,7 @@ ivas_error ivas_jbm_dec_render( #ifdef API_5MS nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, nSamplesRenderedLocal, p_tc, p_output ); + st_ivas->hTcBuffer->subframes_rendered++; #else *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc, p_output ); @@ -802,6 +804,9 @@ ivas_error ivas_jbm_dec_render( #endif } } +#ifdef API_5MS + st_ivas->hTcBuffer->subframes_rendered++; +#endif } else /* ISM_MODE_DISC */ { @@ -883,6 +888,11 @@ ivas_error ivas_jbm_dec_render( ivas_binaural_cldfb_sf( st_ivas, *nSamplesRendered, p_output ); #endif } +#endif +#ifdef API_5MS + { + st_ivas->hTcBuffer->subframes_rendered++; + } #endif } } @@ -943,6 +953,9 @@ ivas_error ivas_jbm_dec_render( ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); #endif } +#ifdef API_5MS + st_ivas->hTcBuffer->subframes_rendered++; +#endif } else if ( st_ivas->ivas_format == MC_FORMAT ) { @@ -1158,6 +1171,8 @@ ivas_error ivas_jbm_dec_render( #endif ivas_syn_output( p_output, nSamplesRenderedLocal, nchan_out, data + *nSamplesRendered * nchan_out ); *nSamplesRendered += nSamplesRenderedLocal; + + st_ivas->hTcBuffer->subframes_rendered = subframes_rendered+1; } #else #ifdef DEBUGGING -- GitLab From 01319e9f01c6ca6e3e2735bff97465439cda62c3 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 6 Jul 2023 10:36:54 +0200 Subject: [PATCH 044/175] fix EVS decoding --- lib_com/ivas_prot.h | 7 +++++++ lib_dec/ivas_jbm_dec.c | 4 ---- lib_dec/lib_dec.c | 8 ++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 9d7e6b5806..994c6ac747 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -827,6 +827,13 @@ int16_t ivas_jbm_dec_get_num_tc_channels( Decoder_Struct *st_ivas /* i : IVAS decoder handle */ ); +#ifdef API_5MS +void ivas_jbm_dec_copy_tc_no_tsm( + Decoder_Struct *st_ivas, + float *tc[], + const int16_t output_frame ); +#endif + #ifdef FIX_470_MASA_JBM_EXT void ivas_jbm_dec_get_md_map_even_spacing( const int16_t default_len, /* i : default frame length in metadata slots */ diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index e5c6955bcf..d40cc7c1df 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -60,10 +60,6 @@ static void ivas_jbm_dec_copy_masa_meta_to_buffer( Decoder_Struct *st_ivas ); static void ivas_jbm_masa_sf_to_slot_map( Decoder_Struct *st_ivas, const int16_t nCldfbTs ); #endif -#ifdef API_5MS -static void ivas_jbm_dec_copy_tc_no_tsm( Decoder_Struct *st_ivas, float *tc[], const int16_t output_frame ); -#endif - /*--------------------------------------------------------------------------* * ivas_jbm_dec_tc() * diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index d33c55deff..8581b4cb46 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -3259,6 +3259,14 @@ static ivas_error evs_dec_main( v_multc( output[0], mixer_left, output[0], nOutSamples ); } + +#ifdef API_5MS + if ( !st_ivas->hDecoderConfig->tsm_active ) + { + ivas_jbm_dec_copy_tc_no_tsm( st_ivas, p_output, nOutSamples ); + } + else +#endif if ( floatBuf != NULL ) { /* BE workaround */ -- GitLab From 4eabe5a3268b4f0620529424934a0cbc235ef18b Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Fri, 7 Jul 2023 08:10:22 +0200 Subject: [PATCH 045/175] fix ParamISM tx energy adjustment, fix tc offsets --- lib_com/ivas_prot.h | 9 ++++ lib_dec/ivas_ism_param_dec.c | 90 ++++++++++++++++++++++++++++++++++-- lib_dec/ivas_jbm_dec.c | 18 +++----- 3 files changed, 103 insertions(+), 14 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 994c6ac747..95b5a28cad 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -1074,6 +1074,15 @@ void ivas_param_ism_dec_digest_tc( float *transport_channels_f[] /* i : synthesized core-coder transport channels/DirAC output */ ); +#ifdef API_5MS +void ivas_ism_param_dec_tc_gain_ajust( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const uint16_t nSamples, /* i : number of samples to be compensate */ + const uint16_t nFadeLength, /* i : length of the crossfade in samples */ + float *transport_channels_f[] /* i : synthesized core-coder transport channels/DirAC output */ +); +#endif + void ivas_param_ism_dec_render( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 22c5822f30..1172ef536f 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -748,8 +748,12 @@ void ivas_param_ism_dec( int32_t ivas_total_brate; #ifdef FIX_549_DMX_GAIN int16_t output_frame; +#ifndef API_5MS float gain, ene_tc, ene_sum, grad; float last_gain; +#else + float *p_tc[PARAM_ISM_MAX_DMX]; +#endif #endif float ref_power[CLDFB_NO_CHANNELS_MAX]; float cx_diag[CLDFB_NO_CHANNELS_MAX][PARAM_ISM_MAX_DMX]; @@ -775,9 +779,16 @@ void ivas_param_ism_dec( hDirAC = st_ivas->hDirAC; assert( hDirAC ); #ifdef FIX_549_DMX_GAIN +#ifdef API_5MS + for ( i = 0; i < PARAM_ISM_MAX_DMX; i++ ) + { + p_tc[i] = output_f[i]; + } +#else ene_tc = 0.0f; ene_sum = 0.0f; last_gain = st_ivas->hDirAC->hParamIsm->last_dmx_gain; +#endif output_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); #endif @@ -862,7 +873,9 @@ void ivas_param_ism_dec( } } } - +#ifdef API_5MS + ivas_ism_param_dec_tc_gain_ajust( st_ivas, output_frame, output_frame / 2, p_tc ); +#else #ifdef FIX_549_DMX_GAIN /* Energy Compensation */ for ( i = 0; i < output_frame; i++ ) @@ -898,7 +911,7 @@ void ivas_param_ism_dec( } st_ivas->hDirAC->hParamIsm->last_dmx_gain = gain; #endif - +#endif for ( ch = 0; ch < nchan_transport; ch++ ) { /*-----------------------------------------------------------------* @@ -1114,10 +1127,12 @@ void ivas_param_ism_dec_digest_tc( int16_t ch, nchan_transport, nchan_out, nchan_out_woLFE, i; int16_t slot_idx, bin_idx; int32_t ivas_total_brate; +#ifndef API_5MS #ifdef FIX_549_DMX_GAIN int16_t output_frame; float gain, ene_tc, ene_sum, grad; float last_gain; +#endif #endif float ref_power[CLDFB_NO_CHANNELS_MAX]; float cx_diag[CLDFB_NO_CHANNELS_MAX][PARAM_ISM_MAX_DMX]; @@ -1128,11 +1143,13 @@ void ivas_param_ism_dec_digest_tc( /* Initialization */ hDirAC = st_ivas->hDirAC; assert( hDirAC ); +#ifndef API_5MS #ifdef FIX_549_DMX_GAIN ene_tc = 0.0f; ene_sum = 0.0f; last_gain = st_ivas->hDirAC->hParamIsm->last_dmx_gain; output_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); +#endif #endif nchan_transport = st_ivas->nchan_transport; @@ -1219,7 +1236,12 @@ void ivas_param_ism_dec_digest_tc( } } } - +#ifdef API_5MS + if ( st_ivas->hDecoderConfig->tsm_active ) + { + ivas_ism_param_dec_tc_gain_ajust( st_ivas, nCldfbSlots * st_ivas->hDirAC->num_freq_bands, (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( 2 * FRAMES_PER_SEC ) ), transport_channels_f ); + } +#else #ifdef FIX_549_DMX_GAIN /* Energy Compensation */ for ( i = 0; i < output_frame; i++ ) @@ -1254,6 +1276,7 @@ void ivas_param_ism_dec_digest_tc( } } st_ivas->hDirAC->hParamIsm->last_dmx_gain = gain; +#endif #endif for ( ch = 0; ch < nchan_transport; ch++ ) @@ -1298,6 +1321,67 @@ void ivas_param_ism_dec_digest_tc( } +#ifdef API_5MS +/*-------------------------------------------------------------------------* + * ivas_ism_param_dec_tc_gain_ajust() + * + * + *-------------------------------------------------------------------------*/ + +void ivas_ism_param_dec_tc_gain_ajust( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const uint16_t nSamples, /* i : number of samples to be compensate */ + const uint16_t nFadeLength, /* i : length of the crossfade in samples */ + float *transport_channels_f[] /* i : synthesized core-coder transport channels/DirAC output */ +) + +{ + int16_t i; + float gain, ene_tc, ene_sum, grad; + float last_gain; + + ene_tc = 0.0f; + ene_sum = 0.0f; + last_gain = st_ivas->hDirAC->hParamIsm->last_dmx_gain; + + + for ( i = 0; i < nSamples; i++ ) + { + ene_tc += transport_channels_f[0][i] * transport_channels_f[0][i] + transport_channels_f[1][i] * transport_channels_f[1][i]; // L*L + R*R + ene_sum += ( transport_channels_f[0][i] + transport_channels_f[1][i] ) * ( transport_channels_f[0][i] + transport_channels_f[1][i] ); // (L+R)*(L+R) + } + gain = sqrtf( ene_tc / ( ene_sum + EPSILON ) ); + if ( st_ivas->hSCE[0]->hCoreCoder[0]->ini_frame > 1 ) + { + /* Smoothing */ + gain = 0.75f * gain + 0.25f * last_gain; + /* 10ms ramp */ + grad = ( gain - last_gain ) / (float) nFadeLength; /* slope between two consecutive gains, 480 samples length */ + for ( i = 0; i < ( nFadeLength ); i++ ) + { + transport_channels_f[0][i] *= ( last_gain + i * grad ); + transport_channels_f[1][i] *= ( last_gain + i * grad ); + } + for ( ; i < nSamples; i++ ) + { + transport_channels_f[0][i] *= gain; + transport_channels_f[1][i] *= gain; + } + } + else + { + for ( i = 0; i < nSamples; i++ ) + { + transport_channels_f[0][i] *= gain; + transport_channels_f[1][i] *= gain; + } + } + st_ivas->hDirAC->hParamIsm->last_dmx_gain = gain; + + return; +} +#endif + /*-------------------------------------------------------------------------* * ivas_ism_param_dec_render_sf() * diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index d40cc7c1df..ee98db24ee 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -776,8 +776,8 @@ ivas_error ivas_jbm_dec_render( pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f; pan_right = 1.f - pan_left; #ifdef API_5MS - v_multc( st_ivas->hTcBuffer->tc[0], pan_right, output[1], nSamplesRenderedLocal ); - v_multc( st_ivas->hTcBuffer->tc[0], pan_left, output[0], nSamplesRenderedLocal ); + v_multc( p_tc[0], pan_right, output[1], nSamplesRenderedLocal ); + v_multc( p_tc[0], pan_left, output[0], nSamplesRenderedLocal ); #else v_multc( st_ivas->hTcBuffer->tc[0], pan_right, output[1], *nSamplesRendered ); v_multc( st_ivas->hTcBuffer->tc[0], pan_left, output[0], *nSamplesRendered ); @@ -827,8 +827,8 @@ ivas_error ivas_jbm_dec_render( pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f; pan_right = 1.f - pan_left; #ifdef API_5MS - v_multc( st_ivas->hTcBuffer->tc[0], pan_right, output[1], nSamplesRenderedLocal ); - v_multc( st_ivas->hTcBuffer->tc[0], pan_left, output[0], nSamplesRenderedLocal ); + v_multc( p_tc[0], pan_right, output[1], nSamplesRenderedLocal ); + v_multc( p_tc[0], pan_left, output[0], nSamplesRenderedLocal ); #else v_multc( st_ivas->hTcBuffer->tc[0], pan_right, output[1], *nSamplesRendered ); v_multc( st_ivas->hTcBuffer->tc[0], pan_left, output[0], *nSamplesRendered ); @@ -884,11 +884,6 @@ ivas_error ivas_jbm_dec_render( ivas_binaural_cldfb_sf( st_ivas, *nSamplesRendered, p_output ); #endif } -#endif -#ifdef API_5MS - { - st_ivas->hTcBuffer->subframes_rendered++; - } #endif } } @@ -987,7 +982,7 @@ ivas_error ivas_jbm_dec_render( return error; } #ifdef API_5MS - ivas_binaural_add_LFE( st_ivas, nSamplesRenderedLocal, st_ivas->hTcBuffer->tc, p_output ); + ivas_binaural_add_LFE( st_ivas, nSamplesRenderedLocal, p_tc, p_output ); #else ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, st_ivas->hTcBuffer->tc, p_output ); #endif @@ -1021,7 +1016,7 @@ ivas_error ivas_jbm_dec_render( return error; } #ifdef API_5MS - ivas_binaural_add_LFE( st_ivas, nSamplesRenderedLocal, st_ivas->hTcBuffer->tc, p_output ); + ivas_binaural_add_LFE( st_ivas, nSamplesRenderedLocal, p_tc, p_output ); #else ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, st_ivas->hTcBuffer->tc, p_output ); #endif @@ -2265,6 +2260,7 @@ void ivas_jbm_dec_copy_tc_no_tsm( cldfb_real_buffer = st_ivas->hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc; cldfb_imag_buffer = st_ivas->hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc; num_freq_bands = st_ivas->hDirAC->num_freq_bands; + ivas_ism_param_dec_tc_gain_ajust( st_ivas, output_frame, output_frame / 2, tc ); } else if ( st_ivas->ivas_format == MC_FORMAT ) { -- GitLab From 1dd207fb4b84d7428b2eac9cd5369c63ed6855a8 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Fri, 7 Jul 2023 11:14:12 +0200 Subject: [PATCH 046/175] Move second step mem optim (renderer output channels buffer size) since it is expected to be non-BE to selection test (cause: different limiting). Add NONBE_FIX_589_JBM_TC_OFFSETS purely for BE check. Add DISABLE_LIMITER switch to be able to better check BE. --- lib_com/options.h | 6 +- lib_dec/ivas_dec.c | 3 +- lib_dec/ivas_jbm_dec.c | 127 +++++++++++++++++++++++++---------------- 3 files changed, 84 insertions(+), 52 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 34ad115fe2..e176ad5d3e 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -129,7 +129,7 @@ #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 */ - +/*#define DISABLE_LIMITER*/ #endif /* #################### End DEBUGGING switches ############################ */ @@ -169,7 +169,11 @@ #define FIX_XXX_HEADTRACKER_INIT #define FIX_XXX_TDOBJRENDERER_INPUT #define FIX_XXX_ISM_SBA_ASAN +#define NONBE_FIX_589_JBM_TC_OFFSETS #define API_5MS +#ifdef API_5MS +/*#define JITTER_MEM_OPTIM_RENDERING*/ +#endif /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index f9277264ea..59a800fa5b 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -721,8 +721,9 @@ ivas_error ivas_dec( * - compensation for saturation * - float to integer conversion *----------------------------------------------------------------*/ - +#ifndef DISABLE_LIMITER ivas_limiter_dec( st_ivas->hLimiter, p_output, nchan_out, output_frame, st_ivas->BER_detect ); +#endif #ifdef DEBUGGING st_ivas->noClipping += diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index ee98db24ee..cfa2c3fe1c 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -662,7 +662,7 @@ ivas_error ivas_jbm_dec_render( { int16_t n, nchan_out; int16_t nchan_transport; -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING uint16_t nSamplesRenderedLocal; float output[MAX_OUTPUT_CHANNELS][L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES]; /* 'float' buffer for output synthesis, MAX_OUTPUT_CHANNELS channels */ #else @@ -689,11 +689,11 @@ ivas_error ivas_jbm_dec_render( nchan_out = st_ivas->hDecoderConfig->nchan_out; nchan_transport = st_ivas->hTcBuffer->nchan_transport_jbm; output_config = st_ivas->hDecoderConfig->output_config; -#ifndef API_5MS +#ifndef JITTER_MEM_OPTIM_RENDERING nSamplesAskedLocal = nSamplesAsked + st_ivas->hTcBuffer->n_samples_discard; #endif -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING nSamplesRenderedLocal = 0; *nSamplesRendered = 0; while ( *nSamplesRendered < nSamplesAsked && st_ivas->hTcBuffer->n_samples_available > 0 ) @@ -732,7 +732,7 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->hTcBuffer->tc_buffer_mode == TC_BUFFER_MODE_BUFFER ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING ivas_jbm_dec_tc_buffer_playout( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, p_output ); #else ivas_jbm_dec_tc_buffer_playout( st_ivas, nSamplesAskedLocal, nSamplesRendered, p_output ); @@ -743,7 +743,7 @@ ivas_error ivas_jbm_dec_render( /* Rendering */ if ( st_ivas->renderer_type == RENDERER_MC ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, nSamplesRenderedLocal, p_tc, p_output ); st_ivas->hTcBuffer->subframes_rendered++; @@ -760,7 +760,7 @@ ivas_error ivas_jbm_dec_render( { if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, st_ivas->nchan_transport, p_output ); #else ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, st_ivas->nchan_transport, p_output ); @@ -768,24 +768,29 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); #else *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); #endif pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f; pan_right = 1.f - pan_left; -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING v_multc( p_tc[0], pan_right, output[1], nSamplesRenderedLocal ); v_multc( p_tc[0], pan_left, output[0], nSamplesRenderedLocal ); +#else +#ifdef NONBE_FIX_589_JBM_TC_OFFSETS + v_multc( p_tc[0], pan_right, output[1], *nSamplesRendered ); + v_multc( p_tc[0], pan_left, output[0], *nSamplesRendered ); #else v_multc( st_ivas->hTcBuffer->tc[0], pan_right, output[1], *nSamplesRendered ); v_multc( st_ivas->hTcBuffer->tc[0], pan_left, output[0], *nSamplesRendered ); +#endif #endif } else if ( st_ivas->renderer_type == RENDERER_PARAM_ISM || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING ivas_param_ism_dec_render( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, p_output ); #else ivas_param_ism_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); @@ -793,20 +798,20 @@ ivas_error ivas_jbm_dec_render( if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { /* Convert CICP19 -> Ambisonics */ -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, nSamplesRenderedLocal, st_ivas->hOutSetup.ambisonics_order, 0.f ); #else ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); #endif } } -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING st_ivas->hTcBuffer->subframes_rendered++; #endif } else /* ISM_MODE_DISC */ { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); #else *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); @@ -816,7 +821,7 @@ ivas_error ivas_jbm_dec_render( if ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { /* Convert to CICPxx; used also for ISM->CICP19->binaural_room rendering */ -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING ivas_ism_render_sf( st_ivas, p_output, nSamplesRenderedLocal ); #else ivas_ism_render_sf( st_ivas, p_output, *nSamplesRendered ); @@ -826,18 +831,24 @@ ivas_error ivas_jbm_dec_render( { pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f; pan_right = 1.f - pan_left; -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING v_multc( p_tc[0], pan_right, output[1], nSamplesRenderedLocal ); v_multc( p_tc[0], pan_left, output[0], nSamplesRenderedLocal ); #else +#ifdef NONBE_FIX_589_JBM_TC_OFFSETS + v_multc( p_tc[0], pan_right, output[1], *nSamplesRendered ); + v_multc( p_tc[0], pan_left, output[0], *nSamplesRendered ); +#else + v_multc( st_ivas->hTcBuffer->tc[0], pan_right, output[1], *nSamplesRendered ); v_multc( st_ivas->hTcBuffer->tc[0], pan_left, output[0], *nSamplesRendered ); +#endif #endif } else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) { /* Convert to Ambisonics; used also for ISM->HOA3->binaural rendering */ -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING ivas_ism2sba_sf( st_ivas->hTcBuffer->tc, p_output, st_ivas->hIsmRendererData, st_ivas->nchan_transport, nSamplesRenderedLocal, st_ivas->hTcBuffer->n_samples_rendered, st_ivas->hIntSetup.ambisonics_order ); #else ivas_ism2sba_sf( st_ivas->hTcBuffer->tc, p_output, st_ivas->hIsmRendererData, st_ivas->nchan_transport, *nSamplesRendered, st_ivas->hTcBuffer->n_samples_rendered, st_ivas->hIntSetup.ambisonics_order ); @@ -847,7 +858,7 @@ ivas_error ivas_jbm_dec_render( /* Binaural rendering */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING if ( ( ivas_td_binaural_renderer_sf( st_ivas, p_output, nSamplesRenderedLocal ) ) != IVAS_ERR_OK ) #else if ( ( ivas_td_binaural_renderer_sf( st_ivas, p_output, *nSamplesRendered ) ) != IVAS_ERR_OK ) @@ -858,7 +869,7 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, AUDIO_CONFIG_7_1_4, AUDIO_CONFIG_BINAURAL_ROOM_IR, st_ivas->hDecoderConfig, NULL, NULL, NULL, st_ivas->hTcBuffer, p_output, p_output, nSamplesRenderedLocal, output_Fs ) ) != IVAS_ERR_OK ) #else @@ -869,7 +880,7 @@ ivas_error ivas_jbm_dec_render( return error; } -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING ivas_binaural_add_LFE( st_ivas, nSamplesRenderedLocal, p_output, p_output ); #else ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); @@ -878,7 +889,7 @@ ivas_error ivas_jbm_dec_render( #ifdef DEBUGGING else if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING ivas_binaural_cldfb_sf( st_ivas, nSamplesRenderedLocal, p_output ); #else ivas_binaural_cldfb_sf( st_ivas, *nSamplesRendered, p_output ); @@ -894,7 +905,7 @@ ivas_error ivas_jbm_dec_render( /* Loudspeakers, Ambisonics or Binaural rendering */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, nchan_remapped, p_output ); #else ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); @@ -904,21 +915,21 @@ ivas_error ivas_jbm_dec_render( { if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); #else *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); #endif for ( n = 0; n < nchan_remapped; n++ ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING mvr2r( st_ivas->hTcBuffer->tc[n] + st_ivas->hTcBuffer->n_samples_rendered, p_output[n], nSamplesRenderedLocal ); #else mvr2r( st_ivas->hTcBuffer->tc[n] + st_ivas->hTcBuffer->n_samples_rendered, p_output[n], *nSamplesRendered ); #endif } -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING if ( ( error = ivas_sba_linear_renderer( p_output, nSamplesRenderedLocal, nchan_remapped, output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_sba_linear_renderer( p_output, *nSamplesRendered, nchan_remapped, output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ) ) != IVAS_ERR_OK ) @@ -929,7 +940,7 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->renderer_type == RENDERER_DIRAC ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, p_output ); #else ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); @@ -938,13 +949,13 @@ ivas_error ivas_jbm_dec_render( } else /* SBA_MODE_SPAR */ { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, p_output ); #else ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); #endif } -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING st_ivas->hTcBuffer->subframes_rendered++; #endif } @@ -952,14 +963,14 @@ ivas_error ivas_jbm_dec_render( { if ( st_ivas->mc_mode == MC_MODE_MCT ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); #else *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); #endif if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING ivas_mc2sba( st_ivas->hTransSetup, p_tc, p_output, nSamplesRenderedLocal, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); #else ivas_mc2sba( st_ivas->hTransSetup, p_tc, p_output, *nSamplesRendered, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); @@ -969,7 +980,7 @@ ivas_error ivas_jbm_dec_render( /* Rendering */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig, st_ivas->hCombinedOrientationData, &st_ivas->hIntSetup, st_ivas->hEFAPdata, st_ivas->hTcBuffer, p_tc, p_output, nSamplesRenderedLocal, output_Fs ) ) != IVAS_ERR_OK ) @@ -981,15 +992,19 @@ ivas_error ivas_jbm_dec_render( { return error; } -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING ivas_binaural_add_LFE( st_ivas, nSamplesRenderedLocal, p_tc, p_output ); +#else +#ifdef NONBE_FIX_589_JBM_TC_OFFSETS + ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_tc, p_output ); #else ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, st_ivas->hTcBuffer->tc, p_output ); +#endif #endif } else if ( st_ivas->renderer_type == RENDERER_MC ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, nSamplesRenderedLocal, p_tc, p_output ); #else @@ -999,7 +1014,7 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING ivas_mc2sba( st_ivas->hIntSetup, p_tc, p_output, nSamplesRenderedLocal, st_ivas->hOutSetup.ambisonics_order, 0.f ); #else ivas_mc2sba( st_ivas->hIntSetup, p_tc, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); @@ -1007,7 +1022,7 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING if ( ( ivas_td_binaural_renderer_sf( st_ivas, p_output, nSamplesRenderedLocal ) ) != IVAS_ERR_OK ) #else if ( ( ivas_td_binaural_renderer_sf( st_ivas, p_output, *nSamplesRendered ) ) != IVAS_ERR_OK ) @@ -1015,16 +1030,20 @@ ivas_error ivas_jbm_dec_render( { return error; } -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING ivas_binaural_add_LFE( st_ivas, nSamplesRenderedLocal, p_tc, p_output ); +#else +#ifdef NONBE_FIX_589_JBM_TC_OFFSETS + ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_tc, p_output ); #else ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, st_ivas->hTcBuffer->tc, p_output ); +#endif #endif } } else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING ivas_param_mc_dec_render( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, p_output ); #else ivas_param_mc_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); @@ -1035,11 +1054,18 @@ ivas_error ivas_jbm_dec_render( { /* zero output for now, not yet implemented... */ int16_t ch; +#ifdef JITTER_MEM_OPTIM_RENDERING nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); - +#else + *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAsked ); +#endif for ( ch = 0; ch < nchan_out; ch++ ) { +#ifdef JITTER_MEM_OPTIM_RENDERING set_zero( p_output[ch], nSamplesRenderedLocal ); +#else + set_zero( p_output[ch], *nSamplesRendered ); +#endif } } #endif @@ -1050,7 +1076,7 @@ ivas_error ivas_jbm_dec_render( if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, nchan_remapped, p_output ); #else ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); @@ -1058,7 +1084,7 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->renderer_type == RENDERER_DIRAC || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) /* rendering to CICPxx and Ambisonics */ { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, p_output ); #else ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); @@ -1068,13 +1094,13 @@ ivas_error ivas_jbm_dec_render( /* we still need to copy the separate channel if available */ if ( st_ivas->hOutSetup.separateChannelEnabled ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], nSamplesRenderedLocal ); #else mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); #endif } -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, nSamplesRenderedLocal, st_ivas->hOutSetup.ambisonics_order, 0.f ); #else ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); @@ -1084,7 +1110,7 @@ ivas_error ivas_jbm_dec_render( { for ( n = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; n < st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe; n++ ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING set_zero( output[n], nSamplesRenderedLocal ); #else set_zero( output[n], *nSamplesRendered ); @@ -1100,7 +1126,7 @@ ivas_error ivas_jbm_dec_render( output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1_4 || output_config == AUDIO_CONFIG_5_1_2 || ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe > 0 ) ) { -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL] + offset, output[LFE_CHANNEL], nSamplesRenderedLocal ); mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], nSamplesRenderedLocal ); #else @@ -1111,7 +1137,7 @@ ivas_error ivas_jbm_dec_render( else if ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe == 0 ) { /* Delay the separated channel to sync with the DirAC rendering */ -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], nSamplesRenderedLocal ); #else mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); @@ -1127,7 +1153,7 @@ ivas_error ivas_jbm_dec_render( * - float to integer conversion *----------------------------------------------------------------*/ -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING st_ivas->hTcBuffer->n_samples_available -= nSamplesRenderedLocal; st_ivas->hTcBuffer->n_samples_rendered += nSamplesRenderedLocal; #else @@ -1141,7 +1167,7 @@ ivas_error ivas_jbm_dec_render( { p_output[n] += st_ivas->hTcBuffer->n_samples_discard; } -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING nSamplesRenderedLocal -= st_ivas->hTcBuffer->n_samples_discard; #else *nSamplesRendered -= st_ivas->hTcBuffer->n_samples_discard; @@ -1149,21 +1175,22 @@ ivas_error ivas_jbm_dec_render( st_ivas->hTcBuffer->n_samples_discard = 0; } -#ifdef API_5MS +#ifndef DISABLE_LIMITER +#ifdef JITTER_MEM_OPTIM_RENDERING ivas_limiter_dec( st_ivas->hLimiter, p_output, nchan_out, nSamplesRenderedLocal, st_ivas->BER_detect ); #else - ivas_limiter_dec( st_ivas->hLimiter, p_output, nchan_out, *nSamplesRendered, st_ivas->BER_detect ); + ivas_limiter_dec( st_ivas->hLimiter, p_output, nchan_out, *nSamplesRendered, st_ivas->BER_detect ); +#endif #endif - -#ifdef API_5MS +#ifdef JITTER_MEM_OPTIM_RENDERING #ifdef DEBUGGING st_ivas->noClipping += #endif ivas_syn_output( p_output, nSamplesRenderedLocal, nchan_out, data + *nSamplesRendered * nchan_out ); *nSamplesRendered += nSamplesRenderedLocal; - st_ivas->hTcBuffer->subframes_rendered = subframes_rendered+1; + st_ivas->hTcBuffer->subframes_rendered = subframes_rendered + 1; } #else #ifdef DEBUGGING -- GitLab From 1a9fd9fa8b097bd9c7fd4b2679d705f5854ec3be Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Tue, 11 Jul 2023 09:28:49 +0200 Subject: [PATCH 047/175] correct size of ParamMC cldfb buffers for non-TSM mode --- lib_com/options.h | 2 +- lib_dec/ivas_jbm_dec.c | 9 +++------ lib_dec/ivas_mc_param_dec.c | 22 +++++++++++++++++++++- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index e176ad5d3e..d195e3aa11 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -172,7 +172,7 @@ #define NONBE_FIX_589_JBM_TC_OFFSETS #define API_5MS #ifdef API_5MS -/*#define JITTER_MEM_OPTIM_RENDERING*/ +#define JITTER_MEM_OPTIM_RENDERING #endif /* ################## End DEVELOPMENT switches ######################### */ diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index cfa2c3fe1c..f9a83d0b6f 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -65,14 +65,13 @@ static void ivas_jbm_masa_sf_to_slot_map( Decoder_Struct *st_ivas, const int16_t * * Principal IVAS JBM decoder routine, decoding of metadata and transport channels *--------------------------------------------------------------------------*/ - ivas_error ivas_jbm_dec_tc( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - float *data /* o : transport channel signals */ + float *data /* o : transport channel signals */ ) { int16_t n, output_frame, nchan_out; - Decoder_State *st; /* used for bitstream handling */ + Decoder_State *st; /* used for bitstream handling */ float output[MAX_TRANSPORT_CHANNELS][L_FRAME48k]; /* 'float' buffer for transport channels, MAX_TRANSPORT_CHANNELS channels */ int16_t nchan_remapped, hodirac_flag; float output_lfe_ch[L_FRAME48k]; @@ -81,7 +80,6 @@ ivas_error ivas_jbm_dec_tc( AUDIO_CONFIG output_config; ivas_error error; float *p_output[MAX_TRANSPORT_CHANNELS]; - error = IVAS_ERR_OK; push_wmops( "ivas_jbm_dec_tc" ); @@ -112,7 +110,7 @@ ivas_error ivas_jbm_dec_tc( /* zero output when first frame(s) is lost */ for ( n = 0; n < nchan_out; n++ ) { - set_f( output[n], 0.0f, output_frame ); + set_f( p_output[n], 0.0f, output_frame ); } #ifdef DEBUG_MODE_INFO @@ -125,7 +123,6 @@ ivas_error ivas_jbm_dec_tc( else if ( st_ivas->ivas_format == STEREO_FORMAT ) { st_ivas->hCPE[0]->element_brate = ivas_total_brate; - if ( ( error = ivas_cpe_dec( st_ivas, 0, output, output_frame, 0 ) ) != IVAS_ERR_OK ) { return error; diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index 6fe970d227..f69dd372bc 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -465,6 +465,26 @@ ivas_error ivas_param_mc_dec_open( if ( st_ivas->hDecoderConfig->voip_active && hParamMC->synthesis_conf != PARAM_MC_SYNTH_MONO_STEREO ) #endif { +#ifdef API_5MS + int16_t n_cldfb_slots; + + n_cldfb_slots = DEFAULT_JBM_CLDFB_TIMESLOTS; + if ( st_ivas->hDecoderConfig->tsm_active ) + { + n_cldfb_slots = MAX_JBM_CLDFB_TIMESLOTS; + } + if ( ( hParamMC->Cldfb_RealBuffer_tc = (float *) malloc( n_cldfb_slots * nchan_transport * hParamMC->num_freq_bands * sizeof( float ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Parametric MC JBM\n" ) ); + } + set_zero( hParamMC->Cldfb_RealBuffer_tc, n_cldfb_slots * nchan_transport * hParamMC->num_freq_bands ); + + if ( ( hParamMC->Cldfb_ImagBuffer_tc = (float *) malloc( n_cldfb_slots * nchan_transport * hParamMC->num_freq_bands * sizeof( float ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Parametric MC JBM\n" ) ); + } + set_zero( hParamMC->Cldfb_ImagBuffer_tc, n_cldfb_slots * nchan_transport * hParamMC->num_freq_bands ); +#else if ( ( hParamMC->Cldfb_RealBuffer_tc = (float *) malloc( MAX_JBM_CLDFB_TIMESLOTS * nchan_transport * hParamMC->num_freq_bands * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Parametric MC JBM\n" ) ); @@ -476,7 +496,7 @@ ivas_error ivas_param_mc_dec_open( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Parametric MC JBM\n" ) ); } set_zero( hParamMC->Cldfb_ImagBuffer_tc, MAX_JBM_CLDFB_TIMESLOTS * nchan_transport * hParamMC->num_freq_bands ); - +#endif if ( st_ivas->hTcBuffer == NULL ) { if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, TC_BUFFER_MODE_RENDERER, nchan_transport, nchan_transport, 0, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ) != IVAS_ERR_OK ) -- GitLab From 6f1a7a0e0a2fb4777a8e5e3b8433498c937f8555 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 12 Jul 2023 17:33:56 +0200 Subject: [PATCH 048/175] Remove unused variable --- lib_rend/lib_rend.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 942b8c546f..3f2609dbf7 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -6579,7 +6579,9 @@ static ivas_error renderActiveInputsMasa( int16_t i; input_masa *pCurrentInput; ivas_error error; +#ifndef LIB_REND_API_5MS int16_t sf_idx; +#endif for ( i = 0, pCurrentInput = hIvasRend->inputsMasa; i < RENDERER_MAX_MASA_INPUTS; ++i, ++pCurrentInput ) { -- GitLab From ca1d6d376aeb1b6591143238a0b4872c901d7c35 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 12 Jul 2023 17:35:36 +0200 Subject: [PATCH 049/175] Fix MSVC warnings --- apps/renderer.c | 4 ++-- lib_rend/lib_rend.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index 73125900c1..e7413a3c58 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1132,7 +1132,7 @@ int main( if ( !args.framing_5ms ) { /* Skip over 3 following head positions - they are given on 5ms grid */ - for ( int16_t i = 0; i < 3; ++i ) + for ( i = 0; i < 3; ++i ) { if ( ( error = HeadRotationFileReading( headRotReader, &headRot, &Pos ) ) != IVAS_ERR_OK ) { @@ -1202,7 +1202,7 @@ int main( if ( !args.framing_5ms ) { /* Skip over 3 following entries in file - they are given on 5ms grid */ - for ( int16_t i = 0; i < 3; ++i ) + for ( i = 0; i < 3; ++i ) { if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &quat, &enableHeadRotation, &enableExternalOrientation, &enableRotationInterpolation, &numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) { diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 3f2609dbf7..7a555c070f 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -4937,7 +4937,7 @@ static int16_t num_subframes_in_buffer( const IVAS_REND_AudioBuffer *buffer, int #ifdef DEBUGGING assert( buffer->config.numSamplesPerChannel % (sampleRate / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES) == 0 ); #endif - return buffer->config.numSamplesPerChannel / (sampleRate / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES); + return (int16_t) ( buffer->config.numSamplesPerChannel / ( sampleRate / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ) ); } #endif -- GitLab From e93e4389c19e8aad317ce5a71f19f156a5cfdf66 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 12 Jul 2023 17:50:58 +0200 Subject: [PATCH 050/175] Remove dbg code --- lib_com/options.h | 1 - lib_debug/debug.h | 19 ------------------- lib_rend/lib_rend.c | 4 ---- 3 files changed, 24 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 1937352fe3..f11d264f7b 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -176,7 +176,6 @@ #define LIB_REND_API_5MS /* FhG: Adds 5ms framing capability to lib_rend */ #endif #define LIB_REND_FIX_HRTFPARAMBIN_MEMLEAK -#define SGI_DBG /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_debug/debug.h b/lib_debug/debug.h index 3cfe128d98..3d59cb00a0 100644 --- a/lib_debug/debug.h +++ b/lib_debug/debug.h @@ -36,9 +36,6 @@ #include "options.h" #include #include -#ifdef SGI_DBG -#include -#endif #ifdef DEBUG_SBA #include "sba_debug.h" #endif @@ -100,22 +97,6 @@ int16_t dbgwrite( const char *const filename #endif ); -#ifdef SGI_DBG -inline static void sgi_dbgwrite( - const float *const buffer, - const int16_t count, - const char *const filename ) -{ - float tmp[960]; - - for ( int i = 0; i < count; ++i ) - { - tmp[i] = buffer[i] / INT16_MAX; - } - - dbgwrite( tmp, sizeof( float ), count, 1, filename ); -} -#endif void dbgwrite_mat_repeat( float *buffer, /* i : write buffer */ diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 7a555c070f..c90c53ad4f 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -5523,10 +5523,6 @@ static ivas_error renderMcToBinaural( { return error; } - -#ifdef SGI_DBG - sgi_dbgwrite( p_tmpRendBuffer[0], outAudio.config.numSamplesPerChannel, "res/p_tmpRendBuffer.pcm" ); -#endif } accumulate2dArrayToBuffer( tmpRendBuffer, &outAudio ); -- GitLab From 6c57c8fd230732e7b5281c9b75d11f7cd61b80d9 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 13 Jul 2023 10:37:09 +0200 Subject: [PATCH 051/175] clang-format --- apps/renderer.c | 8 +-- lib_dec/ivas_jbm_dec.c | 4 +- lib_dec/lib_dec.c | 2 +- lib_rend/ivas_dirac_dec_binaural_functions.c | 3 +- lib_rend/ivas_rotation.c | 4 +- lib_rend/lib_rend.c | 68 ++++++++++---------- 6 files changed, 45 insertions(+), 44 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index e7413a3c58..909bc4a62a 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1142,12 +1142,12 @@ int main( } } #else - IVAS_QUATERNION quatBuffer[RENDERER_HEAD_POSITIONS_PER_FRAME]; + IVAS_QUATERNION quatBuffer[RENDERER_HEAD_POSITIONS_PER_FRAME]; - for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) + for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) + { + if ( ( error = HeadRotationFileReading( headRotReader, &quatBuffer[i], &Pos[i] ) ) != IVAS_ERR_OK ) { - if ( ( error = HeadRotationFileReading( headRotReader, &quatBuffer[i], &Pos[i] ) ) != IVAS_ERR_OK ) - { fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index f9a83d0b6f..71faa7880a 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -67,11 +67,11 @@ static void ivas_jbm_masa_sf_to_slot_map( Decoder_Struct *st_ivas, const int16_t *--------------------------------------------------------------------------*/ ivas_error ivas_jbm_dec_tc( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - float *data /* o : transport channel signals */ + float *data /* o : transport channel signals */ ) { int16_t n, output_frame, nchan_out; - Decoder_State *st; /* used for bitstream handling */ + Decoder_State *st; /* used for bitstream handling */ float output[MAX_TRANSPORT_CHANNELS][L_FRAME48k]; /* 'float' buffer for transport channels, MAX_TRANSPORT_CHANNELS channels */ int16_t nchan_remapped, hodirac_flag; float output_lfe_ch[L_FRAME48k]; diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 8581b4cb46..929365b277 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -3267,7 +3267,7 @@ static ivas_error evs_dec_main( } else #endif - if ( floatBuf != NULL ) + if ( floatBuf != NULL ) { /* BE workaround */ int16_t pcm_buf_local[L_FRAME48k * MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN]; diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index c2761edf79..b93564b7b1 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -444,7 +444,8 @@ void ivas_dirac_dec_binaural( float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ const int16_t nchan_transport /* i : number of transport channels */ #ifdef LIB_REND_API_5MS - ,const int16_t num_subframes /* i : number of subframes to render */ + , + const int16_t num_subframes /* i : number of subframes to render */ #endif ) { diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index ea524b9dae..63061144de 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -997,11 +997,11 @@ ivas_error combine_external_and_head_orientations_rend( ivas_error combine_external_and_head_orientations( #ifdef LIB_REND_API_5MS - IVAS_QUATERNION *headRotQuaternion, /* i : quaternion for head rotation */ + IVAS_QUATERNION *headRotQuaternion, /* i : quaternion for head rotation */ #else IVAS_QUATERNION *headRotQuaternions, /* i : quaternions for head rotation */ #endif - IVAS_VECTOR3 *listenerPos, /* i : listener position */ + IVAS_VECTOR3 *listenerPos, /* i : listener position */ #ifndef API_5MS int16_t numHeadRotQuaternions, /* i : number of head rotation quaternions */ #endif diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index c90c53ad4f..6f301fdc35 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -4114,7 +4114,7 @@ int16_t IVAS_REND_FeedRenderConfig( *-------------------------------------------------------------------*/ ivas_error IVAS_REND_SetHeadRotation( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ #ifdef LIB_REND_API_5MS const IVAS_QUATERNION headRot, /* i : head orientations for next rendering call */ const IVAS_VECTOR3 Pos /* i : listener positions for next rendering call */ @@ -4326,8 +4326,8 @@ ivas_error IVAS_REND_SetReferenceVector( *---------------------------------------------------------------------*/ ivas_error IVAS_REND_SetExternalOrientation( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - IVAS_QUATERNION *orientation, /* i : external orientation data */ + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_QUATERNION *orientation, /* i : external orientation data */ #ifdef LIB_REND_API_5MS int8_t enableHeadRotation, /* i : flag to enable head rotation for this frame */ int8_t enableExternalOrientation, /* i : flag to enable external orientation for this frame */ @@ -4548,8 +4548,8 @@ static void renderBufferChannel( } static ivas_error rotateFrameMc( - IVAS_REND_AudioBuffer inAudio, /* i : Input Audio buffer */ - IVAS_REND_AudioConfig inConfig, /* i : Input Audio config */ + IVAS_REND_AudioBuffer inAudio, /* i : Input Audio buffer */ + IVAS_REND_AudioConfig inConfig, /* i : Input Audio config */ #ifdef LIB_REND_API_5MS const LSSETUP_CUSTOM_STRUCT *pInCustomLs, /* i : Input Custom LS setup */ #else @@ -4649,7 +4649,7 @@ static ivas_error rotateFrameMc( /* fix compiling only, ToDo adapt ext renderer to 5ms */ Rmat[i][j] = ( *hCombinedOrientationData )->Rmat[i][j]; #else - Rmat[i][j] = ( *hCombinedOrientationData )->Rmat[subframe_idx][i][j]; + Rmat[i][j] = ( *hCombinedOrientationData )->Rmat[subframe_idx][i][j]; #endif } } @@ -4712,16 +4712,16 @@ static ivas_error rotateFrameMc( readPtr++; } #else - writePtr = getSmplPtr( outAudio, ch_out, subframe_idx * subframe_len ); - readPtr = getSmplPtr( inAudio, ch_in, subframe_idx * subframe_len ); - /* crossfade with previous rotation gains */ - for ( i = 0; i < subframe_len; i++ ) - { - *writePtr++ += - ( *readPtr ) * ( ( 1 - headRotData->crossfade[i] ) * gains_prev[ch_in][ch_out] ) + - ( *readPtr ) * ( headRotData->crossfade[i] * gains[ch_in][ch_out] ); - readPtr++; - } + writePtr = getSmplPtr( outAudio, ch_out, subframe_idx * subframe_len ); + readPtr = getSmplPtr( inAudio, ch_in, subframe_idx * subframe_len ); + /* crossfade with previous rotation gains */ + for ( i = 0; i < subframe_len; i++ ) + { + *writePtr++ += + ( *readPtr ) * ( ( 1 - headRotData->crossfade[i] ) * gains_prev[ch_in][ch_out] ) + + ( *readPtr ) * ( headRotData->crossfade[i] * gains[ch_in][ch_out] ); + readPtr++; + } #endif } } @@ -4808,7 +4808,7 @@ static ivas_error rotateFrameSba( /* fix compilation only, ToDo adapt ext renderer to 5ms */ Rmat[i][l] = ( *hCombinedOrientationData )->Rmat[i][l]; #else - Rmat[i][l] = ( *hCombinedOrientationData )->Rmat[subframe_idx][i][l]; + Rmat[i][l] = ( *hCombinedOrientationData )->Rmat[subframe_idx][i][l]; #endif } } @@ -4826,7 +4826,7 @@ static ivas_error rotateFrameSba( #ifdef LIB_REND_API_5MS for ( i = 0; i < inAudio.config.numSamplesPerChannel; i++ ) #else - for ( i = 0; i < subframe_len; i++ ) + for ( i = 0; i < subframe_len; i++ ) #endif { /* As the rotation matrix becomes block diagonal in a SH basis, we can*/ @@ -4850,10 +4850,10 @@ static ivas_error rotateFrameSba( tmpRot[n - m1] += crossfade[i] * gains[n][m] * ( *readPtr ) + ( 1 - crossfade[i] ) * gains_prev[n][m] * ( *readPtr ); #else - readPtr = getSmplPtr( inAudio, m, subframe_idx * subframe_len + i ); - /* crossfade with previous rotation gains */ - tmpRot[n - m1] += headRotData->crossfade[i] * gains[n][m] * ( *readPtr ) + - ( 1 - headRotData->crossfade[i] ) * gains_prev[n][m] * ( *readPtr ); + readPtr = getSmplPtr( inAudio, m, subframe_idx * subframe_len + i ); + /* crossfade with previous rotation gains */ + tmpRot[n - m1] += headRotData->crossfade[i] * gains[n][m] * ( *readPtr ) + + ( 1 - headRotData->crossfade[i] ) * gains_prev[n][m] * ( *readPtr ); #endif } } @@ -4863,7 +4863,7 @@ static ivas_error rotateFrameSba( #ifdef LIB_REND_API_5MS writePtr = getSmplPtr( outAudio, n, i ); #else - writePtr = getSmplPtr( outAudio, n, subframe_idx * subframe_len + i ); + writePtr = getSmplPtr( outAudio, n, subframe_idx * subframe_len + i ); #endif ( *writePtr ) = tmpRot[n - m1]; } @@ -4935,7 +4935,7 @@ static ivas_error renderIsmToBinaural( static int16_t num_subframes_in_buffer( const IVAS_REND_AudioBuffer *buffer, int32_t sampleRate ) { #ifdef DEBUGGING - assert( buffer->config.numSamplesPerChannel % (sampleRate / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES) == 0 ); + assert( buffer->config.numSamplesPerChannel % ( sampleRate / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ) == 0 ); #endif return (int16_t) ( buffer->config.numSamplesPerChannel / ( sampleRate / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ) ); } @@ -5016,13 +5016,13 @@ static ivas_error renderIsmToBinauralRoom( } } #else - if ( hCombinedOrientationData != NULL && ( *hCombinedOrientationData )->enableCombinedOrientation[subframe_idx] ) + if ( hCombinedOrientationData != NULL && ( *hCombinedOrientationData )->enableCombinedOrientation[subframe_idx] ) + { + for ( j = 0; j < 3; j++ ) { - for ( j = 0; j < 3; j++ ) - { - Rmat[i][j] = ( *hCombinedOrientationData )->Rmat[subframe_idx][i][j]; - } + Rmat[i][j] = ( *hCombinedOrientationData )->Rmat[subframe_idx][i][j]; } + } #endif else { @@ -6321,10 +6321,10 @@ static void renderMasaToMc( } else { - ivas_dirac_dec( masaInput->decDummy, tmpBuffer, masaInput->base.inputBuffer.config.numChannels + ivas_dirac_dec( masaInput->decDummy, tmpBuffer, masaInput->base.inputBuffer.config.numChannels #ifdef LIB_REND_API_5MS - , - num_subframes_in_buffer( &outAudio, *masaInput->base.ctx.pOutSampleRate ) + , + num_subframes_in_buffer( &outAudio, *masaInput->base.ctx.pOutSampleRate ) #endif ); } @@ -6345,8 +6345,8 @@ static void renderMasaToSba( ivas_dirac_dec( masaInput->decDummy, tmpBuffer, masaInput->base.inputBuffer.config.numChannels #ifdef LIB_REND_API_5MS - , - num_subframes_in_buffer( &outAudio, *masaInput->base.ctx.pOutSampleRate ) + , + num_subframes_in_buffer( &outAudio, *masaInput->base.ctx.pOutSampleRate ) #endif ); -- GitLab From 080e731b95fc910c3c61ac69f6b00f08f99eab76 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Thu, 13 Jul 2023 17:19:42 +0200 Subject: [PATCH 052/175] Use 5 ms framing in tests with binaural output --- lib_rend/lib_rend.c | 20 ++++++----------- tests/renderer/test_renderer.py | 40 +++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 13 deletions(-) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 6f301fdc35..ef5829806a 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -3820,7 +3820,7 @@ ivas_error IVAS_REND_FeedInputAudio( if ( inputAudio.config.numSamplesPerChannel <= 0 || MAX_BUFFER_LENGTH_PER_CHANNEL < inputAudio.config.numSamplesPerChannel ) { - return IVAS_ERR_INVALID_BUFFER_SIZE; + return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "Buffer size outside of supported range" ); } if ( inputAudio.config.numChannels <= 0 || MAX_INPUT_CHANNELS < inputAudio.config.numChannels ) @@ -3831,8 +3831,7 @@ ivas_error IVAS_REND_FeedInputAudio( if ( getAudioConfigType( hIvasRend->outputConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL && inputAudio.config.numSamplesPerChannel * 1000 != BINAURAL_RENDERING_FRAME_SIZE_MS * hIvasRend->sampleRateOut ) { - /* Binaural rendering requires specific frame size */ - return IVAS_ERR_INVALID_BUFFER_SIZE; + return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "Binaural rendering requires specific frame size" ); } if ( ( error = getInputById( hIvasRend, inputId, (void **) &inputBase ) ) != IVAS_ERR_OK ) @@ -5298,8 +5297,7 @@ static ivas_error renderInputIsm( if ( ismInput->base.numNewSamplesPerChannel != outAudio.config.numSamplesPerChannel ) { - /* Mismatch between the number of input samples vs number of requested output samples - currently not allowed */ - return IVAS_ERR_INVALID_BUFFER_SIZE; + return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "Mismatch between the number of input samples vs number of requested output samples - currently not allowed" ); } ismInput->base.numNewSamplesPerChannel = 0; @@ -5844,8 +5842,7 @@ static ivas_error renderInputMc( if ( mcInput->base.numNewSamplesPerChannel != outAudio.config.numSamplesPerChannel ) { - /* Mismatch between the number of input samples vs number of requested output samples - currently not allowed */ - return IVAS_ERR_INVALID_BUFFER_SIZE; + return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "Mismatch between the number of input samples vs number of requested output samples - currently not allowed" ); } mcInput->base.numNewSamplesPerChannel = 0; @@ -6192,8 +6189,7 @@ static ivas_error renderInputSba( if ( sbaInput->base.numNewSamplesPerChannel != outAudio.config.numSamplesPerChannel ) { - /* Mismatch between the number of input samples vs number of requested output samples - currently not allowed */ - return IVAS_ERR_INVALID_BUFFER_SIZE; + return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "Mismatch between the number of input samples vs number of requested output samples - currently not allowed" ); } sbaInput->base.numNewSamplesPerChannel = 0; @@ -6520,8 +6516,7 @@ static ivas_error renderInputMasa( if ( masaInput->base.numNewSamplesPerChannel != outAudio.config.numSamplesPerChannel ) { - /* Mismatch between the number of input samples vs number of requested output samples - currently not allowed */ - return IVAS_ERR_INVALID_BUFFER_SIZE; + return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "Mismatch between the number of input samples vs number of requested output samples - currently not allowed" ); } masaInput->base.numNewSamplesPerChannel = 0; @@ -6794,8 +6789,7 @@ ivas_error IVAS_REND_GetSamples( if ( getAudioConfigType( hIvasRend->outputConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL && outAudio.config.numSamplesPerChannel * 1000 != BINAURAL_RENDERING_FRAME_SIZE_MS * hIvasRend->sampleRateOut ) { - /* Binaural rendering requires specific frame size */ - return IVAS_ERR_INVALID_BUFFER_SIZE; + return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "Binaural rendering requires specific frame size" ); } /* Check that there is allowed configuration for MASA format output */ diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index beed8e897b..ab759d6d2f 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -44,6 +44,9 @@ def test_ambisonics(test_info, in_fmt, out_fmt, framing_5ms): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): + if not framing_5ms: + pytest.xfail("Binaural output currently only supported with 5ms framing") + run_renderer(in_fmt, out_fmt, framing_5ms=framing_5ms) @@ -52,6 +55,9 @@ def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_ambisonics_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing_5ms): + if not framing_5ms: + pytest.xfail("Binaural output currently only supported with 5ms framing") + run_renderer( in_fmt, out_fmt, @@ -75,10 +81,12 @@ def test_ambisonics_binaural_headrotation_refrotzero( ref_kwargs={ "name_extension": "refrotzero", "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), + "framing_5ms": True, }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), "refrot_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), + "framing_5ms": True, }, ) @@ -95,6 +103,7 @@ def test_ambisonics_binaural_headrotation_refrotequal(test_info, in_fmt, out_fmt out_fmt, ref_kwargs={ "name_extension": "refrotequal", + "framing_5ms": True, }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath( @@ -103,6 +112,7 @@ def test_ambisonics_binaural_headrotation_refrotequal(test_info, in_fmt, out_fmt "refrot_file": HR_TRAJECTORY_DIR.joinpath( "azi_plus_2-ele_plus_2-every-25-rows.csv" ), + "framing_5ms": True, }, ) @@ -124,10 +134,12 @@ def test_ambisonics_binaural_headrotation_refveczero( ref_kwargs={ "name_extension": "refveczero", "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), + "framing_5ms": True, }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath("const000-Vector3.csv"), + "framing_5ms": True, }, ) @@ -149,6 +161,7 @@ def test_ambisonics_binaural_headrotation_refvecequal(test_info, in_fmt, out_fmt out_fmt, ref_kwargs={ "name_extension": "refvecequal", + "framing_5ms": True, }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath( @@ -157,6 +170,7 @@ def test_ambisonics_binaural_headrotation_refvecequal(test_info, in_fmt, out_fmt "refvec_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-Vector3.csv" ), + "framing_5ms": True, }, ) @@ -181,12 +195,14 @@ def test_ambisonics_binaural_headrotation_refvec_rotating(test_info, in_fmt, out "trj_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s.csv" ), + "framing_5ms": True, }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-ccw-Vector3.csv" ), + "framing_5ms": True, }, ) @@ -211,12 +227,14 @@ def test_ambisonics_binaural_headrotation_refvec_rotating_fixed_pos_offset( "trj_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-ccw.csv" ), + "framing_5ms": True, }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-fixed-pos-offset-Vector3.csv" ), + "framing_5ms": True, }, ) @@ -241,10 +259,12 @@ def test_ambisonics_binaural_headrotation_refveclev_vs_refvec( "refveclev_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-Vector3.csv" ), + "framing_5ms": True, }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-4s-Vector3.csv"), + "framing_5ms": True, }, ) @@ -265,6 +285,8 @@ def test_multichannel(test_info, in_fmt, out_fmt, framing_5ms): def test_multichannel_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") + if not framing_5ms: + pytest.xfail("Binaural output currently only supported with 5ms framing") run_renderer(in_fmt, out_fmt, framing_5ms=framing_5ms) @@ -276,6 +298,8 @@ def test_multichannel_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): def test_multichannel_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing_5ms): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") + if not framing_5ms: + pytest.xfail("Binaural output currently only supported with 5ms framing") if (in_fmt == "5_1" or in_fmt == "7_1") and out_fmt == "BINAURAL": run_renderer( @@ -312,12 +336,14 @@ def test_multichannel_binaural_headrotation_refvec_rotating(test_info, in_fmt, o "trj_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s.csv" ), + "framing_5ms": True, }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-ccw-Vector3.csv" ), + "framing_5ms": True, }, ) @@ -336,6 +362,9 @@ def test_ism(test_info, in_fmt, out_fmt, framing_5ms): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_ism_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): + if not framing_5ms: + pytest.xfail("Binaural output currently only supported with 5ms framing") + try: in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] except: @@ -352,6 +381,9 @@ def test_ism_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing_5ms): + if not framing_5ms: + pytest.xfail("Binaural output currently only supported with 5ms framing") + try: in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] except: @@ -397,6 +429,7 @@ def test_ism_binaural_headrotation_refvec_rotating(test_info, in_fmt, out_fmt): "full-circle-with-up-and-down-4s.csv" ), "in_meta_files": in_meta_files, + "framing_5ms": True, }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), @@ -404,6 +437,7 @@ def test_ism_binaural_headrotation_refvec_rotating(test_info, in_fmt, out_fmt): "full-circle-with-up-and-down-4s-ccw-Vector3.csv" ), "in_meta_files": in_meta_files, + "framing_5ms": True, }, ) @@ -450,6 +484,9 @@ def test_custom_ls_input_output(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_custom_ls_input_binaural(test_info, in_layout, out_fmt, framing_5ms): + if not framing_5ms: + pytest.xfail("Binaural output currently only supported with 5ms framing") + run_renderer( CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, @@ -462,6 +499,9 @@ def test_custom_ls_input_binaural(test_info, in_layout, out_fmt, framing_5ms): @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_custom_ls_input_binaural_headrotation(test_info, in_layout, out_fmt, trj_file, framing_5ms): + if not framing_5ms: + pytest.xfail("Binaural output currently only supported with 5ms framing") + run_renderer( CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, -- GitLab From 3e7fec37297bae10ae7e6906151d5c53a46e8ca8 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Mon, 31 Jul 2023 13:02:32 +0200 Subject: [PATCH 053/175] Finish resolving merge conflicts --- lib_rend/ivas_rotation.c | 121 +++++++++++++++----------------------- lib_rend/ivas_stat_rend.h | 10 +--- lib_rend/lib_rend.c | 74 +++++------------------ 3 files changed, 64 insertions(+), 141 deletions(-) diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 9b5fa135ea..c38deff1ef 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -433,16 +433,18 @@ void rotateFrame_shd( /* move Rmat to Rmat_prev */ for ( i = 0; i < 3; i++ ) { -<<<<<<< HEAD + mvr2r( #ifdef API_5MS - mvr2r( hCombinedOrientationData->Rmat[i], hCombinedOrientationData->Rmat_prev[i], 3 ); -======= + hCombinedOrientationData->Rmat[i], +#else + hCombinedOrientationData->Rmat[subframe_idx][i], +#endif #ifdef SPLIT_REND_WITH_HEAD_ROT - mvr2r( hCombinedOrientationData->Rmat[subframe_idx][i], hCombinedOrientationData->Rmat_prev[0][i], 3 ); ->>>>>>> main + hCombinedOrientationData->Rmat_prev[0][i] #else - mvr2r( hCombinedOrientationData->Rmat[subframe_idx][i], hCombinedOrientationData->Rmat_prev[i], 3 ); + hCombinedOrientationData->Rmat_prev[i], #endif + 3 ); } return; @@ -576,16 +578,18 @@ void rotateFrame_sd( /* move Rmat to Rmat_prev */ for ( i = 0; i < 3; i++ ) { -<<<<<<< HEAD + mvr2r( #ifdef API_5MS - mvr2r( hCombinedOrientationData->Rmat[i], hCombinedOrientationData->Rmat_prev[i], 3 ); -======= + hCombinedOrientationData->Rmat[i], +#else + hCombinedOrientationData->Rmat[subframe_idx][i], +#endif #ifdef SPLIT_REND_WITH_HEAD_ROT - mvr2r( hCombinedOrientationData->Rmat[subframe_idx][i], hCombinedOrientationData->Rmat_prev[0][i], 3 ); ->>>>>>> main + hCombinedOrientationData->Rmat_prev[0][i], #else - mvr2r( hCombinedOrientationData->Rmat[subframe_idx][i], hCombinedOrientationData->Rmat_prev[i], 3 ); + hCombinedOrientationData->Rmat_prev[i] #endif + 3 ); } /* copy to output */ @@ -928,7 +932,7 @@ ivas_error ivas_combined_orientation_open( set_zero( ( *hCombinedOrientationData )->Rmat[j], 3 ); ( *hCombinedOrientationData )->Rmat[j][j] = 1.0f; } -#else +#else /* API_5MS */ /* Initialise orientations to identity */ for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { @@ -937,7 +941,7 @@ ivas_error ivas_combined_orientation_open( #ifndef FIX_570_SF_EXT_ORIENTATION ( *hCombinedOrientationData )->Quaternions_prev_headRot[i] = identity; ( *hCombinedOrientationData )->Quaternions_prev_extOrientation[i] = identity; -#endif +#endif /* FIX_570_SF_EXT_ORIENTATION */ ( *hCombinedOrientationData )->listenerPos[i] = origo; for ( j = 0; j < 3; j++ ) @@ -946,9 +950,7 @@ ivas_error ivas_combined_orientation_open( ( *hCombinedOrientationData )->Rmat[i][j][j] = 1.0f; } } -<<<<<<< HEAD -#endif -======= +#endif /* API_5MS */ #ifdef SPLIT_REND_WITH_HEAD_ROT for ( pos_idx = 0; pos_idx < MAX_HEAD_ROT_POSES; pos_idx++ ) { @@ -959,7 +961,6 @@ ivas_error ivas_combined_orientation_open( } } #else ->>>>>>> main for ( j = 0; j < 3; j++ ) { set_zero( ( *hCombinedOrientationData )->Rmat_prev[j], 3 ); @@ -1022,14 +1023,10 @@ ivas_error combine_external_and_head_orientations_dec( COMBINED_ORIENTATION_HANDLE hCombinedOrientationData /* i/o: combined orientation handle */ ) { -<<<<<<< HEAD - IVAS_QUATERNION *headRotQuaternions = NULL; /* TODO(sgi): Rename to "headRotQuaternion" - it's a single value now */ -======= #ifdef SPLIT_REND_WITH_HEAD_ROT IVAS_SPLIT_REND_ROT_AXIS sr_pose_pred_axis; #endif - IVAS_QUATERNION *headRotQuaternions = NULL; ->>>>>>> main + IVAS_QUATERNION *headRotQuaternions = NULL; /* TODO(sgi): Rename to "headRotQuaternion" - it's a single value now */ IVAS_VECTOR3 *listenerPos = NULL; #ifndef API_5MS int16_t numHeadRotQuaternions = 0; @@ -1047,15 +1044,7 @@ ivas_error combine_external_and_head_orientations_dec( headRotQuaternions = hHeadTrackData->Quaternions; listenerPos = hHeadTrackData->Pos; } -<<<<<<< HEAD #endif - } -#ifdef API_5MS - return combine_external_and_head_orientations( headRotQuaternions, listenerPos, hExtOrientationData, hCombinedOrientationData ); -#else - return combine_external_and_head_orientations( headRotQuaternions, listenerPos, numHeadRotQuaternions, hExtOrientationData, hCombinedOrientationData ); -#endif -======= #ifdef SPLIT_REND_WITH_HEAD_ROT sr_pose_pred_axis = hHeadTrackData->sr_pose_pred_axis; #endif @@ -1067,12 +1056,18 @@ ivas_error combine_external_and_head_orientations_dec( } #endif - return combine_external_and_head_orientations( headRotQuaternions, listenerPos, + return combine_external_and_head_orientations( + headRotQuaternions, + listenerPos, #ifdef SPLIT_REND_WITH_HEAD_ROT - sr_pose_pred_axis, + sr_pose_pred_axis, #endif - numHeadRotQuaternions, hExtOrientationData, hCombinedOrientationData ); ->>>>>>> main +#ifndef API_5MS + numHeadRotQuaternions, +#endif + hExtOrientationData, + hCombinedOrientationData, + ); } @@ -1136,20 +1131,18 @@ ivas_error combine_external_and_head_orientations_rend( } #endif } -<<<<<<< HEAD -#ifdef API_5MS - return combine_external_and_head_orientations( headRotQuaternions, listenerPos, hExtOrientationData, hCombinedOrientationData ); -#else - return combine_external_and_head_orientations( headRotQuaternions, listenerPos, numHeadRotQuaternions, hExtOrientationData, hCombinedOrientationData ); -#endif -======= - return combine_external_and_head_orientations( headRotQuaternions, listenerPos, + return combine_external_and_head_orientations( + headRotQuaternions, + listenerPos, #ifdef SPLIT_REND_WITH_HEAD_ROT - sr_pose_pred_axis, + sr_pose_pred_axis, #endif - numHeadRotQuaternions, hExtOrientationData, hCombinedOrientationData ); ->>>>>>> main +#ifndef API_5MS + numHeadRotQuaternions, +#endif + hExtOrientationData, + hCombinedOrientationData ); } @@ -1160,7 +1153,6 @@ ivas_error combine_external_and_head_orientations_rend( * NOTE that the external orientations are inversed. *------------------------------------------------------------------------*/ -<<<<<<< HEAD ivas_error combine_external_and_head_orientations( #ifdef LIB_REND_API_5MS IVAS_QUATERNION *headRotQuaternion, /* i : quaternion for head rotation */ @@ -1168,22 +1160,14 @@ ivas_error combine_external_and_head_orientations( IVAS_QUATERNION *headRotQuaternions, /* i : quaternions for head rotation */ #endif IVAS_VECTOR3 *listenerPos, /* i : listener position */ +#ifdef SPLIT_REND_WITH_HEAD_ROT + IVAS_SPLIT_REND_ROT_AXIS sr_pose_pred_axis, /* i : split rend pose prediction axis*/ +#endif #ifndef API_5MS int16_t numHeadRotQuaternions, /* i : number of head rotation quaternions */ #endif EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, /* i : external orientation handle */ COMBINED_ORIENTATION_HANDLE hCombinedOrientationData /* i/o: combined orientation handle */ -======= -static ivas_error combine_external_and_head_orientations( - IVAS_QUATERNION *headRotQuaternions, /* i : quaternions for head rotation */ - IVAS_VECTOR3 *listenerPos, /* i : listener position */ -#ifdef SPLIT_REND_WITH_HEAD_ROT - IVAS_SPLIT_REND_ROT_AXIS sr_pose_pred_axis, /* i : split rend pose prediction axis*/ -#endif - int16_t numHeadRotQuaternions, /* i : number of head rotation quaternions */ - EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, /* i : external orientation handle */ - COMBINED_ORIENTATION_HANDLE hCombinedOrientationData /* i/o: combined orientation handle */ ->>>>>>> main ) { #ifndef API_5MS @@ -1502,26 +1486,24 @@ static ivas_error combine_external_and_head_orientations( /* Save the current orientations */ if ( hExtOrientationData != NULL ) { -<<<<<<< HEAD #ifdef API_5MS if ( hExtOrientationData->enableExternalOrientation > 0 ) { hCombinedOrientationData->Quaternion_prev_extOrientation = hCombinedOrientationData->Quaternion; -======= -#ifdef FIX_570_SF_EXT_ORIENTATION + } + else + { + hCombinedOrientationData->Quaternion_prev_extOrientation = identity; + } +#elif defined FIX_570_SF_EXT_ORIENTATION /* ToDo: ensure FIX_570_SF_EXT_ORIENTATION is correctly included in API_5MS */ if ( hExtOrientationData->enableExternalOrientation[MAX_PARAM_SPATIAL_SUBFRAMES - 1] > 0 ) { hCombinedOrientationData->Quaternion_prev_extOrientation = hExtOrientationData->Quaternions[MAX_PARAM_SPATIAL_SUBFRAMES - 1]; ->>>>>>> main } else { hCombinedOrientationData->Quaternion_prev_extOrientation = identity; } -<<<<<<< HEAD - -======= ->>>>>>> main #else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { @@ -1748,11 +1730,7 @@ void external_target_interpolation( #endif /* Use the most recent external orientation as the starting orientation */ -<<<<<<< HEAD -#ifdef API_5MS - hCombinedOrientationData->Quaternions_ext_interpolation_start = hCombinedOrientationData->Quaternion_prev_extOrientation; -======= -#ifdef FIX_570_SF_EXT_ORIENTATION +#if defined FIX_570_SF_EXT_ORIENTATION || defined API_5MS if ( hExtOrientationData->enableExternalOrientation[i] == 1 ) { if ( i > 0 ) @@ -1768,7 +1746,6 @@ void external_target_interpolation( { hCombinedOrientationData->Quaternions_ext_interpolation_start = hCombinedOrientationData->Quaternion_frozen_ext; } ->>>>>>> main #else hCombinedOrientationData->Quaternions_ext_interpolation_start = hCombinedOrientationData->Quaternions_prev_extOrientation[i]; #endif diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index 6db0a6445b..d24521e1a5 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -796,11 +796,9 @@ typedef struct IVAS_QUATERNION headPositions[RENDERER_HEAD_POSITIONS_PER_FRAME]; IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; float crossfade[L_FRAME48k / RENDERER_HEAD_POSITIONS_PER_FRAME]; -<<<<<<< HEAD -======= +#endif #ifdef SPLIT_REND_WITH_HEAD_ROT IVAS_SPLIT_REND_ROT_AXIS sr_pose_pred_axis; ->>>>>>> main #endif ivas_orient_trk_state_t *hOrientationTracker; @@ -891,13 +889,10 @@ typedef struct ivas_combined_orientation_struct float Rmat[3][3]; #else float Rmat[MAX_PARAM_SPATIAL_SUBFRAMES][3][3]; -<<<<<<< HEAD #endif -======= #ifdef SPLIT_REND_WITH_HEAD_ROT float Rmat_prev[MAX_HEAD_ROT_POSES][3][3]; #else ->>>>>>> main float Rmat_prev[3][3]; #endif float chEneIIR[2][MASA_FREQUENCY_BANDS]; /* independent of the format. MASA bands are suitable for the task and readily available in ROM. */ @@ -907,9 +902,7 @@ typedef struct ivas_combined_orientation_struct IVAS_VECTOR3 listenerPos; #else IVAS_VECTOR3 listenerPos[MAX_PARAM_SPATIAL_SUBFRAMES]; -<<<<<<< HEAD #endif -======= #ifdef SPLIT_REND_WITH_HEAD_ROT IVAS_SPLIT_REND_ROT_AXIS sr_pose_pred_axis; #endif @@ -917,7 +910,6 @@ typedef struct ivas_combined_orientation_struct IVAS_QUATERNION Quaternion_frozen_head; int8_t isExtOrientationFrozen; int8_t isHeadRotationFrozen; ->>>>>>> main } COMBINED_ORIENTATION_DATA, *COMBINED_ORIENTATION_HANDLE; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 528f09f58f..7236c5d468 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -6108,19 +6108,15 @@ static ivas_error renderIsmToBinauralRoom( if ( ( error = ivas_rend_crendProcess( ismInput->crendWrapper, AUDIO_CONFIG_7_1_4, AUDIO_CONFIG_BINAURAL_ROOM_IR, NULL, NULL, NULL, NULL, p_tmpRendBuffer, *ismInput->base.ctx.pOutSampleRate -<<<<<<< HEAD #ifdef LIB_REND_API_5MS , num_subframes_in_buffer( &outAudio, *ismInput->base.ctx.pOutSampleRate ) #endif - ) ) != IVAS_ERR_OK ) -======= #ifdef SPLIT_REND_WITH_HEAD_ROT , 0 #endif - ) ) != IVAS_ERR_OK ) ->>>>>>> main + ) ) != IVAS_ERR_OK ) { return error; } @@ -6779,20 +6775,15 @@ static ivas_error renderMcToBinaural( /* call CREND */ if ( ( error = ivas_rend_crendProcess( mcInput->crendWrapper, getIvasAudioConfigFromRendAudioConfig( mcInput->base.inConfig ), getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, NULL, NULL, NULL, p_tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate -<<<<<<< HEAD #ifdef LIB_REND_API_5MS , num_subframes_in_buffer( &outAudio, *mcInput->base.ctx.pOutSampleRate ) #endif - ) ) != IVAS_ERR_OK ) -======= #ifdef SPLIT_REND_WITH_HEAD_ROT , 0 #endif - ) ) != IVAS_ERR_OK ) - ->>>>>>> main + ) ) != IVAS_ERR_OK ) { return error; } @@ -6911,19 +6902,15 @@ static ivas_error renderMcToBinauralRoom( /* call CREND */ if ( ( error = ivas_rend_crendProcess( mcInput->crendWrapper, getIvasAudioConfigFromRendAudioConfig( mcInput->base.inConfig ), getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, NULL, NULL, NULL, p_tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate -<<<<<<< HEAD #ifdef LIB_REND_API_5MS , num_subframes_in_buffer( &outAudio, *mcInput->base.ctx.pOutSampleRate ) #endif - ) ) != IVAS_ERR_OK ) -======= #ifdef SPLIT_REND_WITH_HEAD_ROT , 0 #endif - ) ) != IVAS_ERR_OK ) ->>>>>>> main + ) ) != IVAS_ERR_OK ) { return error; } @@ -7038,19 +7025,15 @@ static ivas_error renderMcCustomLsToBinauralRoom( /* call CREND */ if ( ( error = ivas_rend_crendProcess( mcInput->crendWrapper, AUDIO_CONFIG_7_1_4, getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, NULL, NULL, NULL, p_tmpCrendBuffer, *mcInput->base.ctx.pOutSampleRate -<<<<<<< HEAD #ifdef LIB_REND_API_5MS , num_subframes_in_buffer( &outAudio, *mcInput->base.ctx.pOutSampleRate ) #endif - ) ) != IVAS_ERR_OK ) -======= #ifdef SPLIT_REND_WITH_HEAD_ROT , 0 #endif - ) ) != IVAS_ERR_OK ) ->>>>>>> main + ) ) != IVAS_ERR_OK ) { return error; } @@ -7857,7 +7840,11 @@ static ivas_error renderSbaToBinaural( else #endif { -<<<<<<< HEAD + for ( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) + { + p_tmpCrendBuffer[i] = tmpCrendBuffer[i]; + } + #ifdef API_5MS /* fix compiling only, ToDo ext renderer needs to adapted to 5ms */ if ( ( *hCombinedOrientationData )->enableCombinedOrientation != 0 ) @@ -7865,14 +7852,6 @@ static ivas_error renderSbaToBinaural( combinedOrientationEnabled = 1; } #else - for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) -======= - for ( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) ->>>>>>> main - { - p_tmpCrendBuffer[i] = tmpCrendBuffer[i]; - } - hCombinedOrientationData = sbaInput->base.ctx.pCombinedOrientationData; combinedOrientationEnabled = 0; if ( hCombinedOrientationData != NULL ) @@ -7886,11 +7865,7 @@ static ivas_error renderSbaToBinaural( } } } -<<<<<<< HEAD #endif - } -======= ->>>>>>> main /* apply rotation */ if ( combinedOrientationEnabled ) @@ -7927,6 +7902,10 @@ static ivas_error renderSbaToBinaural( /* call CREND */ if ( ( error = ivas_rend_crendProcess( sbaInput->crendWrapper, getIvasAudioConfigFromRendAudioConfig( sbaInput->base.inConfig ), getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, NULL, NULL, NULL, p_tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate +#ifdef LIB_REND_API_5MS + , + num_subframes_in_buffer( &outAudio, *sbaInput->base.ctx.pOutSampleRate ) +#endif #ifdef SPLIT_REND_WITH_HEAD_ROT , 0 @@ -7938,27 +7917,6 @@ static ivas_error renderSbaToBinaural( accumulate2dArrayToBuffer( tmpCrendBuffer, &outAudio ); } -<<<<<<< HEAD - else - { - copyBufferTo2dArray( sbaInput->base.inputBuffer, tmpCrendBuffer ); - } - - /* call CREND */ - if ( ( error = ivas_rend_crendProcess( sbaInput->crendWrapper, getIvasAudioConfigFromRendAudioConfig( sbaInput->base.inConfig ), getIvasAudioConfigFromRendAudioConfig( outConfig ), - NULL, NULL, NULL, NULL, p_tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate -#ifdef LIB_REND_API_5MS - , - num_subframes_in_buffer( &outAudio, *sbaInput->base.ctx.pOutSampleRate ) -#endif - ) ) != IVAS_ERR_OK ) - { - return error; - } - - accumulate2dArrayToBuffer( tmpCrendBuffer, &outAudio ); -======= ->>>>>>> main pop_wmops(); @@ -8060,19 +8018,15 @@ static ivas_error renderSbaToBinauralRoom( /* call CREND */ if ( ( error = ivas_rend_crendProcess( sbaInput->crendWrapper, AUDIO_CONFIG_7_1_4, getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, NULL, NULL, NULL, p_tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate -<<<<<<< HEAD #ifdef LIB_REND_API_5MS , num_subframes_in_buffer( &outAudio, *sbaInput->base.ctx.pOutSampleRate ) #endif - ) ) != IVAS_ERR_OK ) -======= #ifdef SPLIT_REND_WITH_HEAD_ROT , 0 #endif - ) ) != IVAS_ERR_OK ) ->>>>>>> main + ) ) != IVAS_ERR_OK ) { return error; } -- GitLab From b376fb1ca6c0f73a7e456e1f916e643e21c3e8df Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Mon, 31 Jul 2023 15:01:19 +0200 Subject: [PATCH 054/175] Fixing build errors WIP --- lib_dec/ivas_binRenderer_internal.c | 17 +++++++- lib_dec/ivas_ism_param_dec.c | 5 +-- lib_dec/ivas_jbm_dec.c | 2 +- lib_dec/ivas_mc_paramupmix_dec.c | 8 +++- lib_dec/ivas_output_config.c | 14 ++++++- lib_dec/lib_dec.c | 3 +- lib_rend/ivas_crend.c | 31 +++++++++++++++ lib_rend/ivas_objectRenderer.c | 33 ++++++++++++++++ lib_rend/ivas_prot_rend.h | 5 +++ lib_rend/ivas_rotation.c | 15 +++++-- lib_rend/ivas_splitRenderer_utils.c | 9 +++++ lib_rend/ivas_stat_rend.h | 1 + lib_rend/lib_rend.c | 61 +++++++++++++++++++---------- 13 files changed, 171 insertions(+), 33 deletions(-) diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index 259d0b7a91..3f6494b0ff 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -1608,7 +1608,11 @@ void ivas_binRenderer( if ( hCombinedOrientationData && hBinRenderer->rotInCldfb ) { +#ifdef API_5MS + Quaternions_ref = &hCombinedOrientationData->Quaternion; +#else Quaternions_ref = &hCombinedOrientationData->Quaternions[0]; +#endif Quaternions_rel.w = -3.0f; /*euler*/ Quaternions_abs.w = -3.0f; /*euler*/ Quat2EulerDegree( *Quaternions_ref, &Quaternions_abs.z, &Quaternions_abs.y, &Quaternions_abs.x ); /*order in Quat2Euler seems to be reversed ?*/ @@ -1722,9 +1726,10 @@ void ivas_rend_CldfbMultiBinRendProcess( float Cldfb_ImagBuffer_Binaural[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; #endif - +#ifndef API_5MS for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) { +#endif for ( slot_idx = 0; slot_idx < MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ ) { idx = sf_idx * MAX_PARAM_SPATIAL_SUBFRAMES + slot_idx; @@ -1739,12 +1744,18 @@ void ivas_rend_CldfbMultiBinRendProcess( { if ( ( low_res_pre_rend_rot ) && ( pMultiBinPoseData->poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) ) { +#ifdef API_5MS + ( *pCombinedOrientationData )->Quaternion = ( *pCombinedOrientationData )->Quaternion; +#else ( *pCombinedOrientationData )->Quaternions[sf_idx] = ( *pCombinedOrientationData )->Quaternions[0]; +#endif for ( i = 0; i < 3; i++ ) { for ( j = 0; j < 3; j++ ) { - ( *pCombinedOrientationData )->Rmat[sf_idx][i][j] = ( *pCombinedOrientationData )->Rmat[0][i][j]; +#ifdef API_5MS + ( *pCombinedOrientationData )->Rmat[i][j] = ( *pCombinedOrientationData )->Rmat[i][j]; +#endif } } } @@ -1776,7 +1787,9 @@ void ivas_rend_CldfbMultiBinRendProcess( } } } +#ifndef API_5MS } +#endif return; } diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 96558ebc00..97fc604794 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -804,7 +804,6 @@ void ivas_param_ism_dec( // assert( hSpatParamRendCom ); // >>>>>>> main // merged to: -#ifdef FIX_549_DMX_GAIN #ifdef API_5MS for ( i = 0; i < PARAM_ISM_MAX_DMX; i++ ) { @@ -1270,7 +1269,7 @@ void ivas_param_ism_dec_digest_tc( #ifdef API_5MS if ( st_ivas->hDecoderConfig->tsm_active ) { - ivas_ism_param_dec_tc_gain_ajust( st_ivas, nCldfbSlots * st_ivas->hDirAC->num_freq_bands, (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( 2 * FRAMES_PER_SEC ) ), transport_channels_f ); + ivas_ism_param_dec_tc_gain_ajust( st_ivas, nCldfbSlots * hSpatParamRendCom->num_freq_bands, (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( 2 * FRAMES_PER_SEC ) ), transport_channels_f ); } #else #ifdef FIX_549_DMX_GAIN @@ -1330,7 +1329,7 @@ void ivas_param_ism_dec_digest_tc( mvr2r( ImagBuffer, &hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc[slot_idx * hSpatParamRendCom->num_freq_bands * nchan_transport + ch * hSpatParamRendCom->num_freq_bands], hSpatParamRendCom->num_freq_bands ); #ifdef API_5MS } - ivas_param_ism_collect_slot( hDirAC, &hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc[slot_idx * hSpatParamRendCom->num_freq_bands * nchan_transport + ch * hSpatParamRendCom->num_freq_bands], &hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc[slot_idx * hDirAC->num_freq_bands * nchan_transport + ch * hDirAC->num_freq_bands], ch, ref_power, cx_diag ); + ivas_param_ism_collect_slot( hDirAC, &hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc[slot_idx * hSpatParamRendCom->num_freq_bands * nchan_transport + ch * hSpatParamRendCom->num_freq_bands], &hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc[slot_idx * hSpatParamRendCom->num_freq_bands * nchan_transport + ch * hSpatParamRendCom->num_freq_bands], ch, ref_power, cx_diag ); #else ivas_param_ism_collect_slot( hDirAC, RealBuffer, ImagBuffer, ch, ref_power, cx_diag ); #endif diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index dae2deda18..9cc79be379 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -2425,7 +2425,7 @@ void ivas_jbm_dec_copy_tc_no_tsm( { cldfb_real_buffer = st_ivas->hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc; cldfb_imag_buffer = st_ivas->hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc; - num_freq_bands = st_ivas->hDirAC->num_freq_bands; + num_freq_bands = st_ivas->hSpatParamRendCom->num_freq_bands; ivas_ism_param_dec_tc_gain_ajust( st_ivas, output_frame, output_frame / 2, tc ); } else if ( st_ivas->ivas_format == MC_FORMAT ) diff --git a/lib_dec/ivas_mc_paramupmix_dec.c b/lib_dec/ivas_mc_paramupmix_dec.c index 9ae580ae3a..02f663f668 100644 --- a/lib_dec/ivas_mc_paramupmix_dec.c +++ b/lib_dec/ivas_mc_paramupmix_dec.c @@ -491,7 +491,13 @@ ivas_error ivas_mc_paramupmix_dec_open( /* allocate transport channels*/ hMCParamUpmix->free_param_interpolator = 0; hMCParamUpmix->param_interpolator = NULL; - if ( st_ivas->hDecoderConfig->voip_active == 1 && st_ivas->hTcBuffer == NULL ) + if ( +#ifdef API_5MS + st_ivas->hDecoderConfig->tsm_active == 1 +#else + st_ivas->hDecoderConfig->voip_active == 1 +#endif + && st_ivas->hTcBuffer == NULL ) { int16_t nchan_to_allocate; int16_t nchan_tc; diff --git a/lib_dec/ivas_output_config.c b/lib_dec/ivas_output_config.c index abc9a9012d..01dfa0f44a 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -518,7 +518,18 @@ void ivas_set_split_rend_setup( IVAS_DEC_SPLIT_REND_WRAPPER *hSplitBinRend, IVAS if ( ( hCombinedOrientationData != NULL ) && ( hSplitBinRend->splitrend.multiBinPoseData.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) ) { - int16_t sf, i, j; + int16_t i, j; +#ifdef API_5MS + hCombinedOrientationData->Quaternion = hCombinedOrientationData->Quaternion; + for ( i = 0; i < 3; i++ ) + { + for ( j = 0; j < 3; j++ ) + { + hCombinedOrientationData->Rmat[i][j] = hCombinedOrientationData->Rmat[i][j]; + } + } +#else + int16_t sf; for ( sf = 1; sf < MAX_PARAM_SPATIAL_SUBFRAMES; sf++ ) { hCombinedOrientationData->Quaternions[sf] = hCombinedOrientationData->Quaternions[0]; @@ -530,6 +541,7 @@ void ivas_set_split_rend_setup( IVAS_DEC_SPLIT_REND_WRAPPER *hSplitBinRend, IVAS } } } +#endif } return; diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index c1ae75b331..09801c0a62 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1428,8 +1428,6 @@ ivas_error IVAS_DEC_FeedHeadTrackData( for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { /* check for Euler angle signaling */ -#ifdef SPLIT_REND_WITH_HEAD_ROT -#endif { if ( orientation[i].w == -3.0f ) { @@ -1441,6 +1439,7 @@ ivas_error IVAS_DEC_FeedHeadTrackData( hHeadTrackData->Pos[i].y = Pos[i].y; hHeadTrackData->Pos[i].z = Pos[i].z; } +#endif #ifdef SPLIT_REND_WITH_HEAD_ROT hHeadTrackData->num_quaternions = 0; diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index e3396bafe4..6db2a8ccce 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -1829,6 +1829,16 @@ ivas_error ivas_rend_crendProcessSplitBin( combinedOrientationDataLocal = *pCombinedOrientationDataLocal; if ( pMultiBinPoseData->poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) { +#ifdef API_5MS + combinedOrientationDataLocal.Quaternion = combinedOrientationDataLocal.Quaternion; + for ( i = 0; i < 3; i++ ) + { + for ( j = 0; j < 3; j++ ) + { + combinedOrientationDataLocal.Rmat[i][j] = combinedOrientationDataLocal.Rmat[i][j]; + } + } +#else for ( sf = 1; sf < RENDERER_HEAD_POSITIONS_PER_FRAME; ++sf ) { combinedOrientationDataLocal.Quaternions[sf] = combinedOrientationDataLocal.Quaternions[0]; @@ -1840,6 +1850,7 @@ ivas_error ivas_rend_crendProcessSplitBin( } } } +#endif } /* copy LFE to tmpLfeBuffer and apply gain only once */ @@ -1859,6 +1870,18 @@ ivas_error ivas_rend_crendProcessSplitBin( for ( pos_idx = 0; pos_idx < pMultiBinPoseData->num_poses; ++pos_idx ) { /* Update head positions */ +#ifdef API_5MS + IVAS_QUATERNION Quaternion_orig, Quaternion_abs; + Quaternion_orig = combinedOrientationDataLocal.Quaternion; + Quaternion_abs.w = -3.0f; + Quat2EulerDegree( combinedOrientationDataLocal.Quaternion, &Quaternion_abs.z, &Quaternion_abs.y, &Quaternion_abs.x ); /*order in Quat2Euler seems to be reversed ?*/ + + Quaternion_abs.x += pMultiBinPoseData->relative_head_poses[pos_idx][0]; + Quaternion_abs.y += pMultiBinPoseData->relative_head_poses[pos_idx][1]; + Quaternion_abs.z += pMultiBinPoseData->relative_head_poses[pos_idx][2]; + combinedOrientationDataLocal.Quaternion = Quaternion_abs; + QuatToRotMat( combinedOrientationDataLocal.Quaternion, combinedOrientationDataLocal.Rmat ); +#else IVAS_QUATERNION Quaternions_orig[RENDERER_HEAD_POSITIONS_PER_FRAME], Quaternions_abs; for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) { @@ -1872,6 +1895,7 @@ ivas_error ivas_rend_crendProcessSplitBin( combinedOrientationDataLocal.Quaternions[i] = Quaternions_abs; QuatToRotMat( combinedOrientationDataLocal.Quaternions[i], combinedOrientationDataLocal.Rmat[i] ); } +#endif /* render inplace to first two channels of tmpInputBuffer */ pCombinedOrientationDataLocal = &combinedOrientationDataLocal; @@ -1889,6 +1913,9 @@ ivas_error ivas_rend_crendProcessSplitBin( hEFAPdata, p_tmpInputBuffer, output_Fs, +#ifdef API_5MS + 4, +#endif pos_idx ) ) != IVAS_ERR_OK ) { return error; @@ -1914,10 +1941,14 @@ ivas_error ivas_rend_crendProcessSplitBin( } /* restore original headrotation data */ +#ifdef API_5MS + combinedOrientationDataLocal.Quaternion = Quaternion_orig; +#else for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) { combinedOrientationDataLocal.Quaternions[i] = Quaternions_orig[i]; } +#endif } diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 0cb1ae05ac..4cdca32cb0 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -809,7 +809,11 @@ void ObjRenderIvasFrame_splitBinaural( float *p_tmpProcessing[MAX_OUTPUT_CHANNELS]; int16_t pos_idx; +#ifdef API_5MS + IVAS_QUATERNION originalHeadRot; +#else IVAS_QUATERNION originalHeadRot[MAX_PARAM_SPATIAL_SUBFRAMES]; +#endif MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData; BINAURAL_TD_OBJECT_RENDERER_HANDLE tmpTdRendHandle; @@ -837,10 +841,14 @@ void ObjRenderIvasFrame_splitBinaural( } /* Save current head positions */ +#ifdef API_5MS + originalHeadRot = st_ivas->hCombinedOrientationData->Quaternion; +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; ++i ) { originalHeadRot[i] = st_ivas->hCombinedOrientationData->Quaternions[i]; } +#endif /* Copy input audio to a processing buffer. Cannot render in-place because binaurally rendered * audio would overwrite original material, which is still needed for rendering next head pose. */ @@ -854,6 +862,26 @@ void ObjRenderIvasFrame_splitBinaural( /* Update head positions */ if ( pos_idx != 0 ) { +#ifdef API_5MS + if ( originalHeadRot.w == -3.0f ) + { + st_ivas->hCombinedOrientationData->Quaternion.w = -3.0f; + st_ivas->hCombinedOrientationData->Quaternion.x = originalHeadRot.x + pMultiBinPoseData->relative_head_poses[pos_idx][0]; + st_ivas->hCombinedOrientationData->Quaternion.y = originalHeadRot.y + pMultiBinPoseData->relative_head_poses[pos_idx][1]; + st_ivas->hCombinedOrientationData->Quaternion.z = originalHeadRot.z + pMultiBinPoseData->relative_head_poses[pos_idx][2]; + } + else + { + st_ivas->hCombinedOrientationData->Quaternion.w = -3.0f; + Quat2EulerDegree( originalHeadRot, /* TODO tmu : fix bug with ordering*/ + &st_ivas->hCombinedOrientationData->Quaternion.z, + &st_ivas->hCombinedOrientationData->Quaternion.y, + &st_ivas->hCombinedOrientationData->Quaternion.x ); + st_ivas->hCombinedOrientationData->Quaternion.x += pMultiBinPoseData->relative_head_poses[pos_idx][0]; + st_ivas->hCombinedOrientationData->Quaternion.y += pMultiBinPoseData->relative_head_poses[pos_idx][1]; + st_ivas->hCombinedOrientationData->Quaternion.z += pMultiBinPoseData->relative_head_poses[pos_idx][2]; + } +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; ++i ) { if ( originalHeadRot[i].w == -3.0f ) @@ -875,6 +903,7 @@ void ObjRenderIvasFrame_splitBinaural( st_ivas->hCombinedOrientationData->Quaternions[i].z += pMultiBinPoseData->relative_head_poses[pos_idx][2]; } } +#endif } /* Handle the 1 ISM case where there is only one channel in the input buffer */ for ( i = 0; i < max( st_ivas->nchan_transport, BINAURAL_CHANNELS ); ++i ) @@ -916,10 +945,14 @@ void ObjRenderIvasFrame_splitBinaural( } /* Restore original head rotation */ +#ifdef API_5MS + st_ivas->hCombinedOrientationData->Quaternion = originalHeadRot; +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; ++i ) { st_ivas->hCombinedOrientationData->Quaternions[i] = originalHeadRot[i]; } +#endif pop_wmops(); } diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 4c7c142f19..adac6aff17 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -909,7 +909,12 @@ void ivas_SplitRenderer_getdiagdiff( void ivas_split_rend_bitstream_write_int32( ivas_split_rend_bits_t *pBits, int32_t val, int32_t bits ); int32_t ivas_split_rend_bitstream_read_int32( ivas_split_rend_bits_t *pBits, int32_t bits ); IVAS_QUATERNION ivas_split_rend_get_sf_rot_data( +#ifdef API_5MS + /* TODO(splirend): clean up */ + const IVAS_QUATERNION headPositions[1], +#else const IVAS_QUATERNION headPositions[RENDERER_HEAD_POSITIONS_PER_FRAME], +#endif int16_t subframe_idx ); void ivas_rend_closeCldfbRend( CLDFB_REND_WRAPPER *pCldfbRend ); diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index c38deff1ef..e726d9b9ca 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -440,7 +440,7 @@ void rotateFrame_shd( hCombinedOrientationData->Rmat[subframe_idx][i], #endif #ifdef SPLIT_REND_WITH_HEAD_ROT - hCombinedOrientationData->Rmat_prev[0][i] + hCombinedOrientationData->Rmat_prev[0][i], #else hCombinedOrientationData->Rmat_prev[i], #endif @@ -1066,7 +1066,7 @@ ivas_error combine_external_and_head_orientations_dec( numHeadRotQuaternions, #endif hExtOrientationData, - hCombinedOrientationData, + hCombinedOrientationData ); } @@ -1730,7 +1730,16 @@ void external_target_interpolation( #endif /* Use the most recent external orientation as the starting orientation */ -#if defined FIX_570_SF_EXT_ORIENTATION || defined API_5MS +#ifdef API_5MS + if ( hExtOrientationData->enableExternalOrientation == 1 ) + { + hCombinedOrientationData->Quaternions_ext_interpolation_start = hCombinedOrientationData->Quaternion_prev_extOrientation; + } + else if ( hExtOrientationData->enableExternalOrientation == 2 ) + { + hCombinedOrientationData->Quaternions_ext_interpolation_start = hCombinedOrientationData->Quaternion_frozen_ext; + } +#elif defined FIX_570_SF_EXT_ORIENTATION if ( hExtOrientationData->enableExternalOrientation[i] == 1 ) { if ( i > 0 ) diff --git a/lib_rend/ivas_splitRenderer_utils.c b/lib_rend/ivas_splitRenderer_utils.c index b1068054f8..faf62ba946 100644 --- a/lib_rend/ivas_splitRenderer_utils.c +++ b/lib_rend/ivas_splitRenderer_utils.c @@ -315,12 +315,21 @@ void ivas_split_rend_bitstream_write_int32( ivas_split_rend_bits_t *pBits, int32 } IVAS_QUATERNION ivas_split_rend_get_sf_rot_data( +#ifdef API_5MS + const IVAS_QUATERNION headPositions[1], +#else const IVAS_QUATERNION headPositions[RENDERER_HEAD_POSITIONS_PER_FRAME], +#endif int16_t subframe_idx ) { int16_t idx; +#ifdef API_5MS + /* TODO(splitrend): we no longer use subframes. Needs refactoring */ + idx = 0 * subframe_idx; /* tmp change */ +#else idx = ( subframe_idx * RENDERER_HEAD_POSITIONS_PER_FRAME ) / MAX_PARAM_SPATIAL_SUBFRAMES; +#endif return headPositions[idx]; } diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index d24521e1a5..a983c701fc 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -882,6 +882,7 @@ typedef struct ivas_combined_orientation_struct #else IVAS_QUATERNION Quaternions_prev_headRot[MAX_PARAM_SPATIAL_SUBFRAMES]; IVAS_QUATERNION Quaternions_prev_extOrientation[MAX_PARAM_SPATIAL_SUBFRAMES]; +#endif #endif IVAS_QUATERNION Quaternions_ext_interpolation_start; IVAS_QUATERNION Quaternions_ext_interpolation_target; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 7236c5d468..f63b2a6392 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -5527,6 +5527,26 @@ static void renderBufferChannel( return; } +#ifdef API_5MS +static ivas_error chooseCrossfade( const IVAS_REND_HeadRotData *headRotData, int16_t numSamplesPerChannel, const float **pCrossfade ) +{ + if ( numSamplesPerChannel == L_FRAME48k ) + { + *pCrossfade = headRotData->crossfade_20ms; + } + else if ( numSamplesPerChannel == L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES ) + { + *pCrossfade = headRotData->crossfade_5ms; + } + else + { + return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "Only 5 and 20 ms framing is supported" ); + } + + return IVAS_ERR_OK; +} +#endif + static ivas_error rotateFrameMc( IVAS_REND_AudioBuffer inAudio, /* i : Input Audio buffer */ IVAS_REND_AudioConfig inConfig, /* i : Input Audio config */ @@ -5564,17 +5584,9 @@ static ivas_error rotateFrameMc( push_wmops( "rotateFrameMc" ); #ifdef LIB_REND_API_5MS - if ( inAudio.config.numSamplesPerChannel == L_FRAME48k ) - { - crossfade = headRotData->crossfade_20ms; - } - else if ( inAudio.config.numSamplesPerChannel == L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES ) + if ( ( error = chooseCrossfade( headRotData, inAudio.config.numSamplesPerChannel, &crossfade ) ) != IVAS_ERR_OK ) { - crossfade = headRotData->crossfade_5ms; - } - else - { - return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "Only 5 and 20 ms framing is supported" ); + return error; } #endif @@ -5748,17 +5760,9 @@ static ivas_error rotateFrameSba( push_wmops( "rotateFrameSba" ); #ifdef LIB_REND_API_5MS - if ( inAudio.config.numSamplesPerChannel == L_FRAME48k ) - { - crossfade = headRotData->crossfade_20ms; - } - else if ( inAudio.config.numSamplesPerChannel == L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES ) - { - crossfade = headRotData->crossfade_5ms; - } - else + if ( ( error = chooseCrossfade( headRotData, inAudio.config.numSamplesPerChannel, &crossfade ) ) != IVAS_ERR_OK ) { - return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "Only 5 and 20 ms framing is supported" ); + return error; } #endif @@ -5811,8 +5815,13 @@ static ivas_error rotateFrameSba( for ( i = 0; i < subframe_len; i++ ) #endif { +#ifdef API_5MS + idx = i; + cf = crossfade[i]; +#else idx = subframe_idx * subframe_len + i; cf = headRotData->crossfade[i]; +#endif oneminuscf = 1 - cf; /* As the rotation matrix becomes block diagonal in a SH basis, we can*/ /* apply each angular-momentum block individually to save complexity. */ @@ -6296,7 +6305,11 @@ static ivas_error renderIsmToSplitBinaural( int16_t pos_idx; const MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData; const SPLIT_REND_WRAPPER *pSplitRendWrapper; +#ifdef API_5MS + IVAS_QUATERNION originalHeadRot; +#else IVAS_QUATERNION originalHeadRot[MAX_PARAM_SPATIAL_SUBFRAMES]; +#endif float tmpBinaural[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][L_FRAME48k]; int16_t output_frame = ismInput->base.inputBuffer.config.numSamplesPerChannel; COMBINED_ORIENTATION_HANDLE pCombinedOrientationData; @@ -6338,17 +6351,25 @@ static ivas_error renderIsmToSplitBinaural( if ( pMultiBinPoseData->poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) { +#ifdef API_5MS + pCombinedOrientationData->Quaternion = pCombinedOrientationData->Quaternion; +#else for ( i = 1; i < MAX_PARAM_SPATIAL_SUBFRAMES; ++i ) { pCombinedOrientationData->Quaternions[i] = pCombinedOrientationData->Quaternions[0]; } +#endif } /* Save current head positions */ +#ifdef API_5MS + originalHeadRot = pCombinedOrientationData->Quaternion; +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; ++i ) { originalHeadRot[i] = pCombinedOrientationData->Quaternions[i]; } +#endif /* Copy input audio to a processing buffer. */ copyBufferTo2dArray( ismInput->base.inputBuffer, tmpProcessing ); -- GitLab From 68b6fc68ec50c6c073ed78ad5950afd7ac3dcabe Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Mon, 31 Jul 2023 16:31:53 +0200 Subject: [PATCH 055/175] Fixing build errors WIP (pt. 2) --- apps/decoder.c | 29 +++++++++-- apps/renderer.c | 7 ++- lib_com/options.h | 2 +- lib_dec/ivas_binRenderer_internal.c | 6 ++- lib_dec/lib_dec.c | 13 ++++- lib_rend/ivas_prot_rend.h | 6 ++- lib_rend/lib_rend.c | 77 +++++++++++++++++++++++++++++ 7 files changed, 131 insertions(+), 9 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index cb78f9dafd..c7f60e33c5 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1800,6 +1800,9 @@ static ivas_error decodeG192( RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, +#ifdef SPLIT_REND_WITH_HEAD_ROT + uint8_t *splitRendBitsBuf, +#endif IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ) @@ -1955,7 +1958,12 @@ static ivas_error decodeG192( } - if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternion, Pos ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternion, Pos +#ifdef SPLIT_REND_WITH_HEAD_ROT + , + DEFAULT_AXIS +#endif + ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; @@ -2040,7 +2048,12 @@ static ivas_error decodeG192( goto cleanup; } } - error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, pcmBuf + nOutChannels * nSamplesRendered, &nSamplesRendered_loop, &needNewFrame ); + error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, pcmBuf + nOutChannels * nSamplesRendered, &nSamplesRendered_loop, &needNewFrame +#ifdef SPLIT_REND_WITH_HEAD_ROT + , + NULL /* TODO(sgi): pass IVAS_SPLIT_REND_BITS_HANDLE or change API so that split rendering has its dedicated GetSamples function */ +#endif + ); nSamplesRendered += nSamplesRendered_loop; nSamplesToRender -= nSamplesRendered_loop; if ( error != IVAS_ERR_OK ) @@ -2082,7 +2095,11 @@ static ivas_error decodeG192( &masaWriter, ismWriters, &nOutChannels, - &numObj ); + &numObj +#ifdef SPLIT_REND_WITH_HEAD_ROT + ,NULL /* TODO(sgi): see #else branch for reference */ +#endif + ); if ( error != IVAS_ERR_OK ) { goto cleanup; @@ -2237,7 +2254,11 @@ static ivas_error decodeG192( } - if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternion, Pos ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternion, Pos +#ifdef SPLIT_REND_WITH_HEAD_ROT + ,DEFAULT_AXIS +#endif + ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; diff --git a/apps/renderer.c b/apps/renderer.c index b620a714da..8b4dbe8201 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1574,7 +1574,12 @@ int main( fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } - if ( ( error = IVAS_REND_SetHeadRotation( hIvasRend, headRot, Pos ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_REND_SetHeadRotation( hIvasRend, headRot, Pos +#ifdef SPLIT_REND_WITH_HEAD_ROT + , + DEFAULT_AXIS +#endif + ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); diff --git a/lib_com/options.h b/lib_com/options.h index cd0431444d..cb7750d46f 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -166,7 +166,7 @@ #define API_5MS #ifdef API_5MS #define JITTER_MEM_OPTIM_RENDERING -#define LIB_REND_API_5MS /* FhG: Adds 5ms framing capability to lib_rend */ +#define LIB_REND_API_5MS /* FhG: Adds 5ms framing capability to lib_rend */ /* TODO(sgi): needs to be joined with API_5MS */ #endif #define LIB_REND_FIX_HRTFPARAMBIN_MEMLEAK // 5 ms branch switches end diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index 3f6494b0ff..a7fceba53d 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -1769,7 +1769,11 @@ void ivas_rend_CldfbMultiBinRendProcess( ivas_binRenderer( hCldfbRend, pMultiBinPoseData, - *pCombinedOrientationData, sf_idx, MAX_PARAM_SPATIAL_SUBFRAMES, + *pCombinedOrientationData, +#ifndef API_5MS + sf_idx, +#endif + MAX_PARAM_SPATIAL_SUBFRAMES, #ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG &head_track_post, #endif diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 09801c0a62..05a1230dd7 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -857,6 +857,10 @@ ivas_error IVAS_DEC_GetSamples( int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ bool *needNewFrame /* indication that the decoder needs a new frame */ +#ifdef SPLIT_REND_WITH_HEAD_ROT + , + IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits /* o : bitstream output for split rendering mode*/ +#endif ) { ivas_error error; @@ -1442,7 +1446,9 @@ ivas_error IVAS_DEC_FeedHeadTrackData( #endif #ifdef SPLIT_REND_WITH_HEAD_ROT +#ifndef API_5MS hHeadTrackData->num_quaternions = 0; +#endif #else hIvasDec->st_ivas->hHeadTrackData->num_quaternions = 0; #endif @@ -2265,7 +2271,12 @@ ivas_error IVAS_DEC_VoIP_GetSamples( nSamplesToRender = nSamplesPerChannel - nSamplesRendered; /* render IVAS frames directly to the output buffer */ - if ( ( error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, pcmBuf + nSamplesRendered * nOutChannels, &nSamplesRendered_loop, &tmp ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, pcmBuf + nSamplesRendered * nOutChannels, &nSamplesRendered_loop, &tmp +#ifdef SPLIT_REND_WITH_HEAD_ROT + , + NULL /* TODO(sgi): pass hSplitRendBits here or create separate get samples function for split rendering */ +#endif + ) ) != IVAS_ERR_OK ) { return error; } diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index adac6aff17..747cf7e17c 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -910,7 +910,7 @@ void ivas_split_rend_bitstream_write_int32( ivas_split_rend_bits_t *pBits, int32 int32_t ivas_split_rend_bitstream_read_int32( ivas_split_rend_bits_t *pBits, int32_t bits ); IVAS_QUATERNION ivas_split_rend_get_sf_rot_data( #ifdef API_5MS - /* TODO(splirend): clean up */ + /* TODO(splitrend): clean up */ const IVAS_QUATERNION headPositions[1], #else const IVAS_QUATERNION headPositions[RENDERER_HEAD_POSITIONS_PER_FRAME], @@ -1494,7 +1494,11 @@ void ivas_renderSplitUpdateNoCorrectionPoseData( ivas_error ivas_renderMultiBinToSplitBinaural( SPLIT_REND_WRAPPER *hSplitBin, +#ifdef API_5MS + const IVAS_QUATERNION headPosition[MAX_PARAM_SPATIAL_SUBFRAMES], +#else const IVAS_QUATERNION headPositions[MAX_PARAM_SPATIAL_SUBFRAMES], +#endif const int32_t SplitRendBitRate, IVAS_SPLIT_REND_CODEC splitCodec, ivas_split_rend_bits_t *pBits, diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index f63b2a6392..f0a05b9f93 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -6379,6 +6379,26 @@ static ivas_error renderIsmToSplitBinaural( /* Update head positions */ if ( pos_idx != 0 ) { +#ifdef API_5MS + if ( originalHeadRot.w == -3.0f ) + { + pCombinedOrientationData->Quaternion.w = -3.0f; + pCombinedOrientationData->Quaternion.x = originalHeadRot.x + pMultiBinPoseData->relative_head_poses[pos_idx][0]; + pCombinedOrientationData->Quaternion.y = originalHeadRot.y + pMultiBinPoseData->relative_head_poses[pos_idx][1]; + pCombinedOrientationData->Quaternion.z = originalHeadRot.z + pMultiBinPoseData->relative_head_poses[pos_idx][2]; + } + else + { + pCombinedOrientationData->Quaternion.w = -3.0f; + Quat2EulerDegree( originalHeadRot, + &pCombinedOrientationData->Quaternion.z, + &pCombinedOrientationData->Quaternion.y, + &pCombinedOrientationData->Quaternion.x ); + pCombinedOrientationData->Quaternion.x += pMultiBinPoseData->relative_head_poses[pos_idx][0]; + pCombinedOrientationData->Quaternion.y += pMultiBinPoseData->relative_head_poses[pos_idx][1]; + pCombinedOrientationData->Quaternion.z += pMultiBinPoseData->relative_head_poses[pos_idx][2]; + } +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; ++i ) { if ( originalHeadRot[i].w == -3.0f ) @@ -6400,6 +6420,7 @@ static ivas_error renderIsmToSplitBinaural( pCombinedOrientationData->Quaternions[i].z += pMultiBinPoseData->relative_head_poses[pos_idx][2]; } } +#endif } /* Render */ @@ -6449,10 +6470,14 @@ static ivas_error renderIsmToSplitBinaural( copyBufferTo2dArray( ismInput->base.inputBuffer, tmpProcessing ); } /* Restore original head rotation */ +#ifdef API_5MS + pCombinedOrientationData->Quaternion = originalHeadRot; +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; ++i ) { pCombinedOrientationData->Quaternions[i] = originalHeadRot[i]; } +#endif accumulate2dArrayToBuffer( tmpBinaural, &outAudio ); pop_wmops(); @@ -7177,6 +7202,16 @@ static ivas_error renderMcToSplitBinaural( combinedOrientationDataLocal = *pCombinedOrientationDataLocal; if ( pMultiBinPoseData->poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) { +#ifdef API_5MS + combinedOrientationDataLocal.Quaternion = combinedOrientationDataLocal.Quaternion; + for ( i = 0; i < 3; i++ ) + { + for ( j = 0; j < 3; j++ ) + { + combinedOrientationDataLocal.Rmat[i][j] = combinedOrientationDataLocal.Rmat[i][j]; + } + } +#else for ( sf = 1; sf < RENDERER_HEAD_POSITIONS_PER_FRAME; ++sf ) { combinedOrientationDataLocal.Quaternions[sf] = combinedOrientationDataLocal.Quaternions[0]; @@ -7188,12 +7223,25 @@ static ivas_error renderMcToSplitBinaural( } } } +#endif } for ( pos_idx = 0; pos_idx < pMultiBinPoseData->num_poses; pos_idx++ ) { /* Update head positions */ +#ifdef API_5MS + IVAS_QUATERNION Quaternion_orig, Quaternion_abs; + Quaternion_orig = combinedOrientationDataLocal.Quaternion; + Quaternion_abs.w = -3.0f; + Quat2EulerDegree( combinedOrientationDataLocal.Quaternion, &Quaternion_abs.z, &Quaternion_abs.y, &Quaternion_abs.x ); /*order in Quat2Euler seems to be reversed ?*/ + + Quaternion_abs.x += pMultiBinPoseData->relative_head_poses[pos_idx][0]; + Quaternion_abs.y += pMultiBinPoseData->relative_head_poses[pos_idx][1]; + Quaternion_abs.z += pMultiBinPoseData->relative_head_poses[pos_idx][2]; + combinedOrientationDataLocal.Quaternion = Quaternion_abs; + QuatToRotMat( combinedOrientationDataLocal.Quaternion, combinedOrientationDataLocal.Rmat ); +#else IVAS_QUATERNION Quaternions_orig[RENDERER_HEAD_POSITIONS_PER_FRAME], Quaternions_abs; for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) { @@ -7207,6 +7255,7 @@ static ivas_error renderMcToSplitBinaural( combinedOrientationDataLocal.Quaternions[i] = Quaternions_abs; QuatToRotMat( combinedOrientationDataLocal.Quaternions[i], combinedOrientationDataLocal.Rmat[i] ); } +#endif if ( inConfig == IVAS_REND_AUDIO_CONFIG_LS_CUSTOM || inConfig == IVAS_REND_AUDIO_CONFIG_5_1 || inConfig == IVAS_REND_AUDIO_CONFIG_7_1 ) { @@ -7298,10 +7347,14 @@ static ivas_error renderMcToSplitBinaural( } /* restore original headrotation data */ +#ifdef API_5MS + combinedOrientationDataLocal.Quaternion = Quaternion_orig; +#else for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) { combinedOrientationDataLocal.Quaternions[i] = Quaternions_orig[i]; } +#endif } /* TODO tmu : needs delay compensation */ @@ -7690,6 +7743,16 @@ static ivas_error renderSbaToMultiBinaural( combinedOrientationDataLocal = *pCombinedOrientationDataLocal; if ( pMultiBinPoseData->poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) { +#ifdef API_5MS + combinedOrientationDataLocal.Quaternion = combinedOrientationDataLocal.Quaternion; + for ( i = 0; i < 3; i++ ) + { + for ( j = 0; j < 3; j++ ) + { + combinedOrientationDataLocal.Rmat[i][j] = combinedOrientationDataLocal.Rmat[i][j]; + } + } +#else for ( sf = 1; sf < RENDERER_HEAD_POSITIONS_PER_FRAME; sf++ ) { combinedOrientationDataLocal.Quaternions[sf] = combinedOrientationDataLocal.Quaternions[0]; @@ -7701,6 +7764,7 @@ static ivas_error renderSbaToMultiBinaural( } } } +#endif } tmpRotBuffer = sbaInput->base.inputBuffer; @@ -7708,6 +7772,18 @@ static ivas_error renderSbaToMultiBinaural( for ( pos_idx = 0; pos_idx < pMultiBinPoseData->num_poses; pos_idx++ ) { +#ifdef API_5MS + IVAS_QUATERNION Quaternion_orig, Quaternion_abs; + Quaternion_orig = combinedOrientationDataLocal.Quaternion; + Quaternion_abs.w = -3.0f; + Quat2EulerDegree( combinedOrientationDataLocal.Quaternion, &Quaternion_abs.z, &Quaternion_abs.y, &Quaternion_abs.x ); /*order in Quat2Euler seems to be reversed ?*/ + + Quaternion_abs.x += pMultiBinPoseData->relative_head_poses[pos_idx][0]; + Quaternion_abs.y += pMultiBinPoseData->relative_head_poses[pos_idx][1]; + Quaternion_abs.z += pMultiBinPoseData->relative_head_poses[pos_idx][2]; + combinedOrientationDataLocal.Quaternion = Quaternion_abs; + QuatToRotMat( combinedOrientationDataLocal.Quaternion, combinedOrientationDataLocal.Rmat ); +#else IVAS_QUATERNION Quaternions_orig[RENDERER_HEAD_POSITIONS_PER_FRAME], Quaternions_abs; for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) { @@ -7721,6 +7797,7 @@ static ivas_error renderSbaToMultiBinaural( combinedOrientationDataLocal.Quaternions[i] = Quaternions_abs; QuatToRotMat( combinedOrientationDataLocal.Quaternions[i], combinedOrientationDataLocal.Rmat[i] ); } +#endif /* copy input for in-place rotation */ -- GitLab From 529608ac34111d57d8eb6f539485dfc875721c97 Mon Sep 17 00:00:00 2001 From: Treffehn Date: Tue, 1 Aug 2023 09:58:34 +0200 Subject: [PATCH 056/175] removed redundant variable --- lib_dec/lib_dec.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 929365b277..1ab8d0fdde 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -93,7 +93,6 @@ struct IVAS_DEC int16_t bitstreamformat; /* Bitstream format flag (G.192/MIME/VOIP_G192_RTP/VOIP_RTPDUMP) */ bool Opt_VOIP; /* flag indicating VOIP mode with JBM */ #ifdef API_5MS - bool Opt_TSM; /* flag indicating TSM mode*/ int16_t tsm_scale; /* scale for TSM operation */ int16_t tsm_max_scaling; float *apaExecBuffer; /* Buffer for APA scaling */ @@ -166,7 +165,6 @@ ivas_error IVAS_DEC_Open( #ifdef API_5MS hIvasDec->apaExecBuffer = NULL; hIvasDec->hTimeScaler = NULL; - hIvasDec->Opt_TSM = false; hIvasDec->tsm_scale = 100; hIvasDec->needNewFrame = false; hIvasDec->nTransportChannelsOld = 0; @@ -531,7 +529,6 @@ ivas_error IVAS_DEC_Configure( #ifdef API_5MS hDecoderConfig->tsm_active = tsmEnabled; - hIvasDec->Opt_TSM = tsmEnabled; hIvasDec->nSamplesFrame = (uint16_t) ( hDecoderConfig->output_Fs / FRAMES_PER_SEC ); hIvasDec->nSamplesAvailableNext = 0; hIvasDec->nSamplesRendered = 0; @@ -578,7 +575,6 @@ ivas_error IVAS_DEC_EnableVoIP( hIvasDec->Opt_VOIP = 1; #ifdef API_5MS - hIvasDec->Opt_TSM = 1; hDecoderConfig->tsm_active = 1; #else hDecoderConfig->voip_active = 1; @@ -895,7 +891,7 @@ ivas_error IVAS_DEC_GetSamples( return error; } - if ( hIvasDec->Opt_TSM ) + if ( hIvasDec->st_ivas->hDecoderConfig->tsm_active ) { if ( apa_set_scale( hIvasDec->hTimeScaler, hIvasDec->tsm_scale ) != 0 ) { @@ -922,7 +918,7 @@ ivas_error IVAS_DEC_GetSamples( return error; } - if ( hIvasDec->Opt_TSM ) + if ( hIvasDec->st_ivas->hDecoderConfig->tsm_active ) { /* feed residual samples to TSM for the next call */ if ( apa_set_renderer_residual_samples( hIvasDec->hTimeScaler, (uint16_t) nResidualSamples ) != 0 ) @@ -2018,7 +2014,7 @@ ivas_error IVAS_DEC_VoIP_SetScale( error = IVAS_ERR_OK; #ifdef API_5MS - if ( hIvasDec->Opt_TSM == false ) + if ( hIvasDec->st_ivas->hDecoderConfig->tsm_active == false ) { return IVAS_ERR_TSM_NOT_ENABLED; } @@ -3560,7 +3556,7 @@ ivas_error IVAS_DEC_reconfigure( DECODER_CONFIG_HANDLE hDecoderConfig; #ifdef API_5MS - if ( hIvasDec->Opt_TSM ) + if ( hIvasDec->st_ivas->hDecoderConfig->tsm_active ) { uint16_t wss, css; float startQuality; @@ -3692,7 +3688,7 @@ ivas_error IVAS_DEC_reconfigure( else { #ifdef API_5MS - if ( hIvasDec->Opt_TSM ) + if ( hIvasDec->st_ivas->hDecoderConfig->tsm_active ) { if ( apa_reconfigure( hIvasDec->hTimeScaler, nTransportChannels, l_ts ) != 0 ) #else -- GitLab From 2b11e9ab474310cb00f0e3a941341bcaa94e93f7 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Tue, 1 Aug 2023 14:24:07 +0200 Subject: [PATCH 057/175] fix small merge error in ParamISM decoding function --- lib_dec/ivas_ism_param_dec.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 97fc604794..ac816b4e8e 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -790,29 +790,15 @@ void ivas_param_ism_dec( /* Initialization */ hDirAC = st_ivas->hDirAC; assert( hDirAC ); -// sgi2bay: please review merge -// <<<<<<< HEAD -// #ifdef FIX_549_DMX_GAIN -// #ifdef API_5MS -// for ( i = 0; i < PARAM_ISM_MAX_DMX; i++ ) -// { -// p_tc[i] = output_f[i]; -// } -// #else -// ======= -// hSpatParamRendCom = st_ivas->hSpatParamRendCom; -// assert( hSpatParamRendCom ); -// >>>>>>> main -// merged to: + hSpatParamRendCom = st_ivas->hSpatParamRendCom; + assert( hSpatParamRendCom ); #ifdef API_5MS for ( i = 0; i < PARAM_ISM_MAX_DMX; i++ ) { p_tc[i] = output_f[i]; } #else - hSpatParamRendCom = st_ivas->hSpatParamRendCom; - assert( hSpatParamRendCom ); -// merge end + ene_tc = 0.0f; ene_sum = 0.0f; last_gain = st_ivas->hDirAC->hParamIsm->last_dmx_gain; -- GitLab From 00fe90ba356b6edc72658f384c871a2fa817b98f Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Tue, 1 Aug 2023 14:26:36 +0200 Subject: [PATCH 058/175] small merge error fix --- lib_dec/ivas_ism_param_dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index ac816b4e8e..06208595a7 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -1157,10 +1157,10 @@ void ivas_param_ism_dec_digest_tc( /* Initialization */ hDirAC = st_ivas->hDirAC; assert( hDirAC ); -#ifndef API_5MS -#ifdef FIX_549_DMX_GAIN hSpatParamRendCom = st_ivas->hSpatParamRendCom; assert( hSpatParamRendCom ); +#ifndef API_5MS +#ifdef FIX_549_DMX_GAIN ene_tc = 0.0f; ene_sum = 0.0f; last_gain = st_ivas->hDirAC->hParamIsm->last_dmx_gain; -- GitLab From 9dc8cab2c330d9bd8fc9a127fdf0812b92b8d398 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Tue, 1 Aug 2023 14:32:19 +0200 Subject: [PATCH 059/175] reviewed merge conflict solution --- lib_dec/ivas_dirac_dec.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 6ecb4affbd..a8f81b21a3 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1502,23 +1502,11 @@ void ivas_dirac_dec_set_md_map( num_slots_in_subfr = CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES; hSpatParamRendCom->subframes_rendered = 0; -// sgi2bay: please review -// <<<<<<< HEAD -// ivas_jbm_dec_get_adapted_subframes( nCldfbTs, hDirAC->subframe_nbslots, &hDirAC->nb_subframes ); -// #ifdef API_5MS -// st_ivas->hTcBuffer->nb_subframes = hDirAC->nb_subframes; -// mvs2s( hDirAC->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, hDirAC->nb_subframes ); -// #endif -// ======= -// ivas_jbm_dec_get_adapted_subframes( nCldfbTs, hSpatParamRendCom->subframe_nbslots, &hSpatParamRendCom->nb_subframes ); -// >>>>>>> main -// merged to: ivas_jbm_dec_get_adapted_subframes( nCldfbTs, hSpatParamRendCom->subframe_nbslots, &hSpatParamRendCom->nb_subframes ); #ifdef API_5MS st_ivas->hTcBuffer->nb_subframes = hSpatParamRendCom->nb_subframes; mvs2s( hSpatParamRendCom->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, hSpatParamRendCom->nb_subframes ); #endif -// end merge /* set mapping according to dirac_read_idx */ -- GitLab From c4a3807589fecf564c4a5fae9c82b6d9afa26e58 Mon Sep 17 00:00:00 2001 From: Treffehn Date: Tue, 1 Aug 2023 09:58:34 +0200 Subject: [PATCH 060/175] removed redundant variable --- lib_dec/lib_dec.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 05a1230dd7..e062188480 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -96,7 +96,6 @@ struct IVAS_DEC int16_t bitstreamformat; /* Bitstream format flag (G.192/MIME/VOIP_G192_RTP/VOIP_RTPDUMP) */ bool Opt_VOIP; /* flag indicating VOIP mode with JBM */ #ifdef API_5MS - bool Opt_TSM; /* flag indicating TSM mode*/ int16_t tsm_scale; /* scale for TSM operation */ int16_t tsm_max_scaling; float *apaExecBuffer; /* Buffer for APA scaling */ @@ -169,7 +168,6 @@ ivas_error IVAS_DEC_Open( #ifdef API_5MS hIvasDec->apaExecBuffer = NULL; hIvasDec->hTimeScaler = NULL; - hIvasDec->Opt_TSM = false; hIvasDec->tsm_scale = 100; hIvasDec->needNewFrame = false; hIvasDec->nTransportChannelsOld = 0; @@ -544,7 +542,6 @@ ivas_error IVAS_DEC_Configure( #ifdef API_5MS hDecoderConfig->tsm_active = tsmEnabled; - hIvasDec->Opt_TSM = tsmEnabled; hIvasDec->nSamplesFrame = (uint16_t) ( hDecoderConfig->output_Fs / FRAMES_PER_SEC ); hIvasDec->nSamplesAvailableNext = 0; hIvasDec->nSamplesRendered = 0; @@ -591,7 +588,6 @@ ivas_error IVAS_DEC_EnableVoIP( hIvasDec->Opt_VOIP = 1; #ifdef API_5MS - hIvasDec->Opt_TSM = 1; hDecoderConfig->tsm_active = 1; #else hDecoderConfig->voip_active = 1; @@ -921,7 +917,7 @@ ivas_error IVAS_DEC_GetSamples( return error; } - if ( hIvasDec->Opt_TSM ) + if ( hIvasDec->st_ivas->hDecoderConfig->tsm_active ) { if ( apa_set_scale( hIvasDec->hTimeScaler, hIvasDec->tsm_scale ) != 0 ) { @@ -948,7 +944,7 @@ ivas_error IVAS_DEC_GetSamples( return error; } - if ( hIvasDec->Opt_TSM ) + if ( hIvasDec->st_ivas->hDecoderConfig->tsm_active ) { /* feed residual samples to TSM for the next call */ if ( apa_set_renderer_residual_samples( hIvasDec->hTimeScaler, (uint16_t) nResidualSamples ) != 0 ) @@ -2090,7 +2086,7 @@ ivas_error IVAS_DEC_VoIP_SetScale( error = IVAS_ERR_OK; #ifdef API_5MS - if ( hIvasDec->Opt_TSM == false ) + if ( hIvasDec->st_ivas->hDecoderConfig->tsm_active == false ) { return IVAS_ERR_TSM_NOT_ENABLED; } @@ -3647,7 +3643,7 @@ ivas_error IVAS_DEC_reconfigure( DECODER_CONFIG_HANDLE hDecoderConfig; #ifdef API_5MS - if ( hIvasDec->Opt_TSM ) + if ( hIvasDec->st_ivas->hDecoderConfig->tsm_active ) { uint16_t wss, css; float startQuality; @@ -3779,7 +3775,7 @@ ivas_error IVAS_DEC_reconfigure( else { #ifdef API_5MS - if ( hIvasDec->Opt_TSM ) + if ( hIvasDec->st_ivas->hDecoderConfig->tsm_active ) { if ( apa_reconfigure( hIvasDec->hTimeScaler, nTransportChannels, l_ts ) != 0 ) #else -- GitLab From 9574ba1f27ac0647a12bee188fe7965d3bc01435 Mon Sep 17 00:00:00 2001 From: Treffehn Date: Tue, 1 Aug 2023 16:43:59 +0200 Subject: [PATCH 061/175] fix compilation with API_5MS switch disabled --- lib_dec/ivas_jbm_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 9cc79be379..e1ebe3fa1f 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -949,7 +949,7 @@ ivas_error ivas_jbm_dec_render( #ifdef JITTER_MEM_OPTIM_RENDERING nSamplesRenderedLocal, #else - *nSamplesRendered + *nSamplesRendered, #endif #ifdef JBM_PARAMUPMIX st_ivas->hTcBuffer->nb_subframes, -- GitLab From 5d0c233ee7943c488bd2c0a631d97dd71bcfe013 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 2 Aug 2023 08:27:19 +0200 Subject: [PATCH 062/175] Add first draft of IVAS_DEC_GetSplitBinaural (untested) --- lib_dec/lib_dec.c | 90 +++++++++++++++++++++++++++++++- lib_dec/lib_dec.h | 10 +++- lib_rend/ivas_prot_rend.h | 2 +- lib_rend/ivas_splitRendererPre.c | 8 +++ 4 files changed, 106 insertions(+), 4 deletions(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 05a1230dd7..bd6dd5b0a1 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -857,9 +857,9 @@ ivas_error IVAS_DEC_GetSamples( int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ bool *needNewFrame /* indication that the decoder needs a new frame */ -#ifdef SPLIT_REND_WITH_HEAD_ROT +#if defined SPLIT_REND_WITH_HEAD_ROT && !defined API_5MS , - IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits /* o : bitstream output for split rendering mode*/ + IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits /* o : bitstream output for split rendering mode*/ #endif ) { @@ -983,6 +983,92 @@ ivas_error IVAS_DEC_GetSamples( } #endif +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT +ivas_error IVAS_DEC_GetSplitBinaural( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + bool *needNewFrame, /* indication that the decoder needs a new frame */ + IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits /* o : bitstream output for split rendering mode*/ +) +{ + Decoder_Struct *st_ivas; + AUDIO_CONFIG output_config; + int32_t output_Fs; + float output[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES][L_FRAME48k]; + int16_t output_int[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES * L_FRAME48k]; /* TODO(sgi): Need conversion */ + int16_t numSamplesPerChannel, nOutSamples; + int16_t i, j; + ivas_error error; + + error = IVAS_ERR_OK; + st_ivas = hIvasDec->st_ivas; + output_config = st_ivas->hDecoderConfig->output_config; + output_Fs = st_ivas->hDecoderConfig->output_Fs; + numSamplesPerChannel = output_Fs / FRAMES_PER_SEC; /* TODO(sgi): Accommodate 5ms framing */ + + if ( output_config != AUDIO_CONFIG_BINAURAL_SPLIT_CODED && output_config != AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) + { + return IVAS_ERR_WRONG_PARAMS; + } + + while ( error == IVAS_ERR_OK ) + { + /* Decode and render */ + if ( ( error = IVAS_DEC_GetSamples( + hIvasDec, + numSamplesPerChannel, + output_int, + &nOutSamples, + needNewFrame ) ) != IVAS_ERR_OK ) + { + return error; + } + + /*split rendering process calls*/ + IVAS_DEC_SPLIT_REND_WRAPPER *hSplitBinRend; + int16_t max_band; + int16_t pcm_out; + int16_t numPoses; + + hSplitBinRend = &st_ivas->splitBinRend; + + ivas_set_split_rend_setup(hSplitBinRend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hCombinedOrientationData, hSplitRendBits ); + + numPoses = hSplitBinRend->splitrend.multiBinPoseData.num_poses; + + /* [tmp] convert int back to float and change buffer layout */ + for (i = 0; i < numSamplesPerChannel; ++i) + { + for (j = 0; j < BINAURAL_CHANNELS * numPoses; ++j) + { + output[j][i] = (float) output_int[i * BINAURAL_CHANNELS * numPoses + j]; + } + } + + max_band = (int16_t) ( ( BINAURAL_MAXBANDS * output_Fs ) / 48000 ); + pcm_out = ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0; + + error = ivas_renderMultiBinToSplitBinaural( &hSplitBinRend->splitrend, + st_ivas->hHeadTrackData->Quaternion, + st_ivas->hRenderConfig->split_rend_config.splitRendBitRate, + st_ivas->hRenderConfig->split_rend_config.codec, + hSplitBinRend->hSplitRendBits, + hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural, + hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural, + max_band, output, 1, + st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV, + pcm_out ); + if ( error != IVAS_ERR_OK ) + { + return error; + } + + free( st_ivas->splitBinRend.hMultiBinCldfbData ); + } + + return error; +} +#endif + /*---------------------------------------------------------------------* * IVAS_DEC_Setup( ) diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 04b60f7e95..7ad7a6d87d 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -188,12 +188,20 @@ ivas_error IVAS_DEC_GetSamples( int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ int16_t *nOutSamples /* o : number of samples per channel written to output buffer */ #endif -#ifdef SPLIT_REND_WITH_HEAD_ROT +#if defined SPLIT_REND_WITH_HEAD_ROT && !defined API_5MS , IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits /* o : bitstream output for split rendering mode*/ #endif ); +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT +ivas_error IVAS_DEC_GetSplitBinaural( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + bool *needNewFrame, /* indication that the decoder needs a new frame */ + IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits /* o : bitstream output for split rendering mode*/ +); +#endif + /*! r: error code */ ivas_error IVAS_DEC_GetObjectMetadata( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 747cf7e17c..5535ced049 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -1495,7 +1495,7 @@ void ivas_renderSplitUpdateNoCorrectionPoseData( ivas_error ivas_renderMultiBinToSplitBinaural( SPLIT_REND_WRAPPER *hSplitBin, #ifdef API_5MS - const IVAS_QUATERNION headPosition[MAX_PARAM_SPATIAL_SUBFRAMES], + const IVAS_QUATERNION headPosition, #else const IVAS_QUATERNION headPositions[MAX_PARAM_SPATIAL_SUBFRAMES], #endif diff --git a/lib_rend/ivas_splitRendererPre.c b/lib_rend/ivas_splitRendererPre.c index 1b8a157f5b..64acb14760 100644 --- a/lib_rend/ivas_splitRendererPre.c +++ b/lib_rend/ivas_splitRendererPre.c @@ -1897,7 +1897,11 @@ static ivas_error splitRendLc3plusEncodeAndWrite( static ivas_error ivas_renderMultiTDBinToSplitBinaural( SPLIT_REND_WRAPPER *hSplitBin, +#ifdef API_5MS + const IVAS_QUATERNION headPosition, +#else const IVAS_QUATERNION headPositions[MAX_PARAM_SPATIAL_SUBFRAMES], +#endif const int32_t SplitRendBitRate, ivas_split_rend_bits_t *pBits, const int16_t max_bands, @@ -2095,7 +2099,11 @@ static void lc3plusTimeAlignCldfbPoseCorr( ivas_error ivas_renderMultiBinToSplitBinaural( SPLIT_REND_WRAPPER *hSplitBin, +#ifdef API_5MS + const IVAS_QUATERNION headPosition, +#else const IVAS_QUATERNION headPositions[MAX_PARAM_SPATIAL_SUBFRAMES], +#endif const int32_t SplitRendBitRate, IVAS_SPLIT_REND_CODEC splitCodec, ivas_split_rend_bits_t *pBits, -- GitLab From cd639983e689650001509d1931065e91605d08ca Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 2 Aug 2023 09:26:19 +0200 Subject: [PATCH 063/175] Fix build errors --- apps/decoder.c | 7 +----- lib_dec/lib_dec.c | 7 +----- lib_rend/ivas_prot_rend.h | 4 ++++ lib_rend/ivas_splitRendererPre.c | 33 ++++++++++++++++++++++++++++- lib_rend/ivas_splitRenderer_utils.c | 11 ++-------- lib_rend/lib_rend.c | 22 +++++++++++++++++-- 6 files changed, 60 insertions(+), 24 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index c7f60e33c5..6202d48394 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -2048,12 +2048,7 @@ static ivas_error decodeG192( goto cleanup; } } - error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, pcmBuf + nOutChannels * nSamplesRendered, &nSamplesRendered_loop, &needNewFrame -#ifdef SPLIT_REND_WITH_HEAD_ROT - , - NULL /* TODO(sgi): pass IVAS_SPLIT_REND_BITS_HANDLE or change API so that split rendering has its dedicated GetSamples function */ -#endif - ); + error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, pcmBuf + nOutChannels * nSamplesRendered, &nSamplesRendered_loop, &needNewFrame ); nSamplesRendered += nSamplesRendered_loop; nSamplesToRender -= nSamplesRendered_loop; if ( error != IVAS_ERR_OK ) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 69f63607b2..8b49a653ff 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -2353,12 +2353,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( nSamplesToRender = nSamplesPerChannel - nSamplesRendered; /* render IVAS frames directly to the output buffer */ - if ( ( error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, pcmBuf + nSamplesRendered * nOutChannels, &nSamplesRendered_loop, &tmp -#ifdef SPLIT_REND_WITH_HEAD_ROT - , - NULL /* TODO(sgi): pass hSplitRendBits here or create separate get samples function for split rendering */ -#endif - ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, pcmBuf + nSamplesRendered * nOutChannels, &nSamplesRendered_loop, &tmp ) ) != IVAS_ERR_OK ) { return error; } diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 5535ced049..941eeff6c2 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -1513,7 +1513,11 @@ ivas_error ivas_renderMultiBinToSplitBinaural( void ivas_rend_CldfbSplitPreRendProcess( const BIN_HR_SPLIT_PRE_REND_HANDLE hBinHrSplitPreRend, +#ifdef API_5MS + const IVAS_QUATERNION headPosition, +#else const IVAS_QUATERNION headPositions[MAX_PARAM_SPATIAL_SUBFRAMES], +#endif MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, float Cldfb_In_BinReal[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], float Cldfb_In_BinImag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], diff --git a/lib_rend/ivas_splitRendererPre.c b/lib_rend/ivas_splitRendererPre.c index 64acb14760..f98e09d2ea 100644 --- a/lib_rend/ivas_splitRendererPre.c +++ b/lib_rend/ivas_splitRendererPre.c @@ -1037,7 +1037,11 @@ static void ivas_SplitRenderer_code_md_huff( static void ivas_SplitRenderer_quant_code( const BIN_HR_SPLIT_PRE_REND_HANDLE hBinHrSplitPreRend, +#ifdef API_5MS + const IVAS_QUATERNION headPosition, +#else const IVAS_QUATERNION headPositions[MAX_PARAM_SPATIAL_SUBFRAMES], +#endif MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, ivas_split_rend_bits_t *pBits, const int16_t low_res_pre_rend_rot, @@ -1072,7 +1076,12 @@ static void ivas_SplitRenderer_quant_code( { int16_t angle; IVAS_QUATERNION head_pos_euler; +#ifdef API_5MS + /* FhG@Dolby: please review, this can be likely optimised */ + Quat2EulerDegree( headPosition, &head_pos_euler.z, &head_pos_euler.y, &head_pos_euler.x ); +#else Quat2EulerDegree( headPositions[sf_idx], &head_pos_euler.z, &head_pos_euler.y, &head_pos_euler.x ); +#endif angle = (int16_t) roundf( head_pos_euler.x ); angle += 180; ivas_split_rend_bitstream_write_int32( pBits, angle, IVAS_SPLIT_REND_HEAD_POSE_BITS ); @@ -1395,7 +1404,11 @@ void ivas_SplitRenderer_GetRotMd( void ivas_rend_CldfbSplitPreRendProcess( const BIN_HR_SPLIT_PRE_REND_HANDLE hBinHrSplitPreRend, +#ifdef API_5MS + const IVAS_QUATERNION headPosition, +#else const IVAS_QUATERNION headPositions[MAX_PARAM_SPATIAL_SUBFRAMES], +#endif MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, float Cldfb_In_BinReal[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], float Cldfb_In_BinImag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], @@ -1414,7 +1427,11 @@ void ivas_rend_CldfbSplitPreRendProcess( ivas_SplitRenderer_quant_code( hBinHrSplitPreRend, +#ifdef API_5MS + headPosition, +#else headPositions, +#endif pMultiBinPoseData, pBits, low_res_pre_rend_rot, @@ -1992,7 +2009,11 @@ static ivas_error ivas_renderMultiTDBinToSplitBinaural( actual_md_bits = pBits->bits_written; ivas_rend_CldfbSplitPreRendProcess( hSplitBin->hBinHrSplitPreRend, +#ifdef API_5MS + headPosition, +#else headPositions, +#endif &hSplitBin->multiBinPoseData, Cldfb_In_BinReal, Cldfb_In_BinImag, @@ -2134,7 +2155,13 @@ ivas_error ivas_renderMultiBinToSplitBinaural( { /*TD input*/ /*if CLDFB handles have been allocated then assume valid multi binaural input in out[][] buffer and perform CLDFB analysis*/ - error = ivas_renderMultiTDBinToSplitBinaural( hSplitBin, headPositions, SplitRendBitRate, pBits, max_bands, out, + error = ivas_renderMultiTDBinToSplitBinaural( hSplitBin, +#ifdef API_5MS + headPosition, +#else + headPositions, +#endif + SplitRendBitRate, pBits, max_bands, out, low_res_pre_rend_rot, pcm_out ); pop_wmops(); return error; @@ -2153,7 +2180,11 @@ ivas_error ivas_renderMultiBinToSplitBinaural( actual_md_bits = pBits->bits_written; ivas_rend_CldfbSplitPreRendProcess( hSplitBin->hBinHrSplitPreRend, +#ifdef API_5MS + headPosition, +#else headPositions, +#endif &hSplitBin->multiBinPoseData, Cldfb_In_BinReal, Cldfb_In_BinImag, diff --git a/lib_rend/ivas_splitRenderer_utils.c b/lib_rend/ivas_splitRenderer_utils.c index faf62ba946..df0863e773 100644 --- a/lib_rend/ivas_splitRenderer_utils.c +++ b/lib_rend/ivas_splitRenderer_utils.c @@ -314,24 +314,17 @@ void ivas_split_rend_bitstream_write_int32( ivas_split_rend_bits_t *pBits, int32 return; } +#ifndef API_5MS IVAS_QUATERNION ivas_split_rend_get_sf_rot_data( -#ifdef API_5MS - const IVAS_QUATERNION headPositions[1], -#else const IVAS_QUATERNION headPositions[RENDERER_HEAD_POSITIONS_PER_FRAME], -#endif int16_t subframe_idx ) { int16_t idx; -#ifdef API_5MS - /* TODO(splitrend): we no longer use subframes. Needs refactoring */ - idx = 0 * subframe_idx; /* tmp change */ -#else idx = ( subframe_idx * RENDERER_HEAD_POSITIONS_PER_FRAME ) / MAX_PARAM_SPATIAL_SUBFRAMES; -#endif return headPositions[idx]; } +#endif #ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index f0a05b9f93..f3878b0e23 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -7311,7 +7311,11 @@ static ivas_error renderMcToSplitBinaural( pCombinedOrientationDataLocal = &combinedOrientationDataLocal; if ( ( error = rotateFrameMc( mcInput->base.inputBuffer, mcInput->base.inConfig, +#ifdef API_5MS + &mcInput->customLsInput, +#else mcInput->customLsInput, +#endif mcInput->base.ctx.pHeadRotData, &pCombinedOrientationDataLocal, mcInput->rot_gains_prev, @@ -7333,6 +7337,9 @@ static ivas_error renderMcToSplitBinaural( NULL, p_tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate, +#ifdef API_5MS + 4, +#endif pos_idx ) ) != IVAS_ERR_OK ) { return error; @@ -7557,7 +7564,7 @@ static ivas_error renderSplitBinauralWithPostRot( float Cldfb_RealBuffer_Binaural[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; float Cldfb_ImagBuffer_Binaural[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; ivas_error error; - IVAS_QUATERNION QuaternionsPost[MAX_PARAM_SPATIAL_SUBFRAMES]; + IVAS_QUATERNION QuaternionsPost[MAX_PARAM_SPATIAL_SUBFRAMES]; /* TODO(splitrend): remove subframes */ int16_t sf_idx; ivas_split_rend_bits_t bits; float tmpCrendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; @@ -7600,7 +7607,11 @@ static ivas_error renderSplitBinauralWithPostRot( for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) { +#ifdef API_5MS + QuaternionsPost[sf_idx] = pCombinedOrientationData->Quaternion; +#else QuaternionsPost[sf_idx] = ivas_split_rend_get_sf_rot_data( pCombinedOrientationData->Quaternions, sf_idx ); +#endif } if ( !SplitRendBFI ) @@ -7820,15 +7831,22 @@ static ivas_error renderSbaToMultiBinaural( NULL, NULL, NULL, NULL, p_tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate, +#ifdef API_5MS + 4, +#endif pos_idx ) ) != IVAS_ERR_OK ) { return error; } +#ifdef API_5MS + combinedOrientationDataLocal.Quaternion = Quaternion_orig; +#else for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) { combinedOrientationDataLocal.Quaternions[i] = Quaternions_orig[i]; } +#endif /* move to output */ for ( i = 0; i < BINAURAL_CHANNELS; i++ ) @@ -9040,7 +9058,7 @@ ivas_error IVAS_REND_GetSamples( /* Encode split rendering bitstream */ convertBitsBufferToInternalBitsBuff( *hBits, &bits ); error = ivas_renderMultiBinToSplitBinaural( &hIvasRend->splitRendWrapper, - hIvasRend->headRotData.headPositions, + hIvasRend->headRotData.headPosition, hIvasRend->hRendererConfig->split_rend_config.splitRendBitRate, hIvasRend->hRendererConfig->split_rend_config.codec, &bits, -- GitLab From 4f1720b0410cc35d5a207458044f4a63e566e5e3 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 2 Aug 2023 10:00:55 +0200 Subject: [PATCH 064/175] Port split rendering changes to new version of decodeG192 --- apps/decoder.c | 89 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 77 insertions(+), 12 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 6202d48394..55b33d2bc6 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1839,6 +1839,10 @@ static ivas_error decodeG192( IVAS_VECTOR3 Pos; int16_t vec_pos_update, vec_pos_len; +#ifdef SPLIT_REND_WITH_HEAD_ROT + IVAS_SPLIT_REND_BITS splitRendBits; + SplitFileReadWrite *hSplitRendFileReadWrite; +#endif for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; ++i ) { @@ -1901,6 +1905,15 @@ static ivas_error decodeG192( nOutSamples = (int16_t) ( arg.output_Fs / 1000 * DEFAULT_FETCH_FRAMESIZE_MS ); vec_pos_len = 1; } + +#ifdef SPLIT_REND_WITH_HEAD_ROT + splitRendBits.bits_buf = splitRendBitsBuf; + splitRendBits.bits_read = 0; + splitRendBits.bits_written = 0; + splitRendBits.buf_len = MAX_SPLIT_REND_BITS_BUFFER_SIZE_IN_BYTES; + hSplitRendFileReadWrite = NULL; +#endif + /*------------------------------------------------------------------------------------------* * Loop for every packet (frame) of bitstream data * - Read the bitstream packet @@ -1951,11 +1964,25 @@ static ivas_error decodeG192( { IVAS_QUATERNION Quaternion; - if ( ( error = HeadRotationFileReading( headRotReader, &Quaternion, &Pos ) ) != IVAS_ERR_OK ) +#ifdef SPLIT_REND_WITH_HEAD_ROT + if ( headRotReader == NULL ) { - fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( headRotReader ) ); - goto cleanup; + Quaternion.w = -3.0f; + Quaternion.x = 0.0f; + Quaternion.y = 0.0f; + Quaternion.z = 0.0f; + } + else + { +#endif + if ( ( error = HeadRotationFileReading( headRotReader, &Quaternion, &Pos ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( headRotReader ) ); + goto cleanup; + } +#ifdef SPLIT_REND_WITH_HEAD_ROT } +#endif if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternion, Pos @@ -2048,6 +2075,8 @@ static ivas_error decodeG192( goto cleanup; } } + + /* TODO(sgi): Get split bitstream here */ error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, pcmBuf + nOutChannels * nSamplesRendered, &nSamplesRendered_loop, &needNewFrame ); nSamplesRendered += nSamplesRendered_loop; nSamplesToRender -= nSamplesRendered_loop; @@ -2092,7 +2121,8 @@ static ivas_error decodeG192( &nOutChannels, &numObj #ifdef SPLIT_REND_WITH_HEAD_ROT - ,NULL /* TODO(sgi): see #else branch for reference */ + , + &hSplitRendFileReadWrite #endif ); if ( error != IVAS_ERR_OK ) @@ -2109,19 +2139,44 @@ static ivas_error decodeG192( /* Write current frame */ if ( decodedGoodFrame ) { - if ( delayNumSamples < nOutSamples ) +#ifdef SPLIT_REND_WITH_HEAD_ROT + if ( ( hSplitRendFileReadWrite != NULL ) && ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED ) ) { - if ( ( error = AudioFileWriter_write( afWriter, &pcmBuf[delayNumSamples * nOutChannels], nOutSamples * nOutChannels - ( delayNumSamples * nOutChannels ) ) ) != IVAS_ERR_OK ) + if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, splitRendBits.bits_buf, &splitRendBits.bits_read, &splitRendBits.bits_written, + splitRendBits.codec, splitRendBits.pose_correction ) != IVAS_ERR_OK ) { - fprintf( stderr, "\nOutput audio file writer error\n" ); + fprintf( stderr, "\nUnable to write to bitstream file!\n" ); goto cleanup; } - delayNumSamples = 0; } else { - delayNumSamples -= nOutSamples; + if ( ( hSplitRendFileReadWrite != NULL ) && ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) ) + { + if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, splitRendBits.bits_buf, &splitRendBits.bits_read, &splitRendBits.bits_written, + splitRendBits.codec, splitRendBits.pose_correction ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nUnable to write to bitstream file!\n" ); + goto cleanup; + } + } +#endif + if ( delayNumSamples < nOutSamples ) + { + if ( ( error = AudioFileWriter_write( afWriter, &pcmBuf[delayNumSamples * nOutChannels], nOutSamples * nOutChannels - ( delayNumSamples * nOutChannels ) ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nOutput audio file writer error\n" ); + goto cleanup; + } + delayNumSamples = 0; + } + else + { + delayNumSamples -= nOutSamples; + } +#ifdef SPLIT_REND_WITH_HEAD_ROT } +#endif } /* Write ISm metadata to external file(s) */ @@ -2370,11 +2425,18 @@ static ivas_error decodeG192( /* add zeros at the end to have equal length of synthesized signals */ memset( pcmBuf, 0, delayNumSamples_orig[0] * nOutChannels * sizeof( int16_t ) ); - if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, delayNumSamples_orig[0] * nOutChannels ) ) != IVAS_ERR_OK ) +#ifdef SPLIT_REND_WITH_HEAD_ROT + if ( afWriter != NULL ) { - fprintf( stderr, "\nError writing output file: %s\n", ivas_error_to_string( error ) ); - goto cleanup; +#endif + if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, delayNumSamples_orig[0] * nOutChannels ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing output file: %s\n", ivas_error_to_string( error ) ); + goto cleanup; + } +#ifdef SPLIT_REND_WITH_HEAD_ROT } +#endif /*------------------------------------------------------------------------------------------* * Close files and deallocate resources @@ -2384,6 +2446,9 @@ static ivas_error decodeG192( cleanup: +#ifdef SPLIT_REND_WITH_HEAD_ROT + split_rend_reader_writer_close( &hSplitRendFileReadWrite ); +#endif AudioFileWriter_close( &afWriter ); MasaFileWriter_close( &masaWriter ); #ifdef DEBUGGING -- GitLab From 995e7d4ae3560ca3a7d574ec6e645ede003c94c6 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Wed, 2 Aug 2023 10:36:57 +0200 Subject: [PATCH 065/175] address remaining merge comments (ParamUpmix and temp fix for TD object renderer related) --- lib_com/options.h | 1 - lib_dec/ivas_jbm_dec.c | 66 +++++++++++++++------------ lib_rend/ivas_objectRenderer.c | 3 -- lib_rend/ivas_objectRenderer_hrFilt.c | 2 +- 4 files changed, 37 insertions(+), 35 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index cb7750d46f..25fb1a6455 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -160,7 +160,6 @@ // TODO: Check all switches in this section, remove if they were accepted #define FIX_566_2DIR_MASA_384K /* Nokia: Issued 566: Bugfix in 384k MASA metadata encoding of second direction */ #define FIX_XXX_HEADTRACKER_INIT -#define FIX_XXX_TDOBJRENDERER_INPUT /* sgi2bay: seems like this is already covered under FIX_550_FIRST_FRAME_ACCESS */ #define FIX_XXX_ISM_SBA_ASAN #define NONBE_FIX_589_JBM_TC_OFFSETS #define API_5MS diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index e1ebe3fa1f..1e417be740 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -803,8 +803,8 @@ ivas_error ivas_jbm_dec_render( ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, nSamplesRenderedLocal, p_tc, p_output ); st_ivas->hTcBuffer->subframes_rendered++; #else - *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); - ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc, p_output ); + *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); + ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc, p_output ); #endif } } @@ -848,7 +848,7 @@ ivas_error ivas_jbm_dec_render( #ifdef JITTER_MEM_OPTIM_RENDERING ivas_param_ism_dec_render( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, p_output ); #else - ivas_param_ism_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); + ivas_param_ism_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); #endif if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { @@ -856,7 +856,7 @@ ivas_error ivas_jbm_dec_render( #ifdef JITTER_MEM_OPTIM_RENDERING ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, nSamplesRenderedLocal, st_ivas->hOutSetup.ambisonics_order, 0.f ); #else - ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); + ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); #endif } } @@ -870,7 +870,7 @@ ivas_error ivas_jbm_dec_render( #ifdef JITTER_MEM_OPTIM_RENDERING nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); #else - *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); + *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); #endif /* Loudspeaker or Ambisonics rendering */ if ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) @@ -928,8 +928,8 @@ ivas_error ivas_jbm_dec_render( if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, AUDIO_CONFIG_7_1_4, AUDIO_CONFIG_BINAURAL_ROOM_IR, st_ivas->hDecoderConfig, NULL, NULL, NULL, st_ivas->hTcBuffer, p_output, p_output, nSamplesRenderedLocal, output_Fs ) ) != IVAS_ERR_OK ) #else - if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, AUDIO_CONFIG_7_1_4, AUDIO_CONFIG_BINAURAL_ROOM_IR, st_ivas->hDecoderConfig, NULL, NULL, - NULL, st_ivas->hTcBuffer, p_output, p_output, *nSamplesRendered, output_Fs ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, AUDIO_CONFIG_7_1_4, AUDIO_CONFIG_BINAURAL_ROOM_IR, st_ivas->hDecoderConfig, NULL, NULL, + NULL, st_ivas->hTcBuffer, p_output, p_output, *nSamplesRendered, output_Fs ) ) != IVAS_ERR_OK ) #endif { return error; @@ -938,7 +938,7 @@ ivas_error ivas_jbm_dec_render( #ifdef JITTER_MEM_OPTIM_RENDERING ivas_binaural_add_LFE( st_ivas, nSamplesRenderedLocal, p_output, p_output ); #else - ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); + ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); #endif } #ifdef DEBUGGING @@ -1105,7 +1105,11 @@ ivas_error ivas_jbm_dec_render( #ifdef JBM_PARAMUPMIX else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) { +#ifdef JITTER_MEM_OPTIM_RENDERING + ivas_mc_paramupmix_dec_render( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, p_tc, p_output ); +#else ivas_mc_paramupmix_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_tc, p_output ); +#endif /* HP filtering */ for ( n = 0; n < st_ivas->nchan_transport; n++ ) @@ -1118,30 +1122,53 @@ ivas_error ivas_jbm_dec_render( if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) ) { +#ifdef JITTER_MEM_OPTIM_RENDERING + ivas_mc2sba( st_ivas->hTransSetup, p_output, p_output, nSamplesRenderedLocal, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); +#else ivas_mc2sba( st_ivas->hTransSetup, p_output, p_output, *nSamplesRendered, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); +#endif } /* Rendering */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { +#ifdef JITTER_MEM_OPTIM_RENDERING + ivas_binaural_add_LFE( st_ivas, nSamplesRenderedLocal, p_output, p_output ); +#else ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); +#endif } else if ( st_ivas->renderer_type == RENDERER_MC ) { +#ifdef JITTER_MEM_OPTIM_RENDERING + ivas_ls_setup_conversion( st_ivas, MC_PARAMUPMIX_MAX_INPUT_CHANS, nSamplesRenderedLocal, p_output, p_output ); +#else ivas_ls_setup_conversion( st_ivas, MC_PARAMUPMIX_MAX_INPUT_CHANS, *nSamplesRendered, p_output, p_output ); +#endif } else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { +#ifdef JITTER_MEM_OPTIM_RENDERING + ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, nSamplesRenderedLocal, st_ivas->hOutSetup.ambisonics_order, 0.f ); +#else ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); +#endif } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) { +#ifdef JITTER_MEM_OPTIM_RENDERING + if ( ( ivas_td_binaural_renderer( st_ivas, p_output, nSamplesRenderedLocal ) ) != IVAS_ERR_OK ) +#else if ( ( ivas_td_binaural_renderer( st_ivas, p_output, *nSamplesRendered ) ) != IVAS_ERR_OK ) +#endif { return error; } - +#ifdef JITTER_MEM_OPTIM_RENDERING + ivas_binaural_add_LFE( st_ivas, nSamplesRenderedLocal, p_output, p_output ); +#else ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); +#endif } } #endif @@ -1153,27 +1180,6 @@ ivas_error ivas_jbm_dec_render( ivas_param_mc_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); #endif } -// sgi2bay: seems like this was implemented on main in the meantime (see above). Please review -// #ifdef API_5MS -// else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) -// { -// /* zero output for now, not yet implemented... */ -// int16_t ch; -// #ifdef JITTER_MEM_OPTIM_RENDERING -// nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); -// #else -// *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAsked ); -// #endif /* JITTER_MEM_OPTIM_RENDERING */ -// for ( ch = 0; ch < nchan_out; ch++ ) -// { -// #ifdef JITTER_MEM_OPTIM_RENDERING -// set_zero( p_output[ch], nSamplesRenderedLocal ); -// #else -// set_zero( p_output[ch], *nSamplesRendered ); -// #endif /* JITTER_MEM_OPTIM_RENDERING */ -// } -// } -// #endif /* API_5MS */ else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) { int16_t offset = hSpatParamRendCom->slots_rendered * hSpatParamRendCom->slot_size; diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 4cdca32cb0..7160e93817 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -450,9 +450,6 @@ ivas_error TDREND_GetMix( v_multc_acc( &Src_p->InputFrame_p[subframe_idx * subframe_length], pan_right, output_buf[1], subframe_length ); #endif } -#endif -#ifdef FIX_XXX_TDOBJRENDERER_INPUT - Src_p->InputFrame_p += subframe_length; #endif } diff --git a/lib_rend/ivas_objectRenderer_hrFilt.c b/lib_rend/ivas_objectRenderer_hrFilt.c index d3578c379a..36b9d5efeb 100644 --- a/lib_rend/ivas_objectRenderer_hrFilt.c +++ b/lib_rend/ivas_objectRenderer_hrFilt.c @@ -79,7 +79,7 @@ ivas_error TDREND_REND_RenderSourceHRFilt( v_add( LeftOutputFrame, output_buf[0], output_buf[0], subframe_length ); v_add( RightOutputFrame, output_buf[1], output_buf[1], subframe_length ); -#if !defined FIX_550_FIRST_FRAME_ACCESS || !defined FIX_XXX_TDOBJRENDERER_INPUT +#if !defined FIX_550_FIRST_FRAME_ACCESS Src_p->InputFrame_p += subframe_length; /* Increment input pointer */ #endif -- GitLab From 8c837c38bf8ac1e073db1161201b4c98015aa5ce Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 2 Aug 2023 11:14:29 +0200 Subject: [PATCH 066/175] Use first draft of IVAS_DEC_GetSplitBinaural --- apps/decoder.c | 31 ++++++++++++++++++++++------- lib_dec/ivas_binRenderer_internal.c | 6 +++++- lib_dec/lib_dec.c | 17 +++++++++++----- lib_dec/lib_dec.h | 5 +++-- 4 files changed, 44 insertions(+), 15 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 55b33d2bc6..63bc7f5d5b 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -2076,15 +2076,32 @@ static ivas_error decodeG192( } } - /* TODO(sgi): Get split bitstream here */ - error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, pcmBuf + nOutChannels * nSamplesRendered, &nSamplesRendered_loop, &needNewFrame ); - nSamplesRendered += nSamplesRendered_loop; - nSamplesToRender -= nSamplesRendered_loop; - if ( error != IVAS_ERR_OK ) +#ifdef SPLIT_REND_WITH_HEAD_ROT + if ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED || arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) { - fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; + error = IVAS_DEC_GetSplitBinaural(hIvasDec, &splitRendBits, &nSamplesRendered_loop, &needNewFrame ); + nSamplesRendered += nSamplesRendered_loop; + nSamplesToRender -= nSamplesRendered_loop; + if ( error != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetSplitBinaural: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } + else + { +#endif + error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, pcmBuf + nOutChannels * nSamplesRendered, &nSamplesRendered_loop, &needNewFrame ); + nSamplesRendered += nSamplesRendered_loop; + nSamplesToRender -= nSamplesRendered_loop; + if ( error != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } +#ifdef SPLIT_REND_WITH_HEAD_ROT } +#endif } while ( nSamplesRendered < nOutSamples && error == IVAS_ERR_OK ); diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index a7fceba53d..c01769aaaa 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -1730,9 +1730,13 @@ void ivas_rend_CldfbMultiBinRendProcess( for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) { #endif - for ( slot_idx = 0; slot_idx < MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ ) + for ( slot_idx = 0; slot_idx < MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ ) /* FhG@Dolby: this looks suspicious */ { +#ifdef API_5MS + idx = slot_idx; +#else idx = sf_idx * MAX_PARAM_SPATIAL_SUBFRAMES + slot_idx; +#endif for ( ch_idx = 0; ch_idx < hCldfbRend->nInChannels; ch_idx++ ) { mvr2r( &Cldfb_In_Real[ch_idx][idx][0], &Cldfb_RealBuffer_sfIn[ch_idx][slot_idx][0], hCldfbRend->max_band ); diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 8b49a653ff..f6d2fd67d0 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -981,9 +981,10 @@ ivas_error IVAS_DEC_GetSamples( #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT ivas_error IVAS_DEC_GetSplitBinaural( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - bool *needNewFrame, /* indication that the decoder needs a new frame */ - IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits /* o : bitstream output for split rendering mode*/ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode*/ + int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ + bool *needNewFrame /* indication that the decoder needs a new frame */ ) { Decoder_Struct *st_ivas; @@ -991,7 +992,7 @@ ivas_error IVAS_DEC_GetSplitBinaural( int32_t output_Fs; float output[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES][L_FRAME48k]; int16_t output_int[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES * L_FRAME48k]; /* TODO(sgi): Need conversion */ - int16_t numSamplesPerChannel, nOutSamples; + int16_t numSamplesPerChannel; int16_t i, j; ivas_error error; @@ -1006,19 +1007,25 @@ ivas_error IVAS_DEC_GetSplitBinaural( return IVAS_ERR_WRONG_PARAMS; } + *nOutSamples = 0; + while ( error == IVAS_ERR_OK ) { + int16_t nOutSamplesLocal; + /* Decode and render */ if ( ( error = IVAS_DEC_GetSamples( hIvasDec, numSamplesPerChannel, output_int, - &nOutSamples, + &nOutSamplesLocal, needNewFrame ) ) != IVAS_ERR_OK ) { return error; } + *nOutSamples += nOutSamplesLocal; + /*split rendering process calls*/ IVAS_DEC_SPLIT_REND_WRAPPER *hSplitBinRend; int16_t max_band; diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 7ad7a6d87d..a897c1e0c6 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -197,8 +197,9 @@ ivas_error IVAS_DEC_GetSamples( #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT ivas_error IVAS_DEC_GetSplitBinaural( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - bool *needNewFrame, /* indication that the decoder needs a new frame */ - IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits /* o : bitstream output for split rendering mode*/ + IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode*/ + int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ + bool *needNewFrame /* indication that the decoder needs a new frame */ ); #endif -- GitLab From b90b8976daee9c74534d22aa97f7bcab556dc59f Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 2 Aug 2023 12:17:55 +0200 Subject: [PATCH 067/175] Remove leftover enum member --- lib_com/ivas_error.h | 1 - 1 file changed, 1 deletion(-) diff --git a/lib_com/ivas_error.h b/lib_com/ivas_error.h index 7837ff0ac3..9732638af6 100644 --- a/lib_com/ivas_error.h +++ b/lib_com/ivas_error.h @@ -89,7 +89,6 @@ typedef enum #ifdef API_5MS IVAS_ERR_TSM_NOT_ENABLED, IVAS_ERR_FETCH_SIZE_NO_MULTIPLE_OF_5MS, - IVAS_ERR_NEED_NEW_FRAME, #endif #ifdef DEBUGGING IVAS_ERR_INVALID_FORCE_MODE, -- GitLab From 9cebadc99f69e5d60d51bae52b73bdb73ed6ccd3 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 2 Aug 2023 16:03:31 +0200 Subject: [PATCH 068/175] Fix infinite loop in the decoder --- lib_dec/lib_dec.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index f6d2fd67d0..75dc13f597 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1008,18 +1008,20 @@ ivas_error IVAS_DEC_GetSplitBinaural( } *nOutSamples = 0; + *needNewFrame = FALSE; - while ( error == IVAS_ERR_OK ) + while ( error == IVAS_ERR_OK && !*needNewFrame ) { int16_t nOutSamplesLocal; /* Decode and render */ - if ( ( error = IVAS_DEC_GetSamples( + error = IVAS_DEC_GetSamples( hIvasDec, numSamplesPerChannel, output_int, &nOutSamplesLocal, - needNewFrame ) ) != IVAS_ERR_OK ) + needNewFrame ); + if ( error != IVAS_ERR_OK || *needNewFrame ) { return error; } @@ -1039,7 +1041,7 @@ ivas_error IVAS_DEC_GetSplitBinaural( numPoses = hSplitBinRend->splitrend.multiBinPoseData.num_poses; /* [tmp] convert int back to float and change buffer layout */ - for (i = 0; i < numSamplesPerChannel; ++i) + for (i = 0; i < nOutSamplesLocal; ++i) { for (j = 0; j < BINAURAL_CHANNELS * numPoses; ++j) { -- GitLab From 39cfd25ce8d780ee5f682579082c4b8c1c092d76 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Wed, 2 Aug 2023 16:07:42 +0200 Subject: [PATCH 069/175] [fix] merge conflicts --- .gitlab-ci-custom.yml | 1146 +----------------- lib_dec/ivas_ism_renderer.c | 4 + lib_dec/ivas_omasa_dec.c | 14 +- lib_rend/ivas_dirac_dec_binaural_functions.c | 23 +- tests/renderer/constants.py | 2 +- tests/renderer/test_renderer.py | 145 ++- 6 files changed, 148 insertions(+), 1186 deletions(-) diff --git a/.gitlab-ci-custom.yml b/.gitlab-ci-custom.yml index 89cc0a6a4b..86c1f487e0 100644 --- a/.gitlab-ci-custom.yml +++ b/.gitlab-ci-custom.yml @@ -1,1142 +1,4 @@ -# include: -# - project: $CUSTOM_CI_PROJECT -# ref: $CUSTOM_CI_REF -# file: $CUSTOM_CI_FILE - -# Copied from ivas-ci:main - -variables: - # Variables as used in external repo (may be altered in value, see comments) - TESTV_DIR: "/usr/local/testv" - LTV_DIR: "/usr/local/ltv" - BUILD_OUTPUT: "build_output.txt" - EVS_BE_TEST_DIR: "/usr/local/be_2_evs_test" - SANITIZER_TESTS: "CLANG1 CLANG2" - OUT_FORMATS_CHANNEL_BASED: "stereo mono 5_1 5_1_2 5_1_4 7_1 7_1_4" - OUT_FORMATS_SCENE_BASED: "FOA HOA2 HOA3" - OUT_FORMATS_BINAURAL: "BINAURAL BINAURAL_ROOM_IR BINAURAL_ROOM_REVERB" - EXIT_CODE_NON_BE: 123 - EXIT_CODE_FAIL: 1 - # Variables for FhG internal jobs - UPSTREAM_URL: "https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/" - INTERNAL_TESTV_DIR: "/testv" - INTERNAL_CI_REPO_CLONE_DIR: "ivas-internal-ci" - GIT_SUBMODULE_STRATEGY: recursive - - -# This sets when pipelines are created. Jobs have more specific rules to restrict them. -workflow: - rules: - # see https://docs.gitlab.com/ee/ci/yaml/workflow.html#switch-between-branch-pipelines-and-merge-request-pipelines - - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push" - when: never - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' # Runs for merge requests - - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Pushes to main - - if: $CI_PIPELINE_SOURCE == 'schedule' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Scheduled in main - - if: $CI_PIPELINE_SOURCE == 'web' # Scheduled in main - - -stages: - - mirroring-pre-test - - build - - test - - compare - - validate - - mirroring-post-test - -# --------------------------------------------------------------- -# Generic script anchors -# --------------------------------------------------------------- - -# These can be used later on to do common tasks - -# Prints useful information for every job and should be used at the beginning of each job -.print-common-info: &print-common-info - - | - echo "Printing common information for build job." - echo "Current job is run on commit $CI_COMMIT_SHA" - echo "Commit time was $CI_COMMIT_TIMESTAMP" - date | xargs echo "System time is" - -.get-previous-merge-commit-sha: &get-previous-merge-commit-sha - - previous_merge_commit=$(git --no-pager log --merges HEAD~1 -n 1 --pretty=format:%H) - -.mr-fetch-target-branch: &mr-fetch-target-branch - # first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching - # depending on chaching, the branch may not be there, so prevent failure of this command -> should maybe be done smarter later - - git branch -D $CI_MERGE_REQUEST_TARGET_BRANCH_NAME || true - # needed when depth is lower than the number of commits in the branch - - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME - -.mr-get-target-commit: &mr-get-target-commit - # compare to last target branch commit before pipeline was created - - target_commit=$(git log $CI_MERGE_REQUEST_TARGET_BRANCH_NAME -1 --oneline --before=${CI_PIPELINE_CREATED_AT} --format=%H) - -# [INTERNAL] clone the ivas-internal-ci repo -.get-ivas-internal-ci-repo: &get-ivas-internal-ci-repo - - git clone --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@$CI_SERVER_HOST/$CUSTOM_CI_PROJECT $INTERNAL_CI_REPO_CLONE_DIR - -# [INTERNAL] use this anchor to copy over the "old" internal testv/ files -.overwrite-testv-with-internal-ones: &overwrite-testv-with-internal-ones - - cp $INTERNAL_CI_REPO_CLONE_DIR/internal-testv/* scripts/testv/ - -# [INTERNAL] use for getting the sanitizer testvectors from ivas-internal-ci -.get-internal-ltv-signals: &get-internal-ltv-signals - # overwrite config - - cp $INTERNAL_CI_REPO_CLONE_DIR/scripts/ci_sanitizers_fhg_testv.json scripts/config/ci_linux_ltv.json - # copy files - - if [ ! -d "$LTV_DIR" ]; then mkdir -p $LTV_DIR; fi - - cp $INTERNAL_CI_REPO_CLONE_DIR/internal-ltv/* $LTV_DIR/ - -# --------------------------------------------------------------- -# Job templates -# --------------------------------------------------------------- - -# When designing templates, try not to use too much inheritance and -# if multiple templates and extended on, remember that on conflict, -# latest overwrites the parameter. - -# templates for rules -.rules-basis: - rules: - - if: $MIRROR_ACCESS_TOKEN # Don't run in the mirror update pipeline (only then MIRROR_ACCESS_TOKEN is defined) - when: never - - when: on_success - - if: $CI_PIPELINE_SOURCE == 'schedule' # Don't run in any scheduled pipelines by default (use schedule templates below to enable again for certain conditions) - when: never - - when: on_success - -.rules-merge-request: - extends: .rules-basis - rules: - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - -.rules-main-push: - extends: .rules-basis - rules: - - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - -.rules-main-scheduled: - extends: .rules-basis - rules: - - if: $CI_PIPELINE_SOURCE == 'schedule' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - - -# templates to define stages and platforms - -# differs from forge -> we use docker image here -.test-job-linux: - tags: - - exec::docker - image: $CUSTOM_CI_REGISTRY/ubuntu_22.04:latest - -# differs from forge -> we use docker image here -.build-job-linux: - stage: build - # more time internally to accomodate for the shared runners - timeout: "4 minutes" - tags: - - exec::docker - image: $CUSTOM_CI_REGISTRY/ubuntu_22.04:latest - - -# template for test jobs on linux that need the TESTV_DIR -.test-job-linux-needs-testv-dir: - extends: .test-job-linux - tags: - - exec::docker - - res::ivas-testv - before_script: - - if [ ! -d "$TESTV_DIR" ]; then mkdir -p $TESTV_DIR; fi - - cp -r scripts/testv/* $TESTV_DIR/ - -# [INTERNAL] use the internal testvectors for self_test.prm items -.test-job-linux-needs-internal-testv-dir: - extends: .test-job-linux - tags: - - exec::docker - - res::ivas-testv - before_script: - - if [ ! -d "$TESTV_DIR" ]; then mkdir -p $TESTV_DIR; fi - # first copy external testvectors, then overwrite with internal ones - # this way, newly added vectors that have no internal pendent are not missing - - cp -r scripts/testv/* $TESTV_DIR/ - - cp -r $INTERNAL_TESTV_DIR/* $TESTV_DIR/ - -# [INTERNAL] copy "old" internal testvectors to scripts/testv to use them in self_test.prm-based test -.test-job-linux-with-internal-selftest-vectors: - extends: .test-job-linux - tags: - - exec::docker - - res::ivas-testv - before_script: - - cp -r $INTERNAL_TESTV_DIR/* ./scripts/testv/ - -# template for build jobs to include the check for warnings -.build-job-with-check-for-warnings: - extends: .build-job-linux - stage: build - allow_failure: - exit_codes: - - 123 - - -# --------------------------------------------------------------- -# Build jobs -# --------------------------------------------------------------- - -build-codec-linux-make: - extends: - - .build-job-with-check-for-warnings - - .rules-basis - script: - - *print-common-info - - make -j 2>&1 | tee $BUILD_OUTPUT - # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...< - - ci/check_for_warnings.py $BUILD_OUTPUT || exit $? - -build-codec-linux-cmake: - extends: - - .build-job-with-check-for-warnings - - .rules-basis - script: - - *print-common-info - - mkdir build - - cd build - - cmake .. - - cd .. - - make -C build -j 2>&1 | tee $BUILD_OUTPUT - # need to use the "|| exit $?" suffix to get the allowed_failure return code, otherwise the job fails with code 1...< - - ci/check_for_warnings.py $BUILD_OUTPUT || exit $? - -build-codec-instrumented-linux: - extends: - - .build-job-linux - - .rules-basis - script: - - *print-common-info - - bash ci/build_codec_instrumented_linux.sh - allow_failure: true # TODO(sgi): Remove - -# make sure that the codec builds with msan, asan and usan -build-codec-sanitizers-linux: - extends: - - .build-job-linux - - .rules-basis - script: - - *print-common-info - - bash ci/build_codec_sanitizers_linux.sh - - -# --------------------------------------------------------------- -# Test jobs for merge requests -# --------------------------------------------------------------- - -# test that runs all modes with 1s input signals -codec-smoke-test: - extends: - - .test-job-linux-needs-internal-testv-dir - - .rules-merge-request - timeout: "5 minutes" - stage: test - needs: [ "build-codec-linux-cmake" ] - script: - - *print-common-info - - bash ci/smoke_test.sh - ### analyze for failures - - if cat smoke_test_output.txt | grep -c "failed"; then echo "Smoke test without PLC failed"; exit 1; fi - - if cat smoke_test_output_plc.txt | grep -c "failed"; then echo "Smoke test with PLC failed"; exit 1; fi - artifacts: - name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" - when: always - paths: - - out/logs/ - - smoke_test_output.txt - - smoke_test_output_plc.txt - expose_as: 'Smoke test results' - allow_failure: true # TODO(sgi): Remove - - -# code selftest testvectors with memory-sanitizer binaries -msan-on-merge-request-linux: - extends: - - .test-job-linux - - .rules-merge-request - stage: test - needs: [ "build-codec-sanitizers-linux" ] - script: - - *print-common-info - - make clean - - make -j CLANG=1 - - python3 scripts/self_test.py --create | tee test_output.txt - - run_errors=$(cat test_output.txt | grep -ic "run errors") || true - - if [ $run_errors != 0 ] ; then echo "Run errors in self_test.py with Clang memory-sanitizer"; exit 1; fi - artifacts: - name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" - paths: - - scripts/ref/logs/ - - test_output.txt - expose_as: 'Msan selftest results' - - -# code selftest testvectors with address-sanitizer binaries -asan-on-merge-request-linux: - extends: - - .test-job-linux - - .rules-merge-request - stage: test - needs: [ "build-codec-sanitizers-linux" ] - script: - - *print-common-info - - make clean - - make -j CLANG=2 - - python3 scripts/self_test.py --create | tee test_output.txt - - run_errors=$(cat test_output.txt | grep -ic "run errors") || true - - if [ $run_errors != 0 ] ; then echo "Run errors in self_test.py with Clang address-sanitizer"; exit 1; fi - artifacts: - name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" - paths: - - scripts/ref/logs/ - - test_output.txt - expose_as: 'Asan selftest results' - -# test renderer executable -renderer-smoke-test: - extends: - - .test-job-linux - - .rules-merge-request - needs: ["build-codec-linux-make"] - stage: test - script: - - make -j IVAS_rend - - python3 -m pytest -q -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer.py - artifacts: - name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results" - when: always - paths: - - report-junit.xml - expose_as: "renderer make pytest results" - reports: - junit: - - report-junit.xml - -# test renderer executable with cmake + asan -renderer-asan: - extends: - - .test-job-linux - - .rules-merge-request - needs: ["build-codec-linux-cmake"] - stage: test - script: - - python3 ci/disable_ram_counting.py - - cmake -B cmake-build -G "Unix Makefiles" -DCLANG=asan -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true - - cmake --build cmake-build -- -j - - python3 -m pytest -q -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer.py - - artifacts: - name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results" - when: always - paths: - - report-junit.xml - expose_as: "renderer asan pytest results" - reports: - junit: - - report-junit.xml - -# test renderer executable with cmake + msan -renderer-msan: - extends: - - .test-job-linux - - .rules-merge-request - needs: ["build-codec-linux-cmake"] - stage: test - script: - - python3 ci/disable_ram_counting.py - - cmake -B cmake-build -G "Unix Makefiles" -DCLANG=msan -DCOPY_EXECUTABLES_FROM_BUILD_DIR=true - - cmake --build cmake-build -- -j - - python3 -m pytest -q -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer.py - - artifacts: - name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results" - when: always - paths: - - report-junit.xml - expose_as: "renderer msan pytest results" - reports: - junit: - - report-junit.xml - - -renderer-5ms-framing-asan: - extends: - - .test-job-linux - - .rules-merge-request - needs: ["build-codec-linux-cmake"] - stage: test - script: - # Build reference executable - 5ms framing disabled - - cp lib_com/options.h lib_com/options.h.bak - - sed -i '/API_5MS/d' lib_com/options.h - - cmake -B cmake-build-ref . - - cmake --build cmake-build-ref -- -j - - cp cmake-build-ref/IVAS_rend IVAS_rend_ref_5ms - - # Build test executable - - mv -f lib_com/options.h.bak lib_com/options.h - - cmake -B cmake-build -DCLANG=asan . - - cmake --build cmake-build -- -j - - cp cmake-build/IVAS_rend . - - # Run Razel test - - scripts/razel/test_renderer_razel.py - -renderer-5ms-framing-msan: - extends: - - .test-job-linux - - .rules-merge-request - needs: ["build-codec-linux-cmake"] - stage: test - script: - # Build reference executable - 5ms framing disabled - - cp lib_com/options.h lib_com/options.h.bak - - sed -i '/API_5MS/d' lib_com/options.h - - cmake -B cmake-build-ref . - - cmake --build cmake-build-ref -- -j - - cp cmake-build-ref/IVAS_rend IVAS_rend_ref_5ms - - # Build test executable - - mv -f lib_com/options.h.bak lib_com/options.h - - cmake -B cmake-build -DCLANG=msan . - - cmake --build cmake-build -- -j - - cp cmake-build/IVAS_rend . - - # Run Razel test - - scripts/razel/test_renderer_razel.py - -.merge-request-comparison-setup-codec: - &merge-request-comparison-setup-codec ### build test binaries, initial clean for paranoia reasons - - make clean - - mkdir build - - cd build - - cmake .. - - make -j - - mv IVAS_cod ../IVAS_cod_test - - mv IVAS_dec ../IVAS_dec_test - - mv IVAS_rend .. - - cd .. - - rm -rf build/* - - ### store the current commit hash - - source_branch_commit_sha=$(git rev-parse HEAD) - - ### checkout version to compare against - - *mr-fetch-target-branch - - - *mr-get-target-commit - - git checkout $target_commit - - ### build reference binaries - - cd build - - cmake .. - - make -j - - mv IVAS_cod ../IVAS_cod_ref - - mv IVAS_dec ../IVAS_dec_ref - - cd .. - - # rename test binaries back - - mv IVAS_cod_test IVAS_cod - - mv IVAS_dec_test IVAS_dec - -.merge-request-comparison-check: &merge-request-comparison-check - - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi - - if [ $exit_code -eq 1 ] && [ $non_be_flag == 0 ]; then echo "Non-bitexact cases without non-BE tag encountered!"; exit $EXIT_CODE_FAIL; fi - - if [ $exit_code -eq 1 ] && [ $non_be_flag != 0 ]; then echo "Non-bitexact cases with non-BE tag encountered"; exit $EXIT_CODE_NON_BE; fi - - exit 0 - -# compare renderer bitexactness between target and source branch -renderer-pytest-on-merge-request: - extends: - - .test-job-linux - - .rules-merge-request - needs: ["build-codec-linux-make"] - # TODO: set reasonable timeout, will most likely take less - timeout: "20 minutes" - stage: compare - script: - - *print-common-info - - # some helper variables - "|| true" to prevent failures from grep not finding anything - - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[rend\(erer\)*[ -]*non[ -]*be\]") || true - # TODO: needs splitting the test between reference and cut generation - #- ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true - - # store the current commit hash - - source_branch_commit_sha=$(git rev-parse HEAD) - - - *mr-fetch-target-branch - - *mr-get-target-commit - - git checkout $target_commit - - # build reference binaries - - make -j IVAS_rend - - mv IVAS_rend IVAS_rend_ref - - # back to source branch - - git checkout $source_branch_commit_sha - - make clean - - make -j IVAS_rend - - # run test - - exit_code=0 - - python3 -m pytest -q --log-level ERROR -n auto -rA --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/renderer/test_renderer_be_comparison.py || exit_code=$? - - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true - - - *merge-request-comparison-check - - allow_failure: - exit_codes: - - 123 - artifacts: - name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results" - when: always - paths: - - report-junit.xml - - report.html - expose_as: "pytest renderer results" - reports: - junit: - - report-junit.xml - -# compare bit exactness between target and source branch -# [INTERNAL] this uses our own testvectors internally! -ivas-pytest-on-merge-request: - extends: - - .test-job-linux - - .rules-merge-request - stage: compare - needs: ["build-codec-linux-cmake", "codec-smoke-test"] - timeout: "10 minutes" - script: - - *print-common-info - - *merge-request-comparison-setup-codec - - *get-ivas-internal-ci-repo - - *overwrite-testv-with-internal-ones - - # some helper variables - "|| true" to prevent failures from grep not finding anything - - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[non[ -]*be\]") || true - - ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true - - ### If ref_using_main is not set, checkoug the source branch to use scripts and input from there - - if [ $ref_using_main == 0 ]; then git checkout $source_branch_commit_sha; fi - - ### prepare pytest - # create short test vectors - - python3 tests/create_short_testvectors.py - # create references - - python3 -m pytest tests -v --update_ref 1 -m create_ref - - python3 -m pytest tests -v --update_ref 1 -m create_ref_part2 - - ### Run test using branch scripts and input - - if [ $ref_using_main == 1 ]; then git checkout $source_branch_commit_sha; fi - - ### run pytest - - exit_code=0 - - python3 -m pytest tests -v --junit-xml=report-junit.xml || exit_code=$? - - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true - - - *merge-request-comparison-check - - allow_failure: - exit_codes: - - 123 - artifacts: - name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" - when: always - paths: - - report-junit.xml - expose_as: "pytest ivas results" - reports: - junit: - - report-junit.xml - -# compare external renderer bitexactness between target and source branch -external-renderer-pytest-on-merge-request: - extends: - - .test-job-linux - - .rules-merge-request - needs: ["build-codec-linux-make"] - # TODO: set reasonable timeout, will most likely take less - timeout: "20 minutes" - stage: compare - script: - - *print-common-info - - # some helper variables - "|| true" to prevent failures from grep not finding anything - - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[rend\(erer\)*[ -]*non[ -]*be\]") || true - # TODO: needs splitting the test between reference and cut generation - #- ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true - - # store the current commit hash - - source_branch_commit_sha=$(git rev-parse HEAD) - - - *mr-fetch-target-branch - - *mr-get-target-commit - - git checkout $target_commit - - # build reference binaries - - make -j IVAS_rend - - mv IVAS_rend IVAS_rend_ref - - # back to source branch - - git checkout $source_branch_commit_sha - - make clean - - make -j IVAS_rend - - # run test - - exit_code=0 - - python3 -m pytest -q --log-level ERROR -n auto -rA --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/renderer/test_renderer_be_comparison.py || exit_code=$? - - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true - - - *merge-request-comparison-check - - allow_failure: - exit_codes: - - 123 - artifacts: - name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results" - when: always - paths: - - report-junit.xml - - report.html - expose_as: "pytest external renderer results" - reports: - junit: - - report-junit.xml - -evs-pytest-on-merge-request: - extends: - - .test-job-linux - - .rules-merge-request - stage: compare - needs: ["build-codec-linux-cmake", "codec-smoke-test"] - timeout: "10 minutes" - script: - - *print-common-info - - *merge-request-comparison-setup-codec - - *get-ivas-internal-ci-repo - - *overwrite-testv-with-internal-ones - - # some helper variables - "|| true" to prevent failures from grep not finding anything - - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[evs[ -]*non[ -]*be\]") || true - - ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true - - ### If ref_using_main is not set, checkoug the source branch to use scripts and input from there - - if [ $ref_using_main == 0 ]; then git checkout $source_branch_commit_sha; fi - - ### prepare pytest - # create references - - python3 -m pytest tests/test_param_file.py -v --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm - - ### Run test using branch scripts and input - - if [ $ref_using_main == 1 ]; then git checkout $source_branch_commit_sha; fi - - ### run pytest for EVS cases - - exit_code=0 - - python3 -m pytest tests/test_param_file.py -v --param_file scripts/config/self_test_evs.prm --junit-xml=report-junit-evs.xml || exit_code=$? - - zero_errors=$(cat report-junit-evs.xml | grep -c 'errors="0"') || true - - - *merge-request-comparison-check - - allow_failure: - exit_codes: - - 123 - artifacts: - name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" - when: always - paths: - - report-junit-evs.xml - expose_as: "pytest evs results" - reports: - junit: - - report-junit-evs.xml - -clang-format-check: - extends: - - .test-job-linux - - .rules-merge-request - variables: - ARTIFACT_BASE_NAME: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--formatting-fix" - stage: validate - needs: [] - timeout: "5 minutes" - script: - # Set up variables. This can't be done in the "variables" section because variables are not expanded properly there - - PATCH_FILE_NAME="$ARTIFACT_BASE_NAME".patch - - > - INSTRUCTIONS_GITLAB="To fix formatting issues:\n - - download the diff patch available as artifact of this job\n - - unzip the artifact and place the patch file in the root directory of your local IVAS repo\n - - run: git apply $PATCH_FILE_NAME\n - - commit new changes" - - > - INSTRUCTIONS_README="To fix formatting issues:\n - - place the patch file in the root directory of your local IVAS repo\n - - run: git apply $PATCH_FILE_NAME\n - - commit new changes" - - - scripts/check-format.sh -af -p 8 || format_problems=$? - - if [ $format_problems == 0 ] ; then exit 0; fi - - - mkdir tmp-formatting-fix - - git diff > "tmp-formatting-fix/$PATCH_FILE_NAME" - - # Print instructions to job output - - echo -e "$INSTRUCTIONS_GITLAB" - - # Include readme in the artifact, in case someone misses the job printout (e.g. getting the artifact via MR interface) - - echo -e "$INSTRUCTIONS_README" > "tmp-formatting-fix/readme.txt" - - - exit $format_problems - artifacts: - paths: - - tmp-formatting-fix/ - when: on_failure - name: "$ARTIFACT_BASE_NAME" - expose_as: 'formatting patch' - allow_failure: true # TODO(sgi): Remove - - -# --------------------------------------------------------------- -# Test jobs for main branch -# --------------------------------------------------------------- - -# check bitexactness to EVS -# difference to forge: on the forge, this job runs only on pushes to main -# those are mirrored to our repo anyway, so no push-to-main triggers exist in -# our internal repo. Testing BE to EVS is probably only useful before moving a -# feature branch from internal to external repo. Therefore, this job internally -# runs on MR pipelines -be-2-evs-linux: - extends: - - .test-job-linux - # manual rules here to have .rules-main-push + run on MR - rules: - - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - # this is different from the forge repo -> allow manual run of the EVS-BE test - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - when: manual - allow_failure: true - tags: - - be-2-evs-temp - stage: test - needs: [ "build-codec-linux-cmake" ] - timeout: "20 minutes" - script: - - *print-common-info - - - mkdir build - - cd build - - cmake .. - - make -j - - cd .. - - # copy over to never change the testvector dir - - cp -r $EVS_BE_TEST_DIR ./evs_be_test - - cp build/IVAS_cod ./evs_be_test/bin/EVS_cod - - cp build/IVAS_dec ./evs_be_test/bin/EVS_dec - - - cd evs_be_test - - python3 ../ci/run_evs_be_test.py - -codec-comparison-on-main-push: - extends: - - .test-job-linux - - .rules-main-push - stage: compare - needs: [ "build-codec-linux-cmake" ] - timeout: "30 minutes" # To be revisited - script: - - *print-common-info - - latest_commit=$(git rev-parse HEAD) # Latest commit - - *get-previous-merge-commit-sha # Stored in previous_merge_commit shell variable now - - echo "Comparing changes from $previous_merge_commit to $latest_commit" - - git --no-pager diff --stat $previous_merge_commit..$latest_commit - - # Rest is more or less placeholder adapted from MR self test. This should be replaced with more complex tests. - - ### build test binaries, initial clean for paranoia reasons - - make clean - - mkdir build - - cd build - - cmake .. - - make -j - - mv IVAS_cod ../IVAS_cod_test - - mv IVAS_dec ../IVAS_dec_test - - cd .. - - rm -rf build/* - - ### compare to the previous merge commit in the main branch - - git fetch origin main - - git checkout $previous_merge_commit - - ### build reference binaries - - cd build - - cmake .. - - make -j - - mv IVAS_cod ../IVAS_cod_ref - - mv IVAS_dec ../IVAS_dec_ref - - cd .. - - ### re-checkout the latest commit in the main branch - - git checkout $latest_commit - - # helper variable - "|| true" to prevent failures from grep not finding anything - - non_be_flag=$(echo $CI_COMMIT_MESSAGE | grep -c --ignore-case "\[non[ -]*be\]") || true - - ### prepare pytest - # create short test vectors - - python3 tests/create_short_testvectors.py - # rename test binaries back - - mv IVAS_cod_test IVAS_cod - - mv IVAS_dec_test IVAS_dec - # create references - - python3 -m pytest tests -v --update_ref 1 -m create_ref - - python3 -m pytest tests -v --update_ref 1 -m create_ref_part2 - - ### run pytest - - exit_code=0 - - python3 -m pytest tests -v --junit-xml=report-junit.xml || exit_code=$? - - if [ $exit_code -eq 1 ] && [ $non_be_flag == 0 ]; then echo "pytest run had failures and non-BE flag not present"; exit $EXIT_CODE_FAIL; fi - - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true - - if [ $exit_code -eq 1 ] && [ $zero_errors == 1 ]; then echo "pytest run had failures, but no errors and non-BE flag present"; exit $EXIT_CODE_NON_BE; fi - - if [ $exit_code -ne 0 ]; then echo "pytest run had errors"; exit $EXIT_CODE_FAIL; fi; - allow_failure: - exit_codes: - - 123 - artifacts: - name: "main-push--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" - when: always - paths: - - report-junit.xml - expose_as: 'Results of comparison to previous merge commit' - reports: - junit: report-junit.xml - - -# --------------------------------------------------------------- -# Scheduled jobs on main -# --------------------------------------------------------------- -.sanitizer-test-template: - extends: - - .test-job-linux - tags: - - sanitizer_test_main - stage: test - artifacts: - name: "$CI_JOB_NAME--main--sha-$CI_COMMIT_SHORT_SHA" - when: always - paths: - - ep_015.g192 - - ./LOGS_PLC - - ./LOGS_noPLC - -sanitizer-test-mono: - extends: .sanitizer-test-template - rules: - - if: $SANITIZER_TEST_MONO - timeout: "2 hours" - script: - - *get-ivas-internal-ci-repo - - *get-internal-ltv-signals - - ls -altr $LTV_DIR - - ls -altr - - cat scripts/config/ci_linux_ltv.json - - python3 ci/run_scheduled_sanitizer_test.py mono mono --tests $SANITIZER_TESTS - -sanitizer-test-stereo: - extends: .sanitizer-test-template - rules: - - if: $SANITIZER_TEST_STEREO - timeout: "2 hours" - script: - - *get-ivas-internal-ci-repo - - *get-internal-ltv-signals - - ls -altr $LTV_DIR - - ls -altr - - cat scripts/config/ci_linux_ltv.json - - python3 ci/run_scheduled_sanitizer_test.py stereo $OUT_FORMATS_CHANNEL_BASED --tests $SANITIZER_TESTS - -sanitizer-test-stereodmxevs: - extends: .sanitizer-test-template - rules: - - if: $SANITIZER_TEST_STEREODMXEVS - timeout: "2 hours" - script: - - *get-ivas-internal-ci-repo - - *get-internal-ltv-signals - - ls -altr $LTV_DIR - - ls -altr - - cat scripts/config/ci_linux_ltv.json - - python3 ci/run_scheduled_sanitizer_test.py StereoDmxEVS mono --tests $SANITIZER_TESTS - -sanitizer-test-ism1: - extends: .sanitizer-test-template - rules: - - if: $SANITIZER_TEST_ISM1 - timeout: "2 hours" - script: - - *get-ivas-internal-ci-repo - - *get-internal-ltv-signals - - ls -altr $LTV_DIR - - ls -altr - - cat scripts/config/ci_linux_ltv.json - - python3 ci/run_scheduled_sanitizer_test.py ISM1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS - -sanitizer-test-ism2: - extends: .sanitizer-test-template - rules: - - if: $SANITIZER_TEST_ISM2 - timeout: "2 hours" - script: - - *get-ivas-internal-ci-repo - - *get-internal-ltv-signals - - ls -altr $LTV_DIR - - ls -altr - - cat scripts/config/ci_linux_ltv.json - - python3 ci/run_scheduled_sanitizer_test.py ISM2 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS - -sanitizer-test-ism3: - extends: .sanitizer-test-template - rules: - - if: $SANITIZER_TEST_ISM3 - timeout: "3 hours" - script: - - *get-ivas-internal-ci-repo - - *get-internal-ltv-signals - - ls -altr $LTV_DIR - - ls -altr - - cat scripts/config/ci_linux_ltv.json - - python3 ci/run_scheduled_sanitizer_test.py ISM3 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS - -sanitizer-test-ism4: - extends: .sanitizer-test-template - rules: - - if: $SANITIZER_TEST_ISM4 - timeout: "4 hours" - script: - - *get-ivas-internal-ci-repo - - *get-internal-ltv-signals - - ls -altr $LTV_DIR - - ls -altr - - cat scripts/config/ci_linux_ltv.json - - python3 ci/run_scheduled_sanitizer_test.py ISM4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS - -sanitizer-test-masa: - extends: .sanitizer-test-template - rules: - - if: $SANITIZER_TEST_MASA - timeout: "2 hours" - script: - - *get-ivas-internal-ci-repo - - *get-internal-ltv-signals - - ls -altr $LTV_DIR - - ls -altr - - cat scripts/config/ci_linux_ltv.json - - python3 ci/run_scheduled_sanitizer_test.py MASA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS - -sanitizer-test-mc-5_1: - extends: .sanitizer-test-template - rules: - - if: $SANITIZER_TEST_MC51 - timeout: "3 hours" - script: - - *get-ivas-internal-ci-repo - - *get-internal-ltv-signals - - ls -altr $LTV_DIR - - ls -altr - - cat scripts/config/ci_linux_ltv.json - - python3 ci/run_scheduled_sanitizer_test.py 5_1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS - -sanitizer-test-mc-5_1_2: - extends: .sanitizer-test-template - rules: - - if: $SANITIZER_TEST_MC512 - timeout: "3 hours" - script: - - *get-ivas-internal-ci-repo - - *get-internal-ltv-signals - - ls -altr $LTV_DIR - - ls -altr - - cat scripts/config/ci_linux_ltv.json - - python3 ci/run_scheduled_sanitizer_test.py 5_1_2 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS - -sanitizer-test-mc-5_1_4: - extends: .sanitizer-test-template - rules: - - if: $SANITIZER_TEST_MC514 - timeout: "3 hours" - script: - - *get-ivas-internal-ci-repo - - *get-internal-ltv-signals - - ls -altr $LTV_DIR - - ls -altr - - cat scripts/config/ci_linux_ltv.json - - python3 ci/run_scheduled_sanitizer_test.py 5_1_4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS - -sanitizer-test-mc-7_1: - extends: .sanitizer-test-template - rules: - - if: $SANITIZER_TEST_MC71 - timeout: "3 hours" - script: - - *get-ivas-internal-ci-repo - - *get-internal-ltv-signals - - ls -altr $LTV_DIR - - ls -altr - - cat scripts/config/ci_linux_ltv.json - - python3 ci/run_scheduled_sanitizer_test.py 7_1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS - -sanitizer-test-mc-7_1_4: - extends: .sanitizer-test-template - rules: - - if: $SANITIZER_TEST_MC714 - timeout: "3 hours" - script: - - *get-ivas-internal-ci-repo - - *get-internal-ltv-signals - - ls -altr $LTV_DIR - - ls -altr - - cat scripts/config/ci_linux_ltv.json - - python3 ci/run_scheduled_sanitizer_test.py 7_1_4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS - -sanitizer-test-sba: - extends: .sanitizer-test-template - rules: - - if: $SANITIZER_TEST_SBA - timeout: "4 hours" - script: - - *get-ivas-internal-ci-repo - - *get-internal-ltv-signals - - ls -altr $LTV_DIR - - ls -altr - - cat scripts/config/ci_linux_ltv.json - - python3 ci/run_scheduled_sanitizer_test.py SBA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS - -sanitizer-test-planarsba: - extends: .sanitizer-test-template - rules: - - if: $SANITIZER_TEST_PLANARSBA - timeout: "3 hours" - script: - - *get-ivas-internal-ci-repo - - *get-internal-ltv-signals - - ls -altr $LTV_DIR - - ls -altr - - cat scripts/config/ci_linux_ltv.json - - python3 ci/run_scheduled_sanitizer_test.py PlanarSBA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS - - -# GCOV/LCOV coverage analysis of self_test suite -coverage-test-on-main-scheduled: - extends: - - .test-job-linux-needs-internal-testv-dir - - .rules-main-scheduled - tags: - - coverage-test - stage: test - rules: - # only run in scheduled pipeline that passes this env vars - - if: $COVERAGE_TEST - script: - - *print-common-info - - make GCOV=1 -j - - python3 tests/create_short_testvectors.py - - python3 -m pytest tests -v -n 0 --update_ref 1 -m create_ref --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec - - python3 -m pytest tests -v -n 0 --update_ref 1 -m create_ref_part2 --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec - - python3 -m pytest tests/test_param_file.py -v -n 0 --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec - - lcov -c -d obj -o coverage.info - - genhtml coverage.info -o coverage - artifacts: - name: "main-coverage-sha-$CI_COMMIT_SHORT_SHA" - when: always - paths: - - coverage.info - - coverage - -# --------------------------------------------------------------- -# FhG internal - mirroring -# --------------------------------------------------------------- - -# Pull state of a branch on 3GPP repo, push to a mirror repo -.mirror-update: - extends: .test-job-linux - tags: - - host::r10499 - script: - # Set up git LFS for mirroring (see: https://github.com/git-lfs/git-lfs/issues/1762) - - git lfs install --skip-smudge --local - - # Select target branch: - # * if mirroring without testing, push to $CI_COMMIT_BRANCH at mirroring-pre-test stage - # * if mirroring with testing, push to: - # * $CI_COMMIT_BRANCH-mirror-untested at mirroring-pre-test stage - # * $CI_COMMIT_BRANCH at mirroring-post-test stage - - MIRROR_TARGET_BRANCH=$CI_COMMIT_BRANCH - - if [[ $MIRROR_TESTING == 'true' && $CI_JOB_STAGE == 'mirroring-pre-test' ]]; then MIRROR_TARGET_BRANCH="${CI_COMMIT_BRANCH}-mirror-untested"; fi - - # Check out or create mirror target branch - by default the runner checks out by commit hash, which results in detached head state - - git checkout -B $MIRROR_TARGET_BRANCH - - # Pull commits from upstream - - git pull --ff-only $UPSTREAM_URL $MIRROR_SOURCE_BRANCH - - git lfs fetch --all $UPSTREAM_URL $MIRROR_SOURCE_BRANCH - - # Push to mirror. Option `-o ci.skip` tells GitLab to skip CI for the pushed commits (testing already done in current pipeline if enabled) - - git push -o ci.skip "https://${GITLAB_USER_LOGIN}:${MIRROR_ACCESS_TOKEN}@${CI_REPOSITORY_URL#*@}" "HEAD:${MIRROR_TARGET_BRANCH}" - -mirror-update-untested: - rules: - - if: $MIRROR_ACCESS_TOKEN - extends: - - .mirror-update - stage: mirroring-pre-test - -mirror-update-tested: - rules: - - if: $MIRROR_ACCESS_TOKEN && $MIRROR_TESTING == 'true' - extends: - - .mirror-update - stage: mirroring-post-test - - -# --------------------------------------------------------------- -# FhG internal - tests -# --------------------------------------------------------------- - -build-codec-debug-windows-vs2017: - extends: - - .rules-basis - tags: - - os::windows - stage: build - script: - - $ENV:PATH - - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug | tee $BUILD_OUTPUT - - python ci/check_for_warnings.py $BUILD_OUTPUT - allow_failure: - exit_codes: 123 - -build-codec-release-windows-vs2017: - extends: - - .rules-basis - tags: - - os::windows - stage: build - script: - - $ENV:PATH - - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Release | tee $BUILD_OUTPUT - - python ci/check_for_warnings.py $BUILD_OUTPUT - allow_failure: - exit_codes: 123 \ No newline at end of file +include: + - project: $CUSTOM_CI_PROJECT + ref: $CUSTOM_CI_REF + file: $CUSTOM_CI_FILE diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index b34622f51a..f60965706f 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -393,6 +393,7 @@ ivas_error ivas_omasa_separate_object_renderer_open( set_f( st_ivas->hIsmRendererData->prev_gains[i], 0.0f, MAX_OUTPUT_CHANNELS ); } +#ifndef API_5MS // Todo OMASA JBM: This needs touches for VOIP path at least. Current version is mostly an adapted copy from ivas_ism_renderer_open() if ( st_ivas->hDecoderConfig->voip_active ) { @@ -401,9 +402,12 @@ ivas_error ivas_omasa_separate_object_renderer_open( } else { +#endif init_interpolator_length = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ); interpolator_length = init_interpolator_length; +#ifndef API_5MS } +#endif st_ivas->hIsmRendererData->interpolator = (float *) malloc( sizeof( float ) * init_interpolator_length ); for ( i = 0; i < interpolator_length; i++ ) diff --git a/lib_dec/ivas_omasa_dec.c b/lib_dec/ivas_omasa_dec.c index 70cba6176b..7d1ddbebc3 100644 --- a/lib_dec/ivas_omasa_dec.c +++ b/lib_dec/ivas_omasa_dec.c @@ -582,7 +582,12 @@ void ivas_omasa_dirac_rend( dirac_read_idx = st_ivas->hSpatParamRendCom->dirac_read_idx; - ivas_dirac_dec( st_ivas, output, st_ivas->nchan_transport ); + ivas_dirac_dec( st_ivas, output, st_ivas->nchan_transport +#ifdef LIB_REND_API_5MS + , + MAX_PARAM_SPATIAL_SUBFRAMES +#endif + ); st_ivas->hSpatParamRendCom->dirac_read_idx = dirac_read_idx; /* Original read index is needed for the next function which will update it again */ @@ -626,7 +631,12 @@ ivas_error ivas_omasa_dirac_td_binaural( delay_signal( data_separated_objects[n], output_frame, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size ); } - ivas_dirac_dec_binaural( st_ivas, st_ivas->hCombinedOrientationData, output, st_ivas->nchan_transport ); + ivas_dirac_dec_binaural( st_ivas, st_ivas->hCombinedOrientationData, output, st_ivas->nchan_transport +#ifdef LIB_REND_API_5MS + , + MAX_PARAM_SPATIAL_SUBFRAMES +#endif + ); if ( ( error = ivas_td_binaural_renderer( st_ivas, p_sepobj, output_frame ) ) != IVAS_ERR_OK ) { diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index 080ec5ed98..234197415f 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -951,7 +951,11 @@ static void ivas_dirac_dec_binaural_internal( subFrameTotalEne, IIReneLimiter ); #ifdef MASA_AND_OBJECTS ivas_dirac_dec_binaural_formulate_target_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Rmat, subframe, +#ifdef LIB_REND_API_5MS + hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation > 0, +#else hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0, +#endif subFrameTotalEne, IIReneLimiter, st_ivas->hMasaIsmData ); #else ivas_dirac_dec_binaural_formulate_target_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Rmat, subframe, @@ -971,7 +975,11 @@ static void ivas_dirac_dec_binaural_internal( nchanSeparateChannels = (uint8_t) st_ivas->nchan_ism; } ivas_dirac_dec_binaural_determine_processing_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, max_band_decorr, Rmat, +#ifdef LIB_REND_API_5MS + hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation > 0, +#else hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0, +#endif nchanSeparateChannels, st_ivas->hMasaIsmData ); #else ivas_dirac_dec_binaural_determine_processing_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, max_band_decorr, Rmat, @@ -1017,7 +1025,11 @@ static void ivas_dirac_dec_binaural_internal( if ( hCombinedOrientationData ) { +#ifdef LIB_REND_API_5MS + Quaternions_ref = &hCombinedOrientationData->Quaternion; +#else Quaternions_ref = &hCombinedOrientationData->Quaternions[0]; +#endif Quaternions_rot.w = -3.0f; /* signal to use Euler */ Quaternions_abs.w = -3.0f; /* signal to use Euler */ Quat2EulerDegree( *Quaternions_ref, &Quaternions_abs.z, &Quaternions_abs.y, &Quaternions_abs.x ); /*order in Quat2Euler seems to be reversed ?*/ @@ -1047,12 +1059,21 @@ static void ivas_dirac_dec_binaural_internal( #ifdef MASA_AND_OBJECTS ivas_dirac_dec_binaural_formulate_target_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Rmat_local, subframe, +#ifdef LIB_REND_API_5MS + hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation > 0, +#else hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0, +#endif subFrameTotalEne, IIReneLimiter, st_ivas->hMasaIsmData ); ivas_dirac_dec_binaural_determine_processing_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, max_band_decorr, Rmat_local, - hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0, nchanSeparateChannels, st_ivas->hMasaIsmData ); +#ifdef LIB_REND_API_5MS + hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation > 0, +#else + hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0, +#endif + nchanSeparateChannels, st_ivas->hMasaIsmData ); #else ivas_dirac_dec_binaural_formulate_target_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Rmat_local, subframe, diff --git a/tests/renderer/constants.py b/tests/renderer/constants.py index 5780ee964b..f32d1b4d22 100644 --- a/tests/renderer/constants.py +++ b/tests/renderer/constants.py @@ -201,7 +201,7 @@ HR_TRAJECTORIES_TO_TEST = [ ] """ 5ms framing """ -FRAMING_5MS_TO_TEST = [True, False] +FRAMING_5MS_TO_TEST = ["5ms", "20ms"] """ Per-testcase xfail SNR thresholds (dB) """ pass_snr = dict() # not relevant for tests anymore, should be deprecated soon diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index 958b09f110..b654c18a56 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -37,7 +37,12 @@ from .utils import * @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_ambisonics(test_info, in_fmt, out_fmt, framing_5ms): - run_renderer(in_fmt, out_fmt, test_case_name=test_info.node.name, framing_5ms=framing_5ms) + run_renderer( + in_fmt, + out_fmt, + test_case_name=test_info.node.name, + framing_5ms=(framing_5ms == "5ms"), + ) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @@ -47,14 +52,21 @@ def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): if not framing_5ms: pytest.xfail("Binaural output currently only supported with 5ms framing") - run_renderer(in_fmt, out_fmt, test_case_name=test_info.node.name, framing_5ms=framing_5ms) + run_renderer( + in_fmt, + out_fmt, + test_case_name=test_info.node.name, + framing_5ms=(framing_5ms == "5ms"), + ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) -def test_ambisonics_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing_5ms): +def test_ambisonics_binaural_headrotation( + test_info, in_fmt, out_fmt, trj_file, framing_5ms +): if not framing_5ms: pytest.xfail("Binaural output currently only supported with 5ms framing") @@ -63,7 +75,7 @@ def test_ambisonics_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, out_fmt, test_case_name=test_info.node.name, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), - framing_5ms=framing_5ms, + framing_5ms=(framing_5ms == "5ms"), ) @@ -82,12 +94,12 @@ def test_ambisonics_binaural_headrotation_refrotzero( ref_kwargs={ "name_extension": "refrotzero", "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), - "framing_5ms": True, + "framing_5ms": "5ms", }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), "refrot_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), - "framing_5ms": True, + "framing_5ms": "5ms", }, ) @@ -104,7 +116,7 @@ def test_ambisonics_binaural_headrotation_refrotequal(test_info, in_fmt, out_fmt out_fmt, ref_kwargs={ "name_extension": "refrotequal", - "framing_5ms": True, + "framing_5ms": "5ms", }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath( @@ -113,7 +125,7 @@ def test_ambisonics_binaural_headrotation_refrotequal(test_info, in_fmt, out_fmt "refrot_file": HR_TRAJECTORY_DIR.joinpath( "azi_plus_2-ele_plus_2-every-25-rows.csv" ), - "framing_5ms": True, + "framing_5ms": "5ms", }, ) @@ -135,12 +147,12 @@ def test_ambisonics_binaural_headrotation_refveczero( ref_kwargs={ "name_extension": "refveczero", "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), - "framing_5ms": True, + "framing_5ms": "5ms", }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath("const000-Vector3.csv"), - "framing_5ms": True, + "framing_5ms": "5ms", }, ) @@ -162,7 +174,7 @@ def test_ambisonics_binaural_headrotation_refvecequal(test_info, in_fmt, out_fmt out_fmt, ref_kwargs={ "name_extension": "refvecequal", - "framing_5ms": True, + "framing_5ms": "5ms", }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath( @@ -171,7 +183,7 @@ def test_ambisonics_binaural_headrotation_refvecequal(test_info, in_fmt, out_fmt "refvec_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-Vector3.csv" ), - "framing_5ms": True, + "framing_5ms": "5ms", }, ) @@ -196,14 +208,14 @@ def test_ambisonics_binaural_headrotation_refvec_rotating(test_info, in_fmt, out "trj_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s.csv" ), - "framing_5ms": True, + "framing_5ms": "5ms", }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-ccw-Vector3.csv" ), - "framing_5ms": True, + "framing_5ms": "5ms", }, ) @@ -228,14 +240,14 @@ def test_ambisonics_binaural_headrotation_refvec_rotating_fixed_pos_offset( "trj_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-ccw.csv" ), - "framing_5ms": True, + "framing_5ms": "5ms", }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-fixed-pos-offset-Vector3.csv" ), - "framing_5ms": True, + "framing_5ms": "5ms", }, ) @@ -260,12 +272,12 @@ def test_ambisonics_binaural_headrotation_refveclev_vs_refvec( "refveclev_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-Vector3.csv" ), - "framing_5ms": True, + "framing_5ms": "5ms", }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-4s-Vector3.csv"), - "framing_5ms": True, + "framing_5ms": "5ms", }, ) @@ -277,7 +289,12 @@ def test_ambisonics_binaural_headrotation_refveclev_vs_refvec( @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_multichannel(test_info, in_fmt, out_fmt, framing_5ms): - run_renderer(in_fmt, out_fmt, test_case_name=test_info.node.name, framing_5ms=framing_5ms) + run_renderer( + in_fmt, + out_fmt, + test_case_name=test_info.node.name, + framing_5ms=(framing_5ms == "5ms"), + ) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @@ -289,14 +306,21 @@ def test_multichannel_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): if not framing_5ms: pytest.xfail("Binaural output currently only supported with 5ms framing") - run_renderer(in_fmt, out_fmt, test_case_name=test_info.node.name, framing_5ms=framing_5ms) + run_renderer( + in_fmt, + out_fmt, + test_case_name=test_info.node.name, + framing_5ms=(framing_5ms == "5ms"), + ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) -def test_multichannel_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing_5ms): +def test_multichannel_binaural_headrotation( + test_info, in_fmt, out_fmt, trj_file, framing_5ms +): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") if not framing_5ms: @@ -308,7 +332,7 @@ def test_multichannel_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file out_fmt, test_case_name=test_info.node.name, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), - framing_5ms=framing_5ms, + framing_5ms=(framing_5ms == "5ms"), ) else: run_renderer( @@ -316,7 +340,7 @@ def test_multichannel_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file out_fmt, test_case_name=test_info.node.name, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), - framing_5ms=framing_5ms, + framing_5ms=(framing_5ms == "5ms"), ) @@ -339,14 +363,14 @@ def test_multichannel_binaural_headrotation_refvec_rotating(test_info, in_fmt, o "trj_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s.csv" ), - "framing_5ms": True, + "framing_5ms": "5ms", }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), "refvec_file": HR_TRAJECTORY_DIR.joinpath( "full-circle-with-up-and-down-4s-ccw-Vector3.csv" ), - "framing_5ms": True, + "framing_5ms": "5ms", }, ) @@ -358,7 +382,13 @@ def test_multichannel_binaural_headrotation_refvec_rotating(test_info, in_fmt, o @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_ism(test_info, in_fmt, out_fmt, framing_5ms): - run_renderer(in_fmt, out_fmt, test_case_name=test_info.node.name, in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt], framing_5ms=framing_5ms) + run_renderer( + in_fmt, + out_fmt, + test_case_name=test_info.node.name, + in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt], + framing_5ms=(framing_5ms == "5ms"), + ) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @@ -374,9 +404,21 @@ def test_ism_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): in_meta_files = None if out_fmt == "BINAURAL": - run_renderer(in_fmt, out_fmt, test_case_name=test_info.node.name, in_meta_files=in_meta_files, framing_5ms=framing_5ms) + run_renderer( + in_fmt, + out_fmt, + test_case_name=test_info.node.name, + in_meta_files=in_meta_files, + framing_5ms=(framing_5ms == "5ms"), + ) else: - run_renderer(in_fmt, out_fmt, test_case_name=test_info.node.name, in_meta_files=in_meta_files, framing_5ms=framing_5ms) + run_renderer( + in_fmt, + out_fmt, + test_case_name=test_info.node.name, + in_meta_files=in_meta_files, + framing_5ms=(framing_5ms == "5ms"), + ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @@ -399,7 +441,7 @@ def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing test_case_name=test_info.node.name, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), in_meta_files=in_meta_files, - framing_5ms=framing_5ms, + framing_5ms=(framing_5ms == "5ms"), ) else: run_renderer( @@ -408,7 +450,7 @@ def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing test_case_name=test_info.node.name, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), in_meta_files=in_meta_files, - framing_5ms=framing_5ms, + framing_5ms=(framing_5ms == "5ms"), ) @@ -434,7 +476,7 @@ def test_ism_binaural_headrotation_refvec_rotating(test_info, in_fmt, out_fmt): "full-circle-with-up-and-down-4s.csv" ), "in_meta_files": in_meta_files, - "framing_5ms": True, + "framing_5ms": "5ms", }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), @@ -442,7 +484,7 @@ def test_ism_binaural_headrotation_refvec_rotating(test_info, in_fmt, out_fmt): "full-circle-with-up-and-down-4s-ccw-Vector3.csv" ), "in_meta_files": in_meta_files, - "framing_5ms": True, + "framing_5ms": "5ms", }, ) @@ -454,7 +496,13 @@ def test_ism_binaural_headrotation_refvec_rotating(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_masa(test_info, in_fmt, out_fmt, framing_5ms): - run_renderer(in_fmt, out_fmt, test_case_name=test_info.node.name, in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt], framing_5ms=framing_5ms) + run_renderer( + in_fmt, + out_fmt, + test_case_name=test_info.node.name, + in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt], + framing_5ms=(framing_5ms == "5ms"), + ) """ Custom loudspeaker layouts """ @@ -464,7 +512,12 @@ def test_masa(test_info, in_fmt, out_fmt, framing_5ms): @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_custom_ls_input(test_info, in_layout, out_fmt, framing_5ms): - run_renderer(CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, test_case_name=test_info.node.name, framing_5ms=framing_5ms) + run_renderer( + CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), + out_fmt, + test_case_name=test_info.node.name, + framing_5ms=(framing_5ms == "5ms"), + ) @pytest.mark.parametrize("out_fmt", CUSTOM_LS_TO_TEST) @@ -497,7 +550,7 @@ def test_custom_ls_input_binaural(test_info, in_layout, out_fmt, framing_5ms): run_renderer( CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, - framing_5ms=framing_5ms, + framing_5ms=(framing_5ms == "5ms"), test_case_name=test_info.node.name, ) @@ -506,7 +559,9 @@ def test_custom_ls_input_binaural(test_info, in_layout, out_fmt, framing_5ms): @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) -def test_custom_ls_input_binaural_headrotation(test_info, in_layout, out_fmt, trj_file, framing_5ms): +def test_custom_ls_input_binaural_headrotation( + test_info, in_layout, out_fmt, trj_file, framing_5ms +): if not framing_5ms: pytest.xfail("Binaural output currently only supported with 5ms framing") @@ -515,7 +570,7 @@ def test_custom_ls_input_binaural_headrotation(test_info, in_layout, out_fmt, tr out_fmt, test_case_name=test_info.node.name, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), - framing_5ms=framing_5ms, + framing_5ms=(framing_5ms == "5ms"), ) @@ -531,7 +586,7 @@ def test_metadata(test_info, in_fmt, out_fmt, framing_5ms): out_fmt, test_case_name=test_info.node.name, metadata_input=TEST_VECTOR_DIR.joinpath(f"{in_fmt}.txt"), - framing_5ms=framing_5ms, + framing_5ms=(framing_5ms == "5ms"), ) @@ -542,11 +597,21 @@ def test_metadata(test_info, in_fmt, out_fmt, framing_5ms): @pytest.mark.parametrize("in_fmt", ["MONO"]) @pytest.mark.parametrize("non_diegetic_pan", ["0", "-30", "45", "90", "-90"]) def test_non_diegetic_pan_static(test_info, in_fmt, out_fmt, non_diegetic_pan): - run_renderer(in_fmt, out_fmt, test_case_name=test_info.node.name, non_diegetic_pan=non_diegetic_pan) + run_renderer( + in_fmt, + out_fmt, + test_case_name=test_info.node.name, + non_diegetic_pan=non_diegetic_pan, + ) @pytest.mark.parametrize("out_fmt", ["STEREO"]) @pytest.mark.parametrize("in_fmt", ["ISM1"]) @pytest.mark.parametrize("non_diegetic_pan", ["0", "-30", "45", "90", "-90"]) def test_non_diegetic_pan_ism_static(test_info, in_fmt, out_fmt, non_diegetic_pan): - run_renderer(in_fmt, out_fmt, test_case_name=test_info.node.name, non_diegetic_pan=non_diegetic_pan) + run_renderer( + in_fmt, + out_fmt, + test_case_name=test_info.node.name, + non_diegetic_pan=non_diegetic_pan, + ) -- GitLab From 8cf2df15638cca24b42cd9c9338a90132df93393 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 2 Aug 2023 16:50:27 +0200 Subject: [PATCH 070/175] Fix instrumented build --- lib_dec/lib_dec.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 974589639b..caf2a7a5cd 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1113,6 +1113,10 @@ ivas_error IVAS_DEC_GetSplitBinaural( while ( error == IVAS_ERR_OK && !*needNewFrame ) { int16_t nOutSamplesLocal; + IVAS_DEC_SPLIT_REND_WRAPPER *hSplitBinRend; + int16_t max_band; + int16_t pcm_out; + int16_t numPoses; /* Decode and render */ error = IVAS_DEC_GetSamples( @@ -1129,11 +1133,6 @@ ivas_error IVAS_DEC_GetSplitBinaural( *nOutSamples += nOutSamplesLocal; /*split rendering process calls*/ - IVAS_DEC_SPLIT_REND_WRAPPER *hSplitBinRend; - int16_t max_band; - int16_t pcm_out; - int16_t numPoses; - hSplitBinRend = &st_ivas->splitBinRend; ivas_set_split_rend_setup(hSplitBinRend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hCombinedOrientationData, hSplitRendBits ); -- GitLab From 6fe075c459e3edc37138d745543a51f08df7e804 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 2 Aug 2023 17:01:57 +0200 Subject: [PATCH 071/175] Fix warnings --- lib_dec/ivas_binRenderer_internal.c | 13 ++++++++++--- lib_rend/ivas_crend.c | 5 ++++- lib_rend/lib_rend.c | 25 ++++++++++++++----------- 3 files changed, 28 insertions(+), 15 deletions(-) diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index 80fd2f16db..917db39156 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -2236,7 +2236,10 @@ void ivas_rend_CldfbMultiBinRendProcess( float Cldfb_Out_Imag[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], const int16_t low_res_pre_rend_rot ) { - int16_t sf_idx, slot_idx, ch_idx, idx, pose_idx, i, j; + int16_t slot_idx, ch_idx, idx, pose_idx, i, j; +#ifndef API_5MS + int16_t sf_idx; +#endif float Cldfb_RealBuffer_sfIn[MAX_INPUT_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; float Cldfb_ImagBuffer_sfIn[MAX_INPUT_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; #ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG @@ -2252,7 +2255,7 @@ void ivas_rend_CldfbMultiBinRendProcess( for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) { #endif - for ( slot_idx = 0; slot_idx < MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ ) /* FhG@Dolby: this looks suspicious */ + for ( slot_idx = 0; slot_idx < MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ ) /* TODO(splitrend): this looks strange */ { #ifdef API_5MS idx = slot_idx; @@ -2307,9 +2310,13 @@ void ivas_rend_CldfbMultiBinRendProcess( for ( pose_idx = 0; pose_idx < hCldfbRend->numPoses; pose_idx++ ) { - for ( slot_idx = 0; slot_idx < MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ ) + for ( slot_idx = 0; slot_idx < MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ ) /* TODO(splitrend): this looks strange */ { +#ifdef API_5MS + idx = slot_idx; +#else idx = sf_idx * MAX_PARAM_SPATIAL_SUBFRAMES + slot_idx; +#endif for ( ch_idx = 0; ch_idx < BINAURAL_CHANNELS; ch_idx++ ) { mvr2r( &Cldfb_RealBuffer_Binaural[pose_idx][ch_idx][slot_idx][0], &Cldfb_Out_Real[( pose_idx * BINAURAL_CHANNELS ) + ch_idx][idx][0], hCldfbRend->max_band ); diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index 6db2a8ccce..02319321f3 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -1800,7 +1800,10 @@ ivas_error ivas_rend_crendProcessSplitBin( float *output[], const int32_t output_Fs ) { - int16_t i, j, sf; + int16_t i, j; +#ifndef API_5MS + int16_t sf; +#endif int16_t pos_idx, output_frame; ivas_error error; float gain_lfe; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 862bedaf94..ba8246bccf 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -5808,8 +5808,10 @@ static ivas_error rotateFrameSba( float tmpRot[2 * HEADROT_ORDER + 1]; rotation_gains gains; ivas_error error; +#ifndef API_5MS int16_t idx; float val, cf, oneminuscf; +#endif push_wmops( "rotateFrameSba" ); @@ -5869,14 +5871,11 @@ static ivas_error rotateFrameSba( for ( i = 0; i < subframe_len; i++ ) #endif { -#ifdef API_5MS - idx = i; - cf = crossfade[i]; -#else +#ifndef API_5MS idx = subframe_idx * subframe_len + i; cf = headRotData->crossfade[i]; -#endif oneminuscf = 1 - cf; +#endif /* As the rotation matrix becomes block diagonal in a SH basis, we can*/ /* apply each angular-momentum block individually to save complexity. */ @@ -7241,7 +7240,10 @@ static ivas_error renderMcToSplitBinaural( const IVAS_REND_AudioConfig outConfig, IVAS_REND_AudioBuffer outAudio ) { - int16_t i, j, sf, pos_idx; + int16_t i, j, pos_idx; +#ifndef API_5MS + int16_t sf; +#endif int16_t output_frame; ivas_error error; const MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData; @@ -7819,7 +7821,10 @@ static ivas_error renderSbaToMultiBinaural( float tmpCrendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; float *p_tmpCrendBuffer[MAX_OUTPUT_CHANNELS]; - int16_t sf, i, j, pos_idx; +#ifndef API_5MS + int16_t sf; +#endif + int16_t i, j, pos_idx; COMBINED_ORIENTATION_DATA combinedOrientationDataLocal; COMBINED_ORIENTATION_HANDLE pCombinedOrientationDataLocal; @@ -8047,10 +8052,8 @@ static ivas_error renderSbaToBinaural( #ifdef API_5MS /* fix compiling only, ToDo ext renderer needs to adapted to 5ms */ - if ( ( *hCombinedOrientationData )->enableCombinedOrientation != 0 ) - { - combinedOrientationEnabled = 1; - } + hCombinedOrientationData = sbaInput->base.ctx.pCombinedOrientationData; + combinedOrientationEnabled = ( *hCombinedOrientationData )->enableCombinedOrientation; #else hCombinedOrientationData = sbaInput->base.ctx.pCombinedOrientationData; combinedOrientationEnabled = 0; -- GitLab From d5668a87f19dd67a8c32326ddf2c5469c052f146 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Wed, 2 Aug 2023 17:06:47 +0200 Subject: [PATCH 072/175] reenable default coding path for split rendering --- apps/decoder.c | 54 ++++++++-- lib_com/ivas_prot.h | 4 +- lib_com/options.h | 1 + lib_dec/ivas_dec.c | 55 ++++++++-- lib_dec/ivas_dirac_dec.c | 4 + lib_dec/ivas_init_dec.c | 14 ++- lib_dec/ivas_ism_dec.c | 8 ++ lib_dec/ivas_ism_param_dec.c | 12 ++- lib_dec/ivas_ism_renderer.c | 2 +- lib_dec/ivas_jbm_dec.c | 8 +- lib_dec/ivas_masa_dec.c | 8 ++ lib_dec/ivas_mc_param_dec.c | 8 +- lib_dec/ivas_mc_paramupmix_dec.c | 6 +- lib_dec/ivas_mct_dec.c | 9 +- lib_dec/ivas_output_config.c | 3 +- lib_dec/ivas_sba_dec.c | 5 +- lib_dec/ivas_spar_decoder.c | 4 + lib_dec/ivas_stat_dec.h | 5 +- lib_dec/lib_dec.c | 107 +++++++++++++------ lib_dec/lib_dec.h | 3 + lib_rend/ivas_dirac_dec_binaural_functions.c | 4 + lib_rend/lib_rend.c | 62 ++++++----- 22 files changed, 284 insertions(+), 102 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 63bc7f5d5b..1e19d7f196 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -143,6 +143,9 @@ typedef struct IVAS_DEC_COMPLEXITY_LEVEL complexityLevel; #ifdef API_5MS bool tsmEnabled; +#ifdef API_5MS_BASELINE + bool enable5ms; +#endif #endif #ifdef DEBUGGING IVAS_DEC_FORCED_REND_MODE forcedRendMode; @@ -439,10 +442,17 @@ int main( if ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED || arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) { arg.enableHeadRotation = true; +#ifdef API_5MS_BASELINE + arg.enable5ms = false; +#endif } #endif #ifdef API_5MS - if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.tsmEnabled, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.tsmEnabled, +#ifdef API_5MS_BASELINE + arg.enable5ms, +#endif + arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) #endif @@ -973,6 +983,9 @@ static bool parseCmdlIVAS_dec( arg->non_diegetic_pan_gain = 0.f; #ifdef API_5MS arg->tsmEnabled = false; +#ifdef API_5MS_BASELINE + arg->enable5ms = false; +#endif #endif #ifdef DEBUGGING #ifdef VARIABLE_SPEED_DECODING @@ -1129,6 +1142,9 @@ static bool parseCmdlIVAS_dec( int32_t tmp = 100; #ifdef API_5MS arg->tsmEnabled = true; +#ifdef API_5MS_BASELINE + arg->enable5ms = true; +#endif #else arg->variableSpeedMode = true; #endif @@ -1188,6 +1204,9 @@ static bool parseCmdlIVAS_dec( else if ( strcmp( argv_to_upper, "-T" ) == 0 ) { arg->enableHeadRotation = true; +#ifdef API_5MS_BASELINE + arg->enable5ms = true; +#endif i++; if ( argc - i <= 4 || argv[i][0] == '-' ) @@ -1895,7 +1914,11 @@ static ivas_error decodeG192( nSamplesAvailableNext = 0; vec_pos_update = 0; - if ( arg.enableHeadRotation ) + if ( arg.enableHeadRotation +#ifdef API_5MS_BASELINE + && arg.enable5ms +#endif + ) { nOutSamples = (int16_t) ( arg.output_Fs / 1000 * HEADROTATION_FETCH_FRAMESIZE_MS ); vec_pos_len = IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; @@ -1911,6 +1934,8 @@ static ivas_error decodeG192( splitRendBits.bits_read = 0; splitRendBits.bits_written = 0; splitRendBits.buf_len = MAX_SPLIT_REND_BITS_BUFFER_SIZE_IN_BYTES; + splitRendBits.pose_correction = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE; + splitRendBits.codec = IVAS_SPLIT_REND_CODEC_NONE; hSplitRendFileReadWrite = NULL; #endif @@ -1967,10 +1992,16 @@ static ivas_error decodeG192( #ifdef SPLIT_REND_WITH_HEAD_ROT if ( headRotReader == NULL ) { - Quaternion.w = -3.0f; - Quaternion.x = 0.0f; - Quaternion.y = 0.0f; - Quaternion.z = 0.0f; + Quaternion.w = -3.0f; + Quaternion.x = 0.0f; + Quaternion.y = 0.0f; + Quaternion.z = 0.0f; + +#ifdef API_5MS + Pos.x = 0.0f; + Pos.y = 0.0f; + Pos.z = 0.0f; +#endif } else { @@ -2079,7 +2110,7 @@ static ivas_error decodeG192( #ifdef SPLIT_REND_WITH_HEAD_ROT if ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED || arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) { - error = IVAS_DEC_GetSplitBinaural(hIvasDec, &splitRendBits, &nSamplesRendered_loop, &needNewFrame ); + error = IVAS_DEC_GetSplitBinaural( hIvasDec, &splitRendBits, &nSamplesRendered_loop, &needNewFrame ); nSamplesRendered += nSamplesRendered_loop; nSamplesToRender -= nSamplesRendered_loop; if ( error != IVAS_ERR_OK ) @@ -2141,7 +2172,7 @@ static ivas_error decodeG192( , &hSplitRendFileReadWrite #endif - ); + ); if ( error != IVAS_ERR_OK ) { goto cleanup; @@ -2321,11 +2352,12 @@ static ivas_error decodeG192( } - if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternion, Pos + if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternion, Pos #ifdef SPLIT_REND_WITH_HEAD_ROT - ,DEFAULT_AXIS + , + DEFAULT_AXIS #endif - ) ) != IVAS_ERR_OK ) + ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 6e422151a6..f30ec2b9a0 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -305,11 +305,11 @@ void stereo_dmx_evs_close_encoder( STEREO_DMX_EVS_ENC_HANDLE *hStereoDmxEVS /* i/o: Stereo downmix for EVS encoder handle */ ); -#ifndef API_5MS +#if !defined(API_5MS) || defined (API_5MS_BASELINE) ivas_error ivas_dec( Decoder_Struct *st_ivas, /* i : IVAS decoder structure */ int16_t *data /* o : output synthesis signal */ -#ifdef SPLIT_REND_WITH_HEAD_ROT +#if defined SPLIT_REND_WITH_HEAD_ROT && !defined(API_5MS) , IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits #endif diff --git a/lib_com/options.h b/lib_com/options.h index 25fb1a6455..b797c1b36a 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -166,6 +166,7 @@ #ifdef API_5MS #define JITTER_MEM_OPTIM_RENDERING #define LIB_REND_API_5MS /* FhG: Adds 5ms framing capability to lib_rend */ /* TODO(sgi): needs to be joined with API_5MS */ +#define API_5MS_BASELINE #endif #define LIB_REND_FIX_HRTFPARAMBIN_MEMLEAK // 5 ms branch switches end diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index 465e2df11b..fb77968447 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -32,7 +32,7 @@ #include #include "options.h" -#ifndef API_5MS +#if !defined( API_5MS ) || defined( API_5MS_BASELINE ) #include "cnst.h" #include "ivas_cnst.h" #include "rom_com.h" @@ -55,7 +55,7 @@ ivas_error ivas_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ int16_t *data /* o : output synthesis signal */ -#ifdef SPLIT_REND_WITH_HEAD_ROT +#if defined SPLIT_REND_WITH_HEAD_ROT && !defined( API_5MS ) , IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits #endif @@ -121,7 +121,7 @@ ivas_error ivas_dec( return error; } -#ifdef SPLIT_REND_WITH_HEAD_ROT +#if defined SPLIT_REND_WITH_HEAD_ROT && !defined(API_5MS) if ( ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) { @@ -215,7 +215,12 @@ ivas_error ivas_dec( { ivas_param_ism_params_to_masa_param_mapping( st_ivas ); - ivas_dirac_dec_binaural( st_ivas, st_ivas->hCombinedOrientationData, output, st_ivas->nchan_transport ); + ivas_dirac_dec_binaural( st_ivas, st_ivas->hCombinedOrientationData, output, st_ivas->nchan_transport +#ifdef LIB_REND_API_5MS + , + MAX_PARAM_SPATIAL_SUBFRAMES +#endif + ); } else if ( st_ivas->renderer_type == RENDERER_MONO_DOWNMIX ) { @@ -292,6 +297,10 @@ ivas_error ivas_dec( { 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 +#ifdef LIB_REND_API_5MS + , + MAX_PARAM_SPATIAL_SUBFRAMES +#endif #ifdef SPLIT_REND_WITH_HEAD_ROT , 0 @@ -469,7 +478,12 @@ ivas_error ivas_dec( /* Loudspeakers, Ambisonics or Binaural rendering */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { - ivas_dirac_dec_binaural( st_ivas, st_ivas->hCombinedOrientationData, output, nchan_remapped ); + ivas_dirac_dec_binaural( st_ivas, st_ivas->hCombinedOrientationData, output, nchan_remapped +#ifdef LIB_REND_API_5MS + , + MAX_PARAM_SPATIAL_SUBFRAMES +#endif + ); } else if ( st_ivas->ivas_format == MASA_FORMAT ) { @@ -482,7 +496,12 @@ ivas_error ivas_dec( } else if ( st_ivas->renderer_type == RENDERER_DIRAC ) { - ivas_dirac_dec( st_ivas, output, nchan_remapped ); + ivas_dirac_dec( st_ivas, output, nchan_remapped +#ifdef LIB_REND_API_5MS + , + MAX_PARAM_SPATIAL_SUBFRAMES +#endif + ); } } else if ( !st_ivas->sba_dirac_stereo_flag && nchan_out != 1 ) @@ -547,6 +566,10 @@ ivas_error ivas_dec( #endif 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 +#ifdef LIB_REND_API_5MS + , + MAX_PARAM_SPATIAL_SUBFRAMES +#endif #ifdef SPLIT_REND_WITH_HEAD_ROT , 0 @@ -812,11 +835,21 @@ ivas_error ivas_dec( /* Rendering */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { - ivas_dirac_dec_binaural( st_ivas, st_ivas->hCombinedOrientationData, output, st_ivas->nchan_transport ); + ivas_dirac_dec_binaural( st_ivas, st_ivas->hCombinedOrientationData, output, st_ivas->nchan_transport +#ifdef LIB_REND_API_5MS + , + MAX_PARAM_SPATIAL_SUBFRAMES +#endif + ); } else if ( st_ivas->renderer_type == RENDERER_DIRAC || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) /* rendering to CICPxx and Ambisonics */ { - ivas_dirac_dec( st_ivas, output, st_ivas->nchan_transport ); + ivas_dirac_dec( st_ivas, output, st_ivas->nchan_transport +#ifdef LIB_REND_API_5MS + , + MAX_PARAM_SPATIAL_SUBFRAMES +#endif + ); if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { @@ -838,7 +871,7 @@ ivas_error ivas_dec( } -#ifdef SPLIT_REND_WITH_HEAD_ROT +#if defined( SPLIT_REND_WITH_HEAD_ROT ) && !defined(API_5MS) /*split rendering process calls*/ if ( ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) @@ -851,7 +884,11 @@ ivas_error ivas_dec( pcm_out = ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0; ivas_renderMultiBinToSplitBinaural( &hSplitBinRend->splitrend, +#ifdef API_5MS + st_ivas->hHeadTrackData->Quaternion, +#else st_ivas->hHeadTrackData->Quaternions, +#endif st_ivas->hRenderConfig->split_rend_config.splitRendBitRate, st_ivas->hRenderConfig->split_rend_config.codec, hSplitBinRend->hSplitRendBits, diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index a8f81b21a3..96f62b71cd 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -926,7 +926,11 @@ ivas_error ivas_dirac_dec_config( if ( dec_config_flag == DIRAC_OPEN ) { #ifdef API_5MS +#ifdef API_5MS_BASELINE + if ( st_ivas->hDecoderConfig->Opt_5ms && st_ivas->hTcBuffer == NULL ) +#else if ( st_ivas->hTcBuffer == NULL ) +#endif #else if ( st_ivas->hDecoderConfig->voip_active == 1 && st_ivas->hTcBuffer == NULL ) #endif diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index d042eed4ee..1ece6ff0df 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -1379,8 +1379,12 @@ ivas_error ivas_init_decoder( } #endif +#ifdef API_5MS_BASELINE #ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active ) +#else + if ( st_ivas->hDecoderConfig->Opt_5ms ) +#endif #endif { granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ); @@ -1459,8 +1463,12 @@ ivas_error ivas_init_decoder( st_ivas->binaural_latency_ns = st_ivas->hCrendWrapper->binaural_latency_ns; +#ifdef API_5MS_BASELINE #ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active ) +#else + if ( st_ivas->hDecoderConfig->Opt_5ms ) +#endif #endif { #ifdef JBM_PARAMUPMIX @@ -1592,7 +1600,11 @@ ivas_error ivas_init_decoder( * Allocate and initialize JBM struct + buffer *-----------------------------------------------------------------*/ #ifdef API_5MS +#ifdef API_5MS_BASELINE + if ( st_ivas->hDecoderConfig->Opt_5ms && st_ivas->hTcBuffer == NULL ) +#else if ( st_ivas->hTcBuffer == NULL ) +#endif #else if ( st_ivas->hDecoderConfig->voip_active && st_ivas->hTcBuffer == NULL ) #endif @@ -1606,7 +1618,7 @@ ivas_error ivas_init_decoder( } } -#ifndef API_5MS +#if !defined( API_5MS ) || defined( API_5MS_BASELINE ) if ( st_ivas->hTcBuffer == NULL ) { /* we need the handle anyway, but without the buffer*/ diff --git a/lib_dec/ivas_ism_dec.c b/lib_dec/ivas_ism_dec.c index b01dfd9e84..deb362df7e 100644 --- a/lib_dec/ivas_ism_dec.c +++ b/lib_dec/ivas_ism_dec.c @@ -119,8 +119,12 @@ static ivas_error ivas_ism_bitrate_switching( ivas_output_init( &( st_ivas->hIntSetup ), st_ivas->hDecoderConfig->output_config ); } +#ifdef API_5MS_BASELINE #ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active ) +#else + if ( st_ivas->hDecoderConfig->Opt_5ms ) +#endif #endif { /* transfer subframe info from DirAC or ParamMC to central tc buffer */ @@ -321,8 +325,12 @@ static ivas_error ivas_ism_bitrate_switching( /*-----------------------------------------------------------------* * Reconfigure TC buffer *-----------------------------------------------------------------*/ +#ifdef API_5MS_BASELINE #ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active == 1 ) +#else + if ( st_ivas->hDecoderConfig->Opt_5ms ) +#endif #endif { int16_t tc_nchan_full_new; diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 06208595a7..47d44d5eb8 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -525,7 +525,7 @@ ivas_error ivas_param_ism_dec_open( { /* Initialize Param ISM Rendering handle */ #ifdef API_5MS - if ( st_ivas->hDecoderConfig->tsm_active ) + if ( st_ivas->hDecoderConfig->Opt_tsm ) #else if ( st_ivas->hDecoderConfig->voip_active ) #endif @@ -581,8 +581,12 @@ ivas_error ivas_param_ism_dec_open( st_ivas->hDirAC = hDirAC; st_ivas->hSpatParamRendCom = hSpatParamRendCom; +#ifdef API_5MS_BASELINE #ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active ) +#else + if ( st_ivas->hDecoderConfig->Opt_5ms ) +#endif #endif { if ( st_ivas->renderer_type != RENDERER_MONO_DOWNMIX && st_ivas->renderer_type != RENDERER_DISABLE ) @@ -599,7 +603,7 @@ ivas_error ivas_param_ism_dec_open( { #ifdef API_5MS int16_t n_slots_to_alloc; - if ( st_ivas->hDecoderConfig->tsm_active == 1 ) + if ( st_ivas->hDecoderConfig->Opt_tsm == 1 ) { n_slots_to_alloc = MAX_JBM_CLDFB_TIMESLOTS; } @@ -1253,7 +1257,7 @@ void ivas_param_ism_dec_digest_tc( } } #ifdef API_5MS - if ( st_ivas->hDecoderConfig->tsm_active ) + if ( st_ivas->hDecoderConfig->Opt_tsm ) { ivas_ism_param_dec_tc_gain_ajust( st_ivas, nCldfbSlots * hSpatParamRendCom->num_freq_bands, (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( 2 * FRAMES_PER_SEC ) ), transport_channels_f ); } @@ -1303,7 +1307,7 @@ void ivas_param_ism_dec_digest_tc( for ( slot_idx = 0; slot_idx < nCldfbSlots; slot_idx++ ) { #ifdef API_5MS - if ( st_ivas->hDecoderConfig->tsm_active ) + if ( st_ivas->hDecoderConfig->Opt_tsm ) { #endif diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index 037f4a8b50..849ab58ba8 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -83,7 +83,7 @@ ivas_error ivas_ism_renderer_open( } #ifdef API_5MS - if ( st_ivas->hDecoderConfig->tsm_active ) + if ( st_ivas->hDecoderConfig->Opt_tsm ) #else if ( st_ivas->hDecoderConfig->voip_active ) #endif diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 1e417be740..3b97e78e15 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -544,7 +544,7 @@ ivas_error ivas_jbm_dec_tc( * Write IVAS transport channels *----------------------------------------------------------------*/ #ifdef API_5MS - if ( st_ivas->hDecoderConfig->tsm_active == 1 ) + if ( st_ivas->hDecoderConfig->Opt_tsm == 1 ) { #endif ivas_syn_output_f( p_output, output_frame, st_ivas->hTcBuffer->nchan_transport_jbm, data ); @@ -620,7 +620,7 @@ ivas_error ivas_jbm_dec_feed_tc_to_renderer( p_data_f[n] = &data_f[n][0]; } #ifdef API_5MS - if ( st_ivas->hDecoderConfig->tsm_active ) + if ( st_ivas->hDecoderConfig->Opt_tsm ) { #endif ivas_jbm_dec_copy_tc( st_ivas, nSamplesForRendering, nSamplesResidual, data, p_data_f ); @@ -2005,7 +2005,7 @@ ivas_error ivas_jbm_dec_tc_buffer_open( #endif int32_t offset; #ifdef API_5MS - if ( st_ivas->hDecoderConfig->tsm_active ) + if ( st_ivas->hDecoderConfig->Opt_tsm ) { n_samp_full = ( NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_L_FRAME_NS ) + hTcBuffer->n_samples_granularity - 1 ); n_samp_residual = hTcBuffer->n_samples_granularity - 1; @@ -2136,7 +2136,7 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( /* realloc buffers */ free( hTcBuffer->tc_buffer ); #ifdef API_5MS - if ( st_ivas->hDecoderConfig->tsm_active ) + if ( st_ivas->hDecoderConfig->Opt_tsm ) { n_samp_full = ( NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_L_FRAME_NS ) + hTcBuffer->n_samples_granularity - 1 ); n_samp_residual = hTcBuffer->n_samples_granularity - 1; diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index b686b0431b..0723140145 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -386,7 +386,11 @@ ivas_error ivas_masa_dec_open( /* allocate transport channels*/ #ifdef API_5MS +#ifdef API_5MS_BASELINE + if ( st_ivas->hDecoderConfig->Opt_5ms && st_ivas->hTcBuffer == NULL && st_ivas->renderer_type != RENDERER_DISABLE && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) +#else if ( st_ivas->hTcBuffer == NULL && st_ivas->renderer_type != RENDERER_DISABLE && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) +#endif #else if ( st_ivas->hDecoderConfig->voip_active == 1 && st_ivas->hTcBuffer == NULL && st_ivas->renderer_type != RENDERER_DISABLE && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) #endif @@ -1093,8 +1097,12 @@ ivas_error ivas_masa_dec_reconfigure( ivas_masa_set_elements( ivas_total_brate, st_ivas->mc_mode, st_ivas->nchan_transport, st_ivas->hQMetaData, &tmp, &tmp, &tmp ); +#ifdef API_5MS_BASELINE #ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active == 1 ) +#else + if ( st_ivas->hDecoderConfig->Opt_5ms == 1 ) +#endif #endif { int16_t tc_nchan_to_allocate; diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index b2b3625d05..ac77322ea5 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -460,7 +460,11 @@ ivas_error ivas_param_mc_dec_open( ivas_param_mc_dec_init( hParamMC, nchan_transport, nchan_out_cov ); #ifdef API_5MS +#ifdef API_5MS_BASELINE + if ( st_ivas->hDecoderConfig->Opt_5ms && hParamMC->synthesis_conf != PARAM_MC_SYNTH_MONO_STEREO ) +#else if ( hParamMC->synthesis_conf != PARAM_MC_SYNTH_MONO_STEREO ) +#endif #else if ( st_ivas->hDecoderConfig->voip_active && hParamMC->synthesis_conf != PARAM_MC_SYNTH_MONO_STEREO ) #endif @@ -469,7 +473,7 @@ ivas_error ivas_param_mc_dec_open( int16_t n_cldfb_slots; n_cldfb_slots = DEFAULT_JBM_CLDFB_TIMESLOTS; - if ( st_ivas->hDecoderConfig->tsm_active ) + if ( st_ivas->hDecoderConfig->Opt_tsm ) { n_cldfb_slots = MAX_JBM_CLDFB_TIMESLOTS; } @@ -1492,7 +1496,7 @@ void ivas_param_mc_dec_digest_tc( for ( slot_idx = 0; slot_idx < nCldfbSlots; slot_idx++ ) { #ifdef API_5MS - if ( st_ivas->hDecoderConfig->tsm_active ) + if ( st_ivas->hDecoderConfig->Opt_tsm ) { #endif float RealBuffer[CLDFB_NO_CHANNELS_MAX]; diff --git a/lib_dec/ivas_mc_paramupmix_dec.c b/lib_dec/ivas_mc_paramupmix_dec.c index 02f663f668..885e31e239 100644 --- a/lib_dec/ivas_mc_paramupmix_dec.c +++ b/lib_dec/ivas_mc_paramupmix_dec.c @@ -492,12 +492,14 @@ ivas_error ivas_mc_paramupmix_dec_open( hMCParamUpmix->free_param_interpolator = 0; hMCParamUpmix->param_interpolator = NULL; if ( +#ifdef API_5MS_BASELINE #ifdef API_5MS - st_ivas->hDecoderConfig->tsm_active == 1 + st_ivas->hDecoderConfig->Opt_5ms == 1 #else st_ivas->hDecoderConfig->voip_active == 1 #endif - && st_ivas->hTcBuffer == NULL ) +#endif + && st_ivas->hTcBuffer == NULL ) { int16_t nchan_to_allocate; int16_t nchan_tc; diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index 578a010ae1..46ec0b8b30 100755 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -725,9 +725,12 @@ static ivas_error ivas_mc_dec_reconfig( /* side effect of the renderer selection can be a changed internal config */ ivas_output_init( &( st_ivas->hIntSetup ), st_ivas->intern_config ); - +#ifdef API_5MS_BASELINE #ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active ) +#else + if ( st_ivas->hDecoderConfig->Opt_5ms ) +#endif #endif { /* transfer subframe info from DirAC or ParamMC to central tc buffer */ @@ -1262,8 +1265,12 @@ static ivas_error ivas_mc_dec_reconfig( /*-----------------------------------------------------------------* * Reconfigure TC buffer *-----------------------------------------------------------------*/ +#ifdef API_5MS_BASELINE #ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active == 1 ) +#else + if ( st_ivas->hDecoderConfig->Opt_5ms == 1 ) +#endif #endif { int16_t tc_nchan_full_new; diff --git a/lib_dec/ivas_output_config.c b/lib_dec/ivas_output_config.c index 01dfa0f44a..80a0fb8f2c 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -516,6 +516,7 @@ void ivas_set_split_rend_setup( IVAS_DEC_SPLIT_REND_WRAPPER *hSplitBinRend, IVAS &hSplitBinRend->splitrend.multiBinPoseData, hCombinedOrientationData->sr_pose_pred_axis ); +#ifndef API_5MS if ( ( hCombinedOrientationData != NULL ) && ( hSplitBinRend->splitrend.multiBinPoseData.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) ) { int16_t i, j; @@ -543,7 +544,7 @@ void ivas_set_split_rend_setup( IVAS_DEC_SPLIT_REND_WRAPPER *hSplitBinRend, IVAS } #endif } - +#endif return; } #endif diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 32a0955bfa..2e44542159 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -377,9 +377,12 @@ ivas_error ivas_sba_dec_reconfigure( /*-----------------------------------------------------------------* * JBM TC buffer *-----------------------------------------------------------------*/ - +#ifdef API_5MS_BASELINE #ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active == 1 ) +#else + if ( st_ivas->hDecoderConfig->Opt_5ms == 1 ) +#endif #endif { int16_t tc_nchan_to_allocate; diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index f13557fcc9..8ad0c9f435 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -219,7 +219,11 @@ ivas_error ivas_spar_dec_open( /* allocate transport channels*/ #ifdef API_5MS +#ifdef API_5MS_BASELINE + if ( st_ivas->hDecoderConfig->Opt_5ms && st_ivas->hTcBuffer == NULL ) +#else if ( st_ivas->hTcBuffer == NULL ) +#endif #else if ( st_ivas->hDecoderConfig->voip_active == 1 && st_ivas->hTcBuffer == NULL ) #endif diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index 6ce7e3bb1e..81a84532a5 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -866,7 +866,10 @@ typedef struct decoder_config_structure int16_t force_rend; /* forced TD/CLDFB binaural renderer (for ISM and MC) */ #endif #ifdef API_5MS - int16_t tsm_active; + int16_t Opt_tsm; +#ifdef API_5MS_BASELINE + int16_t Opt_5ms; +#endif #else int16_t voip_active; #endif diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index f6d2fd67d0..5c9d4d95fd 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -272,7 +272,10 @@ static void init_decoder_config( hDecoderConfig->Opt_non_diegetic_pan = 0; hDecoderConfig->non_diegetic_pan_gain = 0; #ifdef API_5MS - hDecoderConfig->tsm_active = 0; + hDecoderConfig->Opt_tsm = 0; +#ifdef API_5MS_BASELINE + hDecoderConfig->Opt_5ms = 0; +#endif #else hDecoderConfig->voip_active = 0; #endif @@ -463,6 +466,9 @@ ivas_error IVAS_DEC_Configure( const IVAS_DEC_AUDIO_CONFIG outputFormat, /* i : output format */ #ifdef API_5MS const int16_t tsmEnabled, /* i : enable TSM */ +#ifdef API_5MS_BASELINE + const int16_t enable5ms, +#endif #endif const int16_t customLsOutputEnabled, /* i : enable custom loudspeaker setup handle */ const int16_t hrtfReaderEnabled, /* i : enable HRTF binary file input */ @@ -541,7 +547,10 @@ ivas_error IVAS_DEC_Configure( } #ifdef API_5MS - hDecoderConfig->tsm_active = tsmEnabled; + hDecoderConfig->Opt_tsm = tsmEnabled; +#ifdef API_5MS + hDecoderConfig->Opt_5ms = enable5ms; +#endif hIvasDec->nSamplesFrame = (uint16_t) ( hDecoderConfig->output_Fs / FRAMES_PER_SEC ); hIvasDec->nSamplesAvailableNext = 0; hIvasDec->nSamplesRendered = 0; @@ -588,7 +597,10 @@ ivas_error IVAS_DEC_EnableVoIP( hIvasDec->Opt_VOIP = 1; #ifdef API_5MS - hDecoderConfig->tsm_active = 1; + hDecoderConfig->Opt_tsm = 1; +#ifdef API_5MS_BASELINE + hDecoderConfig->Opt_5ms = 1; +#endif #else hDecoderConfig->voip_active = 1; #endif @@ -791,12 +803,17 @@ ivas_error IVAS_DEC_FeedFrame_Serial( * * Main function to decode to PCM data *---------------------------------------------------------------------*/ -#ifndef API_5MS + +#if !defined API_5MS || defined( API_5MS_BASELINE ) +#ifdef API_5MS_BASELINE +static ivas_error _GetSamples( +#else ivas_error IVAS_DEC_GetSamples( +#endif IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ int16_t *nOutSamples /* o : number of samples per channel written to output buffer */ -#ifdef SPLIT_REND_WITH_HEAD_ROT +#if defined( SPLIT_REND_WITH_HEAD_ROT ) && !defined( API_5MS ) , IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits #endif @@ -827,7 +844,7 @@ ivas_error IVAS_DEC_GetSamples( { /* run the main IVAS decoding routine */ if ( ( error = ivas_dec( st_ivas, pcmBuf -#ifdef SPLIT_REND_WITH_HEAD_ROT +#if defined( SPLIT_REND_WITH_HEAD_ROT ) && !defined( API_5MS ) , hSplitRendBits #endif @@ -846,7 +863,8 @@ ivas_error IVAS_DEC_GetSamples( return error; } -#else +#endif +#ifdef API_5MS ivas_error IVAS_DEC_GetSamples( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const int16_t nSamplesAsked, /* i: number of samples wanted by the caller */ @@ -895,6 +913,23 @@ ivas_error IVAS_DEC_GetSamples( *needNewFrame = true; } } +#ifdef API_5MS_BASELINE + /* only for 1st step 5ms API, split rendering still needs to go through the old decoding function */ + else if ( hIvasDec->st_ivas->hDecoderConfig->Opt_5ms ) + { + if ( ( error = _GetSamples( hIvasDec, pcmBuf, nOutSamples ) ) != IVAS_ERR_OK ) + { + return error; + } +#ifdef DEBUGGING + assert( *nOutSamples == nSamplesAsked ); +#endif + hIvasDec->nSamplesAvailableNext = 0; + hIvasDec->nSamplesRendered = *nOutSamples; + hIvasDec->needNewFrame = true; + *needNewFrame = true; + } +#endif else { /* check if we need to run the setup function, tc decoding and feeding the renderer */ @@ -917,7 +952,7 @@ ivas_error IVAS_DEC_GetSamples( return error; } - if ( hIvasDec->st_ivas->hDecoderConfig->tsm_active ) + if ( hIvasDec->st_ivas->hDecoderConfig->Opt_tsm ) { if ( apa_set_scale( hIvasDec->hTimeScaler, hIvasDec->tsm_scale ) != 0 ) { @@ -944,7 +979,7 @@ ivas_error IVAS_DEC_GetSamples( return error; } - if ( hIvasDec->st_ivas->hDecoderConfig->tsm_active ) + if ( hIvasDec->st_ivas->hDecoderConfig->Opt_tsm ) { /* feed residual samples to TSM for the next call */ if ( apa_set_renderer_residual_samples( hIvasDec->hTimeScaler, (uint16_t) nResidualSamples ) != 0 ) @@ -981,10 +1016,10 @@ ivas_error IVAS_DEC_GetSamples( #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT ivas_error IVAS_DEC_GetSplitBinaural( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode*/ - int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ - bool *needNewFrame /* indication that the decoder needs a new frame */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode*/ + int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ + bool *needNewFrame /* indication that the decoder needs a new frame */ ) { Decoder_Struct *st_ivas; @@ -1002,7 +1037,7 @@ ivas_error IVAS_DEC_GetSplitBinaural( output_Fs = st_ivas->hDecoderConfig->output_Fs; numSamplesPerChannel = output_Fs / FRAMES_PER_SEC; /* TODO(sgi): Accommodate 5ms framing */ - if ( output_config != AUDIO_CONFIG_BINAURAL_SPLIT_CODED && output_config != AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) + if ( output_config != AUDIO_CONFIG_BINAURAL_SPLIT_CODED && output_config != AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { return IVAS_ERR_WRONG_PARAMS; } @@ -1012,6 +1047,13 @@ ivas_error IVAS_DEC_GetSplitBinaural( while ( error == IVAS_ERR_OK ) { int16_t nOutSamplesLocal; + /*split rendering process calls*/ + IVAS_DEC_SPLIT_REND_WRAPPER *hSplitBinRend; + int16_t max_band; + int16_t pcm_out; + int16_t numPoses; + + ivas_set_split_rend_setup( hSplitBinRend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hCombinedOrientationData, hSplitRendBits ); /* Decode and render */ if ( ( error = IVAS_DEC_GetSamples( @@ -1026,22 +1068,14 @@ ivas_error IVAS_DEC_GetSplitBinaural( *nOutSamples += nOutSamplesLocal; - /*split rendering process calls*/ - IVAS_DEC_SPLIT_REND_WRAPPER *hSplitBinRend; - int16_t max_band; - int16_t pcm_out; - int16_t numPoses; - hSplitBinRend = &st_ivas->splitBinRend; - ivas_set_split_rend_setup(hSplitBinRend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hCombinedOrientationData, hSplitRendBits ); - numPoses = hSplitBinRend->splitrend.multiBinPoseData.num_poses; /* [tmp] convert int back to float and change buffer layout */ - for (i = 0; i < numSamplesPerChannel; ++i) + for ( i = 0; i < numSamplesPerChannel; ++i ) { - for (j = 0; j < BINAURAL_CHANNELS * numPoses; ++j) + for ( j = 0; j < BINAURAL_CHANNELS * numPoses; ++j ) { output[j][i] = (float) output_int[i * BINAURAL_CHANNELS * numPoses + j]; } @@ -2052,7 +2086,7 @@ static bool isSidFrame( static void bsCompactToSerial( const uint8_t *compact, uint16_t *serial, uint16_t num_bits ) { -/* Bitstream conversion is not counted towards complexity and memory usage */ + /* Bitstream conversion is not counted towards complexity and memory usage */ #define WMC_TOOL_SKIP uint32_t i; uint8_t byte = 0; @@ -2179,7 +2213,7 @@ ivas_error IVAS_DEC_VoIP_SetScale( error = IVAS_ERR_OK; #ifdef API_5MS - if ( hIvasDec->st_ivas->hDecoderConfig->tsm_active == false ) + if ( hIvasDec->st_ivas->hDecoderConfig->Opt_tsm == false ) { return IVAS_ERR_TSM_NOT_ENABLED; } @@ -3006,7 +3040,6 @@ static ivas_error get_channel_config( AUDIO_CONFIG config, char *str ) { - if ( config == AUDIO_CONFIG_MONO ) { strcpy( str, "Mono" ); @@ -3242,12 +3275,21 @@ static ivas_error printConfigInfo_dec( #ifdef API_5MS /*-----------------------------------------------------------------* - * Print VoIP mode info + * Print TSM mode info *-----------------------------------------------------------------*/ - if ( st_ivas->hDecoderConfig->tsm_active ) + if ( st_ivas->hDecoderConfig->Opt_tsm ) { fprintf( stdout, "TSM mode: ON\n" ); } +#ifdef API_5MS_BASELINE + /*-----------------------------------------------------------------* + * Print 5ms API mode info + *-----------------------------------------------------------------*/ + if ( st_ivas->hDecoderConfig->Opt_5ms ) + { + fprintf( stdout, "API 5ms mode: ON\n" ); + } +#endif #else /*-----------------------------------------------------------------* * Print VoIP mode info @@ -3432,7 +3474,7 @@ static ivas_error evs_dec_main( #ifdef API_5MS - if ( !st_ivas->hDecoderConfig->tsm_active ) + if ( !st_ivas->hDecoderConfig->Opt_tsm ) { ivas_jbm_dec_copy_tc_no_tsm( st_ivas, p_output, nOutSamples ); } @@ -3659,7 +3701,6 @@ static ivas_error input_format_API_to_internal( static int16_t IVAS_DEC_VoIP_GetRenderGranularity( Decoder_Struct *st_ivas ) { - return st_ivas->hTcBuffer->n_samples_granularity; } @@ -3731,7 +3772,7 @@ ivas_error IVAS_DEC_reconfigure( DECODER_CONFIG_HANDLE hDecoderConfig; #ifdef API_5MS - if ( hIvasDec->st_ivas->hDecoderConfig->tsm_active ) + if ( hIvasDec->st_ivas->hDecoderConfig->Opt_tsm ) { uint16_t wss, css; float startQuality; @@ -3863,7 +3904,7 @@ ivas_error IVAS_DEC_reconfigure( else { #ifdef API_5MS - if ( hIvasDec->st_ivas->hDecoderConfig->tsm_active ) + if ( hIvasDec->st_ivas->hDecoderConfig->Opt_tsm ) { if ( apa_reconfigure( hIvasDec->hTimeScaler, nTransportChannels, l_ts ) != 0 ) #else diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index a897c1e0c6..e27d03d9fe 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -148,6 +148,9 @@ ivas_error IVAS_DEC_Configure( const IVAS_DEC_AUDIO_CONFIG outputFormat, /* i : output format */ #ifdef API_5MS const int16_t tsmEnabled, /* i : enable TSM */ +#ifdef API_5MS_BASELINE + const int16_t enable5ms, /* i : enable 5ms rendering path */ +#endif #endif const int16_t customLsOutputEnabled, /* i : enable custom loudspeaker setup handle */ const int16_t hrtfReaderEnabled, /* i : enable HRTF binary file input */ diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index 695c0f955e..07beeea6cd 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -278,7 +278,11 @@ ivas_error ivas_dirac_dec_init_binaural_data( /* allocate transport channels*/ #ifdef API_5MS +#ifdef API_5MS_BASELINE + if ( st_ivas->hDecoderConfig->Opt_5ms && st_ivas->hTcBuffer == NULL ) +#else if ( st_ivas->hTcBuffer == NULL ) +#endif #else if ( st_ivas->hDecoderConfig->voip_active == 1 && st_ivas->hTcBuffer == NULL ) #endif diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index f3878b0e23..ef59d5ee5a 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -3263,7 +3263,10 @@ static DecoderDummy *initDecoderDummy( decDummy->hDecoderConfig->nchan_out = numOutChannels; decDummy->hDecoderConfig->Opt_Headrotation = 0; #ifdef API_5MS - decDummy->hDecoderConfig->tsm_active = 0; + decDummy->hDecoderConfig->Opt_tsm = 0; +#ifdef API_5MS_BASELINE + decDummy->hDecoderConfig->Opt_5ms = 0; +#endif #else decDummy->hDecoderConfig->voip_active = 0; #endif @@ -5819,8 +5822,8 @@ static ivas_error rotateFrameSba( idx = i; cf = crossfade[i]; #else - idx = subframe_idx * subframe_len + i; - cf = headRotData->crossfade[i]; + idx = subframe_idx * subframe_len + i; + cf = headRotData->crossfade[i]; #endif oneminuscf = 1 - cf; /* As the rotation matrix becomes block diagonal in a SH basis, we can*/ @@ -5868,7 +5871,7 @@ static ivas_error rotateFrameSba( tmpRot[n - m1] += headRotData->crossfade[i] * gains[n][m] * ( *readPtr ) + ( 1 - headRotData->crossfade[i] ) * gains_prev[n][m] * ( *readPtr ); #endif -// merge end + // merge end } } /* write back the result */ @@ -6122,10 +6125,10 @@ static ivas_error renderIsmToBinauralRoom( num_subframes_in_buffer( &outAudio, *ismInput->base.ctx.pOutSampleRate ) #endif #ifdef SPLIT_REND_WITH_HEAD_ROT - , + , 0 #endif - ) ) != IVAS_ERR_OK ) + ) ) != IVAS_ERR_OK ) { return error; } @@ -6391,9 +6394,9 @@ static ivas_error renderIsmToSplitBinaural( { pCombinedOrientationData->Quaternion.w = -3.0f; Quat2EulerDegree( originalHeadRot, - &pCombinedOrientationData->Quaternion.z, - &pCombinedOrientationData->Quaternion.y, - &pCombinedOrientationData->Quaternion.x ); + &pCombinedOrientationData->Quaternion.z, + &pCombinedOrientationData->Quaternion.y, + &pCombinedOrientationData->Quaternion.x ); pCombinedOrientationData->Quaternion.x += pMultiBinPoseData->relative_head_poses[pos_idx][0]; pCombinedOrientationData->Quaternion.y += pMultiBinPoseData->relative_head_poses[pos_idx][1]; pCombinedOrientationData->Quaternion.z += pMultiBinPoseData->relative_head_poses[pos_idx][2]; @@ -6826,10 +6829,10 @@ static ivas_error renderMcToBinaural( num_subframes_in_buffer( &outAudio, *mcInput->base.ctx.pOutSampleRate ) #endif #ifdef SPLIT_REND_WITH_HEAD_ROT - , + , 0 #endif - ) ) != IVAS_ERR_OK ) + ) ) != IVAS_ERR_OK ) { return error; } @@ -6953,10 +6956,10 @@ static ivas_error renderMcToBinauralRoom( num_subframes_in_buffer( &outAudio, *mcInput->base.ctx.pOutSampleRate ) #endif #ifdef SPLIT_REND_WITH_HEAD_ROT - , + , 0 #endif - ) ) != IVAS_ERR_OK ) + ) ) != IVAS_ERR_OK ) { return error; } @@ -7076,10 +7079,10 @@ static ivas_error renderMcCustomLsToBinauralRoom( num_subframes_in_buffer( &outAudio, *mcInput->base.ctx.pOutSampleRate ) #endif #ifdef SPLIT_REND_WITH_HEAD_ROT - , + , 0 #endif - ) ) != IVAS_ERR_OK ) + ) ) != IVAS_ERR_OK ) { return error; } @@ -7785,15 +7788,15 @@ static ivas_error renderSbaToMultiBinaural( { #ifdef API_5MS IVAS_QUATERNION Quaternion_orig, Quaternion_abs; - Quaternion_orig = combinedOrientationDataLocal.Quaternion; - Quaternion_abs.w = -3.0f; - Quat2EulerDegree( combinedOrientationDataLocal.Quaternion, &Quaternion_abs.z, &Quaternion_abs.y, &Quaternion_abs.x ); /*order in Quat2Euler seems to be reversed ?*/ - - Quaternion_abs.x += pMultiBinPoseData->relative_head_poses[pos_idx][0]; - Quaternion_abs.y += pMultiBinPoseData->relative_head_poses[pos_idx][1]; - Quaternion_abs.z += pMultiBinPoseData->relative_head_poses[pos_idx][2]; - combinedOrientationDataLocal.Quaternion = Quaternion_abs; - QuatToRotMat( combinedOrientationDataLocal.Quaternion, combinedOrientationDataLocal.Rmat ); + Quaternion_orig = combinedOrientationDataLocal.Quaternion; + Quaternion_abs.w = -3.0f; + Quat2EulerDegree( combinedOrientationDataLocal.Quaternion, &Quaternion_abs.z, &Quaternion_abs.y, &Quaternion_abs.x ); /*order in Quat2Euler seems to be reversed ?*/ + + Quaternion_abs.x += pMultiBinPoseData->relative_head_poses[pos_idx][0]; + Quaternion_abs.y += pMultiBinPoseData->relative_head_poses[pos_idx][1]; + Quaternion_abs.z += pMultiBinPoseData->relative_head_poses[pos_idx][2]; + combinedOrientationDataLocal.Quaternion = Quaternion_abs; + QuatToRotMat( combinedOrientationDataLocal.Quaternion, combinedOrientationDataLocal.Rmat ); #else IVAS_QUATERNION Quaternions_orig[RENDERER_HEAD_POSITIONS_PER_FRAME], Quaternions_abs; for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) @@ -7963,6 +7966,7 @@ static ivas_error renderSbaToBinaural( #ifdef API_5MS /* fix compiling only, ToDo ext renderer needs to adapted to 5ms */ + hCombinedOrientationData = sbaInput->base.ctx.pCombinedOrientationData; if ( ( *hCombinedOrientationData )->enableCombinedOrientation != 0 ) { combinedOrientationEnabled = 1; @@ -8019,11 +8023,11 @@ static ivas_error renderSbaToBinaural( if ( ( error = ivas_rend_crendProcess( sbaInput->crendWrapper, getIvasAudioConfigFromRendAudioConfig( sbaInput->base.inConfig ), getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, NULL, NULL, NULL, p_tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate #ifdef LIB_REND_API_5MS - , - num_subframes_in_buffer( &outAudio, *sbaInput->base.ctx.pOutSampleRate ) + , + num_subframes_in_buffer( &outAudio, *sbaInput->base.ctx.pOutSampleRate ) #endif #ifdef SPLIT_REND_WITH_HEAD_ROT - , + , 0 #endif ) ) != IVAS_ERR_OK ) @@ -8139,10 +8143,10 @@ static ivas_error renderSbaToBinauralRoom( num_subframes_in_buffer( &outAudio, *sbaInput->base.ctx.pOutSampleRate ) #endif #ifdef SPLIT_REND_WITH_HEAD_ROT - , + , 0 #endif - ) ) != IVAS_ERR_OK ) + ) ) != IVAS_ERR_OK ) { return error; } -- GitLab From 06f38ed8fa5f71c026f69c5320aa5690a54ede11 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Wed, 2 Aug 2023 17:31:56 +0200 Subject: [PATCH 073/175] [tests] renderer/split rendering : correctly test 5ms and 20ms mode for binaural outputs --- tests/renderer/compare_audio.py | 1 - tests/renderer/test_renderer.py | 49 ++++------- tests/renderer/test_renderer_be_comparison.py | 81 ++++++++++++++----- tests/renderer/utils.py | 36 ++++++--- tests/split_rendering/constants.py | 2 + 5 files changed, 104 insertions(+), 65 deletions(-) diff --git a/tests/renderer/compare_audio.py b/tests/renderer/compare_audio.py index 3fc5c064a8..10ca2e24c8 100644 --- a/tests/renderer/compare_audio.py +++ b/tests/renderer/compare_audio.py @@ -41,7 +41,6 @@ from pyaudio3dtools.audioarray import getdelay def compare_audio_arrays( left: np.ndarray, left_fs: int, right: np.ndarray, right_fs: int ) -> Tuple[float, float]: - if left_fs != right_fs: return ValueError(f"Differing samplerates: {left_fs} vs {right_fs}!") diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index b654c18a56..604dde6729 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -403,22 +403,13 @@ def test_ism_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): except: in_meta_files = None - if out_fmt == "BINAURAL": - run_renderer( - in_fmt, - out_fmt, - test_case_name=test_info.node.name, - in_meta_files=in_meta_files, - framing_5ms=(framing_5ms == "5ms"), - ) - else: - run_renderer( - in_fmt, - out_fmt, - test_case_name=test_info.node.name, - in_meta_files=in_meta_files, - framing_5ms=(framing_5ms == "5ms"), - ) + run_renderer( + in_fmt, + out_fmt, + test_case_name=test_info.node.name, + in_meta_files=in_meta_files, + framing_5ms=(framing_5ms == "5ms"), + ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @@ -434,24 +425,14 @@ def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing except: in_meta_files = None - if out_fmt == "BINAURAL": - run_renderer( - in_fmt, - out_fmt, - test_case_name=test_info.node.name, - trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), - in_meta_files=in_meta_files, - framing_5ms=(framing_5ms == "5ms"), - ) - else: - run_renderer( - in_fmt, - out_fmt, - test_case_name=test_info.node.name, - trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), - in_meta_files=in_meta_files, - framing_5ms=(framing_5ms == "5ms"), - ) + run_renderer( + in_fmt, + out_fmt, + test_case_name=test_info.node.name, + trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), + in_meta_files=in_meta_files, + framing_5ms=(framing_5ms == "5ms"), + ) # This test compares rendering with: diff --git a/tests/renderer/test_renderer_be_comparison.py b/tests/renderer/test_renderer_be_comparison.py index 95a5859526..a71036c6da 100644 --- a/tests/renderer/test_renderer_be_comparison.py +++ b/tests/renderer/test_renderer_be_comparison.py @@ -28,8 +28,8 @@ import pytest -from .utils import * +from .utils import * """ Ambisonics """ @@ -49,12 +49,16 @@ def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) -def test_ambisonics_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_ambisonics_binaural_headrotation( + test_info, in_fmt, out_fmt, trj_file, framing_5ms +): compare_renderer_vs_mergetarget( test_info, in_fmt, out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), + framing_5ms=(framing_5ms == "5ms"), is_comparetest=True, ) @@ -80,7 +84,10 @@ def test_multichannel_binaural_static(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) -def test_multichannel_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_multichannel_binaural_headrotation( + test_info, in_fmt, out_fmt, trj_file, framing_5ms +): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") @@ -89,6 +96,7 @@ def test_multichannel_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file in_fmt, out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), + framing_5ms=(framing_5ms == "5ms"), is_comparetest=True, ) @@ -106,21 +114,31 @@ def test_ism(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) -def test_ism_binaural_static(test_info, in_fmt, out_fmt): +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_ism_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): + if not framing_5ms: + pytest.xfail("Binaural output currently only supported with 5ms framing") + try: in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] except: in_meta_files = None compare_renderer_vs_mergetarget( - test_info, in_fmt, out_fmt, in_meta_files=in_meta_files, is_comparetest=True + test_info, + in_fmt, + out_fmt, + in_meta_files=in_meta_files, + framing_5ms=(framing_5ms == "5ms"), + is_comparetest=True, ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) -def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing_5ms): try: in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] except: @@ -132,12 +150,14 @@ def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), in_meta_files=in_meta_files, + framing_5ms=(framing_5ms == "5ms"), is_comparetest=True, ) """ MASA """ + @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) def test_masa(test_info, in_fmt, out_fmt): @@ -145,33 +165,41 @@ def test_masa(test_info, in_fmt, out_fmt): test_info, in_fmt, out_fmt, in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt] ) + @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) -def test_masa_binaural_static(test_info, in_fmt, out_fmt): - +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_masa_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): if out_fmt in ["BINAURAL_ROOM_IR", "BINAURAL_ROOM_REVERB"]: pytest.skip("Skipping binaural room outputs for MASA as unimplemented.") - + compare_renderer_vs_mergetarget( - test_info, in_fmt, out_fmt, in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt] + test_info, + in_fmt, + out_fmt, + in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt], + framing_5ms=(framing_5ms == "5ms"), ) + @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) -def test_masa_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): - +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_masa_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing_5ms): if out_fmt in ["BINAURAL_ROOM_IR", "BINAURAL_ROOM_REVERB"]: pytest.skip("Skipping binaural room outputs for MASA as unimplemented.") - + compare_renderer_vs_mergetarget( test_info, in_fmt, out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), - in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt] + in_meta_files=FORMAT_TO_METADATA_FILES[in_fmt], + framing_5ms=(framing_5ms == "5ms"), ) + """ Custom loudspeaker layouts """ @@ -179,7 +207,10 @@ def test_masa_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) def test_custom_ls_input(test_info, in_layout, out_fmt): compare_renderer_vs_mergetarget( - test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, is_comparetest=True + test_info, + CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), + out_fmt, + is_comparetest=True, ) @@ -187,7 +218,10 @@ def test_custom_ls_input(test_info, in_layout, out_fmt): @pytest.mark.parametrize("in_fmt", OUTPUT_FORMATS) def test_custom_ls_output(test_info, in_fmt, out_fmt): compare_renderer_vs_mergetarget( - test_info, in_fmt, CUSTOM_LAYOUT_DIR.joinpath(f"{out_fmt}.txt"), is_comparetest=True + test_info, + in_fmt, + CUSTOM_LAYOUT_DIR.joinpath(f"{out_fmt}.txt"), + is_comparetest=True, ) @@ -204,21 +238,30 @@ def test_custom_ls_input_output(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) -def test_custom_ls_input_binaural(test_info, in_layout, out_fmt): +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_custom_ls_input_binaural(test_info, in_layout, out_fmt, framing_5ms): compare_renderer_vs_mergetarget( - test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, is_comparetest=True + test_info, + CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), + out_fmt, + framing_5ms=(framing_5ms == "5ms"), + is_comparetest=True, ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) -def test_custom_ls_input_binaural_headrotation(test_info, in_layout, out_fmt, trj_file): +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_custom_ls_input_binaural_headrotation( + test_info, in_layout, out_fmt, trj_file, framing_5ms +): compare_renderer_vs_mergetarget( test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), out_fmt, trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), + framing_5ms=(framing_5ms == "5ms"), is_comparetest=True, ) diff --git a/tests/renderer/utils.py b/tests/renderer/utils.py index d23c094bb8..91009f025e 100644 --- a/tests/renderer/utils.py +++ b/tests/renderer/utils.py @@ -27,12 +27,12 @@ """ import logging +import os import subprocess as sp import sys -import os from pathlib import Path from tempfile import TemporaryDirectory -from typing import Optional, Tuple, Dict +from typing import Dict, Optional, Tuple import numpy as np import pytest @@ -43,11 +43,13 @@ from .constants import * sys.path.append(SCRIPTS_DIR) import pyaudio3dtools + # fixture returns test information, enabling per-testcase SNR @pytest.fixture def test_info(request): return request + def run_cmd(cmd, env=None): logging.info(f"\nRunning command\n{' '.join(cmd)}\n") try: @@ -65,7 +67,6 @@ def check_BE( cut: np.ndarray, cut_fs: int, ): - if ref is None or np.array_equal(ref, np.zeros_like(ref)): pytest.fail("REF signal does not exist or is zero!") @@ -148,7 +149,6 @@ def run_renderer( else: framing_name = "" - if not isinstance(out_fmt, str): out_name = f"{out_fmt.stem}" else: @@ -212,12 +212,15 @@ def run_renderer( # Set env variables for UBSAN env = os.environ.copy() if test_case_name and "UBSAN_OPTIONS" in env.keys(): - env["UBSAN_OPTIONS"] = env["UBSAN_OPTIONS"] + f",log_path=usan_log_{test_case_name}" + env["UBSAN_OPTIONS"] = ( + env["UBSAN_OPTIONS"] + f",log_path=usan_log_{test_case_name}" + ) run_cmd(cmd, env) return pyaudio3dtools.audiofile.readfile(out_file) + def compare_renderer_vs_mergetarget(test_info, in_fmt, out_fmt, **kwargs): ref, ref_fs = run_renderer( in_fmt, @@ -227,16 +230,27 @@ def compare_renderer_vs_mergetarget(test_info, in_fmt, out_fmt, **kwargs): output_path_base=OUTPUT_PATH_REF, **kwargs, ) - cut, cut_fs = run_renderer(in_fmt, out_fmt, test_case_name=test_info.node.name, **kwargs) + cut, cut_fs = run_renderer( + in_fmt, out_fmt, test_case_name=test_info.node.name, **kwargs + ) check_BE(test_info, ref, ref_fs, cut, cut_fs) def compare_renderer_vs_pyscripts(test_info, in_fmt, out_fmt, **kwargs): ref, ref_fs = run_pyscripts(in_fmt, out_fmt, **kwargs) - cut, cut_fs = run_renderer(in_fmt, out_fmt, test_case_name=test_info.node.name, **kwargs) + cut, cut_fs = run_renderer( + in_fmt, out_fmt, test_case_name=test_info.node.name, **kwargs + ) check_BE(test_info, ref, ref_fs, cut, cut_fs) -def compare_renderer_args(test_info, in_fmt, out_fmt, ref_kwargs: Dict, cut_kwargs: Dict): - ref, ref_fs = run_renderer(in_fmt, out_fmt, test_case_name=test_info.node.name, **ref_kwargs) - cut, cut_fs = run_renderer(in_fmt, out_fmt, test_case_name=test_info.node.name, **cut_kwargs) - check_BE(test_info, ref, ref_fs, cut, cut_fs) \ No newline at end of file + +def compare_renderer_args( + test_info, in_fmt, out_fmt, ref_kwargs: Dict, cut_kwargs: Dict +): + ref, ref_fs = run_renderer( + in_fmt, out_fmt, test_case_name=test_info.node.name, **ref_kwargs + ) + cut, cut_fs = run_renderer( + in_fmt, out_fmt, test_case_name=test_info.node.name, **cut_kwargs + ) + check_BE(test_info, ref, ref_fs, cut, cut_fs) diff --git a/tests/split_rendering/constants.py b/tests/split_rendering/constants.py index c53455f66c..e34480368c 100644 --- a/tests/split_rendering/constants.py +++ b/tests/split_rendering/constants.py @@ -172,6 +172,7 @@ SPLIT_PRE_REND_CMD = [ "BINAURAL_SPLIT_CODED", "-tf", "", # 14 -> post-trajectory file + "-fr5", ] """ Split-post Renderer commandline template """ @@ -189,4 +190,5 @@ SPLIT_POST_REND_CMD = [ "BINAURAL", "-tf", "", # 12 -> post-trajectory file + "-fr5", ] -- GitLab From 50dbeb9fb0f1006e41ca64d120ccb93554ec46ed Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Wed, 2 Aug 2023 17:32:31 +0200 Subject: [PATCH 074/175] clang-format --- apps/decoder.c | 19 +-- apps/renderer.c | 4 +- lib_dec/ivas_binRenderer_internal.c | 14 +- lib_dec/ivas_jbm_dec.c | 240 ++++++++++++++-------------- lib_dec/ivas_mc_paramupmix_dec.c | 2 +- lib_dec/lib_dec.c | 30 ++-- lib_rend/ivas_objectRenderer.c | 6 +- lib_rend/ivas_rotation.c | 19 ++- lib_rend/ivas_splitRendererPre.c | 6 +- lib_rend/lib_rend.c | 4 +- 10 files changed, 172 insertions(+), 172 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 8af11a9c58..8bf13d83dc 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1987,10 +1987,10 @@ static ivas_error decodeG192( #ifdef SPLIT_REND_WITH_HEAD_ROT if ( headRotReader == NULL ) { - Quaternion.w = -3.0f; - Quaternion.x = 0.0f; - Quaternion.y = 0.0f; - Quaternion.z = 0.0f; + Quaternion.w = -3.0f; + Quaternion.x = 0.0f; + Quaternion.y = 0.0f; + Quaternion.z = 0.0f; } else { @@ -2099,7 +2099,7 @@ static ivas_error decodeG192( #ifdef SPLIT_REND_WITH_HEAD_ROT if ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED || arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) { - error = IVAS_DEC_GetSplitBinaural(hIvasDec, &splitRendBits, &nSamplesRendered_loop, &needNewFrame ); + error = IVAS_DEC_GetSplitBinaural( hIvasDec, &splitRendBits, &nSamplesRendered_loop, &needNewFrame ); nSamplesRendered += nSamplesRendered_loop; nSamplesToRender -= nSamplesRendered_loop; if ( error != IVAS_ERR_OK ) @@ -2161,7 +2161,7 @@ static ivas_error decodeG192( , &hSplitRendFileReadWrite #endif - ); + ); if ( error != IVAS_ERR_OK ) { goto cleanup; @@ -2341,11 +2341,12 @@ static ivas_error decodeG192( } - if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternion, Pos + if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternion, Pos #ifdef SPLIT_REND_WITH_HEAD_ROT - ,DEFAULT_AXIS + , + DEFAULT_AXIS #endif - ) ) != IVAS_ERR_OK ) + ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; diff --git a/apps/renderer.c b/apps/renderer.c index f03595da80..3ec778128e 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1518,7 +1518,7 @@ int main( , inBuffer.config.is_cldfb, cldfbAna #endif - ); + ); #ifdef LIB_REND_API_5MS if ( isCurrentFrameMultipleOf20ms ) @@ -1634,7 +1634,7 @@ int main( , DEFAULT_AXIS #endif - ); + ); if ( error != IVAS_ERR_OK && error != IVAS_ERR_INVALID_OUTPUT_FORMAT ) { fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index 917db39156..6cb15d0834 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -1741,7 +1741,7 @@ void ivas_binaural_cldfb( } /* Implement binaural rendering */ - ivas_binRenderer( + ivas_binRenderer( st_ivas->hBinRenderer, #ifdef SPLIT_REND_WITH_HEAD_ROT &st_ivas->splitBinRend.splitrend.multiBinPoseData, @@ -1752,7 +1752,7 @@ void ivas_binaural_cldfb( #endif JBM_CLDFB_SLOTS_IN_SUBFRAME, #ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG - NULL, + NULL, #endif Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, @@ -1933,7 +1933,7 @@ void ivas_binaural_cldfb_sf( } /* Implement binaural rendering */ - ivas_binRenderer( + ivas_binRenderer( st_ivas->hBinRenderer, #ifdef SPLIT_REND_WITH_HEAD_ROT &st_ivas->splitBinRend.splitrend.multiBinPoseData, @@ -2260,7 +2260,7 @@ void ivas_rend_CldfbMultiBinRendProcess( #ifdef API_5MS idx = slot_idx; #else - idx = sf_idx * MAX_PARAM_SPATIAL_SUBFRAMES + slot_idx; + idx = sf_idx * MAX_PARAM_SPATIAL_SUBFRAMES + slot_idx; #endif for ( ch_idx = 0; ch_idx < hCldfbRend->nInChannels; ch_idx++ ) { @@ -2276,7 +2276,7 @@ void ivas_rend_CldfbMultiBinRendProcess( #ifdef API_5MS ( *pCombinedOrientationData )->Quaternion = ( *pCombinedOrientationData )->Quaternion; #else - ( *pCombinedOrientationData )->Quaternions[sf_idx] = ( *pCombinedOrientationData )->Quaternions[0]; + ( *pCombinedOrientationData )->Quaternions[sf_idx] = ( *pCombinedOrientationData )->Quaternions[0]; #endif for ( i = 0; i < 3; i++ ) { @@ -2310,12 +2310,12 @@ void ivas_rend_CldfbMultiBinRendProcess( for ( pose_idx = 0; pose_idx < hCldfbRend->numPoses; pose_idx++ ) { - for ( slot_idx = 0; slot_idx < MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ ) /* TODO(splitrend): this looks strange */ + for ( slot_idx = 0; slot_idx < MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ ) /* TODO(splitrend): this looks strange */ { #ifdef API_5MS idx = slot_idx; #else - idx = sf_idx * MAX_PARAM_SPATIAL_SUBFRAMES + slot_idx; + idx = sf_idx * MAX_PARAM_SPATIAL_SUBFRAMES + slot_idx; #endif for ( ch_idx = 0; ch_idx < BINAURAL_CHANNELS; ch_idx++ ) { diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 7dfb347957..eee8fbfb17 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -757,126 +757,126 @@ ivas_error ivas_jbm_dec_render( nSamplesAskedLocal = st_ivas->hTcBuffer->subframe_nbslots[st_ivas->hTcBuffer->subframes_rendered] * st_ivas->hTcBuffer->n_samples_granularity; #endif -/* tmu2bay : needs merge resolution */ -// <<<<<<< HEAD -// /* HP filtering */ -// #ifdef SPLIT_REND_WITH_HEAD_ROT -// /*no HPF when rendering is already done*/ -// if ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) -// #endif -// { -// for ( n = 0; n < st_ivas->nchan_transport; n++ ) -// { -// if ( n != LFE_CHANNEL ) -// { -// hp20( p_output[n], *nSamplesRendered, st_ivas->mem_hp20_out[n], output_Fs ); -// } -// } -// } - -// if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) ) -// { -// ivas_mc2sba( st_ivas->hTransSetup, p_output, p_output, *nSamplesRendered, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); -// } - -// /* Rendering */ -// if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) -// { -// #ifdef SPLIT_REND_WITH_HEAD_ROT -// /*handled in CLDFB domain already*/ -// if ( ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) && -// ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) -// #endif -// { -// ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); -// } -// } -// else if ( st_ivas->renderer_type == RENDERER_MC ) -// { -// ivas_ls_setup_conversion( st_ivas, MC_PARAMUPMIX_MAX_INPUT_CHANS, *nSamplesRendered, p_output, p_output ); -// } -// else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) -// { -// ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); -// } -// else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) -// { -// if ( ( ivas_td_binaural_renderer( st_ivas, p_output, *nSamplesRendered ) ) != IVAS_ERR_OK ) -// { -// return error; -// } - -// ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); -// } -// } -// #endif -// else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) -// { -// ivas_param_mc_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); -// } -// else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) -// { -// int16_t offset = hSpatParamRendCom->slots_rendered * hSpatParamRendCom->slot_size; -// nchan_remapped = st_ivas->nchan_transport; - -// if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) -// { -// ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); -// } -// else if ( st_ivas->renderer_type == RENDERER_DIRAC || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) /* rendering to CICPxx and Ambisonics */ -// { -// ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); - -// if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) -// { -// /* we still need to copy the separate channel if available */ -// if ( st_ivas->hOutSetup.separateChannelEnabled ) -// { -// mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); -// } - -// ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); -// } -// else if ( st_ivas->intern_config == AUDIO_CONFIG_5_1 && ( output_config == AUDIO_CONFIG_5_1_2 || output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1 ) ) -// { -// for ( n = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; n < st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe; n++ ) -// { -// set_zero( output[n], *nSamplesRendered ); -// } -// } -// } - -// /* copy discrete C and TD LFE from internal TC to output */ -// if ( st_ivas->hOutSetup.separateChannelEnabled ) -// { -// if ( output_config == AUDIO_CONFIG_5_1 || output_config == AUDIO_CONFIG_7_1 || -// output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1_4 || -// output_config == AUDIO_CONFIG_5_1_2 || ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe > 0 ) ) -// { -// mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL] + offset, output[LFE_CHANNEL], *nSamplesRendered ); -// mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); -// } -// else if ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe == 0 ) -// { -// /* Delay the separated channel to sync with the DirAC rendering */ -// mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); -// } -// } -// } -// } - -// /*----------------------------------------------------------------* -// * Write IVAS output channels -// * - compensation for saturation -// * - float to integer conversion -// *----------------------------------------------------------------*/ - -// st_ivas->hTcBuffer->n_samples_available -= *nSamplesRendered; -// st_ivas->hTcBuffer->n_samples_rendered += *nSamplesRendered; - -// if ( st_ivas->hTcBuffer->n_samples_discard > 0 ) -// { -// >>>>>>> 3702d9f6a3bba65a7309b2b7a67dbebc74e4c8e5 + /* tmu2bay : needs merge resolution */ + // <<<<<<< HEAD + // /* HP filtering */ + // #ifdef SPLIT_REND_WITH_HEAD_ROT + // /*no HPF when rendering is already done*/ + // if ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) + // #endif + // { + // for ( n = 0; n < st_ivas->nchan_transport; n++ ) + // { + // if ( n != LFE_CHANNEL ) + // { + // hp20( p_output[n], *nSamplesRendered, st_ivas->mem_hp20_out[n], output_Fs ); + // } + // } + // } + + // if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) ) + // { + // ivas_mc2sba( st_ivas->hTransSetup, p_output, p_output, *nSamplesRendered, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); + // } + + // /* Rendering */ + // if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + // { + // #ifdef SPLIT_REND_WITH_HEAD_ROT + // /*handled in CLDFB domain already*/ + // if ( ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) && + // ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) + // #endif + // { + // ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); + // } + // } + // else if ( st_ivas->renderer_type == RENDERER_MC ) + // { + // ivas_ls_setup_conversion( st_ivas, MC_PARAMUPMIX_MAX_INPUT_CHANS, *nSamplesRendered, p_output, p_output ); + // } + // else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) + // { + // ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); + // } + // else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) + // { + // if ( ( ivas_td_binaural_renderer( st_ivas, p_output, *nSamplesRendered ) ) != IVAS_ERR_OK ) + // { + // return error; + // } + + // ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); + // } + // } + // #endif + // else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) + // { + // ivas_param_mc_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); + // } + // else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) + // { + // int16_t offset = hSpatParamRendCom->slots_rendered * hSpatParamRendCom->slot_size; + // nchan_remapped = st_ivas->nchan_transport; + + // if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) + // { + // ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); + // } + // else if ( st_ivas->renderer_type == RENDERER_DIRAC || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) /* rendering to CICPxx and Ambisonics */ + // { + // ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); + + // if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) + // { + // /* we still need to copy the separate channel if available */ + // if ( st_ivas->hOutSetup.separateChannelEnabled ) + // { + // mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); + // } + + // ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); + // } + // else if ( st_ivas->intern_config == AUDIO_CONFIG_5_1 && ( output_config == AUDIO_CONFIG_5_1_2 || output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1 ) ) + // { + // for ( n = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; n < st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe; n++ ) + // { + // set_zero( output[n], *nSamplesRendered ); + // } + // } + // } + + // /* copy discrete C and TD LFE from internal TC to output */ + // if ( st_ivas->hOutSetup.separateChannelEnabled ) + // { + // if ( output_config == AUDIO_CONFIG_5_1 || output_config == AUDIO_CONFIG_7_1 || + // output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1_4 || + // output_config == AUDIO_CONFIG_5_1_2 || ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe > 0 ) ) + // { + // mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL] + offset, output[LFE_CHANNEL], *nSamplesRendered ); + // mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); + // } + // else if ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe == 0 ) + // { + // /* Delay the separated channel to sync with the DirAC rendering */ + // mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); + // } + // } + // } + // } + + // /*----------------------------------------------------------------* + // * Write IVAS output channels + // * - compensation for saturation + // * - float to integer conversion + // *----------------------------------------------------------------*/ + + // st_ivas->hTcBuffer->n_samples_available -= *nSamplesRendered; + // st_ivas->hTcBuffer->n_samples_rendered += *nSamplesRendered; + + // if ( st_ivas->hTcBuffer->n_samples_discard > 0 ) + // { + // >>>>>>> 3702d9f6a3bba65a7309b2b7a67dbebc74e4c8e5 for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) { p_output[n] = &output[n][0]; diff --git a/lib_dec/ivas_mc_paramupmix_dec.c b/lib_dec/ivas_mc_paramupmix_dec.c index 02f663f668..8c8aa7b712 100644 --- a/lib_dec/ivas_mc_paramupmix_dec.c +++ b/lib_dec/ivas_mc_paramupmix_dec.c @@ -497,7 +497,7 @@ ivas_error ivas_mc_paramupmix_dec_open( #else st_ivas->hDecoderConfig->voip_active == 1 #endif - && st_ivas->hTcBuffer == NULL ) + && st_ivas->hTcBuffer == NULL ) { int16_t nchan_to_allocate; int16_t nchan_tc; diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index caf2a7a5cd..e087d36459 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1081,10 +1081,10 @@ ivas_error IVAS_DEC_GetSamples( #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT ivas_error IVAS_DEC_GetSplitBinaural( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode*/ - int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ - bool *needNewFrame /* indication that the decoder needs a new frame */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode*/ + int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ + bool *needNewFrame /* indication that the decoder needs a new frame */ ) { Decoder_Struct *st_ivas; @@ -1102,7 +1102,7 @@ ivas_error IVAS_DEC_GetSplitBinaural( output_Fs = st_ivas->hDecoderConfig->output_Fs; numSamplesPerChannel = output_Fs / FRAMES_PER_SEC; /* TODO(sgi): Accommodate 5ms framing */ - if ( output_config != AUDIO_CONFIG_BINAURAL_SPLIT_CODED && output_config != AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) + if ( output_config != AUDIO_CONFIG_BINAURAL_SPLIT_CODED && output_config != AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { return IVAS_ERR_WRONG_PARAMS; } @@ -1120,11 +1120,11 @@ ivas_error IVAS_DEC_GetSplitBinaural( /* Decode and render */ error = IVAS_DEC_GetSamples( - hIvasDec, - numSamplesPerChannel, - output_int, - &nOutSamplesLocal, - needNewFrame ); + hIvasDec, + numSamplesPerChannel, + output_int, + &nOutSamplesLocal, + needNewFrame ); if ( error != IVAS_ERR_OK || *needNewFrame ) { return error; @@ -1135,14 +1135,14 @@ ivas_error IVAS_DEC_GetSplitBinaural( /*split rendering process calls*/ hSplitBinRend = &st_ivas->splitBinRend; - ivas_set_split_rend_setup(hSplitBinRend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hCombinedOrientationData, hSplitRendBits ); + ivas_set_split_rend_setup( hSplitBinRend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hCombinedOrientationData, hSplitRendBits ); numPoses = hSplitBinRend->splitrend.multiBinPoseData.num_poses; /* [tmp] convert int back to float and change buffer layout */ - for (i = 0; i < nOutSamplesLocal; ++i) + for ( i = 0; i < nOutSamplesLocal; ++i ) { - for (j = 0; j < BINAURAL_CHANNELS * numPoses; ++j) + for ( j = 0; j < BINAURAL_CHANNELS * numPoses; ++j ) { output[j][i] = (float) output_int[i * BINAURAL_CHANNELS * numPoses + j]; } @@ -1596,8 +1596,8 @@ ivas_error IVAS_DEC_FeedHeadTrackData( IVAS_QUATERNION orientation, /* i : head-tracking data, listener orientation */ IVAS_VECTOR3 Pos /* i : listener position */ #else - IVAS_QUATERNION *orientation, /* i : head-tracking data, listener orientation */ - IVAS_VECTOR3 *Pos /* i : listener position */ + IVAS_QUATERNION *orientation, /* i : head-tracking data, listener orientation */ + IVAS_VECTOR3 *Pos /* i : listener position */ #endif #ifdef SPLIT_REND_WITH_HEAD_ROT , diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index fbd1f0d926..6aa7d4aaa3 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -889,9 +889,9 @@ void ObjRenderIvasFrame_splitBinaural( { st_ivas->hCombinedOrientationData->Quaternion.w = -3.0f; Quat2EulerDegree( originalHeadRot, /* TODO tmu : fix bug with ordering*/ - &st_ivas->hCombinedOrientationData->Quaternion.z, - &st_ivas->hCombinedOrientationData->Quaternion.y, - &st_ivas->hCombinedOrientationData->Quaternion.x ); + &st_ivas->hCombinedOrientationData->Quaternion.z, + &st_ivas->hCombinedOrientationData->Quaternion.y, + &st_ivas->hCombinedOrientationData->Quaternion.x ); st_ivas->hCombinedOrientationData->Quaternion.x += pMultiBinPoseData->relative_head_poses[pos_idx][0]; st_ivas->hCombinedOrientationData->Quaternion.y += pMultiBinPoseData->relative_head_poses[pos_idx][1]; st_ivas->hCombinedOrientationData->Quaternion.z += pMultiBinPoseData->relative_head_poses[pos_idx][2]; diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index e726d9b9ca..1706790662 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -58,14 +58,14 @@ static ivas_error combine_external_and_head_orientations( int16_t numHeadRotQuaternions, #endif EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, - COMBINED_ORIENTATION_HANDLE hCombinedOrientationData -); + COMBINED_ORIENTATION_HANDLE hCombinedOrientationData ); static void external_target_interpolation( EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, COMBINED_ORIENTATION_HANDLE hCombinedOrientationData #ifndef API_5MS - ,const int16_t i + , + const int16_t i #endif ); @@ -433,16 +433,16 @@ void rotateFrame_shd( /* move Rmat to Rmat_prev */ for ( i = 0; i < 3; i++ ) { - mvr2r( + mvr2r( #ifdef API_5MS - hCombinedOrientationData->Rmat[i], + hCombinedOrientationData->Rmat[i], #else hCombinedOrientationData->Rmat[subframe_idx][i], #endif #ifdef SPLIT_REND_WITH_HEAD_ROT hCombinedOrientationData->Rmat_prev[0][i], #else - hCombinedOrientationData->Rmat_prev[i], + hCombinedOrientationData->Rmat_prev[i], #endif 3 ); } @@ -1056,7 +1056,7 @@ ivas_error combine_external_and_head_orientations_dec( } #endif - return combine_external_and_head_orientations( + return combine_external_and_head_orientations( headRotQuaternions, listenerPos, #ifdef SPLIT_REND_WITH_HEAD_ROT @@ -1066,8 +1066,7 @@ ivas_error combine_external_and_head_orientations_dec( numHeadRotQuaternions, #endif hExtOrientationData, - hCombinedOrientationData - ); + hCombinedOrientationData ); } @@ -1132,7 +1131,7 @@ ivas_error combine_external_and_head_orientations_rend( #endif } - return combine_external_and_head_orientations( + return combine_external_and_head_orientations( headRotQuaternions, listenerPos, #ifdef SPLIT_REND_WITH_HEAD_ROT diff --git a/lib_rend/ivas_splitRendererPre.c b/lib_rend/ivas_splitRendererPre.c index 99667a0736..7292ca5928 100644 --- a/lib_rend/ivas_splitRendererPre.c +++ b/lib_rend/ivas_splitRendererPre.c @@ -2350,11 +2350,11 @@ ivas_error ivas_renderMultiBinToSplitBinaural( /*if CLDFB handles have been allocated then assume valid multi binaural input in out[][] buffer and perform CLDFB analysis*/ error = ivas_renderMultiTDBinToSplitBinaural( hSplitBin, #ifdef API_5MS - headPosition, + headPosition, #else - headPositions, + headPositions, #endif - SplitRendBitRate, pBits, max_bands, out, + SplitRendBitRate, pBits, max_bands, out, low_res_pre_rend_rot, pcm_out ); pop_wmops(); return error; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index ba8246bccf..064b052eb3 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -5872,8 +5872,8 @@ static ivas_error rotateFrameSba( #endif { #ifndef API_5MS - idx = subframe_idx * subframe_len + i; - cf = headRotData->crossfade[i]; + idx = subframe_idx * subframe_len + i; + cf = headRotData->crossfade[i]; oneminuscf = 1 - cf; #endif /* As the rotation matrix becomes block diagonal in a SH basis, we can*/ -- GitLab From 370fca531ed8c7ee62939a0860e9ac4b37f6cbdd Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Wed, 2 Aug 2023 17:36:53 +0200 Subject: [PATCH 075/175] [cleanup] consolidate LIB_REND_API_5MS into API_5MS --- apps/renderer.c | 32 +++--- lib_com/common_api_types.h | 2 +- lib_com/ivas_prot.h | 2 +- lib_com/options.h | 1 - lib_dec/ivas_dirac_dec.c | 4 +- lib_dec/ivas_objectRenderer_internal.c | 2 +- lib_dec/ivas_omasa_dec.c | 4 +- lib_rend/ivas_crend.c | 10 +- lib_rend/ivas_dirac_dec_binaural_functions.c | 14 +-- lib_rend/ivas_objectRenderer.c | 8 +- lib_rend/ivas_prot_rend.h | 6 +- lib_rend/ivas_rotation.c | 32 +++--- lib_rend/ivas_stat_rend.h | 2 +- lib_rend/lib_rend.c | 100 ++++++++++--------- lib_rend/lib_rend.h | 6 +- 15 files changed, 114 insertions(+), 111 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index 3ec778128e..4011cdefea 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -175,7 +175,7 @@ typedef struct float lfeConfigElevation; bool lfeCustomRoutingEnabled; char inLfePanningMatrixFile[RENDERER_MAX_CLI_ARG_LENGTH]; -#ifdef LIB_REND_API_5MS +#ifdef API_5MS bool framing_5ms; #endif #ifdef FIX_488_SYNC_DELAY @@ -209,7 +209,7 @@ typedef enum #endif CmdLnOptionId_referenceVectorFile, CmdLnOptionId_exteriorOrientationFile, -#ifdef LIB_REND_API_5MS +#ifdef API_5MS CmdLnOptionId_framing5ms, #endif #ifdef FIX_488_SYNC_DELAY @@ -354,7 +354,7 @@ static const CmdLnParser_Option cliOptions[] = { .matchShort = "exof", .description = "External orientation trajectory file for simulation of external orientations", }, -#ifdef LIB_REND_API_5MS +#ifdef API_5MS { .id = CmdLnOptionId_framing5ms, .match = "framing_5ms", @@ -801,7 +801,7 @@ int main( int32_t delayTimeScale = 0; int16_t i, numChannels; ivas_error error = IVAS_ERR_OK; -#ifndef LIB_REND_API_5MS +#ifndef API_5MS IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; #endif @@ -1028,7 +1028,7 @@ int main( } #endif const int16_t frameSize_smpls = (int16_t) ( -#ifdef LIB_REND_API_5MS +#ifdef API_5MS ( args.framing_5ms ? 5 : 20 ) #else 20 @@ -1460,7 +1460,7 @@ int main( fprintf( stdout, "\n\n-- Start the renderer (quiet mode) --\n\n" ); } -#ifdef LIB_REND_API_5MS +#ifdef API_5MS ObjectPositionBuffer mtdBuffer; #endif @@ -1468,7 +1468,7 @@ int main( { int16_t num_in_channels; num_in_channels = inBuffer.config.numChannels; -#ifdef LIB_REND_API_5MS +#ifdef API_5MS const bool isCurrentFrameMultipleOf20ms = !args.framing_5ms || frame % 4 == 0; #endif @@ -1520,7 +1520,7 @@ int main( #endif ); -#ifdef LIB_REND_API_5MS +#ifdef API_5MS if ( isCurrentFrameMultipleOf20ms ) { #else @@ -1558,14 +1558,14 @@ int main( exit( -1 ); } } -#ifdef LIB_REND_API_5MS +#ifdef API_5MS } #endif /* Read from head rotation trajectory file if specified */ if ( headRotReader != NULL ) { -#ifdef LIB_REND_API_5MS +#ifdef API_5MS IVAS_QUATERNION headRot; IVAS_VECTOR3 Pos; @@ -1622,13 +1622,13 @@ int main( } else { -#ifdef LIB_REND_API_5MS +#ifdef API_5MS if ( ( error = IVAS_REND_DisableHeadRotation( hIvasRend ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error disabling head rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } -#else /* LIB_REND_API_5MS */ +#else /* API_5MS */ error = IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL #ifdef SPLIT_REND_WITH_HEAD_ROT , @@ -1640,7 +1640,7 @@ int main( fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } -#endif /* LIB_REND_API_5MS */ +#endif /* API_5MS */ } #ifdef SPLIT_REND_WITH_HEAD_ROT @@ -1655,7 +1655,7 @@ int main( /* Read from external orientation file if specified */ if ( externalOrientationFileReader != NULL ) { -#ifdef LIB_REND_API_5MS +#ifdef API_5MS IVAS_QUATERNION quat; int8_t enableHeadRotation; int8_t enableExternalOrientation; @@ -2622,7 +2622,7 @@ static CmdlnArgs defaultArgs( args.lfeCustomRoutingEnabled = false; clearString( args.inLfePanningMatrixFile ); -#ifdef LIB_REND_API_5MS +#ifdef API_5MS args.framing_5ms = false; #endif #ifdef FIX_488_SYNC_DELAY @@ -2767,7 +2767,7 @@ static void parseOption( exit( -1 ); } break; -#ifdef LIB_REND_API_5MS +#ifdef API_5MS case CmdLnOptionId_framing5ms: assert( numOptionValues == 0 ); args->framing_5ms = true; diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index 238f9e214e..ccef204b29 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -50,7 +50,7 @@ #define IVAS_CLDFB_NO_CHANNELS_MAX ( 60 ) #define IVAS_MAX_INPUT_LFE_CHANNELS 4 -#ifndef LIB_REND_API_5MS +#ifndef API_5MS #define RENDERER_HEAD_POSITIONS_PER_FRAME 4 #endif diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 38e5461d88..4b638d3ad9 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -3680,7 +3680,7 @@ void ivas_dirac_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ const int16_t nchan_transport /* i : number of transport channels */ -#ifdef LIB_REND_API_5MS +#ifdef API_5MS ,const int16_t num_subframes /* i : number of subframes to render */ #endif ); diff --git a/lib_com/options.h b/lib_com/options.h index e4f9ebeea2..72e82628fd 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -165,7 +165,6 @@ #define API_5MS #ifdef API_5MS #define JITTER_MEM_OPTIM_RENDERING -#define LIB_REND_API_5MS /* FhG: Adds 5ms framing capability to lib_rend */ /* TODO(sgi): needs to be joined with API_5MS */ #endif #define LIB_REND_FIX_HRTFPARAMBIN_MEMLEAK // 5 ms branch switches end diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 135605d7c2..6c175435d7 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1635,7 +1635,7 @@ void ivas_dirac_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ const int16_t nchan_transport /* i : number of transport channels */ -#ifdef LIB_REND_API_5MS +#ifdef API_5MS , const int16_t num_subframes /* i : number of subframes to render */ #endif @@ -1671,7 +1671,7 @@ void ivas_dirac_dec( ivas_dirac_dec_set_md_map( st_ivas, DEFAULT_JBM_CLDFB_TIMESLOTS ); -#ifdef LIB_REND_API_5MS +#ifdef API_5MS for ( subframe_idx = 0; subframe_idx < num_subframes; subframe_idx++ ) #else for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) diff --git a/lib_dec/ivas_objectRenderer_internal.c b/lib_dec/ivas_objectRenderer_internal.c index 7f9e739dd5..0ee51dc2ef 100644 --- a/lib_dec/ivas_objectRenderer_internal.c +++ b/lib_dec/ivas_objectRenderer_internal.c @@ -135,7 +135,7 @@ ivas_error ivas_td_binaural_renderer( ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->listenerPos : NULL, #endif ism_md_subframe_update, output, output_frame -#ifdef LIB_REND_API_5MS +#ifdef API_5MS , MAX_PARAM_SPATIAL_SUBFRAMES #endif diff --git a/lib_dec/ivas_omasa_dec.c b/lib_dec/ivas_omasa_dec.c index 7d1ddbebc3..a7b8e489a7 100644 --- a/lib_dec/ivas_omasa_dec.c +++ b/lib_dec/ivas_omasa_dec.c @@ -583,7 +583,7 @@ void ivas_omasa_dirac_rend( dirac_read_idx = st_ivas->hSpatParamRendCom->dirac_read_idx; ivas_dirac_dec( st_ivas, output, st_ivas->nchan_transport -#ifdef LIB_REND_API_5MS +#ifdef API_5MS , MAX_PARAM_SPATIAL_SUBFRAMES #endif @@ -632,7 +632,7 @@ ivas_error ivas_omasa_dirac_td_binaural( } ivas_dirac_dec_binaural( st_ivas, st_ivas->hCombinedOrientationData, output, st_ivas->nchan_transport -#ifdef LIB_REND_API_5MS +#ifdef API_5MS , MAX_PARAM_SPATIAL_SUBFRAMES #endif diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index 02319321f3..19e2dad7bc 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -1451,7 +1451,7 @@ ivas_error ivas_rend_crendProcess( EFAP_HANDLE hEFAPdata, float *output[], /* i/o: input/output audio channels */ const int32_t output_Fs -#ifdef LIB_REND_API_5MS +#ifdef API_5MS , const int16_t num_subframes /* i : number of subframes to render */ #endif @@ -1461,7 +1461,7 @@ ivas_error ivas_rend_crendProcess( #endif ) { -#ifdef LIB_REND_API_5MS +#ifdef API_5MS int16_t i, subframe_idx, subframe_len; #else int16_t i, subframe_idx, output_frame, subframe_len; @@ -1518,7 +1518,7 @@ ivas_error ivas_rend_crendProcess( return error; } -#ifdef LIB_REND_API_5MS +#ifdef API_5MS subframe_len = (int16_t) output_Fs / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES; #else output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC ); @@ -1530,7 +1530,7 @@ ivas_error ivas_rend_crendProcess( p_pcm_tmp[i] = pcm_tmp[i]; } -#ifdef LIB_REND_API_5MS +#ifdef API_5MS for ( subframe_idx = 0; subframe_idx < num_subframes; subframe_idx++ ) #else for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) @@ -1588,7 +1588,7 @@ ivas_error ivas_rend_crendProcess( /* move to output */ for ( i = 0; i < nchan_out; i++ ) { -#ifdef LIB_REND_API_5MS +#ifdef API_5MS mvr2r( pcm_tmp[i], output[i], num_subframes * subframe_len ); #else mvr2r( pcm_tmp[i], output[i], output_frame ); diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index 234197415f..bf0fe7d405 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -575,7 +575,7 @@ void ivas_dirac_dec_binaural( COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined orientation handle */ float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ const int16_t nchan_transport /* i : number of transport channels */ -#ifdef LIB_REND_API_5MS +#ifdef API_5MS , const int16_t num_subframes /* i : number of subframes to render */ #endif @@ -652,7 +652,7 @@ void ivas_dirac_dec_binaural( generate_masking_noise_lb_dirac( st->hFdCngDec->hFdCngCom, st_ivas->hTcBuffer->tc[nchan_transport], DEFAULT_JBM_CLDFB_TIMESLOTS, st->cna_dirac_flag && st->flag_cna ); } -#ifdef LIB_REND_API_5MS +#ifdef API_5MS for ( subframe = 0; subframe < num_subframes; subframe++ ) #else for ( subframe = 0; subframe < MAX_PARAM_SPATIAL_SUBFRAMES; subframe++ ) @@ -951,7 +951,7 @@ static void ivas_dirac_dec_binaural_internal( subFrameTotalEne, IIReneLimiter ); #ifdef MASA_AND_OBJECTS ivas_dirac_dec_binaural_formulate_target_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Rmat, subframe, -#ifdef LIB_REND_API_5MS +#ifdef API_5MS hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation > 0, #else hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0, @@ -975,7 +975,7 @@ static void ivas_dirac_dec_binaural_internal( nchanSeparateChannels = (uint8_t) st_ivas->nchan_ism; } ivas_dirac_dec_binaural_determine_processing_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, max_band_decorr, Rmat, -#ifdef LIB_REND_API_5MS +#ifdef API_5MS hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation > 0, #else hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0, @@ -1025,7 +1025,7 @@ static void ivas_dirac_dec_binaural_internal( if ( hCombinedOrientationData ) { -#ifdef LIB_REND_API_5MS +#ifdef API_5MS Quaternions_ref = &hCombinedOrientationData->Quaternion; #else Quaternions_ref = &hCombinedOrientationData->Quaternions[0]; @@ -1059,7 +1059,7 @@ static void ivas_dirac_dec_binaural_internal( #ifdef MASA_AND_OBJECTS ivas_dirac_dec_binaural_formulate_target_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Rmat_local, subframe, -#ifdef LIB_REND_API_5MS +#ifdef API_5MS hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation > 0, #else hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0, @@ -1068,7 +1068,7 @@ static void ivas_dirac_dec_binaural_internal( ivas_dirac_dec_binaural_determine_processing_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, max_band_decorr, Rmat_local, -#ifdef LIB_REND_API_5MS +#ifdef API_5MS hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation > 0, #else hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0, diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 6aa7d4aaa3..9dbf3a8c4b 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -281,7 +281,7 @@ ivas_error ivas_td_binaural_renderer_unwrap( const int16_t ism_md_subframe_update, /* i : Number of subframes to delay ism metadata to sync with audio */ float *output[], /* i/o: SCE channels / Binaural synthesis */ const int16_t output_frame /* i : output frame length */ -#ifdef LIB_REND_API_5MS +#ifdef API_5MS , const int16_t num_subframes /* i : number of subframes to render */ #endif @@ -300,7 +300,7 @@ ivas_error ivas_td_binaural_renderer_unwrap( p_reverb_signal[ch] = reverb_signal[ch]; } -#ifdef LIB_REND_API_5MS +#ifdef API_5MS subframe_length = output_frame / num_subframes; #else subframe_length = output_frame / MAX_PARAM_SPATIAL_SUBFRAMES; @@ -332,7 +332,7 @@ ivas_error ivas_td_binaural_renderer_unwrap( #endif } -#ifdef LIB_REND_API_5MS +#ifdef API_5MS for ( subframe_idx = 0; subframe_idx < num_subframes; subframe_idx++ ) #else for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) @@ -792,7 +792,7 @@ ivas_error ivas_td_binaural_renderer_ext( ( hCombinedOrientationData != NULL ) ? ( *hCombinedOrientationData )->listenerPos : NULL, #endif ism_md_subframe_update_ext, p_output, output_frame -#ifdef LIB_REND_API_5MS +#ifdef API_5MS , 1 #endif diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index cc753de838..60b592cdf5 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -164,7 +164,7 @@ void ivas_dirac_dec_binaural( COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined orientation handle */ float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ const int16_t nchan_transport /* i : number of transport channels */ -#ifdef LIB_REND_API_5MS +#ifdef API_5MS ,const int16_t num_subframes /* i : number of subframes to render */ #endif ); @@ -576,7 +576,7 @@ ivas_error ivas_td_binaural_renderer_unwrap( const int16_t ism_md_subframe_update, float *output[], /* i/o: SCE channels / Binaural synthesis */ const int16_t output_frame /* i : output frame length */ -#ifdef LIB_REND_API_5MS +#ifdef API_5MS ,const int16_t num_subframes /* i : number of subframes to render */ #endif ); @@ -954,7 +954,7 @@ ivas_error ivas_rend_crendProcess( EFAP_HANDLE hEFAPdata, float *output[], /* i/o: input/output audio channels */ const int32_t output_Fs -#ifdef LIB_REND_API_5MS +#ifdef API_5MS ,const int16_t num_subframes /* i : number of subframes to render */ #endif #ifdef SPLIT_REND_WITH_HEAD_ROT diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 1706790662..586b96c08a 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -1099,7 +1099,7 @@ ivas_error combine_external_and_head_orientations_rend( { if ( hHeadTrackData->headRotEnabled ) { -#ifdef LIB_REND_API_5MS +#ifdef API_5MS headRotQuaternions = &hHeadTrackData->headPosition; listenerPos = &hHeadTrackData->Pos; #else @@ -1153,7 +1153,7 @@ ivas_error combine_external_and_head_orientations_rend( *------------------------------------------------------------------------*/ ivas_error combine_external_and_head_orientations( -#ifdef LIB_REND_API_5MS +#ifdef API_5MS IVAS_QUATERNION *headRotQuaternion, /* i : quaternion for head rotation */ #else IVAS_QUATERNION *headRotQuaternions, /* i : quaternions for head rotation */ @@ -1183,7 +1183,7 @@ ivas_error combine_external_and_head_orientations( /* Form combined orientations or return if no data available */ if ( hCombinedOrientationData == NULL ) { -#ifdef LIB_REND_API_5MS +#ifdef API_5MS if ( headRotQuaternion != NULL || hExtOrientationData != NULL ) #else if ( headRotQuaternions != NULL || hExtOrientationData != NULL ) @@ -1196,7 +1196,7 @@ ivas_error combine_external_and_head_orientations( return IVAS_ERR_OK; } } -#ifdef LIB_REND_API_5MS +#ifdef API_5MS else if ( headRotQuaternion == NULL && hExtOrientationData == NULL ) #else else if ( headRotQuaternions == NULL && hExtOrientationData == NULL ) @@ -1234,7 +1234,7 @@ ivas_error combine_external_and_head_orientations( } #endif } -#ifdef LIB_REND_API_5MS +#ifdef API_5MS else if ( hExtOrientationData == NULL && headRotQuaternion != NULL ) #else else if ( hExtOrientationData == NULL && headRotQuaternions != NULL ) @@ -1242,7 +1242,7 @@ ivas_error combine_external_and_head_orientations( { /* Head rotation only */ #ifdef API_5MS -#ifdef LIB_REND_API_5MS +#ifdef API_5MS hCombinedOrientationData->Quaternion = *headRotQuaternion; #else hCombinedOrientationData->Quaternion = *headRotQuaternions; @@ -1356,7 +1356,7 @@ ivas_error combine_external_and_head_orientations( #endif } -#ifdef LIB_REND_API_5MS +#ifdef API_5MS if ( hExtOrientationData != NULL && headRotQuaternion != NULL ) #else if ( hExtOrientationData != NULL && headRotQuaternions != NULL ) @@ -1370,7 +1370,7 @@ ivas_error combine_external_and_head_orientations( { if ( hExtOrientationData->enableExternalOrientation > 0 ) { -#ifdef LIB_REND_API_5MS +#ifdef API_5MS QuaternionProduct( hCombinedOrientationData->Quaternion, *headRotQuaternion, &hCombinedOrientationData->Quaternion ); #else QuaternionProduct( hCombinedOrientationData->Quaternion, *headRotQuaternions, &hCombinedOrientationData->Quaternion ); @@ -1378,7 +1378,7 @@ ivas_error combine_external_and_head_orientations( } else { -#ifdef LIB_REND_API_5MS +#ifdef API_5MS hCombinedOrientationData->Quaternion = *headRotQuaternion; #else hCombinedOrientationData->Quaternion = *headRotQuaternions; @@ -1465,7 +1465,7 @@ ivas_error combine_external_and_head_orientations( #endif } -#ifdef LIB_REND_API_5MS +#ifdef API_5MS if ( headRotQuaternion != NULL || hExtOrientationData != NULL ) #else if ( headRotQuaternions != NULL || hExtOrientationData != NULL ) @@ -1517,7 +1517,7 @@ ivas_error combine_external_and_head_orientations( } #endif } -#ifdef LIB_REND_API_5MS +#ifdef API_5MS if ( headRotQuaternion != NULL ) #else if ( headRotQuaternions != NULL ) @@ -1528,7 +1528,7 @@ ivas_error combine_external_and_head_orientations( { if ( hExtOrientationData->enableHeadRotation > 0 ) { -#ifdef LIB_REND_API_5MS +#ifdef API_5MS hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternion; #else hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternions; @@ -1541,7 +1541,7 @@ ivas_error combine_external_and_head_orientations( } else { -#ifdef LIB_REND_API_5MS +#ifdef API_5MS hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternion; #else hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternions; @@ -1582,7 +1582,7 @@ ivas_error combine_external_and_head_orientations( } /* Check if combined orientation is enabled */ -#ifdef LIB_REND_API_5MS +#ifdef API_5MS if ( headRotQuaternion != NULL && hExtOrientationData == NULL ) #else if ( headRotQuaternions != NULL && hExtOrientationData == NULL ) @@ -1605,7 +1605,7 @@ ivas_error combine_external_and_head_orientations( } #endif } -#ifdef LIB_REND_API_5MS +#ifdef API_5MS else if ( headRotQuaternion == NULL && hExtOrientationData != NULL ) #else else if ( headRotQuaternions == NULL && hExtOrientationData != NULL ) @@ -1634,7 +1634,7 @@ ivas_error combine_external_and_head_orientations( } #endif } -#ifdef LIB_REND_API_5MS +#ifdef API_5MS else if ( headRotQuaternion != NULL && hExtOrientationData != NULL ) #else else if ( headRotQuaternions != NULL && hExtOrientationData != NULL ) diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index 930c83eebe..0aa499f72a 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -819,7 +819,7 @@ typedef struct ivas_orient_trk_state_t typedef struct { int8_t headRotEnabled; -#ifdef LIB_REND_API_5MS +#ifdef API_5MS IVAS_QUATERNION headPosition; IVAS_VECTOR3 Pos; float crossfade_5ms[L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES]; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 064b052eb3..d4d4042664 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -70,7 +70,7 @@ #endif /* Frame size required when rendering to binaural */ -#ifdef LIB_REND_API_5MS +#ifdef API_5MS #define BINAURAL_RENDERING_FRAME_SIZE_MS 5 #else #define BINAURAL_RENDERING_FRAME_SIZE_MS 20 @@ -979,7 +979,7 @@ static ivas_error getNumNonLfeChannelsInSpeakerLayout( static ivas_error getMcConfigValues( IVAS_REND_AudioConfig inConfig, -#ifdef LIB_REND_API_5MS +#ifdef API_5MS const LSSETUP_CUSTOM_STRUCT *pInCustomLs, #else LSSETUP_CUSTOM_STRUCT inCustomLs, @@ -996,7 +996,7 @@ static ivas_error getMcConfigValues( switch ( inConfig ) { case IVAS_REND_AUDIO_CONFIG_LS_CUSTOM: -#ifdef LIB_REND_API_5MS +#ifdef API_5MS *azimuth = (const float *) &pInCustomLs->ls_azimuth; *elevation = (const float *) &pInCustomLs->ls_elevation; if ( pInCustomLs->num_lfe > 0 ) @@ -1189,7 +1189,7 @@ static ivas_error initHeadRotation( /* Head rotation is enabled by default */ hIvasRend->headRotData.headRotEnabled = 1; -#ifdef LIB_REND_API_5MS +#ifdef API_5MS /* Initialize 5ms crossfade */ crossfade_len = L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES; /* TODO(sgi): @tmu why do we assume 48 kHz here? */ tmp = 1.f / ( crossfade_len - 1 ); @@ -5101,7 +5101,7 @@ int16_t IVAS_REND_FeedRenderConfig( ivas_error IVAS_REND_SetHeadRotation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ -#ifdef LIB_REND_API_5MS +#ifdef API_5MS const IVAS_QUATERNION headRot, /* i : head orientations for next rendering call */ const IVAS_VECTOR3 Pos /* i : listener positions for next rendering call */ #else @@ -5114,7 +5114,7 @@ ivas_error IVAS_REND_SetHeadRotation( #endif ) { -#ifndef LIB_REND_API_5MS +#ifndef API_5MS int16_t i; #endif IVAS_QUATERNION rotQuat; @@ -5131,7 +5131,7 @@ ivas_error IVAS_REND_SetHeadRotation( return IVAS_ERR_INVALID_OUTPUT_FORMAT; } -#ifdef LIB_REND_API_5MS +#ifdef API_5MS /* check for Euler angle signaling */ if ( headRot.w == -3.0f ) { @@ -5208,7 +5208,7 @@ ivas_error IVAS_REND_SetHeadRotation( return IVAS_ERR_OK; } -#ifdef LIB_REND_API_5MS +#ifdef API_5MS ivas_error IVAS_REND_DisableHeadRotation( IVAS_REND_HANDLE hIvasRend /* i/o: Renderer handle */ ) @@ -5362,7 +5362,7 @@ ivas_error IVAS_REND_SetReferenceVector( ivas_error IVAS_REND_SetExternalOrientation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ IVAS_QUATERNION *orientation, /* i : external orientation data */ -#ifdef LIB_REND_API_5MS +#ifdef API_5MS int8_t enableHeadRotation, /* i : flag to enable head rotation for this frame */ int8_t enableExternalOrientation, /* i : flag to enable external orientation for this frame */ int8_t enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ @@ -5375,7 +5375,7 @@ ivas_error IVAS_REND_SetExternalOrientation( #endif ) { -#ifndef LIB_REND_API_5MS +#ifndef API_5MS int16_t i; #endif @@ -5398,7 +5398,7 @@ ivas_error IVAS_REND_SetExternalOrientation( } else { -#ifdef LIB_REND_API_5MS +#ifdef API_5MS QuaternionInverse( *orientation, &hIvasRend->hExternalOrientationData->Quaternion ); hIvasRend->hExternalOrientationData->enableHeadRotation = enableHeadRotation; @@ -5462,7 +5462,7 @@ ivas_error IVAS_REND_GetCombinedOrientation( IVAS_QUATERNION *pOrientation /* i/o: Quaternion pointer processed orientation */ ) { -#ifndef LIB_REND_API_5MS +#ifndef API_5MS int16_t i; #endif @@ -5473,7 +5473,7 @@ ivas_error IVAS_REND_GetCombinedOrientation( if ( hIvasRend->hCombinedOrientationData != NULL ) { -#ifdef LIB_REND_API_5MS +#ifdef API_5MS *pOrientation = hIvasRend->hCombinedOrientationData->Quaternion; #else for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; ++i ) @@ -5604,7 +5604,7 @@ static ivas_error chooseCrossfade( const IVAS_REND_HeadRotData *headRotData, int static ivas_error rotateFrameMc( IVAS_REND_AudioBuffer inAudio, /* i : Input Audio buffer */ IVAS_REND_AudioConfig inConfig, /* i : Input Audio config */ -#ifdef LIB_REND_API_5MS +#ifdef API_5MS const LSSETUP_CUSTOM_STRUCT *pInCustomLs, /* i : Input Custom LS setup */ #else LSSETUP_CUSTOM_STRUCT inCustomLs, /* i : Input Custom LS setup */ @@ -5618,7 +5618,7 @@ static ivas_error rotateFrameMc( { int16_t i; int16_t j; -#ifdef LIB_REND_API_5MS +#ifdef API_5MS const float *crossfade; #else int16_t subframe_idx, subframe_len; @@ -5637,7 +5637,7 @@ static ivas_error rotateFrameMc( push_wmops( "rotateFrameMc" ); -#ifdef LIB_REND_API_5MS +#ifdef API_5MS if ( ( error = chooseCrossfade( headRotData, inAudio.config.numSamplesPerChannel, &crossfade ) ) != IVAS_ERR_OK ) { return error; @@ -5653,7 +5653,7 @@ static ivas_error rotateFrameMc( } else { -#ifdef LIB_REND_API_5MS +#ifdef API_5MS nchan = pInCustomLs->num_spk + pInCustomLs->num_lfe; #else nchan = inCustomLs.num_spk + inCustomLs.num_lfe; @@ -5661,7 +5661,7 @@ static ivas_error rotateFrameMc( } if ( ( error = getMcConfigValues( inConfig, -#ifdef LIB_REND_API_5MS +#ifdef API_5MS pInCustomLs, #else inCustomLs, @@ -5678,7 +5678,7 @@ static ivas_error rotateFrameMc( gains[ch_in][ch_in] = 1.f; } -#ifndef LIB_REND_API_5MS +#ifndef API_5MS /* TODO(sgi): @tmu please review changes in this function */ /* subframe loop */ subframe_len = inAudio.config.numSamplesPerChannel / RENDERER_HEAD_POSITIONS_PER_FRAME; @@ -5746,7 +5746,7 @@ static ivas_error rotateFrameMc( { for ( ch_in = 0; ch_in < nchan; ch_in++ ) { -#ifdef LIB_REND_API_5MS +#ifdef API_5MS writePtr = getSmplPtr( outAudio, ch_out, 0 ); readPtr = getSmplPtr( inAudio, ch_in, 0 ); /* crossfade with previous rotation gains */ @@ -5777,7 +5777,7 @@ static ivas_error rotateFrameMc( { mvr2r( gains[i], gains_prev[i], nchan ); } -#ifndef LIB_REND_API_5MS +#ifndef API_5MS } #endif @@ -5798,7 +5798,7 @@ static ivas_error rotateFrameSba( int16_t i, l, n, m; int16_t m1, m2; int16_t shd_rot_max_order; -#ifdef LIB_REND_API_5MS +#ifdef API_5MS const float *crossfade; #else int16_t subframe_idx, subframe_len; @@ -5815,7 +5815,7 @@ static ivas_error rotateFrameSba( push_wmops( "rotateFrameSba" ); -#ifdef LIB_REND_API_5MS +#ifdef API_5MS if ( ( error = chooseCrossfade( headRotData, inAudio.config.numSamplesPerChannel, &crossfade ) ) != IVAS_ERR_OK ) { return error; @@ -5827,7 +5827,7 @@ static ivas_error rotateFrameSba( return error; } -#ifndef LIB_REND_API_5MS +#ifndef API_5MS /* TODO(sgi): @tmu please review changes in this function */ /* subframe loop */ subframe_len = inAudio.config.numSamplesPerChannel / RENDERER_HEAD_POSITIONS_PER_FRAME; @@ -5865,7 +5865,7 @@ static ivas_error rotateFrameSba( /* calculate ambisonics rotation matrices for the previous and current frames */ SHrotmatgen( gains, Rmat, shd_rot_max_order ); -#ifdef LIB_REND_API_5MS +#ifdef API_5MS for ( i = 0; i < inAudio.config.numSamplesPerChannel; i++ ) #else for ( i = 0; i < subframe_len; i++ ) @@ -5893,7 +5893,7 @@ static ivas_error rotateFrameSba( { // sgi@bay sgi2tmu to be verified how to resolve this correctly // <<<<<<< HEAD -// #ifdef LIB_REND_API_5MS +// #ifdef API_5MS // readPtr = getSmplPtr( inAudio, m, i ); // /* crossfade with previous rotation gains */ // tmpRot[n - m1] += crossfade[i] * gains[n][m] * ( *readPtr ) + @@ -5910,7 +5910,7 @@ static ivas_error rotateFrameSba( // tmpRot[n - m1] += ( cf * gains[n][m] * val + oneminuscf * gains_prev[n][m] * val ); // >>>>>>> main // tmp merge: -#ifdef LIB_REND_API_5MS +#ifdef API_5MS readPtr = getSmplPtr( inAudio, m, i ); /* crossfade with previous rotation gains */ tmpRot[n - m1] += crossfade[i] * gains[n][m] * ( *readPtr ) + @@ -5927,7 +5927,7 @@ static ivas_error rotateFrameSba( /* write back the result */ for ( n = m1; n < m2; n++ ) { -#ifdef LIB_REND_API_5MS +#ifdef API_5MS writePtr = getSmplPtr( outAudio, n, i ); #else writePtr = getSmplPtr( outAudio, n, subframe_idx * subframe_len + i ); @@ -5959,7 +5959,7 @@ static ivas_error rotateFrameSba( { mvr2r( gains[i], gains_prev[i], HEADROT_SHMAT_DIM ); } -#ifndef LIB_REND_API_5MS +#ifndef API_5MS } #endif @@ -6006,7 +6006,7 @@ static ivas_error renderIsmToBinaural( return IVAS_ERR_OK; } -#ifdef LIB_REND_API_5MS +#ifdef API_5MS static int16_t num_subframes_in_buffer( const IVAS_REND_AudioBuffer *buffer, int32_t sampleRate ) { #ifdef DEBUGGING @@ -6022,7 +6022,7 @@ static ivas_error renderIsmToBinauralRoom( { int16_t i; int16_t azi_rot, ele_rot; -#ifndef LIB_REND_API_5MS +#ifndef API_5MS int16_t subframe_idx, subframe_len; #endif int16_t tmp; @@ -6073,7 +6073,7 @@ static ivas_error renderIsmToBinauralRoom( if ( combinedOrientationEnabled ) { -#ifndef LIB_REND_API_5MS +#ifndef API_5MS subframe_len = ismInput->base.inputBuffer.config.numSamplesPerChannel / RENDERER_HEAD_POSITIONS_PER_FRAME; // for ( subframe_idx = 0; subframe_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; subframe_idx++ ) for ( subframe_idx = 0; subframe_idx < 1; subframe_idx++ ) @@ -6106,7 +6106,7 @@ static ivas_error renderIsmToBinauralRoom( Rmat[i][i] = 1.0f; } } -#ifndef LIB_REND_API_5MS +#ifndef API_5MS } (void) subframe_len; // avoid warning #endif @@ -6170,7 +6170,7 @@ static ivas_error renderIsmToBinauralRoom( if ( ( error = ivas_rend_crendProcess( ismInput->crendWrapper, AUDIO_CONFIG_7_1_4, AUDIO_CONFIG_BINAURAL_ROOM_IR, NULL, NULL, NULL, NULL, p_tmpRendBuffer, *ismInput->base.ctx.pOutSampleRate -#ifdef LIB_REND_API_5MS +#ifdef API_5MS , num_subframes_in_buffer( &outAudio, *ismInput->base.ctx.pOutSampleRate ) #endif @@ -6852,7 +6852,7 @@ static ivas_error renderMcToBinaural( set_zero( tmpRotBuffer.data, tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels ); if ( ( error = rotateFrameMc( mcInput->base.inputBuffer, mcInput->base.inConfig, -#ifdef LIB_REND_API_5MS +#ifdef API_5MS &mcInput->customLsInput, #else mcInput->customLsInput, @@ -6880,7 +6880,7 @@ static ivas_error renderMcToBinaural( /* call CREND */ if ( ( error = ivas_rend_crendProcess( mcInput->crendWrapper, getIvasAudioConfigFromRendAudioConfig( mcInput->base.inConfig ), getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, NULL, NULL, NULL, p_tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate -#ifdef LIB_REND_API_5MS +#ifdef API_5MS , num_subframes_in_buffer( &outAudio, *mcInput->base.ctx.pOutSampleRate ) #endif @@ -6984,7 +6984,7 @@ static ivas_error renderMcToBinauralRoom( set_zero( tmpRotBuffer.data, tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels ); if ( ( error = rotateFrameMc( mcInput->base.inputBuffer, mcInput->base.inConfig, -#ifdef LIB_REND_API_5MS +#ifdef API_5MS &mcInput->customLsInput, #else mcInput->customLsInput, @@ -7012,7 +7012,7 @@ static ivas_error renderMcToBinauralRoom( /* call CREND */ if ( ( error = ivas_rend_crendProcess( mcInput->crendWrapper, getIvasAudioConfigFromRendAudioConfig( mcInput->base.inConfig ), getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, NULL, NULL, NULL, p_tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate -#ifdef LIB_REND_API_5MS +#ifdef API_5MS , num_subframes_in_buffer( &outAudio, *mcInput->base.ctx.pOutSampleRate ) #endif @@ -7100,7 +7100,7 @@ static ivas_error renderMcCustomLsToBinauralRoom( set_zero( tmpRotBuffer.data, tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels ); if ( ( error = rotateFrameMc( mcInput->base.inputBuffer, mcInput->base.inConfig, -#ifdef LIB_REND_API_5MS +#ifdef API_5MS &mcInput->customLsInput, #else mcInput->customLsInput, @@ -7140,7 +7140,7 @@ static ivas_error renderMcCustomLsToBinauralRoom( /* call CREND */ if ( ( error = ivas_rend_crendProcess( mcInput->crendWrapper, AUDIO_CONFIG_7_1_4, getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, NULL, NULL, NULL, p_tmpCrendBuffer, *mcInput->base.ctx.pOutSampleRate -#ifdef LIB_REND_API_5MS +#ifdef API_5MS , num_subframes_in_buffer( &outAudio, *mcInput->base.ctx.pOutSampleRate ) #endif @@ -8105,7 +8105,7 @@ static ivas_error renderSbaToBinaural( /* call CREND */ if ( ( error = ivas_rend_crendProcess( sbaInput->crendWrapper, getIvasAudioConfigFromRendAudioConfig( sbaInput->base.inConfig ), getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, NULL, NULL, NULL, p_tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate -#ifdef LIB_REND_API_5MS +#ifdef API_5MS , num_subframes_in_buffer( &outAudio, *sbaInput->base.ctx.pOutSampleRate ) #endif @@ -8221,7 +8221,7 @@ static ivas_error renderSbaToBinauralRoom( /* call CREND */ if ( ( error = ivas_rend_crendProcess( sbaInput->crendWrapper, AUDIO_CONFIG_7_1_4, getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, NULL, NULL, NULL, p_tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate -#ifdef LIB_REND_API_5MS +#ifdef API_5MS , num_subframes_in_buffer( &outAudio, *sbaInput->base.ctx.pOutSampleRate ) #endif @@ -8485,7 +8485,7 @@ static void renderMasaToMc( if ( masaInput->decDummy->renderer_type == RENDERER_STEREO_PARAMETRIC ) { ivas_dirac_dec_binaural( masaInput->decDummy, *masaInput->base.ctx.pCombinedOrientationData, tmpBuffer, masaInput->base.inputBuffer.config.numChannels -#ifdef LIB_REND_API_5MS +#ifdef API_5MS , num_subframes_in_buffer( &outAudio, *masaInput->base.ctx.pOutSampleRate ) #endif @@ -8494,7 +8494,7 @@ static void renderMasaToMc( else { ivas_dirac_dec( masaInput->decDummy, tmpBuffer, masaInput->base.inputBuffer.config.numChannels -#ifdef LIB_REND_API_5MS +#ifdef API_5MS , num_subframes_in_buffer( &outAudio, *masaInput->base.ctx.pOutSampleRate ) #endif @@ -8516,7 +8516,7 @@ static void renderMasaToSba( copyMasaMetadataToDiracRenderer( &masaInput->masaMetadata, masaInput->decDummy->hSpatParamRendCom ); ivas_dirac_dec( masaInput->decDummy, tmpBuffer, masaInput->base.inputBuffer.config.numChannels -#ifdef LIB_REND_API_5MS +#ifdef API_5MS , num_subframes_in_buffer( &outAudio, *masaInput->base.ctx.pOutSampleRate ) #endif @@ -8542,7 +8542,7 @@ static void renderMasaToBinaural( copyMasaMetadataToDiracRenderer( &masaInput->masaMetadata, masaInput->decDummy->hSpatParamRendCom ); ivas_dirac_dec_binaural( masaInput->decDummy, *masaInput->base.ctx.pCombinedOrientationData, tmpBuffer, masaInput->base.inputBuffer.config.numChannels -#ifdef LIB_REND_API_5MS +#ifdef API_5MS , num_subframes_in_buffer( &outAudio, *masaInput->base.ctx.pOutSampleRate ) #endif @@ -8781,7 +8781,7 @@ static ivas_error renderActiveInputsMasa( int16_t i; input_masa *pCurrentInput; ivas_error error; -#ifndef LIB_REND_API_5MS +#ifndef API_5MS int16_t sf_idx; #endif @@ -8795,7 +8795,7 @@ static ivas_error renderActiveInputsMasa( if ( getAudioConfigType( hIvasRend->outputConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL && pCurrentInput->decDummy->hHeadTrackData != NULL ) { -#ifdef LIB_REND_API_5MS +#ifdef API_5MS pCurrentInput->decDummy->hHeadTrackData->Quaternion = hIvasRend->headRotData.headPosition; pCurrentInput->decDummy->hHeadTrackData->Pos = hIvasRend->headRotData.Pos; #else @@ -9184,7 +9184,11 @@ ivas_error IVAS_REND_GetSamples( /* Encode split rendering bitstream */ convertBitsBufferToInternalBitsBuff( *hBits, &bits ); error = ivas_renderMultiBinToSplitBinaural( &hIvasRend->splitRendWrapper, +#ifdef API_5MS hIvasRend->headRotData.headPosition, +#else + hIvasRend->headRotData.headPositions, +#endif hIvasRend->hRendererConfig->split_rend_config.splitRendBitRate, hIvasRend->hRendererConfig->split_rend_config.codec, &bits, diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index 0edbd3b444..1b95ca21ba 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -273,7 +273,7 @@ int16_t IVAS_REND_FeedRenderConfig( ivas_error IVAS_REND_SetHeadRotation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ -#ifdef LIB_REND_API_5MS +#ifdef API_5MS const IVAS_QUATERNION headRot, /* i : head orientations for next rendering call */ const IVAS_VECTOR3 Pos /* i : listener positions for next rendering call */ #else @@ -286,7 +286,7 @@ ivas_error IVAS_REND_SetHeadRotation( #endif ); -#ifdef LIB_REND_API_5MS +#ifdef API_5MS /* Head rotation becomes enabled by calling IVAS_REND_SetHeadRotation. Use this to disable. */ ivas_error IVAS_REND_DisableHeadRotation( IVAS_REND_HANDLE hIvasRend /* i/o: Renderer handle */ @@ -328,7 +328,7 @@ ivas_error IVAS_REND_SetSplitRendBFI( ivas_error IVAS_REND_SetExternalOrientation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ IVAS_QUATERNION *orientation, /* i : external orientation data */ -#ifdef LIB_REND_API_5MS +#ifdef API_5MS int8_t enableHeadRotation, /* i : flag to enable head rotation for this frame */ int8_t enableExternalOrientation, /* i : flag to enable external orientation for this frame */ int8_t enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ -- GitLab From 0ada57e0adb792489093ad36aadc295c8c5e710b Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Wed, 2 Aug 2023 18:05:34 +0200 Subject: [PATCH 076/175] [ci-skip] fix MSVC warnings --- apps/decoder.c | 4 +++- lib_dec/lib_dec.c | 2 +- lib_rend/lib_rend.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 8bf13d83dc..bf26181636 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1856,7 +1856,7 @@ static ivas_error decodeG192( #endif #endif IsmFileWriter *ismWriters[IVAS_MAX_NUM_OBJECTS]; - IVAS_VECTOR3 Pos; + IVAS_VECTOR3 Pos = { 0, 0, 0 }; int16_t vec_pos_update, vec_pos_len; #ifdef SPLIT_REND_WITH_HEAD_ROT @@ -1931,6 +1931,8 @@ static ivas_error decodeG192( splitRendBits.bits_read = 0; splitRendBits.bits_written = 0; splitRendBits.buf_len = MAX_SPLIT_REND_BITS_BUFFER_SIZE_IN_BYTES; + splitRendBits.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; + splitRendBits.pose_correction = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE; hSplitRendFileReadWrite = NULL; #endif diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index e087d36459..1c4756dfdc 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1100,7 +1100,7 @@ ivas_error IVAS_DEC_GetSplitBinaural( st_ivas = hIvasDec->st_ivas; output_config = st_ivas->hDecoderConfig->output_config; output_Fs = st_ivas->hDecoderConfig->output_Fs; - numSamplesPerChannel = output_Fs / FRAMES_PER_SEC; /* TODO(sgi): Accommodate 5ms framing */ + numSamplesPerChannel = (int16_t) output_Fs / FRAMES_PER_SEC; /* TODO(sgi): Accommodate 5ms framing */ if ( output_config != AUDIO_CONFIG_BINAURAL_SPLIT_CODED && output_config != AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index d4d4042664..2908e6441e 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -8053,7 +8053,7 @@ static ivas_error renderSbaToBinaural( #ifdef API_5MS /* fix compiling only, ToDo ext renderer needs to adapted to 5ms */ hCombinedOrientationData = sbaInput->base.ctx.pCombinedOrientationData; - combinedOrientationEnabled = ( *hCombinedOrientationData )->enableCombinedOrientation; + combinedOrientationEnabled = (int8_t) ( ( *hCombinedOrientationData )->enableCombinedOrientation ); #else hCombinedOrientationData = sbaInput->base.ctx.pCombinedOrientationData; combinedOrientationEnabled = 0; -- GitLab From 6cf36d1d63a671c8963366f2614e8049cef2095c Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 3 Aug 2023 08:53:06 +0200 Subject: [PATCH 077/175] [fix] xfails for 20ms binaural rendering cases in renderer pytest --- tests/renderer/test_renderer.py | 16 +++---- tests/renderer/test_renderer_be_comparison.py | 47 ++++++++++++++++--- 2 files changed, 49 insertions(+), 14 deletions(-) diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index 604dde6729..b5dc66c083 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -49,7 +49,7 @@ def test_ambisonics(test_info, in_fmt, out_fmt, framing_5ms): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): - if not framing_5ms: + if framing_5ms != "5ms": pytest.xfail("Binaural output currently only supported with 5ms framing") run_renderer( @@ -67,7 +67,7 @@ def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): def test_ambisonics_binaural_headrotation( test_info, in_fmt, out_fmt, trj_file, framing_5ms ): - if not framing_5ms: + if framing_5ms != "5ms": pytest.xfail("Binaural output currently only supported with 5ms framing") run_renderer( @@ -303,7 +303,7 @@ def test_multichannel(test_info, in_fmt, out_fmt, framing_5ms): def test_multichannel_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") - if not framing_5ms: + if framing_5ms != "5ms": pytest.xfail("Binaural output currently only supported with 5ms framing") run_renderer( @@ -323,7 +323,7 @@ def test_multichannel_binaural_headrotation( ): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") - if not framing_5ms: + if framing_5ms != "5ms": pytest.xfail("Binaural output currently only supported with 5ms framing") if (in_fmt == "5_1" or in_fmt == "7_1") and out_fmt == "BINAURAL": @@ -395,7 +395,7 @@ def test_ism(test_info, in_fmt, out_fmt, framing_5ms): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_ism_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): - if not framing_5ms: + if framing_5ms != "5ms": pytest.xfail("Binaural output currently only supported with 5ms framing") try: @@ -417,7 +417,7 @@ def test_ism_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing_5ms): - if not framing_5ms: + if framing_5ms != "5ms": pytest.xfail("Binaural output currently only supported with 5ms framing") try: @@ -525,7 +525,7 @@ def test_custom_ls_input_output(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_custom_ls_input_binaural(test_info, in_layout, out_fmt, framing_5ms): - if not framing_5ms: + if framing_5ms != "5ms": pytest.xfail("Binaural output currently only supported with 5ms framing") run_renderer( @@ -543,7 +543,7 @@ def test_custom_ls_input_binaural(test_info, in_layout, out_fmt, framing_5ms): def test_custom_ls_input_binaural_headrotation( test_info, in_layout, out_fmt, trj_file, framing_5ms ): - if not framing_5ms: + if framing_5ms != "5ms": pytest.xfail("Binaural output currently only supported with 5ms framing") run_renderer( diff --git a/tests/renderer/test_renderer_be_comparison.py b/tests/renderer/test_renderer_be_comparison.py index a71036c6da..fa7241186e 100644 --- a/tests/renderer/test_renderer_be_comparison.py +++ b/tests/renderer/test_renderer_be_comparison.py @@ -42,8 +42,17 @@ def test_ambisonics(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) -def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt): - compare_renderer_vs_mergetarget(test_info, in_fmt, out_fmt, is_comparetest=True) +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): + if framing_5ms != "5ms": + pytest.xfail("Binaural output currently only supported with 5ms framing") + compare_renderer_vs_mergetarget( + test_info, + in_fmt, + out_fmt, + framing_5ms=(framing_5ms == "5ms"), + is_comparetest=True, + ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @@ -53,6 +62,8 @@ def test_ambisonics_binaural_static(test_info, in_fmt, out_fmt): def test_ambisonics_binaural_headrotation( test_info, in_fmt, out_fmt, trj_file, framing_5ms ): + if framing_5ms != "5ms": + pytest.xfail("Binaural output currently only supported with 5ms framing") compare_renderer_vs_mergetarget( test_info, in_fmt, @@ -74,11 +85,20 @@ def test_multichannel(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) -def test_multichannel_binaural_static(test_info, in_fmt, out_fmt): +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_multichannel_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") + if framing_5ms != "5ms": + pytest.xfail("Binaural output currently only supported with 5ms framing") - compare_renderer_vs_mergetarget(test_info, in_fmt, out_fmt, is_comparetest=True) + compare_renderer_vs_mergetarget( + test_info, + in_fmt, + out_fmt, + framing_5ms=(framing_5ms == "5ms"), + is_comparetest=True, + ) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @@ -90,6 +110,8 @@ def test_multichannel_binaural_headrotation( ): if in_fmt in ["MONO", "STEREO"]: pytest.skip("MONO or STEREO to Binaural rendering unsupported") + if framing_5ms != "5ms": + pytest.xfail("Binaural output currently only supported with 5ms framing") compare_renderer_vs_mergetarget( test_info, @@ -116,7 +138,7 @@ def test_ism(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_ism_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): - if not framing_5ms: + if framing_5ms != "5ms": pytest.xfail("Binaural output currently only supported with 5ms framing") try: @@ -139,6 +161,9 @@ def test_ism_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing_5ms): + if framing_5ms != "5ms": + pytest.xfail("Binaural output currently only supported with 5ms framing") + try: in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] except: @@ -170,6 +195,8 @@ def test_masa(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_masa_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): + if framing_5ms != "5ms": + pytest.xfail("Binaural output currently only supported with 5ms framing") if out_fmt in ["BINAURAL_ROOM_IR", "BINAURAL_ROOM_REVERB"]: pytest.skip("Skipping binaural room outputs for MASA as unimplemented.") @@ -187,6 +214,8 @@ def test_masa_binaural_static(test_info, in_fmt, out_fmt, framing_5ms): @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_masa_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file, framing_5ms): + if framing_5ms != "5ms": + pytest.xfail("Binaural output currently only supported with 5ms framing") if out_fmt in ["BINAURAL_ROOM_IR", "BINAURAL_ROOM_REVERB"]: pytest.skip("Skipping binaural room outputs for MASA as unimplemented.") @@ -240,6 +269,8 @@ def test_custom_ls_input_output(test_info, in_fmt, out_fmt): @pytest.mark.parametrize("in_layout", CUSTOM_LS_TO_TEST) @pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) def test_custom_ls_input_binaural(test_info, in_layout, out_fmt, framing_5ms): + if framing_5ms != "5ms": + pytest.xfail("Binaural output currently only supported with 5ms framing") compare_renderer_vs_mergetarget( test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), @@ -256,6 +287,8 @@ def test_custom_ls_input_binaural(test_info, in_layout, out_fmt, framing_5ms): def test_custom_ls_input_binaural_headrotation( test_info, in_layout, out_fmt, trj_file, framing_5ms ): + if framing_5ms != "5ms": + pytest.xfail("Binaural output currently only supported with 5ms framing") compare_renderer_vs_mergetarget( test_info, CUSTOM_LAYOUT_DIR.joinpath(f"{in_layout}.txt"), @@ -271,12 +304,14 @@ def test_custom_ls_input_binaural_headrotation( @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS) @pytest.mark.parametrize("in_fmt", METADATA_SCENES_TO_TEST) -def test_metadata(test_info, in_fmt, out_fmt): +@pytest.mark.parametrize("framing_5ms", FRAMING_5MS_TO_TEST) +def test_metadata(test_info, in_fmt, out_fmt, framing_5ms): compare_renderer_vs_mergetarget( test_info, "META", out_fmt, metadata_input=TEST_VECTOR_DIR.joinpath(f"{in_fmt}.txt"), + framing_5ms=(framing_5ms == "5ms"), is_comparetest=True, ) -- GitLab From ab70c28106fb2bd55498b0902d0fe39ca0c5a50d Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 3 Aug 2023 09:09:56 +0200 Subject: [PATCH 078/175] deactivate 5ms rendering mem optim (did not bring additional benefit), fix small 5ms issues with ParamMC and ParamISM, fix 20ms decoding path issue --- lib_com/options.h | 2 +- lib_dec/ivas_ism_param_dec.c | 14 +++- lib_dec/ivas_jbm_dec.c | 143 +++++------------------------------ lib_dec/ivas_mc_param_dec.c | 6 +- lib_dec/lib_dec.c | 2 +- 5 files changed, 36 insertions(+), 131 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index bea3cc0603..3a64d6b836 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -164,7 +164,7 @@ #define NONBE_FIX_589_JBM_TC_OFFSETS #define API_5MS #ifdef API_5MS -#define JITTER_MEM_OPTIM_RENDERING +/*#define JITTER_MEM_OPTIM_RENDERING*/ #define API_5MS_BASELINE #endif #define LIB_REND_FIX_HRTFPARAMBIN_MEMLEAK diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 16a14cb5eb..cfb03d21ae 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -673,7 +673,7 @@ ivas_error ivas_param_ism_dec_open( } } } -#ifndef API_5MS +#if !defined( API_5MS ) || defined API_5MS_BASELINE else { hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc = NULL; @@ -1270,7 +1270,11 @@ void ivas_param_ism_dec_digest_tc( } } #ifdef API_5MS - if ( st_ivas->hDecoderConfig->Opt_tsm ) + if ( st_ivas->hDecoderConfig->Opt_tsm +#ifdef API_5MS_BASELINE + || !st_ivas->hDecoderConfig->Opt_5ms +#endif + ) { ivas_ism_param_dec_tc_gain_ajust( st_ivas, nCldfbSlots * hSpatParamRendCom->num_freq_bands, (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( 2 * FRAMES_PER_SEC ) ), transport_channels_f ); } @@ -1320,7 +1324,11 @@ void ivas_param_ism_dec_digest_tc( for ( slot_idx = 0; slot_idx < nCldfbSlots; slot_idx++ ) { #ifdef API_5MS - if ( st_ivas->hDecoderConfig->Opt_tsm ) + if ( st_ivas->hDecoderConfig->Opt_tsm +#ifdef API_5MS_BASELINE + || !st_ivas->hDecoderConfig->Opt_5ms +#endif + ) { #endif diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index a300cd7d25..ba13ee2654 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -757,126 +757,6 @@ ivas_error ivas_jbm_dec_render( nSamplesAskedLocal = st_ivas->hTcBuffer->subframe_nbslots[st_ivas->hTcBuffer->subframes_rendered] * st_ivas->hTcBuffer->n_samples_granularity; #endif - /* tmu2bay : needs merge resolution */ - // <<<<<<< HEAD - // /* HP filtering */ - // #ifdef SPLIT_REND_WITH_HEAD_ROT - // /*no HPF when rendering is already done*/ - // if ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) - // #endif - // { - // for ( n = 0; n < st_ivas->nchan_transport; n++ ) - // { - // if ( n != LFE_CHANNEL ) - // { - // hp20( p_output[n], *nSamplesRendered, st_ivas->mem_hp20_out[n], output_Fs ); - // } - // } - // } - - // if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) ) - // { - // ivas_mc2sba( st_ivas->hTransSetup, p_output, p_output, *nSamplesRendered, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); - // } - - // /* Rendering */ - // if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) - // { - // #ifdef SPLIT_REND_WITH_HEAD_ROT - // /*handled in CLDFB domain already*/ - // if ( ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) && - // ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) - // #endif - // { - // ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); - // } - // } - // else if ( st_ivas->renderer_type == RENDERER_MC ) - // { - // ivas_ls_setup_conversion( st_ivas, MC_PARAMUPMIX_MAX_INPUT_CHANS, *nSamplesRendered, p_output, p_output ); - // } - // else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) - // { - // ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); - // } - // else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) - // { - // if ( ( ivas_td_binaural_renderer( st_ivas, p_output, *nSamplesRendered ) ) != IVAS_ERR_OK ) - // { - // return error; - // } - - // ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); - // } - // } - // #endif - // else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) - // { - // ivas_param_mc_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); - // } - // else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) - // { - // int16_t offset = hSpatParamRendCom->slots_rendered * hSpatParamRendCom->slot_size; - // nchan_remapped = st_ivas->nchan_transport; - - // if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) - // { - // ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); - // } - // else if ( st_ivas->renderer_type == RENDERER_DIRAC || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) /* rendering to CICPxx and Ambisonics */ - // { - // ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); - - // if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) - // { - // /* we still need to copy the separate channel if available */ - // if ( st_ivas->hOutSetup.separateChannelEnabled ) - // { - // mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); - // } - - // ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); - // } - // else if ( st_ivas->intern_config == AUDIO_CONFIG_5_1 && ( output_config == AUDIO_CONFIG_5_1_2 || output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1 ) ) - // { - // for ( n = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; n < st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe; n++ ) - // { - // set_zero( output[n], *nSamplesRendered ); - // } - // } - // } - - // /* copy discrete C and TD LFE from internal TC to output */ - // if ( st_ivas->hOutSetup.separateChannelEnabled ) - // { - // if ( output_config == AUDIO_CONFIG_5_1 || output_config == AUDIO_CONFIG_7_1 || - // output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1_4 || - // output_config == AUDIO_CONFIG_5_1_2 || ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe > 0 ) ) - // { - // mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL] + offset, output[LFE_CHANNEL], *nSamplesRendered ); - // mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); - // } - // else if ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe == 0 ) - // { - // /* Delay the separated channel to sync with the DirAC rendering */ - // mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); - // } - // } - // } - // } - - // /*----------------------------------------------------------------* - // * Write IVAS output channels - // * - compensation for saturation - // * - float to integer conversion - // *----------------------------------------------------------------*/ - - // st_ivas->hTcBuffer->n_samples_available -= *nSamplesRendered; - // st_ivas->hTcBuffer->n_samples_rendered += *nSamplesRendered; - - // if ( st_ivas->hTcBuffer->n_samples_discard > 0 ) - // { - // >>>>>>> 3702d9f6a3bba65a7309b2b7a67dbebc74e4c8e5 for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) { p_output[n] = &output[n][0]; @@ -1232,11 +1112,17 @@ ivas_error ivas_jbm_dec_render( #endif /* HP filtering */ - for ( n = 0; n < st_ivas->nchan_transport; n++ ) +#ifdef SPLIT_REND_WITH_HEAD_ROT + /*no HPF when rendering is already done*/ + if ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) +#endif { - if ( n != LFE_CHANNEL ) + for ( n = 0; n < st_ivas->nchan_transport; n++ ) { - hp20( p_output[n], *nSamplesRendered, st_ivas->mem_hp20_out[n], output_Fs ); + if ( n != LFE_CHANNEL ) + { + hp20( p_output[n], *nSamplesRendered, st_ivas->mem_hp20_out[n], output_Fs ); + } } } @@ -1252,11 +1138,18 @@ ivas_error ivas_jbm_dec_render( /* Rendering */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { +#ifdef SPLIT_REND_WITH_HEAD_ROT + /*handled in CLDFB domain already*/ + if ( ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) && + ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) +#endif + { #ifdef JITTER_MEM_OPTIM_RENDERING - ivas_binaural_add_LFE( st_ivas, nSamplesRenderedLocal, p_output, p_output ); + ivas_binaural_add_LFE( st_ivas, nSamplesRenderedLocal, p_output, p_output ); #else - ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); + ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); #endif + } } else if ( st_ivas->renderer_type == RENDERER_MC ) { diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index ac77322ea5..5c17722c9c 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -1496,7 +1496,11 @@ void ivas_param_mc_dec_digest_tc( for ( slot_idx = 0; slot_idx < nCldfbSlots; slot_idx++ ) { #ifdef API_5MS - if ( st_ivas->hDecoderConfig->Opt_tsm ) + if ( st_ivas->hDecoderConfig->Opt_tsm +#ifdef API_5MS_BASELINE + || !st_ivas->hDecoderConfig->Opt_5ms +#endif + ) { #endif float RealBuffer[CLDFB_NO_CHANNELS_MAX]; diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 89b4109044..129e592274 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1015,7 +1015,7 @@ ivas_error IVAS_DEC_GetSamples( } #ifdef API_5MS_BASELINE /* only for 1st step 5ms API, split rendering still needs to go through the old decoding function */ - else if ( hIvasDec->st_ivas->hDecoderConfig->Opt_5ms ) + else if ( !hIvasDec->st_ivas->hDecoderConfig->Opt_5ms ) { if ( ( error = _GetSamples( hIvasDec, pcmBuf, nOutSamples ) ) != IVAS_ERR_OK ) { -- GitLab From 7df1e0049a2f5bd8525d1ed2b132d1d0fa267e97 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 3 Aug 2023 10:32:30 +0200 Subject: [PATCH 079/175] [fix] missing brackets before cast causing incorrect value for numSamplesPerChannel --- lib_dec/lib_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 129e592274..112973d94b 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1135,7 +1135,7 @@ ivas_error IVAS_DEC_GetSplitBinaural( st_ivas = hIvasDec->st_ivas; output_config = st_ivas->hDecoderConfig->output_config; output_Fs = st_ivas->hDecoderConfig->output_Fs; - numSamplesPerChannel = (int16_t) output_Fs / FRAMES_PER_SEC; /* TODO(sgi): Accommodate 5ms framing */ + numSamplesPerChannel = (int16_t) ( output_Fs / FRAMES_PER_SEC ); /* TODO(sgi): Accommodate 5ms framing */ if ( output_config != AUDIO_CONFIG_BINAURAL_SPLIT_CODED && output_config != AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { -- GitLab From 478cacfbf27a678b0bd0b9a592e6702bdf5c21f1 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 3 Aug 2023 10:34:26 +0200 Subject: [PATCH 080/175] remove JITTER_MEM_OPTIM_RENDERING code, fix error in non-headrotation decoding --- lib_com/options.h | 5 +- lib_dec/ivas_jbm_dec.c | 659 +++++++++++++---------------------------- lib_dec/lib_dec.c | 1 + 3 files changed, 217 insertions(+), 448 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 3a64d6b836..2a3372a91c 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -162,10 +162,9 @@ #define FIX_XXX_HEADTRACKER_INIT #define FIX_XXX_ISM_SBA_ASAN #define NONBE_FIX_589_JBM_TC_OFFSETS -#define API_5MS +#define API_5MS /* FhG: 5ms rendering capability */ #ifdef API_5MS -/*#define JITTER_MEM_OPTIM_RENDERING*/ -#define API_5MS_BASELINE +#define API_5MS_BASELINE /* FhG: baseline with 20ms rendering and split rendering through 20ms branch */ #endif #define LIB_REND_FIX_HRTFPARAMBIN_MEMLEAK // 5 ms branch switches end diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index ba13ee2654..49d22c1c9c 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -715,12 +715,7 @@ ivas_error ivas_jbm_dec_render( { int16_t n, nchan_out; int16_t nchan_transport; -#ifdef JITTER_MEM_OPTIM_RENDERING - uint16_t nSamplesRenderedLocal; - float output[MAX_OUTPUT_CHANNELS][L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES]; /* 'float' buffer for output synthesis, MAX_OUTPUT_CHANNELS channels */ -#else float output[MAX_OUTPUT_CHANNELS][L_FRAME48k]; /* 'float' buffer for output synthesis, MAX_OUTPUT_CHANNELS channels */ -#endif int16_t nchan_remapped; int32_t output_Fs; AUDIO_CONFIG output_config; @@ -744,96 +739,64 @@ ivas_error ivas_jbm_dec_render( nchan_out = st_ivas->hDecoderConfig->nchan_out; nchan_transport = st_ivas->hTcBuffer->nchan_transport_jbm; output_config = st_ivas->hDecoderConfig->output_config; -#ifndef JITTER_MEM_OPTIM_RENDERING nSamplesAskedLocal = nSamplesAsked + st_ivas->hTcBuffer->n_samples_discard; -#endif -#ifdef JITTER_MEM_OPTIM_RENDERING - nSamplesRenderedLocal = 0; - *nSamplesRendered = 0; - while ( *nSamplesRendered < nSamplesAsked && st_ivas->hTcBuffer->n_samples_available > 0 ) - { - uint16_t subframes_rendered = st_ivas->hTcBuffer->subframes_rendered; - nSamplesAskedLocal = st_ivas->hTcBuffer->subframe_nbslots[st_ivas->hTcBuffer->subframes_rendered] * st_ivas->hTcBuffer->n_samples_granularity; -#endif - for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) - { - p_output[n] = &output[n][0]; - } + for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) + { + p_output[n] = &output[n][0]; + } - for ( n = 0; n < st_ivas->hTcBuffer->nchan_transport_internal; n++ ) - { - p_tc[n] = &st_ivas->hTcBuffer->tc[n][st_ivas->hTcBuffer->n_samples_rendered]; - } + for ( n = 0; n < st_ivas->hTcBuffer->nchan_transport_internal; n++ ) + { + p_tc[n] = &st_ivas->hTcBuffer->tc[n][st_ivas->hTcBuffer->n_samples_rendered]; + } - /*----------------------------------------------------------------* - * Combine orientations - *----------------------------------------------------------------*/ + /*----------------------------------------------------------------* + * Combine orientations + *----------------------------------------------------------------*/ - if ( ( error = combine_external_and_head_orientations_dec( st_ivas->hHeadTrackData, st_ivas->hExtOrientationData, - st_ivas->hCombinedOrientationData ) ) != IVAS_ERR_OK ) - { - return error; - } + if ( ( error = combine_external_and_head_orientations_dec( st_ivas->hHeadTrackData, st_ivas->hExtOrientationData, + st_ivas->hCombinedOrientationData ) ) != IVAS_ERR_OK ) + { + return error; + } - /*----------------------------------------------------------------* - * Rendering - *----------------------------------------------------------------*/ + /*----------------------------------------------------------------* + * Rendering + *----------------------------------------------------------------*/ - if ( st_ivas->ivas_format == UNDEFINED_FORMAT ) - { - assert( 0 ); - } - else if ( st_ivas->hTcBuffer->tc_buffer_mode == TC_BUFFER_MODE_BUFFER ) - { -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_jbm_dec_tc_buffer_playout( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, p_output ); -#else + if ( st_ivas->ivas_format == UNDEFINED_FORMAT ) + { + assert( 0 ); + } + else if ( st_ivas->hTcBuffer->tc_buffer_mode == TC_BUFFER_MODE_BUFFER ) + { ivas_jbm_dec_tc_buffer_playout( st_ivas, nSamplesAskedLocal, nSamplesRendered, p_output ); -#endif - } - else if ( st_ivas->ivas_format == STEREO_FORMAT ) + } + else if ( st_ivas->ivas_format == STEREO_FORMAT ) + { + /* Rendering */ + if ( st_ivas->renderer_type == RENDERER_MC ) { - /* Rendering */ - if ( st_ivas->renderer_type == RENDERER_MC ) - { -#ifdef JITTER_MEM_OPTIM_RENDERING - nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); - ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, nSamplesRenderedLocal, p_tc, p_output ); - st_ivas->hTcBuffer->subframes_rendered++; -#else *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc, p_output ); -#endif - } } - else if ( st_ivas->ivas_format == ISM_FORMAT ) + } + else if ( st_ivas->ivas_format == ISM_FORMAT ) + { + /* Rendering */ + if ( st_ivas->ism_mode == ISM_MODE_PARAM ) { - /* Rendering */ - if ( st_ivas->ism_mode == ISM_MODE_PARAM ) + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { - if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) - { -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, st_ivas->nchan_transport, p_output ); -#else ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, st_ivas->nchan_transport, p_output ); -#endif - } - else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) - { -#ifdef JITTER_MEM_OPTIM_RENDERING - nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); -#else + } + else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) + { *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); -#endif - pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f; - pan_right = 1.f - pan_left; -#ifdef JITTER_MEM_OPTIM_RENDERING - v_multc( p_tc[0], pan_right, output[1], nSamplesRenderedLocal ); - v_multc( p_tc[0], pan_left, output[0], nSamplesRenderedLocal ); -#else + pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f; + pan_right = 1.f - pan_left; #ifdef NONBE_FIX_589_JBM_TC_OFFSETS v_multc( p_tc[0], pan_right, output[1], *nSamplesRendered ); v_multc( p_tc[0], pan_left, output[0], *nSamplesRendered ); @@ -841,55 +804,30 @@ ivas_error ivas_jbm_dec_render( v_multc( st_ivas->hTcBuffer->tc[0], pan_right, output[1], *nSamplesRendered ); v_multc( st_ivas->hTcBuffer->tc[0], pan_left, output[0], *nSamplesRendered ); #endif -#endif - } - else if ( st_ivas->renderer_type == RENDERER_PARAM_ISM || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) - { -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_param_ism_dec_render( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, p_output ); -#else + } + else if ( st_ivas->renderer_type == RENDERER_PARAM_ISM || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) + { ivas_param_ism_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); -#endif - if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) - { - /* Convert CICP19 -> Ambisonics */ -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, nSamplesRenderedLocal, st_ivas->hOutSetup.ambisonics_order, 0.f ); -#else + if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) + { + /* Convert CICP19 -> Ambisonics */ ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); -#endif - } } - -#ifdef JITTER_MEM_OPTIM_RENDERING - st_ivas->hTcBuffer->subframes_rendered++; -#endif } - else /* ISM_MODE_DISC */ - { -#ifdef JITTER_MEM_OPTIM_RENDERING - nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); -#else + } + else /* ISM_MODE_DISC */ + { *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); -#endif - /* Loudspeaker or Ambisonics rendering */ - if ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) - { - /* Convert to CICPxx; used also for ISM->CICP19->binaural_room rendering */ -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_ism_render_sf( st_ivas, p_output, nSamplesRenderedLocal ); -#else + /* Loudspeaker or Ambisonics rendering */ + if ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) + { + /* Convert to CICPxx; used also for ISM->CICP19->binaural_room rendering */ ivas_ism_render_sf( st_ivas, p_output, *nSamplesRendered ); -#endif - } - else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) - { - pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f; - pan_right = 1.f - pan_left; -#ifdef JITTER_MEM_OPTIM_RENDERING - v_multc( p_tc[0], pan_right, output[1], nSamplesRenderedLocal ); - v_multc( p_tc[0], pan_left, output[0], nSamplesRenderedLocal ); -#else + } + else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) + { + pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f; + pan_right = 1.f - pan_left; #ifdef NONBE_FIX_589_JBM_TC_OFFSETS v_multc( p_tc[0], pan_right, output[1], *nSamplesRendered ); v_multc( p_tc[0], pan_left, output[0], *nSamplesRendered ); @@ -898,430 +836,261 @@ ivas_error ivas_jbm_dec_render( v_multc( st_ivas->hTcBuffer->tc[0], pan_right, output[1], *nSamplesRendered ); v_multc( st_ivas->hTcBuffer->tc[0], pan_left, output[0], *nSamplesRendered ); #endif -#endif - } - else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) - { - /* Convert to Ambisonics; used also for ISM->HOA3->binaural rendering */ -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_ism2sba_sf( st_ivas->hTcBuffer->tc, p_output, st_ivas->hIsmRendererData, st_ivas->nchan_transport, nSamplesRenderedLocal, st_ivas->hTcBuffer->n_samples_rendered, st_ivas->hIntSetup.ambisonics_order ); -#else + } + else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) + { + /* Convert to Ambisonics; used also for ISM->HOA3->binaural rendering */ ivas_ism2sba_sf( st_ivas->hTcBuffer->tc, p_output, st_ivas->hIsmRendererData, st_ivas->nchan_transport, *nSamplesRendered, st_ivas->hTcBuffer->n_samples_rendered, st_ivas->hIntSetup.ambisonics_order ); -#endif - } + } - /* Binaural rendering */ - if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) - { -#ifdef JITTER_MEM_OPTIM_RENDERING - if ( ( ivas_td_binaural_renderer_sf( st_ivas, p_output, nSamplesRenderedLocal ) ) != IVAS_ERR_OK ) -#else + /* Binaural rendering */ + if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) + { if ( ( ivas_td_binaural_renderer_sf( st_ivas, p_output, *nSamplesRendered ) ) != IVAS_ERR_OK ) -#endif - { - return error; - } - } - else if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { -#ifdef JITTER_MEM_OPTIM_RENDERING - if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, AUDIO_CONFIG_7_1_4, AUDIO_CONFIG_BINAURAL_ROOM_IR, st_ivas->hDecoderConfig, NULL, NULL, - NULL, st_ivas->hTcBuffer, p_output, p_output, nSamplesRenderedLocal, output_Fs ) ) != IVAS_ERR_OK ) -#else + return error; + } + } + else if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) + { if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, AUDIO_CONFIG_7_1_4, AUDIO_CONFIG_BINAURAL_ROOM_IR, st_ivas->hDecoderConfig, NULL, NULL, NULL, st_ivas->hTcBuffer, p_output, p_output, *nSamplesRendered, output_Fs ) ) != IVAS_ERR_OK ) -#endif - { - return error; - } + { + return error; + } -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_binaural_add_LFE( st_ivas, nSamplesRenderedLocal, p_output, p_output ); -#else ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); -#endif - } + } #ifdef DEBUGGING - else if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) - { - ivas_binaural_cldfb_sf( - st_ivas, -#ifdef JITTER_MEM_OPTIM_RENDERING - nSamplesRenderedLocal, -#else - *nSamplesRendered, -#endif + else if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + { + ivas_binaural_cldfb_sf( + st_ivas, + *nSamplesRendered, #ifdef JBM_PARAMUPMIX - st_ivas->hTcBuffer->nb_subframes, -#endif - p_output ); - } + st_ivas->hTcBuffer->nb_subframes, #endif + p_output ); } +#endif } - else if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == MASA_FORMAT ) - { - nchan_remapped = nchan_transport; + } + else if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == MASA_FORMAT ) + { + nchan_remapped = nchan_transport; - /* Loudspeakers, Ambisonics or Binaural rendering */ - if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) - { -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, nchan_remapped, p_output ); -#else + /* Loudspeakers, Ambisonics or Binaural rendering */ + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) + { ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); -#endif - } - else if ( st_ivas->ivas_format == MASA_FORMAT ) + } + else if ( st_ivas->ivas_format == MASA_FORMAT ) + { + if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC ) { - if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC ) - { -#ifdef JITTER_MEM_OPTIM_RENDERING - nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); -#else *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); -#endif - for ( n = 0; n < nchan_remapped; n++ ) - { -#ifdef JITTER_MEM_OPTIM_RENDERING - mvr2r( st_ivas->hTcBuffer->tc[n] + st_ivas->hTcBuffer->n_samples_rendered, p_output[n], nSamplesRenderedLocal ); -#else + for ( n = 0; n < nchan_remapped; n++ ) + { mvr2r( st_ivas->hTcBuffer->tc[n] + st_ivas->hTcBuffer->n_samples_rendered, p_output[n], *nSamplesRendered ); -#endif - } + } -#ifdef JITTER_MEM_OPTIM_RENDERING - if ( ( error = ivas_sba_linear_renderer( p_output, nSamplesRenderedLocal, nchan_remapped, output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ) ) != IVAS_ERR_OK ) -#else if ( ( error = ivas_sba_linear_renderer( p_output, *nSamplesRendered, nchan_remapped, output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ) ) != IVAS_ERR_OK ) -#endif - { - return error; - } - } - else if ( st_ivas->renderer_type == RENDERER_DIRAC ) { -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, p_output ); -#else - ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); -#endif + return error; } } - else /* SBA_MODE_SPAR */ + else if ( st_ivas->renderer_type == RENDERER_DIRAC ) { -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, p_output ); -#else - ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); -#endif + ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); } -#ifdef JITTER_MEM_OPTIM_RENDERING - st_ivas->hTcBuffer->subframes_rendered++; -#endif } - else if ( st_ivas->ivas_format == MC_FORMAT ) + else /* SBA_MODE_SPAR */ + { + ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); + } + } + else if ( st_ivas->ivas_format == MC_FORMAT ) + { + if ( st_ivas->mc_mode == MC_MODE_MCT ) { - if ( st_ivas->mc_mode == MC_MODE_MCT ) - { -#ifdef JITTER_MEM_OPTIM_RENDERING - nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); -#else *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); -#endif - if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) ) - { -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_mc2sba( st_ivas->hTransSetup, p_tc, p_output, nSamplesRenderedLocal, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); -#else + if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) ) + { ivas_mc2sba( st_ivas->hTransSetup, p_tc, p_output, *nSamplesRendered, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); -#endif - } + } - /* Rendering */ - if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) - { -#ifdef JITTER_MEM_OPTIM_RENDERING - if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig, - st_ivas->hCombinedOrientationData, - &st_ivas->hIntSetup, st_ivas->hEFAPdata, st_ivas->hTcBuffer, p_tc, p_output, nSamplesRenderedLocal, output_Fs ) ) != IVAS_ERR_OK ) -#else + /* Rendering */ + if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) + { if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig, st_ivas->hCombinedOrientationData, &st_ivas->hIntSetup, st_ivas->hEFAPdata, st_ivas->hTcBuffer, p_tc, p_output, *nSamplesRendered, output_Fs ) ) != IVAS_ERR_OK ) -#endif - { - return error; - } -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_binaural_add_LFE( st_ivas, nSamplesRenderedLocal, p_tc, p_output ); -#else + { + return error; + } #ifdef NONBE_FIX_589_JBM_TC_OFFSETS ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_tc, p_output ); #else ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, st_ivas->hTcBuffer->tc, p_output ); #endif -#endif - } - else if ( st_ivas->renderer_type == RENDERER_MC ) - { -#ifdef JITTER_MEM_OPTIM_RENDERING - nSamplesRenderedLocal = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); - ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, nSamplesRenderedLocal, p_tc, p_output ); -#else + } + else if ( st_ivas->renderer_type == RENDERER_MC ) + { *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc, p_output ); -#endif - } - else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) - { -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_mc2sba( st_ivas->hIntSetup, p_tc, p_output, nSamplesRenderedLocal, st_ivas->hOutSetup.ambisonics_order, 0.f ); -#else + } + else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) + { ivas_mc2sba( st_ivas->hIntSetup, p_tc, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); -#endif - } - else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) - { -#ifdef JITTER_MEM_OPTIM_RENDERING - if ( ( ivas_td_binaural_renderer_sf( st_ivas, p_output, nSamplesRenderedLocal ) ) != IVAS_ERR_OK ) -#else + } + else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) + { if ( ( ivas_td_binaural_renderer_sf( st_ivas, p_output, *nSamplesRendered ) ) != IVAS_ERR_OK ) -#endif - { - return error; - } -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_binaural_add_LFE( st_ivas, nSamplesRenderedLocal, p_tc, p_output ); -#else + { + return error; + } #ifdef NONBE_FIX_589_JBM_TC_OFFSETS ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_tc, p_output ); #else ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, st_ivas->hTcBuffer->tc, p_output ); #endif -#endif - } } + } #ifdef JBM_PARAMUPMIX - else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) - { -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_mc_paramupmix_dec_render( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, p_tc, p_output ); -#else - ivas_mc_paramupmix_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_tc, p_output ); -#endif + else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) + { + ivas_mc_paramupmix_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_tc, p_output ); - /* HP filtering */ + /* HP filtering */ #ifdef SPLIT_REND_WITH_HEAD_ROT - /*no HPF when rendering is already done*/ - if ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) + /*no HPF when rendering is already done*/ + if ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) #endif + { + for ( n = 0; n < st_ivas->nchan_transport; n++ ) { - for ( n = 0; n < st_ivas->nchan_transport; n++ ) + if ( n != LFE_CHANNEL ) { - if ( n != LFE_CHANNEL ) - { - hp20( p_output[n], *nSamplesRendered, st_ivas->mem_hp20_out[n], output_Fs ); - } + hp20( p_output[n], *nSamplesRendered, st_ivas->mem_hp20_out[n], output_Fs ); } } + } - if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) ) - { -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_mc2sba( st_ivas->hTransSetup, p_output, p_output, nSamplesRenderedLocal, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); -#else - ivas_mc2sba( st_ivas->hTransSetup, p_output, p_output, *nSamplesRendered, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); -#endif - } + if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) ) + { + ivas_mc2sba( st_ivas->hTransSetup, p_output, p_output, *nSamplesRendered, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); + } - /* Rendering */ - if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) - { + /* Rendering */ + if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + { #ifdef SPLIT_REND_WITH_HEAD_ROT - /*handled in CLDFB domain already*/ - if ( ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) && - ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) -#endif - { -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_binaural_add_LFE( st_ivas, nSamplesRenderedLocal, p_output, p_output ); -#else - ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); -#endif - } - } - else if ( st_ivas->renderer_type == RENDERER_MC ) - { -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_ls_setup_conversion( st_ivas, MC_PARAMUPMIX_MAX_INPUT_CHANS, nSamplesRenderedLocal, p_output, p_output ); -#else - ivas_ls_setup_conversion( st_ivas, MC_PARAMUPMIX_MAX_INPUT_CHANS, *nSamplesRendered, p_output, p_output ); + /*handled in CLDFB domain already*/ + if ( ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) && + ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) #endif - } - else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, nSamplesRenderedLocal, st_ivas->hOutSetup.ambisonics_order, 0.f ); -#else - ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); -#endif - } - else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) - { -#ifdef JITTER_MEM_OPTIM_RENDERING - if ( ( ivas_td_binaural_renderer( st_ivas, p_output, nSamplesRenderedLocal ) ) != IVAS_ERR_OK ) -#else - if ( ( ivas_td_binaural_renderer( st_ivas, p_output, *nSamplesRendered ) ) != IVAS_ERR_OK ) -#endif - { - return error; - } -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_binaural_add_LFE( st_ivas, nSamplesRenderedLocal, p_output, p_output ); -#else ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); -#endif } } -#endif - else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) + else if ( st_ivas->renderer_type == RENDERER_MC ) { -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_param_mc_dec_render( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, p_output ); -#else - ivas_param_mc_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); -#endif + ivas_ls_setup_conversion( st_ivas, MC_PARAMUPMIX_MAX_INPUT_CHANS, *nSamplesRendered, p_output, p_output ); } - else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) + else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { - int16_t offset = hSpatParamRendCom->slots_rendered * hSpatParamRendCom->slot_size; - nchan_remapped = st_ivas->nchan_transport; - - if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) + ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); + } + else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) + { + if ( ( ivas_td_binaural_renderer( st_ivas, p_output, *nSamplesRendered ) ) != IVAS_ERR_OK ) { -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, nchan_remapped, p_output ); -#else - ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); -#endif + return error; } - else if ( st_ivas->renderer_type == RENDERER_DIRAC || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) /* rendering to CICPxx and Ambisonics */ - { -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, &nSamplesRenderedLocal, nSamplesAvailableNext, p_output ); -#else - ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); + ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); + } + } #endif - if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) + else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) + { + ivas_param_mc_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); + } + else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) + { + int16_t offset = hSpatParamRendCom->slots_rendered * hSpatParamRendCom->slot_size; + nchan_remapped = st_ivas->nchan_transport; + + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) + { + ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); + } + else if ( st_ivas->renderer_type == RENDERER_DIRAC || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) /* rendering to CICPxx and Ambisonics */ + { + ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); + if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) + { + /* we still need to copy the separate channel if available */ + if ( st_ivas->hOutSetup.separateChannelEnabled ) { - /* we still need to copy the separate channel if available */ - if ( st_ivas->hOutSetup.separateChannelEnabled ) - { -#ifdef JITTER_MEM_OPTIM_RENDERING - mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], nSamplesRenderedLocal ); -#else mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); -#endif - } -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, nSamplesRenderedLocal, st_ivas->hOutSetup.ambisonics_order, 0.f ); -#else - ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); -#endif } - else if ( st_ivas->intern_config == AUDIO_CONFIG_5_1 && ( output_config == AUDIO_CONFIG_5_1_2 || output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1 ) ) + ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); + } + else if ( st_ivas->intern_config == AUDIO_CONFIG_5_1 && ( output_config == AUDIO_CONFIG_5_1_2 || output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1 ) ) + { + for ( n = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; n < st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe; n++ ) { - for ( n = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; n < st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe; n++ ) - { -#ifdef JITTER_MEM_OPTIM_RENDERING - set_zero( output[n], nSamplesRenderedLocal ); -#else set_zero( output[n], *nSamplesRendered ); -#endif - } } } + } - /* copy discrete C and TD LFE from internal TC to output */ - if ( st_ivas->hOutSetup.separateChannelEnabled ) + /* copy discrete C and TD LFE from internal TC to output */ + if ( st_ivas->hOutSetup.separateChannelEnabled ) + { + if ( output_config == AUDIO_CONFIG_5_1 || output_config == AUDIO_CONFIG_7_1 || + output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1_4 || + output_config == AUDIO_CONFIG_5_1_2 || ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe > 0 ) ) { - if ( output_config == AUDIO_CONFIG_5_1 || output_config == AUDIO_CONFIG_7_1 || - output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1_4 || - output_config == AUDIO_CONFIG_5_1_2 || ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe > 0 ) ) - { -#ifdef JITTER_MEM_OPTIM_RENDERING - mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL] + offset, output[LFE_CHANNEL], nSamplesRenderedLocal ); - mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], nSamplesRenderedLocal ); -#else mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL] + offset, output[LFE_CHANNEL], *nSamplesRendered ); mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); -#endif - } - else if ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe == 0 ) - { - /* Delay the separated channel to sync with the DirAC rendering */ -#ifdef JITTER_MEM_OPTIM_RENDERING - mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], nSamplesRenderedLocal ); -#else + } + else if ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe == 0 ) + { + /* Delay the separated channel to sync with the DirAC rendering */ mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); -#endif - } } } } + } - /*----------------------------------------------------------------* - * Write IVAS output channels - * - compensation for saturation - * - float to integer conversion - *----------------------------------------------------------------*/ + /*----------------------------------------------------------------* + * Write IVAS output channels + * - compensation for saturation + * - float to integer conversion + *----------------------------------------------------------------*/ -#ifdef JITTER_MEM_OPTIM_RENDERING - st_ivas->hTcBuffer->n_samples_available -= nSamplesRenderedLocal; - st_ivas->hTcBuffer->n_samples_rendered += nSamplesRenderedLocal; -#else st_ivas->hTcBuffer->n_samples_available -= *nSamplesRendered; st_ivas->hTcBuffer->n_samples_rendered += *nSamplesRendered; -#endif - if ( st_ivas->hTcBuffer->n_samples_discard > 0 ) + if ( st_ivas->hTcBuffer->n_samples_discard > 0 ) + { + for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) { - for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) - { - p_output[n] += st_ivas->hTcBuffer->n_samples_discard; - } -#ifdef JITTER_MEM_OPTIM_RENDERING - nSamplesRenderedLocal -= st_ivas->hTcBuffer->n_samples_discard; -#else - *nSamplesRendered -= st_ivas->hTcBuffer->n_samples_discard; -#endif - st_ivas->hTcBuffer->n_samples_discard = 0; + p_output[n] += st_ivas->hTcBuffer->n_samples_discard; } + *nSamplesRendered -= st_ivas->hTcBuffer->n_samples_discard; + st_ivas->hTcBuffer->n_samples_discard = 0; + } #ifndef DISABLE_LIMITER -#ifdef JITTER_MEM_OPTIM_RENDERING - ivas_limiter_dec( st_ivas->hLimiter, p_output, nchan_out, nSamplesRenderedLocal, st_ivas->BER_detect ); -#else - ivas_limiter_dec( st_ivas->hLimiter, p_output, nchan_out, *nSamplesRendered, st_ivas->BER_detect ); -#endif + ivas_limiter_dec( st_ivas->hLimiter, p_output, nchan_out, *nSamplesRendered, st_ivas->BER_detect ); #endif -#ifdef JITTER_MEM_OPTIM_RENDERING -#ifdef DEBUGGING - st_ivas->noClipping += -#endif - ivas_syn_output( p_output, nSamplesRenderedLocal, nchan_out, data + *nSamplesRendered * nchan_out ); - *nSamplesRendered += nSamplesRenderedLocal; - - st_ivas->hTcBuffer->subframes_rendered = subframes_rendered + 1; - } -#else #ifdef DEBUGGING st_ivas->noClipping += #endif ivas_syn_output( p_output, *nSamplesRendered, nchan_out, data ); -#endif *nSamplesAvailableNext = st_ivas->hTcBuffer->n_samples_available; pop_wmops(); diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 112973d94b..4eb9de19af 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1026,6 +1026,7 @@ ivas_error IVAS_DEC_GetSamples( #endif hIvasDec->nSamplesAvailableNext = 0; hIvasDec->nSamplesRendered = *nOutSamples; + nSamplesRendered = *nOutSamples; hIvasDec->needNewFrame = true; *needNewFrame = true; } -- GitLab From ae7a09c914324ce88bfd742dca26a159e4d34560 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 3 Aug 2023 11:49:50 +0200 Subject: [PATCH 081/175] fix msan error in EVS mono and non-diegetic panning, transfer head orientation tracking fixes to the 5ms API path --- lib_dec/lib_dec.c | 7 +++- lib_rend/ivas_rotation.c | 69 +++++++++++++++++++++++++++++---------- lib_rend/ivas_stat_rend.h | 2 ++ 3 files changed, 60 insertions(+), 18 deletions(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 4eb9de19af..8e84b73849 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -3610,7 +3610,12 @@ static ivas_error evs_dec_main( #ifdef API_5MS - if ( !st_ivas->hDecoderConfig->Opt_tsm ) + if ( !st_ivas->hDecoderConfig->Opt_tsm +#ifdef API_5MS_BASELINE + && st_ivas->hDecoderConfig->Opt_5ms +#endif + + ) { ivas_jbm_dec_copy_tc_no_tsm( st_ivas, p_output, nOutSamples ); } diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 586b96c08a..5c19a75ccc 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -923,8 +923,10 @@ ivas_error ivas_combined_orientation_open( #ifdef API_5MS ( *hCombinedOrientationData )->enableCombinedOrientation = 0; ( *hCombinedOrientationData )->Quaternion = identity; +#ifndef FIX_570_SF_EXT_ORIENTATION ( *hCombinedOrientationData )->Quaternion_prev_headRot = identity; ( *hCombinedOrientationData )->Quaternion_prev_extOrientation = identity; +#endif ( *hCombinedOrientationData )->listenerPos = origo; for ( j = 0; j < 3; j++ ) @@ -1264,6 +1266,23 @@ ivas_error combine_external_and_head_orientations( /* External orientations */ #ifdef API_5MS +#ifdef FIX_570_SF_EXT_ORIENTATION + /* Check for frozen external orientation */ + if ( hExtOrientationData->enableExternalOrientation == 2 ) + { + if ( hCombinedOrientationData->isExtOrientationFrozen != 1 ) + { + hCombinedOrientationData->Quaternion_frozen_ext = hExtOrientationData->Quaternion; + hCombinedOrientationData->isExtOrientationFrozen = 1; + } + } + else + { + hCombinedOrientationData->Quaternion_frozen_ext = identity; + hCombinedOrientationData->isExtOrientationFrozen = 0; + } +#endif + if ( hExtOrientationData->enableRotationInterpolation == 1 && hExtOrientationData->enableExternalOrientation > 0 ) { if ( hCombinedOrientationData->isInterpolationOngoing == TRUE && hCombinedOrientationData->interpolationCoefficient <= 1.0f && are_orientations_same( &hCombinedOrientationData->Quaternions_ext_interpolation_target, &hExtOrientationData->Quaternion ) == true ) @@ -1293,7 +1312,11 @@ ivas_error combine_external_and_head_orientations( /* Use the freezed external orientation */ else if ( hExtOrientationData->enableExternalOrientation == 2 ) { +#ifdef FIX_570_SF_EXT_ORIENTATION + hCombinedOrientationData->Quaternion = hCombinedOrientationData->Quaternion_frozen_ext; +#else hCombinedOrientationData->Quaternion = hCombinedOrientationData->Quaternion_prev_extOrientation; +#endif } } #else @@ -1364,25 +1387,34 @@ ivas_error combine_external_and_head_orientations( { /* Combine head and external orientations */ #ifdef API_5MS +#ifdef FIX_570_SF_EXT_ORIENTATION + /* Check for frozen head rotation */ + if ( hExtOrientationData->enableHeadRotation == 2 ) + { + if ( hCombinedOrientationData->isHeadRotationFrozen != 1 ) + { + hCombinedOrientationData->Quaternion_frozen_head = *headRotQuaternion; + hCombinedOrientationData->isHeadRotationFrozen = 1; + } + } + else + { + hCombinedOrientationData->Quaternion_frozen_head = identity; + hCombinedOrientationData->isHeadRotationFrozen = 0; + } +#endif + /* Use the most recent head rotation */ if ( hExtOrientationData->enableHeadRotation == 1 ) { if ( hExtOrientationData->enableExternalOrientation > 0 ) { -#ifdef API_5MS QuaternionProduct( hCombinedOrientationData->Quaternion, *headRotQuaternion, &hCombinedOrientationData->Quaternion ); -#else - QuaternionProduct( hCombinedOrientationData->Quaternion, *headRotQuaternions, &hCombinedOrientationData->Quaternion ); -#endif } else { -#ifdef API_5MS hCombinedOrientationData->Quaternion = *headRotQuaternion; -#else - hCombinedOrientationData->Quaternion = *headRotQuaternions; -#endif } } /* Use the freezed head rotation */ @@ -1390,11 +1422,19 @@ ivas_error combine_external_and_head_orientations( { if ( hExtOrientationData->enableExternalOrientation > 0 ) { +#ifdef FIX_570_SF_EXT_ORIENTATION + QuaternionProduct( hCombinedOrientationData->Quaternion, hCombinedOrientationData->Quaternion_frozen_head, &hCombinedOrientationData->Quaternion ); +#else QuaternionProduct( hCombinedOrientationData->Quaternion, hCombinedOrientationData->Quaternion_prev_headRot, &hCombinedOrientationData->Quaternion ); +#endif } else { +#ifdef FIX_570_SF_EXT_ORIENTATION + hCombinedOrientationData->Quaternion = hCombinedOrientationData->Quaternion_frozen_head; +#else hCombinedOrientationData->Quaternion = hCombinedOrientationData->Quaternion_prev_headRot; +#endif } } @@ -1494,7 +1534,7 @@ ivas_error combine_external_and_head_orientations( { hCombinedOrientationData->Quaternion_prev_extOrientation = identity; } -#elif defined FIX_570_SF_EXT_ORIENTATION /* ToDo: ensure FIX_570_SF_EXT_ORIENTATION is correctly included in API_5MS */ +#elif defined FIX_570_SF_EXT_ORIENTATION if ( hExtOrientationData->enableExternalOrientation[MAX_PARAM_SPATIAL_SUBFRAMES - 1] > 0 ) { hCombinedOrientationData->Quaternion_prev_extOrientation = hExtOrientationData->Quaternions[MAX_PARAM_SPATIAL_SUBFRAMES - 1]; @@ -1524,15 +1564,12 @@ ivas_error combine_external_and_head_orientations( #endif { #ifdef API_5MS +#ifndef FIX_570_SF_EXT_ORIENTATION if ( hExtOrientationData != NULL ) { if ( hExtOrientationData->enableHeadRotation > 0 ) { -#ifdef API_5MS hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternion; -#else - hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternions; -#endif } else { @@ -1541,12 +1578,10 @@ ivas_error combine_external_and_head_orientations( } else { -#ifdef API_5MS hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternion; -#else - hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternions; -#endif + } +#endif hCombinedOrientationData->listenerPos = *listenerPos; #else diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index 0aa499f72a..0323801c91 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -905,7 +905,9 @@ typedef struct ivas_combined_orientation_struct bool isInterpolationOngoing; #ifdef API_5MS IVAS_QUATERNION Quaternion; +#ifndef FIX_570_SF_EXT_ORIENTATION IVAS_QUATERNION Quaternion_prev_headRot; +#endif IVAS_QUATERNION Quaternion_prev_extOrientation; #else IVAS_QUATERNION Quaternions[MAX_PARAM_SPATIAL_SUBFRAMES]; -- GitLab From a82c25a445fa81ae63f30c65ceac06864f54651e Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 3 Aug 2023 12:00:54 +0200 Subject: [PATCH 082/175] [fix] number of samples rendered not correctly updated in IVAS_DEC_GetSplitBinaural() --- lib_dec/lib_dec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 4eb9de19af..e4eec6d484 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1146,7 +1146,7 @@ ivas_error IVAS_DEC_GetSplitBinaural( *nOutSamples = 0; *needNewFrame = FALSE; - while ( error == IVAS_ERR_OK && !*needNewFrame ) + while ( error == IVAS_ERR_OK && !*needNewFrame /*TODO(jbm): && numOutSamples < numAskedSamples */ ) { int16_t nOutSamplesLocal; IVAS_DEC_SPLIT_REND_WRAPPER *hSplitBinRend; @@ -1165,7 +1165,7 @@ ivas_error IVAS_DEC_GetSplitBinaural( output_int, &nOutSamplesLocal, needNewFrame ); - if ( error != IVAS_ERR_OK || *needNewFrame ) + if ( error != IVAS_ERR_OK ) { return error; } @@ -1186,6 +1186,7 @@ ivas_error IVAS_DEC_GetSplitBinaural( max_band = (int16_t) ( ( BINAURAL_MAXBANDS * output_Fs ) / 48000 ); pcm_out = ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0; + /* TODO(jbm): need to wait 20ms before writing split bitstream in 5ms mode */ error = ivas_renderMultiBinToSplitBinaural( &hSplitBinRend->splitrend, st_ivas->hHeadTrackData->Quaternion, st_ivas->hRenderConfig->split_rend_config.splitRendBitRate, -- GitLab From 67e35f00ac08a3541602c0db1ba383909173b38b Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 3 Aug 2023 12:03:26 +0200 Subject: [PATCH 083/175] [ci] implement ref-using-main for renderer-/split-rendering-pytest-on-merge-request jobs --- .gitlab-ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 82738a8e51..c277c5d39d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -518,8 +518,7 @@ renderer-pytest-on-merge-request: # some helper variables - "|| true" to prevent failures from grep not finding anything - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[rend\(erer\)*[ -]*non[ -]*be\]") || true - # TODO: needs splitting the test between reference and cut generation - #- ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true + - ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true # store the current commit hash - source_branch_commit_sha=$(git rev-parse HEAD) @@ -537,6 +536,9 @@ renderer-pytest-on-merge-request: - make clean - make -j IVAS_rend + ### Run test using scripts and input from main + - if [ $ref_using_main == 1 ]; then git checkout $target_commit; fi + # run test - exit_code=0 - python3 -m pytest -q --log-level ERROR -n auto -rA --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/renderer/test_renderer_be_comparison.py || exit_code=$? @@ -594,8 +596,7 @@ split-rendering-pytest-on-merge-request: # some helper variables - "|| true" to prevent failures from grep not finding anything - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[split*[ -]*non[ -]*be\]") || true - # TODO: needs splitting the test between reference and cut generation - #- ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true + - ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true # store the current commit hash - source_branch_commit_sha=$(git rev-parse HEAD) @@ -615,6 +616,9 @@ split-rendering-pytest-on-merge-request: - make clean - make -j + ### Run test using scripts and input from main + - if [ $ref_using_main == 1 ]; then git checkout $target_commit; fi + # run test - exit_code=0 - python3 -m pytest -q --log-level ERROR -n auto -rA --html=report.html --self-contained-html --junit-xml=report-junit.xml tests/split_rendering/test_split_rendering_be_comparison.py || exit_code=$? -- GitLab From a99b350481b8566a84ba7c6dd0142509e69da197 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 3 Aug 2023 12:04:59 +0200 Subject: [PATCH 084/175] fix usan in JBM, access to the transport channel buffers was using the wrong number of channels as for condition --- lib_com/options.h | 1 + lib_dec/ivas_jbm_dec.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 2a3372a91c..fde2a5a79e 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -161,6 +161,7 @@ #define FIX_566_2DIR_MASA_384K /* Nokia: Issued 566: Bugfix in 384k MASA metadata encoding of second direction */ #define FIX_XXX_HEADTRACKER_INIT #define FIX_XXX_ISM_SBA_ASAN +#define FIX_XXX_JBM_USAN /* FhG: fix usan in acessing transport channel buffers */ #define NONBE_FIX_589_JBM_TC_OFFSETS #define API_5MS /* FhG: 5ms rendering capability */ #ifdef API_5MS diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 49d22c1c9c..50a10e9252 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -747,7 +747,11 @@ ivas_error ivas_jbm_dec_render( p_output[n] = &output[n][0]; } +#ifdef FIX_XXX_JBM_USAN + for ( n = 0; n < st_ivas->hTcBuffer->nchan_buffer_full; n++ ) +#else for ( n = 0; n < st_ivas->hTcBuffer->nchan_transport_internal; n++ ) +#endif { p_tc[n] = &st_ivas->hTcBuffer->tc[n][st_ivas->hTcBuffer->n_samples_rendered]; } -- GitLab From 2ba80d32f070c781b88a6c579af043263a33f74b Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 3 Aug 2023 15:24:21 +0200 Subject: [PATCH 085/175] [fix] delay compensation when delay is greater than 5ms and fixes for split-pre rendering --- apps/renderer.c | 6 +++++- lib_rend/lib_rend.c | 4 ++++ tests/split_rendering/constants.py | 3 +-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index 4011cdefea..175019e7bd 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1907,7 +1907,11 @@ int main( if ( audioWriter != NULL ) { #endif - if ( delayNumSamples < outBufferSize ) +#ifdef API_5MS + if ( ( delayNumSamples * num_out_channels ) < outBufferSize ) /* TODO tmu2sgi : needs verification */ +#else + if ( delayNumSamples < outBufferSize ) +#endif { if ( AudioFileWriter_write( audioWriter, &outInt16Buffer[delayNumSamples * num_out_channels], outBufferSize - ( delayNumSamples * num_out_channels ) ) != IVAS_ERR_OK ) { diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index ce3ff1f6f0..99c1eddc7b 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -4766,6 +4766,8 @@ ivas_error IVAS_REND_FeedInputAudio( #ifdef SPLIT_REND_WITH_HEAD_ROT if ( getAudioConfigType( hIvasRend->outputConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL && + hIvasRend->outputConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && + hIvasRend->outputConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM && ( inputAudio.config.numSamplesPerChannel * 1000 / cldfb2tdSampleFact ) != BINAURAL_RENDERING_FRAME_SIZE_MS * hIvasRend->sampleRateOut ) #else if ( getAudioConfigType( hIvasRend->outputConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL && @@ -9045,6 +9047,8 @@ ivas_error IVAS_REND_GetSamples( #ifdef SPLIT_REND_WITH_HEAD_ROT if ( getAudioConfigType( hIvasRend->outputConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL && + hIvasRend->outputConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && + hIvasRend->outputConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM && ( outAudio.config.numSamplesPerChannel * 1000 / cldfb2tdSampleFact ) != BINAURAL_RENDERING_FRAME_SIZE_MS * hIvasRend->sampleRateOut ) #else if ( getAudioConfigType( hIvasRend->outputConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL && diff --git a/tests/split_rendering/constants.py b/tests/split_rendering/constants.py index e34480368c..83a271ce04 100644 --- a/tests/split_rendering/constants.py +++ b/tests/split_rendering/constants.py @@ -172,7 +172,6 @@ SPLIT_PRE_REND_CMD = [ "BINAURAL_SPLIT_CODED", "-tf", "", # 14 -> post-trajectory file - "-fr5", ] """ Split-post Renderer commandline template """ @@ -190,5 +189,5 @@ SPLIT_POST_REND_CMD = [ "BINAURAL", "-tf", "", # 12 -> post-trajectory file - "-fr5", + "-fr5", # split decoding must be on 5ms granularity ] -- GitLab From 1de55766107671ffccbfa29de0618c1f4b4c7cb4 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 3 Aug 2023 15:25:02 +0200 Subject: [PATCH 086/175] clang-format --- lib_dec/lib_dec.c | 2 +- lib_rend/ivas_rotation.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 974f282aff..80db7f3a00 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -3613,7 +3613,7 @@ static ivas_error evs_dec_main( #ifdef API_5MS if ( !st_ivas->hDecoderConfig->Opt_tsm #ifdef API_5MS_BASELINE - && st_ivas->hDecoderConfig->Opt_5ms + && st_ivas->hDecoderConfig->Opt_5ms #endif ) diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 5c19a75ccc..75a6ce4bbf 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -1579,7 +1579,6 @@ ivas_error combine_external_and_head_orientations( else { hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternion; - } #endif hCombinedOrientationData->listenerPos = *listenerPos; -- GitLab From 984969c9b0a308d49b80c61d44f2fb29379f41b7 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 3 Aug 2023 16:40:59 +0200 Subject: [PATCH 087/175] [fix] issue for TD object renderer in 20ms split-pre mode --- lib_rend/ivas_objectRenderer.c | 2 +- lib_rend/lib_rend.c | 81 ++++++++++++---------------------- 2 files changed, 28 insertions(+), 55 deletions(-) diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 9dbf3a8c4b..108292e724 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -794,7 +794,7 @@ ivas_error ivas_td_binaural_renderer_ext( ism_md_subframe_update_ext, p_output, output_frame #ifdef API_5MS , - 1 + ( output_frame == L_FRAME48k ) ? 4 : 1 #endif ) ) != IVAS_ERR_OK ) { diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 99c1eddc7b..04b5ac7c14 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -1480,6 +1480,22 @@ static ivas_error setRendInputActiveIsm( { return error; } + + /* Open TD renderer wrappers */ + for ( i = 0; i < MAX_HEAD_ROT_POSES - 1; ++i ) + { + if ( ( error = ivas_td_binaural_open_ext( &inputIsm->splitTdRendWrappers[i], + inConfig, + hRendCfg, + NULL, + *inputIsm->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) + { + return error; + } + + /* Assert same delay as main TD renderer */ + assert( inputIsm->splitTdRendWrappers[i].binaural_latency_ns == inputIsm->tdRendWrapper.binaural_latency_ns ); + } #endif } else if ( outConfig == IVAS_REND_AUDIO_CONFIG_MASA1 || outConfig == IVAS_REND_AUDIO_CONFIG_MASA2 ) @@ -6357,7 +6373,6 @@ static ivas_error renderIsmToSplitBinaural( input_ism *ismInput, const IVAS_REND_AudioBuffer outAudio ) { - int32_t i; ivas_error error; float tmpProcessing[MAX_NUM_OBJECTS][L_FRAME48k]; int16_t pos_idx; @@ -6384,27 +6399,6 @@ static ivas_error renderIsmToSplitBinaural( ism_md_subframe_update_ext = (int16_t) round( ismInput->ism_metadata_delay_ms / ( 1000 / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ) ); #endif - /* If not yet allocated, open additional instances of TD renderer */ - for ( i = 0; i < pMultiBinPoseData->num_poses - 1; ++i ) - { - if ( ismInput->splitTdRendWrappers[i].hBinRendererTd != NULL ) - { - continue; - } - - /* ToDo: Could re-use already existing HRTF (ismInput->tdRendWrapper.hHrtfTD), but this complicates internal memory handling in TD renderer */ - ismInput->splitTdRendWrappers[i].hHrtfTD = NULL; - - /* Open TD renderer wrapper */ - if ( ( error = ivas_td_binaural_open_ext( &ismInput->splitTdRendWrappers[i], ismInput->base.inConfig, *ismInput->base.ctx.hhRendererConfig, NULL, *ismInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) - { - return error; - } - - /* Assert same delay as main TD renderer */ - assert( ismInput->splitTdRendWrappers[i].binaural_latency_ns == ismInput->tdRendWrapper.binaural_latency_ns ); - } - pCombinedOrientationData = *ismInput->base.ctx.pCombinedOrientationData; if ( pMultiBinPoseData->poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) @@ -6482,41 +6476,20 @@ static ivas_error renderIsmToSplitBinaural( } /* Render */ - if ( pos_idx == 0 ) - { - error = ivas_td_binaural_renderer_ext( &ismInput->tdRendWrapper, - ismInput->base.inConfig, - NULL, - ismInput->base.ctx.pCombinedOrientationData, - &ismInput->currentPos, - NULL, + error = ivas_td_binaural_renderer_ext( ( pos_idx == 0 ) ? &ismInput->tdRendWrapper : &ismInput->splitTdRendWrappers[pos_idx - 1], + ismInput->base.inConfig, + NULL, + ismInput->base.ctx.pCombinedOrientationData, + &ismInput->currentPos, + NULL, #ifdef FIX_488_SYNC_DELAY - ism_md_subframe_update_ext, + ism_md_subframe_update_ext, #endif - output_frame, - tmpProcessing ); - if ( error != IVAS_ERR_OK ) - { - return error; - } - } - else + output_frame, + tmpProcessing ); + if ( error != IVAS_ERR_OK ) { - error = ivas_td_binaural_renderer_ext( &ismInput->splitTdRendWrappers[pos_idx - 1], - ismInput->base.inConfig, - NULL, - ismInput->base.ctx.pCombinedOrientationData, - &ismInput->currentPos, - NULL, -#ifdef FIX_488_SYNC_DELAY - ism_md_subframe_update_ext, -#endif - output_frame, - tmpProcessing ); - if ( error != IVAS_ERR_OK ) - { - return error; - } + return error; } /* Copy rendered audio to tmp storage buffer. Copying directly to output would -- GitLab From 0842e390d0119705cbbc41e76fd9ef8c60918a7b Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 3 Aug 2023 16:51:39 +0200 Subject: [PATCH 088/175] [fix] accidental routing to TD path for MASA split-pre rendering in decoder --- lib_dec/lib_dec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 80db7f3a00..e1ddf402a4 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1152,6 +1152,7 @@ ivas_error IVAS_DEC_GetSplitBinaural( IVAS_DEC_SPLIT_REND_WRAPPER *hSplitBinRend; int16_t max_band; int16_t pcm_out; + int16_t td_input; int16_t numPoses; hSplitBinRend = &st_ivas->splitBinRend; @@ -1185,6 +1186,7 @@ ivas_error IVAS_DEC_GetSplitBinaural( max_band = (int16_t) ( ( BINAURAL_MAXBANDS * output_Fs ) / 48000 ); pcm_out = ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0; + td_input = st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC; /* TODO(jbm): need to wait 20ms before writing split bitstream in 5ms mode */ error = ivas_renderMultiBinToSplitBinaural( &hSplitBinRend->splitrend, @@ -1195,7 +1197,7 @@ ivas_error IVAS_DEC_GetSplitBinaural( hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural, hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural, max_band, output, 1, - st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV, + td_input, pcm_out ); if ( error != IVAS_ERR_OK ) { -- GitLab From 775c924d6dfa8769dd3fd31d5d987689f4224858 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 3 Aug 2023 18:01:42 +0200 Subject: [PATCH 089/175] [fix] double free for hHrtfParamBin (merge artifact?) --- lib_rend/lib_rend.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 3a274e6f1e..48c6569547 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -3512,9 +3512,11 @@ static void freeDecoderDummy( free( pDecDummy->hCombinedOrientationData ); } #ifdef LIB_REND_FIX_HRTFPARAMBIN_MEMLEAK + /* Parametric binaural renderer HRTF structure */ if ( pDecDummy->hHrtfParambin != NULL ) { free( pDecDummy->hHrtfParambin ); + pDecDummy->hHrtfParambin = NULL; } #endif @@ -3555,9 +3557,6 @@ static void freeDecoderDummy( pDecDummy->hoa_dec_mtx = NULL; } - /* Parametric binaural renderer HRTF structure */ - free( pDecDummy->hHrtfParambin ); - #ifdef SPLIT_REND_WITH_HEAD_ROT if ( pDecDummy->splitBinRend.hMultiBinCldfbData != NULL ) { -- GitLab From 746550b08683e9e8443231a3cb236de95f610e2d Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 3 Aug 2023 18:02:20 +0200 Subject: [PATCH 090/175] [tests] reduce runtime by testing only one trajectory file and cleanup --- tests/renderer/constants.py | 168 +----------------------------------- tests/renderer/utils.py | 6 +- 2 files changed, 2 insertions(+), 172 deletions(-) diff --git a/tests/renderer/constants.py b/tests/renderer/constants.py index f32d1b4d22..aad54a5199 100644 --- a/tests/renderer/constants.py +++ b/tests/renderer/constants.py @@ -197,174 +197,8 @@ METADATA_SCENES_TO_TEST_NO_BE = ["masa_scene"] OUTPUT_FORMATS_BINAURAL = ["BINAURAL", "BINAURAL_ROOM_IR", "BINAURAL_ROOM_REVERB"] HR_TRAJECTORIES_TO_TEST = [ "full_circle_in_15s", - "rotate_yaw_pitch_roll1", + # "rotate_yaw_pitch_roll1", ] """ 5ms framing """ FRAMING_5MS_TO_TEST = ["5ms", "20ms"] - -""" Per-testcase xfail SNR thresholds (dB) """ -pass_snr = dict() # not relevant for tests anymore, should be deprecated soon -_pass_snr = { - #################################################################### - # - # External Renderer vs Standalone and pyaudio3dtools renderers tests - # - #################################################################### - # Failure reason: Renderer uses getRSH() with int16_t vs float in python - "test_ambisonics[FOA-5_1]": 39, - "test_ambisonics[FOA-5_1_2]": 40, - "test_ambisonics[FOA-5_1_4]": 41, - "test_ambisonics[FOA-7_1]": 39, - "test_ambisonics[FOA-7_1_4]": 41, - "test_ambisonics[HOA2-5_1]": 26, - "test_ambisonics[HOA2-5_1_2]": 29, - "test_ambisonics[HOA2-5_1_4]": 31, - "test_ambisonics[HOA2-7_1]": 27, - "test_ambisonics[HOA2-7_1_4]": 32, - "test_ambisonics[HOA3-5_1]": 25, - "test_ambisonics[HOA3-5_1_2]": 27, - "test_ambisonics[HOA3-5_1_4]": 29, - "test_ambisonics[HOA3-7_1]": 25, - "test_ambisonics[HOA3-7_1_4]": 30, - # TODO needs debugging - "test_ambisonics_binaural_headrotation[HOA2-BINAURAL-full_circle_in_15s]": 18, - "test_ambisonics_binaural_headrotation[HOA3-BINAURAL-full_circle_in_15s]": 15, - # Failure reason: Crend unit test does not support intermediate conversion to 7_1_4 or SHD BRIRs - # Comparison with pyaudio3dtools results in bad SNR - "test_ambisonics_binaural_headrotation[FOA-BINAURAL_ROOM_IR-full_circle_in_15s]": 0, - "test_ambisonics_binaural_headrotation[FOA-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 0, - "test_ambisonics_binaural_headrotation[HOA2-BINAURAL_ROOM_IR-full_circle_in_15s]": 0, - "test_ambisonics_binaural_headrotation[HOA2-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 0, - "test_ambisonics_binaural_headrotation[HOA2-BINAURAL-rotate_yaw_pitch_roll1]": 4, - "test_ambisonics_binaural_headrotation[HOA3-BINAURAL_ROOM_IR-full_circle_in_15s]": 0, - "test_ambisonics_binaural_headrotation[HOA3-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 0, - "test_ambisonics_binaural_headrotation[HOA3-BINAURAL-rotate_yaw_pitch_roll1]": 3, - "test_ambisonics_binaural_static[FOA-BINAURAL_ROOM_IR]": 0, - "test_ambisonics_binaural_static[HOA2-BINAURAL_ROOM_IR]": 0, - "test_ambisonics_binaural_static[HOA3-BINAURAL_ROOM_IR]": 0, - # Failure reason: Renderer uses getRSH() with int16_t vs float in python - "test_custom_ls_input[t_design_4-FOA]": 43, - "test_custom_ls_input[t_design_4-HOA2]": 39, - "test_custom_ls_input[t_design_4-HOA3]": 36, - "test_custom_ls_output[FOA-16ch_8+4+4]": 40, - "test_custom_ls_output[FOA-4d4]": 40, - "test_custom_ls_output[FOA-itu_4+5+1]": 41, - "test_custom_ls_output[FOA-t_design_4]": 40, - "test_custom_ls_output[HOA2-16ch_8+4+4]": 32, - "test_custom_ls_output[HOA2-4d4]": 31, - "test_custom_ls_output[HOA2-itu_4+5+1]": 31, - "test_custom_ls_output[HOA2-t_design_4]": 34, - "test_custom_ls_output[HOA3-16ch_8+4+4]": 30, - "test_custom_ls_output[HOA3-4d4]": 29, - "test_custom_ls_output[HOA3-itu_4+5+1]": 30, - "test_custom_ls_output[HOA3-t_design_4]": 32, - # Failure reason: TD Object Renderer standalone does not support custom LS input - # Comparison with pyaudio3dtools results in bad SNR - "test_custom_ls_input_binaural[16ch_8+4+4-BINAURAL]": 8, - "test_custom_ls_input_binaural[16ch_8+4+4-BINAURAL_ROOM_IR]": 0, - "test_custom_ls_input_binaural[4d4-BINAURAL]": 6, - "test_custom_ls_input_binaural[4d4-BINAURAL_ROOM_IR]": 0, - "test_custom_ls_input_binaural[itu_4+5+1-BINAURAL]": 1, - "test_custom_ls_input_binaural[itu_4+5+1-BINAURAL_ROOM_IR]": 3, - "test_custom_ls_input_binaural[t_design_4-BINAURAL]": 5, - "test_custom_ls_input_binaural[t_design_4-BINAURAL_ROOM_IR]": 0, - "test_custom_ls_input_binaural_headrotation[16ch_8+4+4-BINAURAL-full_circle_in_15s]": 7, - "test_custom_ls_input_binaural_headrotation[16ch_8+4+4-BINAURAL-rotate_yaw_pitch_roll1]": 6, - "test_custom_ls_input_binaural_headrotation[16ch_8+4+4-BINAURAL_ROOM_IR-full_circle_in_15s]": 0, - "test_custom_ls_input_binaural_headrotation[16ch_8+4+4-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 0, - "test_custom_ls_input_binaural_headrotation[4d4-BINAURAL-full_circle_in_15s]": 7, - "test_custom_ls_input_binaural_headrotation[4d4-BINAURAL-rotate_yaw_pitch_roll1]": 5, - "test_custom_ls_input_binaural_headrotation[4d4-BINAURAL_ROOM_IR-full_circle_in_15s]": 0, - "test_custom_ls_input_binaural_headrotation[4d4-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 0, - "test_custom_ls_input_binaural_headrotation[itu_4+5+1-BINAURAL-full_circle_in_15s]": 1, - "test_custom_ls_input_binaural_headrotation[itu_4+5+1-BINAURAL-rotate_yaw_pitch_roll1]": 1, - "test_custom_ls_input_binaural_headrotation[itu_4+5+1-BINAURAL_ROOM_IR-full_circle_in_15s]": 3, - "test_custom_ls_input_binaural_headrotation[itu_4+5+1-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 3, - "test_custom_ls_input_binaural_headrotation[t_design_4-BINAURAL-full_circle_in_15s]": 4, - "test_custom_ls_input_binaural_headrotation[t_design_4-BINAURAL-rotate_yaw_pitch_roll1]": 4, - "test_custom_ls_input_binaural_headrotation[t_design_4-BINAURAL_ROOM_IR-full_circle_in_15s]": 0, - "test_custom_ls_input_binaural_headrotation[t_design_4-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 0, - # TODO needs debugging - "test_ism_binaural_headrotation[ISM2-BINAURAL-rotate_yaw_pitch_roll1]": 34, - "test_ism_binaural_headrotation[ISM3-BINAURAL-rotate_yaw_pitch_roll1]": 34, - "test_ism_binaural_headrotation[ISM4-BINAURAL-rotate_yaw_pitch_roll1]": 33, - # Failure reason: Crend unit test does not support intermediate conversion to 7_1_4 - "test_ism_binaural_headrotation[ISM1-BINAURAL_ROOM_IR-full_circle_in_15s]": 10, - "test_ism_binaural_headrotation[ISM1-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 4, - "test_ism_binaural_headrotation[ISM2-BINAURAL_ROOM_IR-full_circle_in_15s]": 10, - "test_ism_binaural_headrotation[ISM2-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 3, - "test_ism_binaural_headrotation[ISM3-BINAURAL_ROOM_IR-full_circle_in_15s]": 10, - "test_ism_binaural_headrotation[ISM3-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 4, - "test_ism_binaural_headrotation[ISM4-BINAURAL_ROOM_IR-full_circle_in_15s]": 10, - "test_ism_binaural_headrotation[ISM4-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 4, - "test_ism_binaural_static[ISM1-BINAURAL_ROOM_IR]": 23, - "test_ism_binaural_static[ISM2-BINAURAL_ROOM_IR]": 21, - "test_ism_binaural_static[ISM3-BINAURAL_ROOM_IR]": 21, - "test_ism_binaural_static[ISM4-BINAURAL_ROOM_IR]": 21, - # Failure Reason: Tangent law panning missing in python scripts - "test_ism[ISM1-STEREO]": 8, - "test_ism[ISM2-STEREO]": 13, - "test_ism[ISM3-STEREO]": 13, - "test_ism[ISM4-STEREO]": 13, - # Failure Reason: Casting of positions in renderer to int16_t vs. float in python - "test_ism[ISM1-5_1]": 43, - "test_ism[ISM1-5_1_2]": 43, - "test_ism[ISM1-5_1_4]": 43, - "test_ism[ISM1-7_1]": 40, - "test_ism[ISM1-7_1_4]": 41, - "test_ism[ISM1-FOA]": 49, - "test_ism[ISM1-HOA2]": 45, - "test_ism[ISM1-HOA3]": 42, - "test_ism[ISM2-5_1]": 47, - "test_ism[ISM2-5_1_2]": 44, - "test_ism[ISM2-5_1_4]": 43, - "test_ism[ISM2-7_1]": 44, - "test_ism[ISM2-7_1_4]": 41, - "test_ism[ISM2-FOA]": 47, - "test_ism[ISM2-HOA2]": 43, - "test_ism[ISM2-HOA3]": 40, - "test_ism[ISM3-5_1]": 45, - "test_ism[ISM3-5_1_2]": 43, - "test_ism[ISM3-5_1_4]": 42, - "test_ism[ISM3-7_1]": 43, - "test_ism[ISM3-7_1_4]": 41, - "test_ism[ISM3-FOA]": 47, - "test_ism[ISM3-HOA2]": 43, - "test_ism[ISM3-HOA3]": 40, - "test_ism[ISM4-5_1]": 46, - "test_ism[ISM4-5_1_2]": 43, - "test_ism[ISM4-5_1_4]": 43, - "test_ism[ISM4-7_1]": 45, - "test_ism[ISM4-7_1_4]": 41, - "test_ism[ISM4-FOA]": 47, - "test_ism[ISM4-HOA2]": 43, - "test_ism[ISM4-HOA3]": 40, - # TODO delay alignment of LFE in binaural output - # Failure reason: bitexact except for delay alignment of LFE signal (Issue 59) - "test_multichannel_binaural_headrotation[5_1-BINAURAL-full_circle_in_15s]": 7, - "test_multichannel_binaural_headrotation[5_1-BINAURAL-rotate_yaw_pitch_roll1]": 6, - "test_multichannel_binaural_headrotation[5_1_2-BINAURAL-full_circle_in_15s]": 9, - "test_multichannel_binaural_headrotation[5_1_2-BINAURAL-rotate_yaw_pitch_roll1]": 1, - "test_multichannel_binaural_headrotation[5_1_4-BINAURAL-full_circle_in_15s]": 10, - "test_multichannel_binaural_headrotation[5_1_4-BINAURAL-rotate_yaw_pitch_roll1]": 1, - "test_multichannel_binaural_headrotation[7_1-BINAURAL-full_circle_in_15s]": 8, - "test_multichannel_binaural_headrotation[7_1-BINAURAL-rotate_yaw_pitch_roll1]": 8, - "test_multichannel_binaural_headrotation[7_1_4-BINAURAL-full_circle_in_15s]": 8, - "test_multichannel_binaural_headrotation[7_1_4-BINAURAL-rotate_yaw_pitch_roll1]": 1, - # Failure reason: differences in LFE alignment and possibly rotation - "test_multichannel_binaural_headrotation[5_1-BINAURAL_ROOM_IR-full_circle_in_15s]": 14, - "test_multichannel_binaural_headrotation[5_1-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 12, - "test_multichannel_binaural_headrotation[5_1_2-BINAURAL_ROOM_IR-full_circle_in_15s]": 8, - "test_multichannel_binaural_headrotation[5_1_4-BINAURAL_ROOM_IR-full_circle_in_15s]": 6, - "test_multichannel_binaural_headrotation[5_1_4-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 6, - "test_multichannel_binaural_headrotation[7_1-BINAURAL_ROOM_IR-full_circle_in_15s]": 11, - "test_multichannel_binaural_headrotation[7_1-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 9, - "test_multichannel_binaural_headrotation[5_1_2-BINAURAL_ROOM_IR-rotate_yaw_pitch_roll1]": 6, - # Failure reason: mixed format, see above - "test_metadata[mixed_scene-5_1]": 47, - "test_metadata[mixed_scene-5_1_2]": 47, - "test_metadata[mixed_scene-7_1]": 48, - "test_metadata[mixed_scene-7_1_4]": 47, - "test_metadata[mixed_scene-5_1_4]": 47, -} diff --git a/tests/renderer/utils.py b/tests/renderer/utils.py index 91009f025e..aa47260b6b 100644 --- a/tests/renderer/utils.py +++ b/tests/renderer/utils.py @@ -78,11 +78,7 @@ def check_BE( if np.isnan(snr) or gain_b == 0: pytest.fail("Invalid comparison result, check your signals!") - # try to get a minimum SNR from the config - if test_info.node.name in pass_snr: - snr_min = pass_snr.get(test_info.node.name) - else: - snr_min = np.inf + snr_min = np.inf # TODO temporary fix to pad TD Object Renderer Standalone output if ref.shape != cut.shape: -- GitLab From 1eb42d2e262eeea99ce57d0efc13a19f825e88d3 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 3 Aug 2023 18:27:00 +0200 Subject: [PATCH 091/175] - shorten test duration for split-rendering BE comparison to 3s - avoid name collisions in tmp test files - add external split rendering testcases for MASA --- tests/split_rendering/constants.py | 2 +- tests/split_rendering/test_split_rendering.py | 17 +++++++++++++++++ .../test_split_rendering_be_comparison.py | 18 ++++++++++++++++++ tests/split_rendering/utils.py | 18 ++++++++---------- 4 files changed, 44 insertions(+), 11 deletions(-) diff --git a/tests/split_rendering/constants.py b/tests/split_rendering/constants.py index 83a271ce04..e50dc963c8 100644 --- a/tests/split_rendering/constants.py +++ b/tests/split_rendering/constants.py @@ -131,7 +131,7 @@ IVAS_MAX_ISM_BITRATE = { "4": "512000", } -INPUT_DURATION_SEC = 5 +INPUT_DURATION_SEC = 3 """ Encoder commandline template """ SPLIT_PRE_COD_CMD = [ diff --git a/tests/split_rendering/test_split_rendering.py b/tests/split_rendering/test_split_rendering.py index ff35b3fc6e..3339aa9128 100644 --- a/tests/split_rendering/test_split_rendering.py +++ b/tests/split_rendering/test_split_rendering.py @@ -206,3 +206,20 @@ def test_masa_full_chain_split(test_info, in_fmt, bitrate, render_config, trajec post_trajectory=post_trajectory, output_path_base=OUTPUT_PATH_CUT, ) + +@pytest.mark.parametrize("trajectory", HR_TRAJECTORIES_TO_TEST) +@pytest.mark.parametrize("render_config", RENDERER_CONFIGS_TO_TEST_MASA) +@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) +def test_masa_external_split(test_info, in_fmt, render_config, trajectory): + check_xfail(test_info, in_fmt, render_config) + + post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv") + pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed") + + run_external_split_rendering( + in_fmt=in_fmt, + render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"), + pre_trajectory=pre_trajectory, + post_trajectory=post_trajectory, + output_path_base=OUTPUT_PATH_CUT, + ) \ No newline at end of file diff --git a/tests/split_rendering/test_split_rendering_be_comparison.py b/tests/split_rendering/test_split_rendering_be_comparison.py index c4566c0ced..4cd6a39e91 100644 --- a/tests/split_rendering/test_split_rendering_be_comparison.py +++ b/tests/split_rendering/test_split_rendering_be_comparison.py @@ -179,3 +179,21 @@ def test_masa_full_chain_split(test_info, in_fmt, bitrate, render_config, trajec pre_trajectory=pre_trajectory, post_trajectory=post_trajectory, ) + + +@pytest.mark.parametrize("trajectory", HR_TRAJECTORIES_TO_TEST) +@pytest.mark.parametrize("render_config", RENDERER_CONFIGS_TO_TEST_MASA) +@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) +def test_masa_external_split(test_info, in_fmt, render_config, trajectory): + check_xfail(test_info, in_fmt, render_config) + + post_trajectory = HR_TRAJECTORY_DIR.joinpath(f"{trajectory}.csv") + pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed") + + compare_external_split_args( + in_fmt=in_fmt, + render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"), + pre_trajectory=pre_trajectory, + post_trajectory=post_trajectory, + output_path_base=OUTPUT_PATH_CUT, + ) diff --git a/tests/split_rendering/utils.py b/tests/split_rendering/utils.py index d00a65f0c1..3e56a7ac36 100644 --- a/tests/split_rendering/utils.py +++ b/tests/split_rendering/utils.py @@ -57,12 +57,11 @@ def run_full_chain_split_rendering( """ with TemporaryDirectory() as tmp_dir: tmp_dir = Path(tmp_dir) - cut_in_file = tmp_dir.joinpath("cut_input.wav") - ivas_bitstream = tmp_dir.joinpath("ivas.192") - split_bitstream = tmp_dir.joinpath("split.bit") - out_file = output_path_base.joinpath( - f"{in_fmt}_{bitrate}bps_{pre_trajectory.stem}_split_full_{post_trajectory.stem}__config_{render_config.stem}.wav" - ) + test_file_stem = f"{in_fmt}_{bitrate}bps_{pre_trajectory.stem}_split_full_{post_trajectory.stem}__config_{render_config.stem}" + cut_in_file = tmp_dir.joinpath(f"{test_file_stem}_cut.wav") + ivas_bitstream = tmp_dir.joinpath(f"{test_file_stem}.192") + split_bitstream = tmp_dir.joinpath(f"{test_file_stem}.bit") + out_file = output_path_base.joinpath(f"{test_file_stem}.wav") # check for metadata files if in_fmt.upper().startswith("ISM") or in_fmt.upper().startswith("MASA"): @@ -146,10 +145,9 @@ def run_external_split_rendering( with TemporaryDirectory() as tmp_dir: tmp_dir = Path(tmp_dir) - split_bitstream = tmp_dir.joinpath("split.bit") - out_file = output_path_base.joinpath( - f"{in_fmt}_{pre_trajectory.stem}_split_ext_{post_trajectory.stem}__config_{render_config.stem}.wav" - ) + test_file_stem = f"{in_fmt}_{pre_trajectory.stem}_split_ext_{post_trajectory.stem}__config_{render_config.stem}" + split_bitstream = tmp_dir.joinpath(f"{test_file_stem}.bit") + out_file = output_path_base.joinpath(f"{test_file_stem}.wav") # check for metadata files if in_fmt.upper().startswith("ISM") or in_fmt.upper().startswith("MASA"): -- GitLab From d91dc84b4f93a6b8bad11bd0229e4ae74e3adb39 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 3 Aug 2023 18:27:32 +0200 Subject: [PATCH 092/175] [fix] invalid free in DeletePredictionDecoder() --- lib_com/options.h | 1 + lib_rend/ivas_CQMFDecoder.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 8abbc8ec82..3e7cf6741a 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -168,6 +168,7 @@ #define API_5MS_BASELINE /* FhG: baseline with 20ms rendering and split rendering through 20ms branch */ #endif #define LIB_REND_FIX_HRTFPARAMBIN_MEMLEAK +#define FIX_CQMFPREDDEC_FREE /* FhG: avoid double free / free of NULL in DeletePredictionDecoder() */ // 5 ms branch switches end #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_571_REVERB_NOT_ACTIVATED_ISM /* Philips: Issue 571: Reverb not activated for discrete and parametric ISM */ diff --git a/lib_rend/ivas_CQMFDecoder.c b/lib_rend/ivas_CQMFDecoder.c index cea424d3d7..3e58a4bafc 100644 --- a/lib_rend/ivas_CQMFDecoder.c +++ b/lib_rend/ivas_CQMFDecoder.c @@ -654,7 +654,15 @@ void DeleteCQMFDecoder( CQMFDecoder *psCQMFDecoder ) } #endif - DeletePredictionDecoder( psCQMFDecoder->psPredictionDecoder ); +#ifdef FIX_CQMFPREDDEC_FREE + if ( psCQMFDecoder->psPredictionDecoder != NULL ) + { +#endif + DeletePredictionDecoder( psCQMFDecoder->psPredictionDecoder ); +#ifdef FIX_CQMFPREDDEC_FREE + psCQMFDecoder->psPredictionDecoder = NULL; + } +#endif if ( psCQMFDecoder->psNoiseGen != NULL ) { -- GitLab From 64d54c3c3ad5ab4a46b9685e3b26744c35a4bd7b Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Fri, 4 Aug 2023 08:45:54 +0200 Subject: [PATCH 093/175] fix compilation with API_5MS deactivated, fix energy compensation for ParamISM with TSM --- lib_com/options.h | 3 ++- lib_dec/ivas_dirac_dec.c | 8 +++---- lib_dec/ivas_init_dec.c | 9 ++++---- lib_dec/ivas_ism_dec.c | 6 +++--- lib_dec/ivas_ism_param_dec.c | 22 ++++++++++++-------- lib_dec/ivas_jbm_dec.c | 12 +++++++++-- lib_dec/ivas_masa_dec.c | 14 ++++++------- lib_dec/ivas_mc_param_dec.c | 8 +++---- lib_dec/ivas_mc_paramupmix_dec.c | 10 ++++----- lib_dec/ivas_mct_dec.c | 6 +++--- lib_dec/ivas_sba_dec.c | 6 +++--- lib_dec/ivas_spar_decoder.c | 8 +++---- lib_rend/ivas_dirac_dec_binaural_functions.c | 8 +++---- 13 files changed, 67 insertions(+), 53 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index fde2a5a79e..2a4cf48e8d 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -162,9 +162,10 @@ #define FIX_XXX_HEADTRACKER_INIT #define FIX_XXX_ISM_SBA_ASAN #define FIX_XXX_JBM_USAN /* FhG: fix usan in acessing transport channel buffers */ +#define FIX_XXX_PARAMISM_JBM_ENER_CORRECTION /* FhG: fix energy correction in ParamISM rendering */ #define NONBE_FIX_589_JBM_TC_OFFSETS #define API_5MS /* FhG: 5ms rendering capability */ -#ifdef API_5MS +#ifdef API_5MS #define API_5MS_BASELINE /* FhG: baseline with 20ms rendering and split rendering through 20ms branch */ #endif #define LIB_REND_FIX_HRTFPARAMBIN_MEMLEAK diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 40110e8b30..7a0d1d5029 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -992,15 +992,15 @@ ivas_error ivas_dirac_dec_config( /* Allocate transport channel buffers for SBA format when in JBM */ if ( dec_config_flag == DIRAC_OPEN ) { + if ( #ifdef API_5MS #ifdef API_5MS_BASELINE - if ( st_ivas->hDecoderConfig->Opt_5ms && st_ivas->hTcBuffer == NULL ) -#else - if ( st_ivas->hTcBuffer == NULL ) + st_ivas->hDecoderConfig->Opt_5ms && #endif #else - if ( st_ivas->hDecoderConfig->voip_active == 1 && st_ivas->hTcBuffer == NULL ) + st_ivas->hDecoderConfig->voip_active == 1 && #endif + st_ivas->hTcBuffer == NULL ) { if ( st_ivas->ivas_format == SBA_FORMAT ) { diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 73d76f51d2..647a95661c 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -1894,15 +1894,16 @@ ivas_error ivas_init_decoder( /*-----------------------------------------------------------------* * Allocate and initialize JBM struct + buffer *-----------------------------------------------------------------*/ + if ( #ifdef API_5MS #ifdef API_5MS_BASELINE - if ( st_ivas->hDecoderConfig->Opt_5ms && st_ivas->hTcBuffer == NULL ) -#else - if ( st_ivas->hTcBuffer == NULL ) + st_ivas->hDecoderConfig->Opt_5ms && #endif #else - if ( st_ivas->hDecoderConfig->voip_active && st_ivas->hTcBuffer == NULL ) + st_ivas->hDecoderConfig->voip_active == 1 && #endif + st_ivas->hTcBuffer == NULL ) + { /* no module has yet open the TC buffer, open a default one */ n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels( st_ivas ); diff --git a/lib_dec/ivas_ism_dec.c b/lib_dec/ivas_ism_dec.c index 57b6faee00..3900e8c1cc 100644 --- a/lib_dec/ivas_ism_dec.c +++ b/lib_dec/ivas_ism_dec.c @@ -345,12 +345,12 @@ static ivas_error ivas_ism_bitrate_switching( /*-----------------------------------------------------------------* * Reconfigure TC buffer *-----------------------------------------------------------------*/ +#ifdef API_5MS #ifdef API_5MS_BASELINE -#ifndef API_5MS - if ( st_ivas->hDecoderConfig->voip_active == 1 ) -#else if ( st_ivas->hDecoderConfig->Opt_5ms ) #endif +#else + if ( st_ivas->hDecoderConfig->voip_active == 1 ) #endif { int16_t tc_nchan_full_new; diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index cfb03d21ae..290ff6ded6 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -594,10 +594,10 @@ ivas_error ivas_param_ism_dec_open( st_ivas->hDirAC = hDirAC; st_ivas->hSpatParamRendCom = hSpatParamRendCom; -#ifdef API_5MS_BASELINE #ifndef API_5MS if ( st_ivas->hDecoderConfig->voip_active ) #else +#ifdef API_5MS_BASELINE if ( st_ivas->hDecoderConfig->Opt_5ms ) #endif #endif @@ -906,7 +906,6 @@ void ivas_param_ism_dec( #ifdef API_5MS ivas_ism_param_dec_tc_gain_ajust( st_ivas, output_frame, output_frame / 2, p_tc ); #else -#ifdef FIX_549_DMX_GAIN /* Energy Compensation */ for ( i = 0; i < output_frame; i++ ) { @@ -940,7 +939,6 @@ void ivas_param_ism_dec( } } st_ivas->hDirAC->hParamIsm->last_dmx_gain = gain; -#endif /* FIX_549_DMX_GAIN */ #endif /* API_5MS */ for ( ch = 0; ch < nchan_transport; ch++ ) { @@ -1158,11 +1156,12 @@ void ivas_param_ism_dec_digest_tc( int16_t slot_idx, bin_idx; int32_t ivas_total_brate; #ifndef API_5MS -#ifdef FIX_549_DMX_GAIN int16_t output_frame; +#ifdef FIX_XXX_PARAMISM_JBM_ENER_CORRECTION + int16_t fade_len; +#endif float gain, ene_tc, ene_sum, grad; float last_gain; -#endif #endif float ref_power[CLDFB_NO_CHANNELS_MAX]; float cx_diag[CLDFB_NO_CHANNELS_MAX][PARAM_ISM_MAX_DMX]; @@ -1177,10 +1176,13 @@ void ivas_param_ism_dec_digest_tc( hSpatParamRendCom = st_ivas->hSpatParamRendCom; assert( hSpatParamRendCom ); #ifndef API_5MS -#ifdef FIX_549_DMX_GAIN ene_tc = 0.0f; ene_sum = 0.0f; last_gain = st_ivas->hDirAC->hParamIsm->last_dmx_gain; +#ifdef FIX_XXX_PARAMISM_JBM_ENER_CORRECTION + fade_len = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + output_frame = nCldfbSlots * hSpatParamRendCom->num_freq_bands; +#else output_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); #endif #endif @@ -1279,7 +1281,6 @@ void ivas_param_ism_dec_digest_tc( ivas_ism_param_dec_tc_gain_ajust( st_ivas, nCldfbSlots * hSpatParamRendCom->num_freq_bands, (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( 2 * FRAMES_PER_SEC ) ), transport_channels_f ); } #else -#ifdef FIX_549_DMX_GAIN /* Energy Compensation */ for ( i = 0; i < output_frame; i++ ) { @@ -1293,7 +1294,11 @@ void ivas_param_ism_dec_digest_tc( gain = 0.75f * gain + 0.25f * last_gain; /* 10ms ramp */ grad = ( gain - last_gain ) * 2.0f / (float) output_frame; /* slope between two consecutive gains, 480 samples length */ - for ( i = 0; i < ( output_frame / 2 ); i++ ) +#ifdef FIX_XXX_PARAMISM_JBM_ENER_CORRECTION + for ( i = 0; i < fade_len; i++ ) +#else + for ( i = 0; i < output_frame / 2; i++ ) +#endif { transport_channels_f[0][i] *= ( last_gain + i * grad ); transport_channels_f[1][i] *= ( last_gain + i * grad ); @@ -1313,7 +1318,6 @@ void ivas_param_ism_dec_digest_tc( } } st_ivas->hDirAC->hParamIsm->last_dmx_gain = gain; -#endif /* FIX_549_DMX_GAIN */ #endif /* API_5MS */ for ( ch = 0; ch < nchan_transport; ch++ ) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 50a10e9252..2ad189ae0f 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -544,7 +544,11 @@ ivas_error ivas_jbm_dec_tc( * Write IVAS transport channels *----------------------------------------------------------------*/ #ifdef API_5MS - if ( st_ivas->hDecoderConfig->Opt_tsm == 1 ) + if ( st_ivas->hDecoderConfig->Opt_tsm == 1 +#ifdef API_5MS_BASELINE + || !st_ivas->hDecoderConfig->Opt_5ms +#endif + ) { #endif ivas_syn_output_f( p_output, output_frame, st_ivas->hTcBuffer->nchan_transport_jbm, data ); @@ -620,7 +624,11 @@ ivas_error ivas_jbm_dec_feed_tc_to_renderer( p_data_f[n] = &data_f[n][0]; } #ifdef API_5MS - if ( st_ivas->hDecoderConfig->Opt_tsm ) + if ( st_ivas->hDecoderConfig->Opt_tsm +#ifdef API_5MS_BASELINE + || !st_ivas->hDecoderConfig->Opt_5ms +#endif + ) { #endif ivas_jbm_dec_copy_tc( st_ivas, nSamplesForRendering, nSamplesResidual, data, p_data_f ); diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index e0ccbf42ef..8af4a86321 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -664,15 +664,15 @@ ivas_error ivas_masa_dec_open( st_ivas->hMasa = hMasa; /* allocate transport channels*/ + if ( #ifdef API_5MS #ifdef API_5MS_BASELINE - if ( st_ivas->hDecoderConfig->Opt_5ms && st_ivas->hTcBuffer == NULL && st_ivas->renderer_type != RENDERER_DISABLE && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) -#else - if ( st_ivas->hTcBuffer == NULL && st_ivas->renderer_type != RENDERER_DISABLE && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) + st_ivas->hDecoderConfig->Opt_5ms && #endif #else - if ( st_ivas->hDecoderConfig->voip_active == 1 && st_ivas->hTcBuffer == NULL && st_ivas->renderer_type != RENDERER_DISABLE && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) + st_ivas->hDecoderConfig->voip_active == 1 && #endif + st_ivas->hTcBuffer == NULL && st_ivas->renderer_type != RENDERER_DISABLE && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) { int16_t nchan_to_allocate; TC_BUFFER_MODE buffer_mode; @@ -1495,12 +1495,12 @@ ivas_error ivas_masa_dec_reconfigure( } #endif +#ifdef API_5MS #ifdef API_5MS_BASELINE -#ifndef API_5MS - if ( st_ivas->hDecoderConfig->voip_active == 1 ) -#else if ( st_ivas->hDecoderConfig->Opt_5ms == 1 ) #endif +#else + if ( st_ivas->hDecoderConfig->voip_active == 1 ) #endif { int16_t tc_nchan_to_allocate; diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index 5c17722c9c..f05363aa82 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -459,15 +459,15 @@ ivas_error ivas_param_mc_dec_open( ivas_param_mc_dec_init( hParamMC, nchan_transport, nchan_out_cov ); + if ( #ifdef API_5MS #ifdef API_5MS_BASELINE - if ( st_ivas->hDecoderConfig->Opt_5ms && hParamMC->synthesis_conf != PARAM_MC_SYNTH_MONO_STEREO ) -#else - if ( hParamMC->synthesis_conf != PARAM_MC_SYNTH_MONO_STEREO ) + st_ivas->hDecoderConfig->Opt_5ms && #endif #else - if ( st_ivas->hDecoderConfig->voip_active && hParamMC->synthesis_conf != PARAM_MC_SYNTH_MONO_STEREO ) + st_ivas->hDecoderConfig->voip_active && #endif + hParamMC->synthesis_conf != PARAM_MC_SYNTH_MONO_STEREO ) { #ifdef API_5MS int16_t n_cldfb_slots; diff --git a/lib_dec/ivas_mc_paramupmix_dec.c b/lib_dec/ivas_mc_paramupmix_dec.c index 885e31e239..02afc8df46 100644 --- a/lib_dec/ivas_mc_paramupmix_dec.c +++ b/lib_dec/ivas_mc_paramupmix_dec.c @@ -492,14 +492,14 @@ ivas_error ivas_mc_paramupmix_dec_open( hMCParamUpmix->free_param_interpolator = 0; hMCParamUpmix->param_interpolator = NULL; if ( -#ifdef API_5MS_BASELINE #ifdef API_5MS - st_ivas->hDecoderConfig->Opt_5ms == 1 -#else - st_ivas->hDecoderConfig->voip_active == 1 +#ifdef API_5MS_BASELINE + st_ivas->hDecoderConfig->Opt_5ms == 1 && #endif +#else + st_ivas->hDecoderConfig->voip_active == 1 && #endif - && st_ivas->hTcBuffer == NULL ) + st_ivas->hTcBuffer == NULL ) { int16_t nchan_to_allocate; int16_t nchan_tc; diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index 3ad99838bd..6ca7434d4e 100755 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -1277,12 +1277,12 @@ static ivas_error ivas_mc_dec_reconfig( /*-----------------------------------------------------------------* * Reconfigure TC buffer *-----------------------------------------------------------------*/ +#ifdef API_5MS #ifdef API_5MS_BASELINE -#ifndef API_5MS - if ( st_ivas->hDecoderConfig->voip_active == 1 ) -#else if ( st_ivas->hDecoderConfig->Opt_5ms == 1 ) #endif +#else + if ( st_ivas->hDecoderConfig->voip_active == 1 ) #endif { int16_t tc_nchan_full_new; diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index adeb4d8900..4f941c2051 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -359,12 +359,12 @@ ivas_error ivas_sba_dec_reconfigure( /*-----------------------------------------------------------------* * JBM TC buffer *-----------------------------------------------------------------*/ +#ifdef API_5MS #ifdef API_5MS_BASELINE -#ifndef API_5MS - if ( st_ivas->hDecoderConfig->voip_active == 1 ) -#else if ( st_ivas->hDecoderConfig->Opt_5ms == 1 ) #endif +#else + if ( st_ivas->hDecoderConfig->voip_active == 1 ) #endif { int16_t tc_nchan_to_allocate; diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index 1aaf85de3e..e82601b2e9 100755 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -218,15 +218,15 @@ ivas_error ivas_spar_dec_open( } /* allocate transport channels*/ + if ( #ifdef API_5MS #ifdef API_5MS_BASELINE - if ( st_ivas->hDecoderConfig->Opt_5ms && st_ivas->hTcBuffer == NULL ) -#else - if ( st_ivas->hTcBuffer == NULL ) + st_ivas->hDecoderConfig->Opt_5ms && #endif #else - if ( st_ivas->hDecoderConfig->voip_active == 1 && st_ivas->hTcBuffer == NULL ) + st_ivas->hDecoderConfig->voip_active == 1 && #endif + st_ivas->hTcBuffer == NULL ) { int16_t nchan_to_allocate; int16_t nchan_tc; diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index b411343125..8738fdd0f3 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -336,15 +336,15 @@ ivas_error ivas_dirac_dec_init_binaural_data( #endif /* allocate transport channels*/ + if ( #ifdef API_5MS #ifdef API_5MS_BASELINE - if ( st_ivas->hDecoderConfig->Opt_5ms && st_ivas->hTcBuffer == NULL ) -#else - if ( st_ivas->hTcBuffer == NULL ) + st_ivas->hDecoderConfig->Opt_5ms && #endif #else - if ( st_ivas->hDecoderConfig->voip_active == 1 && st_ivas->hTcBuffer == NULL ) + st_ivas->hDecoderConfig->voip_active == 1 && #endif + st_ivas->hTcBuffer == NULL ) { int16_t nchan_to_allocate; -- GitLab From cfdf2d186643f88a9b78c28aed41101b693199dd Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Fri, 4 Aug 2023 10:17:42 +0200 Subject: [PATCH 094/175] clang-format --- lib_rend/ivas_dirac_dec_binaural_functions.c | 4 ++-- .../GENERATE_TABLES.m | 1 + scripts/tools/Darwin/wmc_tool | Bin 502293 -> 281653 bytes 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/GENERATE_TABLES.m diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index 616626c777..453414cb66 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -339,12 +339,12 @@ ivas_error ivas_dirac_dec_init_binaural_data( if ( #ifdef API_5MS #ifdef API_5MS_BASELINE - st_ivas->hDecoderConfig->Opt_5ms && + st_ivas->hDecoderConfig->Opt_5ms && #endif #else st_ivas->hDecoderConfig->voip_active == 1 && #endif - st_ivas->hTcBuffer == NULL ) + st_ivas->hTcBuffer == NULL ) { int16_t nchan_to_allocate; diff --git a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/GENERATE_TABLES.m b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/GENERATE_TABLES.m new file mode 100644 index 0000000000..4925c3549d --- /dev/null +++ b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/GENERATE_TABLES.m @@ -0,0 +1 @@ +convert_SD2SHD_HRIRs("/Users/tmu/mambaforge/envs/hrir_scripts/bin/python", "../HRIRs_sofa", "HRIR_128_Meth5_IRC_53_Q10_symL_Itrp1_48000.sofa", 128); \ No newline at end of file diff --git a/scripts/tools/Darwin/wmc_tool b/scripts/tools/Darwin/wmc_tool index 1393aaa77f752e4595dfb5898a5a0b8a3e010ede..526cf8ef01ecf91af6ef2aaadcb8b3859078e5be 100755 GIT binary patch literal 281653 zcmX^A>+L@t1_nk31_lNu1_lOU1_lNVHU@^)21Sq%gCqk3g9ifxLwtOIqq}RAYmh%! z7=-|9MiIf}fXvZg0+|!y8WDmj57ytnj4BA_vobI+fG`_WHa@;2wW0*d0lN#;JPt#M zXFgg4U}0#0v%&g{OG=Z9;X?88sOJ5c%?J*hFHl23d?*vFhXZOJ510q? zUwU$Kd}>8;-X_vI(Y#$$Hg(kG2YqVFBpCGO*fMU#WLp9H#3F5v7kYHl~@sZ7g z8Uv?L{RtOlU^oCV2j(vjA1sT-pCIx0_>{zwL=X#tM)6d4$} z85kG>AVxCmW?%qga|Q;6PYetUwoq|w)D3wShIT9xd<+Z>3JeSkp!}|1T3n=`lbNKS zQkjziRV&TFzyNZ`M&a^=m;LrjCoi*7n7YvTnGsYU#812o42-;BKZ3)K(S%uxfq?gS#asGbveHThCB0r7|Zo3G7Y_Wc3W{ z80v#7i%U{-^_-wuz*eb2-Lrw4g~5W6fk6|>2Zb+4fh?4-;LO4x$_Ww~#iJoG8Umvs zFd71*Aut*OqaiRF0;3@?8UmvsFd71*Aut*OqaiRF0;3@?8UmvsFd71*Aut*OqaiRF z0;3@?8UmvsFd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7^vgOVNpcW*yuifbM)g&j{D Date: Fri, 4 Aug 2023 10:40:39 +0200 Subject: [PATCH 095/175] [fix] delay compensation in renderer --- apps/renderer.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index 175019e7bd..d21daa623b 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -2023,12 +2023,28 @@ int main( if ( audioWriter != NULL ) { #endif - memset( outInt16Buffer, 0, zeroPad * outBuffer.config.numChannels * sizeof( int16_t ) ); - if ( ( error = AudioFileWriter_write( audioWriter, outInt16Buffer, zeroPad * outBuffer.config.numChannels ) ) != IVAS_ERR_OK ) +#ifdef API_5MS + int16_t zerosPadded = 0; + zeroPad *= outBuffer.config.numChannels; + while ( zeroPad > 0 ) { - fprintf( stderr, "\nOutput audio file writer error\n" ); - exit( -1 ); + zerosPadded = min( zeroPad, outBufferSize ); + memset( outInt16Buffer, 0, zerosPadded * sizeof( int16_t ) ); + if ( ( error = AudioFileWriter_write( audioWriter, outInt16Buffer, zerosPadded ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nOutput audio file writer error\n" ); + exit( -1 ); + } + zeroPad -= zerosPadded; } +#else + memset( outInt16Buffer, 0, zeroPad * outBuffer.config.numChannels * sizeof( int16_t ) ); + if ( ( error = AudioFileWriter_write( audioWriter, outInt16Buffer, zeroPad * outBuffer.config.numChannels ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nOutput audio file writer error\n" ); + exit( -1 ); + } +#endif #ifdef SPLIT_REND_WITH_HEAD_ROT } #endif -- GitLab From cedae63b77efc03dd893e914e33ed99430217507 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Fri, 4 Aug 2023 10:41:50 +0200 Subject: [PATCH 096/175] fix compilation with API_5MS deactivated, really fix ParamISM energy correction with TSM --- lib_dec/ivas_ism_param_dec.c | 5 +++-- lib_rend/lib_rend.c | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 290ff6ded6..c865709507 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -1180,7 +1180,7 @@ void ivas_param_ism_dec_digest_tc( ene_sum = 0.0f; last_gain = st_ivas->hDirAC->hParamIsm->last_dmx_gain; #ifdef FIX_XXX_PARAMISM_JBM_ENER_CORRECTION - fade_len = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + fade_len = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( 2 * FRAMES_PER_SEC ) ); output_frame = nCldfbSlots * hSpatParamRendCom->num_freq_bands; #else output_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); @@ -1293,10 +1293,11 @@ void ivas_param_ism_dec_digest_tc( /* Smoothing */ gain = 0.75f * gain + 0.25f * last_gain; /* 10ms ramp */ - grad = ( gain - last_gain ) * 2.0f / (float) output_frame; /* slope between two consecutive gains, 480 samples length */ #ifdef FIX_XXX_PARAMISM_JBM_ENER_CORRECTION + grad = ( gain - last_gain ) / (float) fade_len; /* slope between two consecutive gains, 480 samples length */ for ( i = 0; i < fade_len; i++ ) #else + grad = ( gain - last_gain ) * 2.0f / (float) output_frame; /* slope between two consecutive gains, 480 samples length */ for ( i = 0; i < output_frame / 2; i++ ) #endif { diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 48c6569547..ec8652c931 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -6398,6 +6398,7 @@ static ivas_error renderIsmToSplitBinaural( IVAS_QUATERNION originalHeadRot; #else IVAS_QUATERNION originalHeadRot[MAX_PARAM_SPATIAL_SUBFRAMES]; + int16_t i; #endif float tmpBinaural[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][L_FRAME48k]; int16_t output_frame = ismInput->base.inputBuffer.config.numSamplesPerChannel; -- GitLab From be46eaff74b43dc1fad36737fb4d1b0401cc88d5 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Fri, 4 Aug 2023 11:03:54 +0200 Subject: [PATCH 097/175] Revert "clang-format" This reverts commit cfdf2d186643f88a9b78c28aed41101b693199dd. --- .../GENERATE_TABLES.m | 1 - scripts/tools/Darwin/wmc_tool | Bin 281653 -> 502293 bytes 2 files changed, 1 deletion(-) delete mode 100644 scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/GENERATE_TABLES.m diff --git a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/GENERATE_TABLES.m b/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/GENERATE_TABLES.m deleted file mode 100644 index 4925c3549d..0000000000 --- a/scripts/binauralRenderer_interface/matlab_hrir_generation_scripts/GENERATE_TABLES.m +++ /dev/null @@ -1 +0,0 @@ -convert_SD2SHD_HRIRs("/Users/tmu/mambaforge/envs/hrir_scripts/bin/python", "../HRIRs_sofa", "HRIR_128_Meth5_IRC_53_Q10_symL_Itrp1_48000.sofa", 128); \ No newline at end of file diff --git a/scripts/tools/Darwin/wmc_tool b/scripts/tools/Darwin/wmc_tool index 526cf8ef01ecf91af6ef2aaadcb8b3859078e5be..1393aaa77f752e4595dfb5898a5a0b8a3e010ede 100755 GIT binary patch literal 502293 zcmX^0Z`VEs1_mZZ1_pKp1_ovZ1_uTP<`q8}7#R2%85npNK!61#vq}^s2I7w5(GVC7 zfzc2c4S~@R7!85Z5Eu=C(GVC7fzc2c4S~@R7!85Z5Eu=C(GVC7fzc2c4S~@R7!85Z z5Eu=C(GVC7fzc2c4S~@R7!85Z5Eu=C(GVC7fzc2c4S~@R7!85Z5Eu=C(GVC7fzc2c z4S~@R7!85Z5Eu=C(GVC7fzc2c4S~@R7!85Z5Eu=C(GVC7fzc2c4S~@R7!3jHhQRq> zZ~w6~FfcNM4gp|bU=UB)4BQ>WWwFqoJs{0mff|%#P1knKELzxf(sCf_$D7?~>ljBn>l2Z#x;!6^f(B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W!^pK8#`YzT(djmxb8Ny+0K{?wdP(`B9?;8T&V9=lm9Y)_S>Wa!_|x z{O>grPZ`Ka-c4KV!n*PKf|S#;-p_Ad*00hx+;n>WABCKYUguc_zja=|mGNFbP$zBf z_Bl^}2%gK%@ZA)xRN|J)!>Gv95#jRoK*KHWKW*V_v?ooe4~;aq7F`z7rEF|<@to{c z?bU(4EO$>Czba>wYtP}63GSYK<3-jCPRYg^Zx)NorkgIiAHV+U;b+~>uS$&!pCmW; zDF1Z)|6tQx{zrk5TW(#N;&*D2@>jjQpKE&_1#xRJ?$X$-9AKrdzG{)&{acAL?LX!} zDsi2A`Tu60dyB7Wy9jNm@pv-n+r@cYC$4n~1Zy4cP%HWG@yz!9hSGip?e7buc*7r5 zPrQ~p>7GCjyWV4&1l|;t2#06i?g$)wu)?HHiBSDUseGi}FMal?>?u6_A6CDrTeplO zguQIqozvW=MTQGDWQrA0YCa+T+cWPqiOmd;&|34{$NBvYPW9j;VQJQ@rbbS*3Y%2? zsq;ZRSAosZQ+rnUFVPp+ Date: Fri, 4 Aug 2023 17:11:51 +0200 Subject: [PATCH 098/175] Fix split rendering with 5ms framing (WIP) --- apps/decoder.c | 2 +- apps/renderer.c | 68 ++++++++-- lib_dec/lib_dec.c | 111 +++++++++-------- lib_dec/lib_dec.h | 4 +- lib_rend/ivas_prot_rend.h | 15 ++- lib_rend/ivas_rotation.c | 1 + lib_rend/ivas_splitRendererPost.c | 100 +++++++++++++-- lib_rend/ivas_splitRendererPre.c | 3 + lib_rend/lib_rend.c | 201 ++++++++++++++++++++++++++---- lib_rend/lib_rend.h | 19 +++ 10 files changed, 424 insertions(+), 100 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index ac91847d4a..82d2937614 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -2130,7 +2130,7 @@ static ivas_error decodeG192( #ifdef SPLIT_REND_WITH_HEAD_ROT if ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED || arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) { - error = IVAS_DEC_GetSplitBinaural( hIvasDec, &splitRendBits, &nSamplesRendered_loop, &needNewFrame ); + error = IVAS_DEC_GetSplitBinauralBitstream( hIvasDec, &splitRendBits, &nSamplesRendered_loop, &needNewFrame ); nSamplesRendered += nSamplesRendered_loop; nSamplesToRender -= nSamplesRendered_loop; if ( error != IVAS_ERR_OK ) diff --git a/apps/renderer.c b/apps/renderer.c index d21daa623b..f28dc9dcf1 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -804,6 +804,9 @@ int main( #ifndef API_5MS IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; #endif +#ifdef API_5MS + bool splitBinNeedsNewFrame = true; +#endif #ifdef WMOPS reset_wmops(); @@ -1474,7 +1477,11 @@ int main( #ifdef SPLIT_REND_WITH_HEAD_ROT numSamplesRead = 0; - if ( ( hSplitRendFileReadWrite != NULL ) && is_split_post_rend_mode( &args ) ) + if ( ( hSplitRendFileReadWrite != NULL ) && is_split_post_rend_mode( &args ) +#ifdef API_5MS + && splitBinNeedsNewFrame +#endif + ) { ivas_error error_tmp; numSamplesRead = (int16_t) inBufferSize; @@ -1506,7 +1513,11 @@ int main( } #endif - if ( numSamplesRead == 0 ) + if ( numSamplesRead == 0 +#ifdef API_5MS + && splitBinNeedsNewFrame /* TODO(sgi): clean up */ +#endif + ) { /* end of input data */ break; @@ -1645,7 +1656,11 @@ int main( #ifdef SPLIT_REND_WITH_HEAD_ROT /* Read from split renderer bfi file if specified */ - if ( splitRendBFIReader != NULL ) + if ( splitRendBFIReader != NULL +#ifdef API_5MS + && splitBinNeedsNewFrame +#endif + ) { int16_t bfi; SplitRendBFIFileReading( splitRendBFIReader, &bfi ); @@ -1821,6 +1836,16 @@ int main( #ifdef SPLIT_REND_WITH_HEAD_ROT for ( i = 0; i < args.inConfig.numBinBuses; ++i ) { +#ifdef API_5MS + if ( splitBinNeedsNewFrame ) + { + if ( ( error = IVAS_REND_FeedSplitBinauralBitstream( hIvasRend, splitBinIds[i], &bitsBuffer ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + } +#else if ( ( error = IVAS_REND_GetInputNumChannels( hIvasRend, splitBinIds[i], &numChannels ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); @@ -1833,23 +1858,50 @@ int main( fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } +#endif } #endif - if ( ( error = IVAS_REND_GetSamples( hIvasRend, outBuffer +#ifdef API_5MS + if ( args.inConfig.numBinBuses != 0 ) + { + if ( ( error = IVAS_REND_GetSplitBinauralSamples( hIvasRend, outBuffer, &splitBinNeedsNewFrame ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + } + else if ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || + args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) + { + if ( ( error = IVAS_REND_GetSplitBinauralBitstream( hIvasRend, &bitsBuffer ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + } + else + { +#endif + if ( ( error = IVAS_REND_GetSamples( hIvasRend, outBuffer +#ifndef API_5MS #ifdef SPLIT_REND_WITH_HEAD_ROT - , - &bitsBuffer + , + &bitsBuffer #endif - ) ) != IVAS_ERR_OK ) - { +#endif + ) ) != IVAS_ERR_OK ) + { #ifdef SPLIT_REND_WITH_HEAD_ROT fprintf( stderr, "Error %s\n", ivas_error_to_string( error ) ); #else fprintf( stderr, "Error in getting samples\n" ); #endif exit( -1 ); + } +#ifdef API_5MS } +#endif int16_t num_out_channels; num_out_channels = outBuffer.config.numChannels; diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index e1ddf402a4..7c7bdb1a85 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1116,7 +1116,7 @@ ivas_error IVAS_DEC_GetSamples( #endif #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT -ivas_error IVAS_DEC_GetSplitBinaural( +ivas_error IVAS_DEC_GetSplitBinauralBitstream( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode*/ int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ @@ -1131,6 +1131,11 @@ ivas_error IVAS_DEC_GetSplitBinaural( int16_t numSamplesPerChannel; int16_t i, j; ivas_error error; + IVAS_DEC_SPLIT_REND_WRAPPER *hSplitBinRend; + int16_t max_band; + int16_t pcm_out; + int16_t td_input; + int16_t numPoses; error = IVAS_ERR_OK; st_ivas = hIvasDec->st_ivas; @@ -1143,69 +1148,65 @@ ivas_error IVAS_DEC_GetSplitBinaural( return IVAS_ERR_WRONG_PARAMS; } - *nOutSamples = 0; *needNewFrame = FALSE; - - while ( error == IVAS_ERR_OK && !*needNewFrame /*TODO(jbm): && numOutSamples < numAskedSamples */ ) + hSplitBinRend = &st_ivas->splitBinRend; + ivas_set_split_rend_setup( hSplitBinRend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hCombinedOrientationData, hSplitRendBits ); + + /* Decode and render */ + error = IVAS_DEC_GetSamples( + hIvasDec, + numSamplesPerChannel, + output_int, + nOutSamples, + needNewFrame ); + if ( error != IVAS_ERR_OK ) { - int16_t nOutSamplesLocal; - IVAS_DEC_SPLIT_REND_WRAPPER *hSplitBinRend; - int16_t max_band; - int16_t pcm_out; - int16_t td_input; - int16_t numPoses; - - hSplitBinRend = &st_ivas->splitBinRend; - - ivas_set_split_rend_setup( hSplitBinRend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hCombinedOrientationData, hSplitRendBits ); - - /* Decode and render */ - error = IVAS_DEC_GetSamples( - hIvasDec, - numSamplesPerChannel, - output_int, - &nOutSamplesLocal, - needNewFrame ); - if ( error != IVAS_ERR_OK ) - { - return error; - } - - *nOutSamples += nOutSamplesLocal; + return error; + } + assert( numSamplesPerChannel == *nOutSamples ); +#ifdef DEBUGGING + dbgwrite(output_int, sizeof(int16_t), 960 * 2, 1, "res/output_int.raw"); +#endif - numPoses = hSplitBinRend->splitrend.multiBinPoseData.num_poses; + numPoses = hSplitBinRend->splitrend.multiBinPoseData.num_poses; - /* [tmp] convert int back to float and change buffer layout */ - for ( i = 0; i < nOutSamplesLocal; ++i ) + /* [tmp] convert int back to float and change buffer layout */ + for ( i = 0; i < *nOutSamples; ++i ) + { +#ifdef DEBUGGING + for ( j = 0; j < BINAURAL_CHANNELS * numPoses; ++j ) { - for ( j = 0; j < BINAURAL_CHANNELS * numPoses; ++j ) - { - output[j][i] = (float) output_int[i * BINAURAL_CHANNELS * numPoses + j]; - } + output[j][i] = 0; } - - max_band = (int16_t) ( ( BINAURAL_MAXBANDS * output_Fs ) / 48000 ); - pcm_out = ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0; - td_input = st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC; - - /* TODO(jbm): need to wait 20ms before writing split bitstream in 5ms mode */ - error = ivas_renderMultiBinToSplitBinaural( &hSplitBinRend->splitrend, - st_ivas->hHeadTrackData->Quaternion, - st_ivas->hRenderConfig->split_rend_config.splitRendBitRate, - st_ivas->hRenderConfig->split_rend_config.codec, - hSplitBinRend->hSplitRendBits, - hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural, - hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural, - max_band, output, 1, - td_input, - pcm_out ); - if ( error != IVAS_ERR_OK ) +#endif + for ( j = 0; j < BINAURAL_CHANNELS /* * numPoses */; ++j ) { - return error; + output[j][i] = (float) output_int[i * BINAURAL_CHANNELS /* * numPoses */ + j]; } - - free( st_ivas->splitBinRend.hMultiBinCldfbData ); } +#ifdef DEBUGGING + dbgwrite(output[0], sizeof(float), 960, 1, "res/output.raw"); +#endif + max_band = (int16_t) ( ( BINAURAL_MAXBANDS * output_Fs ) / 48000 ); + pcm_out = ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0; + td_input = st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC; + + error = ivas_renderMultiBinToSplitBinaural( &hSplitBinRend->splitrend, + st_ivas->hHeadTrackData->Quaternion, + st_ivas->hRenderConfig->split_rend_config.splitRendBitRate, + st_ivas->hRenderConfig->split_rend_config.codec, + hSplitBinRend->hSplitRendBits, + hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural, + hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural, + max_band, output, 1, + td_input, + pcm_out ); + if ( error != IVAS_ERR_OK ) + { + return error; + } + + free( st_ivas->splitBinRend.hMultiBinCldfbData ); return error; } diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index ec3dbb0a0c..3aa1f89236 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -201,10 +201,10 @@ ivas_error IVAS_DEC_GetSamples( ); #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT -ivas_error IVAS_DEC_GetSplitBinaural( +ivas_error IVAS_DEC_GetSplitBinauralBitstream( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode*/ - int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ + int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ /* TODO(sgi): might not be necessary - revisit */ bool *needNewFrame /* indication that the decoder needs a new frame */ ); #endif diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 60b592cdf5..1cccabf7a3 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -1536,9 +1536,15 @@ void ivas_rend_CldfbSplitPreRendProcess( void ivas_rend_CldfbSplitPostRendProcess( BIN_HR_SPLIT_POST_REND_HANDLE hBinHrSplitPostRend, MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, +#ifdef API_5MS + const IVAS_QUATERNION QuaternionPost, + float Cldfb_RealBuffer_Binaural[][CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], + float Cldfb_ImagBuffer_Binaural[][CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], +#else const IVAS_QUATERNION QuaternionsPost[MAX_PARAM_SPATIAL_SUBFRAMES], float Cldfb_RealBuffer_Binaural[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], float Cldfb_ImagBuffer_Binaural[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], +#endif float output[][L_FRAME48k], const int16_t is_cldfb_in ); @@ -1604,9 +1610,16 @@ void ivas_SplitRenderer_GetRotMd( void ivas_SplitRenderer_PostRenderer( BIN_HR_SPLIT_POST_REND_HANDLE hBinPostRenderer, /* i/o: binaural renderer handle */ MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, +#ifdef API_5MS + float Cldfb_RealBuffer_Ref_Binaural[][CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i/o : Reference/out Binaural signals */ + float Cldfb_ImagBuffer_Ref_Binaural[][CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i/o : Reference/out Binaural signals */ + const IVAS_QUATERNION Quaternion_act +#else float Cldfb_RealBuffer_Ref_Binaural[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i/o : Reference/out Binaural signals */ float Cldfb_ImagBuffer_Ref_Binaural[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i/o : Reference/out Binaural signals */ - const IVAS_QUATERNION Quaternions_act[MAX_PARAM_SPATIAL_SUBFRAMES]); + const IVAS_QUATERNION Quaternions_act[MAX_PARAM_SPATIAL_SUBFRAMES] +#endif + ); #endif /* SPLIT_REND_WITH_HEAD_ROT */ /*----------------------------------------------------------------------------------* diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 75a6ce4bbf..53a1d501e8 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -962,6 +962,7 @@ ivas_error ivas_combined_orientation_open( ( *hCombinedOrientationData )->Rmat_prev[pos_idx][j][j] = 1.0f; } } + (*hCombinedOrientationData)->sr_pose_pred_axis = DEFAULT_AXIS; #else for ( j = 0; j < 3; j++ ) { diff --git a/lib_rend/ivas_splitRendererPost.c b/lib_rend/ivas_splitRendererPost.c index 1adf977496..4e8a1aa168 100644 --- a/lib_rend/ivas_splitRendererPost.c +++ b/lib_rend/ivas_splitRendererPost.c @@ -1483,12 +1483,22 @@ static void interpolate_rend_md( void ivas_SplitRenderer_PostRenderer( BIN_HR_SPLIT_POST_REND_HANDLE hBinPostRenderer, /* i/o: binaural renderer handle */ MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, +#ifdef API_5MS + float Cldfb_RealBuffer_Ref_Binaural[][CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i/o : Reference/out Binaural signals */ + float Cldfb_ImagBuffer_Ref_Binaural[][CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i/o : Reference/out Binaural signals */ + const IVAS_QUATERNION Quaternion_act +#else float Cldfb_RealBuffer_Ref_Binaural[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i/o : Reference/out Binaural signals */ float Cldfb_ImagBuffer_Ref_Binaural[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i/o : Reference/out Binaural signals */ - const IVAS_QUATERNION Quaternions_act[MAX_PARAM_SPATIAL_SUBFRAMES] ) + const IVAS_QUATERNION Quaternions_act[MAX_PARAM_SPATIAL_SUBFRAMES] +#endif +) { int16_t pos_idx, b, brange[2], ch_idx1; - int16_t num_md_bands, slot_idx, b2, sf_idx, index_slot, num_subframes, num_slots, sf_idx_md; + int16_t num_md_bands, slot_idx, b2, index_slot, num_slots, sf_idx_md; +#ifndef API_5MS + int16_t sf_idx, num_subframes; +#endif float pred_out_re[BINAURAL_CHANNELS], pred_out_im[BINAURAL_CHANNELS], tmp_re, tmp_im, gd_int; #ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG BIN_HR_SPLIT_REND_MD rot_md_act[MAX_HEAD_ROT_POSES][MAX_SPLIT_REND_MD_BANDS]; @@ -1512,20 +1522,32 @@ void ivas_SplitRenderer_PostRenderer( push_wmops( "ivas_SplitRenderer_PostRenderer" ); - num_subframes = MAX_PARAM_SPATIAL_SUBFRAMES; num_slots = MAX_PARAM_SPATIAL_SUBFRAMES; +#ifndef API_5MS + num_subframes = MAX_PARAM_SPATIAL_SUBFRAMES; for ( sf_idx = 0; sf_idx < num_subframes; sf_idx++ ) { +#endif #ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG pos_idx = MAX_HEAD_ROT_POSES - 1; #else pos_idx = 0; #endif +#ifdef API_5MS + /* TODO FhG2Dolby: needs verificatiion with 5ms framing */ + sf_idx_md = 0; +#else sf_idx_md = ( hBinPostRenderer->low_Res == 0 ) ? sf_idx : 0; +#endif + get_interpolation_vars( pMultiBinPoseData, &hBinPostRenderer->QuaternionsPre[sf_idx_md], +#ifdef API_5MS + &Quaternion_act, +#else &Quaternions_act[sf_idx], +#endif interp_yaw_pose_idx, interp_pitch_pose_idx, interp_roll_pose_idx, @@ -1601,7 +1623,11 @@ void ivas_SplitRenderer_PostRenderer( { for ( slot_idx = 0; slot_idx < num_slots; slot_idx++ ) { +#ifdef API_5MS + index_slot = slot_idx; /* TODO: can be cleaned up */ +#else index_slot = sf_idx * num_slots + slot_idx; +#endif fade = ( (float) slot_idx + 1.0f ) / MAX_PARAM_SPATIAL_SUBFRAMES; fade = min( fade, 1.0f ); for ( b = 0; b < num_md_bands; b++ ) @@ -1728,7 +1754,9 @@ void ivas_SplitRenderer_PostRenderer( } } #endif +#ifndef API_5MS } +#endif pop_wmops(); return; @@ -1737,18 +1765,33 @@ void ivas_SplitRenderer_PostRenderer( static void ivas_rend_CldfbSplitPostRendProcessTdIn( BIN_HR_SPLIT_POST_REND_HANDLE hBinHrSplitPostRend, MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, +#ifdef API_5MS + const IVAS_QUATERNION QuaternionPost, +#else const IVAS_QUATERNION QuaternionsPost[MAX_PARAM_SPATIAL_SUBFRAMES], +#endif float output[][L_FRAME48k] ) { int16_t ch_idx, slot_idx, num_cldfb_bands; +#ifdef API_5MS + float Cldfb_RealBuffer_Binaural[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; + float Cldfb_ImagBuffer_Binaural[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; +#else float Cldfb_RealBuffer_Binaural[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; float Cldfb_ImagBuffer_Binaural[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; +#endif num_cldfb_bands = hBinHrSplitPostRend->cldfbSyn[0]->no_channels; /* Implement CLDFB analysis */ for ( ch_idx = 0; ch_idx < BINAURAL_CHANNELS; ch_idx++ ) { - for ( slot_idx = 0; slot_idx < CLDFB_NO_COL_MAX; slot_idx++ ) + for ( slot_idx = 0; +#ifdef API_5MS + slot_idx < CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES; +#else + slot_idx < CLDFB_NO_COL_MAX; +#endif + slot_idx++ ) { cldfbAnalysis_ts( &( output[ch_idx][num_cldfb_bands * slot_idx] ), Cldfb_RealBuffer_Binaural[ch_idx][slot_idx], @@ -1763,21 +1806,43 @@ static void ivas_rend_CldfbSplitPostRendProcessTdIn( pMultiBinPoseData, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, - QuaternionsPost ); +#ifdef API_5MS + QuaternionPost +#else + QuaternionsPost +#endif + ); /* Implement CLDFB synthesis */ for ( ch_idx = 0; ch_idx < BINAURAL_CHANNELS; ch_idx++ ) { +#ifdef API_5MS + float *RealBuffer[CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES]; + float *ImagBuffer[CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES]; +#else float *RealBuffer[CLDFB_NO_COL_MAX]; float *ImagBuffer[CLDFB_NO_COL_MAX]; +#endif - for ( slot_idx = 0; slot_idx < CLDFB_NO_COL_MAX; slot_idx++ ) + for ( slot_idx = 0; +#ifdef API_5MS + slot_idx < CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES; +#else + slot_idx < CLDFB_NO_COL_MAX; +#endif + slot_idx++ ) { RealBuffer[slot_idx] = Cldfb_RealBuffer_Binaural[ch_idx][slot_idx]; ImagBuffer[slot_idx] = Cldfb_ImagBuffer_Binaural[ch_idx][slot_idx]; } - cldfbSynthesis( RealBuffer, ImagBuffer, &( output[ch_idx][0] ), num_cldfb_bands * CLDFB_NO_COL_MAX, hBinHrSplitPostRend->cldfbSyn[ch_idx] ); + cldfbSynthesis( RealBuffer, ImagBuffer, &( output[ch_idx][0] ), +#ifdef API_5MS + num_cldfb_bands * CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, +#else + num_cldfb_bands * CLDFB_NO_COL_MAX, +#endif + hBinHrSplitPostRend->cldfbSyn[ch_idx] ); } return; } @@ -1785,9 +1850,15 @@ static void ivas_rend_CldfbSplitPostRendProcessTdIn( void ivas_rend_CldfbSplitPostRendProcess( BIN_HR_SPLIT_POST_REND_HANDLE hBinHrSplitPostRend, MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, +#ifdef API_5MS + const IVAS_QUATERNION QuaternionPost, + float Cldfb_RealBuffer_Binaural[][CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], + float Cldfb_ImagBuffer_Binaural[][CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], +#else const IVAS_QUATERNION QuaternionsPost[MAX_PARAM_SPATIAL_SUBFRAMES], float Cldfb_RealBuffer_Binaural[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], float Cldfb_ImagBuffer_Binaural[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], +#endif float output[][L_FRAME48k], const int16_t is_cldfb_in ) { @@ -1799,7 +1870,13 @@ void ivas_rend_CldfbSplitPostRendProcess( if ( is_cldfb_in == 0 ) { - ivas_rend_CldfbSplitPostRendProcessTdIn( hBinHrSplitPostRend, pMultiBinPoseData, QuaternionsPost, output ); + ivas_rend_CldfbSplitPostRendProcessTdIn( hBinHrSplitPostRend, pMultiBinPoseData, +#ifdef API_5MS + QuaternionPost, +#else + QuaternionsPost, +#endif + output ); pop_wmops(); return; } @@ -1809,7 +1886,12 @@ void ivas_rend_CldfbSplitPostRendProcess( pMultiBinPoseData, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, - QuaternionsPost ); +#ifdef API_5MS + QuaternionPost +#else + QuaternionsPost +#endif + ); /* Implement CLDFB synthesis */ for ( ch_idx = 0; ch_idx < BINAURAL_CHANNELS; ch_idx++ ) diff --git a/lib_rend/ivas_splitRendererPre.c b/lib_rend/ivas_splitRendererPre.c index 7292ca5928..54aaa8283b 100644 --- a/lib_rend/ivas_splitRendererPre.c +++ b/lib_rend/ivas_splitRendererPre.c @@ -2093,6 +2093,9 @@ static ivas_error splitRendLc3plusEncodeAndWrite( ivas_split_rend_bitstream_write_int32( pBits, ivas_get_lc3plus_bitrate_id( SplitRendBitRate ), 8 ); /* Write bitstream */ +#ifdef DEBUGGING + dbgwrite(in[0], sizeof(float), 960, 1, "res/IVAS_LC3PLUS_ENC_Encode.raw"); +#endif if ( ( error = IVAS_LC3PLUS_ENC_Encode( hSplitBin->hLc3plusEnc, channel_ptrs, &pBits->bits_buf[pBits->bits_written / 8] ) ) != IVAS_ERR_OK ) { return error; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index ec8652c931..e40f17eb1a 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -221,6 +221,8 @@ typedef struct input_base base; SPLIT_POST_REND_WRAPPER splitPostRendWrapper; float *bufferData; + int16_t numCachedSamples; /* Number of decoded samples in bufferData that have not yet been played out */ + IVAS_REND_BitstreamBuffer *hBits; } input_split_post_rend; #endif @@ -2867,6 +2869,7 @@ static ivas_error setRendInputActiveSplitPostRend( } initRendInputBase( &inputSplitPostRend->base, inConfig, id, rendCtx, inputSplitPostRend->bufferData, MAX_BIN_BUFFER_LENGTH ); + inputSplitPostRend->numCachedSamples = 0; if ( ( error = updateSplitPostRendPanGains( inputSplitPostRend, outConfig, hRendCfg ) ) != IVAS_ERR_OK ) { @@ -5129,6 +5132,41 @@ int16_t IVAS_REND_FeedRenderConfig( return IVAS_ERR_OK; } +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT +/*-------------------------------------------------------------------* + * IVAS_REND_FeedSplitBinauralBitstream() + * + * + *-------------------------------------------------------------------*/ + +ivas_error IVAS_REND_FeedSplitBinauralBitstream( + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + const IVAS_REND_InputId inputId, /* i : ID of the input */ + IVAS_REND_BitstreamBuffer *hBits /* i : buffer for input bitstream */ +) +{ + ivas_error error; + input_base *inputBase; + input_split_post_rend* inputSplitPostRend; + + /* Validate function arguments */ + if ( hIvasRend == NULL || hBits == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + + if ( ( error = getInputById( hIvasRend, inputId, (void **) &inputBase ) ) != IVAS_ERR_OK ) + { + return error; + } + + inputSplitPostRend = (input_split_post_rend*) inputBase; + inputSplitPostRend->hBits = hBits; + + return IVAS_ERR_OK; +} +#endif + /*-------------------------------------------------------------------* * IVAS_REND_SetHeadRotation() @@ -7635,14 +7673,22 @@ static ivas_error splitBinLc3plusDecode( static ivas_error renderSplitBinauralWithPostRot( input_split_post_rend *splitBinInput, IVAS_REND_AudioBuffer outAudio, +#ifndef API_5MS IVAS_REND_BitstreamBuffer *hBits, +#endif const int16_t SplitRendBFI ) { float Cldfb_RealBuffer_Binaural[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; float Cldfb_ImagBuffer_Binaural[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; ivas_error error; +#ifdef API_5MS + IVAS_QUATERNION QuaternionPost; + float Cldfb_RealBuffer_Binaural_5ms[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; + float Cldfb_ImagBuffer_Binaural_5ms[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; +#else IVAS_QUATERNION QuaternionsPost[MAX_PARAM_SPATIAL_SUBFRAMES]; /* TODO(splitrend): remove subframes */ int16_t sf_idx; +#endif ivas_split_rend_bits_t bits; float tmpCrendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; COMBINED_ORIENTATION_HANDLE pCombinedOrientationData; @@ -7657,7 +7703,11 @@ static ivas_error renderSplitBinauralWithPostRot( pCombinedOrientationData = *splitBinInput->base.ctx.pCombinedOrientationData; hSplitBin = &splitBinInput->splitPostRendWrapper; +#ifdef API_5MS + convertBitsBufferToInternalBitsBuff( *splitBinInput->hBits, &bits ); +#else convertBitsBufferToInternalBitsBuff( *hBits, &bits ); +#endif if ( bits.codec == IVAS_SPLIT_REND_CODEC_LCLD && splitBinInput->splitPostRendWrapper.hSplitBinLCLDDec == NULL ) { @@ -7671,7 +7721,7 @@ static ivas_error renderSplitBinauralWithPostRot( { LC3PLUS_CONFIG config; config.lc3plus_frame_duration_us = 5000; - config.ivas_frame_duration_us = 20000; + config.ivas_frame_duration_us = 20000; /* TODO(sgi): this will be 20ms (non-0 DOF) or 5ms (0 DOF) depending on split rendering config */ config.channels = BINAURAL_CHANNELS; config.samplerate = *splitBinInput->base.ctx.pOutSampleRate; @@ -7686,14 +7736,14 @@ static ivas_error renderSplitBinauralWithPostRot( } } - for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) - { #ifdef API_5MS - QuaternionsPost[sf_idx] = pCombinedOrientationData->Quaternion; + QuaternionPost = pCombinedOrientationData->Quaternion; #else + for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) + { QuaternionsPost[sf_idx] = ivas_split_rend_get_sf_rot_data( pCombinedOrientationData->Quaternions, sf_idx ); -#endif } +#endif if ( !SplitRendBFI ) { @@ -7722,24 +7772,40 @@ static ivas_error renderSplitBinauralWithPostRot( /* decode audio */ if ( splitBinInput->base.inConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) - { - if ( bits.codec == IVAS_SPLIT_REND_CODEC_LCLD ) + { /* TODO(sgi): For both codecs: decode 20ms, cache last 15ms for the next 3 rendering calls */ + if (splitBinInput->numCachedSamples == 0) { - ivas_splitBinLCLDDecProcess( - hSplitBin->hSplitBinLCLDDec, - &bits, - Cldfb_RealBuffer_Binaural, - Cldfb_ImagBuffer_Binaural, - SplitRendBFI ); - isPostRendInputCldfb = 1; + if ( bits.codec == IVAS_SPLIT_REND_CODEC_LCLD ) + { + ivas_splitBinLCLDDecProcess( + hSplitBin->hSplitBinLCLDDec, + &bits, + Cldfb_RealBuffer_Binaural, + Cldfb_ImagBuffer_Binaural, + SplitRendBFI ); + isPostRendInputCldfb = 1; + } + else + { + error = splitBinLc3plusDecode( hSplitBin, &bits, tmpCrendBuffer, bits.pose_correction ); +#ifdef DEBUGGING + dbgwrite(tmpCrendBuffer[0], sizeof(float), 960, 1, "res/splitBinLc3plusDecode.raw"); +#endif + if ( error != IVAS_ERR_OK ) + { + return error; + } + splitBinInput->numCachedSamples = 720; + mvr2r(&tmpCrendBuffer[0][240], splitBinInput->bufferData, 720); + mvr2r(&tmpCrendBuffer[1][240], splitBinInput->bufferData + 720, 720); + } } else { - error = splitBinLc3plusDecode( hSplitBin, &bits, tmpCrendBuffer, bits.pose_correction ); - if ( error != IVAS_ERR_OK ) - { - return error; - } + int16_t tdToCldfbSampleFact = 1; /* TODO(sgi): */ + mvr2r(splitBinInput->bufferData + 720 - splitBinInput->numCachedSamples, tmpCrendBuffer[0], 240); + mvr2r(720 + splitBinInput->bufferData + 720 - splitBinInput->numCachedSamples, tmpCrendBuffer[1], 240); + splitBinInput->numCachedSamples -= 240; } } else @@ -7773,12 +7839,22 @@ static ivas_error renderSplitBinauralWithPostRot( } else if ( bits.pose_correction == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) { +#ifdef DEBUGGING + dbgwrite(tmpCrendBuffer[0], sizeof(float), 240, 1, "res/splitrend_dbg.raw"); +#endif + ivas_rend_CldfbSplitPostRendProcess( hSplitBin->hBinHrSplitPostRend, &hSplitBin->multiBinPoseData, +#ifdef API_5MS + QuaternionPost, + Cldfb_RealBuffer_Binaural_5ms, + Cldfb_ImagBuffer_Binaural_5ms, +#else QuaternionsPost, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, +#endif tmpCrendBuffer, isPostRendInputCldfb ); } @@ -7799,7 +7875,11 @@ static ivas_error renderSplitBinauralWithPostRot( } } +#ifdef API_5MS + convertInternalBitsBuffToBitsBuffer( splitBinInput->hBits, bits ); +#else convertInternalBitsBuffToBitsBuffer( hBits, bits ); +#endif accumulate2dArrayToBuffer( tmpCrendBuffer, &outAudio ); pop_wmops(); @@ -8247,18 +8327,22 @@ static ivas_error renderInputSplitBin( input_split_post_rend *splitBinInput, const IVAS_REND_AudioConfig outConfig, IVAS_REND_AudioBuffer outAudio, +#ifndef API_5MS IVAS_REND_BitstreamBuffer *hBits, +#endif const int16_t SplitRendBFI ) { ivas_error error; IVAS_REND_AudioBuffer inAudio; inAudio = splitBinInput->base.inputBuffer; +#ifndef API_5MS if ( splitBinInput->base.numNewSamplesPerChannel != outAudio.config.numSamplesPerChannel ) { /* Mismatch between the number of input samples vs number of requested output samples - currently not allowed */ return IVAS_ERR_INVALID_BUFFER_SIZE; } +#endif splitBinInput->base.numNewSamplesPerChannel = 0; @@ -8266,12 +8350,14 @@ static ivas_error renderInputSplitBin( v_multc( inAudio.data, splitBinInput->base.gain, inAudio.data, - inAudio.config.numSamplesPerChannel * inAudio.config.numChannels ); + inAudio.config.numSamplesPerChannel * inAudio.config.numChannels ); /* TODO: the output buffer is empty at this point, should be moved to a point after decoding the split bitstream */ switch ( outConfig ) { case IVAS_REND_AUDIO_CONFIG_BINAURAL: error = renderSplitBinauralWithPostRot( splitBinInput, outAudio, +#ifndef API_5MS hBits, +#endif SplitRendBFI ); break; default: @@ -8373,8 +8459,11 @@ static ivas_error renderInputSba( #ifdef SPLIT_REND_WITH_HEAD_ROT static ivas_error renderActiveInputsSplitBin( IVAS_REND_HANDLE hIvasRend, - IVAS_REND_AudioBuffer outAudio, - IVAS_REND_BitstreamBuffer *hBits ) + IVAS_REND_AudioBuffer outAudio +#ifndef API_5MS + ,IVAS_REND_BitstreamBuffer *hBits +#endif + ) { int16_t i; input_split_post_rend *pCurrentInput; @@ -8388,7 +8477,10 @@ static ivas_error renderActiveInputsSplitBin( continue; } - if ( ( error = renderInputSplitBin( pCurrentInput, hIvasRend->outputConfig, outAudio, hBits, + if ( ( error = renderInputSplitBin( pCurrentInput, hIvasRend->outputConfig, outAudio, +#ifndef API_5MS + hBits, +#endif hIvasRend->splitRendBFI ) ) != IVAS_ERR_OK ) { return error; @@ -8989,6 +9081,15 @@ ivas_error IVAS_REND_SetIsmMetadataDelay( } #endif +#ifdef API_5MS +/*-------------------------------------------------------------------* + * getSamplesInternal() + * + * + *-------------------------------------------------------------------*/ + +static ivas_error getSamplesInternal( +#else /*-------------------------------------------------------------------* * IVAS_REND_GetSamples() * @@ -8996,6 +9097,7 @@ ivas_error IVAS_REND_SetIsmMetadataDelay( *-------------------------------------------------------------------*/ ivas_error IVAS_REND_GetSamples( +#endif IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ IVAS_REND_AudioBuffer outAudio /* i/o: buffer for output audio */ #ifdef SPLIT_REND_WITH_HEAD_ROT @@ -9138,7 +9240,11 @@ ivas_error IVAS_REND_GetSamples( return error; } #ifdef SPLIT_REND_WITH_HEAD_ROT - if ( ( error = renderActiveInputsSplitBin( hIvasRend, outAudio, hBits ) ) != IVAS_ERR_OK ) + if ( ( error = renderActiveInputsSplitBin( hIvasRend, outAudio +#ifndef API_5MS + , hBits +#endif + ) ) != IVAS_ERR_OK ) { return error; } @@ -9209,9 +9315,56 @@ ivas_error IVAS_REND_GetSamples( } #endif /* SPLIT_REND_WITH_HEAD_ROT */ + return IVAS_ERR_OK; +} + +#ifdef API_5MS +/*-------------------------------------------------------------------* + * IVAS_REND_GetSamples() + * + * + *-------------------------------------------------------------------*/ + +ivas_error IVAS_REND_GetSamples( + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_REND_AudioBuffer outAudio /* i/o: buffer for output audio */ +) +{ + return getSamplesInternal(hIvasRend, outAudio, NULL); +} + +ivas_error IVAS_REND_GetSplitBinauralBitstream( + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_REND_BitstreamBuffer *hBits /* o : buffer for output bitstream */ +) +{ + IVAS_REND_AudioBuffer dummyBuffer; + /* Dummy values, just to satisfy checks in getSamplesInternal */ + dummyBuffer.data = (void*)hIvasRend; + dummyBuffer.config.is_cldfb = 0; + dummyBuffer.config.numChannels = BINAURAL_CHANNELS; + dummyBuffer.config.numSamplesPerChannel = L_FRAME48k; + + return getSamplesInternal(hIvasRend, dummyBuffer, hBits); +} + +ivas_error IVAS_REND_GetSplitBinauralSamples( + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_REND_AudioBuffer outAudio, /* i/o: buffer for output audio */ + bool* needNewFrame +) +{ + ivas_error error; + + if ( ( error = getSamplesInternal(hIvasRend, outAudio, NULL) ) != IVAS_ERR_OK ) + { + return error; + } + *needNewFrame = hIvasRend->inputsSplitPost[0].numCachedSamples == 0; return IVAS_ERR_OK; } +#endif /*-------------------------------------------------------------------* diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index 1b95ca21ba..b9b1f1161c 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -271,6 +271,23 @@ int16_t IVAS_REND_FeedRenderConfig( const IVAS_RENDER_CONFIG_DATA renderConfig /* i : Render configuration struct */ ); +#ifdef API_5MS +ivas_error IVAS_REND_FeedSplitBinauralBitstream( + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + const IVAS_REND_InputId inputId, /* i : ID of the input */ + IVAS_REND_BitstreamBuffer *hBits /* i : buffer for input bitstream */ +); +ivas_error IVAS_REND_GetSplitBinauralSamples( + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_REND_AudioBuffer outAudio, /* i/o: buffer for output audio */ + bool* needNewFrame +); +ivas_error IVAS_REND_GetSplitBinauralBitstream( + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_REND_BitstreamBuffer *hBits /* o : buffer for output bitstream */ +); +#endif + ivas_error IVAS_REND_SetHeadRotation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ #ifdef API_5MS @@ -383,10 +400,12 @@ ivas_error IVAS_REND_GetNumAllObjects( ivas_error IVAS_REND_GetSamples( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ IVAS_REND_AudioBuffer outAudio /* i/o: buffer for output audio */ +#ifndef API_5MS #ifdef SPLIT_REND_WITH_HEAD_ROT , IVAS_REND_BitstreamBuffer *hBits /*i/o: buffer for input/output bitstream. Needed in split rendering mode*/ #endif +#endif ); /* Functions to be called after rendering */ -- GitLab From 989c5bd33ded91b01d619f89f7a7128e948b6240 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Mon, 7 Aug 2023 07:37:59 +0200 Subject: [PATCH 099/175] fix crend --- lib_rend/ivas_crend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index 19e2dad7bc..cdd1a1c3d2 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -1519,7 +1519,7 @@ ivas_error ivas_rend_crendProcess( } #ifdef API_5MS - subframe_len = (int16_t) output_Fs / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES; + subframe_len = (int16_t) ( output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ); #else output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC ); subframe_len = output_frame / MAX_PARAM_SPATIAL_SUBFRAMES; -- GitLab From c810f6323832a057e38f2efe96c06ca10d03be4e Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Mon, 7 Aug 2023 09:59:03 +0200 Subject: [PATCH 100/175] fix missing gain adjustement for binaural rendering ParamISM with TSM, fix external orientation tracking (one update was wrong) --- lib_dec/ivas_jbm_dec.c | 7 +++++++ lib_rend/ivas_rotation.c | 13 ++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 18232a32f8..80ee43bfb2 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -181,6 +181,13 @@ ivas_error ivas_jbm_dec_tc( { ivas_mono_downmix_render_passive( st_ivas, output, output_frame ); } + else if ( st_ivas->ism_mode == ISM_MODE_PARAM && ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) ) + { +#ifdef FIX_549_PARAM_ISM_BIN_GAIN + /* loudness correction */ + ivas_dirac_dec_binaural_sba_gain( output, st_ivas->nchan_transport, output_frame ); +#endif + } } else if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == MASA_FORMAT ) { diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 53a1d501e8..a3a6b9d94d 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -962,7 +962,7 @@ ivas_error ivas_combined_orientation_open( ( *hCombinedOrientationData )->Rmat_prev[pos_idx][j][j] = 1.0f; } } - (*hCombinedOrientationData)->sr_pose_pred_axis = DEFAULT_AXIS; + ( *hCombinedOrientationData )->sr_pose_pred_axis = DEFAULT_AXIS; #else for ( j = 0; j < 3; j++ ) { @@ -1527,14 +1527,9 @@ ivas_error combine_external_and_head_orientations( if ( hExtOrientationData != NULL ) { #ifdef API_5MS - if ( hExtOrientationData->enableExternalOrientation > 0 ) - { - hCombinedOrientationData->Quaternion_prev_extOrientation = hCombinedOrientationData->Quaternion; - } - else - { - hCombinedOrientationData->Quaternion_prev_extOrientation = identity; - } + + hCombinedOrientationData->Quaternion_prev_extOrientation = hExtOrientationData->Quaternion; + #elif defined FIX_570_SF_EXT_ORIENTATION if ( hExtOrientationData->enableExternalOrientation[MAX_PARAM_SPATIAL_SUBFRAMES - 1] > 0 ) { -- GitLab From 6ce810a9e143714f4b66d0e961694799d6bce6a8 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Mon, 7 Aug 2023 13:52:21 +0200 Subject: [PATCH 101/175] Fix 0 DOF split rendering [WIP] --- apps/decoder.c | 41 +++++++++- lib_dec/ivas_init_dec.c | 10 +++ lib_dec/ivas_stat_dec.h | 4 + lib_dec/lib_dec.c | 165 +++++++++++++++++++++++++++++++++++----- lib_dec/lib_dec.h | 7 ++ 5 files changed, 206 insertions(+), 21 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 82d2937614..959e5cf30f 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -435,6 +435,45 @@ int main( } } +#ifdef API_5MS + /*-------------------------------------------------------------------* + * Load renderer configuration from file + *--------------------------------------------------------------------*/ + + IVAS_RENDER_CONFIG_DATA renderConfig; + if ( arg.renderConfigEnabled ) + { + /* sanity check */ +#ifdef SPLIT_REND_WITH_HEAD_ROT + if ( arg.outputFormat != IVAS_DEC_OUTPUT_BINAURAL && arg.outputFormat != IVAS_DEC_OUTPUT_BINAURAL_ROOM_IR && arg.outputFormat != IVAS_DEC_OUTPUT_BINAURAL_ROOM_REVERB && + arg.outputFormat != IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED && + arg.outputFormat != IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) + { + fprintf( stderr, "\nExternal Renderer Config is supported only when binaural output configurations is used as output OR when Split rendering mode is enabled. Exiting. \n" ); + exit( -1 ); + } +#else + if ( arg.outputFormat != IVAS_DEC_OUTPUT_BINAURAL && arg.outputFormat != IVAS_DEC_OUTPUT_BINAURAL_ROOM_IR && arg.outputFormat != IVAS_DEC_OUTPUT_BINAURAL_ROOM_REVERB ) + { + fprintf( stderr, "\nExternal Renderer Config is supported only for binaural output configurations. Exiting. \n\n" ); + goto cleanup; + } +#endif + + if ( ( error = IVAS_DEC_GetDefaultRenderConfig( &renderConfig ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_GetDefaultRenderConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + if ( RenderConfigReader_read( renderConfigReader, &renderConfig ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Failed to read renderer configuration from file %s\n\n", arg.renderConfigFilename ); + goto cleanup; + } + } +#endif + /*------------------------------------------------------------------------------------------* * Configure the decoder *------------------------------------------------------------------------------------------*/ @@ -443,7 +482,7 @@ int main( { arg.enableHeadRotation = true; #ifdef API_5MS_BASELINE - arg.enable5ms = false; + arg.enable5ms = renderConfig.split_rend_config.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE || renderConfig.split_rend_config.dof == 0; #endif } #endif diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 647a95661c..2a1d1d462c 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -2144,6 +2144,10 @@ void ivas_initialize_handles_dec( st_ivas->splitBinRend.hMultiBinCldfbData = NULL; st_ivas->splitBinRend.hSplitRendBits = NULL; st_ivas->splitBinRend.hCldfbDataOut = NULL; +#ifdef API_5MS + st_ivas->splitBinRend.tdDataOut = NULL; + st_ivas->splitBinRend.numTdSamplesPerChannelCached = 0; +#endif ivas_init_split_rend_handles( &st_ivas->splitBinRend.splitrend ); #endif #ifdef SPLIT_REND_WITH_HEAD_ROT_PARAMBIN @@ -2325,6 +2329,12 @@ void ivas_destroy_dec( { free( st_ivas->splitBinRend.hCldfbDataOut ); } +#ifdef API_5MS + if ( st_ivas->splitBinRend.tdDataOut != NULL ) + { + free( st_ivas->splitBinRend.tdDataOut ); + } +#endif #endif /* Parametric binaural renderer handle */ diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index f60d2af5fe..ffe228b7b0 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -934,6 +934,10 @@ typedef struct IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits; /*scratch buffer for frame by frame processing*/ SPLIT_REND_WRAPPER splitrend; IVAS_DEC_SPLIT_REND_CLDFB_OUT_DATA_HANDLE hCldfbDataOut; /*buffer to store cldfb data before binauralization*/ +#ifdef API_5MS + float* tdDataOut; /*buffer to store TD data before binauralization*/ + int16_t numTdSamplesPerChannelCached; +#endif } IVAS_DEC_SPLIT_REND_WRAPPER; #endif diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 7c7bdb1a85..3220a14d96 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1128,7 +1128,8 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( int32_t output_Fs; float output[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES][L_FRAME48k]; int16_t output_int[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES * L_FRAME48k]; /* TODO(sgi): Need conversion */ - int16_t numSamplesPerChannel; + int16_t numSamplesPerChannelToDecode; + int16_t numSamplesPerChannelToSplitEncode; int16_t i, j; ivas_error error; IVAS_DEC_SPLIT_REND_WRAPPER *hSplitBinRend; @@ -1141,34 +1142,89 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( st_ivas = hIvasDec->st_ivas; output_config = st_ivas->hDecoderConfig->output_config; output_Fs = st_ivas->hDecoderConfig->output_Fs; - numSamplesPerChannel = (int16_t) ( output_Fs / FRAMES_PER_SEC ); /* TODO(sgi): Accommodate 5ms framing */ - - if ( output_config != AUDIO_CONFIG_BINAURAL_SPLIT_CODED && output_config != AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) - { - return IVAS_ERR_WRONG_PARAMS; - } + numSamplesPerChannelToDecode = (int16_t) ( output_Fs / FRAMES_PER_SEC ); *needNewFrame = FALSE; hSplitBinRend = &st_ivas->splitBinRend; ivas_set_split_rend_setup( hSplitBinRend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hCombinedOrientationData, hSplitRendBits ); + numPoses = hSplitBinRend->splitrend.multiBinPoseData.num_poses; - /* Decode and render */ - error = IVAS_DEC_GetSamples( - hIvasDec, - numSamplesPerChannel, - output_int, - nOutSamples, - needNewFrame ); - if ( error != IVAS_ERR_OK ) + if ( hIvasDec->st_ivas->hRenderConfig->split_rend_config.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE || + hIvasDec->st_ivas->hRenderConfig->split_rend_config.dof == 0 ) { - return error; + numSamplesPerChannelToSplitEncode = (int16_t) ( output_Fs / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ); + + if ( hSplitBinRend->tdDataOut == NULL ) + { + /* Allocate enough space to save all decoded samples that will not be split encoded directly after decoding */ + hSplitBinRend->tdDataOut = malloc( ( numSamplesPerChannelToDecode - numSamplesPerChannelToSplitEncode ) * BINAURAL_CHANNELS * numPoses * sizeof( float ) ); + if ( hSplitBinRend->tdDataOut == NULL ) + { + return IVAS_ERR_FAILED_ALLOC; + } + } } - assert( numSamplesPerChannel == *nOutSamples ); + else + { + numSamplesPerChannelToSplitEncode = (int16_t) ( output_Fs / FRAMES_PER_SEC ); + } + + if ( output_config != AUDIO_CONFIG_BINAURAL_SPLIT_CODED && output_config != AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) + { + return IVAS_ERR_WRONG_PARAMS; + } + + if ( numSamplesPerChannelToDecode == numSamplesPerChannelToSplitEncode || hSplitBinRend->numTdSamplesPerChannelCached == 0 ) + { + /* Decode and render */ + error = IVAS_DEC_GetSamples( + hIvasDec, + numSamplesPerChannelToDecode, + output_int, + nOutSamples, + needNewFrame ); + if ( error != IVAS_ERR_OK ) + { + return error; + } + assert( numSamplesPerChannelToDecode == *nOutSamples ); #ifdef DEBUGGING - dbgwrite(output_int, sizeof(int16_t), 960 * 2, 1, "res/output_int.raw"); + dbgwrite( output_int, sizeof( int16_t ), 960 * 2, 1, "res/output_int.raw" ); #endif - numPoses = hSplitBinRend->splitrend.multiBinPoseData.num_poses; + /* copy to cache if cache is in use */ + if ( hSplitBinRend->tdDataOut != NULL ) + { + float *writePtr; + int16_t *readPtr, *readEnd; + writePtr = hSplitBinRend->tdDataOut; + readPtr = output_int + numSamplesPerChannelToSplitEncode * BINAURAL_CHANNELS * numPoses; + readEnd = output_int + *nOutSamples * BINAURAL_CHANNELS * numPoses; + + while ( readPtr != readEnd ) + { + *writePtr++ = *readPtr++; /* TODO: test */ + } + hSplitBinRend->numTdSamplesPerChannelCached = *nOutSamples - numSamplesPerChannelToSplitEncode; + } + } + else + { + /* copy from cache */ + assert( hSplitBinRend->tdDataOut != NULL ); + + int16_t *writePtr; + float *readPtr, *readEnd; + readPtr = hSplitBinRend->tdDataOut + ( numSamplesPerChannelToDecode - hSplitBinRend->numTdSamplesPerChannelCached ) * BINAURAL_CHANNELS * numPoses; + readEnd = readPtr + numSamplesPerChannelToSplitEncode * BINAURAL_CHANNELS * numPoses; + writePtr = output_int; + + while ( readPtr != readEnd ) + { + *writePtr++ = *readPtr++; /* TODO: test */ + } + hSplitBinRend->numTdSamplesPerChannelCached -= numSamplesPerChannelToSplitEncode; + } /* [tmp] convert int back to float and change buffer layout */ for ( i = 0; i < *nOutSamples; ++i ) @@ -1185,7 +1241,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( } } #ifdef DEBUGGING - dbgwrite(output[0], sizeof(float), 960, 1, "res/output.raw"); + dbgwrite( output[0], sizeof( float ), 960, 1, "res/output.raw" ); #endif max_band = (int16_t) ( ( BINAURAL_MAXBANDS * output_Fs ) / 48000 ); pcm_out = ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0; @@ -1970,6 +2026,51 @@ ivas_error IVAS_DEC_GetHrtfParamBinHandle( return IVAS_ERR_OK; } +#ifdef API_5MS +static ivas_error copyRendererConfigStruct( RENDER_CONFIG_HANDLE hRCin, IVAS_RENDER_CONFIG_HANDLE hRCout ) +{ + if ( hRCin == NULL || hRCout == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + +#ifdef DEBUGGING + switch ( hRCin->renderer_type_override ) + { + case RENDER_TYPE_OVERRIDE_CREND: + hRCout->renderer_type_override = IVAS_RENDER_TYPE_OVERRIDE_CREND; + break; + case RENDER_TYPE_OVERRIDE_FASTCONV: + hRCout->renderer_type_override = IVAS_RENDER_TYPE_OVERRIDE_FASTCONV; + break; + default: + hRCout->renderer_type_override = IVAS_RENDER_TYPE_OVERRIDE_NONE; + break; + } +#endif + hRCout->room_acoustics.override = hRCin->roomAcoustics.override; + hRCout->room_acoustics.nBands = hRCin->roomAcoustics.nBands; + hRCout->room_acoustics.acousticPreDelay = hRCin->roomAcoustics.acousticPreDelay; + hRCout->room_acoustics.inputPreDelay = hRCin->roomAcoustics.inputPreDelay; + + mvr2r( hRCin->roomAcoustics.pFc_input, hRCout->room_acoustics.pFc_input, CLDFB_NO_CHANNELS_MAX ); + mvr2r( hRCin->roomAcoustics.pAcoustic_rt60, hRCout->room_acoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); + mvr2r( hRCin->roomAcoustics.pAcoustic_dsr, hRCout->room_acoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX ); + mvr2r( hRCin->directivity, hRCout->directivity, 3 ); + +#ifdef SPLIT_REND_WITH_HEAD_ROT + hRCout->split_rend_config.splitRendBitRate = SPLIT_REND_768k; + hRCout->split_rend_config.dof = 3; + hRCout->split_rend_config.hq_mode = 0; + hRCout->split_rend_config.codec_delay_ms = 0; + hRCout->split_rend_config.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; + hRCout->split_rend_config.poseCorrectionMode = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB; + hRCout->split_rend_config.rendererSelection = hRCin->split_rend_config.rendererSelection; +#endif + + return IVAS_ERR_OK; +} +#endif /*---------------------------------------------------------------------* * IVAS_DEC_GetRenderConfig( ) @@ -1982,13 +2083,18 @@ ivas_error IVAS_DEC_GetRenderConfig( const IVAS_RENDER_CONFIG_HANDLE hRCout /* o : Render configuration handle */ ) { +#ifndef API_5MS RENDER_CONFIG_HANDLE hRCin; +#endif if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || hIvasDec->st_ivas->hRenderConfig == NULL || hRCout == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } +#ifdef API_5MS + return copyRendererConfigStruct( hIvasDec->st_ivas->hRenderConfig, hRCout ); +#else hRCin = hIvasDec->st_ivas->hRenderConfig; #ifdef DEBUGGING switch ( hRCin->renderer_type_override ) @@ -2022,11 +2128,30 @@ ivas_error IVAS_DEC_GetRenderConfig( hRCout->split_rend_config.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; hRCout->split_rend_config.poseCorrectionMode = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB; hRCout->split_rend_config.rendererSelection = hRCin->split_rend_config.rendererSelection; +#endif #endif return IVAS_ERR_OK; } +#ifdef API_5MS +/*! r: error code*/ +ivas_error IVAS_DEC_GetDefaultRenderConfig( + IVAS_RENDER_CONFIG_HANDLE hRCout /* o : Render config handle */ +) +{ + RENDER_CONFIG_HANDLE hRCin; + ivas_error error; + + if ( ( error = ivas_render_config_init_from_rom( &hRCin ) ) != IVAS_ERR_OK ) + { + return error; + } + + return copyRendererConfigStruct( hRCin, hRCout ); +} +#endif + /*---------------------------------------------------------------------* * IVAS_DEC_FeedRenderConfig( ) diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 3aa1f89236..3665e5655c 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -440,6 +440,13 @@ ivas_error IVAS_DEC_GetRenderConfig( const IVAS_RENDER_CONFIG_HANDLE hRCout /* o : Render config handle */ ); +#ifdef API_5MS +/*! r: error code*/ +ivas_error IVAS_DEC_GetDefaultRenderConfig( + IVAS_RENDER_CONFIG_HANDLE hRCout /* o : Render config handle */ +); +#endif + /*! r: error code*/ ivas_error IVAS_DEC_FeedRenderConfig( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ -- GitLab From 6d2d339bc5cb90341933669369494cf2bd09e47e Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Mon, 7 Aug 2023 17:10:35 +0200 Subject: [PATCH 102/175] add float capable interface (at least needed for split rendering BE) --- apps/decoder.c | 52 +++++++- lib_com/ivas_cnst.h | 10 ++ lib_com/ivas_prot.h | 38 +++++- lib_dec/ivas_dec.c | 44 ++++++- lib_dec/ivas_init_dec.c | 26 +++- lib_dec/ivas_ism_dec.c | 32 ++++- lib_dec/ivas_ism_dtx_dec.c | 6 +- lib_dec/ivas_jbm_dec.c | 77 +++++++++-- lib_dec/ivas_mct_dec.c | 35 ++++- lib_dec/ivas_stat_dec.h | 3 + lib_dec/lib_dec.c | 259 ++++++++++++++++++++++++++++++++----- lib_dec/lib_dec.h | 41 +++++- 12 files changed, 551 insertions(+), 72 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 82d2937614..bac0880def 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -435,9 +435,10 @@ int main( } } - /*------------------------------------------------------------------------------------------* - * Configure the decoder - *------------------------------------------------------------------------------------------*/ +/*------------------------------------------------------------------------------------------* + * Configure the decoder + *------------------------------------------------------------------------------------------*/ +#ifndef API_5MS #ifdef SPLIT_REND_WITH_HEAD_ROT if ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED || arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) { @@ -447,6 +448,8 @@ int main( #endif } #endif +#endif + #ifdef API_5MS if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.tsmEnabled, #ifdef API_5MS_BASELINE @@ -461,6 +464,24 @@ int main( goto cleanup; } + + /*------------------------------------------------------------------------------------------* + * Configure VoIP mode + *------------------------------------------------------------------------------------------*/ + +#ifdef API_5MS +#ifdef SPLIT_REND_WITH_HEAD_ROT + if ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED || arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) + { + if ( ( error = IVAS_DEC_EnableSplitRendering( hIvasDec ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } +#endif +#endif + /*------------------------------------------------------------------------------------------* * Configure VoIP mode *------------------------------------------------------------------------------------------*/ @@ -2142,7 +2163,14 @@ static ivas_error decodeG192( else { #endif - error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, pcmBuf + nOutChannels * nSamplesRendered, &nSamplesRendered_loop, &needNewFrame ); + error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, +#ifdef API_5MS + IVAS_DEC_PCM_INT16, + (void *) +#endif + ( pcmBuf + nOutChannels * nSamplesRendered ), + &nSamplesRendered_loop, + &needNewFrame ); nSamplesRendered += nSamplesRendered_loop; nSamplesToRender -= nSamplesRendered_loop; if ( error != IVAS_ERR_OK ) @@ -2385,7 +2413,13 @@ static ivas_error decodeG192( } /* decode and get samples */ - if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, pcmBuf, &nSamplesFlushed ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, +#ifdef API_5MS + IVAS_DEC_PCM_INT16, + (void *) +#endif + pcmBuf, + &nSamplesFlushed ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_VoIP_Flush: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; @@ -3350,7 +3384,13 @@ static ivas_error decodeVoIP( /* decode and get samples */ - if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, systemTime_ms + if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, +#ifdef API_5MS + IVAS_DEC_PCM_INT16, + (void *) +#endif + pcmBuf, + systemTime_ms #ifndef API_5MS , &nSamplesAvailableNext diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index 6d89e222ec..32a26a83b0 100644 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -165,6 +165,16 @@ typedef enum } RENDERER_TYPE; + +#ifdef API_5MS +typedef enum +{ + PCM_INT16, + PCM_FLOAT32, + PCM_NOT_KNOW = 0xffff +} PCM_RESOLUTION; +#endif + /*----------------------------------------------------------------------------------* * IVAS general constants *----------------------------------------------------------------------------------*/ diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index d017000700..3cede1bd4f 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -308,7 +308,12 @@ void stereo_dmx_evs_close_encoder( #if !defined(API_5MS) || defined (API_5MS_BASELINE) ivas_error ivas_dec( Decoder_Struct *st_ivas, /* i : IVAS decoder structure */ +#ifdef API_5MS + const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ + void *data /* o : output synthesis signal */ +#else int16_t *data /* o : output synthesis signal */ +#endif #if defined SPLIT_REND_WITH_HEAD_ROT && !defined(API_5MS) , IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits @@ -325,7 +330,12 @@ ivas_error ivas_dec_init_split_rend( ivas_error ivas_dec_setup( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ uint16_t *nSamplesRendered, /* o : number of samples flushed from the previous frame (JBM) */ - int16_t *data /* o : flushed PCM samples */ +#ifdef API_5MS + const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ + void *data /* o : output synthesis signal */ +#else + int16_t *data /* o : output synthesis signal */ +#endif ); ivas_error create_sce_dec( @@ -665,7 +675,12 @@ ivas_error ivas_mc_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t idx, /* i : LS config. index */ uint16_t *nSamplesRendered, /* o : samples flushed from last frame (JBM) */ - int16_t *data /* o : flushed samples (JBM) */ +#ifdef API_5MS + const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ + void *data /* o : output synthesis signal */ +#else + int16_t *data /* o : output synthesis signal */ +#endif ); /*! r: MC format mode (MCT, McMASA, ParamMC) */ @@ -780,7 +795,12 @@ ivas_error ivas_jbm_dec_render( const uint16_t nSamplesAsked, /* i : number of samples wanted */ uint16_t *nSamplesRendered, /* o : number of samples rendered */ uint16_t *nSamplesAvailableNext, /* o : number of samples still available in the rendering pipeline */ +#ifdef API_5MS + const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ + void *data /* o : output synthesis signal */ +#else int16_t *data /* o : output synthesis signal */ +#endif ); ivas_error ivas_jbm_dec_flush_renderer( @@ -792,7 +812,12 @@ ivas_error ivas_jbm_dec_flush_renderer( const MC_MODE mc_mode_old, /* i : old MC mode */ const ISM_MODE ism_mode_old, /* i : old ISM mode */ uint16_t *nSamplesRendered, /* o : number of samples flushed */ - int16_t *data /* o : rendered samples */ +#ifdef API_5MS + const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ + void *data /* o : output synthesis signal */ +#else + int16_t *data /* o : output synthesis signal */ +#endif ); ivas_error ivas_jbm_dec_feed_tc_to_renderer( @@ -1080,7 +1105,12 @@ ivas_error ivas_ism_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const ISM_MODE last_ism_mode, /* i/o: last ISM mode */ uint16_t *nSamplesRendered, /* o : number of samples flushed on renderer change*/ - int16_t *data /* o : flushed PCM samples */ +#ifdef API_5MS + const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ + void *data /* o : output synthesis signal */ +#else + int16_t *data /* o : output synthesis signal */ +#endif ); ivas_error ivas_param_ism_dec_open( diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index e6a6696426..957d6fe504 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -54,7 +54,12 @@ ivas_error ivas_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - int16_t *data /* o : output synthesis signal */ +#ifdef API_5MS + const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ + void *data /* o : output synthesis signal */ +#else + int16_t *data /* o : output synthesis signal */ +#endif #if defined SPLIT_REND_WITH_HEAD_ROT && !defined( API_5MS ) , IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits @@ -97,7 +102,11 @@ ivas_error ivas_dec( if ( st_ivas->bfi == 0 ) { - if ( ( error = ivas_dec_setup( st_ivas, NULL, NULL ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_dec_setup( st_ivas, NULL, +#ifdef API_5MS + PCM_NOT_KNOW, +#endif + NULL ) ) != IVAS_ERR_OK ) { return error; } @@ -1052,15 +1061,42 @@ ivas_error ivas_dec( * - compensation for saturation * - float to integer conversion *----------------------------------------------------------------*/ -#ifndef DISABLE_LIMITER - ivas_limiter_dec( st_ivas->hLimiter, p_output, nchan_out, output_frame, st_ivas->BER_detect ); + +#ifdef API_5MS + if ( st_ivas->hDecoderConfig->Opt_Limiter ) #endif + { + ivas_limiter_dec( st_ivas->hLimiter, p_output, nchan_out, output_frame, st_ivas->BER_detect ); + } #ifdef DEBUGGING st_ivas->noClipping += #endif ivas_syn_output( p_output, output_frame, nchan_out, data ); +#ifdef API_5MS + switch ( pcm_resolution ) + { + case PCM_INT16: +#endif +#ifdef DEBUGGING + st_ivas->noClipping += +#endif + ivas_syn_output( p_output, output_frame, nchan_out, +#ifdef API_5MS + (int16_t *) +#endif + data ); +#ifdef API_5MS + break; + case PCM_FLOAT32: + ivas_syn_output_f( p_output, output_frame, nchan_out, (float *) data ); + break; + default: + error = IVAS_ERR_UNKNOWN; + break; + } +#endif /*----------------------------------------------------------------* * Common updates *----------------------------------------------------------------*/ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 647a95661c..870c8f9a44 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -216,7 +216,12 @@ ivas_error ivas_dec_init_split_rend( ivas_error ivas_dec_setup( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ uint16_t *nSamplesRendered, /* o : number of samples flushed from the previous frame (JBM) */ - int16_t *data /* o : flushed PCM samples */ +#ifdef API_5MS + const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ + void *data /* o : output synthesis signal */ +#else + int16_t *data /* o : output synthesis signal */ +#endif ) { int16_t k, idx, num_bits_read; @@ -267,7 +272,11 @@ ivas_error ivas_dec_setup( st_ivas->nchan_ism = nchan_ism; - if ( ( error = ivas_ism_dec_config( st_ivas, st_ivas->ism_mode, nSamplesRendered, data ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_ism_dec_config( st_ivas, st_ivas->ism_mode, nSamplesRendered, +#ifdef API_5MS + pcm_resolution, +#endif + data ) ) != IVAS_ERR_OK ) { return error; } @@ -380,7 +389,12 @@ ivas_error ivas_dec_setup( num_bits_read += MC_LS_SETUP_BITS; /* select MC format mode; reconfigure the MC format decoder */ - ivas_mc_dec_config( st_ivas, idx, nSamplesRendered, data ); + ivas_mc_dec_config( st_ivas, idx, nSamplesRendered, +#ifdef API_5MS + pcm_resolution, +#endif + + data ); } /*-------------------------------------------------------------------* @@ -495,7 +509,11 @@ ivas_error ivas_dec_setup( st_ivas->ism_mode = (ISM_MODE) ( idx + 1 ); } - if ( ( error = ivas_ism_dec_config( st_ivas, st_ivas->ism_mode, nSamplesRendered, data ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_ism_dec_config( st_ivas, st_ivas->ism_mode, nSamplesRendered, +#ifdef API_5MS + pcm_resolution, +#endif + data ) ) != IVAS_ERR_OK ) { return error; } diff --git a/lib_dec/ivas_ism_dec.c b/lib_dec/ivas_ism_dec.c index 3900e8c1cc..e6158e0b5c 100644 --- a/lib_dec/ivas_ism_dec.c +++ b/lib_dec/ivas_ism_dec.c @@ -51,7 +51,12 @@ static ivas_error ivas_ism_bitrate_switching( const int16_t nchan_transport_old, /* i : last number of transport channels */ const ISM_MODE last_ism_mode, /* i : last ISM mode */ uint16_t *nSamplesRendered, /* o : number of samples rendered */ - int16_t *data /* o : rendered samples */ +#ifdef API_5MS + const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ + void *data /* o : output synthesis signal */ +#else + int16_t *data /* o : output synthesis signal */ +#endif ) { ivas_error error; @@ -151,7 +156,11 @@ static ivas_error ivas_ism_bitrate_switching( #endif if ( tc_granularity_new < st_ivas->hTcBuffer->n_samples_granularity ) { - if ( ( error = ivas_jbm_dec_flush_renderer( st_ivas, tc_granularity_new, renderer_type_old, intern_config_old, &hIntSetupOld, MC_MODE_NONE, last_ism_mode, nSamplesRendered, data ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_jbm_dec_flush_renderer( st_ivas, tc_granularity_new, renderer_type_old, intern_config_old, &hIntSetupOld, MC_MODE_NONE, last_ism_mode, nSamplesRendered, +#ifdef API_5MS + pcm_resolution, +#endif + data ) ) != IVAS_ERR_OK ) { return error; } @@ -410,7 +419,12 @@ ivas_error ivas_ism_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const ISM_MODE last_ism_mode, /* i/o: last ISM mode */ uint16_t *nSamplesRendered, /* o : number of samples flushed when the renderer granularity changes */ - int16_t *data /* o : flushed PCM samples */ +#ifdef API_5MS + const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ + void *data /* o : output synthesis signal */ +#else + int16_t *data /* o : output synthesis signal */ +#endif ) { int32_t ivas_total_brate; @@ -449,7 +463,11 @@ ivas_error ivas_ism_dec_config( { if ( ( st_ivas->ism_mode != last_ism_mode ) || ( st_ivas->hDecoderConfig->ivas_total_brate != st_ivas->hDecoderConfig->last_ivas_total_brate ) ) { - if ( ( error = ivas_ism_bitrate_switching( st_ivas, nchan_transport_old, last_ism_mode, nSamplesRendered, data ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_ism_bitrate_switching( st_ivas, nchan_transport_old, last_ism_mode, nSamplesRendered, +#ifdef API_5MS + pcm_resolution, +#endif + data ) ) != IVAS_ERR_OK ) { return error; } @@ -472,7 +490,11 @@ ivas_error ivas_ism_dec_config( /* ISM mode switching */ if ( st_ivas->ism_mode != last_ism_mode ) { - if ( ( error = ivas_ism_bitrate_switching( st_ivas, nchan_transport_old, last_ism_mode, nSamplesRendered, data ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_ism_bitrate_switching( st_ivas, nchan_transport_old, last_ism_mode, nSamplesRendered, +#ifdef API_5MS + pcm_resolution, +#endif + data ) ) != IVAS_ERR_OK ) { return error; } diff --git a/lib_dec/ivas_ism_dtx_dec.c b/lib_dec/ivas_ism_dtx_dec.c index fada7caaec..3f26fb4e93 100644 --- a/lib_dec/ivas_ism_dtx_dec.c +++ b/lib_dec/ivas_ism_dtx_dec.c @@ -96,7 +96,11 @@ ivas_error ivas_ism_dtx_dec( st_ivas->ism_mode = ism_mode_bstr; } - if ( ( error = ivas_ism_dec_config( st_ivas, last_ism_mode, NULL, NULL ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_ism_dec_config( st_ivas, last_ism_mode, NULL, +#ifdef API_5MS + PCM_NOT_KNOW, +#endif + NULL ) ) != IVAS_ERR_OK ) { return error; } diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 80ee43bfb2..2c4559befd 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -729,7 +729,12 @@ ivas_error ivas_jbm_dec_render( const uint16_t nSamplesAsked, /* i : number of samples wanted */ uint16_t *nSamplesRendered, /* o : number of samples rendered */ uint16_t *nSamplesAvailableNext, /* o : number of samples still available in the rendering pipeline */ - int16_t *data /* o : output synthesis signal */ +#ifdef API_5MS + const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ + void *data /* o : output synthesis signal */ +#else + int16_t *data /* o : output synthesis signal */ +#endif ) { int16_t n, nchan_out; @@ -1106,16 +1111,39 @@ ivas_error ivas_jbm_dec_render( st_ivas->hTcBuffer->n_samples_discard = 0; } -#ifndef DISABLE_LIMITER - ivas_limiter_dec( st_ivas->hLimiter, p_output, nchan_out, *nSamplesRendered, st_ivas->BER_detect ); +#ifdef API_5MS + if ( st_ivas->hDecoderConfig->Opt_Limiter ) #endif + { + ivas_limiter_dec( st_ivas->hLimiter, p_output, nchan_out, *nSamplesRendered, st_ivas->BER_detect ); + } + +#ifdef API_5MS + switch ( pcm_resolution ) + { + case PCM_INT16: +#endif #ifdef DEBUGGING - st_ivas->noClipping += + st_ivas->noClipping += #endif - ivas_syn_output( p_output, *nSamplesRendered, nchan_out, data ); - *nSamplesAvailableNext = st_ivas->hTcBuffer->n_samples_available; + ivas_syn_output( p_output, *nSamplesRendered, nchan_out, +#ifdef API_5MS + (int16_t *) +#endif + data ); +#ifdef API_5MS + break; + case PCM_FLOAT32: + ivas_syn_output_f( p_output, *nSamplesRendered, nchan_out, (float *) data ); + break; + default: + error = IVAS_ERR_UNKNOWN; + break; + } +#endif + *nSamplesAvailableNext = st_ivas->hTcBuffer->n_samples_available; pop_wmops(); return error; } @@ -1136,7 +1164,12 @@ ivas_error ivas_jbm_dec_flush_renderer( const MC_MODE mc_mode_old, /* i : old MC mode */ const ISM_MODE ism_mode_old, /* i : old ISM mode */ uint16_t *nSamplesRendered, /* o : number of samples flushed */ - int16_t *data /* o : rendered samples */ +#ifdef API_5MS + const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ + void *data /* o : output synthesis signal */ +#else + int16_t *data /* o : output synthesis signal */ +#endif ) { ivas_error error; @@ -1258,13 +1291,37 @@ ivas_error ivas_jbm_dec_flush_renderer( } /* Only write out the valid data*/ - ivas_limiter_dec( st_ivas->hLimiter, p_output, st_ivas->hDecoderConfig->nchan_out, *nSamplesRendered, st_ivas->BER_detect ); +#ifdef API_5MS + if ( st_ivas->hDecoderConfig->Opt_Limiter ) +#endif + { + ivas_limiter_dec( st_ivas->hLimiter, p_output, st_ivas->hDecoderConfig->nchan_out, *nSamplesRendered, st_ivas->BER_detect ); + } +#ifdef API_5MS + switch ( pcm_resolution ) + { + case PCM_INT16: +#endif #ifdef DEBUGGING - st_ivas->noClipping += + st_ivas->noClipping += +#endif + ivas_syn_output( p_output, *nSamplesRendered, st_ivas->hDecoderConfig->nchan_out, +#ifdef API_5MS + (int16_t *) #endif - ivas_syn_output( p_output, *nSamplesRendered, st_ivas->hDecoderConfig->nchan_out, data ); + data ); +#ifdef API_5MS + break; + case PCM_FLOAT32: + ivas_syn_output_f( p_output, *nSamplesRendered, st_ivas->hDecoderConfig->nchan_out, (float *) data ); + break; + default: + error = IVAS_ERR_UNKNOWN; + break; + } +#endif return error; } diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index 6ca7434d4e..afb2ae6d8c 100755 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -54,7 +54,14 @@ * Local function prototypes *-----------------------------------------------------------------------*/ -static ivas_error ivas_mc_dec_reconfig( Decoder_Struct *st_ivas, uint16_t *nSamplesRendered, int16_t *data ); +static ivas_error ivas_mc_dec_reconfig( Decoder_Struct *st_ivas, uint16_t *nSamplesRendered, +#ifdef API_5MS + const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ + void *data /* o : output synthesis signal */ +#else + int16_t *data /* o : output synthesis signal */ +#endif +); /*--------------------------------------------------------------------------* * ivas_mct_dec() @@ -618,7 +625,12 @@ ivas_error ivas_mc_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t idx, /* i : LS config. index */ uint16_t *nSamplesRendered, /* o : samples flushed from last frame (JBM) */ - int16_t *data /* o : flushed samples (JBM) */ +#ifdef API_5MS + const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ + void *data /* o : output synthesis signal */ +#else + int16_t *data /* o : output synthesis signal */ +#endif ) { AUDIO_CONFIG signaled_config; @@ -648,7 +660,11 @@ ivas_error ivas_mc_dec_config( { if ( st_ivas->hDecoderConfig->last_ivas_total_brate != st_ivas->hDecoderConfig->ivas_total_brate || st_ivas->transport_config != signaled_config || last_mc_mode != st_ivas->mc_mode ) { - ivas_mc_dec_reconfig( st_ivas, nSamplesRendered, data ); + ivas_mc_dec_reconfig( st_ivas, nSamplesRendered, +#ifdef API_5MS + pcm_resolution, +#endif + data ); } } @@ -668,7 +684,12 @@ ivas_error ivas_mc_dec_config( static ivas_error ivas_mc_dec_reconfig( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ uint16_t *nSamplesRendered, /* o : number of samples flushed from the last frame (JBM) */ - int16_t *data /* o : flushed samples (JBM) */ +#ifdef API_5MS + const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ + void *data /* o : output synthesis signal */ +#else + int16_t *data /* o : output synthesis signal */ +#endif ) { int16_t nchan_transport_old, nSCE_old, nCPE_old, sba_dirac_stereo_flag_old, nchan_hp20_old; @@ -760,7 +781,11 @@ static ivas_error ivas_mc_dec_reconfig( #endif if ( tc_granularity_new < st_ivas->hTcBuffer->n_samples_granularity ) { - if ( ( error = ivas_jbm_dec_flush_renderer( st_ivas, tc_granularity_new, renderer_type_old, intern_config_old, &hIntSetupOld, last_mc_mode, ISM_MODE_NONE, nSamplesRendered, data ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_jbm_dec_flush_renderer( st_ivas, tc_granularity_new, renderer_type_old, intern_config_old, &hIntSetupOld, last_mc_mode, ISM_MODE_NONE, nSamplesRendered, +#ifdef API_5MS + pcm_resolution, +#endif + data ) ) != IVAS_ERR_OK ) { return error; } diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index f60d2af5fe..eb514626cc 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -905,6 +905,9 @@ typedef struct decoder_config_structure #endif #ifdef API_5MS int16_t Opt_tsm; +#ifdef SPLIT_REND_WITH_HEAD_ROT + int16_t Opt_Limiter; +#endif #ifdef API_5MS_BASELINE int16_t Opt_5ms; #endif diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 7c7bdb1a85..18f42f5dd6 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -129,12 +129,31 @@ static int16_t IVAS_DEC_VoIP_GetRenderGranularity( Decoder_Struct *st_ivas ); static JBM_RENDERER_TYPE IVAS_DEC_VoIP_GetRendererConfig( IVAS_DEC_HANDLE hIvasDec ); #endif static ivas_error IVAS_DEC_reconfigure( IVAS_DEC_HANDLE hIvasDec, const uint16_t nTransportChannels, const uint16_t l_ts ); -static ivas_error IVAS_DEC_Setup( IVAS_DEC_HANDLE hIvasDec, uint16_t *nTcBufferGranularity, uint8_t *nTransportChannels, uint8_t *nOutChannels, uint16_t *nSamplesRendered, int16_t *data ); +static ivas_error IVAS_DEC_Setup( IVAS_DEC_HANDLE hIvasDec, uint16_t *nTcBufferGranularity, uint8_t *nTransportChannels, uint8_t *nOutChannels, uint16_t *nSamplesRendered, +#ifdef API_5MS + const IVAS_DEC_PCM_TYPE pcmType, + void *data +#else + int16_t *data +#endif +); static ivas_error IVAS_DEC_GetTcSamples( IVAS_DEC_HANDLE hIvasDec, float *pcmBuf, int16_t *nOutSamples ); static ivas_error IVAS_DEC_RendererFeedTcSamples( IVAS_DEC_HANDLE hIvasDec, const int16_t nSamplesForRendering, int16_t *nSamplesResidual, float *pcmBuf ); -static ivas_error IVAS_DEC_GetRenderedSamples( IVAS_DEC_HANDLE hIvasDec, const uint16_t nSamplesForRendering, uint16_t *nSamplesRendered, uint16_t *nSamplesAvailableNext, int16_t *pcmBuf ); -static ivas_error IVAS_DEC_GetBufferedNumberOfSamples( IVAS_DEC_HANDLE hIvasDec, int16_t *nSamplesBuffered ); +static ivas_error IVAS_DEC_GetRenderedSamples( IVAS_DEC_HANDLE hIvasDec, const uint16_t nSamplesForRendering, uint16_t *nSamplesRendered, uint16_t *nSamplesAvailableNext, +#ifdef API_5MS + IVAS_DEC_PCM_TYPE pcmType, + void *pcmBuf +#else + int16_t *pcmBuf +#endif +); +static ivas_error IVAS_DEC_GetBufferedNumberOfSamples( IVAS_DEC_HANDLE hIvasDec, int16_t *nSamplesBuffered ); +#ifdef API_5MS +static PCM_RESOLUTION pcm_type_API_to_internal( const IVAS_DEC_PCM_TYPE pcmType ); +static void *pcm_buffer_offset( void *buffer, const IVAS_DEC_PCM_TYPE pcmType, int32_t offset ); +static ivas_error set_pcm_buffer_to_zero( void *buffer, const IVAS_DEC_PCM_TYPE pcmType, int16_t nZeroSamples ); +#endif /*---------------------------------------------------------------------* * IVAS_DEC_Open() * @@ -280,6 +299,9 @@ static void init_decoder_config( hDecoderConfig->non_diegetic_pan_gain = 0; #ifdef API_5MS hDecoderConfig->Opt_tsm = 0; +#ifdef SPLIT_REND_WITH_HEAD_ROT + hDecoderConfig->Opt_Limiter = 1; +#endif #ifdef API_5MS_BASELINE hDecoderConfig->Opt_5ms = 0; #endif @@ -648,7 +670,7 @@ ivas_error IVAS_DEC_Configure( #ifdef API_5MS hDecoderConfig->Opt_tsm = tsmEnabled; -#ifdef API_5MS +#ifdef API_5MS_BASELINE hDecoderConfig->Opt_5ms = enable5ms; #endif hIvasDec->nSamplesFrame = (uint16_t) ( hDecoderConfig->output_Fs / FRAMES_PER_SEC ); @@ -661,6 +683,39 @@ ivas_error IVAS_DEC_Configure( return error; } +#ifdef API_5MS +#ifdef SPLIT_REND_WITH_HEAD_ROT +/*---------------------------------------------------------------------* + * IVAS_DEC_EnableSplitRendering( ) + * + * Intitialize Split rendering + *---------------------------------------------------------------------*/ + +ivas_error IVAS_DEC_EnableSplitRendering( + IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle */ +) +{ + DECODER_CONFIG_HANDLE hDecoderConfig; + ivas_error error; + + error = IVAS_ERR_OK; + + + if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + + hDecoderConfig = hIvasDec->st_ivas->hDecoderConfig; + + hDecoderConfig->Opt_Headrotation = 1; + hDecoderConfig->Opt_5ms = 0; + hDecoderConfig->Opt_Limiter = 0; + + return error; +} +#endif +#endif /*---------------------------------------------------------------------* * IVAS_DEC_EnableVoIP( ) @@ -911,8 +966,13 @@ static ivas_error _GetSamples( ivas_error IVAS_DEC_GetSamples( #endif IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ - int16_t *nOutSamples /* o : number of samples per channel written to output buffer */ +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT + const PCM_RESOLUTION pcm_resolution, + void *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ +#else + int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ +#endif + int16_t *nOutSamples /* o : number of samples per channel written to output buffer */ #if defined( SPLIT_REND_WITH_HEAD_ROT ) && !defined( API_5MS ) , IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits @@ -935,7 +995,15 @@ ivas_error IVAS_DEC_GetSamples( if ( hIvasDec->mode == IVAS_DEC_MODE_EVS ) { - if ( ( error = evs_dec_main( st_ivas, *nOutSamples, NULL, pcmBuf ) ) != IVAS_ERR_OK ) +#if defined DEBUGGING && defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT + assert( pcm_resolution == PCM_INT16 ); +#endif + + if ( ( error = evs_dec_main( st_ivas, *nOutSamples, NULL, +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT + (int16_t *) +#endif + pcmBuf ) ) != IVAS_ERR_OK ) { return error; } @@ -943,7 +1011,12 @@ ivas_error IVAS_DEC_GetSamples( else if ( hIvasDec->mode == IVAS_DEC_MODE_IVAS ) { /* run the main IVAS decoding routine */ - if ( ( error = ivas_dec( st_ivas, pcmBuf + if ( ( error = ivas_dec( st_ivas, + +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT + pcm_resolution, +#endif + pcmBuf #if defined( SPLIT_REND_WITH_HEAD_ROT ) && !defined( API_5MS ) , hSplitRendBits @@ -968,9 +1041,14 @@ ivas_error IVAS_DEC_GetSamples( ivas_error IVAS_DEC_GetSamples( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const int16_t nSamplesAsked, /* i: number of samples wanted by the caller */ - int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ - int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ - bool *needNewFrame /* indication that the decoder needs a new frame */ +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT + const IVAS_DEC_PCM_TYPE pcmType, /* i : type for the decoded PCM resolution */ + void *pcmBuf, /* o : output synthesis signal */ +#else + int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ +#endif + int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ + bool *needNewFrame /* indication that the decoder needs a new frame */ #if defined SPLIT_REND_WITH_HEAD_ROT && !defined API_5MS , IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits /* o : bitstream output for split rendering mode*/ @@ -1017,7 +1095,7 @@ ivas_error IVAS_DEC_GetSamples( /* only for 1st step 5ms API, split rendering still needs to go through the old decoding function */ else if ( !hIvasDec->st_ivas->hDecoderConfig->Opt_5ms ) { - if ( ( error = _GetSamples( hIvasDec, pcmBuf, nOutSamples ) ) != IVAS_ERR_OK ) + if ( ( error = _GetSamples( hIvasDec, pcm_type_API_to_internal( pcmType ), pcmBuf, nOutSamples ) ) != IVAS_ERR_OK ) { return error; } @@ -1038,7 +1116,15 @@ ivas_error IVAS_DEC_GetSamples( { int16_t nResidualSamples, nSamplesTcsScaled; /* setup */ - if ( ( error = IVAS_DEC_Setup( hIvasDec, &l_ts, &nTransportChannels, &nOutChannels, &nSamplesRendered_loop, pcmBuf + nSamplesRendered * nOutChannels ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_Setup( hIvasDec, &l_ts, &nTransportChannels, &nOutChannels, &nSamplesRendered_loop, +#ifdef API_5MS + pcmType, + pcm_buffer_offset( pcmBuf, pcmType, nSamplesRendered * nOutChannels ) +#else + pcmBuf + nSamplesRendered * nOutChannels +#endif + + ) ) != IVAS_ERR_OK ) { return error; } @@ -1092,7 +1178,15 @@ ivas_error IVAS_DEC_GetSamples( } /* render IVAS frames directly to the output buffer */ nSamplesToRender = nSamplesAsked - nSamplesRendered; - if ( ( error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesRendered_loop, &hIvasDec->nSamplesAvailableNext, pcmBuf + nSamplesRendered * nOutChannels ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesRendered_loop, &hIvasDec->nSamplesAvailableNext, +#ifdef API_5MS + pcmType, + pcm_buffer_offset( pcmBuf, pcmType, nSamplesRendered * nOutChannels ) +#else + pcmBuf + nSamplesRendered * nOutChannels +#endif + + ) ) != IVAS_ERR_OK ) { return error; } @@ -1127,7 +1221,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( AUDIO_CONFIG output_config; int32_t output_Fs; float output[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES][L_FRAME48k]; - int16_t output_int[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES * L_FRAME48k]; /* TODO(sgi): Need conversion */ + float pcmBuf[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES * L_FRAME48k]; /* TODO(sgi): Need conversion */ int16_t numSamplesPerChannel; int16_t i, j; ivas_error error; @@ -1156,7 +1250,8 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( error = IVAS_DEC_GetSamples( hIvasDec, numSamplesPerChannel, - output_int, + PCM_FLOAT32, + (void *) pcmBuf, nOutSamples, needNewFrame ); if ( error != IVAS_ERR_OK ) @@ -1165,7 +1260,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( } assert( numSamplesPerChannel == *nOutSamples ); #ifdef DEBUGGING - dbgwrite(output_int, sizeof(int16_t), 960 * 2, 1, "res/output_int.raw"); + dbgwrite( pcmBuf, sizeof( int16_t ), 960 * 2, 1, "res/output_int.raw" ); #endif numPoses = hSplitBinRend->splitrend.multiBinPoseData.num_poses; @@ -1181,11 +1276,11 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( #endif for ( j = 0; j < BINAURAL_CHANNELS /* * numPoses */; ++j ) { - output[j][i] = (float) output_int[i * BINAURAL_CHANNELS /* * numPoses */ + j]; + output[j][i] = pcmBuf[i * BINAURAL_CHANNELS /* * numPoses */ + j]; } } #ifdef DEBUGGING - dbgwrite(output[0], sizeof(float), 960, 1, "res/output.raw"); + dbgwrite( output[0], sizeof( float ), 960, 1, "res/output.raw" ); #endif max_band = (int16_t) ( ( BINAURAL_MAXBANDS * output_Fs ) / 48000 ); pcm_out = ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0; @@ -1225,7 +1320,12 @@ static ivas_error IVAS_DEC_Setup( uint8_t *nTransportChannels, /* o : number of decoded transport PCM channels */ uint8_t *nOutChannels, /* o : number of decoded out channels (PCM or CLDFB) */ uint16_t *nSamplesRendered, /* o : number of samples flushed from the last frame */ - int16_t *data /* o : flushed samples */ +#ifdef API_5MS + const IVAS_DEC_PCM_TYPE pcmType, /* i : type for the decoded PCM resolution */ + void *data /* o : output synthesis signal */ +#else + int16_t *data /* o : output synthesis signal */ +#endif ) { ivas_error error; @@ -1263,7 +1363,11 @@ static ivas_error IVAS_DEC_Setup( if ( st_ivas->bfi == 0 ) { - if ( ( error = ivas_dec_setup( st_ivas, nSamplesRendered, data ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_dec_setup( st_ivas, nSamplesRendered, +#ifdef API_5MS + pcm_type_API_to_internal( pcmType ), +#endif + data ) ) != IVAS_ERR_OK ) { return error; } @@ -1376,7 +1480,12 @@ ivas_error IVAS_DEC_GetRenderedSamples( const uint16_t nSamplesForRendering, /* i : number of TC samples wanted from the renderer */ uint16_t *nSamplesRendered, /* o : number of samples rendered */ uint16_t *nSamplesAvailableNext, /* o : number of samples still available in the renerer pipeline */ - int16_t *pcmBuf /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ +#ifdef API_5MS + IVAS_DEC_PCM_TYPE pcmType, + void *pcmBuf +#else + int16_t *pcmBuf +#endif ) { Decoder_Struct *st_ivas; @@ -1392,7 +1501,11 @@ ivas_error IVAS_DEC_GetRenderedSamples( st_ivas = hIvasDec->st_ivas; /* run the main IVAS decoding routine */ - if ( ( error = ivas_jbm_dec_render( st_ivas, nSamplesForRendering, nSamplesRendered, nSamplesAvailableNext, pcmBuf ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_jbm_dec_render( st_ivas, nSamplesForRendering, nSamplesRendered, nSamplesAvailableNext, +#ifdef API_5MS + pcm_type_API_to_internal( pcmType ), +#endif + pcmBuf ) ) != IVAS_ERR_OK ) { return error; } @@ -2216,7 +2329,7 @@ static bool isSidFrame( static void bsCompactToSerial( const uint8_t *compact, uint16_t *serial, uint16_t num_bits ) { - /* Bitstream conversion is not counted towards complexity and memory usage */ +/* Bitstream conversion is not counted towards complexity and memory usage */ #define WMC_TOOL_SKIP uint32_t i; uint8_t byte = 0; @@ -2369,9 +2482,14 @@ ivas_error IVAS_DEC_VoIP_SetScale( *---------------------------------------------------------------------*/ ivas_error IVAS_DEC_VoIP_GetSamples( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - uint16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ - int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + uint16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ +#ifdef API_5MS + IVAS_DEC_PCM_TYPE pcmType, + void *pcmBuf, +#else + int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ +#endif const uint32_t systemTimestamp_ms /* i : current system timestamp */ #ifdef SUPPORT_JBM_TRACEFILE , @@ -2512,7 +2630,11 @@ ivas_error IVAS_DEC_VoIP_GetSamples( /* codec mode to use not known yet - simply output silence */ /* directly set output zero */ int16_t nSamplesToZero = min( nSamplesPerChannel, hIvasDec->nSamplesAvailableNext ); +#ifdef API_5MS + set_pcm_buffer_to_zero( pcm_buffer_offset( pcmBuf, pcmType, nSamplesRendered * nOutChannels ), pcmType, nSamplesToZero * nOutChannels ); +#else set_s( pcmBuf + nSamplesRendered * nOutChannels, 0, nSamplesToZero * nOutChannels ); +#endif nSamplesRendered += nSamplesToZero; hIvasDec->nSamplesRendered += nSamplesToZero; hIvasDec->nSamplesAvailableNext -= nSamplesToZero; @@ -2524,7 +2646,14 @@ ivas_error IVAS_DEC_VoIP_GetSamples( nSamplesToRender = nSamplesPerChannel - nSamplesRendered; /* render IVAS frames directly to the output buffer */ - if ( ( error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, pcmBuf + nSamplesRendered * nOutChannels, &nSamplesRendered_loop, &tmp ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, +#ifdef API_5MS + pcmType, + pcm_buffer_offset( pcmBuf, pcmType, nSamplesRendered * nOutChannels ), +#else + pcmBuf + nSamplesRendered * nOutChannels, +#endif + &nSamplesRendered_loop, &tmp ) ) != IVAS_ERR_OK ) { return error; } @@ -2930,7 +3059,12 @@ ivas_error IVAS_DEC_VoIP_GetSamples( ivas_error IVAS_DEC_Flush( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const int16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ - int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ +#ifdef API_5MS + const IVAS_DEC_PCM_TYPE pcmType, + void *pcmBuf, +#else + int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ +#endif #ifndef API_5MS uint16_t *nSamplesAvailableNext, /* o : number of samples still available */ #endif @@ -2993,7 +3127,11 @@ ivas_error IVAS_DEC_Flush( #else nSamplesToRender = (uint16_t) *nSamplesFlushed; /* render IVAS frames */ - if ( ( error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesFlushedLocal, &hIvasDec->nSamplesAvailableNext, pcmBuf ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesFlushedLocal, &hIvasDec->nSamplesAvailableNext, +#ifdef API_5MS + pcmType, +#endif + pcmBuf ) ) != IVAS_ERR_OK ) { return error; } @@ -4147,3 +4285,64 @@ ivas_error IVAS_DEC_GetCldfbSamples( return error; } #endif + +#ifdef API_5MS +void *pcm_buffer_offset( void *buffer, const IVAS_DEC_PCM_TYPE pcmType, int32_t offset ) +{ + switch ( pcmType ) + { + case IVAS_DEC_PCM_FLOAT: + { + float *tmpBuf = (float *) buffer; + return (void *) ( tmpBuf + offset ); + } + break; + case IVAS_DEC_PCM_INT16: + { + int16_t *tmpBuf = (int16_t *) buffer; + return (void *) ( tmpBuf + offset ); + } + break; + default: + return NULL; + } +} + +ivas_error set_pcm_buffer_to_zero( void *buffer, const IVAS_DEC_PCM_TYPE pcmType, int16_t nZeroSamples ) +{ + ivas_error error; + error = IVAS_ERR_OK; + + switch ( pcmType ) + { + case IVAS_DEC_PCM_FLOAT: + set_zero( (float *) buffer, nZeroSamples ); + break; + case IVAS_DEC_PCM_INT16: + set_s( (int16_t *) buffer, 0, nZeroSamples ); + break; + default: + error = IVAS_ERR_INTERNAL; + } + return error; +} + +PCM_RESOLUTION pcm_type_API_to_internal( const IVAS_DEC_PCM_TYPE pcmType ) +{ + PCM_RESOLUTION pcm_resolution; + pcm_resolution = PCM_NOT_KNOW; + switch ( pcmType ) + { + case IVAS_DEC_PCM_FLOAT: + pcm_resolution = PCM_FLOAT32; + break; + case IVAS_DEC_PCM_INT16: + pcm_resolution = PCM_INT16; + break; + default: + pcm_resolution = PCM_NOT_KNOW; + } + return pcm_resolution; +} + +#endif diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 3aa1f89236..c8611d6c2c 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -108,6 +108,16 @@ typedef enum _IVAS_DEC_FORCED_REND_MODE } IVAS_DEC_FORCED_REND_MODE; #endif +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT +typedef enum _IVAS_DEC_PCM_TYPE +{ + IVAS_DEC_PCM_INT16, + IVAS_DEC_PCM_FLOAT, + IVAS_DEC_PCM_INVALID +} IVAS_DEC_PCM_TYPE; +#endif + + /* bitstream formats that can be consumed */ typedef enum _IVAS_DEC_BS_FORMAT { @@ -186,7 +196,12 @@ ivas_error IVAS_DEC_GetSamples( #ifdef API_5MS IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const int16_t nSamplesAsked, /* i: number of samples wanted by the caller */ - int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT + const IVAS_DEC_PCM_TYPE pcmType, /* i : type for the decoded PCM resolution */ + void *pcmBuf, /* o : output synthesis signal */ +#else + int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ +#endif int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ bool *needNewFrame /* indication that the decoder needs a new frame */ #else @@ -319,7 +334,12 @@ ivas_error IVAS_DEC_VoIP_SetScale( ivas_error IVAS_DEC_VoIP_GetSamples( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ uint16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ - int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ +#ifdef API_5MS + IVAS_DEC_PCM_TYPE pcmType, + void *pcmBuf, +#else + int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ +#endif const uint32_t systemTimestamp_ms /* i : current system timestamp */ #ifndef API_5MS , @@ -334,7 +354,12 @@ ivas_error IVAS_DEC_VoIP_GetSamples( ivas_error IVAS_DEC_Flush( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const int16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ - int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ +#ifdef API_5MS + const IVAS_DEC_PCM_TYPE pcmType, + void *pcmBuf, +#else + int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ +#endif #ifndef API_5MS uint16_t *nSamplesAvailableNext, /* o : number of samples still available */ #endif @@ -356,6 +381,16 @@ ivas_error IVAS_DEC_EnableVoIP( const IVAS_DEC_INPUT_FORMAT inputFormat /* i : format of the input bitstream */ ); +#ifdef API_5MS +#ifdef SPLIT_REND_WITH_HEAD_ROT + +/*! r: error code */ +ivas_error IVAS_DEC_EnableSplitRendering( + IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle */ +); +#endif +#endif + #ifdef DEBUGGING bool IVAS_DEC_GetBerDetectFlag( IVAS_DEC_HANDLE hIvasDec /* i : IVAS decoder handle */ -- GitLab From 3c5bad0662862bd5ccf1cb5e0439da9fc1eb8087 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Mon, 7 Aug 2023 17:18:26 +0200 Subject: [PATCH 103/175] Continue fixing 0 DOF (WIP) --- lib_com/common_api_types.h | 6 +++ lib_com/options.h | 1 + lib_dec/ivas_jbm_dec.c | 39 ++++++++++++++-- lib_dec/lib_dec.c | 26 +++++++---- lib_rend/ivas_crend.c | 4 ++ lib_rend/ivas_prot_rend.h | 3 ++ lib_rend/ivas_render_config.c | 3 ++ lib_rend/ivas_splitRendererPre.c | 37 +++++++++++++-- lib_rend/ivas_splitRenderer_utils.c | 12 +++++ lib_rend/lib_rend.c | 72 ++++++++++++++++++----------- lib_util/render_config_reader.c | 15 ++++++ 11 files changed, 174 insertions(+), 44 deletions(-) diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index ccef204b29..717d29d17f 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -132,6 +132,9 @@ typedef struct ivas_split_rend_bits_t int32_t buf_len; /*size of bits_buf in bytes. This field should be set by allocator of bits_buf*/ int32_t bits_written; int32_t bits_read; +#ifdef API_5MS + int16_t codec_frame_size_ms; /* TODO complete implementation */ +#endif IVAS_SPLIT_REND_CODEC codec; IVAS_SPLIT_REND_POSE_CORRECTION_MODE pose_correction; } ivas_split_rend_bits_t, IVAS_SPLIT_REND_BITS, *IVAS_SPLIT_REND_BITS_HANDLE; @@ -202,6 +205,9 @@ typedef struct _IVAS_SPLIT_REND_CONFIG 3 - (3dof correction. By default YAW, PITCH and ROLL correction) */ int16_t codec_delay_ms; /*PLACEHOLDER (currently being ignored) : look ahead delay of the codec that is used to code BIN signal output of pre-renderer*/ +#ifdef API_5MS + int16_t codec_frame_size_ms; /*Codec frame size in milliseconds, only relevant with LC3plus */ +#endif IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode; IVAS_SPLIT_REND_CODEC codec; IVAS_SPLIT_REND_RENDERER_SELECTION rendererSelection; diff --git a/lib_com/options.h b/lib_com/options.h index 0a93485a75..959a01568d 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -164,6 +164,7 @@ #define FIX_XXX_JBM_USAN /* FhG: fix usan in acessing transport channel buffers */ #define FIX_XXX_PARAMISM_JBM_ENER_CORRECTION /* FhG: fix energy correction in ParamISM rendering */ #define NONBE_FIX_589_JBM_TC_OFFSETS +#define FIX_JBM_MC2SBA /* FhG: fix check for transport vs. internal channel count in JBM prior to ivas_mc2sba() */ #define API_5MS /* FhG: 5ms rendering capability */ #ifdef API_5MS #define API_5MS_BASELINE /* FhG: baseline with 20ms rendering and split rendering through 20ms branch */ diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 80ee43bfb2..8949d5bb20 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -370,7 +370,14 @@ ivas_error ivas_jbm_dec_tc( if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) ) { - if ( ( st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe ) <= ( st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe ) ) + if ( ( st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe ) +#ifdef FIX_JBM_MC2SBA + >= +#else + <= +#endif + ( st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe ) ) + { ivas_mc2sba( st_ivas->hTransSetup, p_output, p_output, output_frame, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); } @@ -936,10 +943,21 @@ ivas_error ivas_jbm_dec_render( { if ( st_ivas->mc_mode == MC_MODE_MCT ) { +#ifdef FIX_JBM_MC2SBA + int16_t crendInPlaceRotation = FALSE; +#endif *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) ) { - ivas_mc2sba( st_ivas->hTransSetup, p_tc, p_output, *nSamplesRendered, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); +#ifdef FIX_JBM_MC2SBA + if ( ( st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe ) < ( st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe ) ) + { + crendInPlaceRotation = TRUE; +#endif + ivas_mc2sba( st_ivas->hTransSetup, p_tc, p_output, *nSamplesRendered, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); +#ifdef FIX_JBM_MC2SBA + } +#endif } /* Rendering */ @@ -947,7 +965,14 @@ ivas_error ivas_jbm_dec_render( { if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig, st_ivas->hCombinedOrientationData, - &st_ivas->hIntSetup, st_ivas->hEFAPdata, st_ivas->hTcBuffer, p_tc, p_output, *nSamplesRendered, output_Fs ) ) != IVAS_ERR_OK ) + &st_ivas->hIntSetup, st_ivas->hEFAPdata, st_ivas->hTcBuffer, +#ifdef FIX_JBM_MC2SBA + crendInPlaceRotation ? p_output : p_tc, +#else + p_tc, +#endif + p_output, + *nSamplesRendered, output_Fs ) ) != IVAS_ERR_OK ) { return error; } @@ -1580,7 +1605,13 @@ int16_t ivas_jbm_dec_get_num_tc_channels( /* do all static dmx already in the TC decoder if less channels than transported... */ if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) ) { - if ( ( st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe ) > ( st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe ) ) + if ( ( st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe ) +#ifdef FIX_JBM_MC2SBA + >= +#else + > +#endif + ( st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe ) ) { num_tc = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; } diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 3220a14d96..c00c6fef58 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1128,6 +1128,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( int32_t output_Fs; float output[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES][L_FRAME48k]; int16_t output_int[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES * L_FRAME48k]; /* TODO(sgi): Need conversion */ + int16_t numSamplesPerChannelCacheSize; int16_t numSamplesPerChannelToDecode; int16_t numSamplesPerChannelToSplitEncode; int16_t i, j; @@ -1153,11 +1154,12 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( hIvasDec->st_ivas->hRenderConfig->split_rend_config.dof == 0 ) { numSamplesPerChannelToSplitEncode = (int16_t) ( output_Fs / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ); + numSamplesPerChannelCacheSize = numSamplesPerChannelToDecode - numSamplesPerChannelToSplitEncode; if ( hSplitBinRend->tdDataOut == NULL ) { /* Allocate enough space to save all decoded samples that will not be split encoded directly after decoding */ - hSplitBinRend->tdDataOut = malloc( ( numSamplesPerChannelToDecode - numSamplesPerChannelToSplitEncode ) * BINAURAL_CHANNELS * numPoses * sizeof( float ) ); + hSplitBinRend->tdDataOut = malloc( numSamplesPerChannelCacheSize * BINAURAL_CHANNELS * numPoses * sizeof( float ) ); if ( hSplitBinRend->tdDataOut == NULL ) { return IVAS_ERR_FAILED_ALLOC; @@ -1167,6 +1169,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( else { numSamplesPerChannelToSplitEncode = (int16_t) ( output_Fs / FRAMES_PER_SEC ); + numSamplesPerChannelCacheSize = 0; } if ( output_config != AUDIO_CONFIG_BINAURAL_SPLIT_CODED && output_config != AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) @@ -1189,7 +1192,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( } assert( numSamplesPerChannelToDecode == *nOutSamples ); #ifdef DEBUGGING - dbgwrite( output_int, sizeof( int16_t ), 960 * 2, 1, "res/output_int.raw" ); + dbgwrite( output_int, sizeof( int16_t ), numSamplesPerChannelToDecode * 2, 1, "res/output_int.pcm" ); #endif /* copy to cache if cache is in use */ @@ -1203,7 +1206,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( while ( readPtr != readEnd ) { - *writePtr++ = *readPtr++; /* TODO: test */ + *writePtr++ = *readPtr++; } hSplitBinRend->numTdSamplesPerChannelCached = *nOutSamples - numSamplesPerChannelToSplitEncode; } @@ -1215,19 +1218,19 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( int16_t *writePtr; float *readPtr, *readEnd; - readPtr = hSplitBinRend->tdDataOut + ( numSamplesPerChannelToDecode - hSplitBinRend->numTdSamplesPerChannelCached ) * BINAURAL_CHANNELS * numPoses; + readPtr = hSplitBinRend->tdDataOut + ( numSamplesPerChannelCacheSize - hSplitBinRend->numTdSamplesPerChannelCached ) * BINAURAL_CHANNELS * numPoses; readEnd = readPtr + numSamplesPerChannelToSplitEncode * BINAURAL_CHANNELS * numPoses; writePtr = output_int; while ( readPtr != readEnd ) { - *writePtr++ = *readPtr++; /* TODO: test */ + *writePtr++ = *readPtr++; } hSplitBinRend->numTdSamplesPerChannelCached -= numSamplesPerChannelToSplitEncode; } /* [tmp] convert int back to float and change buffer layout */ - for ( i = 0; i < *nOutSamples; ++i ) + for ( i = 0; i < numSamplesPerChannelToSplitEncode; ++i ) { #ifdef DEBUGGING for ( j = 0; j < BINAURAL_CHANNELS * numPoses; ++j ) @@ -1241,7 +1244,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( } } #ifdef DEBUGGING - dbgwrite( output[0], sizeof( float ), 960, 1, "res/output.raw" ); + dbgwrite( output[0], sizeof( float ), 240, 1, "res/output.pcm" ); #endif max_band = (int16_t) ( ( BINAURAL_MAXBANDS * output_Fs ) / 48000 ); pcm_out = ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0; @@ -1251,6 +1254,9 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( st_ivas->hHeadTrackData->Quaternion, st_ivas->hRenderConfig->split_rend_config.splitRendBitRate, st_ivas->hRenderConfig->split_rend_config.codec, +#ifdef API_5MS + st_ivas->hRenderConfig->split_rend_config.codec_frame_size_ms, +#endif hSplitBinRend->hSplitRendBits, hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural, hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural, @@ -2063,6 +2069,9 @@ static ivas_error copyRendererConfigStruct( RENDER_CONFIG_HANDLE hRCin, IVAS_REN hRCout->split_rend_config.dof = 3; hRCout->split_rend_config.hq_mode = 0; hRCout->split_rend_config.codec_delay_ms = 0; +#ifdef API_5MS + hRCout->split_rend_config.codec_frame_size_ms = 5; +#endif hRCout->split_rend_config.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; hRCout->split_rend_config.poseCorrectionMode = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB; hRCout->split_rend_config.rendererSelection = hRCin->split_rend_config.rendererSelection; @@ -2140,7 +2149,8 @@ ivas_error IVAS_DEC_GetDefaultRenderConfig( IVAS_RENDER_CONFIG_HANDLE hRCout /* o : Render config handle */ ) { - RENDER_CONFIG_HANDLE hRCin; + RENDER_CONFIG_DATA RCin; + RENDER_CONFIG_HANDLE hRCin = &RCin; ivas_error error; if ( ( error = ivas_render_config_init_from_rom( &hRCin ) ) != IVAS_ERR_OK ) diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index cdd1a1c3d2..95b9c78781 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -1624,7 +1624,11 @@ ivas_error ivas_rend_crendProcessSubframe( { int16_t subframe_idx, subframe_len; int16_t nchan_out, nchan_in, ch, first_sf, last_sf, slot_size, slots_to_render; +#ifdef FIX_JBM_MC2SBA + float *tc_local[MAX_OUTPUT_CHANNELS]; +#else float *tc_local[MAX_TRANSPORT_CHANNELS]; +#endif float pcm_tmp[BINAURAL_CHANNELS][L_FRAME48k]; float *p_pcm_tmp[BINAURAL_CHANNELS]; AUDIO_CONFIG in_config; diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 1cccabf7a3..e52d9d312c 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -1509,6 +1509,9 @@ ivas_error ivas_renderMultiBinToSplitBinaural( #endif const int32_t SplitRendBitRate, IVAS_SPLIT_REND_CODEC splitCodec, + #ifdef API_5MS + const int16_t codec_frame_size_ms, + #endif ivas_split_rend_bits_t *pBits, float Cldfb_In_BinReal[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], float Cldfb_In_BinImag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], diff --git a/lib_rend/ivas_render_config.c b/lib_rend/ivas_render_config.c index e4a62d217f..01f4e96840 100644 --- a/lib_rend/ivas_render_config.c +++ b/lib_rend/ivas_render_config.c @@ -129,6 +129,9 @@ ivas_error ivas_render_config_init_from_rom( ( *hRenderConfig )->split_rend_config.dof = 3; ( *hRenderConfig )->split_rend_config.hq_mode = 0; ( *hRenderConfig )->split_rend_config.codec_delay_ms = 0; +#ifdef API_5MS + ( *hRenderConfig )->split_rend_config.codec_frame_size_ms = 5; +#endif ( *hRenderConfig )->split_rend_config.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; ( *hRenderConfig )->split_rend_config.poseCorrectionMode = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB; ( *hRenderConfig )->split_rend_config.rendererSelection = IVAS_SPLIT_REND_RENDERER_SELECTION_DEFAULT; diff --git a/lib_rend/ivas_splitRendererPre.c b/lib_rend/ivas_splitRendererPre.c index 54aaa8283b..31665f707e 100644 --- a/lib_rend/ivas_splitRendererPre.c +++ b/lib_rend/ivas_splitRendererPre.c @@ -1863,8 +1863,13 @@ static ivas_error split_renderer_open_lc3plus( SPLIT_REND_WRAPPER *hSplitRendWra int32_t i, delayBufferLength; LC3PLUS_CONFIG config; +#ifdef API_5MS + config.lc3plus_frame_duration_us = pSplitRendConfig->codec_frame_size_ms * 1000; + config.ivas_frame_duration_us = ( pSplitRendConfig->dof == 0 ) ? config.lc3plus_frame_duration_us : 20000; +#else config.lc3plus_frame_duration_us = 5000; config.ivas_frame_duration_us = 20000; +#endif config.samplerate = OutSampleRate; config.channels = BINAURAL_CHANNELS; @@ -2094,7 +2099,7 @@ static ivas_error splitRendLc3plusEncodeAndWrite( /* Write bitstream */ #ifdef DEBUGGING - dbgwrite(in[0], sizeof(float), 960, 1, "res/IVAS_LC3PLUS_ENC_Encode.raw"); + dbgwrite( in[0], sizeof( float ), 960, 1, "res/IVAS_LC3PLUS_ENC_Encode.raw" ); #endif if ( ( error = IVAS_LC3PLUS_ENC_Encode( hSplitBin->hLc3plusEnc, channel_ptrs, &pBits->bits_buf[pBits->bits_written / 8] ) ) != IVAS_ERR_OK ) { @@ -2114,6 +2119,9 @@ static ivas_error ivas_renderMultiTDBinToSplitBinaural( const IVAS_QUATERNION headPositions[MAX_PARAM_SPATIAL_SUBFRAMES], #endif const int32_t SplitRendBitRate, +#ifdef API_5MS + const int16_t codec_frame_size_ms, +#endif ivas_split_rend_bits_t *pBits, const int16_t max_bands, float in[][L_FRAME48k], @@ -2138,7 +2146,11 @@ static ivas_error ivas_renderMultiTDBinToSplitBinaural( if ( useLc3plus ) { +#ifdef API_5MS + int32_t frame_size = hSplitBin->hLc3plusEnc->config.samplerate * codec_frame_size_ms / 1000; +#else int32_t frame_size = hSplitBin->hLc3plusEnc->config.samplerate / (int32_t) FRAMES_PER_SECOND; +#endif for ( i = 0; i < num_poses * BINAURAL_CHANNELS; ++i ) { @@ -2160,6 +2172,12 @@ static ivas_error ivas_renderMultiTDBinToSplitBinaural( if ( ( hSplitBin->multiBinPoseData.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) || ( !useLc3plus && !pcm_out ) ) { +#ifdef API_5MS + if ( codec_frame_size_ms != 20 ) + { + return IVAS_ERROR( IVAS_ERR_INVALID_INPUT_BUFFER_SIZE, "Unsupported framing for LCLD codec!" ); + } +#endif num_cldfb_bands = hSplitBin->hCldfbHandles->cldfbAna[0]->no_channels; /* CLDFB Analysis*/ @@ -2321,6 +2339,9 @@ ivas_error ivas_renderMultiBinToSplitBinaural( #endif const int32_t SplitRendBitRate, IVAS_SPLIT_REND_CODEC splitCodec, +#ifdef API_5MS + const int16_t codec_frame_size_ms, +#endif ivas_split_rend_bits_t *pBits, float Cldfb_In_BinReal[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], float Cldfb_In_BinImag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], @@ -2357,7 +2378,11 @@ ivas_error ivas_renderMultiBinToSplitBinaural( #else headPositions, #endif - SplitRendBitRate, pBits, max_bands, out, + SplitRendBitRate, +#ifdef API_5MS + codec_frame_size_ms, +#endif + pBits, max_bands, out, low_res_pre_rend_rot, pcm_out ); pop_wmops(); return error; @@ -2451,9 +2476,13 @@ ivas_error ivas_renderMultiBinToSplitBinaural( pBits->codec = IVAS_SPLIT_REND_CODEC_NONE; } - /*zero pad*/ - /*TODO: do this inside the LCLD ENC codec */ +/*zero pad*/ +/*TODO: do this inside the LCLD ENC codec */ +#ifdef API_5MS + bit_len = SplitRendBitRate * codec_frame_size_ms / 1000; +#else bit_len = SplitRendBitRate / FRAMES_PER_SEC; +#endif while ( pBits->bits_written < bit_len ) { diff --git a/lib_rend/ivas_splitRenderer_utils.c b/lib_rend/ivas_splitRenderer_utils.c index 3d5a20b2b0..0e94d3eeb3 100644 --- a/lib_rend/ivas_splitRenderer_utils.c +++ b/lib_rend/ivas_splitRenderer_utils.c @@ -573,6 +573,18 @@ ivas_error ivas_split_rend_validate_config( const IVAS_SPLIT_REND_CONFIG_DATA *p return IVAS_ERROR( IVAS_ERR_INVALID_SPLIT_REND_CONFIG, "0 DOF and pose correction NONE must only ever be set together" ); } +#ifdef API_5MS + if ( pSplitRendConfig->codec == IVAS_SPLIT_REND_CODEC_LCLD && pSplitRendConfig->codec_frame_size_ms != 20 ) + { + return IVAS_ERROR( IVAS_ERR_INVALID_SPLIT_REND_CONFIG, "Invalid framing for LCLD codec" ); + } + else if ( pSplitRendConfig->codec == IVAS_SPLIT_REND_CODEC_LC3PLUS && + ( pSplitRendConfig->codec_frame_size_ms != 5 && pSplitRendConfig->codec_frame_size_ms != 10 ) ) + { + return IVAS_ERROR( IVAS_ERR_INVALID_SPLIT_REND_CONFIG, "Invalid framing for LC3plus codec" ); + } +#endif + /* Validate bitrate */ if ( is_pcm_out == 0 ) { diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index e40f17eb1a..ca912f6824 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -5039,6 +5039,9 @@ int16_t IVAS_REND_GetRenderConfig( hRCout->split_rend_config.dof = 3; hRCout->split_rend_config.hq_mode = 0; hRCout->split_rend_config.codec_delay_ms = 0; +#ifdef API_5MS + hRCout->split_rend_config.codec_frame_size_ms = 5; +#endif hRCout->split_rend_config.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; hRCout->split_rend_config.poseCorrectionMode = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB; hRCout->split_rend_config.rendererSelection = hRCin->split_rend_config.rendererSelection; @@ -5140,14 +5143,14 @@ int16_t IVAS_REND_FeedRenderConfig( *-------------------------------------------------------------------*/ ivas_error IVAS_REND_FeedSplitBinauralBitstream( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - const IVAS_REND_InputId inputId, /* i : ID of the input */ - IVAS_REND_BitstreamBuffer *hBits /* i : buffer for input bitstream */ + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + const IVAS_REND_InputId inputId, /* i : ID of the input */ + IVAS_REND_BitstreamBuffer *hBits /* i : buffer for input bitstream */ ) { ivas_error error; input_base *inputBase; - input_split_post_rend* inputSplitPostRend; + input_split_post_rend *inputSplitPostRend; /* Validate function arguments */ if ( hIvasRend == NULL || hBits == NULL ) @@ -5160,7 +5163,7 @@ ivas_error IVAS_REND_FeedSplitBinauralBitstream( return error; } - inputSplitPostRend = (input_split_post_rend*) inputBase; + inputSplitPostRend = (input_split_post_rend *) inputBase; inputSplitPostRend->hBits = hBits; return IVAS_ERR_OK; @@ -7693,6 +7696,9 @@ static ivas_error renderSplitBinauralWithPostRot( float tmpCrendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; COMBINED_ORIENTATION_HANDLE pCombinedOrientationData; SPLIT_POST_REND_WRAPPER *hSplitBin; +#ifdef API_5MS + RENDER_CONFIG_HANDLE hRenderConfig; +#endif int8_t isPostRendInputCldfb; isPostRendInputCldfb = 0; @@ -7704,6 +7710,7 @@ static ivas_error renderSplitBinauralWithPostRot( pCombinedOrientationData = *splitBinInput->base.ctx.pCombinedOrientationData; hSplitBin = &splitBinInput->splitPostRendWrapper; #ifdef API_5MS + hRenderConfig = ( *splitBinInput->base.ctx.hhRendererConfig ); convertBitsBufferToInternalBitsBuff( *splitBinInput->hBits, &bits ); #else convertBitsBufferToInternalBitsBuff( *hBits, &bits ); @@ -7720,8 +7727,13 @@ static ivas_error renderSplitBinauralWithPostRot( else if ( bits.codec == IVAS_SPLIT_REND_CODEC_LC3PLUS && splitBinInput->splitPostRendWrapper.hLc3plusDec == NULL ) { LC3PLUS_CONFIG config; +#ifdef API_5MS + config.lc3plus_frame_duration_us = hRenderConfig->split_rend_config.codec_frame_size_ms * 1000; + config.ivas_frame_duration_us = ( hRenderConfig->split_rend_config.dof == 0 ) ? config.lc3plus_frame_duration_us : 20000; +#else config.lc3plus_frame_duration_us = 5000; - config.ivas_frame_duration_us = 20000; /* TODO(sgi): this will be 20ms (non-0 DOF) or 5ms (0 DOF) depending on split rendering config */ + config.ivas_frame_duration_us = 20000; +#endif config.channels = BINAURAL_CHANNELS; config.samplerate = *splitBinInput->base.ctx.pOutSampleRate; @@ -7773,7 +7785,7 @@ static ivas_error renderSplitBinauralWithPostRot( /* decode audio */ if ( splitBinInput->base.inConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) { /* TODO(sgi): For both codecs: decode 20ms, cache last 15ms for the next 3 rendering calls */ - if (splitBinInput->numCachedSamples == 0) + if ( splitBinInput->numCachedSamples == 0 ) { if ( bits.codec == IVAS_SPLIT_REND_CODEC_LCLD ) { @@ -7789,22 +7801,22 @@ static ivas_error renderSplitBinauralWithPostRot( { error = splitBinLc3plusDecode( hSplitBin, &bits, tmpCrendBuffer, bits.pose_correction ); #ifdef DEBUGGING - dbgwrite(tmpCrendBuffer[0], sizeof(float), 960, 1, "res/splitBinLc3plusDecode.raw"); + dbgwrite( tmpCrendBuffer[0], sizeof( float ), 960, 1, "res/splitBinLc3plusDecode.raw" ); #endif if ( error != IVAS_ERR_OK ) { return error; } splitBinInput->numCachedSamples = 720; - mvr2r(&tmpCrendBuffer[0][240], splitBinInput->bufferData, 720); - mvr2r(&tmpCrendBuffer[1][240], splitBinInput->bufferData + 720, 720); + mvr2r( &tmpCrendBuffer[0][240], splitBinInput->bufferData, 720 ); + mvr2r( &tmpCrendBuffer[1][240], splitBinInput->bufferData + 720, 720 ); } } else { int16_t tdToCldfbSampleFact = 1; /* TODO(sgi): */ - mvr2r(splitBinInput->bufferData + 720 - splitBinInput->numCachedSamples, tmpCrendBuffer[0], 240); - mvr2r(720 + splitBinInput->bufferData + 720 - splitBinInput->numCachedSamples, tmpCrendBuffer[1], 240); + mvr2r( splitBinInput->bufferData + 720 - splitBinInput->numCachedSamples, tmpCrendBuffer[0], 240 ); + mvr2r( 720 + splitBinInput->bufferData + 720 - splitBinInput->numCachedSamples, tmpCrendBuffer[1], 240 ); splitBinInput->numCachedSamples -= 240; } } @@ -7840,7 +7852,7 @@ static ivas_error renderSplitBinauralWithPostRot( else if ( bits.pose_correction == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) { #ifdef DEBUGGING - dbgwrite(tmpCrendBuffer[0], sizeof(float), 240, 1, "res/splitrend_dbg.raw"); + dbgwrite( tmpCrendBuffer[0], sizeof( float ), 240, 1, "res/splitrend_dbg.raw" ); #endif ivas_rend_CldfbSplitPostRendProcess( @@ -8461,9 +8473,10 @@ static ivas_error renderActiveInputsSplitBin( IVAS_REND_HANDLE hIvasRend, IVAS_REND_AudioBuffer outAudio #ifndef API_5MS - ,IVAS_REND_BitstreamBuffer *hBits + , + IVAS_REND_BitstreamBuffer *hBits #endif - ) +) { int16_t i; input_split_post_rend *pCurrentInput; @@ -8479,7 +8492,7 @@ static ivas_error renderActiveInputsSplitBin( if ( ( error = renderInputSplitBin( pCurrentInput, hIvasRend->outputConfig, outAudio, #ifndef API_5MS - hBits, + hBits, #endif hIvasRend->splitRendBFI ) ) != IVAS_ERR_OK ) { @@ -9242,9 +9255,10 @@ ivas_error IVAS_REND_GetSamples( #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( error = renderActiveInputsSplitBin( hIvasRend, outAudio #ifndef API_5MS - , hBits + , + hBits #endif - ) ) != IVAS_ERR_OK ) + ) ) != IVAS_ERR_OK ) { return error; } @@ -9294,6 +9308,9 @@ ivas_error IVAS_REND_GetSamples( #endif hIvasRend->hRendererConfig->split_rend_config.splitRendBitRate, hIvasRend->hRendererConfig->split_rend_config.codec, +#ifdef API_5MS + hIvasRend->hRendererConfig->split_rend_config.codec_frame_size_ms, +#endif &bits, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, @@ -9330,33 +9347,32 @@ ivas_error IVAS_REND_GetSamples( IVAS_REND_AudioBuffer outAudio /* i/o: buffer for output audio */ ) { - return getSamplesInternal(hIvasRend, outAudio, NULL); + return getSamplesInternal( hIvasRend, outAudio, NULL ); } ivas_error IVAS_REND_GetSplitBinauralBitstream( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - IVAS_REND_BitstreamBuffer *hBits /* o : buffer for output bitstream */ + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_REND_BitstreamBuffer *hBits /* o : buffer for output bitstream */ ) { IVAS_REND_AudioBuffer dummyBuffer; /* Dummy values, just to satisfy checks in getSamplesInternal */ - dummyBuffer.data = (void*)hIvasRend; + dummyBuffer.data = (void *) hIvasRend; dummyBuffer.config.is_cldfb = 0; dummyBuffer.config.numChannels = BINAURAL_CHANNELS; dummyBuffer.config.numSamplesPerChannel = L_FRAME48k; - return getSamplesInternal(hIvasRend, dummyBuffer, hBits); + return getSamplesInternal( hIvasRend, dummyBuffer, hBits ); } ivas_error IVAS_REND_GetSplitBinauralSamples( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - IVAS_REND_AudioBuffer outAudio, /* i/o: buffer for output audio */ - bool* needNewFrame -) + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_REND_AudioBuffer outAudio, /* i/o: buffer for output audio */ + bool *needNewFrame ) { ivas_error error; - if ( ( error = getSamplesInternal(hIvasRend, outAudio, NULL) ) != IVAS_ERR_OK ) + if ( ( error = getSamplesInternal( hIvasRend, outAudio, NULL ) ) != IVAS_ERR_OK ) { return error; } diff --git a/lib_util/render_config_reader.c b/lib_util/render_config_reader.c index e93baa3c3f..358cb043f6 100644 --- a/lib_util/render_config_reader.c +++ b/lib_util/render_config_reader.c @@ -551,6 +551,21 @@ ivas_error RenderConfigReader_read( errorHandler( pValue, ERROR_VALUE_INVALID ); } } +#ifdef API_5MS + else if ( strcmp( item, "FRAMESIZE" ) == 0 ) + { + if ( !sscanf( pValue, "%hd", &hRenderConfig->split_rend_config.codec_frame_size_ms ) ) + { + errorHandler( item, ERROR_VALUE_INVALID ); + } + if ( hRenderConfig->split_rend_config.codec_frame_size_ms != 5 && + hRenderConfig->split_rend_config.codec_frame_size_ms != 10 && + hRenderConfig->split_rend_config.codec_frame_size_ms != 20 ) + { + errorHandler( item, ERROR_VALUE_INVALID ); + } + } +#endif else if ( strcmp( item, "POSECORRECTION" ) == 0 ) { poseCorrProvided = true; -- GitLab From 3fc58bbf309684a5e610cb18a4f6d1149d4b0c40 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Tue, 8 Aug 2023 08:04:49 +0200 Subject: [PATCH 104/175] fix a few compiler warnings, fix split rendering --- apps/decoder.c | 22 +++++++++++++--------- lib_dec/lib_dec.c | 28 +++++++++++++++++++--------- lib_dec/lib_dec.h | 6 +++++- 3 files changed, 37 insertions(+), 19 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 7fb8c36d2a..b8f6c1561f 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -441,6 +441,11 @@ int main( *--------------------------------------------------------------------*/ IVAS_RENDER_CONFIG_DATA renderConfig; + if ( ( error = IVAS_DEC_GetDefaultRenderConfig( &renderConfig ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_GetDefaultRenderConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } if ( arg.renderConfigEnabled ) { /* sanity check */ @@ -459,13 +464,6 @@ int main( goto cleanup; } #endif - - if ( ( error = IVAS_DEC_GetDefaultRenderConfig( &renderConfig ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nIVAS_DEC_GetDefaultRenderConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } - if ( RenderConfigReader_read( renderConfigReader, &renderConfig ) != IVAS_ERR_OK ) { fprintf( stderr, "Failed to read renderer configuration from file %s\n\n", arg.renderConfigFilename ); @@ -515,7 +513,12 @@ int main( #ifdef SPLIT_REND_WITH_HEAD_ROT if ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED || arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) { - if ( ( error = IVAS_DEC_EnableSplitRendering( hIvasDec ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_EnableSplitRendering( hIvasDec +#ifdef API_5MS_BASELINE + , + renderConfig +#endif + ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; @@ -666,6 +669,7 @@ int main( IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode ); #endif /* DEBUGGING */ +#ifndef API_5MS /*-------------------------------------------------------------------* * Load renderer configuration from file *--------------------------------------------------------------------*/ @@ -709,7 +713,7 @@ int main( goto cleanup; } } - +#endif /*------------------------------------------------------------------------------------------* * Load custom loudspeaker layout data *------------------------------------------------------------------------------------------*/ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index ab05131873..ef339cfad6 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -693,6 +693,10 @@ ivas_error IVAS_DEC_Configure( ivas_error IVAS_DEC_EnableSplitRendering( IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle */ +#ifdef API_5MS_BASELINE + , + IVAS_RENDER_CONFIG_DATA renderConfig +#endif ) { DECODER_CONFIG_HANDLE hDecoderConfig; @@ -709,7 +713,11 @@ ivas_error IVAS_DEC_EnableSplitRendering( hDecoderConfig = hIvasDec->st_ivas->hDecoderConfig; hDecoderConfig->Opt_Headrotation = 1; - hDecoderConfig->Opt_5ms = 0; +#ifdef API_5MS_BASELINE + hDecoderConfig->Opt_5ms = ( ( renderConfig.split_rend_config.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) || renderConfig.split_rend_config.dof == 0 ); +#endif + + hDecoderConfig->Opt_Limiter = 0; return error; @@ -1277,7 +1285,8 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( error = IVAS_DEC_GetSamples( hIvasDec, numSamplesPerChannelToDecode, - output_int, + IVAS_DEC_PCM_FLOAT, + pcmBuf, nOutSamples, needNewFrame ); if ( error != IVAS_ERR_OK ) @@ -1286,17 +1295,17 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( } assert( numSamplesPerChannelToDecode == *nOutSamples ); #ifdef DEBUGGING - dbgwrite( output_int, sizeof( int16_t ), numSamplesPerChannelToDecode * 2, 1, "res/output_int.pcm" ); + dbgwrite( output, sizeof( float ), numSamplesPerChannelToDecode * 2, 1, "res/output_float.pcm" ); #endif /* copy to cache if cache is in use */ if ( hSplitBinRend->tdDataOut != NULL ) { float *writePtr; - int16_t *readPtr, *readEnd; + float *readPtr, *readEnd; writePtr = hSplitBinRend->tdDataOut; - readPtr = output_int + numSamplesPerChannelToSplitEncode * BINAURAL_CHANNELS * numPoses; - readEnd = output_int + *nOutSamples * BINAURAL_CHANNELS * numPoses; + readPtr = pcmBuf + numSamplesPerChannelToSplitEncode * BINAURAL_CHANNELS * numPoses; + readEnd = pcmBuf + *nOutSamples * BINAURAL_CHANNELS * numPoses; while ( readPtr != readEnd ) { @@ -1310,11 +1319,11 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( /* copy from cache */ assert( hSplitBinRend->tdDataOut != NULL ); - int16_t *writePtr; + float *writePtr; float *readPtr, *readEnd; readPtr = hSplitBinRend->tdDataOut + ( numSamplesPerChannelCacheSize - hSplitBinRend->numTdSamplesPerChannelCached ) * BINAURAL_CHANNELS * numPoses; readEnd = readPtr + numSamplesPerChannelToSplitEncode * BINAURAL_CHANNELS * numPoses; - writePtr = output_int; + writePtr = pcmBuf; while ( readPtr != readEnd ) { @@ -2249,10 +2258,11 @@ ivas_error IVAS_DEC_GetRenderConfig( hRCout->split_rend_config.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; hRCout->split_rend_config.poseCorrectionMode = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB; hRCout->split_rend_config.rendererSelection = hRCin->split_rend_config.rendererSelection; -#endif #endif + return IVAS_ERR_OK; +#endif } #ifdef API_5MS diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 67276fc5a4..1b207ff3c4 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -386,7 +386,11 @@ ivas_error IVAS_DEC_EnableVoIP( /*! r: error code */ ivas_error IVAS_DEC_EnableSplitRendering( - IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle */ + IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle */ +#ifdef API_5MS_BASELINE + , + IVAS_RENDER_CONFIG_DATA renderConfig /* i : render configuration */ +#endif ); #endif #endif -- GitLab From 4e5ed44825fb1d1871b8d87cb79e7b3db5cccd16 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Tue, 8 Aug 2023 10:36:13 +0200 Subject: [PATCH 105/175] [fix] incorrect if condition for framesize check --- lib_rend/ivas_splitRendererPre.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_rend/ivas_splitRendererPre.c b/lib_rend/ivas_splitRendererPre.c index 31665f707e..b15603adce 100644 --- a/lib_rend/ivas_splitRendererPre.c +++ b/lib_rend/ivas_splitRendererPre.c @@ -2173,7 +2173,7 @@ static ivas_error ivas_renderMultiTDBinToSplitBinaural( ( !useLc3plus && !pcm_out ) ) { #ifdef API_5MS - if ( codec_frame_size_ms != 20 ) + if ( !useLc3plus && codec_frame_size_ms != 20 ) { return IVAS_ERROR( IVAS_ERR_INVALID_INPUT_BUFFER_SIZE, "Unsupported framing for LCLD codec!" ); } -- GitLab From 5ae96a879507b2e33f06269d6531ee446af79703 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Tue, 8 Aug 2023 11:24:29 +0200 Subject: [PATCH 106/175] Reintroduce missing IVAS_DEC_FeedRenderConfig call --- apps/decoder.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index b8f6c1561f..049217479a 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -669,7 +669,6 @@ int main( IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode ); #endif /* DEBUGGING */ -#ifndef API_5MS /*-------------------------------------------------------------------* * Load renderer configuration from file *--------------------------------------------------------------------*/ @@ -713,7 +712,6 @@ int main( goto cleanup; } } -#endif /*------------------------------------------------------------------------------------------* * Load custom loudspeaker layout data *------------------------------------------------------------------------------------------*/ -- GitLab From fc5d68769914e6bab8d82f474ec4dfad4d7e3126 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Tue, 8 Aug 2023 11:25:52 +0200 Subject: [PATCH 107/175] Fix default split codec framing --- lib_dec/ivas_init_dec.c | 10 ++++++ lib_dec/lib_dec.c | 18 ++++------- lib_rend/ivas_prot_rend.h | 12 +++++-- lib_rend/ivas_render_config.c | 2 +- lib_rend/ivas_splitRendererPre.c | 9 +++++- lib_rend/ivas_splitRenderer_utils.c | 50 +++++++++++++++++++++++------ lib_rend/lib_rend.c | 29 +++++++++++++++-- 7 files changed, 102 insertions(+), 28 deletions(-) diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 7c691d381f..d7bc98476b 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -196,7 +196,17 @@ ivas_error ivas_dec_init_split_rend( } } +#ifdef API_5MS + if ( ( error = ivas_split_rend_choose_default_codec( &st_ivas->hRenderConfig->split_rend_config.codec, + &st_ivas->hRenderConfig->split_rend_config.codec_frame_size_ms, + ( cldfb_in == 0 ), + pcm_out ) ) != IVAS_ERR_OK ) + { + return error; + } +#else ivas_split_rend_choose_default_codec( &st_ivas->hRenderConfig->split_rend_config.codec, ( cldfb_in == 0 ), pcm_out ); +#endif error = ivas_split_renderer_open( &st_ivas->splitBinRend.splitrend, &st_ivas->hRenderConfig->split_rend_config, diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index ef339cfad6..cfda42c48b 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1229,7 +1229,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( AUDIO_CONFIG output_config; int32_t output_Fs; float output[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES][L_FRAME48k]; - float pcmBuf[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES * L_FRAME48k]; /* TODO(sgi): Need conversion */ + float pcmBuf[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES * L_FRAME48k]; int16_t numSamplesPerChannelCacheSize; int16_t numSamplesPerChannelToDecode; int16_t numSamplesPerChannelToSplitEncode; @@ -1295,7 +1295,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( } assert( numSamplesPerChannelToDecode == *nOutSamples ); #ifdef DEBUGGING - dbgwrite( output, sizeof( float ), numSamplesPerChannelToDecode * 2, 1, "res/output_float.pcm" ); + dbgwrite( output, sizeof( float ), numSamplesPerChannelToDecode * BINAURAL_CHANNELS * numPoses, 1, "res/output_float.pcm" ); #endif /* copy to cache if cache is in use */ @@ -1332,22 +1332,16 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( hSplitBinRend->numTdSamplesPerChannelCached -= numSamplesPerChannelToSplitEncode; } - /* [tmp] convert int back to float and change buffer layout */ + /* change buffer layout */ for ( i = 0; i < numSamplesPerChannelToSplitEncode; ++i ) { -#ifdef DEBUGGING for ( j = 0; j < BINAURAL_CHANNELS * numPoses; ++j ) { - output[j][i] = 0; - } -#endif - for ( j = 0; j < BINAURAL_CHANNELS /* * numPoses */; ++j ) - { - output[j][i] = pcmBuf[i * BINAURAL_CHANNELS /* * numPoses */ + j]; + output[j][i] = pcmBuf[i * BINAURAL_CHANNELS * numPoses + j]; } } #ifdef DEBUGGING - dbgwrite( output[0], sizeof( float ), 240, 1, "res/output.pcm" ); + dbgwrite( output[0], sizeof( float ), numSamplesPerChannelToSplitEncode, 1, "res/output.pcm" ); #endif max_band = (int16_t) ( ( BINAURAL_MAXBANDS * output_Fs ) / 48000 ); pcm_out = ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0; @@ -2191,7 +2185,7 @@ static ivas_error copyRendererConfigStruct( RENDER_CONFIG_HANDLE hRCin, IVAS_REN hRCout->split_rend_config.hq_mode = 0; hRCout->split_rend_config.codec_delay_ms = 0; #ifdef API_5MS - hRCout->split_rend_config.codec_frame_size_ms = 5; + hRCout->split_rend_config.codec_frame_size_ms = 0; /* 0 means "use default for selected codec" */ #endif hRCout->split_rend_config.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; hRCout->split_rend_config.poseCorrectionMode = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB; diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index e52d9d312c..74ab4098a4 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -1510,7 +1510,7 @@ ivas_error ivas_renderMultiBinToSplitBinaural( const int32_t SplitRendBitRate, IVAS_SPLIT_REND_CODEC splitCodec, #ifdef API_5MS - const int16_t codec_frame_size_ms, + int16_t codec_frame_size_ms, #endif ivas_split_rend_bits_t *pBits, float Cldfb_In_BinReal[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], @@ -1734,8 +1734,16 @@ void masaPrerendClose( ); #ifdef SPLIT_REND_WITH_HEAD_ROT -void ivas_split_rend_choose_default_codec( +#ifdef API_5MS +ivas_error +#else +void +#endif +ivas_split_rend_choose_default_codec( IVAS_SPLIT_REND_CODEC *pCodec, /* i/o: pointer to codec setting */ +#ifdef API_5MS + int16_t *pCodec_frame_size_ms, /* i/o: pointer to codec frame size setting */ +#endif int16_t isRenderingInTd, /* i : flag: is rendering done in TD? */ int16_t pcm_out /*i : flag to indicate PCM output*/ ); diff --git a/lib_rend/ivas_render_config.c b/lib_rend/ivas_render_config.c index 01f4e96840..6dfb7fd734 100644 --- a/lib_rend/ivas_render_config.c +++ b/lib_rend/ivas_render_config.c @@ -130,7 +130,7 @@ ivas_error ivas_render_config_init_from_rom( ( *hRenderConfig )->split_rend_config.hq_mode = 0; ( *hRenderConfig )->split_rend_config.codec_delay_ms = 0; #ifdef API_5MS - ( *hRenderConfig )->split_rend_config.codec_frame_size_ms = 5; + ( *hRenderConfig )->split_rend_config.codec_frame_size_ms = 0; /* 0 means "use default for selected codec" */ #endif ( *hRenderConfig )->split_rend_config.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; ( *hRenderConfig )->split_rend_config.poseCorrectionMode = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB; diff --git a/lib_rend/ivas_splitRendererPre.c b/lib_rend/ivas_splitRendererPre.c index b15603adce..0bd3c3acc4 100644 --- a/lib_rend/ivas_splitRendererPre.c +++ b/lib_rend/ivas_splitRendererPre.c @@ -2340,7 +2340,7 @@ ivas_error ivas_renderMultiBinToSplitBinaural( const int32_t SplitRendBitRate, IVAS_SPLIT_REND_CODEC splitCodec, #ifdef API_5MS - const int16_t codec_frame_size_ms, + int16_t codec_frame_size_ms, #endif ivas_split_rend_bits_t *pBits, float Cldfb_In_BinReal[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], @@ -2366,7 +2366,14 @@ ivas_error ivas_renderMultiBinToSplitBinaural( /* Needs to be done at runtime. If this was in another API function, * there would be no guarantee that the user did not change * the split rendering config before calling the main rendering function */ + #ifdef API_5MS + if ( ( error = ivas_split_rend_choose_default_codec( &splitCodec, &codec_frame_size_ms, td_input, pcm_out ) ) != IVAS_ERR_OK ) + { + return error; + } + #else ivas_split_rend_choose_default_codec( &splitCodec, td_input, pcm_out ); + #endif if ( td_input ) { diff --git a/lib_rend/ivas_splitRenderer_utils.c b/lib_rend/ivas_splitRenderer_utils.c index 0e94d3eeb3..155d140491 100644 --- a/lib_rend/ivas_splitRenderer_utils.c +++ b/lib_rend/ivas_splitRenderer_utils.c @@ -574,14 +574,17 @@ ivas_error ivas_split_rend_validate_config( const IVAS_SPLIT_REND_CONFIG_DATA *p } #ifdef API_5MS - if ( pSplitRendConfig->codec == IVAS_SPLIT_REND_CODEC_LCLD && pSplitRendConfig->codec_frame_size_ms != 20 ) + if ( pSplitRendConfig->codec_frame_size_ms != 0 ) /* 0 means "default for current codec", will be set to actual value at a later stage */ { - return IVAS_ERROR( IVAS_ERR_INVALID_SPLIT_REND_CONFIG, "Invalid framing for LCLD codec" ); - } - else if ( pSplitRendConfig->codec == IVAS_SPLIT_REND_CODEC_LC3PLUS && - ( pSplitRendConfig->codec_frame_size_ms != 5 && pSplitRendConfig->codec_frame_size_ms != 10 ) ) - { - return IVAS_ERROR( IVAS_ERR_INVALID_SPLIT_REND_CONFIG, "Invalid framing for LC3plus codec" ); + if ( pSplitRendConfig->codec == IVAS_SPLIT_REND_CODEC_LCLD && pSplitRendConfig->codec_frame_size_ms != 20 ) + { + return IVAS_ERROR( IVAS_ERR_INVALID_SPLIT_REND_CONFIG, "Invalid framing for LCLD codec" ); + } + if ( pSplitRendConfig->codec == IVAS_SPLIT_REND_CODEC_LC3PLUS && + ( pSplitRendConfig->codec_frame_size_ms != 5 && pSplitRendConfig->codec_frame_size_ms != 10 ) ) + { + return IVAS_ERROR( IVAS_ERR_INVALID_SPLIT_REND_CONFIG, "Invalid framing for LC3plus codec" ); + } } #endif @@ -878,8 +881,17 @@ void ivas_init_multi_bin_pose_data( MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData return; } - -void ivas_split_rend_choose_default_codec( IVAS_SPLIT_REND_CODEC *pCodec, int16_t isRenderingInTd, int16_t pcm_out ) +#ifdef API_5MS +ivas_error +#else +void +#endif +ivas_split_rend_choose_default_codec( IVAS_SPLIT_REND_CODEC *pCodec, +#ifdef API_5MS + int16_t *pCodec_frame_size_ms, +#endif + int16_t isRenderingInTd, + int16_t pcm_out ) { if ( pcm_out == 0 ) { @@ -892,6 +904,26 @@ void ivas_split_rend_choose_default_codec( IVAS_SPLIT_REND_CODEC *pCodec, int16_ { *pCodec = IVAS_SPLIT_REND_CODEC_NONE; } +#ifdef API_5MS + if ( *pCodec_frame_size_ms == 0 ) /* codec frame size hasn't been set yet - use default for current configuration */ + { + switch ( *pCodec ) + { + case IVAS_SPLIT_REND_CODEC_LCLD: + *pCodec_frame_size_ms = 20; + break; + case IVAS_SPLIT_REND_CODEC_LC3PLUS: + case IVAS_SPLIT_REND_CODEC_NONE: + *pCodec_frame_size_ms = 5; + break; + default: + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Unknown split codec value" ); + } + } + + return IVAS_ERR_OK; +#else return; +#endif } #endif diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index ca912f6824..fbc6e5d8d3 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -4247,9 +4247,22 @@ ivas_error IVAS_REND_AddInput( cldfb_in = 1; } #ifdef FIX_658_SPLIT_REND_MASA - ivas_split_rend_choose_default_codec( &hIvasRend->hRendererConfig->split_rend_config.codec, - ( cldfb_in == 0 ), - hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ); +#ifdef API_5MS + error = +#endif + ivas_split_rend_choose_default_codec( &hIvasRend->hRendererConfig->split_rend_config.codec, +#ifdef API_5MS + &hIvasRend->hRendererConfig->split_rend_config.codec_frame_size_ms, +#endif + ( cldfb_in == 0 ), + hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ); +#ifdef API_5MS + if ( error != IVAS_ERR_OK ) + { + return error; + } +#endif + #endif if ( ( error = initSplitRend( &hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer, @@ -5116,9 +5129,19 @@ int16_t IVAS_REND_FeedRenderConfig( { closeSplitRend( &hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer ); /* TODO : Do not hard code TDin to 1 here*/ +#ifdef API_5MS + if ( ( error = ivas_split_rend_choose_default_codec( &hIvasRend->hRendererConfig->split_rend_config.codec, + &hIvasRend->hRendererConfig->split_rend_config.codec_frame_size_ms, + 1, + hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) != IVAS_ERR_OK ) + { + return error; + } +#else ivas_split_rend_choose_default_codec( &hIvasRend->hRendererConfig->split_rend_config.codec, 1, hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ); +#endif if ( ( error = initSplitRend( &hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer, &hIvasRend->hRendererConfig->split_rend_config, -- GitLab From e86de16dbf4eb6b3222055b1861685a1562e005c Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Tue, 8 Aug 2023 11:33:08 +0200 Subject: [PATCH 108/175] [fix] invalid buffer write in pre-split rendering mode of the renderer --- lib_dec/lib_dec.c | 2 +- lib_rend/lib_rend.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index ef339cfad6..de9b8d1c07 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -3709,7 +3709,7 @@ static ivas_error printConfigInfo_dec( *-----------------------------------------------------------------*/ if ( st_ivas->hDecoderConfig->Opt_5ms ) { - fprintf( stdout, "API 5ms mode: ON\n" ); + fprintf( stdout, "API 5ms mode: ON\n" ); } #endif #else diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index ca912f6824..bb8a7503a7 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -9204,8 +9204,16 @@ ivas_error IVAS_REND_GetSamples( return IVAS_ERR_WRONG_NUM_CHANNELS; } - /* Clear original output buffer */ - set_zero( outAudio.data, outAudio.config.numChannels * outAudio.config.numSamplesPerChannel ); +#ifdef API_5MS + /* outAudio.data is only valid if not in split rendering mode */ + if ( hBits == NULL ) + { +#endif + /* Clear original output buffer */ + set_zero( outAudio.data, outAudio.config.numChannels * outAudio.config.numSamplesPerChannel ); +#ifdef API_5MS + } +#endif #ifdef SPLIT_REND_WITH_HEAD_ROT -- GitLab From 5f0de5864185bee2804a8d3453407832c53ed70b Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Tue, 8 Aug 2023 12:06:45 +0200 Subject: [PATCH 109/175] Fix missing binaural pairs in output from ivas_dec --- lib_dec/ivas_dec.c | 33 ++++++++++++++++++++++++-------- lib_dec/lib_dec.c | 7 ++----- lib_rend/ivas_splitRendererPre.c | 3 --- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index 957d6fe504..63557a88a4 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -87,6 +87,9 @@ ivas_error ivas_dec( #ifdef MASA_AND_OBJECTS int32_t ism_total_brate; #endif +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT + int16_t nchan_out_syn_output; +#endif error = IVAS_ERR_OK; @@ -1062,17 +1065,28 @@ ivas_error ivas_dec( * - float to integer conversion *----------------------------------------------------------------*/ -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT + if ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) + { + nchan_out_syn_output = BINAURAL_CHANNELS * st_ivas->splitBinRend.splitrend.multiBinPoseData.num_poses; + } + else + { + nchan_out_syn_output = nchan_out; + } + if ( st_ivas->hDecoderConfig->Opt_Limiter ) #endif { - ivas_limiter_dec( st_ivas->hLimiter, p_output, nchan_out, output_frame, st_ivas->BER_detect ); + ivas_limiter_dec( st_ivas->hLimiter, p_output, +#ifdef API_5MS + nchan_out_syn_output, +#else + nchan_out, +#endif + output_frame, st_ivas->BER_detect ); } -#ifdef DEBUGGING - st_ivas->noClipping += -#endif - ivas_syn_output( p_output, output_frame, nchan_out, data ); #ifdef API_5MS switch ( pcm_resolution ) { @@ -1081,16 +1095,19 @@ ivas_error ivas_dec( #ifdef DEBUGGING st_ivas->noClipping += #endif - ivas_syn_output( p_output, output_frame, nchan_out, + ivas_syn_output( p_output, output_frame, #ifdef API_5MS + nchan_out_syn_output, (int16_t *) +#else + nchan_out, #endif data ); #ifdef API_5MS break; case PCM_FLOAT32: - ivas_syn_output_f( p_output, output_frame, nchan_out, (float *) data ); + ivas_syn_output_f( p_output, output_frame, nchan_out_syn_output, (float *) data ); break; default: error = IVAS_ERR_UNKNOWN; diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 55583d8610..c959c586e8 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1293,9 +1293,9 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( { return error; } - assert( numSamplesPerChannelToDecode == *nOutSamples ); #ifdef DEBUGGING - dbgwrite( output, sizeof( float ), numSamplesPerChannelToDecode * BINAURAL_CHANNELS * numPoses, 1, "res/output_float.pcm" ); + assert( numSamplesPerChannelToDecode == *nOutSamples ); + dbgwrite( pcmBuf, sizeof( float ), numSamplesPerChannelToDecode * BINAURAL_CHANNELS * numPoses, 1, "res/IVAS_DEC_GetSamples_split.pcm" ); #endif /* copy to cache if cache is in use */ @@ -1340,9 +1340,6 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( output[j][i] = pcmBuf[i * BINAURAL_CHANNELS * numPoses + j]; } } -#ifdef DEBUGGING - dbgwrite( output[0], sizeof( float ), numSamplesPerChannelToSplitEncode, 1, "res/output.pcm" ); -#endif max_band = (int16_t) ( ( BINAURAL_MAXBANDS * output_Fs ) / 48000 ); pcm_out = ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0; td_input = st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC; diff --git a/lib_rend/ivas_splitRendererPre.c b/lib_rend/ivas_splitRendererPre.c index 0bd3c3acc4..3f0b198491 100644 --- a/lib_rend/ivas_splitRendererPre.c +++ b/lib_rend/ivas_splitRendererPre.c @@ -2098,9 +2098,6 @@ static ivas_error splitRendLc3plusEncodeAndWrite( ivas_split_rend_bitstream_write_int32( pBits, ivas_get_lc3plus_bitrate_id( SplitRendBitRate ), 8 ); /* Write bitstream */ -#ifdef DEBUGGING - dbgwrite( in[0], sizeof( float ), 960, 1, "res/IVAS_LC3PLUS_ENC_Encode.raw" ); -#endif if ( ( error = IVAS_LC3PLUS_ENC_Encode( hSplitBin->hLc3plusEnc, channel_ptrs, &pBits->bits_buf[pBits->bits_written / 8] ) ) != IVAS_ERR_OK ) { return error; -- GitLab From 1659741140bfaec920c4972b46d6957387c78419 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Tue, 8 Aug 2023 12:26:23 +0200 Subject: [PATCH 110/175] Fix default codec_frame_size_ms in lib_rend --- lib_rend/lib_rend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index d20cfa8d11..5a57711463 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -5053,7 +5053,7 @@ int16_t IVAS_REND_GetRenderConfig( hRCout->split_rend_config.hq_mode = 0; hRCout->split_rend_config.codec_delay_ms = 0; #ifdef API_5MS - hRCout->split_rend_config.codec_frame_size_ms = 5; + hRCout->split_rend_config.codec_frame_size_ms = 0; /* 0 means "use default for selected codec" */ #endif hRCout->split_rend_config.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; hRCout->split_rend_config.poseCorrectionMode = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB; -- GitLab From 316301f458b6fa9399854a36dd6ceec0de0fb76e Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Tue, 8 Aug 2023 15:03:48 +0200 Subject: [PATCH 111/175] Add split codec frame size signalling --- apps/decoder.c | 22 +++++++++++-- apps/renderer.c | 14 ++++++-- lib_com/common_api_types.h | 2 +- lib_dec/lib_dec.c | 2 -- lib_rend/ivas_prot_rend.h | 6 +++- lib_rend/ivas_splitRendererPre.c | 6 ++++ lib_rend/ivas_splitRenderer_utils.c | 8 +++-- lib_rend/lib_rend.c | 44 +++++++++++++++++-------- lib_rend/lib_rend.h | 3 ++ lib_util/split_render_file_read_write.c | 26 +++++++++++++-- lib_util/split_render_file_read_write.h | 12 +++++-- 11 files changed, 116 insertions(+), 29 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 049217479a..cbf29e6294 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1763,7 +1763,12 @@ static ivas_error initOnFirstGoodFrame( splitRendBitsZero.bits_written = 0; splitRendBitsZero.bits_read = 0; if ( split_rend_write_bitstream_to_file( *hSplitRendFileReadWrite, splitRendBitsZero.bits_buf, &splitRendBitsZero.bits_read, &splitRendBitsZero.bits_written, - -1, IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) != IVAS_ERR_OK ) + -1, IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE +#ifdef API_5MS + , + splitRendBitsZero.codec_frame_size_ms +#endif + ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to write to bitstream file!\n" ); exit( -1 ); @@ -2021,6 +2026,7 @@ static ivas_error decodeG192( splitRendBits.buf_len = MAX_SPLIT_REND_BITS_BUFFER_SIZE_IN_BYTES; splitRendBits.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; splitRendBits.pose_correction = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE; + splitRendBits.codec_frame_size_ms = 0; hSplitRendFileReadWrite = NULL; #endif @@ -2283,7 +2289,12 @@ static ivas_error decodeG192( if ( ( hSplitRendFileReadWrite != NULL ) && ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED ) ) { if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, splitRendBits.bits_buf, &splitRendBits.bits_read, &splitRendBits.bits_written, - splitRendBits.codec, splitRendBits.pose_correction ) != IVAS_ERR_OK ) + splitRendBits.codec, splitRendBits.pose_correction +#ifdef API_5MS + , + splitRendBits.codec_frame_size_ms +#endif + ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to write to bitstream file!\n" ); goto cleanup; @@ -2294,7 +2305,12 @@ static ivas_error decodeG192( if ( ( hSplitRendFileReadWrite != NULL ) && ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) ) { if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, splitRendBits.bits_buf, &splitRendBits.bits_read, &splitRendBits.bits_written, - splitRendBits.codec, splitRendBits.pose_correction ) != IVAS_ERR_OK ) + splitRendBits.codec, splitRendBits.pose_correction +#ifdef API_5MS + , + splitRendBits.codec_frame_size_ms +#endif + ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to write to bitstream file!\n" ); goto cleanup; diff --git a/apps/renderer.c b/apps/renderer.c index f28dc9dcf1..25d56ee1e6 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1486,7 +1486,12 @@ int main( ivas_error error_tmp; numSamplesRead = (int16_t) inBufferSize; error_tmp = split_rend_read_bits_from_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten, - &bitsBuffer.config.codec, &bitsBuffer.config.poseCorrection ); + &bitsBuffer.config.codec, &bitsBuffer.config.poseCorrection +#ifdef API_5MS + , + &bitsBuffer.config.codec_frame_size_ms +#endif + ); if ( error_tmp != IVAS_ERR_OK ) { if ( error_tmp == IVAS_ERR_END_OF_FILE ) @@ -1950,7 +1955,12 @@ int main( if ( ( hSplitRendFileReadWrite != NULL ) && is_split_pre_rend_mode( &args ) ) { if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten, - bitsBuffer.config.codec, bitsBuffer.config.poseCorrection ) != IVAS_ERR_OK ) + bitsBuffer.config.codec, bitsBuffer.config.poseCorrection +#ifdef API_5MS + , + bitsBuffer.config.codec_frame_size_ms +#endif + ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to write to bitstream file!\n" ); exit( -1 ); diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index 717d29d17f..05b40f6f16 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -133,7 +133,7 @@ typedef struct ivas_split_rend_bits_t int32_t bits_written; int32_t bits_read; #ifdef API_5MS - int16_t codec_frame_size_ms; /* TODO complete implementation */ + int16_t codec_frame_size_ms; #endif IVAS_SPLIT_REND_CODEC codec; IVAS_SPLIT_REND_POSE_CORRECTION_MODE pose_correction; diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index c959c586e8..cba21a6186 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -2181,9 +2181,7 @@ static ivas_error copyRendererConfigStruct( RENDER_CONFIG_HANDLE hRCin, IVAS_REN hRCout->split_rend_config.dof = 3; hRCout->split_rend_config.hq_mode = 0; hRCout->split_rend_config.codec_delay_ms = 0; -#ifdef API_5MS hRCout->split_rend_config.codec_frame_size_ms = 0; /* 0 means "use default for selected codec" */ -#endif hRCout->split_rend_config.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; hRCout->split_rend_config.poseCorrectionMode = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB; hRCout->split_rend_config.rendererSelection = hRCin->split_rend_config.rendererSelection; diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 74ab4098a4..1dd1b9b768 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -925,7 +925,11 @@ int32_t ivas_get_lcld_bitrate( const int32_t SplitRendBitRate, const IVAS_SPLIT_ int32_t ivas_get_split_rend_md_target_brate( const int32_t SplitRendBitRate, const int16_t pcm_out ); int32_t ivas_get_lc3plus_bitrate( const int32_t SplitRendBitRate, IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode ); int8_t ivas_get_lc3plus_bitrate_id( const int32_t SplitRendBitRate ); -int32_t ivas_get_lc3plus_size_from_id( const int8_t SplitRendBitRateId, IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode ); +int32_t ivas_get_lc3plus_size_from_id( const int8_t SplitRendBitRateId, IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode +#ifdef API_5MS +,int16_t codec_frame_size_ms +#endif + ); ivas_error ivas_split_rend_validate_config( const IVAS_SPLIT_REND_CONFIG_DATA *pSplitRendConfig, const int16_t is_pcm_out ); void ivas_split_rend_get_quant_params( const int16_t num_md_bands, diff --git a/lib_rend/ivas_splitRendererPre.c b/lib_rend/ivas_splitRendererPre.c index 3f0b198491..469fc4b869 100644 --- a/lib_rend/ivas_splitRendererPre.c +++ b/lib_rend/ivas_splitRendererPre.c @@ -2105,6 +2105,9 @@ static ivas_error splitRendLc3plusEncodeAndWrite( pBits->bits_written += 8 * lc3plusBitstreamSize; pBits->codec = IVAS_SPLIT_REND_CODEC_LC3PLUS; pBits->pose_correction = hSplitBin->multiBinPoseData.poseCorrectionMode; +#ifdef API_5MS + pBits->codec_frame_size_ms = hSplitBin->hLc3plusEnc->config.lc3plus_frame_duration_us / 1000; +#endif return IVAS_ERR_OK; } @@ -2241,6 +2244,9 @@ static ivas_error ivas_renderMultiTDBinToSplitBinaural( available_bits = SplitRendBitRate * L_FRAME48k / 48000; actual_md_bits = pBits->bits_written - actual_md_bits; available_bits -= actual_md_bits; +#ifdef API_5MS + pBits->codec_frame_size_ms = 20; +#endif ivas_splitBinLCLDEncProcess( hSplitBin->hSplitBinLCLDEnc, Cldfb_In_BinReal, diff --git a/lib_rend/ivas_splitRenderer_utils.c b/lib_rend/ivas_splitRenderer_utils.c index 155d140491..353648419c 100644 --- a/lib_rend/ivas_splitRenderer_utils.c +++ b/lib_rend/ivas_splitRenderer_utils.c @@ -508,7 +508,11 @@ int8_t ivas_get_lc3plus_bitrate_id( const int32_t SplitRendBitRate ) } return -1; } -int32_t ivas_get_lc3plus_size_from_id( const int8_t SplitRendBitRateId, IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode ) +int32_t ivas_get_lc3plus_size_from_id( const int8_t SplitRendBitRateId, IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode +#ifdef API_5MS +, int16_t codec_frame_size_ms +#endif + ) { int32_t bitrate; @@ -549,7 +553,7 @@ int32_t ivas_get_lc3plus_size_from_id( const int8_t SplitRendBitRateId, IVAS_SPL bitrate = ivas_get_lc3plus_bitrate( bitrate, poseCorrectionMode ); /* Return size in bytes */ - return (int32_t) ( bitrate / FRAMES_PER_SECOND / 8 ); + return (int32_t) ( bitrate * codec_frame_size_ms / 1000 / 8 ); } ivas_error ivas_split_rend_validate_config( const IVAS_SPLIT_REND_CONFIG_DATA *pSplitRendConfig, const int16_t is_pcm_out ) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 5a57711463..41f0547cbb 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -359,6 +359,9 @@ static void convertBitsBufferToInternalBitsBuff( hBits->buf_len = outBits.config.bufLenInBytes; hBits->codec = outBits.config.codec; hBits->pose_correction = outBits.config.poseCorrection; +#ifdef API_5MS + hBits->codec_frame_size_ms = outBits.config.codec_frame_size_ms; +#endif return; } @@ -373,6 +376,9 @@ static void convertInternalBitsBuffToBitsBuffer( hOutBits->config.bufLenInBytes = bits.buf_len; hOutBits->config.codec = bits.codec; hOutBits->config.poseCorrection = bits.pose_correction; +#ifdef API_5MS + hOutBits->config.codec_frame_size_ms = bits.codec_frame_size_ms; +#endif return; } @@ -4237,7 +4243,11 @@ ivas_error IVAS_REND_AddInput( } #ifdef SPLIT_REND_WITH_HEAD_ROT - if ( hIvasRend->splitRendEncBuffer.data == NULL && hIvasRend->hRendererConfig != NULL ) + if ( +#ifdef API_5MS + ( hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) && +#endif + hIvasRend->splitRendEncBuffer.data == NULL && hIvasRend->hRendererConfig != NULL ) { int16_t cldfb_in; cldfb_in = 0; @@ -7677,7 +7687,12 @@ static ivas_error splitBinLc3plusDecode( } /* Read LC3plus bitstream size info */ lc3plusBitrateId = ivas_split_rend_bitstream_read_int32( bits, 8 ); - lc3plusBitstreamSize = ivas_get_lc3plus_size_from_id( (int8_t) lc3plusBitrateId, pose_correction ); + lc3plusBitstreamSize = ivas_get_lc3plus_size_from_id( (int8_t) lc3plusBitrateId, pose_correction +#ifdef API_5MS + , + bits->codec_frame_size_ms +#endif + ); for ( int16_t i = 0; i < BINAURAL_CHANNELS * hSplitBin->multiBinPoseData.num_poses; ++i ) { @@ -7719,9 +7734,6 @@ static ivas_error renderSplitBinauralWithPostRot( float tmpCrendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; COMBINED_ORIENTATION_HANDLE pCombinedOrientationData; SPLIT_POST_REND_WRAPPER *hSplitBin; -#ifdef API_5MS - RENDER_CONFIG_HANDLE hRenderConfig; -#endif int8_t isPostRendInputCldfb; isPostRendInputCldfb = 0; @@ -7733,7 +7745,6 @@ static ivas_error renderSplitBinauralWithPostRot( pCombinedOrientationData = *splitBinInput->base.ctx.pCombinedOrientationData; hSplitBin = &splitBinInput->splitPostRendWrapper; #ifdef API_5MS - hRenderConfig = ( *splitBinInput->base.ctx.hhRendererConfig ); convertBitsBufferToInternalBitsBuff( *splitBinInput->hBits, &bits ); #else convertBitsBufferToInternalBitsBuff( *hBits, &bits ); @@ -7751,8 +7762,8 @@ static ivas_error renderSplitBinauralWithPostRot( { LC3PLUS_CONFIG config; #ifdef API_5MS - config.lc3plus_frame_duration_us = hRenderConfig->split_rend_config.codec_frame_size_ms * 1000; - config.ivas_frame_duration_us = ( hRenderConfig->split_rend_config.dof == 0 ) ? config.lc3plus_frame_duration_us : 20000; + config.lc3plus_frame_duration_us = bits.codec_frame_size_ms * 1000; + config.ivas_frame_duration_us = bits.pose_correction == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE ? config.lc3plus_frame_duration_us : 20000; #else config.lc3plus_frame_duration_us = 5000; config.ivas_frame_duration_us = 20000; @@ -7808,6 +7819,10 @@ static ivas_error renderSplitBinauralWithPostRot( /* decode audio */ if ( splitBinInput->base.inConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) { /* TODO(sgi): For both codecs: decode 20ms, cache last 15ms for the next 3 rendering calls */ + int16_t pre_rend_frame_size_ms = bits.codec == IVAS_SPLIT_REND_CODEC_LC3PLUS ? hSplitBin->hLc3plusDec->config.ivas_frame_duration_us / 1000 : 20; + int16_t numSamplesPerChannelCacheSize = *splitBinInput->base.ctx.pOutSampleRate * ( pre_rend_frame_size_ms - bits.codec_frame_size_ms ) / 1000; + int16_t out_buffer_num_samples_per_channel = outAudio.config.numSamplesPerChannel; + if ( splitBinInput->numCachedSamples == 0 ) { if ( bits.codec == IVAS_SPLIT_REND_CODEC_LCLD ) @@ -7830,17 +7845,18 @@ static ivas_error renderSplitBinauralWithPostRot( { return error; } - splitBinInput->numCachedSamples = 720; - mvr2r( &tmpCrendBuffer[0][240], splitBinInput->bufferData, 720 ); - mvr2r( &tmpCrendBuffer[1][240], splitBinInput->bufferData + 720, 720 ); + splitBinInput->numCachedSamples = numSamplesPerChannelCacheSize; + mvr2r( &tmpCrendBuffer[0][out_buffer_num_samples_per_channel], splitBinInput->bufferData, numSamplesPerChannelCacheSize ); + mvr2r( &tmpCrendBuffer[1][out_buffer_num_samples_per_channel], splitBinInput->bufferData + numSamplesPerChannelCacheSize, numSamplesPerChannelCacheSize ); } } else { int16_t tdToCldfbSampleFact = 1; /* TODO(sgi): */ - mvr2r( splitBinInput->bufferData + 720 - splitBinInput->numCachedSamples, tmpCrendBuffer[0], 240 ); - mvr2r( 720 + splitBinInput->bufferData + 720 - splitBinInput->numCachedSamples, tmpCrendBuffer[1], 240 ); - splitBinInput->numCachedSamples -= 240; + int16_t readOffset = numSamplesPerChannelCacheSize - splitBinInput->numCachedSamples; + mvr2r( splitBinInput->bufferData + readOffset, tmpCrendBuffer[0], out_buffer_num_samples_per_channel ); + mvr2r( numSamplesPerChannelCacheSize + splitBinInput->bufferData + readOffset, tmpCrendBuffer[1], out_buffer_num_samples_per_channel ); + splitBinInput->numCachedSamples -= out_buffer_num_samples_per_channel; } } else diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index b9b1f1161c..a12c18a0df 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -71,6 +71,9 @@ typedef struct int32_t bitsRead; IVAS_SPLIT_REND_CODEC codec; IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection; +#ifdef API_5MS + int16_t codec_frame_size_ms; +#endif } IVAS_REND_BitstreamBufferConfig; typedef struct { diff --git a/lib_util/split_render_file_read_write.c b/lib_util/split_render_file_read_write.c index bb75f9fa9d..d4b43c0097 100644 --- a/lib_util/split_render_file_read_write.c +++ b/lib_util/split_render_file_read_write.c @@ -156,7 +156,11 @@ ivas_error split_rend_write_bitstream_to_file( int32_t *bits_read, int32_t *bits_written, IVAS_SPLIT_REND_CODEC codec, - IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection ) + IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection + #ifdef API_5MS + , int16_t codec_frame_size_ms + #endif + ) { char header[SPLIT_RENDERER_FRAME_HEADER_LEN] = "SPLIT_FRAME"; size_t header_len, i, num_bytes; @@ -192,6 +196,13 @@ ivas_error split_rend_write_bitstream_to_file( { return IVAS_ERR_FAILED_FILE_WRITE; } +#ifdef API_5MS + /* Write frame size signalling */ + if ( fwrite( &codec_frame_size_ms, sizeof( codec_frame_size_ms ), 1, hSplitRendFileReadWrite->file ) != 1 ) + { + return IVAS_ERR_FAILED_FILE_WRITE; + } +#endif /*write num bytes*/ if ( fwrite( bits_written, sizeof( int32_t ), 1, hSplitRendFileReadWrite->file ) != 1 ) @@ -217,7 +228,11 @@ ivas_error split_rend_read_bits_from_file( int32_t *bits_read, int32_t *bits_written, IVAS_SPLIT_REND_CODEC *codec, - IVAS_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection ) + IVAS_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection + #ifdef API_5MS + , int16_t* codec_frame_size_ms + #endif + ) { char header[SPLIT_RENDERER_FRAME_HEADER_LEN] = "SPLIT_FRAME"; char header_read[SPLIT_RENDERER_FRAME_HEADER_LEN]; @@ -259,6 +274,13 @@ ivas_error split_rend_read_bits_from_file( { return IVAS_ERR_FAILED_FILE_READ; } +#ifdef API_5MS + /* read frame size signalling */ + if ( fread( codec_frame_size_ms, sizeof( *codec_frame_size_ms ), 1, hSplitRendFileReadWrite->file ) != 1 ) + { + return IVAS_ERR_FAILED_FILE_READ; + } +#endif /*write num bytes*/ if ( fread( &bit_len, sizeof( int32_t ), 1, hSplitRendFileReadWrite->file ) != 1 ) diff --git a/lib_util/split_render_file_read_write.h b/lib_util/split_render_file_read_write.h index 19b4b7cf27..5c039eb0ba 100644 --- a/lib_util/split_render_file_read_write.h +++ b/lib_util/split_render_file_read_write.h @@ -62,7 +62,11 @@ ivas_error split_rend_write_bitstream_to_file( int32_t *bits_read, int32_t *bits_written, IVAS_SPLIT_REND_CODEC codec, - IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection ); + IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection + #ifdef API_5MS + , int16_t codec_frame_size_ms + #endif + ); /*read split rend coded bits from file*/ ivas_error split_rend_read_bits_from_file( @@ -71,7 +75,11 @@ ivas_error split_rend_read_bits_from_file( int32_t *bits_read, int32_t *bits_written, IVAS_SPLIT_REND_CODEC *codec, - IVAS_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection ); + IVAS_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection + #ifdef API_5MS + , int16_t* codec_frame_size_ms + #endif + ); /*read split pre rend delay*/ ivas_error split_rend_read_pre_rend_delay_ns( -- GitLab From bc56e2c243eb7423a258483944ac1740d4a6da53 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Tue, 8 Aug 2023 15:09:26 +0200 Subject: [PATCH 112/175] Revert "Add split codec frame size signalling" This reverts commit 316301f458b6fa9399854a36dd6ceec0de0fb76e. --- apps/decoder.c | 22 ++----------- apps/renderer.c | 14 ++------ lib_com/common_api_types.h | 2 +- lib_dec/lib_dec.c | 2 ++ lib_rend/ivas_prot_rend.h | 6 +--- lib_rend/ivas_splitRendererPre.c | 6 ---- lib_rend/ivas_splitRenderer_utils.c | 8 ++--- lib_rend/lib_rend.c | 44 ++++++++----------------- lib_rend/lib_rend.h | 3 -- lib_util/split_render_file_read_write.c | 26 ++------------- lib_util/split_render_file_read_write.h | 12 ++----- 11 files changed, 29 insertions(+), 116 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index cbf29e6294..049217479a 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1763,12 +1763,7 @@ static ivas_error initOnFirstGoodFrame( splitRendBitsZero.bits_written = 0; splitRendBitsZero.bits_read = 0; if ( split_rend_write_bitstream_to_file( *hSplitRendFileReadWrite, splitRendBitsZero.bits_buf, &splitRendBitsZero.bits_read, &splitRendBitsZero.bits_written, - -1, IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE -#ifdef API_5MS - , - splitRendBitsZero.codec_frame_size_ms -#endif - ) != IVAS_ERR_OK ) + -1, IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to write to bitstream file!\n" ); exit( -1 ); @@ -2026,7 +2021,6 @@ static ivas_error decodeG192( splitRendBits.buf_len = MAX_SPLIT_REND_BITS_BUFFER_SIZE_IN_BYTES; splitRendBits.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; splitRendBits.pose_correction = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE; - splitRendBits.codec_frame_size_ms = 0; hSplitRendFileReadWrite = NULL; #endif @@ -2289,12 +2283,7 @@ static ivas_error decodeG192( if ( ( hSplitRendFileReadWrite != NULL ) && ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED ) ) { if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, splitRendBits.bits_buf, &splitRendBits.bits_read, &splitRendBits.bits_written, - splitRendBits.codec, splitRendBits.pose_correction -#ifdef API_5MS - , - splitRendBits.codec_frame_size_ms -#endif - ) != IVAS_ERR_OK ) + splitRendBits.codec, splitRendBits.pose_correction ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to write to bitstream file!\n" ); goto cleanup; @@ -2305,12 +2294,7 @@ static ivas_error decodeG192( if ( ( hSplitRendFileReadWrite != NULL ) && ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) ) { if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, splitRendBits.bits_buf, &splitRendBits.bits_read, &splitRendBits.bits_written, - splitRendBits.codec, splitRendBits.pose_correction -#ifdef API_5MS - , - splitRendBits.codec_frame_size_ms -#endif - ) != IVAS_ERR_OK ) + splitRendBits.codec, splitRendBits.pose_correction ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to write to bitstream file!\n" ); goto cleanup; diff --git a/apps/renderer.c b/apps/renderer.c index 25d56ee1e6..f28dc9dcf1 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1486,12 +1486,7 @@ int main( ivas_error error_tmp; numSamplesRead = (int16_t) inBufferSize; error_tmp = split_rend_read_bits_from_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten, - &bitsBuffer.config.codec, &bitsBuffer.config.poseCorrection -#ifdef API_5MS - , - &bitsBuffer.config.codec_frame_size_ms -#endif - ); + &bitsBuffer.config.codec, &bitsBuffer.config.poseCorrection ); if ( error_tmp != IVAS_ERR_OK ) { if ( error_tmp == IVAS_ERR_END_OF_FILE ) @@ -1955,12 +1950,7 @@ int main( if ( ( hSplitRendFileReadWrite != NULL ) && is_split_pre_rend_mode( &args ) ) { if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten, - bitsBuffer.config.codec, bitsBuffer.config.poseCorrection -#ifdef API_5MS - , - bitsBuffer.config.codec_frame_size_ms -#endif - ) != IVAS_ERR_OK ) + bitsBuffer.config.codec, bitsBuffer.config.poseCorrection ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to write to bitstream file!\n" ); exit( -1 ); diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index 05b40f6f16..717d29d17f 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -133,7 +133,7 @@ typedef struct ivas_split_rend_bits_t int32_t bits_written; int32_t bits_read; #ifdef API_5MS - int16_t codec_frame_size_ms; + int16_t codec_frame_size_ms; /* TODO complete implementation */ #endif IVAS_SPLIT_REND_CODEC codec; IVAS_SPLIT_REND_POSE_CORRECTION_MODE pose_correction; diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index cba21a6186..c959c586e8 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -2181,7 +2181,9 @@ static ivas_error copyRendererConfigStruct( RENDER_CONFIG_HANDLE hRCin, IVAS_REN hRCout->split_rend_config.dof = 3; hRCout->split_rend_config.hq_mode = 0; hRCout->split_rend_config.codec_delay_ms = 0; +#ifdef API_5MS hRCout->split_rend_config.codec_frame_size_ms = 0; /* 0 means "use default for selected codec" */ +#endif hRCout->split_rend_config.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; hRCout->split_rend_config.poseCorrectionMode = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB; hRCout->split_rend_config.rendererSelection = hRCin->split_rend_config.rendererSelection; diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 1dd1b9b768..74ab4098a4 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -925,11 +925,7 @@ int32_t ivas_get_lcld_bitrate( const int32_t SplitRendBitRate, const IVAS_SPLIT_ int32_t ivas_get_split_rend_md_target_brate( const int32_t SplitRendBitRate, const int16_t pcm_out ); int32_t ivas_get_lc3plus_bitrate( const int32_t SplitRendBitRate, IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode ); int8_t ivas_get_lc3plus_bitrate_id( const int32_t SplitRendBitRate ); -int32_t ivas_get_lc3plus_size_from_id( const int8_t SplitRendBitRateId, IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode -#ifdef API_5MS -,int16_t codec_frame_size_ms -#endif - ); +int32_t ivas_get_lc3plus_size_from_id( const int8_t SplitRendBitRateId, IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode ); ivas_error ivas_split_rend_validate_config( const IVAS_SPLIT_REND_CONFIG_DATA *pSplitRendConfig, const int16_t is_pcm_out ); void ivas_split_rend_get_quant_params( const int16_t num_md_bands, diff --git a/lib_rend/ivas_splitRendererPre.c b/lib_rend/ivas_splitRendererPre.c index 469fc4b869..3f0b198491 100644 --- a/lib_rend/ivas_splitRendererPre.c +++ b/lib_rend/ivas_splitRendererPre.c @@ -2105,9 +2105,6 @@ static ivas_error splitRendLc3plusEncodeAndWrite( pBits->bits_written += 8 * lc3plusBitstreamSize; pBits->codec = IVAS_SPLIT_REND_CODEC_LC3PLUS; pBits->pose_correction = hSplitBin->multiBinPoseData.poseCorrectionMode; -#ifdef API_5MS - pBits->codec_frame_size_ms = hSplitBin->hLc3plusEnc->config.lc3plus_frame_duration_us / 1000; -#endif return IVAS_ERR_OK; } @@ -2244,9 +2241,6 @@ static ivas_error ivas_renderMultiTDBinToSplitBinaural( available_bits = SplitRendBitRate * L_FRAME48k / 48000; actual_md_bits = pBits->bits_written - actual_md_bits; available_bits -= actual_md_bits; -#ifdef API_5MS - pBits->codec_frame_size_ms = 20; -#endif ivas_splitBinLCLDEncProcess( hSplitBin->hSplitBinLCLDEnc, Cldfb_In_BinReal, diff --git a/lib_rend/ivas_splitRenderer_utils.c b/lib_rend/ivas_splitRenderer_utils.c index 353648419c..155d140491 100644 --- a/lib_rend/ivas_splitRenderer_utils.c +++ b/lib_rend/ivas_splitRenderer_utils.c @@ -508,11 +508,7 @@ int8_t ivas_get_lc3plus_bitrate_id( const int32_t SplitRendBitRate ) } return -1; } -int32_t ivas_get_lc3plus_size_from_id( const int8_t SplitRendBitRateId, IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode -#ifdef API_5MS -, int16_t codec_frame_size_ms -#endif - ) +int32_t ivas_get_lc3plus_size_from_id( const int8_t SplitRendBitRateId, IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode ) { int32_t bitrate; @@ -553,7 +549,7 @@ int32_t ivas_get_lc3plus_size_from_id( const int8_t SplitRendBitRateId, IVAS_SPL bitrate = ivas_get_lc3plus_bitrate( bitrate, poseCorrectionMode ); /* Return size in bytes */ - return (int32_t) ( bitrate * codec_frame_size_ms / 1000 / 8 ); + return (int32_t) ( bitrate / FRAMES_PER_SECOND / 8 ); } ivas_error ivas_split_rend_validate_config( const IVAS_SPLIT_REND_CONFIG_DATA *pSplitRendConfig, const int16_t is_pcm_out ) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 41f0547cbb..5a57711463 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -359,9 +359,6 @@ static void convertBitsBufferToInternalBitsBuff( hBits->buf_len = outBits.config.bufLenInBytes; hBits->codec = outBits.config.codec; hBits->pose_correction = outBits.config.poseCorrection; -#ifdef API_5MS - hBits->codec_frame_size_ms = outBits.config.codec_frame_size_ms; -#endif return; } @@ -376,9 +373,6 @@ static void convertInternalBitsBuffToBitsBuffer( hOutBits->config.bufLenInBytes = bits.buf_len; hOutBits->config.codec = bits.codec; hOutBits->config.poseCorrection = bits.pose_correction; -#ifdef API_5MS - hOutBits->config.codec_frame_size_ms = bits.codec_frame_size_ms; -#endif return; } @@ -4243,11 +4237,7 @@ ivas_error IVAS_REND_AddInput( } #ifdef SPLIT_REND_WITH_HEAD_ROT - if ( -#ifdef API_5MS - ( hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) && -#endif - hIvasRend->splitRendEncBuffer.data == NULL && hIvasRend->hRendererConfig != NULL ) + if ( hIvasRend->splitRendEncBuffer.data == NULL && hIvasRend->hRendererConfig != NULL ) { int16_t cldfb_in; cldfb_in = 0; @@ -7687,12 +7677,7 @@ static ivas_error splitBinLc3plusDecode( } /* Read LC3plus bitstream size info */ lc3plusBitrateId = ivas_split_rend_bitstream_read_int32( bits, 8 ); - lc3plusBitstreamSize = ivas_get_lc3plus_size_from_id( (int8_t) lc3plusBitrateId, pose_correction -#ifdef API_5MS - , - bits->codec_frame_size_ms -#endif - ); + lc3plusBitstreamSize = ivas_get_lc3plus_size_from_id( (int8_t) lc3plusBitrateId, pose_correction ); for ( int16_t i = 0; i < BINAURAL_CHANNELS * hSplitBin->multiBinPoseData.num_poses; ++i ) { @@ -7734,6 +7719,9 @@ static ivas_error renderSplitBinauralWithPostRot( float tmpCrendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; COMBINED_ORIENTATION_HANDLE pCombinedOrientationData; SPLIT_POST_REND_WRAPPER *hSplitBin; +#ifdef API_5MS + RENDER_CONFIG_HANDLE hRenderConfig; +#endif int8_t isPostRendInputCldfb; isPostRendInputCldfb = 0; @@ -7745,6 +7733,7 @@ static ivas_error renderSplitBinauralWithPostRot( pCombinedOrientationData = *splitBinInput->base.ctx.pCombinedOrientationData; hSplitBin = &splitBinInput->splitPostRendWrapper; #ifdef API_5MS + hRenderConfig = ( *splitBinInput->base.ctx.hhRendererConfig ); convertBitsBufferToInternalBitsBuff( *splitBinInput->hBits, &bits ); #else convertBitsBufferToInternalBitsBuff( *hBits, &bits ); @@ -7762,8 +7751,8 @@ static ivas_error renderSplitBinauralWithPostRot( { LC3PLUS_CONFIG config; #ifdef API_5MS - config.lc3plus_frame_duration_us = bits.codec_frame_size_ms * 1000; - config.ivas_frame_duration_us = bits.pose_correction == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE ? config.lc3plus_frame_duration_us : 20000; + config.lc3plus_frame_duration_us = hRenderConfig->split_rend_config.codec_frame_size_ms * 1000; + config.ivas_frame_duration_us = ( hRenderConfig->split_rend_config.dof == 0 ) ? config.lc3plus_frame_duration_us : 20000; #else config.lc3plus_frame_duration_us = 5000; config.ivas_frame_duration_us = 20000; @@ -7819,10 +7808,6 @@ static ivas_error renderSplitBinauralWithPostRot( /* decode audio */ if ( splitBinInput->base.inConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) { /* TODO(sgi): For both codecs: decode 20ms, cache last 15ms for the next 3 rendering calls */ - int16_t pre_rend_frame_size_ms = bits.codec == IVAS_SPLIT_REND_CODEC_LC3PLUS ? hSplitBin->hLc3plusDec->config.ivas_frame_duration_us / 1000 : 20; - int16_t numSamplesPerChannelCacheSize = *splitBinInput->base.ctx.pOutSampleRate * ( pre_rend_frame_size_ms - bits.codec_frame_size_ms ) / 1000; - int16_t out_buffer_num_samples_per_channel = outAudio.config.numSamplesPerChannel; - if ( splitBinInput->numCachedSamples == 0 ) { if ( bits.codec == IVAS_SPLIT_REND_CODEC_LCLD ) @@ -7845,18 +7830,17 @@ static ivas_error renderSplitBinauralWithPostRot( { return error; } - splitBinInput->numCachedSamples = numSamplesPerChannelCacheSize; - mvr2r( &tmpCrendBuffer[0][out_buffer_num_samples_per_channel], splitBinInput->bufferData, numSamplesPerChannelCacheSize ); - mvr2r( &tmpCrendBuffer[1][out_buffer_num_samples_per_channel], splitBinInput->bufferData + numSamplesPerChannelCacheSize, numSamplesPerChannelCacheSize ); + splitBinInput->numCachedSamples = 720; + mvr2r( &tmpCrendBuffer[0][240], splitBinInput->bufferData, 720 ); + mvr2r( &tmpCrendBuffer[1][240], splitBinInput->bufferData + 720, 720 ); } } else { int16_t tdToCldfbSampleFact = 1; /* TODO(sgi): */ - int16_t readOffset = numSamplesPerChannelCacheSize - splitBinInput->numCachedSamples; - mvr2r( splitBinInput->bufferData + readOffset, tmpCrendBuffer[0], out_buffer_num_samples_per_channel ); - mvr2r( numSamplesPerChannelCacheSize + splitBinInput->bufferData + readOffset, tmpCrendBuffer[1], out_buffer_num_samples_per_channel ); - splitBinInput->numCachedSamples -= out_buffer_num_samples_per_channel; + mvr2r( splitBinInput->bufferData + 720 - splitBinInput->numCachedSamples, tmpCrendBuffer[0], 240 ); + mvr2r( 720 + splitBinInput->bufferData + 720 - splitBinInput->numCachedSamples, tmpCrendBuffer[1], 240 ); + splitBinInput->numCachedSamples -= 240; } } else diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index a12c18a0df..b9b1f1161c 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -71,9 +71,6 @@ typedef struct int32_t bitsRead; IVAS_SPLIT_REND_CODEC codec; IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection; -#ifdef API_5MS - int16_t codec_frame_size_ms; -#endif } IVAS_REND_BitstreamBufferConfig; typedef struct { diff --git a/lib_util/split_render_file_read_write.c b/lib_util/split_render_file_read_write.c index d4b43c0097..bb75f9fa9d 100644 --- a/lib_util/split_render_file_read_write.c +++ b/lib_util/split_render_file_read_write.c @@ -156,11 +156,7 @@ ivas_error split_rend_write_bitstream_to_file( int32_t *bits_read, int32_t *bits_written, IVAS_SPLIT_REND_CODEC codec, - IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection - #ifdef API_5MS - , int16_t codec_frame_size_ms - #endif - ) + IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection ) { char header[SPLIT_RENDERER_FRAME_HEADER_LEN] = "SPLIT_FRAME"; size_t header_len, i, num_bytes; @@ -196,13 +192,6 @@ ivas_error split_rend_write_bitstream_to_file( { return IVAS_ERR_FAILED_FILE_WRITE; } -#ifdef API_5MS - /* Write frame size signalling */ - if ( fwrite( &codec_frame_size_ms, sizeof( codec_frame_size_ms ), 1, hSplitRendFileReadWrite->file ) != 1 ) - { - return IVAS_ERR_FAILED_FILE_WRITE; - } -#endif /*write num bytes*/ if ( fwrite( bits_written, sizeof( int32_t ), 1, hSplitRendFileReadWrite->file ) != 1 ) @@ -228,11 +217,7 @@ ivas_error split_rend_read_bits_from_file( int32_t *bits_read, int32_t *bits_written, IVAS_SPLIT_REND_CODEC *codec, - IVAS_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection - #ifdef API_5MS - , int16_t* codec_frame_size_ms - #endif - ) + IVAS_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection ) { char header[SPLIT_RENDERER_FRAME_HEADER_LEN] = "SPLIT_FRAME"; char header_read[SPLIT_RENDERER_FRAME_HEADER_LEN]; @@ -274,13 +259,6 @@ ivas_error split_rend_read_bits_from_file( { return IVAS_ERR_FAILED_FILE_READ; } -#ifdef API_5MS - /* read frame size signalling */ - if ( fread( codec_frame_size_ms, sizeof( *codec_frame_size_ms ), 1, hSplitRendFileReadWrite->file ) != 1 ) - { - return IVAS_ERR_FAILED_FILE_READ; - } -#endif /*write num bytes*/ if ( fread( &bit_len, sizeof( int32_t ), 1, hSplitRendFileReadWrite->file ) != 1 ) diff --git a/lib_util/split_render_file_read_write.h b/lib_util/split_render_file_read_write.h index 5c039eb0ba..19b4b7cf27 100644 --- a/lib_util/split_render_file_read_write.h +++ b/lib_util/split_render_file_read_write.h @@ -62,11 +62,7 @@ ivas_error split_rend_write_bitstream_to_file( int32_t *bits_read, int32_t *bits_written, IVAS_SPLIT_REND_CODEC codec, - IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection - #ifdef API_5MS - , int16_t codec_frame_size_ms - #endif - ); + IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection ); /*read split rend coded bits from file*/ ivas_error split_rend_read_bits_from_file( @@ -75,11 +71,7 @@ ivas_error split_rend_read_bits_from_file( int32_t *bits_read, int32_t *bits_written, IVAS_SPLIT_REND_CODEC *codec, - IVAS_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection - #ifdef API_5MS - , int16_t* codec_frame_size_ms - #endif - ); + IVAS_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection ); /*read split pre rend delay*/ ivas_error split_rend_read_pre_rend_delay_ns( -- GitLab From 19486c682b89901a70b400c67759af6e32087fa2 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Tue, 8 Aug 2023 16:47:19 +0200 Subject: [PATCH 113/175] Add split codec frame signalling (again) --- apps/decoder.c | 22 +++++++++++-- apps/renderer.c | 14 ++++++-- lib_com/common_api_types.h | 2 +- lib_dec/lib_dec.c | 2 -- lib_rend/ivas_prot_rend.h | 12 +++++-- lib_rend/ivas_splitRendererPre.c | 14 +++++++- lib_rend/ivas_splitRenderer_utils.c | 22 ++++++++++--- lib_rend/lib_rend.c | 44 +++++++++++++++++-------- lib_rend/lib_rend.h | 3 ++ lib_util/split_render_file_read_write.c | 26 +++++++++++++-- lib_util/split_render_file_read_write.h | 12 +++++-- 11 files changed, 139 insertions(+), 34 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 049217479a..cbf29e6294 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1763,7 +1763,12 @@ static ivas_error initOnFirstGoodFrame( splitRendBitsZero.bits_written = 0; splitRendBitsZero.bits_read = 0; if ( split_rend_write_bitstream_to_file( *hSplitRendFileReadWrite, splitRendBitsZero.bits_buf, &splitRendBitsZero.bits_read, &splitRendBitsZero.bits_written, - -1, IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) != IVAS_ERR_OK ) + -1, IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE +#ifdef API_5MS + , + splitRendBitsZero.codec_frame_size_ms +#endif + ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to write to bitstream file!\n" ); exit( -1 ); @@ -2021,6 +2026,7 @@ static ivas_error decodeG192( splitRendBits.buf_len = MAX_SPLIT_REND_BITS_BUFFER_SIZE_IN_BYTES; splitRendBits.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; splitRendBits.pose_correction = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE; + splitRendBits.codec_frame_size_ms = 0; hSplitRendFileReadWrite = NULL; #endif @@ -2283,7 +2289,12 @@ static ivas_error decodeG192( if ( ( hSplitRendFileReadWrite != NULL ) && ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED ) ) { if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, splitRendBits.bits_buf, &splitRendBits.bits_read, &splitRendBits.bits_written, - splitRendBits.codec, splitRendBits.pose_correction ) != IVAS_ERR_OK ) + splitRendBits.codec, splitRendBits.pose_correction +#ifdef API_5MS + , + splitRendBits.codec_frame_size_ms +#endif + ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to write to bitstream file!\n" ); goto cleanup; @@ -2294,7 +2305,12 @@ static ivas_error decodeG192( if ( ( hSplitRendFileReadWrite != NULL ) && ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) ) { if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, splitRendBits.bits_buf, &splitRendBits.bits_read, &splitRendBits.bits_written, - splitRendBits.codec, splitRendBits.pose_correction ) != IVAS_ERR_OK ) + splitRendBits.codec, splitRendBits.pose_correction +#ifdef API_5MS + , + splitRendBits.codec_frame_size_ms +#endif + ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to write to bitstream file!\n" ); goto cleanup; diff --git a/apps/renderer.c b/apps/renderer.c index f28dc9dcf1..25d56ee1e6 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1486,7 +1486,12 @@ int main( ivas_error error_tmp; numSamplesRead = (int16_t) inBufferSize; error_tmp = split_rend_read_bits_from_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten, - &bitsBuffer.config.codec, &bitsBuffer.config.poseCorrection ); + &bitsBuffer.config.codec, &bitsBuffer.config.poseCorrection +#ifdef API_5MS + , + &bitsBuffer.config.codec_frame_size_ms +#endif + ); if ( error_tmp != IVAS_ERR_OK ) { if ( error_tmp == IVAS_ERR_END_OF_FILE ) @@ -1950,7 +1955,12 @@ int main( if ( ( hSplitRendFileReadWrite != NULL ) && is_split_pre_rend_mode( &args ) ) { if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten, - bitsBuffer.config.codec, bitsBuffer.config.poseCorrection ) != IVAS_ERR_OK ) + bitsBuffer.config.codec, bitsBuffer.config.poseCorrection +#ifdef API_5MS + , + bitsBuffer.config.codec_frame_size_ms +#endif + ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to write to bitstream file!\n" ); exit( -1 ); diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index 717d29d17f..05b40f6f16 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -133,7 +133,7 @@ typedef struct ivas_split_rend_bits_t int32_t bits_written; int32_t bits_read; #ifdef API_5MS - int16_t codec_frame_size_ms; /* TODO complete implementation */ + int16_t codec_frame_size_ms; #endif IVAS_SPLIT_REND_CODEC codec; IVAS_SPLIT_REND_POSE_CORRECTION_MODE pose_correction; diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index c959c586e8..cba21a6186 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -2181,9 +2181,7 @@ static ivas_error copyRendererConfigStruct( RENDER_CONFIG_HANDLE hRCin, IVAS_REN hRCout->split_rend_config.dof = 3; hRCout->split_rend_config.hq_mode = 0; hRCout->split_rend_config.codec_delay_ms = 0; -#ifdef API_5MS hRCout->split_rend_config.codec_frame_size_ms = 0; /* 0 means "use default for selected codec" */ -#endif hRCout->split_rend_config.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; hRCout->split_rend_config.poseCorrectionMode = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB; hRCout->split_rend_config.rendererSelection = hRCin->split_rend_config.rendererSelection; diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 74ab4098a4..c7396dee5e 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -923,9 +923,17 @@ IVAS_QUATERNION ivas_split_rend_get_sf_rot_data( void ivas_rend_closeCldfbRend( CLDFB_REND_WRAPPER *pCldfbRend ); int32_t ivas_get_lcld_bitrate( const int32_t SplitRendBitRate, const IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode ); int32_t ivas_get_split_rend_md_target_brate( const int32_t SplitRendBitRate, const int16_t pcm_out ); -int32_t ivas_get_lc3plus_bitrate( const int32_t SplitRendBitRate, IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode ); +int32_t ivas_get_lc3plus_bitrate( const int32_t SplitRendBitRate, IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode +#ifdef API_5MS +, int16_t split_prerender_frame_size_ms +#endif + ); int8_t ivas_get_lc3plus_bitrate_id( const int32_t SplitRendBitRate ); -int32_t ivas_get_lc3plus_size_from_id( const int8_t SplitRendBitRateId, IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode ); +int32_t ivas_get_lc3plus_size_from_id( const int8_t SplitRendBitRateId, IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode +#ifdef API_5MS +,int16_t split_prerender_frame_size_ms +#endif + ); ivas_error ivas_split_rend_validate_config( const IVAS_SPLIT_REND_CONFIG_DATA *pSplitRendConfig, const int16_t is_pcm_out ); void ivas_split_rend_get_quant_params( const int16_t num_md_bands, diff --git a/lib_rend/ivas_splitRendererPre.c b/lib_rend/ivas_splitRendererPre.c index 3f0b198491..1086ab609f 100644 --- a/lib_rend/ivas_splitRendererPre.c +++ b/lib_rend/ivas_splitRendererPre.c @@ -1874,7 +1874,13 @@ static ivas_error split_renderer_open_lc3plus( SPLIT_REND_WRAPPER *hSplitRendWra config.channels = BINAURAL_CHANNELS; - error = IVAS_LC3PLUS_ENC_Open( config, ivas_get_lc3plus_bitrate( pSplitRendConfig->splitRendBitRate, pSplitRendConfig->poseCorrectionMode ), &hSplitRendWrapper->hLc3plusEnc ); + error = IVAS_LC3PLUS_ENC_Open( config, ivas_get_lc3plus_bitrate( pSplitRendConfig->splitRendBitRate, pSplitRendConfig->poseCorrectionMode +#ifdef API_5MS + , + config.ivas_frame_duration_us / 1000 +#endif + ), + &hSplitRendWrapper->hLc3plusEnc ); if ( error != IVAS_ERR_OK ) { return error; @@ -2105,6 +2111,9 @@ static ivas_error splitRendLc3plusEncodeAndWrite( pBits->bits_written += 8 * lc3plusBitstreamSize; pBits->codec = IVAS_SPLIT_REND_CODEC_LC3PLUS; pBits->pose_correction = hSplitBin->multiBinPoseData.poseCorrectionMode; +#ifdef API_5MS + pBits->codec_frame_size_ms = hSplitBin->hLc3plusEnc->config.lc3plus_frame_duration_us / 1000; +#endif return IVAS_ERR_OK; } @@ -2241,6 +2250,9 @@ static ivas_error ivas_renderMultiTDBinToSplitBinaural( available_bits = SplitRendBitRate * L_FRAME48k / 48000; actual_md_bits = pBits->bits_written - actual_md_bits; available_bits -= actual_md_bits; +#ifdef API_5MS + pBits->codec_frame_size_ms = 20; +#endif ivas_splitBinLCLDEncProcess( hSplitBin->hSplitBinLCLDEnc, Cldfb_In_BinReal, diff --git a/lib_rend/ivas_splitRenderer_utils.c b/lib_rend/ivas_splitRenderer_utils.c index 155d140491..75e7f6c689 100644 --- a/lib_rend/ivas_splitRenderer_utils.c +++ b/lib_rend/ivas_splitRenderer_utils.c @@ -460,11 +460,15 @@ int32_t ivas_get_lcld_bitrate( const int32_t SplitRendBitRate, const IVAS_SPLIT_ return -1; } -int32_t ivas_get_lc3plus_bitrate( const int32_t SplitRendBitRate, IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode ) +int32_t ivas_get_lc3plus_bitrate( const int32_t SplitRendBitRate, IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode +#ifdef API_5MS +, int16_t split_prerender_frame_size_ms +#endif + ) { if ( poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) { - int32_t inBandMdBps = (int32_t) ( 8 * FRAMES_PER_SECOND ); + int32_t inBandMdBps = (int32_t) ( 8 * 1000 / split_prerender_frame_size_ms ); return ivas_get_lcld_bitrate( SplitRendBitRate, poseCorrectionMode ) - inBandMdBps; } if ( poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) @@ -508,7 +512,11 @@ int8_t ivas_get_lc3plus_bitrate_id( const int32_t SplitRendBitRate ) } return -1; } -int32_t ivas_get_lc3plus_size_from_id( const int8_t SplitRendBitRateId, IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode ) +int32_t ivas_get_lc3plus_size_from_id( const int8_t SplitRendBitRateId, IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode +#ifdef API_5MS +, int16_t split_prerender_frame_size_ms +#endif + ) { int32_t bitrate; @@ -546,10 +554,14 @@ int32_t ivas_get_lc3plus_size_from_id( const int8_t SplitRendBitRateId, IVAS_SPL } } - bitrate = ivas_get_lc3plus_bitrate( bitrate, poseCorrectionMode ); + bitrate = ivas_get_lc3plus_bitrate( bitrate, poseCorrectionMode +#ifdef API_5MS + , split_prerender_frame_size_ms +#endif + ); /* Return size in bytes */ - return (int32_t) ( bitrate / FRAMES_PER_SECOND / 8 ); + return (int32_t) ( bitrate * split_prerender_frame_size_ms / 1000 / 8 ); } ivas_error ivas_split_rend_validate_config( const IVAS_SPLIT_REND_CONFIG_DATA *pSplitRendConfig, const int16_t is_pcm_out ) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 5a57711463..e30e14d2a6 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -359,6 +359,9 @@ static void convertBitsBufferToInternalBitsBuff( hBits->buf_len = outBits.config.bufLenInBytes; hBits->codec = outBits.config.codec; hBits->pose_correction = outBits.config.poseCorrection; +#ifdef API_5MS + hBits->codec_frame_size_ms = outBits.config.codec_frame_size_ms; +#endif return; } @@ -373,6 +376,9 @@ static void convertInternalBitsBuffToBitsBuffer( hOutBits->config.bufLenInBytes = bits.buf_len; hOutBits->config.codec = bits.codec; hOutBits->config.poseCorrection = bits.pose_correction; +#ifdef API_5MS + hOutBits->config.codec_frame_size_ms = bits.codec_frame_size_ms; +#endif return; } @@ -4237,7 +4243,11 @@ ivas_error IVAS_REND_AddInput( } #ifdef SPLIT_REND_WITH_HEAD_ROT - if ( hIvasRend->splitRendEncBuffer.data == NULL && hIvasRend->hRendererConfig != NULL ) + if ( +#ifdef API_5MS + ( hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) && +#endif + hIvasRend->splitRendEncBuffer.data == NULL && hIvasRend->hRendererConfig != NULL ) { int16_t cldfb_in; cldfb_in = 0; @@ -7677,7 +7687,12 @@ static ivas_error splitBinLc3plusDecode( } /* Read LC3plus bitstream size info */ lc3plusBitrateId = ivas_split_rend_bitstream_read_int32( bits, 8 ); - lc3plusBitstreamSize = ivas_get_lc3plus_size_from_id( (int8_t) lc3plusBitrateId, pose_correction ); + lc3plusBitstreamSize = ivas_get_lc3plus_size_from_id( (int8_t) lc3plusBitrateId, pose_correction +#ifdef API_5MS + , + hSplitBin->hLc3plusDec->config.ivas_frame_duration_us / 1000 +#endif + ); for ( int16_t i = 0; i < BINAURAL_CHANNELS * hSplitBin->multiBinPoseData.num_poses; ++i ) { @@ -7719,9 +7734,6 @@ static ivas_error renderSplitBinauralWithPostRot( float tmpCrendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; COMBINED_ORIENTATION_HANDLE pCombinedOrientationData; SPLIT_POST_REND_WRAPPER *hSplitBin; -#ifdef API_5MS - RENDER_CONFIG_HANDLE hRenderConfig; -#endif int8_t isPostRendInputCldfb; isPostRendInputCldfb = 0; @@ -7733,7 +7745,6 @@ static ivas_error renderSplitBinauralWithPostRot( pCombinedOrientationData = *splitBinInput->base.ctx.pCombinedOrientationData; hSplitBin = &splitBinInput->splitPostRendWrapper; #ifdef API_5MS - hRenderConfig = ( *splitBinInput->base.ctx.hhRendererConfig ); convertBitsBufferToInternalBitsBuff( *splitBinInput->hBits, &bits ); #else convertBitsBufferToInternalBitsBuff( *hBits, &bits ); @@ -7751,8 +7762,8 @@ static ivas_error renderSplitBinauralWithPostRot( { LC3PLUS_CONFIG config; #ifdef API_5MS - config.lc3plus_frame_duration_us = hRenderConfig->split_rend_config.codec_frame_size_ms * 1000; - config.ivas_frame_duration_us = ( hRenderConfig->split_rend_config.dof == 0 ) ? config.lc3plus_frame_duration_us : 20000; + config.lc3plus_frame_duration_us = bits.codec_frame_size_ms * 1000; + config.ivas_frame_duration_us = bits.pose_correction == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE ? config.lc3plus_frame_duration_us : 20000; #else config.lc3plus_frame_duration_us = 5000; config.ivas_frame_duration_us = 20000; @@ -7808,6 +7819,10 @@ static ivas_error renderSplitBinauralWithPostRot( /* decode audio */ if ( splitBinInput->base.inConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) { /* TODO(sgi): For both codecs: decode 20ms, cache last 15ms for the next 3 rendering calls */ + int16_t pre_rend_frame_size_ms = bits.codec == IVAS_SPLIT_REND_CODEC_LC3PLUS ? hSplitBin->hLc3plusDec->config.ivas_frame_duration_us / 1000 : 20; + int16_t numSamplesPerChannelCacheSize = *splitBinInput->base.ctx.pOutSampleRate * ( pre_rend_frame_size_ms - bits.codec_frame_size_ms ) / 1000; + int16_t out_buffer_num_samples_per_channel = outAudio.config.numSamplesPerChannel; + if ( splitBinInput->numCachedSamples == 0 ) { if ( bits.codec == IVAS_SPLIT_REND_CODEC_LCLD ) @@ -7830,17 +7845,18 @@ static ivas_error renderSplitBinauralWithPostRot( { return error; } - splitBinInput->numCachedSamples = 720; - mvr2r( &tmpCrendBuffer[0][240], splitBinInput->bufferData, 720 ); - mvr2r( &tmpCrendBuffer[1][240], splitBinInput->bufferData + 720, 720 ); + splitBinInput->numCachedSamples = numSamplesPerChannelCacheSize; + mvr2r( &tmpCrendBuffer[0][out_buffer_num_samples_per_channel], splitBinInput->bufferData, numSamplesPerChannelCacheSize ); + mvr2r( &tmpCrendBuffer[1][out_buffer_num_samples_per_channel], splitBinInput->bufferData + numSamplesPerChannelCacheSize, numSamplesPerChannelCacheSize ); } } else { int16_t tdToCldfbSampleFact = 1; /* TODO(sgi): */ - mvr2r( splitBinInput->bufferData + 720 - splitBinInput->numCachedSamples, tmpCrendBuffer[0], 240 ); - mvr2r( 720 + splitBinInput->bufferData + 720 - splitBinInput->numCachedSamples, tmpCrendBuffer[1], 240 ); - splitBinInput->numCachedSamples -= 240; + int16_t readOffset = numSamplesPerChannelCacheSize - splitBinInput->numCachedSamples; + mvr2r( splitBinInput->bufferData + readOffset, tmpCrendBuffer[0], out_buffer_num_samples_per_channel ); + mvr2r( numSamplesPerChannelCacheSize + splitBinInput->bufferData + readOffset, tmpCrendBuffer[1], out_buffer_num_samples_per_channel ); + splitBinInput->numCachedSamples -= out_buffer_num_samples_per_channel; } } else diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index b9b1f1161c..a12c18a0df 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -71,6 +71,9 @@ typedef struct int32_t bitsRead; IVAS_SPLIT_REND_CODEC codec; IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection; +#ifdef API_5MS + int16_t codec_frame_size_ms; +#endif } IVAS_REND_BitstreamBufferConfig; typedef struct { diff --git a/lib_util/split_render_file_read_write.c b/lib_util/split_render_file_read_write.c index bb75f9fa9d..d4b43c0097 100644 --- a/lib_util/split_render_file_read_write.c +++ b/lib_util/split_render_file_read_write.c @@ -156,7 +156,11 @@ ivas_error split_rend_write_bitstream_to_file( int32_t *bits_read, int32_t *bits_written, IVAS_SPLIT_REND_CODEC codec, - IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection ) + IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection + #ifdef API_5MS + , int16_t codec_frame_size_ms + #endif + ) { char header[SPLIT_RENDERER_FRAME_HEADER_LEN] = "SPLIT_FRAME"; size_t header_len, i, num_bytes; @@ -192,6 +196,13 @@ ivas_error split_rend_write_bitstream_to_file( { return IVAS_ERR_FAILED_FILE_WRITE; } +#ifdef API_5MS + /* Write frame size signalling */ + if ( fwrite( &codec_frame_size_ms, sizeof( codec_frame_size_ms ), 1, hSplitRendFileReadWrite->file ) != 1 ) + { + return IVAS_ERR_FAILED_FILE_WRITE; + } +#endif /*write num bytes*/ if ( fwrite( bits_written, sizeof( int32_t ), 1, hSplitRendFileReadWrite->file ) != 1 ) @@ -217,7 +228,11 @@ ivas_error split_rend_read_bits_from_file( int32_t *bits_read, int32_t *bits_written, IVAS_SPLIT_REND_CODEC *codec, - IVAS_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection ) + IVAS_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection + #ifdef API_5MS + , int16_t* codec_frame_size_ms + #endif + ) { char header[SPLIT_RENDERER_FRAME_HEADER_LEN] = "SPLIT_FRAME"; char header_read[SPLIT_RENDERER_FRAME_HEADER_LEN]; @@ -259,6 +274,13 @@ ivas_error split_rend_read_bits_from_file( { return IVAS_ERR_FAILED_FILE_READ; } +#ifdef API_5MS + /* read frame size signalling */ + if ( fread( codec_frame_size_ms, sizeof( *codec_frame_size_ms ), 1, hSplitRendFileReadWrite->file ) != 1 ) + { + return IVAS_ERR_FAILED_FILE_READ; + } +#endif /*write num bytes*/ if ( fread( &bit_len, sizeof( int32_t ), 1, hSplitRendFileReadWrite->file ) != 1 ) diff --git a/lib_util/split_render_file_read_write.h b/lib_util/split_render_file_read_write.h index 19b4b7cf27..5c039eb0ba 100644 --- a/lib_util/split_render_file_read_write.h +++ b/lib_util/split_render_file_read_write.h @@ -62,7 +62,11 @@ ivas_error split_rend_write_bitstream_to_file( int32_t *bits_read, int32_t *bits_written, IVAS_SPLIT_REND_CODEC codec, - IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection ); + IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection + #ifdef API_5MS + , int16_t codec_frame_size_ms + #endif + ); /*read split rend coded bits from file*/ ivas_error split_rend_read_bits_from_file( @@ -71,7 +75,11 @@ ivas_error split_rend_read_bits_from_file( int32_t *bits_read, int32_t *bits_written, IVAS_SPLIT_REND_CODEC *codec, - IVAS_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection ); + IVAS_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection + #ifdef API_5MS + , int16_t* codec_frame_size_ms + #endif + ); /*read split pre rend delay*/ ivas_error split_rend_read_pre_rend_delay_ns( -- GitLab From b84ae51b5bc1aca1b3f36d8ef6415f192dfcbc66 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Tue, 8 Aug 2023 16:49:25 +0200 Subject: [PATCH 114/175] [fix] renderer split-pre rendering --- apps/renderer.c | 8 ++++---- lib_rend/ivas_splitRendererPre.c | 6 +++--- lib_rend/lib_rend.c | 27 +++++++++++++++++++-------- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index 25d56ee1e6..7ac034e041 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1518,9 +1518,9 @@ int main( } #endif - if ( numSamplesRead == 0 + if ( numSamplesRead == 0 #ifdef API_5MS - && splitBinNeedsNewFrame /* TODO(sgi): clean up */ + && splitBinNeedsNewFrame /* TODO(sgi): clean up */ #endif ) { @@ -1898,11 +1898,11 @@ int main( ) ) != IVAS_ERR_OK ) { #ifdef SPLIT_REND_WITH_HEAD_ROT - fprintf( stderr, "Error %s\n", ivas_error_to_string( error ) ); + fprintf( stderr, "Error %s\n", ivas_error_to_string( error ) ); #else fprintf( stderr, "Error in getting samples\n" ); #endif - exit( -1 ); + exit( -1 ); } #ifdef API_5MS } diff --git a/lib_rend/ivas_splitRendererPre.c b/lib_rend/ivas_splitRendererPre.c index 1086ab609f..1398aabfd9 100644 --- a/lib_rend/ivas_splitRendererPre.c +++ b/lib_rend/ivas_splitRendererPre.c @@ -2375,14 +2375,14 @@ ivas_error ivas_renderMultiBinToSplitBinaural( /* Needs to be done at runtime. If this was in another API function, * there would be no guarantee that the user did not change * the split rendering config before calling the main rendering function */ - #ifdef API_5MS +#ifdef API_5MS if ( ( error = ivas_split_rend_choose_default_codec( &splitCodec, &codec_frame_size_ms, td_input, pcm_out ) ) != IVAS_ERR_OK ) { return error; } - #else +#else ivas_split_rend_choose_default_codec( &splitCodec, td_input, pcm_out ); - #endif +#endif if ( td_input ) { diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index e30e14d2a6..d63affac6f 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -7486,7 +7486,7 @@ static ivas_error renderMcToSplitBinaural( p_tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate, #ifdef API_5MS - 4, + num_subframes_in_buffer( &mcInput->base.inputBuffer, *mcInput->base.ctx.pOutSampleRate ), #endif pos_idx ) ) != IVAS_ERR_OK ) { @@ -9263,6 +9263,7 @@ ivas_error IVAS_REND_GetSamples( { int16_t num_poses_orig; num_poses_orig = hIvasRend->splitRendWrapper.multiBinPoseData.num_poses; +#ifndef API_5MS outAudio = hIvasRend->splitRendEncBuffer; if ( ( outAudioOrig.config.is_cldfb == 0 ) && ( hIvasRend->inputsMasa[0].base.inConfig == IVAS_REND_AUDIO_CONFIG_UNKNOWN ) ) @@ -9270,6 +9271,7 @@ ivas_error IVAS_REND_GetSamples( outAudio.config.is_cldfb = 0; outAudio.config.numSamplesPerChannel >>= 1; } +#endif ivas_renderSplitGetMultiBinPoseData( &hIvasRend->hRendererConfig->split_rend_config, &hIvasRend->splitRendWrapper.multiBinPoseData, @@ -9402,14 +9404,23 @@ ivas_error IVAS_REND_GetSplitBinauralBitstream( IVAS_REND_BitstreamBuffer *hBits /* o : buffer for output bitstream */ ) { - IVAS_REND_AudioBuffer dummyBuffer; - /* Dummy values, just to satisfy checks in getSamplesInternal */ - dummyBuffer.data = (void *) hIvasRend; - dummyBuffer.config.is_cldfb = 0; - dummyBuffer.config.numChannels = BINAURAL_CHANNELS; - dummyBuffer.config.numSamplesPerChannel = L_FRAME48k; + int16_t cldfb_in; + + cldfb_in = 0; + if ( hIvasRend->hRendererConfig->split_rend_config.rendererSelection == IVAS_SPLIT_REND_RENDERER_SELECTION_FASTCONV ) + { +#ifdef DEBUGGING + cldfb_in = 1; +#endif + if ( hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) + { + cldfb_in = 1; + } + } + hIvasRend->splitRendEncBuffer.config.is_cldfb = cldfb_in; + hIvasRend->splitRendEncBuffer.config.numSamplesPerChannel = ( cldfb_in ? 2 : 1 ) * hIvasRend->hRendererConfig->split_rend_config.codec_frame_size_ms * ( hIvasRend->sampleRateOut / 1000 ); - return getSamplesInternal( hIvasRend, dummyBuffer, hBits ); + return getSamplesInternal( hIvasRend, hIvasRend->splitRendEncBuffer, hBits ); } ivas_error IVAS_REND_GetSplitBinauralSamples( -- GitLab From 038cc8cb91f9a516f4b6a7db9e92862f4f41c851 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Tue, 8 Aug 2023 16:57:58 +0200 Subject: [PATCH 115/175] [fix] non-zero DoF renderer split-pre rendering --- lib_rend/lib_rend.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index d63affac6f..547ba267df 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -9238,21 +9238,17 @@ ivas_error IVAS_REND_GetSamples( return error; } - if ( numOutChannels != outAudio.config.numChannels ) + if ( numOutChannels != outAudio.config.numChannels +#ifdef API_5MS + && hIvasRend->outputConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && hIvasRend->outputConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM +#endif + ) { return IVAS_ERR_WRONG_NUM_CHANNELS; } -#ifdef API_5MS - /* outAudio.data is only valid if not in split rendering mode */ - if ( hBits == NULL ) - { -#endif - /* Clear original output buffer */ - set_zero( outAudio.data, outAudio.config.numChannels * outAudio.config.numSamplesPerChannel ); -#ifdef API_5MS - } -#endif + /* Clear original output buffer */ + set_zero( outAudio.data, outAudio.config.numChannels * outAudio.config.numSamplesPerChannel ); #ifdef SPLIT_REND_WITH_HEAD_ROT @@ -9278,8 +9274,10 @@ ivas_error IVAS_REND_GetSamples( hIvasRend->headRotData.sr_pose_pred_axis ); assert( num_poses_orig == hIvasRend->splitRendWrapper.multiBinPoseData.num_poses && "number of poses should not change dynamically" ); +#ifndef API_5MS /* Clear output buffer */ set_zero( outAudio.data, outAudio.config.numChannels * outAudio.config.numSamplesPerChannel ); +#endif } #endif if ( ( error = renderActiveInputsIsm( hIvasRend, outAudio ) ) != IVAS_ERR_OK ) @@ -9418,7 +9416,15 @@ ivas_error IVAS_REND_GetSplitBinauralBitstream( } } hIvasRend->splitRendEncBuffer.config.is_cldfb = cldfb_in; - hIvasRend->splitRendEncBuffer.config.numSamplesPerChannel = ( cldfb_in ? 2 : 1 ) * hIvasRend->hRendererConfig->split_rend_config.codec_frame_size_ms * ( hIvasRend->sampleRateOut / 1000 ); + if ( hIvasRend->hRendererConfig->split_rend_config.dof == 0 || hIvasRend->hRendererConfig->split_rend_config.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) + { + hIvasRend->splitRendEncBuffer.config.numSamplesPerChannel = hIvasRend->hRendererConfig->split_rend_config.codec_frame_size_ms * ( hIvasRend->sampleRateOut / 1000 ); + } + else + { + hIvasRend->splitRendEncBuffer.config.numSamplesPerChannel = hIvasRend->sampleRateOut / FRAMES_PER_SEC; + } + hIvasRend->splitRendEncBuffer.config.numSamplesPerChannel *= cldfb_in ? 2 : 1; return getSamplesInternal( hIvasRend, hIvasRend->splitRendEncBuffer, hBits ); } -- GitLab From 2a312227432eb12ca18753bdd2671fdca81cb735 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Tue, 8 Aug 2023 17:03:49 +0200 Subject: [PATCH 116/175] clang-format --- lib_dec/ivas_stat_dec.h | 2 +- lib_rend/ivas_splitRendererPost.c | 18 +++++++++--------- lib_rend/ivas_splitRenderer_utils.c | 15 +++++++++------ lib_util/split_render_file_read_write.c | 18 ++++++++++-------- lib_util/split_render_file_read_write.h | 18 ++++++++++-------- 5 files changed, 39 insertions(+), 32 deletions(-) diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index 250a269e4e..6aa65935f0 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -938,7 +938,7 @@ typedef struct SPLIT_REND_WRAPPER splitrend; IVAS_DEC_SPLIT_REND_CLDFB_OUT_DATA_HANDLE hCldfbDataOut; /*buffer to store cldfb data before binauralization*/ #ifdef API_5MS - float* tdDataOut; /*buffer to store TD data before binauralization*/ + float *tdDataOut; /*buffer to store TD data before binauralization*/ int16_t numTdSamplesPerChannelCached; #endif } IVAS_DEC_SPLIT_REND_WRAPPER; diff --git a/lib_rend/ivas_splitRendererPost.c b/lib_rend/ivas_splitRendererPost.c index 4e8a1aa168..56e7d23052 100644 --- a/lib_rend/ivas_splitRendererPost.c +++ b/lib_rend/ivas_splitRendererPost.c @@ -1531,14 +1531,14 @@ void ivas_SplitRenderer_PostRenderer( #ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG pos_idx = MAX_HEAD_ROT_POSES - 1; #else - pos_idx = 0; + pos_idx = 0; #endif #ifdef API_5MS /* TODO FhG2Dolby: needs verificatiion with 5ms framing */ sf_idx_md = 0; #else - sf_idx_md = ( hBinPostRenderer->low_Res == 0 ) ? sf_idx : 0; + sf_idx_md = ( hBinPostRenderer->low_Res == 0 ) ? sf_idx : 0; #endif get_interpolation_vars( pMultiBinPoseData, @@ -1546,7 +1546,7 @@ void ivas_SplitRenderer_PostRenderer( #ifdef API_5MS &Quaternion_act, #else - &Quaternions_act[sf_idx], + &Quaternions_act[sf_idx], #endif interp_yaw_pose_idx, interp_pitch_pose_idx, @@ -1618,7 +1618,7 @@ void ivas_SplitRenderer_PostRenderer( #ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG for ( pos_idx = 0; pos_idx < MAX_HEAD_ROT_POSES; pos_idx++ ) #else - pos_idx = 0; + pos_idx = 0; #endif { for ( slot_idx = 0; slot_idx < num_slots; slot_idx++ ) @@ -1626,7 +1626,7 @@ void ivas_SplitRenderer_PostRenderer( #ifdef API_5MS index_slot = slot_idx; /* TODO: can be cleaned up */ #else - index_slot = sf_idx * num_slots + slot_idx; + index_slot = sf_idx * num_slots + slot_idx; #endif fade = ( (float) slot_idx + 1.0f ) / MAX_PARAM_SPATIAL_SUBFRAMES; fade = min( fade, 1.0f ); @@ -1690,8 +1690,8 @@ void ivas_SplitRenderer_PostRenderer( Cldfb_RealBuffer_Recons_Binaural[pos_idx][ch_idx1][index_slot][b2] = pred_out_re[ch_idx1]; Cldfb_ImagBuffer_Recons_Binaural[pos_idx][ch_idx1][index_slot][b2] = pred_out_im[ch_idx1]; #else - Cldfb_RealBuffer_Ref_Binaural[ch_idx1][index_slot][b2] = pred_out_re[ch_idx1]; - Cldfb_ImagBuffer_Ref_Binaural[ch_idx1][index_slot][b2] = pred_out_im[ch_idx1]; + Cldfb_RealBuffer_Ref_Binaural[ch_idx1][index_slot][b2] = pred_out_re[ch_idx1]; + Cldfb_ImagBuffer_Ref_Binaural[ch_idx1][index_slot][b2] = pred_out_im[ch_idx1]; #endif } } @@ -1702,7 +1702,7 @@ void ivas_SplitRenderer_PostRenderer( #ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG for ( pos_idx = 0; pos_idx < MAX_HEAD_ROT_POSES; pos_idx++ ) #else - pos_idx = 0; + pos_idx = 0; #endif { for ( b = 0; b < num_md_bands; b++ ) @@ -1789,7 +1789,7 @@ static void ivas_rend_CldfbSplitPostRendProcessTdIn( #ifdef API_5MS slot_idx < CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES; #else - slot_idx < CLDFB_NO_COL_MAX; + slot_idx < CLDFB_NO_COL_MAX; #endif slot_idx++ ) { diff --git a/lib_rend/ivas_splitRenderer_utils.c b/lib_rend/ivas_splitRenderer_utils.c index 75e7f6c689..a360a38b21 100644 --- a/lib_rend/ivas_splitRenderer_utils.c +++ b/lib_rend/ivas_splitRenderer_utils.c @@ -462,9 +462,10 @@ int32_t ivas_get_lcld_bitrate( const int32_t SplitRendBitRate, const IVAS_SPLIT_ int32_t ivas_get_lc3plus_bitrate( const int32_t SplitRendBitRate, IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode #ifdef API_5MS -, int16_t split_prerender_frame_size_ms + , + int16_t split_prerender_frame_size_ms #endif - ) +) { if ( poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) { @@ -514,9 +515,10 @@ int8_t ivas_get_lc3plus_bitrate_id( const int32_t SplitRendBitRate ) } int32_t ivas_get_lc3plus_size_from_id( const int8_t SplitRendBitRateId, IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode #ifdef API_5MS -, int16_t split_prerender_frame_size_ms + , + int16_t split_prerender_frame_size_ms #endif - ) +) { int32_t bitrate; @@ -556,9 +558,10 @@ int32_t ivas_get_lc3plus_size_from_id( const int8_t SplitRendBitRateId, IVAS_SPL bitrate = ivas_get_lc3plus_bitrate( bitrate, poseCorrectionMode #ifdef API_5MS - , split_prerender_frame_size_ms + , + split_prerender_frame_size_ms #endif - ); + ); /* Return size in bytes */ return (int32_t) ( bitrate * split_prerender_frame_size_ms / 1000 / 8 ); diff --git a/lib_util/split_render_file_read_write.c b/lib_util/split_render_file_read_write.c index d4b43c0097..207e5a8491 100644 --- a/lib_util/split_render_file_read_write.c +++ b/lib_util/split_render_file_read_write.c @@ -157,10 +157,11 @@ ivas_error split_rend_write_bitstream_to_file( int32_t *bits_written, IVAS_SPLIT_REND_CODEC codec, IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection - #ifdef API_5MS - , int16_t codec_frame_size_ms - #endif - ) +#ifdef API_5MS + , + int16_t codec_frame_size_ms +#endif +) { char header[SPLIT_RENDERER_FRAME_HEADER_LEN] = "SPLIT_FRAME"; size_t header_len, i, num_bytes; @@ -229,10 +230,11 @@ ivas_error split_rend_read_bits_from_file( int32_t *bits_written, IVAS_SPLIT_REND_CODEC *codec, IVAS_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection - #ifdef API_5MS - , int16_t* codec_frame_size_ms - #endif - ) +#ifdef API_5MS + , + int16_t *codec_frame_size_ms +#endif +) { char header[SPLIT_RENDERER_FRAME_HEADER_LEN] = "SPLIT_FRAME"; char header_read[SPLIT_RENDERER_FRAME_HEADER_LEN]; diff --git a/lib_util/split_render_file_read_write.h b/lib_util/split_render_file_read_write.h index 5c039eb0ba..326da502e5 100644 --- a/lib_util/split_render_file_read_write.h +++ b/lib_util/split_render_file_read_write.h @@ -63,10 +63,11 @@ ivas_error split_rend_write_bitstream_to_file( int32_t *bits_written, IVAS_SPLIT_REND_CODEC codec, IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection - #ifdef API_5MS - , int16_t codec_frame_size_ms - #endif - ); +#ifdef API_5MS + , + int16_t codec_frame_size_ms +#endif +); /*read split rend coded bits from file*/ ivas_error split_rend_read_bits_from_file( @@ -76,10 +77,11 @@ ivas_error split_rend_read_bits_from_file( int32_t *bits_written, IVAS_SPLIT_REND_CODEC *codec, IVAS_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection - #ifdef API_5MS - , int16_t* codec_frame_size_ms - #endif - ); +#ifdef API_5MS + , + int16_t *codec_frame_size_ms +#endif +); /*read split pre rend delay*/ ivas_error split_rend_read_pre_rend_delay_ns( -- GitLab From a5d61f7240d38b367fb03ef388248e327ba43e04 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Wed, 9 Aug 2023 09:53:28 +0200 Subject: [PATCH 117/175] [fix] instrumented build and cleanup debugging code --- lib_dec/lib_dec.c | 7 ++----- lib_rend/lib_rend.c | 7 ------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index cba21a6186..599d9d617e 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1228,6 +1228,8 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( Decoder_Struct *st_ivas; AUDIO_CONFIG output_config; int32_t output_Fs; + float *writePtr; + float *readPtr, *readEnd; float output[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES][L_FRAME48k]; float pcmBuf[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES * L_FRAME48k]; int16_t numSamplesPerChannelCacheSize; @@ -1295,14 +1297,11 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( } #ifdef DEBUGGING assert( numSamplesPerChannelToDecode == *nOutSamples ); - dbgwrite( pcmBuf, sizeof( float ), numSamplesPerChannelToDecode * BINAURAL_CHANNELS * numPoses, 1, "res/IVAS_DEC_GetSamples_split.pcm" ); #endif /* copy to cache if cache is in use */ if ( hSplitBinRend->tdDataOut != NULL ) { - float *writePtr; - float *readPtr, *readEnd; writePtr = hSplitBinRend->tdDataOut; readPtr = pcmBuf + numSamplesPerChannelToSplitEncode * BINAURAL_CHANNELS * numPoses; readEnd = pcmBuf + *nOutSamples * BINAURAL_CHANNELS * numPoses; @@ -1319,8 +1318,6 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( /* copy from cache */ assert( hSplitBinRend->tdDataOut != NULL ); - float *writePtr; - float *readPtr, *readEnd; readPtr = hSplitBinRend->tdDataOut + ( numSamplesPerChannelCacheSize - hSplitBinRend->numTdSamplesPerChannelCached ) * BINAURAL_CHANNELS * numPoses; readEnd = readPtr + numSamplesPerChannelToSplitEncode * BINAURAL_CHANNELS * numPoses; writePtr = pcmBuf; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 547ba267df..72cf0d5990 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -7838,9 +7838,6 @@ static ivas_error renderSplitBinauralWithPostRot( else { error = splitBinLc3plusDecode( hSplitBin, &bits, tmpCrendBuffer, bits.pose_correction ); -#ifdef DEBUGGING - dbgwrite( tmpCrendBuffer[0], sizeof( float ), 960, 1, "res/splitBinLc3plusDecode.raw" ); -#endif if ( error != IVAS_ERR_OK ) { return error; @@ -7890,10 +7887,6 @@ static ivas_error renderSplitBinauralWithPostRot( } else if ( bits.pose_correction == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) { -#ifdef DEBUGGING - dbgwrite( tmpCrendBuffer[0], sizeof( float ), 240, 1, "res/splitrend_dbg.raw" ); -#endif - ivas_rend_CldfbSplitPostRendProcess( hSplitBin->hBinHrSplitPostRend, &hSplitBin->multiBinPoseData, -- GitLab From a1e7947787e21e3ae4c29fcb64d5d95a440c023e Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Wed, 9 Aug 2023 11:18:11 +0200 Subject: [PATCH 118/175] fixing some compile problems --- apps/decoder.c | 6 +-- apps/renderer.c | 20 +++++----- lib_com/ivas_cnst.h | 2 +- lib_com/ivas_prot.h | 12 +++--- lib_dec/ivas_dec.c | 18 +++++---- lib_dec/ivas_init_dec.c | 8 ++-- lib_dec/ivas_ism_dec.c | 10 ++--- lib_dec/ivas_ism_dtx_dec.c | 2 +- lib_dec/ivas_jbm_dec.c | 20 +++++----- lib_dec/ivas_mct_dec.c | 10 ++--- lib_dec/lib_dec.c | 40 +++++++++++--------- lib_dec/lib_dec.h | 4 +- lib_rend/ivas_dirac_dec_binaural_functions.c | 7 +++- lib_rend/ivas_rotation.c | 6 ++- lib_rend/lib_rend.c | 15 +++++--- lib_rend/lib_rend.h | 2 +- 16 files changed, 99 insertions(+), 83 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index cbf29e6294..e1352fb863 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -2214,7 +2214,7 @@ static ivas_error decodeG192( { #endif error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT IVAS_DEC_PCM_INT16, (void *) #endif @@ -2474,7 +2474,7 @@ static ivas_error decodeG192( /* decode and get samples */ if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT IVAS_DEC_PCM_INT16, (void *) #endif @@ -3445,7 +3445,7 @@ static ivas_error decodeVoIP( /* decode and get samples */ if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT IVAS_DEC_PCM_INT16, (void *) #endif diff --git a/apps/renderer.c b/apps/renderer.c index 7ac034e041..c235b0dd15 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1867,7 +1867,7 @@ int main( } #endif -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT if ( args.inConfig.numBinBuses != 0 ) { if ( ( error = IVAS_REND_GetSplitBinauralSamples( hIvasRend, outBuffer, &splitBinNeedsNewFrame ) ) != IVAS_ERR_OK ) @@ -1904,7 +1904,7 @@ int main( #endif exit( -1 ); } -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT } #endif @@ -2083,8 +2083,8 @@ int main( /* add zeros at the end to have equal length of synthesized signals */ #ifdef SPLIT_REND_WITH_HEAD_ROT if ( audioWriter != NULL ) - { #endif + { #ifdef API_5MS int16_t zerosPadded = 0; zeroPad *= outBuffer.config.numChannels; @@ -2100,16 +2100,14 @@ int main( zeroPad -= zerosPadded; } #else - memset( outInt16Buffer, 0, zeroPad * outBuffer.config.numChannels * sizeof( int16_t ) ); - if ( ( error = AudioFileWriter_write( audioWriter, outInt16Buffer, zeroPad * outBuffer.config.numChannels ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nOutput audio file writer error\n" ); - exit( -1 ); - } + memset( outInt16Buffer, 0, zeroPad * outBuffer.config.numChannels * sizeof( int16_t ) ); + if ( ( error = AudioFileWriter_write( audioWriter, outInt16Buffer, zeroPad * outBuffer.config.numChannels ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nOutput audio file writer error\n" ); + exit( -1 ); + } #endif -#ifdef SPLIT_REND_WITH_HEAD_ROT } -#endif #ifdef FIX_488_SYNC_DELAY if ( args.inConfig.numAudioObjects != 0 && ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL || args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index 32a26a83b0..89b5d743e3 100644 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -166,7 +166,7 @@ typedef enum } RENDERER_TYPE; -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT typedef enum { PCM_INT16, diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 3cede1bd4f..0152020719 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -308,7 +308,7 @@ void stereo_dmx_evs_close_encoder( #if !defined(API_5MS) || defined (API_5MS_BASELINE) ivas_error ivas_dec( Decoder_Struct *st_ivas, /* i : IVAS decoder structure */ -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #else @@ -330,7 +330,7 @@ ivas_error ivas_dec_init_split_rend( ivas_error ivas_dec_setup( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ uint16_t *nSamplesRendered, /* o : number of samples flushed from the previous frame (JBM) */ -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #else @@ -675,7 +675,7 @@ ivas_error ivas_mc_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t idx, /* i : LS config. index */ uint16_t *nSamplesRendered, /* o : samples flushed from last frame (JBM) */ -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #else @@ -795,7 +795,7 @@ ivas_error ivas_jbm_dec_render( const uint16_t nSamplesAsked, /* i : number of samples wanted */ uint16_t *nSamplesRendered, /* o : number of samples rendered */ uint16_t *nSamplesAvailableNext, /* o : number of samples still available in the rendering pipeline */ -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #else @@ -812,7 +812,7 @@ ivas_error ivas_jbm_dec_flush_renderer( const MC_MODE mc_mode_old, /* i : old MC mode */ const ISM_MODE ism_mode_old, /* i : old ISM mode */ uint16_t *nSamplesRendered, /* o : number of samples flushed */ -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #else @@ -1105,7 +1105,7 @@ ivas_error ivas_ism_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const ISM_MODE last_ism_mode, /* i/o: last ISM mode */ uint16_t *nSamplesRendered, /* o : number of samples flushed on renderer change*/ -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #else diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index 63557a88a4..534079286e 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -54,7 +54,7 @@ ivas_error ivas_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #else @@ -106,7 +106,7 @@ ivas_error ivas_dec( if ( st_ivas->bfi == 0 ) { if ( ( error = ivas_dec_setup( st_ivas, NULL, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT PCM_NOT_KNOW, #endif NULL ) ) != IVAS_ERR_OK ) @@ -1079,7 +1079,7 @@ ivas_error ivas_dec( #endif { ivas_limiter_dec( st_ivas->hLimiter, p_output, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT nchan_out_syn_output, #else nchan_out, @@ -1087,7 +1087,7 @@ ivas_error ivas_dec( output_frame, st_ivas->BER_detect ); } -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT switch ( pcm_resolution ) { case PCM_INT16: @@ -1096,15 +1096,17 @@ ivas_error ivas_dec( st_ivas->noClipping += #endif ivas_syn_output( p_output, output_frame, -#ifdef API_5MS +#ifdef SPLIT_REND_WITH_HEAD_ROT nchan_out_syn_output, - (int16_t *) #else nchan_out, #endif - data ); +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT + (int16_t *) +#endif + data ); -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT break; case PCM_FLOAT32: ivas_syn_output_f( p_output, output_frame, nchan_out_syn_output, (float *) data ); diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index d7bc98476b..dc9aea4cff 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -226,7 +226,7 @@ ivas_error ivas_dec_init_split_rend( ivas_error ivas_dec_setup( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ uint16_t *nSamplesRendered, /* o : number of samples flushed from the previous frame (JBM) */ -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #else @@ -283,7 +283,7 @@ ivas_error ivas_dec_setup( st_ivas->nchan_ism = nchan_ism; if ( ( error = ivas_ism_dec_config( st_ivas, st_ivas->ism_mode, nSamplesRendered, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT pcm_resolution, #endif data ) ) != IVAS_ERR_OK ) @@ -400,7 +400,7 @@ ivas_error ivas_dec_setup( /* select MC format mode; reconfigure the MC format decoder */ ivas_mc_dec_config( st_ivas, idx, nSamplesRendered, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT pcm_resolution, #endif @@ -520,7 +520,7 @@ ivas_error ivas_dec_setup( } if ( ( error = ivas_ism_dec_config( st_ivas, st_ivas->ism_mode, nSamplesRendered, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT pcm_resolution, #endif data ) ) != IVAS_ERR_OK ) diff --git a/lib_dec/ivas_ism_dec.c b/lib_dec/ivas_ism_dec.c index e6158e0b5c..d18e9a9a31 100644 --- a/lib_dec/ivas_ism_dec.c +++ b/lib_dec/ivas_ism_dec.c @@ -51,7 +51,7 @@ static ivas_error ivas_ism_bitrate_switching( const int16_t nchan_transport_old, /* i : last number of transport channels */ const ISM_MODE last_ism_mode, /* i : last ISM mode */ uint16_t *nSamplesRendered, /* o : number of samples rendered */ -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #else @@ -157,7 +157,7 @@ static ivas_error ivas_ism_bitrate_switching( if ( tc_granularity_new < st_ivas->hTcBuffer->n_samples_granularity ) { if ( ( error = ivas_jbm_dec_flush_renderer( st_ivas, tc_granularity_new, renderer_type_old, intern_config_old, &hIntSetupOld, MC_MODE_NONE, last_ism_mode, nSamplesRendered, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT pcm_resolution, #endif data ) ) != IVAS_ERR_OK ) @@ -419,7 +419,7 @@ ivas_error ivas_ism_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const ISM_MODE last_ism_mode, /* i/o: last ISM mode */ uint16_t *nSamplesRendered, /* o : number of samples flushed when the renderer granularity changes */ -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #else @@ -464,7 +464,7 @@ ivas_error ivas_ism_dec_config( if ( ( st_ivas->ism_mode != last_ism_mode ) || ( st_ivas->hDecoderConfig->ivas_total_brate != st_ivas->hDecoderConfig->last_ivas_total_brate ) ) { if ( ( error = ivas_ism_bitrate_switching( st_ivas, nchan_transport_old, last_ism_mode, nSamplesRendered, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT pcm_resolution, #endif data ) ) != IVAS_ERR_OK ) @@ -491,7 +491,7 @@ ivas_error ivas_ism_dec_config( if ( st_ivas->ism_mode != last_ism_mode ) { if ( ( error = ivas_ism_bitrate_switching( st_ivas, nchan_transport_old, last_ism_mode, nSamplesRendered, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT pcm_resolution, #endif data ) ) != IVAS_ERR_OK ) diff --git a/lib_dec/ivas_ism_dtx_dec.c b/lib_dec/ivas_ism_dtx_dec.c index 3f26fb4e93..682ba615fa 100644 --- a/lib_dec/ivas_ism_dtx_dec.c +++ b/lib_dec/ivas_ism_dtx_dec.c @@ -97,7 +97,7 @@ ivas_error ivas_ism_dtx_dec( } if ( ( error = ivas_ism_dec_config( st_ivas, last_ism_mode, NULL, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT PCM_NOT_KNOW, #endif NULL ) ) != IVAS_ERR_OK ) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 9dfaf6b4cc..64a4563780 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -736,7 +736,7 @@ ivas_error ivas_jbm_dec_render( const uint16_t nSamplesAsked, /* i : number of samples wanted */ uint16_t *nSamplesRendered, /* o : number of samples rendered */ uint16_t *nSamplesAvailableNext, /* o : number of samples still available in the rendering pipeline */ -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #else @@ -1136,7 +1136,7 @@ ivas_error ivas_jbm_dec_render( st_ivas->hTcBuffer->n_samples_discard = 0; } -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT if ( st_ivas->hDecoderConfig->Opt_Limiter ) #endif { @@ -1144,7 +1144,7 @@ ivas_error ivas_jbm_dec_render( ivas_limiter_dec( st_ivas->hLimiter, p_output, nchan_out, *nSamplesRendered, st_ivas->BER_detect ); } -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT switch ( pcm_resolution ) { case PCM_INT16: @@ -1153,12 +1153,12 @@ ivas_error ivas_jbm_dec_render( st_ivas->noClipping += #endif ivas_syn_output( p_output, *nSamplesRendered, nchan_out, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT (int16_t *) #endif data ); -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT break; case PCM_FLOAT32: ivas_syn_output_f( p_output, *nSamplesRendered, nchan_out, (float *) data ); @@ -1189,7 +1189,7 @@ ivas_error ivas_jbm_dec_flush_renderer( const MC_MODE mc_mode_old, /* i : old MC mode */ const ISM_MODE ism_mode_old, /* i : old ISM mode */ uint16_t *nSamplesRendered, /* o : number of samples flushed */ -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #else @@ -1316,14 +1316,14 @@ ivas_error ivas_jbm_dec_flush_renderer( } /* Only write out the valid data*/ -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT if ( st_ivas->hDecoderConfig->Opt_Limiter ) #endif { ivas_limiter_dec( st_ivas->hLimiter, p_output, st_ivas->hDecoderConfig->nchan_out, *nSamplesRendered, st_ivas->BER_detect ); } -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT switch ( pcm_resolution ) { case PCM_INT16: @@ -1332,12 +1332,12 @@ ivas_error ivas_jbm_dec_flush_renderer( st_ivas->noClipping += #endif ivas_syn_output( p_output, *nSamplesRendered, st_ivas->hDecoderConfig->nchan_out, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT (int16_t *) #endif data ); -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT break; case PCM_FLOAT32: ivas_syn_output_f( p_output, *nSamplesRendered, st_ivas->hDecoderConfig->nchan_out, (float *) data ); diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index afb2ae6d8c..b1a6f1fbd7 100755 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -55,7 +55,7 @@ *-----------------------------------------------------------------------*/ static ivas_error ivas_mc_dec_reconfig( Decoder_Struct *st_ivas, uint16_t *nSamplesRendered, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #else @@ -625,7 +625,7 @@ ivas_error ivas_mc_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t idx, /* i : LS config. index */ uint16_t *nSamplesRendered, /* o : samples flushed from last frame (JBM) */ -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #else @@ -661,7 +661,7 @@ ivas_error ivas_mc_dec_config( if ( st_ivas->hDecoderConfig->last_ivas_total_brate != st_ivas->hDecoderConfig->ivas_total_brate || st_ivas->transport_config != signaled_config || last_mc_mode != st_ivas->mc_mode ) { ivas_mc_dec_reconfig( st_ivas, nSamplesRendered, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT pcm_resolution, #endif data ); @@ -684,7 +684,7 @@ ivas_error ivas_mc_dec_config( static ivas_error ivas_mc_dec_reconfig( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ uint16_t *nSamplesRendered, /* o : number of samples flushed from the last frame (JBM) */ -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #else @@ -782,7 +782,7 @@ static ivas_error ivas_mc_dec_reconfig( if ( tc_granularity_new < st_ivas->hTcBuffer->n_samples_granularity ) { if ( ( error = ivas_jbm_dec_flush_renderer( st_ivas, tc_granularity_new, renderer_type_old, intern_config_old, &hIntSetupOld, last_mc_mode, ISM_MODE_NONE, nSamplesRendered, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT pcm_resolution, #endif data ) ) != IVAS_ERR_OK ) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 599d9d617e..da49ee9aff 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -130,7 +130,7 @@ static JBM_RENDERER_TYPE IVAS_DEC_VoIP_GetRendererConfig( IVAS_DEC_HANDLE hIvasD #endif static ivas_error IVAS_DEC_reconfigure( IVAS_DEC_HANDLE hIvasDec, const uint16_t nTransportChannels, const uint16_t l_ts ); static ivas_error IVAS_DEC_Setup( IVAS_DEC_HANDLE hIvasDec, uint16_t *nTcBufferGranularity, uint8_t *nTransportChannels, uint8_t *nOutChannels, uint16_t *nSamplesRendered, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const IVAS_DEC_PCM_TYPE pcmType, void *data #else @@ -140,7 +140,7 @@ static ivas_error IVAS_DEC_Setup( IVAS_DEC_HANDLE hIvasDec, uint16_t *nTcBufferG static ivas_error IVAS_DEC_GetTcSamples( IVAS_DEC_HANDLE hIvasDec, float *pcmBuf, int16_t *nOutSamples ); static ivas_error IVAS_DEC_RendererFeedTcSamples( IVAS_DEC_HANDLE hIvasDec, const int16_t nSamplesForRendering, int16_t *nSamplesResidual, float *pcmBuf ); static ivas_error IVAS_DEC_GetRenderedSamples( IVAS_DEC_HANDLE hIvasDec, const uint16_t nSamplesForRendering, uint16_t *nSamplesRendered, uint16_t *nSamplesAvailableNext, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT IVAS_DEC_PCM_TYPE pcmType, void *pcmBuf #else @@ -149,7 +149,7 @@ static ivas_error IVAS_DEC_GetRenderedSamples( IVAS_DEC_HANDLE hIvasDec, const u #endif ); static ivas_error IVAS_DEC_GetBufferedNumberOfSamples( IVAS_DEC_HANDLE hIvasDec, int16_t *nSamplesBuffered ); -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT static PCM_RESOLUTION pcm_type_API_to_internal( const IVAS_DEC_PCM_TYPE pcmType ); static void *pcm_buffer_offset( void *buffer, const IVAS_DEC_PCM_TYPE pcmType, int32_t offset ); static ivas_error set_pcm_buffer_to_zero( void *buffer, const IVAS_DEC_PCM_TYPE pcmType, int16_t nZeroSamples ); @@ -1103,7 +1103,11 @@ ivas_error IVAS_DEC_GetSamples( /* only for 1st step 5ms API, split rendering still needs to go through the old decoding function */ else if ( !hIvasDec->st_ivas->hDecoderConfig->Opt_5ms ) { - if ( ( error = _GetSamples( hIvasDec, pcm_type_API_to_internal( pcmType ), pcmBuf, nOutSamples ) ) != IVAS_ERR_OK ) + if ( ( error = _GetSamples( hIvasDec, +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT + pcm_type_API_to_internal( pcmType ), +#endif + pcmBuf, nOutSamples ) ) != IVAS_ERR_OK ) { return error; } @@ -1125,7 +1129,7 @@ ivas_error IVAS_DEC_GetSamples( int16_t nResidualSamples, nSamplesTcsScaled; /* setup */ if ( ( error = IVAS_DEC_Setup( hIvasDec, &l_ts, &nTransportChannels, &nOutChannels, &nSamplesRendered_loop, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT pcmType, pcm_buffer_offset( pcmBuf, pcmType, nSamplesRendered * nOutChannels ) #else @@ -1187,7 +1191,7 @@ ivas_error IVAS_DEC_GetSamples( /* render IVAS frames directly to the output buffer */ nSamplesToRender = nSamplesAsked - nSamplesRendered; if ( ( error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesRendered_loop, &hIvasDec->nSamplesAvailableNext, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT pcmType, pcm_buffer_offset( pcmBuf, pcmType, nSamplesRendered * nOutChannels ) #else @@ -1378,7 +1382,7 @@ static ivas_error IVAS_DEC_Setup( uint8_t *nTransportChannels, /* o : number of decoded transport PCM channels */ uint8_t *nOutChannels, /* o : number of decoded out channels (PCM or CLDFB) */ uint16_t *nSamplesRendered, /* o : number of samples flushed from the last frame */ -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const IVAS_DEC_PCM_TYPE pcmType, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #else @@ -1422,7 +1426,7 @@ static ivas_error IVAS_DEC_Setup( if ( st_ivas->bfi == 0 ) { if ( ( error = ivas_dec_setup( st_ivas, nSamplesRendered, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT pcm_type_API_to_internal( pcmType ), #endif data ) ) != IVAS_ERR_OK ) @@ -1538,7 +1542,7 @@ ivas_error IVAS_DEC_GetRenderedSamples( const uint16_t nSamplesForRendering, /* i : number of TC samples wanted from the renderer */ uint16_t *nSamplesRendered, /* o : number of samples rendered */ uint16_t *nSamplesAvailableNext, /* o : number of samples still available in the renerer pipeline */ -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT IVAS_DEC_PCM_TYPE pcmType, void *pcmBuf #else @@ -1560,7 +1564,7 @@ ivas_error IVAS_DEC_GetRenderedSamples( /* run the main IVAS decoding routine */ if ( ( error = ivas_jbm_dec_render( st_ivas, nSamplesForRendering, nSamplesRendered, nSamplesAvailableNext, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT pcm_type_API_to_internal( pcmType ), #endif pcmBuf ) ) != IVAS_ERR_OK ) @@ -1865,13 +1869,13 @@ ivas_error IVAS_DEC_FeedHeadTrackData( } #endif -#ifdef SPLIT_REND_WITH_HEAD_ROT #ifndef API_5MS +#ifdef SPLIT_REND_WITH_HEAD_ROT hHeadTrackData->num_quaternions = 0; -#endif #else hIvasDec->st_ivas->hHeadTrackData->num_quaternions = 0; #endif +#endif #ifdef SPLIT_REND_WITH_HEAD_ROT hHeadTrackData->sr_pose_pred_axis = rot_axis; @@ -2614,7 +2618,7 @@ ivas_error IVAS_DEC_VoIP_SetScale( ivas_error IVAS_DEC_VoIP_GetSamples( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ uint16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT IVAS_DEC_PCM_TYPE pcmType, void *pcmBuf, #else @@ -2760,7 +2764,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( /* codec mode to use not known yet - simply output silence */ /* directly set output zero */ int16_t nSamplesToZero = min( nSamplesPerChannel, hIvasDec->nSamplesAvailableNext ); -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT set_pcm_buffer_to_zero( pcm_buffer_offset( pcmBuf, pcmType, nSamplesRendered * nOutChannels ), pcmType, nSamplesToZero * nOutChannels ); #else set_s( pcmBuf + nSamplesRendered * nOutChannels, 0, nSamplesToZero * nOutChannels ); @@ -2777,7 +2781,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( /* render IVAS frames directly to the output buffer */ if ( ( error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT pcmType, pcm_buffer_offset( pcmBuf, pcmType, nSamplesRendered * nOutChannels ), #else @@ -3189,7 +3193,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( ivas_error IVAS_DEC_Flush( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const int16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const IVAS_DEC_PCM_TYPE pcmType, void *pcmBuf, #else @@ -3258,7 +3262,7 @@ ivas_error IVAS_DEC_Flush( nSamplesToRender = (uint16_t) *nSamplesFlushed; /* render IVAS frames */ if ( ( error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesFlushedLocal, &hIvasDec->nSamplesAvailableNext, -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT pcmType, #endif pcmBuf ) ) != IVAS_ERR_OK ) @@ -4416,7 +4420,7 @@ ivas_error IVAS_DEC_GetCldfbSamples( } #endif -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT void *pcm_buffer_offset( void *buffer, const IVAS_DEC_PCM_TYPE pcmType, int32_t offset ) { switch ( pcmType ) diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 1b207ff3c4..38950fec3c 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -334,7 +334,7 @@ ivas_error IVAS_DEC_VoIP_SetScale( ivas_error IVAS_DEC_VoIP_GetSamples( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ uint16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT IVAS_DEC_PCM_TYPE pcmType, void *pcmBuf, #else @@ -354,7 +354,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples( ivas_error IVAS_DEC_Flush( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const int16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const IVAS_DEC_PCM_TYPE pcmType, void *pcmBuf, #else diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index 453414cb66..4eac84f842 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -925,7 +925,12 @@ static void ivas_dirac_dec_binaural_internal( #ifndef SPLIT_REND_WITH_HEAD_ROT_PARAMBIN #ifdef MASA_AND_OBJECTS ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, Rmat, subframe, - hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0, st_ivas->hMasaIsmData ); +#ifdef API_5MS + hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation > 0, +#else + hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0, +#endif + st_ivas->hMasaIsmData ); #else ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, Rmat, subframe, #ifdef API_5MS diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index a3a6b9d94d..c90ab6d5d8 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -587,7 +587,11 @@ void rotateFrame_sd( #ifdef SPLIT_REND_WITH_HEAD_ROT hCombinedOrientationData->Rmat_prev[0][i], #else - hCombinedOrientationData->Rmat_prev[i] +#ifdef API_5MS + hCombinedOrientationData->Rmat_prev, +#else + hCombinedOrientationData->Rmat_prev[i], +#endif #endif 3 ); } diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 72cf0d5990..e73af37954 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -60,15 +60,14 @@ #define MAX_BUFFER_LENGTH ( MAX_BUFFER_LENGTH_PER_CHANNEL * MAX_INPUT_CHANNELS ) #define MAX_CLDFB_BUFFER_LENGTH ( MAX_CLDFB_BUFFER_LENGTH_PER_CHANNEL * MAX_INPUT_CHANNELS ) #define MAX_BIN_BUFFER_LENGTH ( MAX_BUFFER_LENGTH_PER_CHANNEL * BINAURAL_CHANNELS ) +#else +#define MAX_BUFFER_LENGTH ( MAX_BUFFER_LENGTH_PER_CHANNEL * MAX_INPUT_CHANNELS ) +#endif #ifdef FIX_194_LFE_DELAY_EXTREND #define MAX_BIN_DELAY_SAMPLES 50 /* Maximum supported rendering latency for binaural IRs */ #endif -#else -#define MAX_BUFFER_LENGTH ( MAX_BUFFER_LENGTH_PER_CHANNEL * MAX_INPUT_CHANNELS ) -#endif - /* Frame size required when rendering to binaural */ #ifdef API_5MS #define BINAURAL_RENDERING_FRAME_SIZE_MS 5 @@ -6819,7 +6818,7 @@ static ivas_error renderLfeToBinaural( #ifdef FIX_194_LFE_DELAY_EXTREND for ( ear_idx = 0; ear_idx < BINAURAL_CHANNELS; ++ear_idx ) { - writePtr = getSmplPtr( outAudio, pose_idx * BINAURAL_CHANNELS + ear_idx, 0 ); + writePtr = getSmplPtr( outAudio, BINAURAL_CHANNELS + ear_idx, 0 ); v_add( writePtr, tmpLfeBuffer, writePtr, frame_size ); } #else @@ -8679,6 +8678,7 @@ static void renderMasaToBinaural( num_subframes_in_buffer( &outAudio, *masaInput->base.ctx.pOutSampleRate ) #endif ); +#ifdef SPLIT_REND_WITH_HEAD_ROT if ( is_split_rend_mode ) { accumulateCLDFBArrayToBuffer( @@ -8687,6 +8687,7 @@ static void renderMasaToBinaural( &outAudio ); } else +#endif { accumulate2dArrayToBuffer( tmpBuffer, &outAudio ); } @@ -9232,7 +9233,7 @@ ivas_error IVAS_REND_GetSamples( } if ( numOutChannels != outAudio.config.numChannels -#ifdef API_5MS +#ifdef SPLIT_REND_WITH_HEAD_ROT && hIvasRend->outputConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && hIvasRend->outputConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM #endif ) @@ -9390,6 +9391,7 @@ ivas_error IVAS_REND_GetSamples( return getSamplesInternal( hIvasRend, outAudio, NULL ); } +#ifdef SPLIT_REND_WITH_HEAD_ROT ivas_error IVAS_REND_GetSplitBinauralBitstream( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ IVAS_REND_BitstreamBuffer *hBits /* o : buffer for output bitstream */ @@ -9438,6 +9440,7 @@ ivas_error IVAS_REND_GetSplitBinauralSamples( return IVAS_ERR_OK; } #endif +#endif /*-------------------------------------------------------------------* diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index a12c18a0df..2a270c46d9 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -274,7 +274,7 @@ int16_t IVAS_REND_FeedRenderConfig( const IVAS_RENDER_CONFIG_DATA renderConfig /* i : Render configuration struct */ ); -#ifdef API_5MS +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT ivas_error IVAS_REND_FeedSplitBinauralBitstream( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ const IVAS_REND_InputId inputId, /* i : ID of the input */ -- GitLab From 0809558a58104bfd27e085bb99859c6abf3f0060 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Wed, 9 Aug 2023 17:07:02 +0200 Subject: [PATCH 119/175] [fix] add caching for LCLD codec path --- lib_dec/ivas_init_dec.c | 5 +- lib_rend/ivas_splitRendererPost.c | 15 +++- lib_rend/lib_rend.c | 131 +++++++++++++++++++++++++++--- 3 files changed, 136 insertions(+), 15 deletions(-) diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index dc9aea4cff..5c1b0e0fbb 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -1073,7 +1073,10 @@ ivas_error ivas_init_decoder( if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) { - ivas_dec_init_split_rend( st_ivas ); + if ( ( error = ivas_dec_init_split_rend( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } } else { diff --git a/lib_rend/ivas_splitRendererPost.c b/lib_rend/ivas_splitRendererPost.c index 56e7d23052..bbf4d4e2e2 100644 --- a/lib_rend/ivas_splitRendererPost.c +++ b/lib_rend/ivas_splitRendererPost.c @@ -1896,18 +1896,31 @@ void ivas_rend_CldfbSplitPostRendProcess( /* Implement CLDFB synthesis */ for ( ch_idx = 0; ch_idx < BINAURAL_CHANNELS; ch_idx++ ) { +#ifdef API_5MS + float *RealBuffer[CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES]; + float *ImagBuffer[CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES]; + + for ( slot_idx = 0; slot_idx < CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ ) +#else float *RealBuffer[CLDFB_NO_COL_MAX]; float *ImagBuffer[CLDFB_NO_COL_MAX]; for ( slot_idx = 0; slot_idx < CLDFB_NO_COL_MAX; slot_idx++ ) +#endif { RealBuffer[slot_idx] = Cldfb_RealBuffer_Binaural[ch_idx][slot_idx]; ImagBuffer[slot_idx] = Cldfb_ImagBuffer_Binaural[ch_idx][slot_idx]; } - cldfbSynthesis( RealBuffer, ImagBuffer, &( output[ch_idx][0] ), num_cldfb_bands * CLDFB_NO_COL_MAX, hBinHrSplitPostRend->cldfbSyn[ch_idx] ); + cldfbSynthesis( RealBuffer, ImagBuffer, &( output[ch_idx][0] ), num_cldfb_bands * CLDFB_NO_COL_MAX +#ifdef API_5MS + / MAX_PARAM_SPATIAL_SUBFRAMES +#endif + , + hBinHrSplitPostRend->cldfbSyn[ch_idx] ); } + pop_wmops(); return; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index e73af37954..fd66c929b0 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -60,6 +60,9 @@ #define MAX_BUFFER_LENGTH ( MAX_BUFFER_LENGTH_PER_CHANNEL * MAX_INPUT_CHANNELS ) #define MAX_CLDFB_BUFFER_LENGTH ( MAX_CLDFB_BUFFER_LENGTH_PER_CHANNEL * MAX_INPUT_CHANNELS ) #define MAX_BIN_BUFFER_LENGTH ( MAX_BUFFER_LENGTH_PER_CHANNEL * BINAURAL_CHANNELS ) +#ifdef API_5MS +#define MAX_CLDFB_BIN_BUFFER_LENGTH ( MAX_CLDFB_BUFFER_LENGTH_PER_CHANNEL * BINAURAL_CHANNELS ) +#endif #else #define MAX_BUFFER_LENGTH ( MAX_BUFFER_LENGTH_PER_CHANNEL * MAX_INPUT_CHANNELS ) #endif @@ -2868,12 +2871,24 @@ static ivas_error setRendInputActiveSplitPostRend( rendCtx = inputSplitPostRend->base.ctx; outConfig = *rendCtx.pOutConfig; - if ( ( error = allocateInputBaseBufferData( &inputSplitPostRend->bufferData, MAX_BIN_BUFFER_LENGTH ) ) != IVAS_ERR_OK ) + if ( ( error = allocateInputBaseBufferData( &inputSplitPostRend->bufferData, +#ifdef API_5MS + MAX_CLDFB_BIN_BUFFER_LENGTH +#else + MAX_BIN_BUFFER_LENGTH +#endif + ) ) != IVAS_ERR_OK ) { return error; } initRendInputBase( &inputSplitPostRend->base, inConfig, id, rendCtx, - inputSplitPostRend->bufferData, MAX_BIN_BUFFER_LENGTH ); + inputSplitPostRend->bufferData, +#ifdef API_5MS + MAX_CLDFB_BIN_BUFFER_LENGTH +#else + MAX_BIN_BUFFER_LENGTH +#endif + ); inputSplitPostRend->numCachedSamples = 0; if ( ( error = updateSplitPostRendPanGains( inputSplitPostRend, outConfig, hRendCfg ) ) != IVAS_ERR_OK ) @@ -7817,13 +7832,22 @@ static ivas_error renderSplitBinauralWithPostRot( /* decode audio */ if ( splitBinInput->base.inConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) - { /* TODO(sgi): For both codecs: decode 20ms, cache last 15ms for the next 3 rendering calls */ + { +#ifdef API_5MS + if ( bits.codec == IVAS_SPLIT_REND_CODEC_LCLD ) + { + isPostRendInputCldfb = 1; + } + int16_t chnlIdx, slotIdx, smplIdx; int16_t pre_rend_frame_size_ms = bits.codec == IVAS_SPLIT_REND_CODEC_LC3PLUS ? hSplitBin->hLc3plusDec->config.ivas_frame_duration_us / 1000 : 20; int16_t numSamplesPerChannelCacheSize = *splitBinInput->base.ctx.pOutSampleRate * ( pre_rend_frame_size_ms - bits.codec_frame_size_ms ) / 1000; int16_t out_buffer_num_samples_per_channel = outAudio.config.numSamplesPerChannel; + int16_t out_buffer_num_col_per_channel = CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES; + int16_t numColPerChannelCacheSize = CLDFB_NO_COL_MAX - out_buffer_num_col_per_channel; if ( splitBinInput->numCachedSamples == 0 ) { +#endif if ( bits.codec == IVAS_SPLIT_REND_CODEC_LCLD ) { ivas_splitBinLCLDDecProcess( @@ -7832,7 +7856,39 @@ static ivas_error renderSplitBinauralWithPostRot( Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, SplitRendBFI ); +#ifndef API_5MS isPostRendInputCldfb = 1; +#endif + +#ifdef API_5MS + /* copy data over to 5ms buffer */ + for ( chnlIdx = 0; chnlIdx < BINAURAL_CHANNELS; ++chnlIdx ) + { + for ( slotIdx = 0; slotIdx < CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES; ++slotIdx ) + { + mvr2r( Cldfb_RealBuffer_Binaural[chnlIdx][slotIdx], Cldfb_RealBuffer_Binaural_5ms[chnlIdx][slotIdx], CLDFB_NO_CHANNELS_MAX ); + mvr2r( Cldfb_ImagBuffer_Binaural[chnlIdx][slotIdx], Cldfb_ImagBuffer_Binaural_5ms[chnlIdx][slotIdx], CLDFB_NO_CHANNELS_MAX ); + } + } + /* cache the remaining 15ms */ + splitBinInput->numCachedSamples = numColPerChannelCacheSize; + float *writePtr; + writePtr = splitBinInput->bufferData; + for ( slotIdx = CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES; slotIdx < CLDFB_NO_COL_MAX; ++slotIdx ) + { + for ( chnlIdx = 0; chnlIdx < BINAURAL_CHANNELS; ++chnlIdx ) + { + for ( smplIdx = 0; smplIdx < CLDFB_NO_CHANNELS_MAX; ++smplIdx ) + { + *writePtr++ = Cldfb_RealBuffer_Binaural[chnlIdx][slotIdx][smplIdx]; + } + for ( smplIdx = 0; smplIdx < CLDFB_NO_CHANNELS_MAX; ++smplIdx ) + { + *writePtr++ = Cldfb_ImagBuffer_Binaural[chnlIdx][slotIdx][smplIdx]; + } + } + } +#endif } else { @@ -7841,19 +7897,56 @@ static ivas_error renderSplitBinauralWithPostRot( { return error; } +#ifdef API_5MS + /* cache the remaining 15ms */ splitBinInput->numCachedSamples = numSamplesPerChannelCacheSize; - mvr2r( &tmpCrendBuffer[0][out_buffer_num_samples_per_channel], splitBinInput->bufferData, numSamplesPerChannelCacheSize ); - mvr2r( &tmpCrendBuffer[1][out_buffer_num_samples_per_channel], splitBinInput->bufferData + numSamplesPerChannelCacheSize, numSamplesPerChannelCacheSize ); + mvr2r( &tmpCrendBuffer[0][out_buffer_num_samples_per_channel], + splitBinInput->bufferData, + numSamplesPerChannelCacheSize ); + mvr2r( &tmpCrendBuffer[1][out_buffer_num_samples_per_channel], + splitBinInput->bufferData + numSamplesPerChannelCacheSize, + numSamplesPerChannelCacheSize ); +#endif } +#ifdef API_5MS } else { - int16_t tdToCldfbSampleFact = 1; /* TODO(sgi): */ - int16_t readOffset = numSamplesPerChannelCacheSize - splitBinInput->numCachedSamples; - mvr2r( splitBinInput->bufferData + readOffset, tmpCrendBuffer[0], out_buffer_num_samples_per_channel ); - mvr2r( numSamplesPerChannelCacheSize + splitBinInput->bufferData + readOffset, tmpCrendBuffer[1], out_buffer_num_samples_per_channel ); - splitBinInput->numCachedSamples -= out_buffer_num_samples_per_channel; + /* copy from cache */ + if ( bits.codec == IVAS_SPLIT_REND_CODEC_LCLD ) + { + int16_t readOffset = ( numColPerChannelCacheSize - splitBinInput->numCachedSamples ); + float *readPtr; + readPtr = splitBinInput->bufferData; + isPostRendInputCldfb = 1; + + readPtr += 2 * readOffset * CLDFB_NO_CHANNELS_MAX * BINAURAL_CHANNELS; + for ( slotIdx = 0; slotIdx < CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES; ++slotIdx ) + { + for ( chnlIdx = 0; chnlIdx < BINAURAL_CHANNELS; ++chnlIdx ) + { + for ( smplIdx = 0; smplIdx < CLDFB_NO_CHANNELS_MAX; ++smplIdx ) + { + Cldfb_RealBuffer_Binaural_5ms[chnlIdx][slotIdx][smplIdx] = *readPtr++; + } + for ( smplIdx = 0; smplIdx < CLDFB_NO_CHANNELS_MAX; ++smplIdx ) + { + Cldfb_ImagBuffer_Binaural_5ms[chnlIdx][slotIdx][smplIdx] = *readPtr++; + } + } + } + + splitBinInput->numCachedSamples -= out_buffer_num_col_per_channel; + } + else + { + int16_t readOffset = numSamplesPerChannelCacheSize - splitBinInput->numCachedSamples; + mvr2r( splitBinInput->bufferData + readOffset, tmpCrendBuffer[0], out_buffer_num_samples_per_channel ); + mvr2r( numSamplesPerChannelCacheSize + splitBinInput->bufferData + readOffset, tmpCrendBuffer[1], out_buffer_num_samples_per_channel ); + splitBinInput->numCachedSamples -= out_buffer_num_samples_per_channel; + } } +#endif } else { @@ -7868,10 +7961,17 @@ static ivas_error renderSplitBinauralWithPostRot( for ( ch_idx = 0; ch_idx < BINAURAL_CHANNELS; ch_idx++ ) { +#ifdef API_5MS + float *RealBuffer[CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES]; + float *ImagBuffer[CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES]; + + for ( slot_idx = 0; slot_idx < CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ ) +#else float *RealBuffer[CLDFB_NO_COL_MAX]; float *ImagBuffer[CLDFB_NO_COL_MAX]; for ( slot_idx = 0; slot_idx < CLDFB_NO_COL_MAX; slot_idx++ ) +#endif { RealBuffer[slot_idx] = Cldfb_RealBuffer_Binaural[ch_idx][slot_idx]; ImagBuffer[slot_idx] = Cldfb_ImagBuffer_Binaural[ch_idx][slot_idx]; @@ -7880,7 +7980,11 @@ static ivas_error renderSplitBinauralWithPostRot( cldfbSynthesis( RealBuffer, ImagBuffer, &( tmpCrendBuffer[ch_idx][0] ), - hSplitBin->hBinHrSplitPostRend->cldfbSyn[0]->no_channels * CLDFB_NO_COL_MAX, + hSplitBin->hBinHrSplitPostRend->cldfbSyn[0]->no_channels * CLDFB_NO_COL_MAX +#ifdef API_5MS + / MAX_PARAM_SPATIAL_SUBFRAMES +#endif + , hSplitBin->hBinHrSplitPostRend->cldfbSyn[ch_idx] ); } } @@ -9393,7 +9497,7 @@ ivas_error IVAS_REND_GetSamples( #ifdef SPLIT_REND_WITH_HEAD_ROT ivas_error IVAS_REND_GetSplitBinauralBitstream( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ IVAS_REND_BitstreamBuffer *hBits /* o : buffer for output bitstream */ ) { @@ -9411,7 +9515,8 @@ ivas_error IVAS_REND_GetSplitBinauralBitstream( } } hIvasRend->splitRendEncBuffer.config.is_cldfb = cldfb_in; - if ( hIvasRend->hRendererConfig->split_rend_config.dof == 0 || hIvasRend->hRendererConfig->split_rend_config.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) + if ( hIvasRend->hRendererConfig->split_rend_config.codec == IVAS_SPLIT_REND_CODEC_LC3PLUS && + ( hIvasRend->hRendererConfig->split_rend_config.dof == 0 || hIvasRend->hRendererConfig->split_rend_config.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) ) { hIvasRend->splitRendEncBuffer.config.numSamplesPerChannel = hIvasRend->hRendererConfig->split_rend_config.codec_frame_size_ms * ( hIvasRend->sampleRateOut / 1000 ); } -- GitLab From b2996c4f441200ca55c0f816a4289d3f0c3b0c08 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Wed, 9 Aug 2023 17:22:03 +0200 Subject: [PATCH 120/175] [ci-skip] clang-format --- lib_dec/ivas_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index 534079286e..44954398a5 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -1104,7 +1104,7 @@ ivas_error ivas_dec( #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT (int16_t *) #endif - data ); + data ); #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT break; -- GitLab From a37b812be460550ba7145378b9b6952b1e79ffea Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Wed, 9 Aug 2023 18:06:48 +0200 Subject: [PATCH 121/175] [fix] incorrect frame size at decoder for LCLD and instrumented build --- lib_dec/lib_dec.c | 5 +++-- lib_rend/lib_rend.c | 40 ++++++++++++++++++++++++++-------------- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index da49ee9aff..ca79adda2f 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1258,8 +1258,9 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( ivas_set_split_rend_setup( hSplitBinRend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hCombinedOrientationData, hSplitRendBits ); numPoses = hSplitBinRend->splitrend.multiBinPoseData.num_poses; - if ( hIvasDec->st_ivas->hRenderConfig->split_rend_config.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE || - hIvasDec->st_ivas->hRenderConfig->split_rend_config.dof == 0 ) + if ( hIvasDec->st_ivas->hRenderConfig->split_rend_config.codec == IVAS_SPLIT_REND_CODEC_LC3PLUS && + ( hIvasDec->st_ivas->hRenderConfig->split_rend_config.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE || + hIvasDec->st_ivas->hRenderConfig->split_rend_config.dof == 0 ) ) { numSamplesPerChannelToSplitEncode = (int16_t) ( output_Fs / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ); numSamplesPerChannelCacheSize = numSamplesPerChannelToDecode - numSamplesPerChannelToSplitEncode; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 8da51fee49..320cc44be6 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -7787,6 +7787,14 @@ static ivas_error renderSplitBinauralWithPostRot( COMBINED_ORIENTATION_HANDLE pCombinedOrientationData; SPLIT_POST_REND_WRAPPER *hSplitBin; int8_t isPostRendInputCldfb; +#ifdef API_5MS + int16_t chnlIdx, slotIdx, smplIdx; + int16_t preRendFrameSize_ms; + int16_t outBufNumSamplesPerChannel, outBufNumColPerChannel; + int16_t numSamplesPerChannelCacheSize, numColPerChannelCacheSize; + float *readPtr, *writePtr; +#endif + isPostRendInputCldfb = 0; @@ -7876,12 +7884,14 @@ static ivas_error renderSplitBinauralWithPostRot( { isPostRendInputCldfb = 1; } - int16_t chnlIdx, slotIdx, smplIdx; - int16_t pre_rend_frame_size_ms = bits.codec == IVAS_SPLIT_REND_CODEC_LC3PLUS ? hSplitBin->hLc3plusDec->config.ivas_frame_duration_us / 1000 : 20; - int16_t numSamplesPerChannelCacheSize = *splitBinInput->base.ctx.pOutSampleRate * ( pre_rend_frame_size_ms - bits.codec_frame_size_ms ) / 1000; - int16_t out_buffer_num_samples_per_channel = outAudio.config.numSamplesPerChannel; - int16_t out_buffer_num_col_per_channel = CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES; - int16_t numColPerChannelCacheSize = CLDFB_NO_COL_MAX - out_buffer_num_col_per_channel; + + preRendFrameSize_ms = bits.codec == IVAS_SPLIT_REND_CODEC_LC3PLUS ? hSplitBin->hLc3plusDec->config.ivas_frame_duration_us / 1000 : 20; + + outBufNumSamplesPerChannel = outAudio.config.numSamplesPerChannel; + numSamplesPerChannelCacheSize = *splitBinInput->base.ctx.pOutSampleRate * ( preRendFrameSize_ms - bits.codec_frame_size_ms ) / 1000; + + outBufNumColPerChannel = CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES; + numColPerChannelCacheSize = CLDFB_NO_COL_MAX - outBufNumColPerChannel; if ( splitBinInput->numCachedSamples == 0 ) { @@ -7910,7 +7920,6 @@ static ivas_error renderSplitBinauralWithPostRot( } /* cache the remaining 15ms */ splitBinInput->numCachedSamples = numColPerChannelCacheSize; - float *writePtr; writePtr = splitBinInput->bufferData; for ( slotIdx = CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES; slotIdx < CLDFB_NO_COL_MAX; ++slotIdx ) { @@ -7938,10 +7947,10 @@ static ivas_error renderSplitBinauralWithPostRot( #ifdef API_5MS /* cache the remaining 15ms */ splitBinInput->numCachedSamples = numSamplesPerChannelCacheSize; - mvr2r( &tmpCrendBuffer[0][out_buffer_num_samples_per_channel], + mvr2r( &tmpCrendBuffer[0][outBufNumSamplesPerChannel], splitBinInput->bufferData, numSamplesPerChannelCacheSize ); - mvr2r( &tmpCrendBuffer[1][out_buffer_num_samples_per_channel], + mvr2r( &tmpCrendBuffer[1][outBufNumSamplesPerChannel], splitBinInput->bufferData + numSamplesPerChannelCacheSize, numSamplesPerChannelCacheSize ); #endif @@ -7954,7 +7963,6 @@ static ivas_error renderSplitBinauralWithPostRot( if ( bits.codec == IVAS_SPLIT_REND_CODEC_LCLD ) { int16_t readOffset = ( numColPerChannelCacheSize - splitBinInput->numCachedSamples ); - float *readPtr; readPtr = splitBinInput->bufferData; isPostRendInputCldfb = 1; @@ -7974,14 +7982,18 @@ static ivas_error renderSplitBinauralWithPostRot( } } - splitBinInput->numCachedSamples -= out_buffer_num_col_per_channel; + splitBinInput->numCachedSamples -= outBufNumColPerChannel; } else { int16_t readOffset = numSamplesPerChannelCacheSize - splitBinInput->numCachedSamples; - mvr2r( splitBinInput->bufferData + readOffset, tmpCrendBuffer[0], out_buffer_num_samples_per_channel ); - mvr2r( numSamplesPerChannelCacheSize + splitBinInput->bufferData + readOffset, tmpCrendBuffer[1], out_buffer_num_samples_per_channel ); - splitBinInput->numCachedSamples -= out_buffer_num_samples_per_channel; + mvr2r( splitBinInput->bufferData + readOffset, + tmpCrendBuffer[0], + outBufNumSamplesPerChannel ); + mvr2r( splitBinInput->bufferData + readOffset + numSamplesPerChannelCacheSize, + tmpCrendBuffer[1], + outBufNumSamplesPerChannel ); + splitBinInput->numCachedSamples -= outBufNumSamplesPerChannel; } } #endif -- GitLab From 4df7e82c19d934688078218bcb2bb619d60b325b Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Wed, 9 Aug 2023 18:30:09 +0200 Subject: [PATCH 122/175] [fix] crash for MASA split-pre rendering and update for 0DoF tests --- lib_rend/lib_rend.c | 18 +++++++----------- tests/split_rendering/utils.py | 3 +++ 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 320cc44be6..a8845f8b71 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -9309,7 +9309,9 @@ ivas_error IVAS_REND_GetSamples( int16_t numOutChannels; #ifdef SPLIT_REND_WITH_HEAD_ROT int16_t cldfb2tdSampleFact; +#ifndef API_5MS IVAS_REND_AudioBuffer outAudioOrig; +#endif #endif /* Validate function arguments */ @@ -9399,7 +9401,9 @@ ivas_error IVAS_REND_GetSamples( #ifdef SPLIT_REND_WITH_HEAD_ROT +#ifndef API_5MS outAudioOrig = outAudio; +#endif /* Use internal buffer if outputting split rendering bitstream */ if ( ( hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || ( hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) @@ -9518,7 +9522,9 @@ ivas_error IVAS_REND_GetSamples( return error; } convertInternalBitsBuffToBitsBuffer( hBits, bits ); +#ifndef API_5MS outAudio = outAudioOrig; +#endif if ( hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { accumulate2dArrayToBuffer( tmpBinaural, &outAudio ); @@ -9552,17 +9558,7 @@ ivas_error IVAS_REND_GetSplitBinauralBitstream( { int16_t cldfb_in; - cldfb_in = 0; - if ( hIvasRend->hRendererConfig->split_rend_config.rendererSelection == IVAS_SPLIT_REND_RENDERER_SELECTION_FASTCONV ) - { -#ifdef DEBUGGING - cldfb_in = 1; -#endif - if ( hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) - { - cldfb_in = 1; - } - } + cldfb_in = getCldfbRendFlag( hIvasRend, IVAS_REND_AUDIO_CONFIG_TYPE_UNKNOWN ); hIvasRend->splitRendEncBuffer.config.is_cldfb = cldfb_in; if ( hIvasRend->hRendererConfig->split_rend_config.codec == IVAS_SPLIT_REND_CODEC_LC3PLUS && ( hIvasRend->hRendererConfig->split_rend_config.dof == 0 || hIvasRend->hRendererConfig->split_rend_config.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) ) diff --git a/tests/split_rendering/utils.py b/tests/split_rendering/utils.py index 888e9a2925..f27295f9c3 100644 --- a/tests/split_rendering/utils.py +++ b/tests/split_rendering/utils.py @@ -178,6 +178,9 @@ def run_external_split_rendering( if in_meta_files: cmd[9:9] = ["-im", *in_meta_files] + if "0dof" in render_config.name: + cmd.append("-fr5") + run_cmd(cmd) # run split renderer -- GitLab From bc27786ffda498586add6d75df490335649c50bb Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Wed, 9 Aug 2023 18:56:35 +0200 Subject: [PATCH 123/175] - fix compilation with API_5MS disabled - replace usage of FRAMES_PER_SECOND defined in wmc_auto.h with FRAMES_PER_SEC - fix for BE comparison MASA pytest --- lib_dec/ivas_dec.c | 2 +- lib_enc/ivas_ism_metadata_enc.c | 2 +- lib_rend/ivas_splitRendererPre.c | 4 ++-- lib_rend/ivas_splitRenderer_utils.c | 16 ++++++++++++++-- lib_rend/lib_rend.c | 7 ++++++- .../lc3plus/ivas_lc3plus_unit_test.c | 9 ++++++--- .../test_split_rendering_be_comparison.py | 1 + 7 files changed, 31 insertions(+), 10 deletions(-) diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index 44954398a5..cce6e68713 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -1096,7 +1096,7 @@ ivas_error ivas_dec( st_ivas->noClipping += #endif ivas_syn_output( p_output, output_frame, -#ifdef SPLIT_REND_WITH_HEAD_ROT +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT nchan_out_syn_output, #else nchan_out, diff --git a/lib_enc/ivas_ism_metadata_enc.c b/lib_enc/ivas_ism_metadata_enc.c index 3154eb56a7..9aab99a77b 100644 --- a/lib_enc/ivas_ism_metadata_enc.c +++ b/lib_enc/ivas_ism_metadata_enc.c @@ -631,7 +631,7 @@ ivas_error ivas_ism_metadata_enc( ism_total_brate_ref = *ism_total_brate; brate_limit_flag = calculate_brate_limit_flag( ism_imp, nchan_ism ); - bits_ism = (int16_t) ( *ism_total_brate / FRAMES_PER_SECOND ); + bits_ism = (int16_t) ( *ism_total_brate / FRAMES_PER_SEC ); set_s( bits_element, bits_ism / nchan_ism, nchan_ism ); bits_element[nchan_ism - 1] += bits_ism % nchan_ism; bitbudget_to_brate( bits_element, element_brate, nchan_ism ); diff --git a/lib_rend/ivas_splitRendererPre.c b/lib_rend/ivas_splitRendererPre.c index 1398aabfd9..dea7c6683b 100644 --- a/lib_rend/ivas_splitRendererPre.c +++ b/lib_rend/ivas_splitRendererPre.c @@ -1896,7 +1896,7 @@ static ivas_error split_renderer_open_lc3plus( SPLIT_REND_WRAPPER *hSplitRendWra /* Alocate buffers for delay compensation */ if ( pSplitRendConfig->codec == IVAS_SPLIT_REND_CODEC_LC3PLUS ) { - delayBufferLength = OutSampleRate / (int32_t) FRAMES_PER_SECOND + hSplitRendWrapper->lc3plusDelaySamples; + delayBufferLength = OutSampleRate / (int32_t) FRAMES_PER_SEC + hSplitRendWrapper->lc3plusDelaySamples; for ( i = 0; i < hSplitRendWrapper->multiBinPoseData.num_poses * BINAURAL_CHANNELS; ++i ) { hSplitRendWrapper->lc3plusDelayBuffers[i] = malloc( delayBufferLength * sizeof( float ) ); @@ -2155,7 +2155,7 @@ static ivas_error ivas_renderMultiTDBinToSplitBinaural( #ifdef API_5MS int32_t frame_size = hSplitBin->hLc3plusEnc->config.samplerate * codec_frame_size_ms / 1000; #else - int32_t frame_size = hSplitBin->hLc3plusEnc->config.samplerate / (int32_t) FRAMES_PER_SECOND; + int32_t frame_size = hSplitBin->hLc3plusEnc->config.samplerate / (int32_t) FRAMES_PER_SEC; #endif for ( i = 0; i < num_poses * BINAURAL_CHANNELS; ++i ) diff --git a/lib_rend/ivas_splitRenderer_utils.c b/lib_rend/ivas_splitRenderer_utils.c index a360a38b21..309dc33c0b 100644 --- a/lib_rend/ivas_splitRenderer_utils.c +++ b/lib_rend/ivas_splitRenderer_utils.c @@ -469,7 +469,13 @@ int32_t ivas_get_lc3plus_bitrate( const int32_t SplitRendBitRate, IVAS_SPLIT_REN { if ( poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) { - int32_t inBandMdBps = (int32_t) ( 8 * 1000 / split_prerender_frame_size_ms ); + int32_t inBandMdBps = (int32_t) ( 8 * 1000 / +#ifdef API_5MS + split_prerender_frame_size_ms +#else + FRAMES_PER_SEC +#endif + ); return ivas_get_lcld_bitrate( SplitRendBitRate, poseCorrectionMode ) - inBandMdBps; } if ( poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) @@ -564,7 +570,13 @@ int32_t ivas_get_lc3plus_size_from_id( const int8_t SplitRendBitRateId, IVAS_SPL ); /* Return size in bytes */ - return (int32_t) ( bitrate * split_prerender_frame_size_ms / 1000 / 8 ); + return (int32_t) ( bitrate * +#ifdef API_5MS + split_prerender_frame_size_ms +#else + FRAMES_PER_SEC +#endif + / 1000 / 8 ); } ivas_error ivas_split_rend_validate_config( const IVAS_SPLIT_REND_CONFIG_DATA *pSplitRendConfig, const int16_t is_pcm_out ) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index a8845f8b71..6456a2ccdd 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -9547,7 +9547,12 @@ ivas_error IVAS_REND_GetSamples( IVAS_REND_AudioBuffer outAudio /* i/o: buffer for output audio */ ) { - return getSamplesInternal( hIvasRend, outAudio, NULL ); + return getSamplesInternal( hIvasRend, outAudio +#ifdef SPLIT_REND_WITH_HEAD_ROT + , + NULL +#endif + ); } #ifdef SPLIT_REND_WITH_HEAD_ROT diff --git a/scripts/split_rendering/lc3plus/ivas_lc3plus_unit_test.c b/scripts/split_rendering/lc3plus/ivas_lc3plus_unit_test.c index b8a5563c13..4b49bc4315 100644 --- a/scripts/split_rendering/lc3plus/ivas_lc3plus_unit_test.c +++ b/scripts/split_rendering/lc3plus/ivas_lc3plus_unit_test.c @@ -94,7 +94,7 @@ static int encodeAndDecodeOneStereoFrame( LC3PLUS_CONFIG config ) #ifdef LC3PLUS_DEC_ALLOW_DISABLE_CACHING 1 /*caching enabled*/, #endif - &decHandle ); + &decHandle ); if ( IVAS_ERR_OK != err ) { return err; @@ -334,8 +334,6 @@ static int openCloseDecoderWithoutCaching( void ) } - - static int tryOpenDecoderWithInvalidFrameDuration( void ) { ivas_error err; @@ -624,4 +622,9 @@ int main( #endif return ret; } +#else +int main( void ) +{ + return EXIT_SUCCESS; +} #endif /* SPLIT_REND_WITH_HEAD_ROT */ diff --git a/tests/split_rendering/test_split_rendering_be_comparison.py b/tests/split_rendering/test_split_rendering_be_comparison.py index f0eb4b46a4..189c4539e7 100644 --- a/tests/split_rendering/test_split_rendering_be_comparison.py +++ b/tests/split_rendering/test_split_rendering_be_comparison.py @@ -195,6 +195,7 @@ def test_masa_external_split(test_info, in_fmt, render_config, trajectory): pre_trajectory = post_trajectory.with_stem(f"{post_trajectory.stem}_delayed") compare_external_split_args( + test_info, in_fmt=in_fmt, render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"), pre_trajectory=pre_trajectory, -- GitLab From c3a3584231522ab5468cb5390cd9c94c83ffb790 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 10 Aug 2023 07:32:07 +0200 Subject: [PATCH 124/175] add comments to fix switches --- lib_com/options.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 959a01568d..e350406b01 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -159,8 +159,8 @@ // 5 ms branch switches start // TODO: Check all switches in this section, remove if they were accepted #define FIX_566_2DIR_MASA_384K /* Nokia: Issued 566: Bugfix in 384k MASA metadata encoding of second direction */ -#define FIX_XXX_HEADTRACKER_INIT -#define FIX_XXX_ISM_SBA_ASAN +#define FIX_XXX_HEADTRACKER_INIT /* FhG: move setting of orientation tracking type to earlier */ +#define FIX_XXX_ISM_SBA_ASAN /* FhG: fix asan in the access of the interpolator*/ #define FIX_XXX_JBM_USAN /* FhG: fix usan in acessing transport channel buffers */ #define FIX_XXX_PARAMISM_JBM_ENER_CORRECTION /* FhG: fix energy correction in ParamISM rendering */ #define NONBE_FIX_589_JBM_TC_OFFSETS -- GitLab From d950deaff0b0ec776325b6c60437f468e6953a6b Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 10 Aug 2023 07:51:11 +0200 Subject: [PATCH 125/175] fix Windows compiler warnings --- apps/decoder.c | 9 +++++++++ apps/renderer.c | 7 +++++-- lib_rend/ivas_splitRendererPre.c | 6 +++--- lib_rend/lib_rend.c | 10 +++++----- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index e1352fb863..09eb557e77 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -675,7 +675,9 @@ int main( if ( arg.renderConfigEnabled ) { +#ifndef API_5MS IVAS_RENDER_CONFIG_DATA renderConfig; +#endif /* sanity check */ #ifdef SPLIT_REND_WITH_HEAD_ROT @@ -1762,6 +1764,13 @@ static ivas_error initOnFirstGoodFrame( IVAS_SPLIT_REND_BITS splitRendBitsZero; splitRendBitsZero.bits_written = 0; splitRendBitsZero.bits_read = 0; + splitRendBitsZero.bits_buf = NULL; + splitRendBitsZero.bits_read = 0; + splitRendBitsZero.bits_written = 0; + splitRendBitsZero.buf_len =0; + splitRendBitsZero.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; + splitRendBitsZero.pose_correction = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE; + splitRendBitsZero.codec_frame_size_ms = 20; if ( split_rend_write_bitstream_to_file( *hSplitRendFileReadWrite, splitRendBitsZero.bits_buf, &splitRendBitsZero.bits_read, &splitRendBitsZero.bits_written, -1, IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE #ifdef API_5MS diff --git a/apps/renderer.c b/apps/renderer.c index c235b0dd15..bd03d212da 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -797,7 +797,7 @@ int main( int16_t numSamplesRead; int16_t delayNumSamples = -1; int16_t delayNumSamples_orig = 0; - int16_t zeroPad = 0; + int32_t zeroPad = 0; int32_t delayTimeScale = 0; int16_t i, numChannels; ivas_error error = IVAS_ERR_OK; @@ -1434,6 +1434,9 @@ int main( bitsBuffer.config.bitsRead = 0; bitsBuffer.config.bitsWritten = 0; bitsBuffer.config.bufLenInBytes = bitsBufferSize; + bitsBuffer.config.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; + bitsBuffer.config.poseCorrection = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE; + bitsBuffer.config.codec_frame_size_ms = 20; #else inFloatBuffer = malloc( inBufferSize * sizeof( float ) ); outInt16Buffer = malloc( outBufferSize * sizeof( int16_t ) ); @@ -2086,7 +2089,7 @@ int main( #endif { #ifdef API_5MS - int16_t zerosPadded = 0; + int32_t zerosPadded = 0; zeroPad *= outBuffer.config.numChannels; while ( zeroPad > 0 ) { diff --git a/lib_rend/ivas_splitRendererPre.c b/lib_rend/ivas_splitRendererPre.c index dea7c6683b..39ddf0c6a7 100644 --- a/lib_rend/ivas_splitRendererPre.c +++ b/lib_rend/ivas_splitRendererPre.c @@ -1877,9 +1877,9 @@ static ivas_error split_renderer_open_lc3plus( SPLIT_REND_WRAPPER *hSplitRendWra error = IVAS_LC3PLUS_ENC_Open( config, ivas_get_lc3plus_bitrate( pSplitRendConfig->splitRendBitRate, pSplitRendConfig->poseCorrectionMode #ifdef API_5MS , - config.ivas_frame_duration_us / 1000 + (int16_t) ( config.ivas_frame_duration_us / 1000 ) #endif - ), + ), &hSplitRendWrapper->hLc3plusEnc ); if ( error != IVAS_ERR_OK ) { @@ -2112,7 +2112,7 @@ static ivas_error splitRendLc3plusEncodeAndWrite( pBits->codec = IVAS_SPLIT_REND_CODEC_LC3PLUS; pBits->pose_correction = hSplitBin->multiBinPoseData.poseCorrectionMode; #ifdef API_5MS - pBits->codec_frame_size_ms = hSplitBin->hLc3plusEnc->config.lc3plus_frame_duration_us / 1000; + pBits->codec_frame_size_ms = (int16_t) ( hSplitBin->hLc3plusEnc->config.lc3plus_frame_duration_us / 1000 ); #endif return IVAS_ERR_OK; } diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 6456a2ccdd..b0993758b6 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -7742,7 +7742,7 @@ static ivas_error splitBinLc3plusDecode( lc3plusBitstreamSize = ivas_get_lc3plus_size_from_id( (int8_t) lc3plusBitrateId, pose_correction #ifdef API_5MS , - hSplitBin->hLc3plusDec->config.ivas_frame_duration_us / 1000 + (int16_t) ( hSplitBin->hLc3plusDec->config.ivas_frame_duration_us / 1000 ) #endif ); @@ -7885,10 +7885,10 @@ static ivas_error renderSplitBinauralWithPostRot( isPostRendInputCldfb = 1; } - preRendFrameSize_ms = bits.codec == IVAS_SPLIT_REND_CODEC_LC3PLUS ? hSplitBin->hLc3plusDec->config.ivas_frame_duration_us / 1000 : 20; + preRendFrameSize_ms = bits.codec == IVAS_SPLIT_REND_CODEC_LC3PLUS ? (int16_t) ( hSplitBin->hLc3plusDec->config.ivas_frame_duration_us ) / 1000 : 20; outBufNumSamplesPerChannel = outAudio.config.numSamplesPerChannel; - numSamplesPerChannelCacheSize = *splitBinInput->base.ctx.pOutSampleRate * ( preRendFrameSize_ms - bits.codec_frame_size_ms ) / 1000; + numSamplesPerChannelCacheSize = (int16_t) ( *splitBinInput->base.ctx.pOutSampleRate * ( preRendFrameSize_ms - bits.codec_frame_size_ms ) / 1000 ); outBufNumColPerChannel = CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES; numColPerChannelCacheSize = CLDFB_NO_COL_MAX - outBufNumColPerChannel; @@ -9568,11 +9568,11 @@ ivas_error IVAS_REND_GetSplitBinauralBitstream( if ( hIvasRend->hRendererConfig->split_rend_config.codec == IVAS_SPLIT_REND_CODEC_LC3PLUS && ( hIvasRend->hRendererConfig->split_rend_config.dof == 0 || hIvasRend->hRendererConfig->split_rend_config.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) ) { - hIvasRend->splitRendEncBuffer.config.numSamplesPerChannel = hIvasRend->hRendererConfig->split_rend_config.codec_frame_size_ms * ( hIvasRend->sampleRateOut / 1000 ); + hIvasRend->splitRendEncBuffer.config.numSamplesPerChannel = hIvasRend->hRendererConfig->split_rend_config.codec_frame_size_ms * (int16_t) ( hIvasRend->sampleRateOut / 1000 ); } else { - hIvasRend->splitRendEncBuffer.config.numSamplesPerChannel = hIvasRend->sampleRateOut / FRAMES_PER_SEC; + hIvasRend->splitRendEncBuffer.config.numSamplesPerChannel = (int16_t) ( hIvasRend->sampleRateOut / FRAMES_PER_SEC ); } hIvasRend->splitRendEncBuffer.config.numSamplesPerChannel *= cldfb_in ? 2 : 1; -- GitLab From 68d5f571d8da70e45d5105305dddbe807284af97 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 10 Aug 2023 08:51:18 +0200 Subject: [PATCH 126/175] fix render config reading in the decoder (was involuntarily broken in the previous commit) --- apps/decoder.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 09eb557e77..2c5b9ab154 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -440,8 +440,8 @@ int main( * Load renderer configuration from file *--------------------------------------------------------------------*/ - IVAS_RENDER_CONFIG_DATA renderConfig; - if ( ( error = IVAS_DEC_GetDefaultRenderConfig( &renderConfig ) ) != IVAS_ERR_OK ) + IVAS_RENDER_CONFIG_DATA renderConfigSplit; + if ( ( error = IVAS_DEC_GetDefaultRenderConfig( &renderConfigSplit ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetDefaultRenderConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; @@ -464,7 +464,7 @@ int main( goto cleanup; } #endif - if ( RenderConfigReader_read( renderConfigReader, &renderConfig ) != IVAS_ERR_OK ) + if ( RenderConfigReader_read( renderConfigReader, &renderConfigSplit ) != IVAS_ERR_OK ) { fprintf( stderr, "Failed to read renderer configuration from file %s\n\n", arg.renderConfigFilename ); goto cleanup; @@ -516,7 +516,7 @@ int main( if ( ( error = IVAS_DEC_EnableSplitRendering( hIvasDec #ifdef API_5MS_BASELINE , - renderConfig + renderConfigSplit #endif ) ) != IVAS_ERR_OK ) { @@ -675,9 +675,7 @@ int main( if ( arg.renderConfigEnabled ) { -#ifndef API_5MS IVAS_RENDER_CONFIG_DATA renderConfig; -#endif /* sanity check */ #ifdef SPLIT_REND_WITH_HEAD_ROT -- GitLab From afe1ee4267200495f481904c138600d21afa8eac Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 10 Aug 2023 09:22:46 +0200 Subject: [PATCH 127/175] remove duplicated lines --- apps/decoder.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 2c5b9ab154..5f7b7192b2 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1760,12 +1760,10 @@ static ivas_error initOnFirstGoodFrame( if ( *hSplitRendFileReadWrite != NULL ) { IVAS_SPLIT_REND_BITS splitRendBitsZero; - splitRendBitsZero.bits_written = 0; - splitRendBitsZero.bits_read = 0; splitRendBitsZero.bits_buf = NULL; splitRendBitsZero.bits_read = 0; splitRendBitsZero.bits_written = 0; - splitRendBitsZero.buf_len =0; + splitRendBitsZero.buf_len = 0; splitRendBitsZero.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; splitRendBitsZero.pose_correction = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE; splitRendBitsZero.codec_frame_size_ms = 20; -- GitLab From 827b43772bbcc3750e406ddb8c6771093253745e Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 10 Aug 2023 09:54:15 +0200 Subject: [PATCH 128/175] change behaviour of the update of Quaternion_prev_ext_orientation again (see discussion in #570), clang-format --- apps/decoder.c | 2 +- lib_rend/ivas_rotation.c | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 2c5b9ab154..a44450a9b3 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1765,7 +1765,7 @@ static ivas_error initOnFirstGoodFrame( splitRendBitsZero.bits_buf = NULL; splitRendBitsZero.bits_read = 0; splitRendBitsZero.bits_written = 0; - splitRendBitsZero.buf_len =0; + splitRendBitsZero.buf_len = 0; splitRendBitsZero.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; splitRendBitsZero.pose_correction = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE; splitRendBitsZero.codec_frame_size_ms = 20; diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index c90ab6d5d8..9761ccf249 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -1531,9 +1531,14 @@ ivas_error combine_external_and_head_orientations( if ( hExtOrientationData != NULL ) { #ifdef API_5MS - - hCombinedOrientationData->Quaternion_prev_extOrientation = hExtOrientationData->Quaternion; - + if ( hExtOrientationData->enableExternalOrientation > 0 ) + { + hCombinedOrientationData->Quaternion_prev_extOrientation = hExtOrientationData->Quaternion; + } + else + { + hCombinedOrientationData->Quaternion_prev_extOrientation = identity; + } #elif defined FIX_570_SF_EXT_ORIENTATION if ( hExtOrientationData->enableExternalOrientation[MAX_PARAM_SPATIAL_SUBFRAMES - 1] > 0 ) { -- GitLab From 744ad023127b66ed880ffa93f5c85920a236dfd3 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 10 Aug 2023 10:43:34 +0200 Subject: [PATCH 129/175] [fix] add missing break from merge conflict in renderer commandline parsing --- apps/renderer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/renderer.c b/apps/renderer.c index 9ef1ec167b..e8f5e10ec3 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -2912,6 +2912,7 @@ static void parseOption( case CmdLnOptionId_framing5ms: assert( numOptionValues == 0 ); args->framing_5ms = true; + break; #endif #ifdef CONTROL_METADATA_DIRECTIVITY case CmdLnOptionId_directivityPatternId: -- GitLab From 2aa77ea7281119c5c7a80af2d3ae63dd33dcae50 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 10 Aug 2023 11:51:01 +0200 Subject: [PATCH 130/175] rename defines for fixes to contain the correct issue number, add skipping over unused head positions and external orientations fpor 20ms split rendering --- apps/decoder.c | 25 +++++++++++++++++++++++++ lib_com/options.h | 11 +++++------ lib_dec/ivas_init_dec.c | 4 ++-- lib_dec/ivas_ism_param_dec.c | 6 +++--- lib_dec/ivas_jbm_dec.c | 2 +- lib_dec/ivas_sba_rendering_internal.c | 6 +++--- 6 files changed, 39 insertions(+), 15 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 6c6044334d..c1c43c7b42 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -2196,6 +2196,18 @@ static ivas_error decodeG192( fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } + if ( !arg.enable5ms ) + { + /* Skip over 3 following head positions - they are given on 5ms grid */ + for ( i = 0; i < 3; ++i ) + { + if ( ( error = HeadRotationFileReading( headRotReader, &Quaternion, &Pos ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + } + } } if ( arg.enableExternalOrientation ) @@ -2220,6 +2232,19 @@ static ivas_error decodeG192( fprintf( stderr, "\nIVAS_DEC_FeedExternalOrientationData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } + + if ( !arg.enable5ms ) + { + /* Skip over 3 following entries in file - they are given on 5ms grid */ + for ( i = 0; i < 3; ++i ) + { + if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &Quaternion, &enableHeadRotation, &enableExternalOrientation, &enableRotationInterpolation, &numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error in External Orientation File Reading: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + } + } } /* decode and get samples */ diff --git a/lib_com/options.h b/lib_com/options.h index b508770328..cac0c34b27 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -163,12 +163,11 @@ // 5 ms branch switches start // TODO: Check all switches in this section, remove if they were accepted #define FIX_566_2DIR_MASA_384K /* Nokia: Issued 566: Bugfix in 384k MASA metadata encoding of second direction */ -#define FIX_XXX_HEADTRACKER_INIT /* FhG: move setting of orientation tracking type to earlier */ -#define FIX_XXX_ISM_SBA_ASAN /* FhG: fix asan in the access of the interpolator*/ -#define FIX_XXX_JBM_USAN /* FhG: fix usan in acessing transport channel buffers */ -#define FIX_XXX_PARAMISM_JBM_ENER_CORRECTION /* FhG: fix energy correction in ParamISM rendering */ -#define NONBE_FIX_589_JBM_TC_OFFSETS -#define FIX_JBM_MC2SBA /* FhG: fix check for transport vs. internal channel count in JBM prior to ivas_mc2sba() */ +#define FIX_551_HEADTRACKER_INIT /* FhG: move setting of orientation tracking type to earlier */ +#define FIX_678_ISM_SBA_ASAN /* FhG: fix asan in the access of the interpolator*/ +#define FIX_676_JBM_USAN /* FhG: fix usan in acessing transport channel buffers */ +#define FIX_591_PARAMISM_JBM_ENER_CORRECTION /* FhG: fix energy correction in ParamISM rendering */ +#define FIX_JBM_MC2SBA /* FhG: fix issue #679: check for transport vs. internal channel count in JBM prior to ivas_mc2sba() */ #define API_5MS /* FhG: 5ms rendering capability */ #ifdef API_5MS #define API_5MS_BASELINE /* FhG: baseline with 20ms rendering and split rendering through 20ms branch */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 5c1b0e0fbb..9f9697829c 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -859,7 +859,7 @@ ivas_error ivas_init_decoder_front( { return error; } -#ifdef FIX_XXX_HEADTRACKER_INIT +#ifdef FIX_551_HEADTRACKER_INIT if ( ( error = ivas_orient_trk_SetTrackingType( st_ivas->hHeadTrackData->OrientationTracker, st_ivas->hDecoderConfig->orientation_tracking ) ) != IVAS_ERR_OK ) { return error; @@ -1052,7 +1052,7 @@ ivas_error ivas_init_decoder( } } -#ifndef FIX_XXX_HEADTRACKER_INIT +#ifndef FIX_551_HEADTRACKER_INIT /*-----------------------------------------------------------------* * Set head/orientation tracking *-----------------------------------------------------------------*/ diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index a5e2668f36..f4df25a58e 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -1181,7 +1181,7 @@ void ivas_param_ism_dec_digest_tc( int32_t ivas_total_brate; #ifndef API_5MS int16_t output_frame; -#ifdef FIX_XXX_PARAMISM_JBM_ENER_CORRECTION +#ifdef FIX_591_PARAMISM_JBM_ENER_CORRECTION int16_t fade_len; #endif float gain, ene_tc, ene_sum, grad; @@ -1203,7 +1203,7 @@ void ivas_param_ism_dec_digest_tc( ene_tc = 0.0f; ene_sum = 0.0f; last_gain = st_ivas->hDirAC->hParamIsm->last_dmx_gain; -#ifdef FIX_XXX_PARAMISM_JBM_ENER_CORRECTION +#ifdef FIX_591_PARAMISM_JBM_ENER_CORRECTION fade_len = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( 2 * FRAMES_PER_SEC ) ); output_frame = nCldfbSlots * hSpatParamRendCom->num_freq_bands; #else @@ -1341,7 +1341,7 @@ void ivas_param_ism_dec_digest_tc( /* Smoothing */ gain = 0.75f * gain + 0.25f * last_gain; /* 10ms ramp */ -#ifdef FIX_XXX_PARAMISM_JBM_ENER_CORRECTION +#ifdef FIX_591_PARAMISM_JBM_ENER_CORRECTION grad = ( gain - last_gain ) / (float) fade_len; /* slope between two consecutive gains, 480 samples length */ for ( i = 0; i < fade_len; i++ ) #else diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 64a4563780..8aa00f6d4f 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -778,7 +778,7 @@ ivas_error ivas_jbm_dec_render( p_output[n] = &output[n][0]; } -#ifdef FIX_XXX_JBM_USAN +#ifdef FIX_676_JBM_USAN for ( n = 0; n < st_ivas->hTcBuffer->nchan_buffer_full; n++ ) #else for ( n = 0; n < st_ivas->hTcBuffer->nchan_transport_internal; n++ ) diff --git a/lib_dec/ivas_sba_rendering_internal.c b/lib_dec/ivas_sba_rendering_internal.c index 18b5db2f3d..a9580fba9c 100644 --- a/lib_dec/ivas_sba_rendering_internal.c +++ b/lib_dec/ivas_sba_rendering_internal.c @@ -365,7 +365,7 @@ void ivas_ism2sba_sf( for ( j = 0; j < sba_num_chans; j++ ) { g2 = hIsmRendererData->interpolator + offset; -#ifndef FIX_XXX_ISM_SBA_ASAN +#ifndef FIX_678_ISM_SBA_ASAN g1 = 1 - *g2; #endif tc = buffer_in[i] + offset; @@ -374,11 +374,11 @@ void ivas_ism2sba_sf( prev_gain = hIsmRendererData->prev_gains[i][j]; for ( k = 0; k < n_samples_to_render; k++ ) { -#ifdef FIX_XXX_ISM_SBA_ASAN +#ifdef FIX_678_ISM_SBA_ASAN g1 = 1.0f - *g2; #endif *( out++ ) += ( ( *( g2++ ) ) * gain + g1 * prev_gain ) * ( *( tc++ ) ); -#ifndef FIX_XXX_ISM_SBA_ASAN +#ifndef FIX_678_ISM_SBA_ASAN g1 = 1.0f - *g2; #endif } -- GitLab From ea45d60783cc722e3d04e3f7d903350e741c910d Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 10 Aug 2023 11:54:05 +0200 Subject: [PATCH 131/175] [fix] request correct number of subframes from crend/tdrend --- lib_rend/ivas_objectRenderer.c | 5 ++++- lib_rend/ivas_prot_rend.h | 21 ++++++++++++--------- lib_rend/lib_rend.c | 22 ++++++++++++++++++++-- 3 files changed, 36 insertions(+), 12 deletions(-) diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 815cf21c32..bbb59e52a9 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -733,6 +733,9 @@ ivas_error ivas_td_binaural_renderer_ext( const REVERB_HANDLE hReverb, /* i : Reverberator handle */ #ifdef FIX_488_SYNC_DELAY const int16_t ism_md_subframe_update_ext, /* i: Metadata Delay in subframes to sync with audio delay */ +#endif +#ifdef API_5MS + const int32_t output_Fs, /* i : output sampling rate */ #endif const int16_t output_frame, /* i : output frame length */ float output[][L_FRAME48k] /* i/o: SCE channels / Binaural synthesis */ @@ -811,7 +814,7 @@ ivas_error ivas_td_binaural_renderer_ext( ism_md_subframe_update_ext, p_output, output_frame #ifdef API_5MS , - ( output_frame == L_FRAME48k ) ? 4 : 1 + ( output_frame * FRAMES_PER_SEC ) / output_Fs #endif ) ) != IVAS_ERR_OK ) { diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 6c0cf15f45..b714563ae7 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -582,17 +582,20 @@ ivas_error ivas_td_binaural_renderer_unwrap( ); ivas_error ivas_td_binaural_renderer_ext( - const TDREND_WRAPPER *pTDRend, /* i : TD Renderer wrapper structure */ - const IVAS_REND_AudioConfig inConfig, /* i : Input audio configuration */ - const LSSETUP_CUSTOM_STRUCT *customLsInput, /* i : Input custom loudspeaker layout */ - const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData, /* i : Combined head and external orientations */ - const IVAS_REND_AudioObjectPosition *currentPos, /* i : Object position */ - const REVERB_HANDLE hReverb, /* i : Reverberator handle */ + const TDREND_WRAPPER *pTDRend, /* i : TD Renderer wrapper structure */ + const IVAS_REND_AudioConfig inConfig, /* i : Input audio configuration */ + const LSSETUP_CUSTOM_STRUCT *customLsInput, /* i : Input custom loudspeaker layout */ + const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData, /* i : Combined head and external orientations */ + const IVAS_REND_AudioObjectPosition *currentPos, /* i : Object position */ + const REVERB_HANDLE hReverb, /* i : Reverberator handle */ #ifdef FIX_488_SYNC_DELAY - const int16_t ism_md_subframe_update_ext, /* i: Metadata Delay in subframes to sync with audio delay */ + const int16_t ism_md_subframe_update_ext, /* i : Metadata Delay in subframes to sync with audio delay */ +#endif +#ifdef API_5MS + const int32_t output_Fs, /* i : output sampling rate */ #endif - const int16_t output_frame, /* i : output frame length */ - float output[][L_FRAME48k] /* i/o: SCE channels / Binaural synthesis */ + const int16_t output_frame, /* i : output frame length */ + float output[][L_FRAME48k] /* i/o: SCE channels / Binaural synthesis */ ); ivas_error ivas_td_binaural_open_unwrap( diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 58d10e0fd2..7cd3d7a356 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -6181,6 +6181,9 @@ static ivas_error renderIsmToBinaural( ismInput->hReverb, #ifdef FIX_488_SYNC_DELAY ism_md_subframe_update_ext, +#endif +#ifdef API_5MS + *ismInput->base.ctx.pOutSampleRate, #endif outAudio.config.numSamplesPerChannel, tmpTDRendBuffer ) ) != IVAS_ERR_OK ) @@ -6407,6 +6410,9 @@ static ivas_error renderIsmToBinauralReverb( ismInput->hReverb, #ifdef FIX_488_SYNC_DELAY ism_md_subframe_update_ext, +#endif +#ifdef API_5MS + *ismInput->base.ctx.pOutSampleRate, #endif outAudio.config.numSamplesPerChannel, tmpRendBuffer ) ) != IVAS_ERR_OK ) @@ -6653,6 +6659,9 @@ static ivas_error renderIsmToSplitBinaural( NULL, #ifdef FIX_488_SYNC_DELAY ism_md_subframe_update_ext, +#endif +#ifdef API_5MS + *ismInput->base.ctx.pOutSampleRate, #endif output_frame, tmpProcessing ); @@ -6983,6 +6992,9 @@ static ivas_error renderMcToBinaural( mcInput->hReverb, #ifdef FIX_488_SYNC_DELAY 0, +#endif +#ifdef API_5MS + *mcInput->base.ctx.pOutSampleRate, #endif mcInput->base.inputBuffer.config.numSamplesPerChannel, tmpRendBuffer ) ) != IVAS_ERR_OK ) { @@ -7115,6 +7127,9 @@ static ivas_error renderMcToBinauralRoom( NULL, mcInput->hReverb, #ifdef FIX_488_SYNC_DELAY 0, +#endif +#ifdef API_5MS + *mcInput->base.ctx.pOutSampleRate, #endif mcInput->base.inputBuffer.config.numSamplesPerChannel, tmpRendBuffer ) ) != IVAS_ERR_OK ) { @@ -7503,6 +7518,9 @@ static ivas_error renderMcToSplitBinaural( mcInput->hReverb, #ifdef FIX_488_SYNC_DELAY 0, /* Ism Audio Metadata Delay Sync in ms for External Renderer */ +#endif +#ifdef API_5MS + *mcInput->base.ctx.pOutSampleRate, #endif mcInput->base.inputBuffer.config.numSamplesPerChannel, tmpRendBuffer ) ) != IVAS_ERR_OK ) @@ -8219,7 +8237,7 @@ static ivas_error renderSbaToMultiBinaural( p_tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate, #ifdef API_5MS - 4, + ( sbaInput->base.inputBuffer.config.numSamplesPerChannel * FRAMES_PER_SEC ) / *sbaInput->base.ctx.pOutSampleRate, #endif pos_idx ) ) != IVAS_ERR_OK ) { @@ -9522,7 +9540,7 @@ ivas_error IVAS_REND_GetSamples( copyBufferTo2dArray( outAudio, tmpBinaural ); } - /* Encode split rendering bitstream */ +/* Encode split rendering bitstream */ convertBitsBufferToInternalBitsBuff( *hBits, &bits ); error = ivas_renderMultiBinToSplitBinaural( &hIvasRend->splitRendWrapper, #ifdef API_5MS -- GitLab From 4acd62d6821e8162113129cc92b5d9dd4e3c717d Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 10 Aug 2023 12:00:53 +0200 Subject: [PATCH 132/175] [fix] maths --- lib_rend/ivas_objectRenderer.c | 4 ++-- lib_rend/lib_rend.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index bbb59e52a9..b022973155 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -814,9 +814,9 @@ ivas_error ivas_td_binaural_renderer_ext( ism_md_subframe_update_ext, p_output, output_frame #ifdef API_5MS , - ( output_frame * FRAMES_PER_SEC ) / output_Fs + output_Fs / ( output_frame * FRAMES_PER_SEC ) #endif - ) ) != IVAS_ERR_OK ) + ) ) != IVAS_ERR_OK ) { return error; } diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 7cd3d7a356..90f0a3abaf 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -8237,7 +8237,7 @@ static ivas_error renderSbaToMultiBinaural( p_tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate, #ifdef API_5MS - ( sbaInput->base.inputBuffer.config.numSamplesPerChannel * FRAMES_PER_SEC ) / *sbaInput->base.ctx.pOutSampleRate, + num_subframes_in_buffer( &sbaInput->base.inputBuffer, *sbaInput->base.ctx.pOutSampleRate ), #endif pos_idx ) ) != IVAS_ERR_OK ) { @@ -9540,7 +9540,7 @@ ivas_error IVAS_REND_GetSamples( copyBufferTo2dArray( outAudio, tmpBinaural ); } -/* Encode split rendering bitstream */ + /* Encode split rendering bitstream */ convertBitsBufferToInternalBitsBuff( *hBits, &bits ); error = ivas_renderMultiBinToSplitBinaural( &hIvasRend->splitRendWrapper, #ifdef API_5MS -- GitLab From fe14f06ecbc9edbf7397a96facd6ee1b0edb4396 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Thu, 10 Aug 2023 11:57:03 +0200 Subject: [PATCH 133/175] [tmp] Remove delay compensation fix --- apps/renderer.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index e8f5e10ec3..37346a0491 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -2019,11 +2019,7 @@ int main( if ( audioWriter != NULL ) { #endif -#ifdef API_5MS - if ( ( delayNumSamples * num_out_channels ) < outBufferSize ) /* TODO tmu2sgi : needs verification */ -#else if ( delayNumSamples < outBufferSize ) -#endif { if ( AudioFileWriter_write( audioWriter, &outInt16Buffer[delayNumSamples * num_out_channels], outBufferSize - ( delayNumSamples * num_out_channels ) ) != IVAS_ERR_OK ) { -- GitLab From 6902ab99727d6ba27c6bc1699bce4e9b956a16bf Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Thu, 10 Aug 2023 12:50:25 +0200 Subject: [PATCH 134/175] Add correct delay compensation fix --- apps/renderer.c | 10 +++++++++- lib_com/options.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/renderer.c b/apps/renderer.c index 37346a0491..33bafca771 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -2019,7 +2019,11 @@ int main( if ( audioWriter != NULL ) { #endif - if ( delayNumSamples < outBufferSize ) +#ifdef FIX_REND_DELAY_COMP + if ( delayNumSamples < frameSize_smpls ) +#else + if ( delayNumSamples < outBufferSize ) +#endif { if ( AudioFileWriter_write( audioWriter, &outInt16Buffer[delayNumSamples * num_out_channels], outBufferSize - ( delayNumSamples * num_out_channels ) ) != IVAS_ERR_OK ) { @@ -2030,7 +2034,11 @@ int main( } else { +#ifdef FIX_REND_DELAY_COMP + delayNumSamples -= (int16_t) frameSize_smpls; +#else delayNumSamples -= (int16_t) outBufferSize; +#endif } #ifdef SPLIT_REND_WITH_HEAD_ROT } diff --git a/lib_com/options.h b/lib_com/options.h index cac0c34b27..e5828440c7 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -172,6 +172,7 @@ #ifdef API_5MS #define API_5MS_BASELINE /* FhG: baseline with 20ms rendering and split rendering through 20ms branch */ #endif +#define FIX_REND_DELAY_COMP /* FhG: fix delay compensation in renderer.c - Doesn't affect BE as the broken code was never executed on main */ #define LIB_REND_FIX_HRTFPARAMBIN_MEMLEAK #define FIX_CQMFPREDDEC_FREE /* FhG: avoid double free / free of NULL in DeletePredictionDecoder() */ // 5 ms branch switches end -- GitLab From b0d4f8093842f667d4ae56467ac07da46b3b8bc8 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 10 Aug 2023 13:04:55 +0200 Subject: [PATCH 135/175] [fix] compute number of subframes to be rendered correctly for TDrend and fix the buffer size check for renderInputMasa/Sba() --- lib_rend/ivas_objectRenderer.c | 4 ++-- lib_rend/lib_rend.c | 24 ++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index b022973155..f87572111d 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -814,9 +814,9 @@ ivas_error ivas_td_binaural_renderer_ext( ism_md_subframe_update_ext, p_output, output_frame #ifdef API_5MS , - output_Fs / ( output_frame * FRAMES_PER_SEC ) + ( output_frame * FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) / output_Fs #endif - ) ) != IVAS_ERR_OK ) + ) ) != IVAS_ERR_OK ) { return error; } diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 90f0a3abaf..6beb31fecc 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -8633,13 +8633,23 @@ static ivas_error renderInputSba( { ivas_error error; IVAS_REND_AudioBuffer inAudio; +#if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) + int16_t cldfb2tdSampleFact; +#endif error = IVAS_ERR_OK; inAudio = sbaInput->base.inputBuffer; #ifdef SPLIT_REND_WITH_HEAD_ROT - if ( ( sbaInput->base.numNewSamplesPerChannel != outAudio.config.numSamplesPerChannel ) && +#ifdef API_5MS + cldfb2tdSampleFact = outAudio.config.is_cldfb ? 2 : 1; +#endif + if ( ( sbaInput->base.numNewSamplesPerChannel +#ifdef API_5MS + * cldfb2tdSampleFact +#endif + != outAudio.config.numSamplesPerChannel ) && ( outConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) && ( outConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) #else if ( sbaInput->base.numNewSamplesPerChannel != outAudio.config.numSamplesPerChannel ) @@ -9027,6 +9037,9 @@ static ivas_error renderInputMasa( IVAS_REND_AudioBuffer outAudio ) { IVAS_REND_AudioBuffer inAudio; +#if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) + int16_t cldfb2tdSampleFact; +#endif if ( !masaInput->metadataHasBeenFed ) { @@ -9035,7 +9048,14 @@ static ivas_error renderInputMasa( inAudio = masaInput->base.inputBuffer; #ifdef SPLIT_REND_WITH_HEAD_ROT - if ( ( masaInput->base.numNewSamplesPerChannel != outAudio.config.numSamplesPerChannel ) && +#ifdef API_5MS + cldfb2tdSampleFact = outAudio.config.is_cldfb ? 2 : 1; +#endif + if ( ( masaInput->base.numNewSamplesPerChannel +#ifdef API_5MS + * cldfb2tdSampleFact +#endif + != outAudio.config.numSamplesPerChannel ) && ( outConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) && ( outConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) #else if ( masaInput->base.numNewSamplesPerChannel != outAudio.config.numSamplesPerChannel ) -- GitLab From 4c63e8d1ae9bf90602b44a3d9dfe4317f08cd60b Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Thu, 10 Aug 2023 13:22:12 +0200 Subject: [PATCH 136/175] Resolve TODO: remove switches from options.h that have already been accepted --- lib_com/options.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index e5828440c7..bda303ec56 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -160,9 +160,6 @@ #define FIX_137_SID_MD_BITS /* Dlb: Fix issue #137 , SID bitrate mismatch correction */ #define FIX_470_MASA_JBM_EXT /* Nokia: Issue 470, fix MASA EXT output with JBM */ #define FIX_564 /* Nokia: Issue 564: Fix gains in JBM path for SBA with parametric binaural renderer */ -// 5 ms branch switches start -// TODO: Check all switches in this section, remove if they were accepted -#define FIX_566_2DIR_MASA_384K /* Nokia: Issued 566: Bugfix in 384k MASA metadata encoding of second direction */ #define FIX_551_HEADTRACKER_INIT /* FhG: move setting of orientation tracking type to earlier */ #define FIX_678_ISM_SBA_ASAN /* FhG: fix asan in the access of the interpolator*/ #define FIX_676_JBM_USAN /* FhG: fix usan in acessing transport channel buffers */ @@ -175,7 +172,6 @@ #define FIX_REND_DELAY_COMP /* FhG: fix delay compensation in renderer.c - Doesn't affect BE as the broken code was never executed on main */ #define LIB_REND_FIX_HRTFPARAMBIN_MEMLEAK #define FIX_CQMFPREDDEC_FREE /* FhG: avoid double free / free of NULL in DeletePredictionDecoder() */ -// 5 ms branch switches end #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_571_REVERB_NOT_ACTIVATED_ISM /* Philips: Issue 571: Reverb not activated for discrete and parametric ISM */ #define FIX_QMETA_SID_5k2 /* Nokia: Issue 137: enable using full 5.2k bitrate in MASA SID */ -- GitLab From 1f5d0cf3906ea789422f7fd916b7b0b944339686 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Thu, 10 Aug 2023 13:31:08 +0200 Subject: [PATCH 137/175] [ci-skip] Remove obsolete TODO comments --- apps/renderer.c | 3 +-- lib_dec/lib_dec.h | 2 +- lib_rend/ivas_rotation.c | 12 ++++++++++-- lib_rend/ivas_stat_rend.h | 2 +- lib_rend/lib_rend.c | 8 +++----- 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index 33bafca771..b0acabe1e9 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1570,7 +1570,7 @@ int main( if ( numSamplesRead == 0 #ifdef API_5MS - && splitBinNeedsNewFrame /* TODO(sgi): clean up */ + && splitBinNeedsNewFrame #endif ) { @@ -2047,7 +2047,6 @@ int main( #endif - /* TODO(sgi): Masa output most likely broken with 5ms framing */ /* Write MASA metadata for MASA outputs */ if ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_MASA1 || args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_MASA2 ) { diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 38950fec3c..a2d0e8e5de 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -219,7 +219,7 @@ ivas_error IVAS_DEC_GetSamples( ivas_error IVAS_DEC_GetSplitBinauralBitstream( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode*/ - int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ /* TODO(sgi): might not be necessary - revisit */ + int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ bool *needNewFrame /* indication that the decoder needs a new frame */ ); #endif diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 959cb943d2..9b2124ce57 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -1054,7 +1054,11 @@ ivas_error combine_external_and_head_orientations_dec( #ifdef SPLIT_REND_WITH_HEAD_ROT IVAS_SPLIT_REND_ROT_AXIS sr_pose_pred_axis; #endif - IVAS_QUATERNION *headRotQuaternions = NULL; /* TODO(sgi): Rename to "headRotQuaternion" - it's a single value now */ +#ifdef API_5MS + IVAS_QUATERNION *pHeadRotQuaternion = NULL; +#else + IVAS_QUATERNION *headRotQuaternions = NULL; +#endif IVAS_VECTOR3 *listenerPos = NULL; #ifndef API_5MS int16_t numHeadRotQuaternions = 0; @@ -1063,7 +1067,7 @@ ivas_error combine_external_and_head_orientations_dec( if ( hHeadTrackData != NULL ) { #ifdef API_5MS - headRotQuaternions = &hHeadTrackData->Quaternion; + pHeadRotQuaternion = &hHeadTrackData->Quaternion; listenerPos = &hHeadTrackData->Pos; #else numHeadRotQuaternions = hHeadTrackData->num_quaternions; @@ -1085,7 +1089,11 @@ ivas_error combine_external_and_head_orientations_dec( #endif return combine_external_and_head_orientations( +#ifdef API_5MS + pHeadRotQuaternion, +#else headRotQuaternions, +#endif listenerPos, #ifdef SPLIT_REND_WITH_HEAD_ROT sr_pose_pred_axis, diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index 298ff03453..8e93fcb45f 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -689,7 +689,7 @@ typedef struct #ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG HANDLE_CLDFB_FILTER_BANK cldfbAna[( 1 + MAX_HEAD_ROT_POSES ) * BINAURAL_CHANNELS]; #else - /* TODO(sgi): rename to "cldfb" during harmonization - these handles are sometimes also used for synthesis */ + /* rename to "cldfb" during harmonization - these handles are sometimes also used for synthesis */ HANDLE_CLDFB_FILTER_BANK cldfbAna[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS]; #endif } CLDFB_HANDLES_WRAPPER, *CLDFB_HANDLES_WRAPPER_HANDLE; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 6beb31fecc..f2113a315a 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -1201,14 +1201,14 @@ static ivas_error initHeadRotation( #ifdef API_5MS /* Initialize 5ms crossfade */ - crossfade_len = L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES; /* TODO(sgi): @tmu why do we assume 48 kHz here? */ + crossfade_len = L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES; tmp = 1.f / ( crossfade_len - 1 ); for ( i = 0; i < crossfade_len; i++ ) { hIvasRend->headRotData.crossfade_5ms[i] = i * tmp; } /* Initialize 20ms crossfade */ - crossfade_len = L_FRAME48k; /* TODO(sgi): @tmu why do we assume 48 kHz here? */ + crossfade_len = L_FRAME48k; tmp = 1.f / ( crossfade_len - 1 ); for ( i = 0; i < crossfade_len; i++ ) { @@ -5555,7 +5555,7 @@ ivas_error IVAS_REND_SetExternalOrientation( int8_t enableHeadRotation, /* i : flag to enable head rotation for this frame */ int8_t enableExternalOrientation, /* i : flag to enable external orientation for this frame */ int8_t enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ - int16_t numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ /* TODO(sgi): make independent of framing */ + int16_t numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ #else int8_t *enableHeadRotation, /* i : flag to enable head rotation for this frame */ int8_t *enableExternalOrientation, /* i : flag to enable external orientation for this frame */ @@ -5868,7 +5868,6 @@ static ivas_error rotateFrameMc( } #ifndef API_5MS - /* TODO(sgi): @tmu please review changes in this function */ /* subframe loop */ subframe_len = inAudio.config.numSamplesPerChannel / RENDERER_HEAD_POSITIONS_PER_FRAME; for ( subframe_idx = 0; subframe_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; subframe_idx++ ) @@ -6017,7 +6016,6 @@ static ivas_error rotateFrameSba( } #ifndef API_5MS - /* TODO(sgi): @tmu please review changes in this function */ /* subframe loop */ subframe_len = inAudio.config.numSamplesPerChannel / RENDERER_HEAD_POSITIONS_PER_FRAME; for ( subframe_idx = 0; subframe_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; subframe_idx++ ) -- GitLab From e2f0ef93ce075e6de394ee360fed66df8391b3d7 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 10 Aug 2023 14:12:18 +0200 Subject: [PATCH 138/175] [fix] split rendering pytest and MSVC warning --- lib_rend/ivas_objectRenderer.c | 4 ++-- tests/renderer/utils.py | 18 ++++++------------ .../test_split_rendering_be_comparison.py | 1 - 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index f87572111d..4d26977290 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -814,9 +814,9 @@ ivas_error ivas_td_binaural_renderer_ext( ism_md_subframe_update_ext, p_output, output_frame #ifdef API_5MS , - ( output_frame * FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) / output_Fs + (int16_t) ( ( output_frame * FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) / output_Fs ) #endif - ) ) != IVAS_ERR_OK ) + ) ) != IVAS_ERR_OK ) { return error; } diff --git a/tests/renderer/utils.py b/tests/renderer/utils.py index a00cb6e37a..8fdc7ead3a 100644 --- a/tests/renderer/utils.py +++ b/tests/renderer/utils.py @@ -82,22 +82,16 @@ def check_BE( if np.isnan(snr) or gain_b == 0: pytest.fail("Invalid comparison result, check your signals!") - snr_min = np.inf - - # TODO temporary fix to pad TD Object Renderer Standalone output - if ref.shape != cut.shape: + if ref.shape[0] < cut.shape[0]: ref = np.pad(ref, [(0, cut.shape[0] - ref.shape[0]), (0, 0)]) + elif ref.shape[0] > cut.shape[0]: + cut = np.pad(cut, [(0, ref.shape[0] - cut.shape[0]), (0, 0)]) # check max_diff as well, since compare_audio_arrays will try to adjust for small delay differences if not np.allclose(ref, cut, rtol=0, atol=2) and max_diff > 2: - if snr >= snr_min: - pytest.xfail( - f"Expected failure with minimum SNR {snr_min} vs {snr:3.2f}dB, Gain CuT: {gain_b:1.3f}, Max Diff = {int(max_diff)}" - ) - else: - pytest.fail( - f"CuT not BE to REF! SNR : {snr:3.2f} dB, Gain CuT: {gain_b:1.3f}, Max Diff = {int(max_diff)}" - ) + pytest.fail( + f"CuT not BE to REF! SNR : {snr:3.2f} dB, Gain CuT: {gain_b:1.3f}, Max Diff = {int(max_diff)}" + ) def run_renderer( diff --git a/tests/split_rendering/test_split_rendering_be_comparison.py b/tests/split_rendering/test_split_rendering_be_comparison.py index 189c4539e7..9587268f64 100644 --- a/tests/split_rendering/test_split_rendering_be_comparison.py +++ b/tests/split_rendering/test_split_rendering_be_comparison.py @@ -200,7 +200,6 @@ def test_masa_external_split(test_info, in_fmt, render_config, trajectory): render_config=RENDER_CFG_DIR.joinpath(f"{render_config}.txt"), pre_trajectory=pre_trajectory, post_trajectory=post_trajectory, - output_path_base=OUTPUT_PATH_CUT, ) -- GitLab From 05921c0624edc0aa9bf8936f3d4ba24860766b24 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 10 Aug 2023 18:06:37 +0200 Subject: [PATCH 139/175] - wrong buffer for CLDFB synthesis in 0DoF LCLD - cldfbBufferSize not accounted for in getNumSubframesInBuffer() - incorrect setting of -fr5 in pytest --- apps/renderer.c | 4 +-- lib_com/options.h | 2 +- lib_dec/ivas_binRenderer_internal.c | 4 +-- lib_dec/ivas_dec.c | 2 ++ lib_dec/ivas_jbm_dec.c | 4 +++ lib_rend/lib_rend.c | 50 ++++++++++++++++++----------- tests/split_rendering/utils.py | 11 ++++++- 7 files changed, 53 insertions(+), 24 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index b0acabe1e9..12e40987e6 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -2022,7 +2022,7 @@ int main( #ifdef FIX_REND_DELAY_COMP if ( delayNumSamples < frameSize_smpls ) #else - if ( delayNumSamples < outBufferSize ) + if ( delayNumSamples < outBufferSize ) #endif { if ( AudioFileWriter_write( audioWriter, &outInt16Buffer[delayNumSamples * num_out_channels], outBufferSize - ( delayNumSamples * num_out_channels ) ) != IVAS_ERR_OK ) @@ -2037,7 +2037,7 @@ int main( #ifdef FIX_REND_DELAY_COMP delayNumSamples -= (int16_t) frameSize_smpls; #else - delayNumSamples -= (int16_t) outBufferSize; + delayNumSamples -= (int16_t) outBufferSize; #endif } #ifdef SPLIT_REND_WITH_HEAD_ROT diff --git a/lib_com/options.h b/lib_com/options.h index bda303ec56..c73fa8cd83 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -128,7 +128,7 @@ /*#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 */ -/*#define DISABLE_LIMITER*/ +/*#define DISABLE_LIMITER*/ /* disable the limiter to aid BE debugging */ #define DEBUG_IND_LIST_MEMORY /* raise assert() when ind_list[] runs out of memory */ /*Split Rendering Debug switches*/ diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index a5fcfedee2..1fc7d95b4f 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -2256,7 +2256,7 @@ void ivas_rend_CldfbMultiBinRendProcess( for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) { #endif - for ( slot_idx = 0; slot_idx < MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ ) /* TODO(splitrend): this looks strange */ + for ( slot_idx = 0; slot_idx < MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ ) { #ifdef API_5MS idx = slot_idx; @@ -2311,7 +2311,7 @@ void ivas_rend_CldfbMultiBinRendProcess( for ( pose_idx = 0; pose_idx < hCldfbRend->numPoses; pose_idx++ ) { - for ( slot_idx = 0; slot_idx < MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ ) /* TODO(splitrend): this looks strange */ + for ( slot_idx = 0; slot_idx < MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ ) { #ifdef API_5MS idx = slot_idx; diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index cce6e68713..05842c3d30 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -1078,6 +1078,7 @@ ivas_error ivas_dec( if ( st_ivas->hDecoderConfig->Opt_Limiter ) #endif { +#ifndef DISABLE_LIMITER ivas_limiter_dec( st_ivas->hLimiter, p_output, #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT nchan_out_syn_output, @@ -1085,6 +1086,7 @@ ivas_error ivas_dec( nchan_out, #endif output_frame, st_ivas->BER_detect ); +#endif } #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 8aa00f6d4f..0aedde87e4 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1141,7 +1141,9 @@ ivas_error ivas_jbm_dec_render( #endif { +#ifndef DISABLE_LIMITER ivas_limiter_dec( st_ivas->hLimiter, p_output, nchan_out, *nSamplesRendered, st_ivas->BER_detect ); +#endif } #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT @@ -1320,7 +1322,9 @@ ivas_error ivas_jbm_dec_flush_renderer( if ( st_ivas->hDecoderConfig->Opt_Limiter ) #endif { +#ifndef DISABLE_LIMITER ivas_limiter_dec( st_ivas->hLimiter, p_output, st_ivas->hDecoderConfig->nchan_out, *nSamplesRendered, st_ivas->BER_detect ); +#endif } #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index f2113a315a..7680193712 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -5552,9 +5552,9 @@ ivas_error IVAS_REND_SetExternalOrientation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ IVAS_QUATERNION *orientation, /* i : external orientation data */ #ifdef API_5MS - int8_t enableHeadRotation, /* i : flag to enable head rotation for this frame */ - int8_t enableExternalOrientation, /* i : flag to enable external orientation for this frame */ - int8_t enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ + int8_t enableHeadRotation, /* i : flag to enable head rotation for this frame */ + int8_t enableExternalOrientation, /* i : flag to enable external orientation for this frame */ + int8_t enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ int16_t numFramesToTargetOrientation /* i : number of frames until target orientation is reached */ #else int8_t *enableHeadRotation, /* i : flag to enable head rotation for this frame */ @@ -6197,12 +6197,17 @@ static ivas_error renderIsmToBinaural( } #ifdef API_5MS -static int16_t num_subframes_in_buffer( const IVAS_REND_AudioBuffer *buffer, int32_t sampleRate ) +static int16_t getNumSubframesInBuffer( const IVAS_REND_AudioBuffer *buffer, int32_t sampleRate ) { + int16_t cldfb2tdSampleFact; + + cldfb2tdSampleFact = buffer->config.is_cldfb ? 2 : 1; + #ifdef DEBUGGING - assert( buffer->config.numSamplesPerChannel % ( sampleRate / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ) == 0 ); + assert( buffer->config.numSamplesPerChannel % ( sampleRate / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES * cldfb2tdSampleFact ) == 0 ); #endif - return (int16_t) ( buffer->config.numSamplesPerChannel / ( sampleRate / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ) ); + + return (int16_t) ( buffer->config.numSamplesPerChannel / ( sampleRate / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES * cldfb2tdSampleFact ) ); } #endif @@ -6362,7 +6367,7 @@ static ivas_error renderIsmToBinauralRoom( NULL, NULL, NULL, NULL, p_tmpRendBuffer, *ismInput->base.ctx.pOutSampleRate #ifdef API_5MS , - num_subframes_in_buffer( &outAudio, *ismInput->base.ctx.pOutSampleRate ) + getNumSubframesInBuffer( &outAudio, *ismInput->base.ctx.pOutSampleRate ) #endif #ifdef SPLIT_REND_WITH_HEAD_ROT , @@ -7039,7 +7044,7 @@ static ivas_error renderMcToBinaural( NULL, NULL, NULL, NULL, p_tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate #ifdef API_5MS , - num_subframes_in_buffer( &outAudio, *mcInput->base.ctx.pOutSampleRate ) + getNumSubframesInBuffer( &outAudio, *mcInput->base.ctx.pOutSampleRate ) #endif #ifdef SPLIT_REND_WITH_HEAD_ROT , @@ -7174,7 +7179,7 @@ static ivas_error renderMcToBinauralRoom( NULL, NULL, NULL, NULL, p_tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate #ifdef API_5MS , - num_subframes_in_buffer( &outAudio, *mcInput->base.ctx.pOutSampleRate ) + getNumSubframesInBuffer( &outAudio, *mcInput->base.ctx.pOutSampleRate ) #endif #ifdef SPLIT_REND_WITH_HEAD_ROT , @@ -7302,7 +7307,7 @@ static ivas_error renderMcCustomLsToBinauralRoom( p_tmpCrendBuffer, *mcInput->base.ctx.pOutSampleRate #ifdef API_5MS , - num_subframes_in_buffer( &outAudio, *mcInput->base.ctx.pOutSampleRate ) + getNumSubframesInBuffer( &outAudio, *mcInput->base.ctx.pOutSampleRate ) #endif #ifdef SPLIT_REND_WITH_HEAD_ROT , @@ -7580,7 +7585,7 @@ static ivas_error renderMcToSplitBinaural( p_tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate, #ifdef API_5MS - num_subframes_in_buffer( &mcInput->base.inputBuffer, *mcInput->base.ctx.pOutSampleRate ), + getNumSubframesInBuffer( &mcInput->base.inputBuffer, *mcInput->base.ctx.pOutSampleRate ), #endif pos_idx ) ) != IVAS_ERR_OK ) { @@ -8065,8 +8070,13 @@ static ivas_error renderSplitBinauralWithPostRot( for ( slot_idx = 0; slot_idx < CLDFB_NO_COL_MAX; slot_idx++ ) #endif { +#ifdef API_5MS + RealBuffer[slot_idx] = Cldfb_RealBuffer_Binaural_5ms[ch_idx][slot_idx]; + ImagBuffer[slot_idx] = Cldfb_ImagBuffer_Binaural_5ms[ch_idx][slot_idx]; +#else RealBuffer[slot_idx] = Cldfb_RealBuffer_Binaural[ch_idx][slot_idx]; ImagBuffer[slot_idx] = Cldfb_ImagBuffer_Binaural[ch_idx][slot_idx]; +#endif } cldfbSynthesis( RealBuffer, @@ -8235,7 +8245,7 @@ static ivas_error renderSbaToMultiBinaural( p_tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate, #ifdef API_5MS - num_subframes_in_buffer( &sbaInput->base.inputBuffer, *sbaInput->base.ctx.pOutSampleRate ), + getNumSubframesInBuffer( &sbaInput->base.inputBuffer, *sbaInput->base.ctx.pOutSampleRate ), #endif pos_idx ) ) != IVAS_ERR_OK ) { @@ -8421,7 +8431,7 @@ static ivas_error renderSbaToBinaural( NULL, NULL, NULL, NULL, p_tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate #ifdef API_5MS , - num_subframes_in_buffer( &outAudio, *sbaInput->base.ctx.pOutSampleRate ) + getNumSubframesInBuffer( &outAudio, *sbaInput->base.ctx.pOutSampleRate ) #endif #ifdef SPLIT_REND_WITH_HEAD_ROT , @@ -8537,7 +8547,7 @@ static ivas_error renderSbaToBinauralRoom( NULL, NULL, NULL, NULL, p_tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate #ifdef API_5MS , - num_subframes_in_buffer( &outAudio, *sbaInput->base.ctx.pOutSampleRate ) + getNumSubframesInBuffer( &outAudio, *sbaInput->base.ctx.pOutSampleRate ) #endif #ifdef SPLIT_REND_WITH_HEAD_ROT , @@ -8824,7 +8834,7 @@ static void renderMasaToMc( ivas_dirac_dec_binaural( masaInput->decDummy, *masaInput->base.ctx.pCombinedOrientationData, tmpBuffer, masaInput->base.inputBuffer.config.numChannels #ifdef API_5MS , - num_subframes_in_buffer( &outAudio, *masaInput->base.ctx.pOutSampleRate ) + getNumSubframesInBuffer( &outAudio, *masaInput->base.ctx.pOutSampleRate ) #endif ); } @@ -8833,7 +8843,7 @@ static void renderMasaToMc( ivas_dirac_dec( masaInput->decDummy, tmpBuffer, masaInput->base.inputBuffer.config.numChannels #ifdef API_5MS , - num_subframes_in_buffer( &outAudio, *masaInput->base.ctx.pOutSampleRate ) + getNumSubframesInBuffer( &outAudio, *masaInput->base.ctx.pOutSampleRate ) #endif ); } @@ -8855,7 +8865,7 @@ static void renderMasaToSba( ivas_dirac_dec( masaInput->decDummy, tmpBuffer, masaInput->base.inputBuffer.config.numChannels #ifdef API_5MS , - num_subframes_in_buffer( &outAudio, *masaInput->base.ctx.pOutSampleRate ) + getNumSubframesInBuffer( &outAudio, *masaInput->base.ctx.pOutSampleRate ) #endif ); @@ -8881,7 +8891,7 @@ static void renderMasaToBinaural( ivas_dirac_dec_binaural( masaInput->decDummy, *masaInput->base.ctx.pCombinedOrientationData, tmpBuffer, masaInput->base.inputBuffer.config.numChannels #ifdef API_5MS , - num_subframes_in_buffer( &outAudio, *masaInput->base.ctx.pOutSampleRate ) + getNumSubframesInBuffer( &outAudio, *masaInput->base.ctx.pOutSampleRate ) #endif ); #ifdef SPLIT_REND_WITH_HEAD_ROT @@ -9525,17 +9535,21 @@ ivas_error IVAS_REND_GetSamples( if ( outAudio.config.is_cldfb == 0 ) { +#ifndef DISABLE_LIMITER #ifdef DEBUGGING hIvasRend->numClipping += #endif limitRendererOutput( hIvasRend->hLimiter, outAudio.data, outAudio.config.numSamplesPerChannel, IVAS_LIMITER_THRESHOLD ); +#endif } #else /* SPLIT_REND_WITH_HEAD_ROT */ +#ifndef DISABLE_LIMITER #ifdef DEBUGGING hIvasRend->numClipping += #endif limitRendererOutput( hIvasRend->hLimiter, outAudio.data, outAudio.config.numSamplesPerChannel, IVAS_LIMITER_THRESHOLD ); +#endif #endif /* SPLIT_REND_WITH_HEAD_ROT */ #ifdef SPLIT_REND_WITH_HEAD_ROT diff --git a/tests/split_rendering/utils.py b/tests/split_rendering/utils.py index f27295f9c3..65ec592dc2 100644 --- a/tests/split_rendering/utils.py +++ b/tests/split_rendering/utils.py @@ -178,8 +178,17 @@ def run_external_split_rendering( if in_meta_files: cmd[9:9] = ["-im", *in_meta_files] + # pre renderer for 0DoF needs -fr5 except where LCLD is used if "0dof" in render_config.name: - cmd.append("-fr5") + if not ( + "fastconv" in render_config.name + or "lcld" in render_config.name + or ( + in_fmt.upper().startswith("MASA") + and "lc3plus" not in render_config.name + ) + ): + cmd.append("-fr5") run_cmd(cmd) -- GitLab From 2f686ef60b60f5fd23687b52fb3d40645feae06d Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 10 Aug 2023 18:42:51 +0200 Subject: [PATCH 140/175] [revertme] tmp disable limiter for BE comparison --- lib_com/options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index b1fcdbd1ee..6d80081f88 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -128,7 +128,7 @@ /*#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 */ -/*#define DISABLE_LIMITER*/ /* disable the limiter to aid BE debugging */ +#define DISABLE_LIMITER /* disable the limiter to aid BE debugging */ #define DEBUG_IND_LIST_MEMORY /* raise assert() when ind_list[] runs out of memory */ /*Split Rendering Debug switches*/ -- GitLab From 6f20b41a060a763025e2af6d6f393aa19f1d2f53 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 10 Aug 2023 18:56:42 +0200 Subject: [PATCH 141/175] [fix] merge conflict for paramupmix --- lib_dec/ivas_mc_paramupmix_dec.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_mc_paramupmix_dec.c b/lib_dec/ivas_mc_paramupmix_dec.c index 7c5f13aaee..66eee7233e 100644 --- a/lib_dec/ivas_mc_paramupmix_dec.c +++ b/lib_dec/ivas_mc_paramupmix_dec.c @@ -373,7 +373,10 @@ void ivas_mc_paramupmix_dec( &st_ivas->splitBinRend.splitrend.multiBinPoseData, #endif st_ivas->hCombinedOrientationData, - subframeIdx, JBM_CLDFB_SLOTS_IN_SUBFRAME, +#ifndef API_5MS + subframeIdx, /* TODO (5ms) : tmu2Dlb please verify */ +#endif + JBM_CLDFB_SLOTS_IN_SUBFRAME, #ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG NULL, #endif @@ -1175,7 +1178,10 @@ static void ivas_mc_paramupmix_dec_sf( &st_ivas->splitBinRend.splitrend.multiBinPoseData, #endif st_ivas->hCombinedOrientationData, - subframeIdx, st_ivas->hTcBuffer->subframe_nbslots[subframeIdx], +#ifndef API_5MS + subframeIdx, /* TODO (5ms) : tmu2Dlb please verify */ +#endif + st_ivas->hTcBuffer->subframe_nbslots[subframeIdx], Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer_subfr, Cldfb_ImagBuffer_subfr ); -- GitLab From ea838dcb518af2a8e3d2db7d0837d554e6d0730b Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Fri, 11 Aug 2023 08:06:39 +0200 Subject: [PATCH 142/175] address some comments in the MR, add debug switch DEBUG_SIMULATE_EXTORIENTATION_MAIN_FOR_BE for BE testing within the branch --- apps/decoder.c | 5 +++++ apps/renderer.c | 2 ++ lib_com/options.h | 1 + lib_dec/ivas_output_config.c | 11 ----------- lib_rend/ivas_rotation.c | 9 ++++----- 5 files changed, 12 insertions(+), 16 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 7f4d0d9be5..068d62b16a 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1406,6 +1406,9 @@ static bool parseCmdlIVAS_dec( else if ( strcmp( argv_to_upper, "-EXOF" ) == 0 ) { arg->enableExternalOrientation = true; +#ifdef API_5MS_BASELINE + arg->enable5ms = true; +#endif i++; if ( argc - i <= 4 || argv[i][0] == '-' ) @@ -1842,7 +1845,9 @@ static ivas_error initOnFirstGoodFrame( splitRendBitsZero.buf_len = 0; splitRendBitsZero.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; splitRendBitsZero.pose_correction = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE; +#ifdef API_5MS splitRendBitsZero.codec_frame_size_ms = 20; +#endif if ( split_rend_write_bitstream_to_file( *hSplitRendFileReadWrite, splitRendBitsZero.bits_buf, &splitRendBitsZero.bits_read, &splitRendBitsZero.bits_written, -1, IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE #ifdef API_5MS diff --git a/apps/renderer.c b/apps/renderer.c index 12e40987e6..c36e5638cb 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1483,7 +1483,9 @@ int main( bitsBuffer.config.bufLenInBytes = bitsBufferSize; bitsBuffer.config.codec = IVAS_SPLIT_REND_CODEC_DEFAULT; bitsBuffer.config.poseCorrection = IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE; +#ifdef API_5MS bitsBuffer.config.codec_frame_size_ms = 20; +#endif #else inFloatBuffer = malloc( inBufferSize * sizeof( float ) ); outInt16Buffer = malloc( outBufferSize * sizeof( int16_t ) ); diff --git a/lib_com/options.h b/lib_com/options.h index 6d80081f88..e20c80f63b 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -129,6 +129,7 @@ #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 */ #define DISABLE_LIMITER /* disable the limiter to aid BE debugging */ +#define DEBUG_SIMULATE_EXTORIENTATION_MAIN_FOR_BE /* simulate the problem discussed in*/ #define DEBUG_IND_LIST_MEMORY /* raise assert() when ind_list[] runs out of memory */ /*Split Rendering Debug switches*/ diff --git a/lib_dec/ivas_output_config.c b/lib_dec/ivas_output_config.c index 0244156e51..7ac2fc90b9 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -555,16 +555,6 @@ void ivas_set_split_rend_setup( IVAS_DEC_SPLIT_REND_WRAPPER *hSplitBinRend, IVAS if ( ( hCombinedOrientationData != NULL ) && ( hSplitBinRend->splitrend.multiBinPoseData.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) ) { int16_t i, j; -#ifdef API_5MS - hCombinedOrientationData->Quaternion = hCombinedOrientationData->Quaternion; - for ( i = 0; i < 3; i++ ) - { - for ( j = 0; j < 3; j++ ) - { - hCombinedOrientationData->Rmat[i][j] = hCombinedOrientationData->Rmat[i][j]; - } - } -#else int16_t sf; for ( sf = 1; sf < MAX_PARAM_SPATIAL_SUBFRAMES; sf++ ) { @@ -577,7 +567,6 @@ void ivas_set_split_rend_setup( IVAS_DEC_SPLIT_REND_WRAPPER *hSplitBinRend, IVAS } } } -#endif } #endif return; diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 9b2124ce57..86ec56300a 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -1277,13 +1277,8 @@ ivas_error combine_external_and_head_orientations( #endif { /* Head rotation only */ -#ifdef API_5MS #ifdef API_5MS hCombinedOrientationData->Quaternion = *headRotQuaternion; -#else - hCombinedOrientationData->Quaternion = *headRotQuaternions; -#endif - #else if ( numHeadRotQuaternions >= 0 ) { @@ -1560,6 +1555,9 @@ ivas_error combine_external_and_head_orientations( if ( hExtOrientationData != NULL ) { #ifdef API_5MS +#ifdef DEBUG_SIMULATE_EXTORIENTATION_MAIN_FOR_BE + hCombinedOrientationData->Quaternion_prev_extOrientation = hExtOrientationData->Quaternion; +#else if ( hExtOrientationData->enableExternalOrientation > 0 ) { hCombinedOrientationData->Quaternion_prev_extOrientation = hExtOrientationData->Quaternion; @@ -1568,6 +1566,7 @@ ivas_error combine_external_and_head_orientations( { hCombinedOrientationData->Quaternion_prev_extOrientation = identity; } +#endif #elif defined FIX_570_SF_EXT_ORIENTATION if ( hExtOrientationData->enableExternalOrientation[MAX_PARAM_SPATIAL_SUBFRAMES - 1] > 0 ) { -- GitLab From c939706c44df8b7b79a1544c634db6bbbbe681b5 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Fri, 11 Aug 2023 11:03:49 +0200 Subject: [PATCH 143/175] added forgotten code portion in refactoring, fix render config reader bitstream reading --- lib_com/options.h | 1 + lib_dec/lib_dec.c | 5 ++++- lib_util/render_config_reader.c | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index e20c80f63b..dfc2585944 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -166,6 +166,7 @@ #define FIX_676_JBM_USAN /* FhG: fix usan in acessing transport channel buffers */ #define FIX_591_PARAMISM_JBM_ENER_CORRECTION /* FhG: fix energy correction in ParamISM rendering */ #define FIX_JBM_MC2SBA /* FhG: fix issue #679: check for transport vs. internal channel count in JBM prior to ivas_mc2sba() */ +#define FIX_RENDER_CONFIG_BITSTREAM_READER #define API_5MS /* FhG: 5ms rendering capability */ #ifdef API_5MS #define API_5MS_BASELINE /* FhG: baseline with 20ms rendering and split rendering through 20ms branch */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index aa6de95c44..d7b74fe320 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -2178,8 +2178,11 @@ static ivas_error copyRendererConfigStruct( RENDER_CONFIG_HANDLE hRCin, IVAS_REN mvr2r( hRCin->roomAcoustics.pFc_input, hRCout->room_acoustics.pFc_input, CLDFB_NO_CHANNELS_MAX ); mvr2r( hRCin->roomAcoustics.pAcoustic_rt60, hRCout->room_acoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); mvr2r( hRCin->roomAcoustics.pAcoustic_dsr, hRCout->room_acoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX ); +#ifdef CONTROL_METADATA_DIRECTIVITY + mvr2r( hRCin->directivity, hRCout->directivity, 3 * MAX_NUM_OBJECTS ); +#else mvr2r( hRCin->directivity, hRCout->directivity, 3 ); - +#endif #ifdef SPLIT_REND_WITH_HEAD_ROT hRCout->split_rend_config.splitRendBitRate = SPLIT_REND_768k; hRCout->split_rend_config.dof = 3; diff --git a/lib_util/render_config_reader.c b/lib_util/render_config_reader.c index 22b4ea0242..054c78311c 100644 --- a/lib_util/render_config_reader.c +++ b/lib_util/render_config_reader.c @@ -1476,6 +1476,9 @@ static ivas_error RenderConfigReader_readBinary( fread( pRenderConfigReader->pBitstream, sizeof( uint8_t ), file_size, pReverbConfigFile ); pRenderConfigReader->length = file_size; +#ifdef FIX_RENDER_CONFIG_BITSTREAM_READER + pRenderConfigReader->readOffset = 0; +#endif /****************************/ /* Read the presence flag */ -- GitLab From 07cf4836d41d199c4575599c78c957d1ca3ca7e7 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Fri, 11 Aug 2023 16:03:31 +0200 Subject: [PATCH 144/175] [fix] 5ms flag set incorrectly for LCLD codec on decoder (split-pre) side --- apps/decoder.c | 84 +++++++++++++++++++++++++++++++++++++---- lib_dec/ivas_init_dec.c | 7 ++++ lib_dec/lib_dec.c | 26 ++++++++++--- lib_dec/lib_dec.h | 9 +++-- 4 files changed, 110 insertions(+), 16 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 068d62b16a..a8f74ae9e3 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1733,10 +1733,15 @@ static int16_t app_own_random( int16_t *seed ) #endif static ivas_error initOnFirstGoodFrame( - IVAS_DEC_HANDLE hIvasDec, /* i/o: */ - const DecArguments arg, /* i : */ - const int16_t numInitialBadFrames, /* i : */ - const uint16_t numOutSamples, /* i : */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: */ + const DecArguments arg, /* i : */ + const int16_t numInitialBadFrames, /* i : */ +#if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) + uint16_t *numOutSamples, /* i/o: */ + int16_t *vec_pos_len, /* i/o: */ +#else + const uint16_t numOutSamples, /* i : */ +#endif int16_t *pFullDelayNumSamples, /* o : */ int16_t *pRemainingDelayNumSamples, /* o : */ int32_t *delayTimeScale, /* o : */ @@ -1863,9 +1868,22 @@ static ivas_error initOnFirstGoodFrame( else { #endif - if ( *pRemainingDelayNumSamples < numOutSamples ) + if ( *pRemainingDelayNumSamples < +#if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) + *numOutSamples +#else + numOutSamples +#endif + ) { - if ( ( error = AudioFileWriter_write( *ppAfWriter, zeroBuf, numOutSamples * *pNumOutChannels - ( *pRemainingDelayNumSamples * *pNumOutChannels ) ) ) != IVAS_ERR_OK ) + if ( ( error = AudioFileWriter_write( *ppAfWriter, zeroBuf, +#if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) + *numOutSamples +#else + numOutSamples +#endif + * *pNumOutChannels - + ( *pRemainingDelayNumSamples * *pNumOutChannels ) ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nOutput audio file writer error\n" ); return error; @@ -1874,7 +1892,13 @@ static ivas_error initOnFirstGoodFrame( } else { - *pRemainingDelayNumSamples -= numOutSamples; + *pRemainingDelayNumSamples -= +#if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) + *numOutSamples +#else + numOutSamples +#endif + ; } #ifdef SPLIT_REND_WITH_HEAD_ROT } @@ -1979,6 +2003,22 @@ static ivas_error initOnFirstGoodFrame( } } +#if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) + int16_t enable5ms; + IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ); + if ( enable5ms ) + { + *numOutSamples = (int16_t) ( arg.output_Fs / 1000 * HEADROTATION_FETCH_FRAMESIZE_MS ); + *vec_pos_len = IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; + } + else + { + *numOutSamples = (int16_t) ( arg.output_Fs / 1000 * DEFAULT_FETCH_FRAMESIZE_MS ); + *vec_pos_len = 1; + } + +#endif + return IVAS_ERR_OK; } @@ -2016,7 +2056,11 @@ static ivas_error decodeG192( int16_t nOutChannels = 0; int16_t delayNumSamples = -1; int16_t delayNumSamples_orig[3]; +#if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) + uint16_t nOutSamples = 0; +#else int16_t nOutSamples = 0; +#endif int32_t delayTimeScale = 0; ivas_error error = IVAS_ERR_UNKNOWN; uint16_t numObj = 0; @@ -2203,7 +2247,13 @@ static ivas_error decodeG192( fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } +#if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) + int16_t enable5ms; + IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ); + arg.enable5ms = enable5ms; +#else if ( !arg.enable5ms ) +#endif { /* Skip over 3 following head positions - they are given on 5ms grid */ for ( i = 0; i < 3; ++i ) @@ -2240,7 +2290,13 @@ static ivas_error decodeG192( goto cleanup; } +#if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) + int16_t enable5ms; + IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ); + arg.enable5ms = enable5ms; +#else if ( !arg.enable5ms ) +#endif { /* Skip over 3 following entries in file - they are given on 5ms grid */ for ( i = 0; i < 3; ++i ) @@ -2367,7 +2423,12 @@ static ivas_error decodeG192( hIvasDec, arg, numInitialBadFrames, +#if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) + &nOutSamples, + &vec_pos_len, +#else nOutSamples, +#endif delayNumSamples_orig, &delayNumSamples, &delayTimeScale, @@ -3495,7 +3556,11 @@ static ivas_error decodeVoIP( while ( 1 ) { +#if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) + uint16_t nOutSamples = 0; +#else int16_t nOutSamples = 0; +#endif #ifndef API_5MS uint16_t nSamplesAvailableNext = 0; #endif @@ -3616,7 +3681,12 @@ static ivas_error decodeVoIP( hIvasDec, arg, numInitialBadFrames, +#if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) + &nOutSamples, + NULL, +#else nOutSamples, +#endif delayNumSamples_orig, &delayNumSamples, &delayTimeScale, diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index cc31d08f28..9b6bc4b8ef 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -204,10 +204,17 @@ ivas_error ivas_dec_init_split_rend( { return error; } + + if ( st_ivas->hRenderConfig->split_rend_config.codec == IVAS_SPLIT_REND_CODEC_LC3PLUS && + ( st_ivas->hRenderConfig->split_rend_config.dof == 0 || st_ivas->hRenderConfig->split_rend_config.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) ) + { + st_ivas->hDecoderConfig->Opt_5ms = true; + } #else ivas_split_rend_choose_default_codec( &st_ivas->hRenderConfig->split_rend_config.codec, ( cldfb_in == 0 ), pcm_out ); #endif + error = ivas_split_renderer_open( &st_ivas->splitBinRend.splitrend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hDecoderConfig->output_Fs, diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index d7b74fe320..0427227ae5 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -695,10 +695,6 @@ ivas_error IVAS_DEC_Configure( ivas_error IVAS_DEC_EnableSplitRendering( IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle */ -#ifdef API_5MS_BASELINE - , - IVAS_RENDER_CONFIG_DATA renderConfig -#endif ) { DECODER_CONFIG_HANDLE hDecoderConfig; @@ -716,7 +712,7 @@ ivas_error IVAS_DEC_EnableSplitRendering( hDecoderConfig->Opt_Headrotation = 1; #ifdef API_5MS_BASELINE - hDecoderConfig->Opt_5ms = ( ( renderConfig.split_rend_config.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) || renderConfig.split_rend_config.dof == 0 ); + hDecoderConfig->Opt_5ms = false; #endif @@ -725,6 +721,26 @@ ivas_error IVAS_DEC_EnableSplitRendering( return error; } #endif +/*---------------------------------------------------------------------* + * IVAS_DEC_Get5msFlag( ) + * + * Get the 5ms flag + *---------------------------------------------------------------------*/ + +ivas_error IVAS_DEC_Get5msFlag( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + int16_t *enable5ms /* o : 5ms flag */ +) +{ + if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || enable5ms == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + + *enable5ms = (int16_t) hIvasDec->st_ivas->hDecoderConfig->Opt_5ms; + + return IVAS_ERR_OK; +} #endif /*---------------------------------------------------------------------* diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index a2d0e8e5de..22d28f16b5 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -387,10 +387,11 @@ ivas_error IVAS_DEC_EnableVoIP( /*! r: error code */ ivas_error IVAS_DEC_EnableSplitRendering( IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle */ -#ifdef API_5MS_BASELINE - , - IVAS_RENDER_CONFIG_DATA renderConfig /* i : render configuration */ -#endif +); + +ivas_error IVAS_DEC_Get5msFlag( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + int16_t *enable5ms /* o : 5ms flag */ ); #endif #endif -- GitLab From 89d057a087c38efafa7e8ba938ef66e350720690 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Fri, 11 Aug 2023 16:05:51 +0200 Subject: [PATCH 145/175] [fix] missing modification to function call --- apps/decoder.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index a8f74ae9e3..6a1497ff3f 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -524,12 +524,7 @@ int main( #ifdef SPLIT_REND_WITH_HEAD_ROT if ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED || arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) { - if ( ( error = IVAS_DEC_EnableSplitRendering( hIvasDec -#ifdef API_5MS_BASELINE - , - renderConfigSplit -#endif - ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_EnableSplitRendering( hIvasDec ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; -- GitLab From 8cc5e62a44c520b0e6ec455bed72e43930dc9174 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Fri, 11 Aug 2023 17:17:20 +0200 Subject: [PATCH 146/175] [fix] missed out if statement --- apps/decoder.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/decoder.c b/apps/decoder.c index 6a1497ff3f..3a0ba4fee8 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -2246,6 +2246,7 @@ static ivas_error decodeG192( int16_t enable5ms; IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ); arg.enable5ms = enable5ms; + if ( !enable5ms ) #else if ( !arg.enable5ms ) #endif @@ -2289,6 +2290,7 @@ static ivas_error decodeG192( int16_t enable5ms; IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ); arg.enable5ms = enable5ms; + if ( !enable5ms ) #else if ( !arg.enable5ms ) #endif -- GitLab From 4485f775f9b9c3d9b613c368cb812f1008163a10 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Fri, 11 Aug 2023 18:08:14 +0200 Subject: [PATCH 147/175] [fix] actually fix if statement --- apps/decoder.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 3a0ba4fee8..71c6004e0a 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -2246,10 +2246,8 @@ static ivas_error decodeG192( int16_t enable5ms; IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ); arg.enable5ms = enable5ms; - if ( !enable5ms ) -#else - if ( !arg.enable5ms ) #endif + if ( !arg.enable5ms ) { /* Skip over 3 following head positions - they are given on 5ms grid */ for ( i = 0; i < 3; ++i ) @@ -2290,10 +2288,8 @@ static ivas_error decodeG192( int16_t enable5ms; IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ); arg.enable5ms = enable5ms; - if ( !enable5ms ) -#else - if ( !arg.enable5ms ) #endif + if ( !arg.enable5ms ) { /* Skip over 3 following entries in file - they are given on 5ms grid */ for ( i = 0; i < 3; ++i ) -- GitLab From 2aa0d65c0b9c2d7cea8e62bb51aea64ff20b6d73 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Fri, 11 Aug 2023 18:53:14 +0200 Subject: [PATCH 148/175] [fix] build when SPLIT_REND_WITH_HEAD_ROT is disabled --- lib_rend/lib_rend.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 7680193712..fb62c86f09 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -6199,15 +6199,25 @@ static ivas_error renderIsmToBinaural( #ifdef API_5MS static int16_t getNumSubframesInBuffer( const IVAS_REND_AudioBuffer *buffer, int32_t sampleRate ) { +#ifdef SPLIT_REND_WITH_HEAD_ROT int16_t cldfb2tdSampleFact; cldfb2tdSampleFact = buffer->config.is_cldfb ? 2 : 1; +#endif #ifdef DEBUGGING +#ifdef SPLIT_REND_WITH_HEAD_ROT assert( buffer->config.numSamplesPerChannel % ( sampleRate / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES * cldfb2tdSampleFact ) == 0 ); +#else + assert( buffer->config.numSamplesPerChannel % ( sampleRate / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ) == 0 ); +#endif #endif +#ifdef SPLIT_REND_WITH_HEAD_ROT return (int16_t) ( buffer->config.numSamplesPerChannel / ( sampleRate / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES * cldfb2tdSampleFact ) ); +#else + return (int16_t) ( buffer->config.numSamplesPerChannel / ( sampleRate / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ) ); +#endif } #endif -- GitLab From 84475ae1227847975f5e295eb9ac5a76ced6fa52 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Sun, 13 Aug 2023 13:18:10 +0200 Subject: [PATCH 149/175] [fix] remove switch that was already removed on main --- lib_com/options.h | 1 - 1 file changed, 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 9888bd9189..1d650d2675 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -131,7 +131,6 @@ /*#define VARIABLE_SPEED_DECODING*/ /* variable speed decoding employing the JBM functioniality; move to DEBUGGING after build for disabled is fixed */ #define DISABLE_LIMITER /* disable the limiter to aid BE debugging */ #define DEBUG_SIMULATE_EXTORIENTATION_MAIN_FOR_BE /* simulate the problem discussed in*/ -#define DEBUG_IND_LIST_MEMORY /* raise assert() when ind_list[] runs out of memory */ // TODO tmu check merge /*Split Rendering Debug switches*/ /*#define DBG_WAV_WRITER*/ /* add debugging function dbgwrite_wav() */ -- GitLab From cbff72079a4bb6b07aa924e9cb5a0becc128617e Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Sun, 13 Aug 2023 13:30:58 +0200 Subject: [PATCH 150/175] [fix] compilation with either API_5MS or SPLIT_REND_WITH_HEAD_ROT disabled --- lib_com/options.h | 2 ++ lib_dec/lib_dec.c | 6 +++--- lib_rend/ivas_output_init.c | 2 ++ lib_rend/ivas_rotation.c | 4 ---- lib_rend/lib_rend.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 1d650d2675..7c92d24b06 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -183,8 +183,10 @@ #define SBA_AND_OBJECTS #ifdef SBA_AND_OBJECTS #define OSBA_BR_SWITCHING +#ifdef SPLIT_REND_WITH_HEAD_ROT /* requires main split rendering switch to be active */ #define OSBA_SPLIT_RENDERING #endif +#endif #define FIX_264_AUDIO_CHANNELS_TO_HEAP /* VA: issue 243: Move audio channels memory from stack to heap */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 1097553233..b35227ee4b 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -684,8 +684,7 @@ ivas_error IVAS_DEC_Configure( return error; } -#ifdef API_5MS -#ifdef SPLIT_REND_WITH_HEAD_ROT +#if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) /*---------------------------------------------------------------------* * IVAS_DEC_EnableSplitRendering( ) * @@ -719,7 +718,8 @@ ivas_error IVAS_DEC_EnableSplitRendering( return error; } -#endif + + /*---------------------------------------------------------------------* * IVAS_DEC_Get5msFlag( ) * diff --git a/lib_rend/ivas_output_init.c b/lib_rend/ivas_output_init.c index 990d36c8f0..e3a099f4b1 100644 --- a/lib_rend/ivas_output_init.c +++ b/lib_rend/ivas_output_init.c @@ -383,10 +383,12 @@ int16_t ivas_get_nchan_buffers_dec( } } +#ifdef SPLIT_REND_WITH_HEAD_ROT if ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { nchan_out_buff = max( nchan_out_buff, st_ivas->splitBinRend.splitrend.multiBinPoseData.num_poses * BINAURAL_CHANNELS ); } +#endif return nchan_out_buff; } diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 65b15c7bea..33f8c0b7e3 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -605,12 +605,8 @@ void rotateFrame_sd( #endif #ifdef SPLIT_REND_WITH_HEAD_ROT hCombinedOrientationData->Rmat_prev[0][i], -#else -#ifdef API_5MS - hCombinedOrientationData->Rmat_prev, #else hCombinedOrientationData->Rmat_prev[i], -#endif #endif 3 ); } diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index d5b7d359b8..4f4cb9165f 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -1516,7 +1516,7 @@ static ivas_error setRendInputActiveIsm( } if ( outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { - if ( ( error = ivas_reverb_open( &( inputIsm->hReverb ), getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, &inputIsm->tdRendWrapper.hBinRendererTd->HrFiltSet_p->lr_energy_and_iac, hRendCfg, *rendCtx.pOutSampleRate ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_reverb_open( &( inputIsm->hReverb ), getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, inputIsm->tdRendWrapper.hBinRendererTd->HrFiltSet_p->lr_energy_and_iac, hRendCfg, *rendCtx.pOutSampleRate ) ) != IVAS_ERR_OK ) { return error; } -- GitLab From 9494caf054df89acb1279eb17e37062d7bcb1376 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Sun, 13 Aug 2023 13:36:21 +0200 Subject: [PATCH 151/175] [fix] wrong variable used in tests + missing TODO --- lib_rend/ivas_rotation.c | 3 --- tests/split_rendering/test_split_rendering.py | 12 +++++++++--- .../test_split_rendering_be_comparison.py | 4 +++- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 33f8c0b7e3..f3880f0121 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -1688,10 +1688,7 @@ void external_target_interpolation( #ifdef API_5MS if ( hExtOrientationData->enableExternalOrientation ) { - // TODO tmu2bay, tmu2pajunen : is this correct or should we use one of the other options? - // hCombinedOrientationData->Quaternions_ext_interpolation_start = hExtOrientationData->Quaternion; hCombinedOrientationData->Quaternions_ext_interpolation_start = hCombinedOrientationData->Quaternion_prev_extOrientation; - // hCombinedOrientationData->Quaternions_ext_interpolation_start = hCombinedOrientationData->Quaternion_frozen_ext; } #else if ( hExtOrientationData->enableExternalOrientation[i] == 1 ) diff --git a/tests/split_rendering/test_split_rendering.py b/tests/split_rendering/test_split_rendering.py index 2445146b31..99672eda21 100644 --- a/tests/split_rendering/test_split_rendering.py +++ b/tests/split_rendering/test_split_rendering.py @@ -41,9 +41,13 @@ def check_xfail(test_info, in_fmt, render_config, bitrate=None): and "0dof" in render_config and ( "lc3plus" in render_config - or (in_fmt in INPUT_FORMATS_ISM_SPLIT_REND or in_fmt in INPUT_FORMATS_MC_SPLIT_REND) or ( - "external_split" in test_info.node.name and in_fmt in INPUT_FORMATS_AMBI_SPLIT_REND + in_fmt in INPUT_FORMATS_ISM_SPLIT_REND + or in_fmt in INPUT_FORMATS_MC_SPLIT_REND + ) + or ( + "external_split" in test_info.node.name + and in_fmt in INPUT_FORMATS_AMBI_SPLIT_REND ) # CREND for external renderer ambisonics rendering uses LC3plus by default ) ): @@ -214,7 +218,7 @@ def test_masa_full_chain_split(test_info, in_fmt, bitrate, render_config, trajec @pytest.mark.parametrize("trajectory", SPLIT_REND_HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("render_config", RENDERER_CONFIGS_TO_TEST_MASA) -@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) +@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA_SPLIT_REND) def test_masa_external_split(test_info, in_fmt, render_config, trajectory): check_xfail(test_info, in_fmt, render_config) @@ -263,6 +267,7 @@ full_chain_split_pcm_params = [ # ("MASA2", "256000", "split_renderer_config_3dof_384k_lcld"), ] + @pytest.mark.parametrize("in_fmt,bitrate,render_config", full_chain_split_pcm_params) def test_full_chain_split_pcm(test_info, in_fmt, bitrate, render_config): check_xfail(test_info, in_fmt, render_config, bitrate) @@ -288,6 +293,7 @@ external_split_pcm_params = [ ("ISM1", "split_renderer_config_3dof_384k_lcld"), ] + @pytest.mark.parametrize("in_fmt,render_config", external_split_pcm_params) def test_external_split_pcm(test_info, in_fmt, render_config): check_xfail(test_info, in_fmt, render_config) diff --git a/tests/split_rendering/test_split_rendering_be_comparison.py b/tests/split_rendering/test_split_rendering_be_comparison.py index 9e58ec2fac..68daf3d07c 100644 --- a/tests/split_rendering/test_split_rendering_be_comparison.py +++ b/tests/split_rendering/test_split_rendering_be_comparison.py @@ -187,7 +187,7 @@ def test_masa_full_chain_split(test_info, in_fmt, bitrate, render_config, trajec @pytest.mark.parametrize("trajectory", SPLIT_REND_HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("render_config", RENDERER_CONFIGS_TO_TEST_MASA) -@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA) +@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MASA_SPLIT_REND) def test_masa_external_split(test_info, in_fmt, render_config, trajectory): check_xfail(test_info, in_fmt, render_config) @@ -236,6 +236,7 @@ full_chain_split_pcm_params = [ # ("MASA2", "256000", "split_renderer_config_3dof_384k_lcld"), ] + @pytest.mark.parametrize("in_fmt,bitrate,render_config", full_chain_split_pcm_params) def test_full_chain_split_pcm(test_info, in_fmt, bitrate, render_config): check_xfail(test_info, in_fmt, render_config, bitrate) @@ -261,6 +262,7 @@ external_split_pcm_params = [ ("ISM1", "split_renderer_config_3dof_384k_lcld"), ] + @pytest.mark.parametrize("in_fmt,render_config", external_split_pcm_params) def test_external_split_pcm(test_info, in_fmt, render_config): check_xfail(test_info, in_fmt, render_config) -- GitLab From 89edab65058fdf91bd0994d86a5f6268c6f33fe5 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Sun, 13 Aug 2023 14:32:39 +0200 Subject: [PATCH 152/175] fix problem in JBM path with possible changing variables in the initOnFirstGoodFrame call --- apps/decoder.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 04754398e8..1b3be1fc9c 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -3642,14 +3642,18 @@ static ivas_error decodeVoIP( #ifdef SPLIT_REND_WITH_HEAD_ROT SplitFileReadWrite *hSplitRendFileReadWrite = NULL; +#endif +#if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) + int16_t vec_pos_len; + uint16_t nOutSamplesTmp; #endif error = initOnFirstGoodFrame( hIvasDec, arg, numInitialBadFrames, #if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) - &nOutSamples, - NULL, + &nOutSamplesTmp, + &vec_pos_len, #else nOutSamples, #endif -- GitLab From f5a9dfdcc298aa706f0bfa38ec296e09fcb7709d Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Sun, 13 Aug 2023 14:37:28 +0200 Subject: [PATCH 153/175] [fix] missing check for split PCM output in validation + clang-format --- lib_dec/ivas_mct_dec.c | 6 +++--- lib_rend/ivas_splitRendererPre.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) mode change 100755 => 100644 lib_dec/ivas_mct_dec.c diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c old mode 100755 new mode 100644 index 8ed4b607cf..59adeb5724 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -74,7 +74,7 @@ ivas_error ivas_mct_dec( #ifdef FIX_264_AUDIO_CHANNELS_TO_HEAP float *output[], /* o : output synthesis signal */ #else - float output[][L_FRAME48k], /* o : output synthesis signal */ + float output[][L_FRAME48k], /* o : output synthesis signal */ #endif const int16_t output_frame, /* i : output frame length per channel */ const int16_t nb_bits_metadata /* i : number of metadata bits */ @@ -703,7 +703,7 @@ ivas_error ivas_mc_dec_config( const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #else - int16_t *data /* o : output synthesis signal */ + int16_t *data /* o : output synthesis signal */ #endif ) { @@ -762,7 +762,7 @@ static ivas_error ivas_mc_dec_reconfig( const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #else - int16_t *data /* o : output synthesis signal */ + int16_t *data /* o : output synthesis signal */ #endif ) { diff --git a/lib_rend/ivas_splitRendererPre.c b/lib_rend/ivas_splitRendererPre.c index 1c76d0983c..ec9d6a2fde 100644 --- a/lib_rend/ivas_splitRendererPre.c +++ b/lib_rend/ivas_splitRendererPre.c @@ -2236,7 +2236,7 @@ static ivas_error ivas_renderMultiTDBinToSplitBinaural( ( !useLc3plus && !pcm_out ) ) { #ifdef API_5MS - if ( !useLc3plus && codec_frame_size_ms != 20 ) + if ( !useLc3plus && codec_frame_size_ms != 20 && !pcm_out ) { return IVAS_ERROR( IVAS_ERR_INVALID_INPUT_BUFFER_SIZE, "Unsupported framing for LCLD codec!" ); } -- GitLab From 968866d690c0f45f78a71ff4acfb5c9cda86d145 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Sun, 13 Aug 2023 15:09:03 +0200 Subject: [PATCH 154/175] fix JBM and initOnFirstGoodFrame again --- apps/decoder.c | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 1b3be1fc9c..d6f832d31b 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1977,19 +1977,30 @@ static ivas_error initOnFirstGoodFrame( } #if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) - int16_t enable5ms; - IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ); - if ( enable5ms ) + if ( *hSplitRendFileReadWrite != NULL ) { - *numOutSamples = (int16_t) ( arg.output_Fs / 1000 * HEADROTATION_FETCH_FRAMESIZE_MS ); - *vec_pos_len = IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; - } - else - { - *numOutSamples = (int16_t) ( arg.output_Fs / 1000 * DEFAULT_FETCH_FRAMESIZE_MS ); - *vec_pos_len = 1; - } + int16_t enable5ms; + + if ( numOutSamples == NULL || vec_pos_len == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + + IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ); + + /* real setting of the 5ms mode for split rendering is only known after the decoded first good frame, reset the variables needed in the main decoding loop accordingly here*/ + if ( enable5ms ) + { + *numOutSamples = (int16_t) ( arg.output_Fs / 1000 * HEADROTATION_FETCH_FRAMESIZE_MS ); + *vec_pos_len = IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; + } + else + { + *numOutSamples = (int16_t) ( arg.output_Fs / 1000 * DEFAULT_FETCH_FRAMESIZE_MS ); + *vec_pos_len = 1; + } + } #endif return IVAS_ERR_OK; @@ -3642,18 +3653,14 @@ static ivas_error decodeVoIP( #ifdef SPLIT_REND_WITH_HEAD_ROT SplitFileReadWrite *hSplitRendFileReadWrite = NULL; -#endif -#if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) - int16_t vec_pos_len; - uint16_t nOutSamplesTmp; #endif error = initOnFirstGoodFrame( hIvasDec, arg, numInitialBadFrames, #if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) - &nOutSamplesTmp, - &vec_pos_len, + &nOutSamples, + NULL, #else nOutSamples, #endif -- GitLab From 981863bafc4d5484c9b0af464ae35ca8d709636a Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Mon, 14 Aug 2023 06:47:17 +0200 Subject: [PATCH 155/175] fix OMASA JBM bitrate switching --- lib_dec/ivas_dirac_dec.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index ac5bcac18e..a81f77ae75 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1603,7 +1603,23 @@ void ivas_dirac_dec_set_md_map( ivas_jbm_dec_get_adapted_subframes( nCldfbTs, hSpatParamRendCom->subframe_nbslots, &hSpatParamRendCom->nb_subframes ); #ifdef API_5MS st_ivas->hTcBuffer->nb_subframes = hSpatParamRendCom->nb_subframes; +#ifdef MASA_AND_OBJECTS + { + /* check if the general time resolution is different than the DirAC one (combinded formats)*/ + int16_t i, sf_fac; + sf_fac = st_ivas->hTcBuffer->n_samples_granularity / hSpatParamRendCom->slot_size; + for ( i = 0; i < hSpatParamRendCom->nb_subframes; i++ ) + { +#ifdef DEBUGGING + /* only works if the nb of slots are a multiple of sf_fac, otherwise something was set up wrong */ + assert( ( hSpatParamRendCom->subframe_nbslots[i] % sf_fac ) == 0 ); +#endif + st_ivas->hTcBuffer->subframe_nbslots[i] = hSpatParamRendCom->subframe_nbslots[i] / sf_fac; + } + } +#else mvs2s( hSpatParamRendCom->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, hSpatParamRendCom->nb_subframes ); +#endif #endif /* set mapping according to dirac_read_idx */ -- GitLab From 0945d39203906de12dfff77ae79bb844dc20bc02 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Mon, 14 Aug 2023 07:06:12 +0200 Subject: [PATCH 156/175] better fix for OMASA JBM BR switch --- lib_dec/ivas_dirac_dec.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index a81f77ae75..5345a3726a 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1602,24 +1602,13 @@ void ivas_dirac_dec_set_md_map( ivas_jbm_dec_get_adapted_subframes( nCldfbTs, hSpatParamRendCom->subframe_nbslots, &hSpatParamRendCom->nb_subframes ); #ifdef API_5MS - st_ivas->hTcBuffer->nb_subframes = hSpatParamRendCom->nb_subframes; #ifdef MASA_AND_OBJECTS - { - /* check if the general time resolution is different than the DirAC one (combinded formats)*/ - int16_t i, sf_fac; - sf_fac = st_ivas->hTcBuffer->n_samples_granularity / hSpatParamRendCom->slot_size; - for ( i = 0; i < hSpatParamRendCom->nb_subframes; i++ ) - { -#ifdef DEBUGGING - /* only works if the nb of slots are a multiple of sf_fac, otherwise something was set up wrong */ - assert( ( hSpatParamRendCom->subframe_nbslots[i] % sf_fac ) == 0 ); + if ( st_ivas->ivas_format != MASA_ISM_FORMAT || st_ivas->ism_mode != ISM_MASA_MODE_DISC ) #endif - st_ivas->hTcBuffer->subframe_nbslots[i] = hSpatParamRendCom->subframe_nbslots[i] / sf_fac; - } + { + st_ivas->hTcBuffer->nb_subframes = hSpatParamRendCom->nb_subframes; + mvs2s( hSpatParamRendCom->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, hSpatParamRendCom->nb_subframes ); } -#else - mvs2s( hSpatParamRendCom->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, hSpatParamRendCom->nb_subframes ); -#endif #endif /* set mapping according to dirac_read_idx */ -- GitLab From 1cb84fe6ae1830281538f81a77e0ea1a7b2469df Mon Sep 17 00:00:00 2001 From: rtyag Date: Mon, 14 Aug 2023 15:26:38 +1000 Subject: [PATCH 157/175] fix in lc3 plus path with split rendering pose correction --- lib_rend/ivas_splitRendererPre.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib_rend/ivas_splitRendererPre.c b/lib_rend/ivas_splitRendererPre.c index ec9d6a2fde..817c4af3c0 100644 --- a/lib_rend/ivas_splitRendererPre.c +++ b/lib_rend/ivas_splitRendererPre.c @@ -2209,9 +2209,10 @@ static ivas_error ivas_renderMultiTDBinToSplitBinaural( if ( useLc3plus ) { -#ifdef API_5MS +#if 0 // def API_5MS int32_t frame_size = hSplitBin->hLc3plusEnc->config.samplerate * codec_frame_size_ms / 1000; #else + /*this should always have the time resolution of pose correction MD. Note that this does not change frame size of LC3plus*/ int32_t frame_size = hSplitBin->hLc3plusEnc->config.samplerate / (int32_t) FRAMES_PER_SEC; #endif -- GitLab From f89c7e4d44b0df750beb593cb689f98a4005e8aa Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Mon, 14 Aug 2023 08:33:08 +0200 Subject: [PATCH 158/175] fix problems with 0dof split rendering init by moving the call to the setup function to API level. Added some comments --- lib_dec/ivas_dec.c | 2 + lib_dec/ivas_dirac_dec.c | 2 + lib_dec/lib_dec.c | 184 +++++++++++++++++++++++---------------- 3 files changed, 114 insertions(+), 74 deletions(-) diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index 009c052f57..aa4d6ac10b 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -111,6 +111,7 @@ ivas_error ivas_dec( push_wmops( "ivas_dec" ); +#ifndef API_5MS_BASELINE /*----------------------------------------------------------------* * IVAS decoder setup * - read IVAS format signaling @@ -130,6 +131,7 @@ ivas_error ivas_dec( return error; } } +#endif /*----------------------------------------------------------------* * Initialization of local vars after struct has been set diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 5345a3726a..78583efada 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1602,7 +1602,9 @@ void ivas_dirac_dec_set_md_map( ivas_jbm_dec_get_adapted_subframes( nCldfbTs, hSpatParamRendCom->subframe_nbslots, &hSpatParamRendCom->nb_subframes ); #ifdef API_5MS + /* copy also to tc buffer */ #ifdef MASA_AND_OBJECTS + /* only for non-combined formats and combinded formats w/o discrete objects */ if ( st_ivas->ivas_format != MASA_ISM_FORMAT || st_ivas->ism_mode != ISM_MASA_MODE_DISC ) #endif { diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index b35227ee4b..f8e9b6c131 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1088,6 +1088,13 @@ ivas_error IVAS_DEC_GetSamples( nSamplesRendered = 0; nOutChannels = 0; +#ifdef API_5MS_BASELINE + nSamplesRendered_loop = 0; + l_ts = 0; + nTransportChannels = 0; +#endif + + if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; @@ -1117,33 +1124,13 @@ ivas_error IVAS_DEC_GetSamples( } } #ifdef API_5MS_BASELINE + /* only for 1st step 5ms API, split rendering still needs to go through the old decoding function */ - else if ( !hIvasDec->st_ivas->hDecoderConfig->Opt_5ms ) - { - if ( ( error = _GetSamples( hIvasDec, -#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT - pcm_type_API_to_internal( pcmType ), -#endif - pcmBuf, nOutSamples ) ) != IVAS_ERR_OK ) - { - return error; - } -#ifdef DEBUGGING - assert( *nOutSamples == nSamplesAsked ); -#endif - hIvasDec->nSamplesAvailableNext = 0; - hIvasDec->nSamplesRendered = *nOutSamples; - nSamplesRendered = *nOutSamples; - hIvasDec->needNewFrame = true; - *needNewFrame = true; - } -#endif else { - /* check if we need to run the setup function, tc decoding and feeding the renderer */ + /* check if we need to run the setup function */ if ( !hIvasDec->isInitialized || hIvasDec->hasBeenFedFrame ) { - int16_t nResidualSamples, nSamplesTcsScaled; /* setup */ if ( ( error = IVAS_DEC_Setup( hIvasDec, &l_ts, &nTransportChannels, &nOutChannels, &nSamplesRendered_loop, #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT @@ -1157,80 +1144,129 @@ ivas_error IVAS_DEC_GetSamples( { return error; } - nSamplesRendered += nSamplesRendered_loop; - if ( nTransportChannels != hIvasDec->nTransportChannelsOld ) - { - IVAS_DEC_reconfigure( hIvasDec, nTransportChannels, l_ts ); - } - /* decode TCs only */ - if ( ( error = IVAS_DEC_GetTcSamples( hIvasDec, hIvasDec->apaExecBuffer, &nOutSamplesElse ) ) != IVAS_ERR_OK ) +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT + /* :TODO: change nSamplesAsked also if we are in 5ms 0dof split rendering... */ +#endif + } + if ( !hIvasDec->st_ivas->hDecoderConfig->Opt_5ms ) + { + if ( ( error = _GetSamples( hIvasDec, +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT + pcm_type_API_to_internal( pcmType ), +#endif + pcmBuf, nOutSamples ) ) != IVAS_ERR_OK ) { return error; } - - if ( hIvasDec->st_ivas->hDecoderConfig->Opt_tsm ) +#ifdef DEBUGGING + assert( *nOutSamples == nSamplesAsked ); +#endif + hIvasDec->nSamplesAvailableNext = 0; + hIvasDec->nSamplesRendered = *nOutSamples; + nSamplesRendered = *nOutSamples; + hIvasDec->needNewFrame = true; + hIvasDec->hasBeenFedFrame = false; + *needNewFrame = true; + } +#endif + else + { + /* check if we need to run the setup function, tc decoding and feeding the renderer */ + if ( !hIvasDec->isInitialized || hIvasDec->hasBeenFedFrame ) { - if ( apa_set_scale( hIvasDec->hTimeScaler, hIvasDec->tsm_scale ) != 0 ) + int16_t nResidualSamples, nSamplesTcsScaled; +#ifndef API_5MS_BASELINE + /* setup */ + if ( ( error = IVAS_DEC_Setup( hIvasDec, &l_ts, &nTransportChannels, &nOutChannels, &nSamplesRendered_loop, +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT + pcmType, + pcm_buffer_offset( pcmBuf, pcmType, nSamplesRendered * nOutChannels ) +#else + pcmBuf + nSamplesRendered * nOutChannels +#endif + + ) ) != IVAS_ERR_OK ) { - return IVAS_ERR_UNKNOWN; + return error; } - result = apa_exec( hIvasDec->hTimeScaler, hIvasDec->apaExecBuffer, hIvasDec->nSamplesFrame * nTransportChannels, (uint16_t) hIvasDec->tsm_max_scaling, hIvasDec->apaExecBuffer, &nTimeScalerOutSamples ); - if ( result != 0 ) +#endif + nSamplesRendered += nSamplesRendered_loop; + if ( nTransportChannels != hIvasDec->nTransportChannelsOld ) { - return IVAS_ERR_UNKNOWN; + IVAS_DEC_reconfigure( hIvasDec, nTransportChannels, l_ts ); + } + /* decode TCs only */ + if ( ( error = IVAS_DEC_GetTcSamples( hIvasDec, hIvasDec->apaExecBuffer, &nOutSamplesElse ) ) != IVAS_ERR_OK ) + { + return error; } - assert( nTimeScalerOutSamples <= APA_BUF ); - } - else - { - nTimeScalerOutSamples = hIvasDec->nSamplesFrame * nTransportChannels; - } - nSamplesTcsScaled = nTimeScalerOutSamples / nTransportChannels; - /* render IVAS frames */ + if ( hIvasDec->st_ivas->hDecoderConfig->Opt_tsm ) + { + if ( apa_set_scale( hIvasDec->hTimeScaler, hIvasDec->tsm_scale ) != 0 ) + { + return IVAS_ERR_UNKNOWN; + } + result = apa_exec( hIvasDec->hTimeScaler, hIvasDec->apaExecBuffer, hIvasDec->nSamplesFrame * nTransportChannels, (uint16_t) hIvasDec->tsm_max_scaling, hIvasDec->apaExecBuffer, &nTimeScalerOutSamples ); + if ( result != 0 ) + { + return IVAS_ERR_UNKNOWN; + } + assert( nTimeScalerOutSamples <= APA_BUF ); + } + else + { + nTimeScalerOutSamples = hIvasDec->nSamplesFrame * nTransportChannels; + } + nSamplesTcsScaled = nTimeScalerOutSamples / nTransportChannels; + /* render IVAS frames */ - if ( ( error = IVAS_DEC_RendererFeedTcSamples( hIvasDec, nSamplesTcsScaled, &nResidualSamples, hIvasDec->apaExecBuffer ) ) != IVAS_ERR_OK ) - { - return error; - } - if ( hIvasDec->st_ivas->hDecoderConfig->Opt_tsm ) - { - /* feed residual samples to TSM for the next call */ - if ( apa_set_renderer_residual_samples( hIvasDec->hTimeScaler, (uint16_t) nResidualSamples ) != 0 ) + if ( ( error = IVAS_DEC_RendererFeedTcSamples( hIvasDec, nSamplesTcsScaled, &nResidualSamples, hIvasDec->apaExecBuffer ) ) != IVAS_ERR_OK ) { - return IVAS_ERR_UNKNOWN; + return error; + } + + if ( hIvasDec->st_ivas->hDecoderConfig->Opt_tsm ) + { + /* feed residual samples to TSM for the next call */ + if ( apa_set_renderer_residual_samples( hIvasDec->hTimeScaler, (uint16_t) nResidualSamples ) != 0 ) + { + return IVAS_ERR_UNKNOWN; + } } + hIvasDec->hasBeenFedFrame = false; } - hIvasDec->hasBeenFedFrame = false; - } - /* render IVAS frames directly to the output buffer */ - nSamplesToRender = nSamplesAsked - nSamplesRendered; - if ( ( error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesRendered_loop, &hIvasDec->nSamplesAvailableNext, + /* render IVAS frames directly to the output buffer */ + nSamplesToRender = nSamplesAsked - nSamplesRendered; + if ( ( error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesRendered_loop, &hIvasDec->nSamplesAvailableNext, #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT - pcmType, - pcm_buffer_offset( pcmBuf, pcmType, nSamplesRendered * nOutChannels ) + pcmType, + pcm_buffer_offset( pcmBuf, pcmType, nSamplesRendered * nOutChannels ) #else pcmBuf + nSamplesRendered * nOutChannels #endif - ) ) != IVAS_ERR_OK ) - { - return error; - } - nSamplesRendered += nSamplesRendered_loop; - nSamplesToRender -= nSamplesRendered_loop; - if ( hIvasDec->nSamplesAvailableNext == 0 ) - { - *needNewFrame = true; - hIvasDec->needNewFrame = true; - } - else - { - *needNewFrame = false; + ) ) != IVAS_ERR_OK ) + { + return error; + } + nSamplesRendered += nSamplesRendered_loop; + nSamplesToRender -= nSamplesRendered_loop; + if ( hIvasDec->nSamplesAvailableNext == 0 ) + { + *needNewFrame = true; + hIvasDec->needNewFrame = true; + } + else + { + *needNewFrame = false; + } } +#ifdef API_5MS_BASELINE } +#endif *nOutSamples = nSamplesRendered; -- GitLab From a0b2c8d8e3a4266aa1b4e9768ef1a5c826ee32b3 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Mon, 14 Aug 2023 10:46:48 +0200 Subject: [PATCH 159/175] [fix] external orientation interpolation start quaternion --- lib_rend/ivas_rotation.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index f3880f0121..7b760912ac 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -1686,10 +1686,15 @@ void external_target_interpolation( /* Use the most recent external orientation as the starting orientation */ #ifdef API_5MS - if ( hExtOrientationData->enableExternalOrientation ) + if ( hExtOrientationData->enableExternalOrientation == 1 ) { hCombinedOrientationData->Quaternions_ext_interpolation_start = hCombinedOrientationData->Quaternion_prev_extOrientation; } + else if ( hExtOrientationData->enableExternalOrientation == 2 ) + { + hCombinedOrientationData->Quaternions_ext_interpolation_start = hCombinedOrientationData->Quaternion_frozen_ext; + } + #else if ( hExtOrientationData->enableExternalOrientation[i] == 1 ) { -- GitLab From a4cbf7119e8a69bcfdc3ac3d1b61e0682cb05ae5 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Mon, 14 Aug 2023 12:03:09 +0200 Subject: [PATCH 160/175] fix instrumentation in case of 5ms rendering --- apps/decoder.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/decoder.c b/apps/decoder.c index d6f832d31b..d7cec6d1af 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -2547,7 +2547,10 @@ static ivas_error decodeG192( #endif } #ifdef WMOPS - update_wmops(); + if ( vec_pos_update == 0 ) + { + update_wmops(); + } #ifdef MEM_COUNT_DETAILS export_mem( "mem_analysis.csv" ); #endif -- GitLab From f65246ba11bf1490577ea54a00ed0fb5dcdb5854 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Mon, 14 Aug 2023 13:01:08 +0200 Subject: [PATCH 161/175] [fix] zero output for BINAURAL_SPLIT_PCM; buffers not passed correctly at decoder or renderer pre-split rendering side --- apps/decoder.c | 10 +++++++--- apps/renderer.c | 30 ++++++++++++++++-------------- lib_dec/lib_dec.c | 15 +++++++++++++++ lib_dec/lib_dec.h | 1 + lib_rend/lib_rend.c | 19 ++++++++----------- lib_rend/lib_rend.h | 5 +++-- 6 files changed, 50 insertions(+), 30 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index d7cec6d1af..c7b55ad0fd 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -2350,12 +2350,16 @@ static ivas_error decodeG192( #ifdef SPLIT_REND_WITH_HEAD_ROT if ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED || arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) { - error = IVAS_DEC_GetSplitBinauralBitstream( hIvasDec, &splitRendBits, &nSamplesRendered_loop, &needNewFrame ); + error = IVAS_DEC_GetSplitBinauralBitstream( hIvasDec, + (void *) ( pcmBuf + nOutChannels * nSamplesRendered ), + &splitRendBits, + &nSamplesRendered_loop, + &needNewFrame ); nSamplesRendered += nSamplesRendered_loop; nSamplesToRender -= nSamplesRendered_loop; if ( error != IVAS_ERR_OK ) { - fprintf( stderr, "\nError in IVAS_DEC_GetSplitBinaural: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + fprintf( stderr, "\nError in IVAS_DEC_GetSplitBinauralBitstream: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } } @@ -2374,7 +2378,7 @@ static ivas_error decodeG192( nSamplesToRender -= nSamplesRendered_loop; if ( error != IVAS_ERR_OK ) { - fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + fprintf( stderr, "\nError in IVAS_DEC_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef SPLIT_REND_WITH_HEAD_ROT diff --git a/apps/renderer.c b/apps/renderer.c index c712ed06b4..dee07341ac 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1868,24 +1868,26 @@ int main( #ifdef API_5MS if ( splitBinNeedsNewFrame ) { - if ( ( error = IVAS_REND_FeedSplitBinauralBitstream( hIvasRend, splitBinIds[i], &bitsBuffer ) ) != IVAS_ERR_OK ) +#endif + if ( ( error = IVAS_REND_GetInputNumChannels( hIvasRend, splitBinIds[i], &numChannels ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } - } -#else - if ( ( error = IVAS_REND_GetInputNumChannels( hIvasRend, splitBinIds[i], &numChannels ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); - exit( -1 ); - } - IVAS_REND_ReadOnlyAudioBuffer tmpBuffer = getReadOnlySubBuffer( inBuffer, (int16_t) args.inConfig.binBuses[i].inputChannelIndex, numChannels ); + IVAS_REND_ReadOnlyAudioBuffer tmpBuffer = getReadOnlySubBuffer( inBuffer, (int16_t) args.inConfig.binBuses[i].inputChannelIndex, numChannels ); - if ( ( error = IVAS_REND_FeedInputAudio( hIvasRend, splitBinIds[i], tmpBuffer ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); - exit( -1 ); + if ( ( error = IVAS_REND_FeedInputAudio( hIvasRend, splitBinIds[i], tmpBuffer ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + + if ( ( error = IVAS_REND_FeedSplitBinauralBitstream( hIvasRend, splitBinIds[i], &bitsBuffer ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } +#ifdef API_5MS } #endif } @@ -1903,7 +1905,7 @@ int main( else if ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { - if ( ( error = IVAS_REND_GetSplitBinauralBitstream( hIvasRend, &bitsBuffer ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_REND_GetSplitBinauralBitstream( hIvasRend, outBuffer, &bitsBuffer ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); exit( -1 ); diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index f8e9b6c131..81f3709a4d 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1277,6 +1277,7 @@ ivas_error IVAS_DEC_GetSamples( #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT ivas_error IVAS_DEC_GetSplitBinauralBitstream( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + void *pcmBuf_out, /* o : output synthesis signal */ IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode*/ int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ bool *needNewFrame /* indication that the decoder needs a new frame */ @@ -1432,6 +1433,20 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( return error; } + /* convert to int16 with limiting for BINAURAL_SPLIT_PCM */ +#ifndef DISABLE_LIMITER + ivas_limiter_dec( st_ivas->hLimiter, pOutput, + BINAURAL_CHANNELS, + numSamplesPerChannelToSplitEncode, st_ivas->BER_detect ); +#endif + +#ifdef DEBUGGING + st_ivas->noClipping += +#endif + ivas_syn_output( pOutput, numSamplesPerChannelToSplitEncode, + BINAURAL_CHANNELS, + (int16_t *) pcmBuf_out ); + free( st_ivas->splitBinRend.hMultiBinCldfbData ); return error; diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 04feace83a..42bf38263d 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -221,6 +221,7 @@ ivas_error IVAS_DEC_GetSamples( #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT ivas_error IVAS_DEC_GetSplitBinauralBitstream( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + void *pcmBuf, /* o : output synthesis signal */ IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode*/ int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ bool *needNewFrame /* indication that the decoder needs a new frame */ diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 4f4cb9165f..852b638ae3 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -9348,9 +9348,7 @@ ivas_error IVAS_REND_GetSamples( int16_t numOutChannels; #ifdef SPLIT_REND_WITH_HEAD_ROT int16_t cldfb2tdSampleFact; -#ifndef API_5MS IVAS_REND_AudioBuffer outAudioOrig; -#endif #endif /* Validate function arguments */ @@ -9440,17 +9438,15 @@ ivas_error IVAS_REND_GetSamples( #ifdef SPLIT_REND_WITH_HEAD_ROT -#ifndef API_5MS outAudioOrig = outAudio; -#endif /* Use internal buffer if outputting split rendering bitstream */ if ( ( hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || ( hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) { int16_t num_poses_orig; num_poses_orig = hIvasRend->splitRendWrapper.multiBinPoseData.num_poses; -#ifndef API_5MS outAudio = hIvasRend->splitRendEncBuffer; +#ifndef API_5MS if ( ( outAudioOrig.config.is_cldfb == 0 ) && ( hIvasRend->inputsMasa[0].base.inConfig == IVAS_REND_AUDIO_CONFIG_UNKNOWN ) ) { @@ -9464,10 +9460,8 @@ ivas_error IVAS_REND_GetSamples( hIvasRend->headRotData.sr_pose_pred_axis ); assert( num_poses_orig == hIvasRend->splitRendWrapper.multiBinPoseData.num_poses && "number of poses should not change dynamically" ); -#ifndef API_5MS - /* Clear output buffer */ + /* Clear output buffer for split rendering bitstream */ set_zero( outAudio.data, outAudio.config.numChannels * outAudio.config.numSamplesPerChannel ); -#endif } #endif if ( ( error = renderActiveInputsIsm( hIvasRend, outAudio ) ) != IVAS_ERR_OK ) @@ -9580,9 +9574,9 @@ ivas_error IVAS_REND_GetSamples( } convertInternalBitsBuffToBitsBuffer( hBits, bits ); -#ifndef API_5MS + + /* reset to outAudioOrig in case of PCM output */ outAudio = outAudioOrig; -#endif if ( hIvasRend->outputConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { @@ -9621,6 +9615,7 @@ ivas_error IVAS_REND_GetSamples( #ifdef SPLIT_REND_WITH_HEAD_ROT ivas_error IVAS_REND_GetSplitBinauralBitstream( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_REND_AudioBuffer outAudio, /* i/o: buffer for output audio */ IVAS_REND_BitstreamBuffer *hBits /* o : buffer for output bitstream */ ) { @@ -9639,7 +9634,9 @@ ivas_error IVAS_REND_GetSplitBinauralBitstream( } hIvasRend->splitRendEncBuffer.config.numSamplesPerChannel *= cldfb_in ? 2 : 1; - return getSamplesInternal( hIvasRend, hIvasRend->splitRendEncBuffer, hBits ); + /* hIvasRend->splitRendEncBuffer used for BINAURAL_SPLIT_CODED output + outAudio used for BINAURAL_SPLIT_PCM output */ + return getSamplesInternal( hIvasRend, outAudio, hBits ); } ivas_error IVAS_REND_GetSplitBinauralSamples( diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index 8c3f6f41ee..476481edcc 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -282,12 +282,13 @@ ivas_error IVAS_REND_FeedSplitBinauralBitstream( ); ivas_error IVAS_REND_GetSplitBinauralSamples( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - IVAS_REND_AudioBuffer outAudio, /* i/o: buffer for output audio */ + IVAS_REND_AudioBuffer outAudio, /* i/o: buffer for output audio */ bool* needNewFrame ); ivas_error IVAS_REND_GetSplitBinauralBitstream( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - IVAS_REND_BitstreamBuffer *hBits /* o : buffer for output bitstream */ + IVAS_REND_AudioBuffer outAudio, /* i/o: buffer for output audio */ + IVAS_REND_BitstreamBuffer *hBits /* o : buffer for output bitstream */ ); #endif -- GitLab From 2d5a15a3c6b6d582d0309e37748dc8debd9c7277 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Mon, 14 Aug 2023 13:27:05 +0200 Subject: [PATCH 162/175] cleanup fix for BINAURAL_SPLIT_PCM, perform limiting/synthesis only when needed --- lib_dec/lib_dec.c | 23 +++++++++++------------ lib_dec/lib_dec.h | 4 ++-- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 81f3709a4d..fd717895b8 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1277,7 +1277,7 @@ ivas_error IVAS_DEC_GetSamples( #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT ivas_error IVAS_DEC_GetSplitBinauralBitstream( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - void *pcmBuf_out, /* o : output synthesis signal */ + void *pcmBuf_out, /* o : output synthesis signal for BINAURAL_SPLIT_PCM */ IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode*/ int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ bool *needNewFrame /* indication that the decoder needs a new frame */ @@ -1288,9 +1288,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( int32_t output_Fs; float *writePtr; float *readPtr, *readEnd; -#ifdef FIX_264_AUDIO_CHANNELS_TO_HEAP float *pOutput[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES]; -#endif float output[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES][L_FRAME48k]; float pcmBuf[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES * L_FRAME48k]; int16_t numSamplesPerChannelCacheSize; @@ -1399,12 +1397,10 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( output[j][i] = pcmBuf[i * BINAURAL_CHANNELS * numPoses + j]; } } -#ifdef FIX_264_AUDIO_CHANNELS_TO_HEAP for ( i = 0; i < BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES; ++i ) { pOutput[i] = output[i]; } -#endif max_band = (int16_t) ( ( BINAURAL_MAXBANDS * output_Fs ) / 48000 ); pcm_out = ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0; td_input = st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC; @@ -1434,18 +1430,21 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( } /* convert to int16 with limiting for BINAURAL_SPLIT_PCM */ + if ( pcm_out ) + { #ifndef DISABLE_LIMITER - ivas_limiter_dec( st_ivas->hLimiter, pOutput, - BINAURAL_CHANNELS, - numSamplesPerChannelToSplitEncode, st_ivas->BER_detect ); + ivas_limiter_dec( st_ivas->hLimiter, pOutput, + st_ivas->hDecoderConfig->nchan_out, + numSamplesPerChannelToSplitEncode, st_ivas->BER_detect ); #endif #ifdef DEBUGGING - st_ivas->noClipping += + st_ivas->noClipping += #endif - ivas_syn_output( pOutput, numSamplesPerChannelToSplitEncode, - BINAURAL_CHANNELS, - (int16_t *) pcmBuf_out ); + ivas_syn_output( pOutput, numSamplesPerChannelToSplitEncode, + st_ivas->hDecoderConfig->nchan_out, + (int16_t *) pcmBuf_out ); + } free( st_ivas->splitBinRend.hMultiBinCldfbData ); diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 42bf38263d..aaab4f8a1f 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -221,8 +221,8 @@ ivas_error IVAS_DEC_GetSamples( #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT ivas_error IVAS_DEC_GetSplitBinauralBitstream( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - void *pcmBuf, /* o : output synthesis signal */ - IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode*/ + void *pcmBuf_out, /* o : output synthesis signal for BINAURAL_SPLIT_PCM */ + IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode */ int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ bool *needNewFrame /* indication that the decoder needs a new frame */ ); -- GitLab From 3ff239a9e7385c2c1591db99959e31c94564defe Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Mon, 14 Aug 2023 15:07:57 +0200 Subject: [PATCH 163/175] fix PlanarSBA JBM RS --- lib_com/options.h | 1 + lib_dec/ivas_jbm_dec.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 7c92d24b06..9cbf054c58 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -168,6 +168,7 @@ #define FIX_REND_DELAY_COMP /* FhG: fix delay compensation in renderer.c - Doesn't affect BE as the broken code was never executed on main */ #define LIB_REND_FIX_HRTFPARAMBIN_MEMLEAK #define FIX_CQMFPREDDEC_FREE /* FhG: avoid double free / free of NULL in DeletePredictionDecoder() */ +#define FIX_PLANAR_SBA_JBM_RS /* ### API_5MS switches ### */ diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 779bc80e89..0b4106961b 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1797,7 +1797,16 @@ int16_t ivas_jbm_dec_get_num_tc_channels( } if ( st_ivas->ivas_format == SBA_FORMAT ) { - if ( ( st_ivas->sba_planar && num_tc >= 3 ) || ( num_tc == 3 ) ) + if ( +#ifndef FIX_PLANAR_SBA_JBM_RS + ( st_ivas->sba_planar && num_tc >= 3 ) || + ( +#endif + num_tc == 3 +#ifndef FIX_PLANAR_SBA_JBM_RS + ) +#endif + ) { num_tc++; } -- GitLab From 4ba2637214f842cf4ed79fc148b4689571c2e0cf Mon Sep 17 00:00:00 2001 From: rtyag Date: Mon, 14 Aug 2023 23:33:29 +1000 Subject: [PATCH 164/175] few split rendering fixes in CLDFB domain --- apps/renderer.c | 2 +- lib_dec/ivas_binRenderer_internal.c | 29 ++++++++++------------------- lib_rend/ivas_prot_rend.h | 7 ++++++- lib_rend/lib_rend.c | 28 ++++++++++++++++++++++++---- 4 files changed, 41 insertions(+), 25 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index dee07341ac..ed81c78742 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1553,7 +1553,7 @@ int main( } /* Convert from int to float and from interleaved to packed */ - convertInputBuffer( inpInt16Buffer, numSamplesRead, frameSize_smpls, num_in_channels, inFloatBuffer + convertInputBuffer( inpInt16Buffer, numSamplesRead, inBuffer.config.numSamplesPerChannel, num_in_channels, inFloatBuffer #ifdef SPLIT_REND_WITH_HEAD_ROT , inBuffer.config.is_cldfb, cldfbAna diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index 2dad2f372f..1561688aaf 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -2129,12 +2129,15 @@ void ivas_rend_CldfbMultiBinRendProcess( float Cldfb_In_Imag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], float Cldfb_Out_Real[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* o : Binaural signals */ float Cldfb_Out_Imag[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - const int16_t low_res_pre_rend_rot ) + const int16_t low_res_pre_rend_rot +#ifdef API_5MS + , + int16_t num_subframes +#endif +) { int16_t slot_idx, ch_idx, idx, pose_idx, i, j; -#ifndef API_5MS int16_t sf_idx; -#endif float Cldfb_RealBuffer_sfIn[MAX_INPUT_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; float Cldfb_ImagBuffer_sfIn[MAX_INPUT_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; #ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG @@ -2146,17 +2149,11 @@ void ivas_rend_CldfbMultiBinRendProcess( float Cldfb_ImagBuffer_Binaural[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; #endif -#ifndef API_5MS - for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) + for ( sf_idx = 0; sf_idx < num_subframes; sf_idx++ ) { -#endif for ( slot_idx = 0; slot_idx < MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ ) { -#ifdef API_5MS - idx = slot_idx; -#else - idx = sf_idx * MAX_PARAM_SPATIAL_SUBFRAMES + slot_idx; -#endif + idx = sf_idx * MAX_PARAM_SPATIAL_SUBFRAMES + slot_idx; for ( ch_idx = 0; ch_idx < hCldfbRend->nInChannels; ch_idx++ ) { mvr2r( &Cldfb_In_Real[ch_idx][idx][0], &Cldfb_RealBuffer_sfIn[ch_idx][slot_idx][0], hCldfbRend->max_band ); @@ -2171,7 +2168,7 @@ void ivas_rend_CldfbMultiBinRendProcess( #ifdef API_5MS ( *pCombinedOrientationData )->Quaternion = ( *pCombinedOrientationData )->Quaternion; #else - ( *pCombinedOrientationData )->Quaternions[sf_idx] = ( *pCombinedOrientationData )->Quaternions[0]; + ( *pCombinedOrientationData )->Quaternions[sf_idx] = ( *pCombinedOrientationData )->Quaternions[0]; #endif for ( i = 0; i < 3; i++ ) { @@ -2207,11 +2204,7 @@ void ivas_rend_CldfbMultiBinRendProcess( { for ( slot_idx = 0; slot_idx < MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ ) { -#ifdef API_5MS - idx = slot_idx; -#else - idx = sf_idx * MAX_PARAM_SPATIAL_SUBFRAMES + slot_idx; -#endif + idx = sf_idx * MAX_PARAM_SPATIAL_SUBFRAMES + slot_idx; for ( ch_idx = 0; ch_idx < BINAURAL_CHANNELS; ch_idx++ ) { mvr2r( &Cldfb_RealBuffer_Binaural[pose_idx][ch_idx][slot_idx][0], &Cldfb_Out_Real[( pose_idx * BINAURAL_CHANNELS ) + ch_idx][idx][0], hCldfbRend->max_band ); @@ -2219,9 +2212,7 @@ void ivas_rend_CldfbMultiBinRendProcess( } } } -#ifndef API_5MS } -#endif return; } diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 2fea4ac907..b2261bfe48 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -893,7 +893,12 @@ void ivas_rend_CldfbMultiBinRendProcess( float Cldfb_In_Imag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], float Cldfb_Out_Real[MAX_HEAD_ROT_POSES*BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* o : Binaural signals */ float Cldfb_Out_Imag[MAX_HEAD_ROT_POSES*BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - const int16_t low_res_pre_rend_rot ); + const int16_t low_res_pre_rend_rot +#ifdef API_5MS + , + int16_t num_subframes +#endif +); ivas_error ivas_rend_openCldfb( HANDLE_CLDFB_FILTER_BANK cldfbAna[MAX_INPUT_CHANNELS], diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 852b638ae3..db1df0f758 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -8199,7 +8199,12 @@ static ivas_error renderSbaToMultiBinaural( static ivas_error renderSbaToMultiBinauralCldfb( input_sba *sbaInput, float Cldfb_Out_Real[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], float Cldfb_Out_Imag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - const int16_t low_res_pre_rend_rot ) + const int16_t low_res_pre_rend_rot +#ifdef API_5MS + , + int16_t num_subframes +#endif +) { float Cldfb_RealBuffer[MAX_OUTPUT_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; float Cldfb_ImagBuffer[MAX_OUTPUT_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; @@ -8214,7 +8219,12 @@ static ivas_error renderSbaToMultiBinauralCldfb( input_sba *sbaInput, Cldfb_ImagBuffer, Cldfb_Out_Real, Cldfb_Out_Imag, - low_res_pre_rend_rot ); + low_res_pre_rend_rot +#ifdef API_5MS + , + num_subframes +#endif + ); return IVAS_ERR_OK; } @@ -8240,7 +8250,12 @@ static ivas_error renderSbaToSplitBinaural( renderSbaToMultiBinauralCldfb( sbaInput, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, - low_res_pre_rend_rot ); + low_res_pre_rend_rot +#ifdef API_5MS + , + MAX_PARAM_SPATIAL_SUBFRAMES +#endif + ); accumulateCLDFBArrayToBuffer( Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, &outAudio ); } else @@ -8284,7 +8299,12 @@ static ivas_error renderSbaToBinaural( renderSbaToMultiBinauralCldfb( sbaInput, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, - 0 ); + 0 +#ifdef API_5MS + , + 1 +#endif + ); accumulateCLDFBArrayToBuffer( Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, &outAudio ); } else -- GitLab From f62f56ba32928354f84033844756c1ab26babfe1 Mon Sep 17 00:00:00 2001 From: Treffehn Date: Mon, 14 Aug 2023 17:39:17 +0200 Subject: [PATCH 165/175] added include wmc_auto.h in ivas_osba_dec.c for smoke test --- lib_dec/ivas_osba_dec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index 95eb7ff72d..09bbeded78 100755 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -40,6 +40,7 @@ #ifdef DEBUGGING #include "debug.h" #endif +#include "wmc_auto.h" #ifdef SBA_AND_OBJECTS -- GitLab From 8334ffb06247fdc98b365cd5c8ca36f40dca5c8e Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Mon, 14 Aug 2023 18:18:47 +0200 Subject: [PATCH 166/175] - add renderer_fmt to external test output names too - whitepsace in renderer.c to align with main --- apps/renderer.c | 4 +++- lib_rend/ivas_splitRendererPre.c | 4 ---- tests/split_rendering/utils.py | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index ed81c78742..893ffbe1d4 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -2112,8 +2112,8 @@ int main( /* add zeros at the end to have equal length of synthesized signals */ #ifdef SPLIT_REND_WITH_HEAD_ROT if ( audioWriter != NULL ) -#endif { +#endif #ifdef API_5MS int32_t zerosPadded = 0; zeroPad *= outBuffer.config.numChannels; @@ -2136,7 +2136,9 @@ int main( exit( -1 ); } #endif +#ifdef SPLIT_REND_WITH_HEAD_ROT } +#endif if ( args.inConfig.numAudioObjects != 0 && ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL || args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) { diff --git a/lib_rend/ivas_splitRendererPre.c b/lib_rend/ivas_splitRendererPre.c index 817c4af3c0..2c5995a674 100644 --- a/lib_rend/ivas_splitRendererPre.c +++ b/lib_rend/ivas_splitRendererPre.c @@ -2209,12 +2209,8 @@ static ivas_error ivas_renderMultiTDBinToSplitBinaural( if ( useLc3plus ) { -#if 0 // def API_5MS - int32_t frame_size = hSplitBin->hLc3plusEnc->config.samplerate * codec_frame_size_ms / 1000; -#else /*this should always have the time resolution of pose correction MD. Note that this does not change frame size of LC3plus*/ int32_t frame_size = hSplitBin->hLc3plusEnc->config.samplerate / (int32_t) FRAMES_PER_SEC; -#endif for ( i = 0; i < num_poses * BINAURAL_CHANNELS; ++i ) { diff --git a/tests/split_rendering/utils.py b/tests/split_rendering/utils.py index 2a2df864fc..f0d8bbfd71 100644 --- a/tests/split_rendering/utils.py +++ b/tests/split_rendering/utils.py @@ -158,7 +158,7 @@ def run_external_split_rendering( with TemporaryDirectory() as tmp_dir: tmp_dir = Path(tmp_dir) - test_file_stem = f"{in_fmt}_{pre_trajectory.stem}_split_ext_{post_trajectory.stem}__config_{render_config.stem}" + test_file_stem = f"{in_fmt}_{renderer_fmt}_{pre_trajectory.stem}_split_ext_{post_trajectory.stem}__config_{render_config.stem}" if plc_error_pattern: test_file_stem += f"_plc_{plc_error_pattern.stem}" -- GitLab From d72c441941c8b37ac8852dea59cdd3c7729aca96 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Mon, 14 Aug 2023 22:38:33 +0200 Subject: [PATCH 167/175] [cleanup] remove some hardcoded values --- lib_rend/ivas_splitRendererPre.c | 27 +++++++++++++++++++++++---- lib_rend/lib_rend.c | 6 ++++-- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/lib_rend/ivas_splitRendererPre.c b/lib_rend/ivas_splitRendererPre.c index 2c5995a674..f5ef671894 100644 --- a/lib_rend/ivas_splitRendererPre.c +++ b/lib_rend/ivas_splitRendererPre.c @@ -2329,7 +2329,19 @@ static ivas_error ivas_renderMultiTDBinToSplitBinaural( } /*zero pad*/ - bit_len = SplitRendBitRate / FRAMES_PER_SEC; +#ifdef API_5MS + if ( pcm_out ) + { +#endif + bit_len = SplitRendBitRate / FRAMES_PER_SEC; +#ifdef API_5MS + } + else + { + bit_len = SplitRendBitRate * codec_frame_size_ms / 1000; + } +#endif + while ( pBits->bits_written < bit_len ) { ivas_split_rend_bitstream_write_int32( pBits, (int32_t) 0, 1 ); @@ -2561,9 +2573,16 @@ ivas_error ivas_renderMultiBinToSplitBinaural( /*zero pad*/ /*TODO: do this inside the LCLD ENC codec */ #ifdef API_5MS - bit_len = SplitRendBitRate * codec_frame_size_ms / 1000; -#else - bit_len = SplitRendBitRate / FRAMES_PER_SEC; + if ( pcm_out ) + { +#endif + bit_len = SplitRendBitRate / FRAMES_PER_SEC; +#ifdef API_5MS + } + else + { + bit_len = SplitRendBitRate * codec_frame_size_ms / 1000; + } #endif while ( pBits->bits_written < bit_len ) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index db1df0f758..2529e8cf84 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -8253,7 +8253,8 @@ static ivas_error renderSbaToSplitBinaural( low_res_pre_rend_rot #ifdef API_5MS , - MAX_PARAM_SPATIAL_SUBFRAMES + getNumSubframesInBuffer( &outAudio, *sbaInput->base.ctx.pOutSampleRate ) + // MAX_PARAM_SPATIAL_SUBFRAMES #endif ); accumulateCLDFBArrayToBuffer( Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, &outAudio ); @@ -8302,7 +8303,8 @@ static ivas_error renderSbaToBinaural( 0 #ifdef API_5MS , - 1 + getNumSubframesInBuffer( &outAudio, *sbaInput->base.ctx.pOutSampleRate ) + // 1 #endif ); accumulateCLDFBArrayToBuffer( Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, &outAudio ); -- GitLab From ec9127709d32c66c284cc1e174fb9caa01e8743a Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Tue, 15 Aug 2023 08:08:48 +0200 Subject: [PATCH 168/175] [fix] compilation with API_5MS disabled --- apps/renderer.c | 14 +++++++------- lib_dec/ivas_binRenderer_internal.c | 9 ++++++++- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index 893ffbe1d4..9b0530a051 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1882,12 +1882,12 @@ int main( exit( -1 ); } +#ifdef API_5MS if ( ( error = IVAS_REND_FeedSplitBinauralBitstream( hIvasRend, splitBinIds[i], &bitsBuffer ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } -#ifdef API_5MS } #endif } @@ -2129,12 +2129,12 @@ int main( zeroPad -= zerosPadded; } #else - memset( outInt16Buffer, 0, zeroPad * outBuffer.config.numChannels * sizeof( int16_t ) ); - if ( ( error = AudioFileWriter_write( audioWriter, outInt16Buffer, zeroPad * outBuffer.config.numChannels ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nOutput audio file writer error\n" ); - exit( -1 ); - } + memset( outInt16Buffer, 0, zeroPad * outBuffer.config.numChannels * sizeof( int16_t ) ); + if ( ( error = AudioFileWriter_write( audioWriter, outInt16Buffer, zeroPad * outBuffer.config.numChannels ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nOutput audio file writer error\n" ); + exit( -1 ); + } #endif #ifdef SPLIT_REND_WITH_HEAD_ROT } diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index 1561688aaf..74e10aff54 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -2149,7 +2149,14 @@ void ivas_rend_CldfbMultiBinRendProcess( float Cldfb_ImagBuffer_Binaural[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; #endif - for ( sf_idx = 0; sf_idx < num_subframes; sf_idx++ ) + for ( sf_idx = 0; sf_idx < +#ifdef API_5MS + num_subframes +#else + MAX_PARAM_SPATIAL_SUBFRAMES +#endif + ; + sf_idx++ ) { for ( slot_idx = 0; slot_idx < MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ ) { -- GitLab From 176995078d0b46a2762cccbf3cd7499c164198bb Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Tue, 15 Aug 2023 09:15:34 +0200 Subject: [PATCH 169/175] align differences to main --- apps/decoder.c | 1 + lib_rend/ivas_splitRenderer_utils.c | 12 ++++----- lib_rend/lib_rend.c | 38 +++++++++++------------------ 3 files changed, 21 insertions(+), 30 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index c7b55ad0fd..109e9e86e7 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -738,6 +738,7 @@ int main( goto cleanup; } } + /*------------------------------------------------------------------------------------------* * Load custom loudspeaker layout data *------------------------------------------------------------------------------------------*/ diff --git a/lib_rend/ivas_splitRenderer_utils.c b/lib_rend/ivas_splitRenderer_utils.c index 309dc33c0b..0f40e1a1af 100644 --- a/lib_rend/ivas_splitRenderer_utils.c +++ b/lib_rend/ivas_splitRenderer_utils.c @@ -469,9 +469,9 @@ int32_t ivas_get_lc3plus_bitrate( const int32_t SplitRendBitRate, IVAS_SPLIT_REN { if ( poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) { - int32_t inBandMdBps = (int32_t) ( 8 * 1000 / + int32_t inBandMdBps = (int32_t) ( 8 * #ifdef API_5MS - split_prerender_frame_size_ms + 1000 / split_prerender_frame_size_ms #else FRAMES_PER_SEC #endif @@ -570,13 +570,13 @@ int32_t ivas_get_lc3plus_size_from_id( const int8_t SplitRendBitRateId, IVAS_SPL ); /* Return size in bytes */ - return (int32_t) ( bitrate * + return (int32_t) ( bitrate #ifdef API_5MS - split_prerender_frame_size_ms + * split_prerender_frame_size_ms / 1000 #else - FRAMES_PER_SEC + / FRAMES_PER_SEC #endif - / 1000 / 8 ); + / 8 ); } ivas_error ivas_split_rend_validate_config( const IVAS_SPLIT_REND_CONFIG_DATA *pSplitRendConfig, const int16_t is_pcm_out ) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 2529e8cf84..b6ea24d3d0 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -217,8 +217,10 @@ typedef struct input_base base; SPLIT_POST_REND_WRAPPER splitPostRendWrapper; float *bufferData; +#ifdef API_5MS int16_t numCachedSamples; /* Number of decoded samples in bufferData that have not yet been played out */ IVAS_REND_BitstreamBuffer *hBits; +#endif } input_split_post_rend; #endif @@ -2871,7 +2873,9 @@ static ivas_error setRendInputActiveSplitPostRend( MAX_BIN_BUFFER_LENGTH #endif ); +#ifdef API_5MS inputSplitPostRend->numCachedSamples = 0; +#endif if ( ( error = updateSplitPostRendPanGains( inputSplitPostRend, outConfig, hRendCfg ) ) != IVAS_ERR_OK ) { @@ -3380,6 +3384,7 @@ static DecoderDummy *initDecoderDummy( decDummy->hHeadTrackData->Quaternions[i].y = 0.0f; decDummy->hHeadTrackData->Quaternions[i].z = 0.0f; } + decDummy->hHeadTrackData->num_quaternions = 0; #endif decDummy->hHeadTrackData->lrSwitchInterpVal = 0.0f; decDummy->hHeadTrackData->lrSwitchedCurrent = 0; @@ -5965,7 +5970,10 @@ static ivas_error rotateFrameSba( #else int16_t subframe_idx, subframe_len; #endif - float *readPtr, *writePtr; +#ifdef API_5MS + float *readPtr; +#endif + float *writePtr; rotation_matrix Rmat; float tmpRot[2 * HEADROT_ORDER + 1]; rotation_gains gains; @@ -6052,35 +6060,15 @@ static ivas_error rotateFrameSba( for ( m = m1; m < m2; m++ ) { -// sgi@bay sgi2tmu to be verified how to resolve this correctly -// <<<<<<< HEAD -// #ifdef API_5MS -// readPtr = getSmplPtr( inAudio, m, i ); -// /* crossfade with previous rotation gains */ -// tmpRot[n - m1] += crossfade[i] * gains[n][m] * ( *readPtr ) + -// ( 1 - crossfade[i] ) * gains_prev[n][m] * ( *readPtr ); -// #else -// readPtr = getSmplPtr( inAudio, m, subframe_idx * subframe_len + i ); -// /* crossfade with previous rotation gains */ -// tmpRot[n - m1] += headRotData->crossfade[i] * gains[n][m] * ( *readPtr ) + -// ( 1 - headRotData->crossfade[i] ) * gains_prev[n][m] * ( *readPtr ); -// #endif -// ======= -// val = inAudio.data[m * inAudio.config.numSamplesPerChannel + idx]; -// /* crossfade with previous rotation gains */ -// tmpRot[n - m1] += ( cf * gains[n][m] * val + oneminuscf * gains_prev[n][m] * val ); -// >>>>>>> main -// tmp merge: #ifdef API_5MS readPtr = getSmplPtr( inAudio, m, i ); /* crossfade with previous rotation gains */ tmpRot[n - m1] += crossfade[i] * gains[n][m] * ( *readPtr ) + ( 1 - crossfade[i] ) * gains_prev[n][m] * ( *readPtr ); #else - readPtr = getSmplPtr( inAudio, m, subframe_idx * subframe_len + i ); + val = inAudio.data[m * inAudio.config.numSamplesPerChannel + idx]; /* crossfade with previous rotation gains */ - tmpRot[n - m1] += headRotData->crossfade[i] * gains[n][m] * ( *readPtr ) + - ( 1 - headRotData->crossfade[i] ) * gains_prev[n][m] * ( *readPtr ); + tmpRot[n - m1] += ( cf * gains[n][m] * val + oneminuscf * gains_prev[n][m] * val ); #endif // merge end } @@ -6522,6 +6510,9 @@ static ivas_error renderIsmToSplitBinaural( input_ism *ismInput, const IVAS_REND_AudioBuffer outAudio ) { +#ifndef API_5MS + int32_t i; +#endif ivas_error error; float tmpProcessing[MAX_NUM_OBJECTS][L_FRAME48k]; int16_t pos_idx; @@ -6531,7 +6522,6 @@ static ivas_error renderIsmToSplitBinaural( IVAS_QUATERNION originalHeadRot; #else IVAS_QUATERNION originalHeadRot[MAX_PARAM_SPATIAL_SUBFRAMES]; - int16_t i; #endif float tmpBinaural[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][L_FRAME48k]; int16_t output_frame = ismInput->base.inputBuffer.config.numSamplesPerChannel; -- GitLab From 2e3b32258897eaf032d1bb96413cb73459ace1da Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Tue, 15 Aug 2023 16:53:44 +0200 Subject: [PATCH 170/175] fix for split rendering with pcm (probably not the full picture yet) --- apps/renderer.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index 9b0530a051..679a238ce4 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -813,7 +813,8 @@ int main( IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; #endif #ifdef API_5MS - bool splitBinNeedsNewFrame = true; + bool splitBinNeedsNewAudioFrame = true; + bool splitBinNeedsNewBitstreamFrame = true; #endif #ifdef WMOPS @@ -1497,13 +1498,26 @@ int main( num_in_channels = inBuffer.config.numChannels; #ifdef API_5MS const bool isCurrentFrameMultipleOf20ms = !args.framing_5ms || frame % 4 == 0; + + if ( ( hSplitRendFileReadWrite != NULL ) && is_split_post_rend_mode( &args ) ) + { + if ( args.inConfig.binBuses[0].audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) + { + /* this is always 20 ms*/ + splitBinNeedsNewBitstreamFrame = isCurrentFrameMultipleOf20ms; + } + else + { + splitBinNeedsNewBitstreamFrame = splitBinNeedsNewAudioFrame; + } + } #endif #ifdef SPLIT_REND_WITH_HEAD_ROT numSamplesRead = 0; if ( ( hSplitRendFileReadWrite != NULL ) && is_split_post_rend_mode( &args ) #ifdef API_5MS - && splitBinNeedsNewFrame + && splitBinNeedsNewBitstreamFrame #endif ) { @@ -1544,7 +1558,7 @@ int main( if ( numSamplesRead == 0 #ifdef API_5MS - && splitBinNeedsNewFrame + && splitBinNeedsNewAudioFrame #endif ) { @@ -1687,7 +1701,7 @@ int main( /* Read from split renderer bfi file if specified */ if ( splitRendBFIReader != NULL #ifdef API_5MS - && splitBinNeedsNewFrame + && splitBinNeedsNewBitstreamFrame #endif ) { @@ -1866,7 +1880,7 @@ int main( for ( i = 0; i < args.inConfig.numBinBuses; ++i ) { #ifdef API_5MS - if ( splitBinNeedsNewFrame ) + if ( splitBinNeedsNewAudioFrame ) { #endif if ( ( error = IVAS_REND_GetInputNumChannels( hIvasRend, splitBinIds[i], &numChannels ) ) != IVAS_ERR_OK ) @@ -1883,6 +1897,9 @@ int main( } #ifdef API_5MS + } + if ( splitBinNeedsNewBitstreamFrame ) + { if ( ( error = IVAS_REND_FeedSplitBinauralBitstream( hIvasRend, splitBinIds[i], &bitsBuffer ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); @@ -1896,7 +1913,7 @@ int main( #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT if ( args.inConfig.numBinBuses != 0 ) { - if ( ( error = IVAS_REND_GetSplitBinauralSamples( hIvasRend, outBuffer, &splitBinNeedsNewFrame ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_REND_GetSplitBinauralSamples( hIvasRend, outBuffer, &splitBinNeedsNewAudioFrame ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); exit( -1 ); -- GitLab From 0801089fb6eaaaf1104829afad9bc2e46cc6298c Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Wed, 16 Aug 2023 17:39:10 +0200 Subject: [PATCH 171/175] fix for 0DoF LCLD and fix compilation with inactive defines --- apps/decoder.c | 65 +++++++++++++--- apps/renderer.c | 6 +- lib_com/common_api_types.h | 3 + lib_com/options.h | 1 + lib_dec/ivas_init_dec.c | 5 ++ lib_dec/ivas_stat_dec.h | 1 + lib_dec/lib_dec.c | 151 ++++++++++++++++++++++++------------- lib_dec/lib_dec.h | 3 +- lib_rend/lib_rend.c | 93 ++++++++++------------- 9 files changed, 210 insertions(+), 118 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 109e9e86e7..2df606e3e9 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -2232,7 +2232,7 @@ static ivas_error decodeG192( fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } -#if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) +#if 0 // defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) int16_t enable5ms; IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ); arg.enable5ms = enable5ms; @@ -2274,7 +2274,7 @@ static ivas_error decodeG192( goto cleanup; } -#if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) +#if 0 // defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) int16_t enable5ms; IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ); arg.enable5ms = enable5ms; @@ -2348,12 +2348,13 @@ static ivas_error decodeG192( } } -#ifdef SPLIT_REND_WITH_HEAD_ROT +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT if ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED || arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_PCM ) { error = IVAS_DEC_GetSplitBinauralBitstream( hIvasDec, (void *) ( pcmBuf + nOutChannels * nSamplesRendered ), &splitRendBits, + nSamplesToRender, &nSamplesRendered_loop, &needNewFrame ); nSamplesRendered += nSamplesRendered_loop; @@ -2434,6 +2435,45 @@ static ivas_error decodeG192( { goto cleanup; } +#if defined( SPLIT_REND_WITH_HEAD_ROT ) && defined( API_5MS ) + int16_t enable5ms; + IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ); + /* we assumed 5ms but are really 20ms, we need to throw away some head and ext positions */ + if ( !enable5ms && arg.enable5ms ) + { + /* Skip over 3 following entries in file - they are given on 5ms grid */ + if ( arg.enableExternalOrientation ) + { + IVAS_QUATERNION Quaternion; + int8_t enableHeadRotation; + int8_t enableExternalOrientation; + int8_t enableRotationInterpolation; + int16_t numFramesToTargetOrientation; + for ( i = 0; i < 3; ++i ) + { + if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &Quaternion, &enableHeadRotation, &enableExternalOrientation, &enableRotationInterpolation, &numFramesToTargetOrientation ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error in External Orientation File Reading: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + } + } + if ( arg.enableHeadRotation ) + { + IVAS_QUATERNION Quaternion; + /* Skip over 3 following head positions - they are given on 5ms grid */ + for ( i = 0; i < 3; ++i ) + { + if ( ( error = HeadRotationFileReading( headRotReader, &Quaternion, &Pos ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + } + } + } + arg.enable5ms = enable5ms; +#endif } else { @@ -2447,16 +2487,19 @@ static ivas_error decodeG192( #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( hSplitRendFileReadWrite != NULL ) && ( arg.outputFormat == IVAS_DEC_OUTPUT_SPLIT_BINAURAL_CODED ) ) { - if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, splitRendBits.bits_buf, &splitRendBits.bits_read, &splitRendBits.bits_written, - splitRendBits.codec, splitRendBits.pose_correction + if ( splitRendBits.bits_written > 0 ) + { + if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, splitRendBits.bits_buf, &splitRendBits.bits_read, &splitRendBits.bits_written, + splitRendBits.codec, splitRendBits.pose_correction #ifdef API_5MS - , - splitRendBits.codec_frame_size_ms + , + splitRendBits.codec_frame_size_ms #endif - ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nUnable to write to bitstream file!\n" ); - goto cleanup; + ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nUnable to write to bitstream file!\n" ); + goto cleanup; + } } } else diff --git a/apps/renderer.c b/apps/renderer.c index 679a238ce4..ddafcaf5ec 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -812,7 +812,7 @@ int main( #ifndef API_5MS IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; #endif -#ifdef API_5MS +#if defined( API_5MS ) && defined( SPLIT_REND_WITH_HEAD_ROT ) bool splitBinNeedsNewAudioFrame = true; bool splitBinNeedsNewBitstreamFrame = true; #endif @@ -1499,6 +1499,7 @@ int main( #ifdef API_5MS const bool isCurrentFrameMultipleOf20ms = !args.framing_5ms || frame % 4 == 0; +#ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( hSplitRendFileReadWrite != NULL ) && is_split_post_rend_mode( &args ) ) { if ( args.inConfig.binBuses[0].audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) @@ -1512,6 +1513,7 @@ int main( } } #endif +#endif #ifdef SPLIT_REND_WITH_HEAD_ROT numSamplesRead = 0; @@ -1557,7 +1559,7 @@ int main( #endif if ( numSamplesRead == 0 -#ifdef API_5MS +#if defined( API_5MS ) && defined( SPLIT_REND_WITH_HEAD_ROT ) && splitBinNeedsNewAudioFrame #endif ) diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index d15364e70c..9c359c6faa 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -50,6 +50,9 @@ #define IVAS_CLDFB_NO_CHANNELS_MAX ( 60 ) #define IVAS_MAX_INPUT_LFE_CHANNELS 4 +#ifdef API_5MS +#define RENDERER_SUBFRAMES_PER_FRAME 4 +#endif #ifndef API_5MS #define RENDERER_HEAD_POSITIONS_PER_FRAME 4 #endif diff --git a/lib_com/options.h b/lib_com/options.h index 9cbf054c58..6a871d8195 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -169,6 +169,7 @@ #define LIB_REND_FIX_HRTFPARAMBIN_MEMLEAK #define FIX_CQMFPREDDEC_FREE /* FhG: avoid double free / free of NULL in DeletePredictionDecoder() */ #define FIX_PLANAR_SBA_JBM_RS +#define FIX_RENDMC_LOCAL_ORIENTATION /* ### API_5MS switches ### */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 9c271f742e..f818ac7de0 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -261,6 +261,10 @@ ivas_error ivas_dec_init_split_rend( { st_ivas->hDecoderConfig->Opt_5ms = true; } + else + { + st_ivas->hDecoderConfig->Opt_5ms = false; + } #else ivas_split_rend_choose_default_codec( &st_ivas->hRenderConfig->split_rend_config.codec, ( cldfb_in == 0 ), pcm_out ); #endif @@ -2534,6 +2538,7 @@ void ivas_initialize_handles_dec( #ifdef API_5MS st_ivas->splitBinRend.tdDataOut = NULL; st_ivas->splitBinRend.numTdSamplesPerChannelCached = 0; + st_ivas->splitBinRend.numSamplesCollected = 0; #endif ivas_init_split_rend_handles( &st_ivas->splitBinRend.splitrend ); #endif diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index dac21d6a95..bf9dd9002f 100755 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -946,6 +946,7 @@ typedef struct #ifdef API_5MS float *tdDataOut; /*buffer to store TD data before binauralization*/ int16_t numTdSamplesPerChannelCached; + int16_t numSamplesCollected; #endif } IVAS_DEC_SPLIT_REND_WRAPPER; #endif diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index fd717895b8..c12878eb0e 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -709,7 +709,7 @@ ivas_error IVAS_DEC_EnableSplitRendering( hDecoderConfig = hIvasDec->st_ivas->hDecoderConfig; hDecoderConfig->Opt_Headrotation = 1; -#ifdef API_5MS_BASELINE +#if 0 // def API_5MS_BASELINE hDecoderConfig->Opt_5ms = false; #endif @@ -1065,7 +1065,7 @@ ivas_error IVAS_DEC_GetSamples( #ifdef API_5MS ivas_error IVAS_DEC_GetSamples( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - const int16_t nSamplesAsked, /* i: number of samples wanted by the caller */ + int16_t nSamplesAsked, /* i: number of samples wanted by the caller */ #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const IVAS_DEC_PCM_TYPE pcmType, /* i : type for the decoded PCM resolution */ void *pcmBuf, /* o : output synthesis signal */ @@ -1132,6 +1132,9 @@ ivas_error IVAS_DEC_GetSamples( if ( !hIvasDec->isInitialized || hIvasDec->hasBeenFedFrame ) { /* setup */ +#if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT + int16_t enable5ms_old = hIvasDec->st_ivas->hDecoderConfig->Opt_5ms; +#endif if ( ( error = IVAS_DEC_Setup( hIvasDec, &l_ts, &nTransportChannels, &nOutChannels, &nSamplesRendered_loop, #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT pcmType, @@ -1146,6 +1149,17 @@ ivas_error IVAS_DEC_GetSamples( } #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT /* :TODO: change nSamplesAsked also if we are in 5ms 0dof split rendering... */ + if ( enable5ms_old != hIvasDec->st_ivas->hDecoderConfig->Opt_5ms ) + { + if ( enable5ms_old ) + { + nSamplesAsked *= MAX_PARAM_SPATIAL_SUBFRAMES; + } + else + { + nSamplesAsked /= MAX_PARAM_SPATIAL_SUBFRAMES; + } + } #endif } if ( !hIvasDec->st_ivas->hDecoderConfig->Opt_5ms ) @@ -1278,9 +1292,10 @@ ivas_error IVAS_DEC_GetSamples( ivas_error IVAS_DEC_GetSplitBinauralBitstream( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ void *pcmBuf_out, /* o : output synthesis signal for BINAURAL_SPLIT_PCM */ - IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode*/ - int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ - bool *needNewFrame /* indication that the decoder needs a new frame */ + IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode */ + const int16_t nSamplesAsked, + int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ + bool *needNewFrame /* indication that the decoder needs a new frame */ ) { Decoder_Struct *st_ivas; @@ -1307,10 +1322,13 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( output_config = st_ivas->hDecoderConfig->output_config; output_Fs = st_ivas->hDecoderConfig->output_Fs; numSamplesPerChannelToDecode = (int16_t) ( output_Fs / FRAMES_PER_SEC ); - + numSamplesPerChannelToDecode = nSamplesAsked; *needNewFrame = FALSE; hSplitBinRend = &st_ivas->splitBinRend; - ivas_set_split_rend_setup( hSplitBinRend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hCombinedOrientationData, hSplitRendBits ); + if ( hSplitBinRend->numTdSamplesPerChannelCached == 0 ) + { + ivas_set_split_rend_setup( hSplitBinRend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hCombinedOrientationData, hSplitRendBits ); + } numPoses = hSplitBinRend->splitrend.multiBinPoseData.num_poses; if ( hIvasDec->st_ivas->hRenderConfig->split_rend_config.codec == IVAS_SPLIT_REND_CODEC_LC3PLUS && @@ -1319,7 +1337,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( { numSamplesPerChannelToSplitEncode = (int16_t) ( output_Fs / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ); numSamplesPerChannelCacheSize = numSamplesPerChannelToDecode - numSamplesPerChannelToSplitEncode; - + hSplitRendBits->codec_frame_size_ms = 5; if ( hSplitBinRend->tdDataOut == NULL ) { /* Allocate enough space to save all decoded samples that will not be split encoded directly after decoding */ @@ -1334,6 +1352,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( { numSamplesPerChannelToSplitEncode = (int16_t) ( output_Fs / FRAMES_PER_SEC ); numSamplesPerChannelCacheSize = 0; + hSplitRendBits->codec_frame_size_ms = 20; } if ( output_config != AUDIO_CONFIG_BINAURAL_SPLIT_CODED && output_config != AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) @@ -1341,7 +1360,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( return IVAS_ERR_WRONG_PARAMS; } - if ( numSamplesPerChannelToDecode == numSamplesPerChannelToSplitEncode || hSplitBinRend->numTdSamplesPerChannelCached == 0 ) + if ( hSplitBinRend->numSamplesCollected < numSamplesPerChannelToSplitEncode ) { /* Decode and render */ error = IVAS_DEC_GetSamples( @@ -1351,10 +1370,34 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( pcmBuf, nOutSamples, needNewFrame ); + numSamplesPerChannelToDecode = *nOutSamples; if ( error != IVAS_ERR_OK ) { return error; } + if ( hIvasDec->st_ivas->hRenderConfig->split_rend_config.codec == IVAS_SPLIT_REND_CODEC_LC3PLUS && + ( hIvasDec->st_ivas->hRenderConfig->split_rend_config.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE || + hIvasDec->st_ivas->hRenderConfig->split_rend_config.dof == 0 ) ) + { + numSamplesPerChannelToSplitEncode = (int16_t) ( output_Fs / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ); + numSamplesPerChannelCacheSize = numSamplesPerChannelToDecode - numSamplesPerChannelToSplitEncode; + hSplitRendBits->codec_frame_size_ms = 5; + if ( hSplitBinRend->tdDataOut == NULL ) + { + /* Allocate enough space to save all decoded samples that will not be split encoded directly after decoding */ + hSplitBinRend->tdDataOut = malloc( numSamplesPerChannelCacheSize * BINAURAL_CHANNELS * numPoses * sizeof( float ) ); + if ( hSplitBinRend->tdDataOut == NULL ) + { + return IVAS_ERR_FAILED_ALLOC; + } + } + } + else + { + numSamplesPerChannelToSplitEncode = (int16_t) ( output_Fs / FRAMES_PER_SEC ); + numSamplesPerChannelCacheSize = 0; + hSplitRendBits->codec_frame_size_ms = 20; + } #ifdef DEBUGGING assert( numSamplesPerChannelToDecode == *nOutSamples ); #endif @@ -1372,8 +1415,9 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( } hSplitBinRend->numTdSamplesPerChannelCached = *nOutSamples - numSamplesPerChannelToSplitEncode; } + hSplitBinRend->numSamplesCollected += *nOutSamples; } - else + else if ( hSplitBinRend->tdDataOut != NULL ) { /* copy from cache */ assert( hSplitBinRend->tdDataOut != NULL ); @@ -1389,65 +1433,68 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( hSplitBinRend->numTdSamplesPerChannelCached -= numSamplesPerChannelToSplitEncode; } + if ( numSamplesPerChannelToSplitEncode == hSplitBinRend->numSamplesCollected ) /* change buffer layout */ - for ( i = 0; i < numSamplesPerChannelToSplitEncode; ++i ) { - for ( j = 0; j < BINAURAL_CHANNELS * numPoses; ++j ) + for ( i = 0; i < numSamplesPerChannelToSplitEncode; ++i ) { - output[j][i] = pcmBuf[i * BINAURAL_CHANNELS * numPoses + j]; + for ( j = 0; j < BINAURAL_CHANNELS * numPoses; ++j ) + { + output[j][i] = pcmBuf[i * BINAURAL_CHANNELS * numPoses + j]; + } } - } - for ( i = 0; i < BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES; ++i ) - { - pOutput[i] = output[i]; - } - max_band = (int16_t) ( ( BINAURAL_MAXBANDS * output_Fs ) / 48000 ); - pcm_out = ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0; - td_input = st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC; - - error = ivas_renderMultiBinToSplitBinaural( &hSplitBinRend->splitrend, - st_ivas->hHeadTrackData->Quaternion, - st_ivas->hRenderConfig->split_rend_config.splitRendBitRate, - st_ivas->hRenderConfig->split_rend_config.codec, + for ( i = 0; i < BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES; ++i ) + { + pOutput[i] = output[i]; + } + max_band = (int16_t) ( ( BINAURAL_MAXBANDS * output_Fs ) / 48000 ); + pcm_out = ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0; + td_input = st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC; + + error = ivas_renderMultiBinToSplitBinaural( &hSplitBinRend->splitrend, + st_ivas->hHeadTrackData->Quaternion, + st_ivas->hRenderConfig->split_rend_config.splitRendBitRate, + st_ivas->hRenderConfig->split_rend_config.codec, #ifdef API_5MS - st_ivas->hRenderConfig->split_rend_config.codec_frame_size_ms, + st_ivas->hRenderConfig->split_rend_config.codec_frame_size_ms, #endif - hSplitBinRend->hSplitRendBits, - hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural, - hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural, - max_band, + hSplitBinRend->hSplitRendBits, + hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural, + hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural, + max_band, #ifdef FIX_264_AUDIO_CHANNELS_TO_HEAP - pOutput, + pOutput, #else - output, + output, #endif - 1, - td_input, - pcm_out ); - if ( error != IVAS_ERR_OK ) - { - return error; - } + 1, + td_input, + pcm_out ); + if ( error != IVAS_ERR_OK ) + { + return error; + } - /* convert to int16 with limiting for BINAURAL_SPLIT_PCM */ - if ( pcm_out ) - { + /* convert to int16 with limiting for BINAURAL_SPLIT_PCM */ + if ( pcm_out ) + { #ifndef DISABLE_LIMITER - ivas_limiter_dec( st_ivas->hLimiter, pOutput, - st_ivas->hDecoderConfig->nchan_out, - numSamplesPerChannelToSplitEncode, st_ivas->BER_detect ); + ivas_limiter_dec( st_ivas->hLimiter, pOutput, + st_ivas->hDecoderConfig->nchan_out, + numSamplesPerChannelToSplitEncode, st_ivas->BER_detect ); #endif #ifdef DEBUGGING - st_ivas->noClipping += + st_ivas->noClipping += #endif - ivas_syn_output( pOutput, numSamplesPerChannelToSplitEncode, - st_ivas->hDecoderConfig->nchan_out, - (int16_t *) pcmBuf_out ); + ivas_syn_output( pOutput, numSamplesPerChannelToSplitEncode, + st_ivas->hDecoderConfig->nchan_out, + (int16_t *) pcmBuf_out ); + } + hSplitBinRend->numSamplesCollected = 0; + free( st_ivas->splitBinRend.hMultiBinCldfbData ); } - free( st_ivas->splitBinRend.hMultiBinCldfbData ); - return error; } #endif diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index aaab4f8a1f..389eed00f0 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -198,7 +198,7 @@ ivas_error IVAS_DEC_FeedFrame_Serial( ivas_error IVAS_DEC_GetSamples( #ifdef API_5MS IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - const int16_t nSamplesAsked, /* i: number of samples wanted by the caller */ + int16_t nSamplesAsked, /* i: number of samples wanted by the caller */ #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const IVAS_DEC_PCM_TYPE pcmType, /* i : type for the decoded PCM resolution */ void *pcmBuf, /* o : output synthesis signal */ @@ -223,6 +223,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ void *pcmBuf_out, /* o : output synthesis signal for BINAURAL_SPLIT_PCM */ IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode */ + const int16_t nSamplesAsked, int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */ bool *needNewFrame /* indication that the decoder needs a new frame */ ); diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index b6ea24d3d0..95efe59467 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -5764,7 +5764,7 @@ static ivas_error chooseCrossfade( const IVAS_REND_HeadRotData *headRotData, int { return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "Only 5 and 20 ms framing is supported" ); } - + *pCrossfade = headRotData->crossfade_5ms; /* TODO cleanup to one crossfade only */ return IVAS_ERR_OK; } #endif @@ -5788,6 +5788,7 @@ static ivas_error rotateFrameMc( int16_t j; #ifdef API_5MS const float *crossfade; + int16_t subframe_idx, subframe_len, num_subframes; #else int16_t subframe_idx, subframe_len; #endif @@ -5846,7 +5847,13 @@ static ivas_error rotateFrameMc( gains[ch_in][ch_in] = 1.f; } -#ifndef API_5MS +#ifdef API_5MS + /* subframe loop */ + num_subframes = inAudio.config.numSamplesPerChannel / ( L_FRAME48k / RENDERER_SUBFRAMES_PER_FRAME ); + subframe_len = inAudio.config.numSamplesPerChannel / num_subframes; + for ( subframe_idx = 0; subframe_idx < num_subframes; subframe_idx++ ) + { +#else /* subframe loop */ subframe_len = inAudio.config.numSamplesPerChannel / RENDERER_HEAD_POSITIONS_PER_FRAME; for ( subframe_idx = 0; subframe_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; subframe_idx++ ) @@ -5862,7 +5869,7 @@ static ivas_error rotateFrameMc( /* fix compiling only, ToDo adapt ext renderer to 5ms */ Rmat[i][j] = ( *hCombinedOrientationData )->Rmat[i][j]; #else - Rmat[i][j] = ( *hCombinedOrientationData )->Rmat[subframe_idx][i][j]; + Rmat[i][j] = ( *hCombinedOrientationData )->Rmat[subframe_idx][i][j]; #endif } } @@ -5913,29 +5920,21 @@ static ivas_error rotateFrameMc( { for ( ch_in = 0; ch_in < nchan; ch_in++ ) { -#ifdef API_5MS - writePtr = getSmplPtr( outAudio, ch_out, 0 ); - readPtr = getSmplPtr( inAudio, ch_in, 0 ); + writePtr = getSmplPtr( outAudio, ch_out, subframe_idx * subframe_len ); + readPtr = getSmplPtr( inAudio, ch_in, subframe_idx * subframe_len ); /* crossfade with previous rotation gains */ - for ( i = 0; i < inAudio.config.numSamplesPerChannel; i++ ) + for ( i = 0; i < subframe_len; i++ ) { *writePtr++ += +#ifdef API_5MS /* :TODO: cleanup to one crossfade only */ ( *readPtr ) * ( ( 1 - crossfade[i] ) * gains_prev[ch_in][ch_out] ) + ( *readPtr ) * ( crossfade[i] * gains[ch_in][ch_out] ); - readPtr++; - } #else - writePtr = getSmplPtr( outAudio, ch_out, subframe_idx * subframe_len ); - readPtr = getSmplPtr( inAudio, ch_in, subframe_idx * subframe_len ); - /* crossfade with previous rotation gains */ - for ( i = 0; i < subframe_len; i++ ) - { - *writePtr++ += - ( *readPtr ) * ( ( 1 - headRotData->crossfade[i] ) * gains_prev[ch_in][ch_out] ) + - ( *readPtr ) * ( headRotData->crossfade[i] * gains[ch_in][ch_out] ); - readPtr++; - } + ( *readPtr ) * ( ( 1 - headRotData->crossfade[i] ) * gains_prev[ch_in][ch_out] ) + + ( *readPtr ) * ( headRotData->crossfade[i] * gains[ch_in][ch_out] ); #endif + readPtr++; + } } } @@ -5944,10 +5943,7 @@ static ivas_error rotateFrameMc( { mvr2r( gains[i], gains_prev[i], nchan ); } -#ifndef API_5MS } -#endif - pop_wmops(); return IVAS_ERR_OK; @@ -5967,9 +5963,9 @@ static ivas_error rotateFrameSba( int16_t shd_rot_max_order; #ifdef API_5MS const float *crossfade; -#else - int16_t subframe_idx, subframe_len; + int16_t num_subframes; #endif + int16_t subframe_idx, subframe_len; #ifdef API_5MS float *readPtr; #endif @@ -5978,10 +5974,9 @@ static ivas_error rotateFrameSba( float tmpRot[2 * HEADROT_ORDER + 1]; rotation_gains gains; ivas_error error; -#ifndef API_5MS int16_t idx; float val, cf, oneminuscf; -#endif + push_wmops( "rotateFrameSba" ); @@ -5997,7 +5992,13 @@ static ivas_error rotateFrameSba( return error; } -#ifndef API_5MS +#ifdef API_5MS + /* subframe loop */ + num_subframes = inAudio.config.numSamplesPerChannel / ( L_FRAME48k / RENDERER_SUBFRAMES_PER_FRAME ); + subframe_len = inAudio.config.numSamplesPerChannel / num_subframes; + for ( subframe_idx = 0; subframe_idx < num_subframes; subframe_idx++ ) + { +#else /* subframe loop */ subframe_len = inAudio.config.numSamplesPerChannel / RENDERER_HEAD_POSITIONS_PER_FRAME; for ( subframe_idx = 0; subframe_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; subframe_idx++ ) @@ -6019,7 +6020,7 @@ static ivas_error rotateFrameSba( /* fix compilation only, ToDo adapt ext renderer to 5ms */ Rmat[i][l] = ( *hCombinedOrientationData )->Rmat[i][l]; #else - Rmat[i][l] = ( *hCombinedOrientationData )->Rmat[subframe_idx][i][l]; + Rmat[i][l] = ( *hCombinedOrientationData )->Rmat[subframe_idx][i][l]; #endif } } @@ -6033,18 +6034,16 @@ static ivas_error rotateFrameSba( /* calculate ambisonics rotation matrices for the previous and current frames */ SHrotmatgen( gains, Rmat, shd_rot_max_order ); - -#ifdef API_5MS - for ( i = 0; i < inAudio.config.numSamplesPerChannel; i++ ) -#else - for ( i = 0; i < subframe_len; i++ ) -#endif + for ( i = 0; i < subframe_len; i++ ) { -#ifndef API_5MS idx = subframe_idx * subframe_len + i; +#ifdef API_5MS + cf = crossfade[i]; +#else cf = headRotData->crossfade[i]; - oneminuscf = 1 - cf; #endif + oneminuscf = 1 - cf; + /* As the rotation matrix becomes block diagonal in a SH basis, we can*/ /* apply each angular-momentum block individually to save complexity. */ @@ -6060,27 +6059,16 @@ static ivas_error rotateFrameSba( for ( m = m1; m < m2; m++ ) { -#ifdef API_5MS - readPtr = getSmplPtr( inAudio, m, i ); + val = inAudio.data[m * inAudio.config.numSamplesPerChannel + idx]; /* crossfade with previous rotation gains */ - tmpRot[n - m1] += crossfade[i] * gains[n][m] * ( *readPtr ) + - ( 1 - crossfade[i] ) * gains_prev[n][m] * ( *readPtr ); -#else - val = inAudio.data[m * inAudio.config.numSamplesPerChannel + idx]; - /* crossfade with previous rotation gains */ - tmpRot[n - m1] += ( cf * gains[n][m] * val + oneminuscf * gains_prev[n][m] * val ); -#endif + tmpRot[n - m1] += ( cf * gains[n][m] * val + oneminuscf * gains_prev[n][m] * val ); // merge end } } /* write back the result */ for ( n = m1; n < m2; n++ ) { -#ifdef API_5MS - writePtr = getSmplPtr( outAudio, n, i ); -#else - writePtr = getSmplPtr( outAudio, n, subframe_idx * subframe_len + i ); -#endif + writePtr = getSmplPtr( outAudio, n, subframe_idx * subframe_len + i ); ( *writePtr ) = tmpRot[n - m1]; } m1 = m2; @@ -6108,9 +6096,7 @@ static ivas_error rotateFrameSba( { mvr2r( gains[i], gains_prev[i], HEADROT_SHMAT_DIM ); } -#ifndef API_5MS } -#endif pop_wmops(); @@ -7426,6 +7412,9 @@ static ivas_error renderMcToSplitBinaural( copyBufferTo2dArray( mcInput->base.inputBuffer, tmpRendBuffer ); /* Render */ +#ifdef FIX_RENDMC_LOCAL_ORIENTATION + pCombinedOrientationDataLocal = &combinedOrientationDataLocal; +#endif if ( ( error = ivas_td_binaural_renderer_ext( ( pos_idx == 0 ) ? &mcInput->tdRendWrapper : &mcInput->splitTdRendWrappers[pos_idx - 1], mcInput->base.inConfig, &mcInput->customLsInput, -- GitLab From 0ad00f5540c1582afd7aceb9d6cc58ba372a3e42 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Wed, 16 Aug 2023 17:44:57 +0200 Subject: [PATCH 172/175] clang-format --- lib_com/common_api_types.h | 2 +- lib_dec/ivas_jbm_dec.c | 14 +++++++------- lib_dec/lib_dec.c | 4 ++-- lib_rend/lib_rend.c | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index 9c359c6faa..4627bf8ca9 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -51,7 +51,7 @@ #define IVAS_MAX_INPUT_LFE_CHANNELS 4 #ifdef API_5MS -#define RENDERER_SUBFRAMES_PER_FRAME 4 +#define RENDERER_SUBFRAMES_PER_FRAME 4 #endif #ifndef API_5MS #define RENDERER_HEAD_POSITIONS_PER_FRAME 4 diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 0b4106961b..fe4cc89602 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1798,15 +1798,15 @@ int16_t ivas_jbm_dec_get_num_tc_channels( if ( st_ivas->ivas_format == SBA_FORMAT ) { if ( -#ifndef FIX_PLANAR_SBA_JBM_RS - ( st_ivas->sba_planar && num_tc >= 3 ) || - ( +#ifndef FIX_PLANAR_SBA_JBM_RS + ( st_ivas->sba_planar && num_tc >= 3 ) || + ( #endif - num_tc == 3 -#ifndef FIX_PLANAR_SBA_JBM_RS - ) + num_tc == 3 +#ifndef FIX_PLANAR_SBA_JBM_RS + ) #endif - ) + ) { num_tc++; } diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index c12878eb0e..18d6dee30d 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1064,8 +1064,8 @@ ivas_error IVAS_DEC_GetSamples( #endif #ifdef API_5MS ivas_error IVAS_DEC_GetSamples( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - int16_t nSamplesAsked, /* i: number of samples wanted by the caller */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + int16_t nSamplesAsked, /* i: number of samples wanted by the caller */ #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const IVAS_DEC_PCM_TYPE pcmType, /* i : type for the decoded PCM resolution */ void *pcmBuf, /* o : output synthesis signal */ diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 95efe59467..2a0d365995 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -5933,7 +5933,7 @@ static ivas_error rotateFrameMc( ( *readPtr ) * ( ( 1 - headRotData->crossfade[i] ) * gains_prev[ch_in][ch_out] ) + ( *readPtr ) * ( headRotData->crossfade[i] * gains[ch_in][ch_out] ); #endif - readPtr++; + readPtr++; } } } -- GitLab From d5ee7ad4af18eac77ef877d0a71c10a6370e1515 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Wed, 16 Aug 2023 23:48:20 +0200 Subject: [PATCH 173/175] clang-format and disable split rendering switch --- lib_com/common_api_types.h | 2 +- lib_com/options.h | 2 +- lib_dec/ivas_ism_dec.c | 8 ++-- lib_dec/ivas_jbm_dec.c | 2 +- lib_dec/ivas_masa_dec.c | 4 +- lib_dec/ivas_mct_dec.c | 4 +- lib_rend/ivas_dirac_dec_binaural_functions.c | 2 +- lib_rend/ivas_objectRenderer.c | 6 +-- lib_rend/ivas_splitRendererPost.c | 2 +- lib_rend/ivas_splitRenderer_utils.c | 2 +- lib_rend/lib_rend.c | 40 ++++++++++---------- 11 files changed, 37 insertions(+), 37 deletions(-) diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index 1870057f65..5f28e53ffe 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -58,7 +58,7 @@ #ifdef API_5MS #define RENDERER_SUBFRAMES_PER_FRAME 4 #endif -#define IVAS_MAX_PARAM_SPATIAL_SUBFRAMES 4 +#define IVAS_MAX_PARAM_SPATIAL_SUBFRAMES 4 #ifndef API_5MS #define RENDERER_HEAD_POSITIONS_PER_FRAME 4 // ToDo: should it be harmonized with IVAS_MAX_PARAM_SPATIAL_SUBFRAMES? #endif diff --git a/lib_com/options.h b/lib_com/options.h index 58a1979449..52e1712993 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -168,7 +168,7 @@ /* ### API_5MS switches ### */ -#define SPLIT_REND_WITH_HEAD_ROT /* Dlb,FhG: Split Rendering contributions 21 and 35 */ +/*#define SPLIT_REND_WITH_HEAD_ROT*/ /* Dlb,FhG: Split Rendering contributions 21 and 35 */ #ifdef SPLIT_REND_WITH_HEAD_ROT #define SPLIT_REND_PRED_QUANT_63_PNTS #define SPLIT_REND_WITH_HEAD_ROT_PARAMBIN /* Nokia: Issue 623: Split rendering support for parambin renderer */ diff --git a/lib_dec/ivas_ism_dec.c b/lib_dec/ivas_ism_dec.c index 6479ce2cd6..1e90079203 100644 --- a/lib_dec/ivas_ism_dec.c +++ b/lib_dec/ivas_ism_dec.c @@ -488,9 +488,9 @@ ivas_error ivas_ism_dec_config( { if ( ( error = ivas_ism_bitrate_switching_dec( st_ivas, nchan_transport_old, last_ism_mode, nSamplesRendered, #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT - pcm_resolution, + pcm_resolution, #endif - data ) ) != IVAS_ERR_OK ) + data ) ) != IVAS_ERR_OK ) { return error; } @@ -515,9 +515,9 @@ ivas_error ivas_ism_dec_config( { if ( ( error = ivas_ism_bitrate_switching_dec( st_ivas, nchan_transport_old, last_ism_mode, nSamplesRendered, #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT - pcm_resolution, + pcm_resolution, #endif - data ) ) != IVAS_ERR_OK ) + data ) ) != IVAS_ERR_OK ) { return error; } diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index a2d25159d8..1d8e5fb3cc 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -802,7 +802,7 @@ ivas_error ivas_jbm_dec_render( const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #else - int16_t *data /* o : output synthesis signal */ + int16_t *data /* o : output synthesis signal */ #endif ) { diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index e9378caf51..ba87227569 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -1241,9 +1241,9 @@ ivas_error ivas_masa_dec_reconfigure( uint16_t *nSamplesRendered, /* o : number of samples flushed from the previous frame (JBM) */ #if defined API_5MS && defined SPLIT_REND_WITH_HEAD_ROT const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ - void *data /* o : flushed PCM samples */ + void *data /* o : flushed PCM samples */ #else - int16_t *data /* o : flushed PCM samples */ + int16_t *data /* o : flushed PCM samples */ #endif ) { diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index de1aeb5712..0271035526 100644 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -638,7 +638,7 @@ ivas_error ivas_mc_dec_config( const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #else - int16_t *data /* o : output synthesis signal */ + int16_t *data /* o : output synthesis signal */ #endif ) { @@ -697,7 +697,7 @@ static ivas_error ivas_mc_dec_reconfig( const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ #else - int16_t *data /* o : output synthesis signal */ + int16_t *data /* o : output synthesis signal */ #endif ) { diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index 5e6fe18504..0499316404 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -895,7 +895,7 @@ static void ivas_dirac_dec_binaural_internal( #else hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0, #endif - st_ivas->hMasaIsmData ); + st_ivas->hMasaIsmData ); #endif if ( config_data.ivas_format == ISM_FORMAT ) diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 1a463e55d1..d44b484cac 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -651,10 +651,10 @@ ivas_error ivas_td_binaural_renderer_ext( const REVERB_HANDLE hReverb, /* i : Reverberator handle */ const int16_t ism_md_subframe_update_ext, /* i : Metadata Delay in subframes to sync with audio delay */ #ifdef API_5MS - const int32_t output_Fs, /* i : output sampling rate */ + const int32_t output_Fs, /* i : output sampling rate */ #endif - const int16_t output_frame, /* i : output frame length */ - float output[][L_FRAME48k] /* i/o: SCE channels / Binaural synthesis */ + const int16_t output_frame, /* i : output frame length */ + float output[][L_FRAME48k] /* i/o: SCE channels / Binaural synthesis */ ) { ISM_METADATA_FRAME hIsmMetaDataFrame; diff --git a/lib_rend/ivas_splitRendererPost.c b/lib_rend/ivas_splitRendererPost.c index 658a08f24f..9a3d6593d1 100644 --- a/lib_rend/ivas_splitRendererPost.c +++ b/lib_rend/ivas_splitRendererPost.c @@ -1654,7 +1654,7 @@ void ivas_SplitRenderer_PostRenderer( #ifdef API_5MS &Quaternion_act, #else - &Quaternions_act[sf_idx], + &Quaternions_act[sf_idx], #endif interp_yaw_pose_idx, interp_pitch_pose_idx, diff --git a/lib_rend/ivas_splitRenderer_utils.c b/lib_rend/ivas_splitRenderer_utils.c index 57090f1026..edd765f972 100644 --- a/lib_rend/ivas_splitRenderer_utils.c +++ b/lib_rend/ivas_splitRenderer_utils.c @@ -1153,7 +1153,7 @@ ivas_split_rend_choose_default_codec( { *pCodec = IVAS_SPLIT_REND_CODEC_NONE; } -#ifdef API_5MS +#ifdef API_5MS if ( *pCodec_frame_size_ms == 0 ) /* codec frame size hasn't been set yet - use default for current configuration */ { switch ( *pCodec ) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 1d2183e2b3..79d6f3c988 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -8988,7 +8988,7 @@ static ivas_error renderInputMasa( != outAudio.config.numSamplesPerChannel ) && ( outConfig != AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) && ( outConfig != AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) #else - if ( masaInput->base.numNewSamplesPerChannel != outAudio.config.numSamplesPerChannel ) + if ( masaInput->base.numNewSamplesPerChannel != outAudio.config.numSamplesPerChannel ) #endif { return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "Mismatch between the number of input samples vs number of requested output samples - currently not allowed" ); @@ -9080,17 +9080,17 @@ static ivas_error renderActiveInputsMasa( pCurrentInput->decDummy->hHeadTrackData->Quaternion = hIvasRend->headRotData.headPosition; pCurrentInput->decDummy->hHeadTrackData->Pos = hIvasRend->headRotData.Pos; #else - for ( sf_idx = 0; sf_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; ++sf_idx ) - { + for ( sf_idx = 0; sf_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; ++sf_idx ) + { #ifdef API_5MS - /* fix compilation only, ToDo adapt ext renderer to 5ms */ - pCurrentInput->decDummy->hHeadTrackData->Quaternion = hIvasRend->headRotData.headPositions[sf_idx]; - pCurrentInput->decDummy->hHeadTrackData->Pos = hIvasRend->headRotData.Pos[sf_idx]; + /* fix compilation only, ToDo adapt ext renderer to 5ms */ + pCurrentInput->decDummy->hHeadTrackData->Quaternion = hIvasRend->headRotData.headPositions[sf_idx]; + pCurrentInput->decDummy->hHeadTrackData->Pos = hIvasRend->headRotData.Pos[sf_idx]; #else - pCurrentInput->decDummy->hHeadTrackData->Quaternions[sf_idx] = hIvasRend->headRotData.headPositions[sf_idx]; - pCurrentInput->decDummy->hHeadTrackData->Pos[sf_idx] = hIvasRend->headRotData.Pos[sf_idx]; + pCurrentInput->decDummy->hHeadTrackData->Quaternions[sf_idx] = hIvasRend->headRotData.headPositions[sf_idx]; + pCurrentInput->decDummy->hHeadTrackData->Pos[sf_idx] = hIvasRend->headRotData.Pos[sf_idx]; #endif - } + } #endif } @@ -9284,13 +9284,13 @@ ivas_error IVAS_REND_SetIsmMetadataDelay( static ivas_error getSamplesInternal( #else - /*-------------------------------------------------------------------* - * IVAS_REND_GetSamples() - * - * - *-------------------------------------------------------------------*/ +/*-------------------------------------------------------------------* + * IVAS_REND_GetSamples() + * + * + *-------------------------------------------------------------------*/ - ivas_error IVAS_REND_GetSamples( +ivas_error IVAS_REND_GetSamples( #endif IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ IVAS_REND_AudioBuffer outAudio /* i/o: buffer for output audio */ @@ -9320,7 +9320,7 @@ static ivas_error getSamplesInternal( if ( outAudio.config.numSamplesPerChannel <= 0 || ( MAX_BUFFER_LENGTH_PER_CHANNEL < outAudio.config.numSamplesPerChannel && outAudio.config.is_cldfb == 0 ) || ( ( MAX_BUFFER_LENGTH_PER_CHANNEL * cldfb2tdSampleFact ) < outAudio.config.numSamplesPerChannel && outAudio.config.is_cldfb == 1 ) ) #else - if ( outAudio.config.numSamplesPerChannel <= 0 || MAX_BUFFER_LENGTH_PER_CHANNEL < outAudio.config.numSamplesPerChannel ) + if ( outAudio.config.numSamplesPerChannel <= 0 || MAX_BUFFER_LENGTH_PER_CHANNEL < outAudio.config.numSamplesPerChannel ) #endif { return IVAS_ERR_INVALID_BUFFER_SIZE; @@ -9337,8 +9337,8 @@ static ivas_error getSamplesInternal( hIvasRend->outputConfig != AUDIO_CONFIG_BINAURAL_SPLIT_PCM && ( outAudio.config.numSamplesPerChannel * 1000 / cldfb2tdSampleFact ) != BINAURAL_RENDERING_FRAME_SIZE_MS * hIvasRend->sampleRateOut ) #else - if ( getAudioConfigType( hIvasRend->outputConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL && - outAudio.config.numSamplesPerChannel * 1000 != BINAURAL_RENDERING_FRAME_SIZE_MS * hIvasRend->sampleRateOut ) + if ( getAudioConfigType( hIvasRend->outputConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL && + outAudio.config.numSamplesPerChannel * 1000 != BINAURAL_RENDERING_FRAME_SIZE_MS * hIvasRend->sampleRateOut ) #endif { return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "Binaural rendering requires specific frame size" ); @@ -9462,9 +9462,9 @@ static ivas_error getSamplesInternal( #ifndef DISABLE_LIMITER #ifdef DEBUGGING - hIvasRend->numClipping += + hIvasRend->numClipping += #endif - limitRendererOutput( hIvasRend->hLimiter, outAudio.data, outAudio.config.numSamplesPerChannel, IVAS_LIMITER_THRESHOLD ); + limitRendererOutput( hIvasRend->hLimiter, outAudio.data, outAudio.config.numSamplesPerChannel, IVAS_LIMITER_THRESHOLD ); #endif #endif /* SPLIT_REND_WITH_HEAD_ROT */ -- GitLab From 78ca76b5f38122e9e2b516903910209ca66f2028 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Wed, 16 Aug 2023 23:51:51 +0200 Subject: [PATCH 174/175] remove duplicated renderer argument --- apps/renderer.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index 10387cfc3a..767f94661f 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -367,14 +367,6 @@ static const CmdLnParser_Option cliOptions[] = { .matchShort = "exof", .description = "External orientation trajectory file for simulation of external orientations", }, -#ifdef API_5MS - { - .id = CmdLnOptionId_framing5ms, - .match = "framing_5ms", - .matchShort = "fr5", - .description = "Process audio with 5 ms framing. Time resolution of metadata (e.g. ISM positions) remains unchanged w.r.t. 20 ms framing", - }, -#endif { .id = CmdLnOptionId_framing5ms, .match = "framing_5ms", -- GitLab From db5fb8db35687304f2310044b6a2c4005c64b7a8 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 17 Aug 2023 07:30:54 +0200 Subject: [PATCH 175/175] fix missing acceptance of one MASA_AND_OBJECTS occurence --- lib_dec/ivas_dirac_dec.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 6f5373d54a..c65c053a12 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1558,10 +1558,8 @@ void ivas_dirac_dec_set_md_map( ivas_jbm_dec_get_adapted_subframes( nCldfbTs, hSpatParamRendCom->subframe_nbslots, &hSpatParamRendCom->nb_subframes ); #ifdef API_5MS /* copy also to tc buffer */ -#ifdef MASA_AND_OBJECTS /* only for non-combined formats and combinded formats w/o discrete objects */ if ( st_ivas->ivas_format != MASA_ISM_FORMAT || st_ivas->ism_mode != ISM_MASA_MODE_DISC ) -#endif { st_ivas->hTcBuffer->nb_subframes = hSpatParamRendCom->nb_subframes; mvs2s( hSpatParamRendCom->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, hSpatParamRendCom->nb_subframes ); -- GitLab