diff --git a/lib_isar/lib_isar_post_rend.c b/lib_isar/lib_isar_post_rend.c index f25614b554cbec1c2e5fe70e1ebd12d0ba8874ea..e53dee1203c98101ac56ebee33d6a642f92aab38 100644 --- a/lib_isar/lib_isar_post_rend.c +++ b/lib_isar/lib_isar_post_rend.c @@ -1398,7 +1398,8 @@ static ivas_error splitBinLc3plusDecode( ISAR_SPLIT_POST_REND_WRAPPER *hSplitBin, ISAR_SPLIT_REND_BITS_HANDLE bits, float outputBuffer[BINAURAL_CHANNELS][L_FRAME48k], - ISAR_SPLIT_REND_POSE_CORRECTION_MODE pose_correction ) + ISAR_SPLIT_REND_POSE_CORRECTION_MODE pose_correction, + const int16_t SplitRendBFI ) { ivas_error error; float *channel_ptrs[MAX_HEAD_ROT_POSES * 2]; @@ -1407,23 +1408,33 @@ static ivas_error splitBinLc3plusDecode( push_wmops( "splitBinLc3plusDecode" ); assert( hSplitBin->hLc3plusDec != NULL ); - /* Find next byte boundary */ - while ( bits->bits_read % 8 != 0 ) + for ( int16_t i = 0; i < BINAURAL_CHANNELS * hSplitBin->multiBinPoseData.num_poses; ++i ) { - ++bits->bits_read; + channel_ptrs[i] = outputBuffer[i]; } - /* Read LC3plus bitstream size info */ - lc3plusBitrateId = ISAR_SPLIT_REND_BITStream_read_int32( bits, 8 ); - lc3plusBitstreamSize = isar_get_lc3plus_size_from_id( (int8_t) lc3plusBitrateId, pose_correction, (int16_t) ( hSplitBin->hLc3plusDec->config.ivas_frame_duration_us / 1000 ) ); - for ( int16_t i = 0; i < BINAURAL_CHANNELS; ++i ) + if ( SplitRendBFI == 0 ) { - channel_ptrs[i] = outputBuffer[i]; - } + /* Find next byte boundary */ + while ( bits->bits_read % 8 != 0 ) + { + ++bits->bits_read; + } + /* Read LC3plus bitstream size info */ + lc3plusBitrateId = ISAR_SPLIT_REND_BITStream_read_int32( bits, 8 ); + lc3plusBitstreamSize = isar_get_lc3plus_size_from_id( (int8_t) lc3plusBitrateId, pose_correction, (int16_t) ( hSplitBin->hLc3plusDec->config.ivas_frame_duration_us / 1000 ) ); - if ( ( error = IVAS_LC3PLUS_DEC_Decode( hSplitBin->hLc3plusDec, &bits->bits_buf[bits->bits_read / 8], lc3plusBitstreamSize, channel_ptrs ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_LC3PLUS_DEC_Decode( hSplitBin->hLc3plusDec, &bits->bits_buf[bits->bits_read / 8], lc3plusBitstreamSize, channel_ptrs ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else { - return error; + if ( ( error = IVAS_LC3PLUS_DEC_Conceal( hSplitBin->hLc3plusDec, channel_ptrs ) ) != IVAS_ERR_OK ) + { + return error; + } } pop_wmops(); @@ -1560,7 +1571,7 @@ static ivas_error renderSplitBinauralWithPostRot( } else { - if ( ( error = splitBinLc3plusDecode( hSplitBin, &bits, tmpCrendBuffer, bits.pose_correction ) ) != IVAS_ERR_OK ) + if ( ( error = splitBinLc3plusDecode( hSplitBin, &bits, tmpCrendBuffer, bits.pose_correction, SplitRendBFI ) ) != IVAS_ERR_OK ) { return error; } diff --git a/tests/split_rendering/constants.py b/tests/split_rendering/constants.py index 9ebb6d6fa1dbdc4627aab502aa0c5c3bd21b929d..2c2530d3c61acc7a9339c9af476ac51ffe28a034 100644 --- a/tests/split_rendering/constants.py +++ b/tests/split_rendering/constants.py @@ -87,7 +87,7 @@ RENDERER_CONFIGS_TO_TEST_OMASA = ( RENDERER_CONFIGS_TO_TEST_OSBA = ( RENDERER_CONFIGS_DEFAULT_CODEC + RENDERER_CONFIGS_LC3PLUS_CODEC ) -RENDERER_CONFIGS_TO_TEST_PLC = RENDERER_CONFIGS_FASTCONV_RENDERER +RENDERER_CONFIGS_TO_TEST_PLC = RENDERER_CONFIGS_FASTCONV_RENDERER + RENDERER_CONFIGS_LC3PLUS_CODEC """ Trajectories """ SPLIT_REND_HR_TRAJECTORIES_TO_TEST = [