diff --git a/apps/renderer.c b/apps/renderer.c index 0ab2de02166b6e7c4b34b7d160b5bc9ca4ba40a4..309ad2d43491a8000f15d3dc0cf3702eed04ed68 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -2686,7 +2686,9 @@ static void parseOption( case CmdLnOptionId_framing5ms: assert( numOptionValues == 0 ); args->framing_5ms = true; +#ifndef API_5MS fprintf( stderr, "Warning: this is a placeholder for 5ms framing.\n" ); +#endif break; case CmdLnOptionId_directivityPatternId: assert( numOptionValues <= RENDERER_MAX_ISM_INPUTS ); diff --git a/lib_com/options.h b/lib_com/options.h index b556709497b466555e18aa2946b71a595c918a24..a9861785f2595115d8c70c5eda10f313d7b30ef9 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -129,6 +129,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 limiter to help with debugging BE */ /*Split Rendering Debug switches*/ /*#define DBG_WAV_WRITER*/ /* add debugging function dbgwrite_wav() */ @@ -149,12 +150,16 @@ /* only BE switches wrt operation points tested in selection */ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ +#define API_5MS /* FhG: 5ms rendering capability */ + /*#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 */ -#define FIX_658_SPLIT_REND_MASA /*Dlb : Fix for issue 658, uninitialized memory access in MASA in Split rendering 0DOF mode*/ +#define FIX_658_SPLIT_REND_MASA /*Dlb : Fix for issue 658, uninitialized memory access in MASA in Split rendering 0DOF mode*/ +#define FIX_RENDMC_LOCAL_ORIENTATION +#define FIX_SPLITREND_MASA_PRERENDERING #define OSBA_SPLIT_RENDERING #endif diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index ae8b1f158ea7428297123efd4550c8686380a9cf..a2d0d198ac311f359e2c3a4972386f6818cf32d7 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -1173,7 +1173,9 @@ ivas_error ivas_dec( * - 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 419cd56195d6d26205c03339aefa0ff14a1ef60d..ce4052f2aa0070a5b5d24b8efcd213787e94657e 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1142,7 +1142,9 @@ 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 ); +#endif #ifdef DEBUGGING st_ivas->noClipping += @@ -1322,8 +1324,10 @@ ivas_error ivas_jbm_dec_flush_renderer( } } - /* Only write out the valid data*/ +/* Only write out the valid data*/ +#ifndef DISABLE_LIMITER ivas_limiter_dec( st_ivas->hLimiter, p_output, st_ivas->hDecoderConfig->nchan_out, *nSamplesRendered, st_ivas->BER_detect ); +#endif #ifdef DEBUGGING st_ivas->noClipping += diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index b378236c8991d74f65919a4c91110f590275d601..28573b20c71004d0aa7a87680d6c5043b1ecd943 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -846,16 +846,33 @@ static void ivas_dirac_dec_binaural_internal( ivas_omasa_preProcessStereoTransportsForMovedObjects( st_ivas, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, nBins, subframe ); } +#ifdef FIX_SPLITREND_MASA_PRERENDERING + pMultiBinPoseData = &st_ivas->hSplitBinRend.splitrend.multiBinPoseData; +#endif if ( hCombinedOrientationData ) { - for ( i = 0; i < 3; i++ ) +#ifdef FIX_SPLITREND_MASA_PRERENDERING + if ( pMultiBinPoseData != NULL && pMultiBinPoseData->num_poses > 1 ) { - for ( j = 0; j < 3; j++ ) + for ( i = 0; i < 3; i++ ) { - Rmat[i][j] = hCombinedOrientationData->Rmat[subframe][i][j]; + for ( j = 0; j < 3; j++ ) + { + Rmat[i][j] = hCombinedOrientationData->Rmat[0][i][j]; + } + } + } + else +#endif + { + for ( i = 0; i < 3; i++ ) + { + for ( j = 0; j < 3; j++ ) + { + Rmat[i][j] = hCombinedOrientationData->Rmat[subframe][i][j]; + } } } - if ( nchan_transport == 2 ) { #ifdef SPLIT_REND_WITH_HEAD_ROT_PARAMBIN diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 9380ac42605ff93159e8d4c1d9a2046565fb555a..8b80cc2f78886db8ea53a04615046fab2f3e8b6e 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -6855,6 +6855,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, @@ -8527,18 +8530,22 @@ 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 if ( hIvasRend->outputConfig == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || hIvasRend->outputConfig == AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) diff --git a/lib_util/split_render_file_read_write.c b/lib_util/split_render_file_read_write.c index 215d3d32c6bcc1cfd0c52f8bbc079a5c7c244f60..48fa80b2dc99203df917ab40b4c55387afecc715 100644 --- a/lib_util/split_render_file_read_write.c +++ b/lib_util/split_render_file_read_write.c @@ -243,6 +243,18 @@ ivas_error split_rend_write_bitstream_to_file( return IVAS_ERR_FAILED_FILE_WRITE; } + /* write dummy header field for framelength*/ +#ifdef API_5MS + /* Write frame size signalling */ + { + int16_t codec_frame_size_ms = 20; + 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 ) { @@ -330,6 +342,17 @@ ivas_error split_rend_read_bits_from_file( { return IVAS_ERR_FAILED_FILE_READ; } +#ifdef API_5MS + /* read frame size signalling */ + { + int16_t codec_frame_size_ms; + if ( fread( &codec_frame_size_ms, sizeof( codec_frame_size_ms ), 1, hSplitRendFileReadWrite->file ) != 1 ) + { + return IVAS_ERR_FAILED_FILE_WRITE; + } + } +#endif + /* write num bytes */ if ( fread( &bit_len, sizeof( int32_t ), 1, hSplitRendFileReadWrite->file ) != 1 )