From 0451dc0e986652ac36d9e2613265b25ccd0c27d5 Mon Sep 17 00:00:00 2001 From: hsd Date: Wed, 3 Apr 2024 16:29:43 +0200 Subject: [PATCH 1/6] Fix: Forward SplitRendBFI to lc3plus decoding routine and add LC3plus PLC test coverage --- lib_isar/lib_isar_post_rend.c | 37 +++++++++++++++++++----------- tests/split_rendering/constants.py | 2 +- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/lib_isar/lib_isar_post_rend.c b/lib_isar/lib_isar_post_rend.c index f25614b554..067262a310 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, SplitRendBFI, bits.pose_correction ) ) != IVAS_ERR_OK ) { return error; } diff --git a/tests/split_rendering/constants.py b/tests/split_rendering/constants.py index 9ebb6d6fa1..2c2530d3c6 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 = [ -- GitLab From d6bb1783c2aae62fe2231058d788bea9c0778980 Mon Sep 17 00:00:00 2001 From: hsd Date: Thu, 4 Apr 2024 11:24:23 +0200 Subject: [PATCH 2/6] fix - bfi parameter order was wrong, thx2tyagiri --- lib_isar/lib_isar_post_rend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_isar/lib_isar_post_rend.c b/lib_isar/lib_isar_post_rend.c index 067262a310..e53dee1203 100644 --- a/lib_isar/lib_isar_post_rend.c +++ b/lib_isar/lib_isar_post_rend.c @@ -1399,7 +1399,7 @@ static ivas_error splitBinLc3plusDecode( ISAR_SPLIT_REND_BITS_HANDLE bits, float outputBuffer[BINAURAL_CHANNELS][L_FRAME48k], ISAR_SPLIT_REND_POSE_CORRECTION_MODE pose_correction, - const int16_t SplitRendBFI) + const int16_t SplitRendBFI ) { ivas_error error; float *channel_ptrs[MAX_HEAD_ROT_POSES * 2]; @@ -1571,7 +1571,7 @@ static ivas_error renderSplitBinauralWithPostRot( } else { - if ( ( error = splitBinLc3plusDecode( hSplitBin, &bits, tmpCrendBuffer, SplitRendBFI, bits.pose_correction ) ) != IVAS_ERR_OK ) + if ( ( error = splitBinLc3plusDecode( hSplitBin, &bits, tmpCrendBuffer, bits.pose_correction, SplitRendBFI ) ) != IVAS_ERR_OK ) { return error; } -- GitLab From e60f620b553726c11a49b9d12fb30232e0cdacf4 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 5 Apr 2024 10:17:32 +0200 Subject: [PATCH 3/6] [tmp] modify .gitlab-ci.yml to trigger more tests --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 177d90e355..9b89409a51 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -255,7 +255,7 @@ stages: .rules-merge-request: extends: .rules-basis rules: - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" # only have MR pipelines for MRs to main + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' # && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" # only have MR pipelines for MRs to main - if: $CI_PIPELINE_SOURCE == 'push' when: never -- GitLab From dcf14ec52ee3f4c3987dafd647fd85a30ebc049f Mon Sep 17 00:00:00 2001 From: hsd Date: Fri, 5 Apr 2024 11:50:53 +0200 Subject: [PATCH 4/6] tmp removal of lc3plus plc configs to prove BE --- tests/split_rendering/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/split_rendering/constants.py b/tests/split_rendering/constants.py index 2c2530d3c6..a2ccdb8354 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_LC3PLUS_CODEC +RENDERER_CONFIGS_TO_TEST_PLC = RENDERER_CONFIGS_FASTCONV_RENDERER # + RENDERER_CONFIGS_LC3PLUS_CODEC """ Trajectories """ SPLIT_REND_HR_TRAJECTORIES_TO_TEST = [ -- GitLab From 506431491ca14fd1e808eddd04c1dad44392aff1 Mon Sep 17 00:00:00 2001 From: hsd Date: Mon, 8 Apr 2024 08:58:14 +0200 Subject: [PATCH 5/6] Revert "tmp removal of lc3plus plc configs to prove BE" This reverts commit dcf14ec52ee3f4c3987dafd647fd85a30ebc049f. --- tests/split_rendering/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/split_rendering/constants.py b/tests/split_rendering/constants.py index a2ccdb8354..2c2530d3c6 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_LC3PLUS_CODEC +RENDERER_CONFIGS_TO_TEST_PLC = RENDERER_CONFIGS_FASTCONV_RENDERER + RENDERER_CONFIGS_LC3PLUS_CODEC """ Trajectories """ SPLIT_REND_HR_TRAJECTORIES_TO_TEST = [ -- GitLab From 40d22e55154501ddf721aedf8e38747b4a41953e Mon Sep 17 00:00:00 2001 From: hsd Date: Mon, 8 Apr 2024 08:58:14 +0200 Subject: [PATCH 6/6] Revert "[tmp] modify .gitlab-ci.yml to trigger more tests" This reverts commit e60f620b553726c11a49b9d12fb30232e0cdacf4. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9b89409a51..177d90e355 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -255,7 +255,7 @@ stages: .rules-merge-request: extends: .rules-basis rules: - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' # && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" # only have MR pipelines for MRs to main + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" # only have MR pipelines for MRs to main - if: $CI_PIPELINE_SOURCE == 'push' when: never -- GitLab