Skip to content
Commits on Source (72)
...@@ -513,7 +513,6 @@ build-codec-windows-msbuild: ...@@ -513,7 +513,6 @@ build-codec-windows-msbuild:
script: script:
- *print-common-info-windows - *print-common-info-windows
- *activate-WX-windows - *activate-WX-windows
- python .\scripts\strip_split_rendering.py
- MSBuild.exe -maxcpucount .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug - MSBuild.exe -maxcpucount .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug
# --------------------------------------------------------------- # ---------------------------------------------------------------
...@@ -1380,7 +1379,6 @@ ivas-conformance: ...@@ -1380,7 +1379,6 @@ ivas-conformance:
- 123 - 123
script: script:
- *print-common-info-windows - *print-common-info-windows
- python .\scripts\strip_split_rendering.py
- MSBuild.exe -maxcpucount .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug - MSBuild.exe -maxcpucount .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug
- cp -force IVAS_cod.exe IVAS_cod_ref.exe - cp -force IVAS_cod.exe IVAS_cod_ref.exe
- cp -force IVAS_dec.exe IVAS_dec_ref.exe - cp -force IVAS_dec.exe IVAS_dec_ref.exe
...@@ -1389,11 +1387,12 @@ ivas-conformance: ...@@ -1389,11 +1387,12 @@ ivas-conformance:
# Reference creation # Reference creation
- python tests/create_short_testvectors.py - python tests/create_short_testvectors.py
- python scripts/prepare_combined_format_inputs.py - python scripts/prepare_combined_format_inputs.py
- python -m pytest tests/codec_be_on_mr_nonselection tests/renderer/test_renderer.py -v -n auto --update_ref 1 -m create_ref --create_ref --keep_files - $TEST_SET = "tests/codec_be_on_mr_nonselection", "tests/renderer/test_renderer.py", "tests/split_rendering/test_split_rendering.py"
- python -m pytest tests/codec_be_on_mr_nonselection tests/renderer/test_renderer.py -v -n auto --update_ref 1 -m create_ref_part2 --keep_files - python -m pytest $TEST_SET -v -n auto --update_ref 1 -m create_ref --create_ref --keep_files
- python -m pytest $TEST_SET -v -n auto --update_ref 1 -m create_ref_part2 --keep_files
# Output creation # Output creation
- python -m pytest tests/codec_be_on_mr_nonselection tests/renderer/test_renderer.py -v -n auto --keep_files --create_cut --html=report_cmd.html --self-contained-html - python -m pytest $TEST_SET -v -n auto --keep_files --create_cut --html=report_cmd.html --self-contained-html
- python scripts/parse_commands.py report_cmd.html Readme_IVAS.txt - python scripts/parse_commands.py report_cmd.html Readme_IVAS.txt
# Copy input data and output ref data # Copy input data and output ref data
...@@ -1402,10 +1401,13 @@ ivas-conformance: ...@@ -1402,10 +1401,13 @@ ivas-conformance:
- if (Test-Path TMP_ENC) {rm -r -force TMP_ENC} - if (Test-Path TMP_ENC) {rm -r -force TMP_ENC}
- if (Test-Path TMP_JBM) {rm -r -force TMP_JBM} - if (Test-Path TMP_JBM) {rm -r -force TMP_JBM}
- if (Test-Path TMP_REND) {rm -r -force TMP_REND} - if (Test-Path TMP_REND) {rm -r -force TMP_REND}
- if (Test-Path TMP_ISAR_POST_REND) {rm -r -force TMP_ISAR_POST_REND}
- if (Test-Path TMP_DEC_ISAR) {rm -r -force TMP_DEC_ISAR}
- mkdir testvec - mkdir testvec
- mkdir testvec/binauralRenderer_interface - mkdir testvec/binauralRenderer_interface
- mkdir testvec/testv - mkdir testvec/testv
- mkdir testvec/testv/renderer - mkdir testvec/testv/renderer
- mkdir testvec/testv/split_rendering
- mkdir testvec/bin - mkdir testvec/bin
- cp -force -ErrorAction Ignore scripts/testv/* testvec/testv - cp -force -ErrorAction Ignore scripts/testv/* testvec/testv
- cp -r -force -ErrorAction Ignore scripts/ls_layouts testvec - cp -r -force -ErrorAction Ignore scripts/ls_layouts testvec
...@@ -1415,6 +1417,9 @@ ivas-conformance: ...@@ -1415,6 +1417,9 @@ ivas-conformance:
- cp -r -force -ErrorAction Ignore tests/ref testvec/testv/ref - cp -r -force -ErrorAction Ignore tests/ref testvec/testv/ref
- cp -r -force -ErrorAction Ignore tests/dut/* testvec/testv/ref - cp -r -force -ErrorAction Ignore tests/dut/* testvec/testv/ref
- cp -r -force -ErrorAction Ignore tests/renderer/cut testvec/testv/renderer/ref - cp -r -force -ErrorAction Ignore tests/renderer/cut testvec/testv/renderer/ref
- cp -r -force -ErrorAction Ignore tests/split_rendering/cut testvec/testv/split_rendering/ref
- cp -r -force -ErrorAction Ignore tests/split_rendering/renderer_configs testvec/testv/split_rendering/renderer_configs
- cp -r -force -ErrorAction Ignore tests/split_rendering/error_patterns testvec/testv/split_rendering/error_patterns
# Remove redundant files # Remove redundant files
- python scripts/cleanup_26252.py - python scripts/cleanup_26252.py
...@@ -1425,9 +1430,12 @@ ivas-conformance: ...@@ -1425,9 +1430,12 @@ ivas-conformance:
- cp Readme_IVAS_enc.txt testvec - cp Readme_IVAS_enc.txt testvec
- cp Readme_IVAS_rend.txt testvec - cp Readme_IVAS_rend.txt testvec
- cp Readme_IVAS_JBM_dec.txt testvec - cp Readme_IVAS_JBM_dec.txt testvec
- cp Readme_IVAS_ISAR_dec.txt testvec
- cp Readme_IVAS_ISAR_post_rend.txt testvec
- cp IVAS_cod.exe testvec/bin - cp IVAS_cod.exe testvec/bin
- cp IVAS_dec.exe testvec/bin - cp IVAS_dec.exe testvec/bin
- cp IVAS_rend.exe testvec/bin - cp IVAS_rend.exe testvec/bin
- cp ISAR_post_rend.exe testvec/bin
# Test run generated scripts in testvec # Test run generated scripts in testvec
...@@ -1447,6 +1455,8 @@ ivas-conformance: ...@@ -1447,6 +1455,8 @@ ivas-conformance:
- Readme_IVAS_enc.txt - Readme_IVAS_enc.txt
- Readme_IVAS_rend.txt - Readme_IVAS_rend.txt
- Readme_IVAS_JBM_dec.txt - Readme_IVAS_JBM_dec.txt
- Readme_IVAS_ISAR_dec.txt
- Readme_IVAS_ISAR_post_rend.txt
expose_as: "Draft IVAS conformance" expose_as: "Draft IVAS conformance"
reports: reports:
junit: report-junit.xml junit: report-junit.xml
...@@ -1471,7 +1481,7 @@ ivas-conformance-linux: ...@@ -1471,7 +1481,7 @@ ivas-conformance-linux:
# Reference creation # Reference creation
- python3 tests/create_short_testvectors.py - python3 tests/create_short_testvectors.py
- python3 scripts/prepare_combined_format_inputs.py - python3 scripts/prepare_combined_format_inputs.py
- TEST_SET="tests/codec_be_on_mr_nonselection tests/renderer/test_renderer.py" - TEST_SET="tests/codec_be_on_mr_nonselection tests/renderer/test_renderer.py tests/split_rendering/test_split_rendering.py"
- python3 -m pytest $TEST_SET -v -n auto --update_ref 1 -m create_ref --create_ref --keep_files - python3 -m pytest $TEST_SET -v -n auto --update_ref 1 -m create_ref --create_ref --keep_files
- python3 -m pytest $TEST_SET -v -n auto --update_ref 1 -m create_ref_part2 --keep_files - python3 -m pytest $TEST_SET -v -n auto --update_ref 1 -m create_ref_part2 --keep_files
...@@ -1485,6 +1495,7 @@ ivas-conformance-linux: ...@@ -1485,6 +1495,7 @@ ivas-conformance-linux:
- mkdir testvec/binauralRenderer_interface - mkdir testvec/binauralRenderer_interface
- mkdir testvec/testv - mkdir testvec/testv
- mkdir testvec/testv/renderer - mkdir testvec/testv/renderer
- mkdir testvec/testv/split_rendering
- mkdir testvec/bin - mkdir testvec/bin
- cp -r scripts/testv/* testvec/testv - cp -r scripts/testv/* testvec/testv
- cp -r scripts/ls_layouts testvec - cp -r scripts/ls_layouts testvec
...@@ -1494,6 +1505,9 @@ ivas-conformance-linux: ...@@ -1494,6 +1505,9 @@ ivas-conformance-linux:
- cp -r tests/ref testvec/testv/ref - cp -r tests/ref testvec/testv/ref
- cp -r tests/dut/* testvec/testv/ref - cp -r tests/dut/* testvec/testv/ref
- cp -r tests/renderer/cut testvec/testv/renderer/ref - cp -r tests/renderer/cut testvec/testv/renderer/ref
- cp -r tests/split_rendering/cut testvec/testv/split_rendering/ref
- cp -r tests/split_rendering/renderer_configs testvec/testv/split_rendering/renderer_configs
- cp -r tests/split_rendering/error_patterns testvec/testv/split_rendering/error_patterns
# Remove redundant files # Remove redundant files
- python3 scripts/cleanup_26252.py - python3 scripts/cleanup_26252.py
...@@ -1504,6 +1518,8 @@ ivas-conformance-linux: ...@@ -1504,6 +1518,8 @@ ivas-conformance-linux:
- cp Readme_IVAS_enc.txt testvec - cp Readme_IVAS_enc.txt testvec
- cp Readme_IVAS_rend.txt testvec - cp Readme_IVAS_rend.txt testvec
- cp Readme_IVAS_JBM_dec.txt testvec - cp Readme_IVAS_JBM_dec.txt testvec
- cp Readme_IVAS_ISAR_dec.txt testvec
- cp Readme_IVAS_ISAR_post_rend.txt testvec
# Create GCOV execs for coverage analysis # Create GCOV execs for coverage analysis
- make clean - make clean
...@@ -1512,6 +1528,7 @@ ivas-conformance-linux: ...@@ -1512,6 +1528,7 @@ ivas-conformance-linux:
- cp IVAS_cod testvec/bin - cp IVAS_cod testvec/bin
- cp IVAS_dec testvec/bin - cp IVAS_dec testvec/bin
- cp IVAS_rend testvec/bin - cp IVAS_rend testvec/bin
- cp ISAR_post_rend testvec/bin
# Test run generated scripts in testvec # Test run generated scripts in testvec
- cd testvec - cd testvec
...@@ -1528,6 +1545,9 @@ ivas-conformance-linux: ...@@ -1528,6 +1545,9 @@ ivas-conformance-linux:
- commit_sha=$(git rev-parse HEAD) - commit_sha=$(git rev-parse HEAD)
- genhtml coverage.info -o coverage -t "Coverage on main @ $commit_sha" - genhtml coverage.info -o coverage -t "Coverage on main @ $commit_sha"
# Check for failures
- if [ $exit_code -eq 1 ]; then echo "Test failures encountered"; exit $EXIT_CODE_FAIL; fi
artifacts: artifacts:
name: "ivas-conformance-linux-$CI_COMMIT_SHORT_SHA" name: "ivas-conformance-linux-$CI_COMMIT_SHORT_SHA"
expire_in: 1 week expire_in: 1 week
...@@ -1540,6 +1560,8 @@ ivas-conformance-linux: ...@@ -1540,6 +1560,8 @@ ivas-conformance-linux:
- Readme_IVAS_enc.txt - Readme_IVAS_enc.txt
- Readme_IVAS_rend.txt - Readme_IVAS_rend.txt
- Readme_IVAS_JBM_dec.txt - Readme_IVAS_JBM_dec.txt
- Readme_IVAS_ISAR_dec.txt
- Readme_IVAS_ISAR_post_rend.txt
- coverage.info - coverage.info
- coverage - coverage
expose_as: "Draft IVAS conformance -- Linux" expose_as: "Draft IVAS conformance -- Linux"
......
...@@ -155,16 +155,23 @@ ...@@ -155,16 +155,23 @@
/*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */
#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 ISAR_BITSTREAM_UPDATE_LC3PLUS /* FhG: Multiple improvements to the ISAR bitstream when LC3plus is used. See MR 1456 for details. */ #define ISAR_BITSTREAM_UPDATE_LC3PLUS /* FhG: Multiple improvements to the ISAR bitstream when LC3plus is used. See MR 1456 for details. */
#define SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS #ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
#define LC3PLUS_LEA_COMPAT_BITRATES_48_6 /* FhG: treat split-rendering 256kbps lc3plus 10ms 0dof bitrate as sentinel value for LEA compatible 48_6 bitrate (124 kbps per channel) */ #define LC3PLUS_LEA_COMPAT_BITRATES_48_6 /* FhG: treat split-rendering 256kbps lc3plus 10ms 0dof bitrate as sentinel value for LEA compatible 48_6 bitrate (124 kbps per channel) */
#endif #endif
#define SPLIT_REND_POSE_CORRECTION_UNUSED_BITS
#define FIX_1081_BINAURAL_SPLIT_PCM_SANITY_CHECK /* VA: issue 1081: correct error print-out when BINAURAL_SPLIT_PCM is requested */
#endif
#define FIX_1053_REVERB_RECONFIGURATION /* Philips: issue 1053: fix for dynamic switching of acoustic environment */ #define FIX_1053_REVERB_RECONFIGURATION /* Philips: issue 1053: fix for dynamic switching of acoustic environment */
#define CONF_DISTATT /* Eri: Make distance attenuation configurable */ #define CONF_DISTATT /* Eri: Make distance attenuation configurable */
#define FIX_1082_INSTRUM_FAILED_LC3PLUS /* VoiceAge: issue 1082: fix ambiguous syntax in LC3Plus code leading to fails of instrumented builds */ #define FIX_1082_INSTRUM_FAILED_LC3PLUS /* VoiceAge: issue 1082: fix ambiguous syntax in LC3Plus code leading to fails of instrumented builds */
#define FIX_1052_EXT_OUTPUT /* VA: issue 1052: define EXT decoder output configuration for stereo and MC formats */ #define FIX_1052_EXT_OUTPUT /* VA: issue 1052: define EXT decoder output configuration for stereo and MC formats */
#define FIX_989_TD_REND_ROM /* Eri: Clean-up for TD renderer and completion of ROM generation tool */
#define FIX_1068_ASAN_IN_MC_2_BINAURAL_ROOM_IR /* issue 1068 : Memory leak in MC to BINAURAL_ROOM decoding with bitrate switching*/
/* #################### End BE switches ################################## */ /* #################### End BE switches ################################## */
...@@ -176,7 +183,9 @@ ...@@ -176,7 +183,9 @@
#define NONBE_FIX_1070_USAN_SEGFAULT_MC_TO_BIN_BTSW_HEADROT /* fix 1070 USAN: nullptr-with-offset and Segfaults in 7_1_4 to BINAURAL and BINAURAL_ROOM_REVERB decoding with bitrate switching and head rotation*/ #define NONBE_FIX_1070_USAN_SEGFAULT_MC_TO_BIN_BTSW_HEADROT /* fix 1070 USAN: nullptr-with-offset and Segfaults in 7_1_4 to BINAURAL and BINAURAL_ROOM_REVERB decoding with bitrate switching and head rotation*/
#define NONBE_FIX_MC_LFE_LPF /* Dlb: Adding the LFE LPF filter back for MC content. */ #define NONBE_FIX_MC_LFE_LPF /* Dlb: Adding the LFE LPF filter back for MC content. */
#define NONBE_FIX_1052_SBA_EXT /* Dlb: SBA external output support */ #define NONBE_FIX_1052_SBA_EXT /* Dlb: SBA external output support */
#define NONBE_FIX_1087_OOB_SBA_DTX_RS /* VA: issue 1087: Extend the length of the buffer for MCT decoding to avoid out-of-bound writing in SBA SID bitrate switching decoding */
#define NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR /* Nok: issue 1074 fixing number of objects signaling in OMASA low rate */
/* ##################### End NON-BE switches ########################### */ /* ##################### End NON-BE switches ########################### */
/* ################## End DEVELOPMENT switches ######################### */ /* ################## End DEVELOPMENT switches ######################### */
......
...@@ -1677,14 +1677,14 @@ void ivas_binaural_cldfb( ...@@ -1677,14 +1677,14 @@ void ivas_binaural_cldfb(
idx_in++; idx_in++;
} }
if ( st_ivas->hSplitBinRend.hCldfbDataOut != NULL ) if ( st_ivas->hSplitBinRend->hCldfbDataOut != NULL )
{ {
for ( ch = 0; ch < ( st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe ); ch++ ) for ( ch = 0; ch < ( st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe ); ch++ )
{ {
mvr2r( Cldfb_RealBuffer[ch][slot_idx], st_ivas->hSplitBinRend.hCldfbDataOut->Cldfb_RealBuffer[ch][( subframeIdx * JBM_CLDFB_SLOTS_IN_SUBFRAME ) + slot_idx], maxBand ); mvr2r( Cldfb_RealBuffer[ch][slot_idx], st_ivas->hSplitBinRend->hCldfbDataOut->Cldfb_RealBuffer[ch][( subframeIdx * JBM_CLDFB_SLOTS_IN_SUBFRAME ) + slot_idx], maxBand );
mvr2r( Cldfb_ImagBuffer[ch][slot_idx], st_ivas->hSplitBinRend.hCldfbDataOut->Cldfb_ImagBuffer[ch][( subframeIdx * JBM_CLDFB_SLOTS_IN_SUBFRAME ) + slot_idx], maxBand ); mvr2r( Cldfb_ImagBuffer[ch][slot_idx], st_ivas->hSplitBinRend->hCldfbDataOut->Cldfb_ImagBuffer[ch][( subframeIdx * JBM_CLDFB_SLOTS_IN_SUBFRAME ) + slot_idx], maxBand );
} }
st_ivas->hSplitBinRend.hCldfbDataOut->config = st_ivas->hIntSetup.output_config; st_ivas->hSplitBinRend->hCldfbDataOut->config = st_ivas->hIntSetup.output_config;
} }
} }
#endif #endif
...@@ -1694,7 +1694,7 @@ void ivas_binaural_cldfb( ...@@ -1694,7 +1694,7 @@ void ivas_binaural_cldfb(
ivas_binRenderer( ivas_binRenderer(
st_ivas->hBinRenderer, st_ivas->hBinRenderer,
#ifdef SPLIT_REND_WITH_HEAD_ROT #ifdef SPLIT_REND_WITH_HEAD_ROT
&st_ivas->hSplitBinRend.splitrend.multiBinPoseData, &st_ivas->hSplitBinRend->splitrend.multiBinPoseData,
#endif #endif
st_ivas->hCombinedOrientationData, st_ivas->hCombinedOrientationData,
JBM_CLDFB_SLOTS_IN_SUBFRAME, JBM_CLDFB_SLOTS_IN_SUBFRAME,
...@@ -1736,8 +1736,8 @@ void ivas_binaural_cldfb( ...@@ -1736,8 +1736,8 @@ void ivas_binaural_cldfb(
maxBand ); maxBand );
} }
mvr2r( Cldfb_RealBuffer_Binaural[pos_idx][ch][slot_idx], st_ivas->hSplitBinRend.hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][( subframeIdx * JBM_CLDFB_SLOTS_IN_SUBFRAME ) + slot_idx], maxBand ); mvr2r( Cldfb_RealBuffer_Binaural[pos_idx][ch][slot_idx], st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][( subframeIdx * JBM_CLDFB_SLOTS_IN_SUBFRAME ) + slot_idx], maxBand );
mvr2r( Cldfb_ImagBuffer_Binaural[pos_idx][ch][slot_idx], st_ivas->hSplitBinRend.hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][( subframeIdx * JBM_CLDFB_SLOTS_IN_SUBFRAME ) + slot_idx], maxBand ); mvr2r( Cldfb_ImagBuffer_Binaural[pos_idx][ch][slot_idx], st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][( subframeIdx * JBM_CLDFB_SLOTS_IN_SUBFRAME ) + slot_idx], maxBand );
} }
} }
} }
...@@ -1855,14 +1855,14 @@ void ivas_binaural_cldfb_sf( ...@@ -1855,14 +1855,14 @@ void ivas_binaural_cldfb_sf(
} }
#ifdef SPLIT_REND_WITH_HEAD_ROT #ifdef SPLIT_REND_WITH_HEAD_ROT
if ( st_ivas->hSplitBinRend.hCldfbDataOut != NULL ) if ( st_ivas->hSplitBinRend->hCldfbDataOut != NULL )
{ {
for ( ch = 0; ch < ( st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe ); ch++ ) for ( ch = 0; ch < ( st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe ); ch++ )
{ {
mvr2r( Cldfb_RealBuffer[ch][slot_idx], st_ivas->hSplitBinRend.hCldfbDataOut->Cldfb_RealBuffer[ch][slot_index_start + slot_idx], maxBand ); mvr2r( Cldfb_RealBuffer[ch][slot_idx], st_ivas->hSplitBinRend->hCldfbDataOut->Cldfb_RealBuffer[ch][slot_index_start + slot_idx], maxBand );
mvr2r( Cldfb_ImagBuffer[ch][slot_idx], st_ivas->hSplitBinRend.hCldfbDataOut->Cldfb_ImagBuffer[ch][slot_index_start + slot_idx], maxBand ); mvr2r( Cldfb_ImagBuffer[ch][slot_idx], st_ivas->hSplitBinRend->hCldfbDataOut->Cldfb_ImagBuffer[ch][slot_index_start + slot_idx], maxBand );
} }
st_ivas->hSplitBinRend.hCldfbDataOut->config = st_ivas->hIntSetup.output_config; st_ivas->hSplitBinRend->hCldfbDataOut->config = st_ivas->hIntSetup.output_config;
} }
#endif #endif
} }
...@@ -1873,7 +1873,7 @@ void ivas_binaural_cldfb_sf( ...@@ -1873,7 +1873,7 @@ void ivas_binaural_cldfb_sf(
ivas_binRenderer( ivas_binRenderer(
st_ivas->hBinRenderer, st_ivas->hBinRenderer,
#ifdef SPLIT_REND_WITH_HEAD_ROT #ifdef SPLIT_REND_WITH_HEAD_ROT
&st_ivas->hSplitBinRend.splitrend.multiBinPoseData, &st_ivas->hSplitBinRend->splitrend.multiBinPoseData,
#endif #endif
st_ivas->hCombinedOrientationData, st_ivas->hCombinedOrientationData,
st_ivas->hTcBuffer->subframe_nbslots[subframeIdx], st_ivas->hTcBuffer->subframe_nbslots[subframeIdx],
...@@ -1895,8 +1895,8 @@ void ivas_binaural_cldfb_sf( ...@@ -1895,8 +1895,8 @@ void ivas_binaural_cldfb_sf(
{ {
for ( ch = 0; ch < st_ivas->hDecoderConfig->nchan_out; ch++ ) for ( ch = 0; ch < st_ivas->hDecoderConfig->nchan_out; ch++ )
{ {
mvr2r( Cldfb_RealBuffer_Binaural[pos_idx][ch][slot_idx], st_ivas->hSplitBinRend.hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][slot_index_start + slot_idx], maxBand ); mvr2r( Cldfb_RealBuffer_Binaural[pos_idx][ch][slot_idx], st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][slot_index_start + slot_idx], maxBand );
mvr2r( Cldfb_ImagBuffer_Binaural[pos_idx][ch][slot_idx], st_ivas->hSplitBinRend.hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][slot_index_start + slot_idx], maxBand ); mvr2r( Cldfb_ImagBuffer_Binaural[pos_idx][ch][slot_idx], st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][slot_index_start + slot_idx], maxBand );
} }
} }
} }
......
...@@ -399,12 +399,30 @@ ivas_error ivas_dec_setup( ...@@ -399,12 +399,30 @@ ivas_error ivas_dec_setup(
if ( st_ivas->nchan_ism > 0 ) if ( st_ivas->nchan_ism > 0 )
{ {
#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR
/* the input_ivas_format should be MASA_ISM_FORMAT, but we cannot initialize it now */
/* info about the number of objects:
'00' - MASA format at the encoder
'01' - MASA_ISM_FORMAT at the encoder, with 4 objects
'10' - MASA_ISM_FORMAT at the encoder, with 3 objects
'11' - MASA_ISM_FORMAT at the encoder, with 1 or 2 objects
reading if 1 or 2 objects is performed later
*/
st_ivas->nchan_ism = 5 - st_ivas->nchan_ism;
if ( st_ivas->nchan_transport == 1 && st_ivas->nchan_ism == 2 )
{
st_ivas->nchan_ism = 1;
}
/* for MASA_ISM_FORMAT at input the number of MASA transport channels is always 2 and the corresponding bit is not used here*/
#else
/* the input_ivas_format should be MASA_ISM_FORMAT, but we cannot initialize it now */ /* the input_ivas_format should be MASA_ISM_FORMAT, but we cannot initialize it now */
if ( st_ivas->nchan_transport == 2 && st_ivas->nchan_ism == 3 ) if ( st_ivas->nchan_transport == 2 && st_ivas->nchan_ism == 3 )
{ {
st_ivas->nchan_ism = 4; st_ivas->nchan_ism = 4;
} }
/* for MASA_ISM_FORMAT at input the number of MASA transport channels is always 2 */ /* for MASA_ISM_FORMAT at input the number of MASA transport channels is always 2 */
#endif
st_ivas->nchan_transport = 2; st_ivas->nchan_transport = 2;
element_mode_flag = 1; element_mode_flag = 1;
} }
......
...@@ -151,6 +151,52 @@ ivas_error ivas_masa_decode( ...@@ -151,6 +151,52 @@ ivas_error ivas_masa_decode(
{ {
if ( !( ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCMASA ) ) if ( !( ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCMASA ) )
{ {
#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR
if ( ivas_format == MASA_FORMAT )
{
/* re-read the number of objects, needed in case of bad frame */
st_ivas->nchan_ism = 5 - ( st_ivas->bit_stream[( ivas_total_brate / FRAMES_PER_SEC ) - 3] + 2 * st_ivas->bit_stream[( ivas_total_brate / FRAMES_PER_SEC ) - 2] );
}
if ( ivas_format == MASA_FORMAT && st_ivas->nchan_ism != 5 )
{
/* there was OMASA in the input */
hMasa->config.input_ivas_format = MASA_ISM_FORMAT;
if ( st_ivas->nchan_ism < 3 )
{
/* was read in ivas_init_dec() to distinguish between 1 and 2 objects */
if ( st_ivas->bit_stream[( ivas_total_brate / FRAMES_PER_SEC ) - 1] == 0 )
{
st_ivas->nchan_ism = 1;
}
st->next_bit_pos -= MASA_TRANSP_BITS;
*nb_bits_read += MASA_TRANSP_BITS;
/* the two reserved bits were already read in ivas_init_dec()*/
byteBuffer = st->bit_stream[( st->next_bit_pos )--];
byteBuffer = st->bit_stream[( st->next_bit_pos )--];
*nb_bits_read += MASA_HEADER_BITS;
/* read number of directions */
byteBuffer = st->bit_stream[( st->next_bit_pos )--];
( *nb_bits_read )++;
hMasa->config.numberOfDirections = (uint8_t) ( byteBuffer + 1 );
}
else
{
/* if there are 3 or 4 objects the number of transport channels bit is given to MASA format
and used to read number of directions*/
byteBuffer = st->bit_stream[( st->next_bit_pos )--];
( *nb_bits_read )++;
hMasa->config.numberOfDirections = (uint8_t) ( byteBuffer + 1 );
/* the two reserved bits were already read in ivas_init_dec()*/
byteBuffer = st->bit_stream[( st->next_bit_pos )--];
byteBuffer = st->bit_stream[( st->next_bit_pos )--];
*nb_bits_read += MASA_HEADER_BITS;
}
}
else
{
#endif
if ( ivas_format != MASA_ISM_FORMAT ) if ( ivas_format != MASA_ISM_FORMAT )
{ {
/* number of transport channels is always 2 for MASA_ISM format */ /* number of transport channels is always 2 for MASA_ISM format */
...@@ -249,13 +295,14 @@ ivas_error ivas_masa_decode( ...@@ -249,13 +295,14 @@ ivas_error ivas_masa_decode(
} }
} }
#ifndef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR
/* read 2 bits: /* read 2 bits:
'00' - MASA format at the encoder '00' - MASA format at the encoder
'01' - MASA_ISM_FORMAT at the encoder, with 1 object '01' - MASA_ISM_FORMAT at the encoder, with 1 object
'10' - MASA_ISM_FORMAT at the encoder, with 2 objects '10' - MASA_ISM_FORMAT at the encoder, with 2 objects
'11' - MASA_ISM_FORMAT at the encoder, with 3 or 4 objects '11' - MASA_ISM_FORMAT at the encoder, with 3 or 4 objects; reading if 3 or 4 object is performed later
reading if 3 or 4 object is performed later
*/ */
#endif
byteBuffer = st->bit_stream[( st->next_bit_pos )--]; byteBuffer = st->bit_stream[( st->next_bit_pos )--];
byteBuffer = byteBuffer + 2 * st->bit_stream[( st->next_bit_pos )--]; byteBuffer = byteBuffer + 2 * st->bit_stream[( st->next_bit_pos )--];
...@@ -273,6 +320,9 @@ ivas_error ivas_masa_decode( ...@@ -273,6 +320,9 @@ ivas_error ivas_masa_decode(
byteBuffer = st->bit_stream[( st->next_bit_pos )--]; byteBuffer = st->bit_stream[( st->next_bit_pos )--];
( *nb_bits_read )++; ( *nb_bits_read )++;
hMasa->config.numberOfDirections = (uint8_t) ( byteBuffer + 1 ); hMasa->config.numberOfDirections = (uint8_t) ( byteBuffer + 1 );
#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR
}
#endif
} }
else else
{ {
......
...@@ -87,6 +87,9 @@ ivas_error ivas_mct_dec( ...@@ -87,6 +87,9 @@ ivas_error ivas_mct_dec(
STnsData tnsData[MCT_MAX_BLOCKS][CPE_CHANNELS][NB_DIV]; STnsData tnsData[MCT_MAX_BLOCKS][CPE_CHANNELS][NB_DIV];
Decoder_State **sts; Decoder_State **sts;
float synth[CPE_CHANNELS][L_FRAME_PLUS]; float synth[CPE_CHANNELS][L_FRAME_PLUS];
#ifdef NONBE_FIX_1087_OOB_SBA_DTX_RS
float *p_output_orig[2];
#endif
float output_lfe_ch[L_FRAME48k]; float output_lfe_ch[L_FRAME48k];
int32_t ivas_total_brate; int32_t ivas_total_brate;
ivas_error error; ivas_error error;
...@@ -148,6 +151,18 @@ ivas_error ivas_mct_dec( ...@@ -148,6 +151,18 @@ ivas_error ivas_mct_dec(
/* MCT side bits decoder */ /* MCT side bits decoder */
ivas_mct_side_bits( hMCT, st_ivas->hCPE, nCPE, st_ivas->hCPE[0]->hCoreCoder[0], st_ivas->bfi, st_ivas->hCPE[0]->hCoreCoder[0]->bit_stream, ivas_total_brate, nb_bits_metadata ); ivas_mct_side_bits( hMCT, st_ivas->hCPE, nCPE, st_ivas->hCPE[0]->hCoreCoder[0], st_ivas->bfi, st_ivas->hCPE[0]->hCoreCoder[0]->bit_stream, ivas_total_brate, nb_bits_metadata );
#ifdef NONBE_FIX_1087_OOB_SBA_DTX_RS
/* in case of switching from an SID frame (with ACELP core) to MCT, buffer of L_FRAME_PLUS samples is needed -> use synth[] as a temporary buffer */
if ( st_ivas->hCPE[0]->hCoreCoder[0]->last_core == ACELP_CORE )
{
for ( n = 0; n < CPE_CHANNELS; n++ )
{
p_output_orig[n] = output[n];
output[n] = synth[n];
}
}
#endif
for ( cpe_id = 0; cpe_id < nCPE; cpe_id++ ) for ( cpe_id = 0; cpe_id < nCPE; cpe_id++ )
{ {
st_ivas->hCPE[cpe_id]->hCoreCoder[0]->BER_detect |= st_ivas->BER_detect; st_ivas->hCPE[cpe_id]->hCoreCoder[0]->BER_detect |= st_ivas->BER_detect;
...@@ -232,6 +247,17 @@ ivas_error ivas_mct_dec( ...@@ -232,6 +247,17 @@ ivas_error ivas_mct_dec(
ivas_mdct_core_reconstruct( hCPE, x, synth, fUseTns[cpe_id], 1 ); ivas_mdct_core_reconstruct( hCPE, x, synth, fUseTns[cpe_id], 1 );
#ifdef NONBE_FIX_1087_OOB_SBA_DTX_RS
/* set pointers back */
if ( cpe_id == 0 && st_ivas->hCPE[0]->hCoreCoder[0]->last_core == ACELP_CORE )
{
for ( n = 0; n < CPE_CHANNELS; n++ )
{
output[n] = p_output_orig[n];
}
}
#endif
/*----------------------------------------------------------------* /*----------------------------------------------------------------*
* CoreCoder Post-processing and updates * CoreCoder Post-processing and updates
*----------------------------------------------------------------*/ *----------------------------------------------------------------*/
...@@ -263,7 +289,6 @@ ivas_error ivas_mct_dec( ...@@ -263,7 +289,6 @@ ivas_error ivas_mct_dec(
#endif #endif
} /* n_channels loop */ } /* n_channels loop */
/* synthesis synchronization between stereo modes */ /* synthesis synchronization between stereo modes */
if ( !st_ivas->sba_dirac_stereo_flag || ( st_ivas->ivas_format == SBA_ISM_FORMAT && cpe_id < nCPE - 2 ) ) if ( !st_ivas->sba_dirac_stereo_flag || ( st_ivas->ivas_format == SBA_ISM_FORMAT && cpe_id < nCPE - 2 ) )
{ {
...@@ -1230,6 +1255,12 @@ static ivas_error ivas_mc_dec_reconfig( ...@@ -1230,6 +1255,12 @@ static ivas_error ivas_mc_dec_reconfig(
if ( st_ivas->hBinRenderer != NULL && ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) ) if ( st_ivas->hBinRenderer != NULL && ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) )
{ {
ivas_binRenderer_close( &st_ivas->hBinRenderer ); ivas_binRenderer_close( &st_ivas->hBinRenderer );
#ifdef FIX_1068_ASAN_IN_MC_2_BINAURAL_ROOM_IR
if ( ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) )
{
efap_free_data( &st_ivas->hEFAPdata );
}
#endif
} }
#ifdef SPLIT_REND_WITH_HEAD_ROT #ifdef SPLIT_REND_WITH_HEAD_ROT
......
...@@ -420,6 +420,18 @@ ivas_error ivas_masa_encode( ...@@ -420,6 +420,18 @@ ivas_error ivas_masa_encode(
{ {
if ( ivas_format == MASA_ISM_FORMAT && ism_mode == ISM_MODE_NONE ) if ( ivas_format == MASA_ISM_FORMAT && ism_mode == ISM_MODE_NONE )
{ {
#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR
/* use the MASA number of transport channels bit to signal if there are 1 or 2 objects */
if ( nchan_ism == 1 || nchan_ism == 2 )
{
push_next_indice( hMetaData, nchan_ism - 1, MASA_TRANSP_BITS );
}
else
{
/* for 3 or 4 objects write already the number of MASA directions */
push_next_indice( hMetaData, hQMetaData->no_directions - 1, MASA_TRANSP_BITS );
}
#else
/* use the MASA number of transport channels bit to signal if there are 3 or 4 objects */ /* use the MASA number of transport channels bit to signal if there are 3 or 4 objects */
if ( nchan_ism == 4 ) if ( nchan_ism == 4 )
{ {
...@@ -429,6 +441,7 @@ ivas_error ivas_masa_encode( ...@@ -429,6 +441,7 @@ ivas_error ivas_masa_encode(
{ {
push_next_indice( hMetaData, 0, MASA_TRANSP_BITS ); push_next_indice( hMetaData, 0, MASA_TRANSP_BITS );
} }
#endif
} }
else else
{ {
...@@ -440,6 +453,16 @@ ivas_error ivas_masa_encode( ...@@ -440,6 +453,16 @@ ivas_error ivas_masa_encode(
if ( ivas_format == MASA_ISM_FORMAT && ism_mode == ISM_MODE_NONE ) if ( ivas_format == MASA_ISM_FORMAT && ism_mode == ISM_MODE_NONE )
{ {
#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR
if ( nchan_ism >= 3 ) /* if 3 or 4 objects */
{
push_next_indice( hMetaData, 5 - nchan_ism, MASA_HEADER_BITS );
}
else
{
push_next_indice( hMetaData, 3, MASA_HEADER_BITS );
}
#else
if ( nchan_ism <= 3 ) if ( nchan_ism <= 3 )
{ {
push_next_indice( hMetaData, nchan_ism, MASA_HEADER_BITS ); push_next_indice( hMetaData, nchan_ism, MASA_HEADER_BITS );
...@@ -448,6 +471,7 @@ ivas_error ivas_masa_encode( ...@@ -448,6 +471,7 @@ ivas_error ivas_masa_encode(
{ {
push_next_indice( hMetaData, nchan_ism - 1, MASA_HEADER_BITS ); push_next_indice( hMetaData, nchan_ism - 1, MASA_HEADER_BITS );
} }
#endif
hQMetaData->metadata_max_bits -= MASA_HEADER_BITS; hQMetaData->metadata_max_bits -= MASA_HEADER_BITS;
} }
else else
...@@ -457,10 +481,16 @@ ivas_error ivas_masa_encode( ...@@ -457,10 +481,16 @@ ivas_error ivas_masa_encode(
push_next_indice( hMetaData, 0, MASA_HEADER_BITS ); push_next_indice( hMetaData, 0, MASA_HEADER_BITS );
hQMetaData->metadata_max_bits -= MASA_HEADER_BITS; hQMetaData->metadata_max_bits -= MASA_HEADER_BITS;
} }
#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR
if ( !( ivas_format == MASA_ISM_FORMAT && ism_mode == ISM_MODE_NONE && nchan_ism > 2 ) )
{
#endif
/* write number of directions */ /* write number of directions */
push_next_indice( hMetaData, hQMetaData->no_directions - 1, 1 ); push_next_indice( hMetaData, hQMetaData->no_directions - 1, 1 );
hQMetaData->metadata_max_bits -= 1; hQMetaData->metadata_max_bits -= 1;
#ifdef NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR
}
#endif
/* write subframe mode */ /* write subframe mode */
push_next_indice( hMetaData, hQMetaData->q_direction[0].cfg.nblocks == 1 ? 1 : 0, MASA_SUBFRAME_BITS ); push_next_indice( hMetaData, hQMetaData->q_direction[0].cfg.nblocks == 1 ? 1 : 0, MASA_SUBFRAME_BITS );
hQMetaData->metadata_max_bits -= MASA_SUBFRAME_BITS; hQMetaData->metadata_max_bits -= MASA_SUBFRAME_BITS;
......
DisableFormat: true DisableFormat: true
SortIncludes: Never SortIncludes: Never
/****************************************************************************** /******************************************************************************
* ETSI TS 103 634 V1.4.3 * * ETSI TS 103 634 V1.5.1 *
* Low Complexity Communication Codec Plus (LC3plus) * * Low Complexity Communication Codec Plus (LC3plus) *
* * * *
* Copyright licence is solely granted through ETSI Intellectual Property * * Copyright licence is solely granted through ETSI Intellectual Property *
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
* estoppel or otherwise. * * estoppel or otherwise. *
******************************************************************************/ ******************************************************************************/
#include "options.h" #include "options.h"
#include "wmc_auto.h" #include "wmc_auto.h"
#include "functions.h" #include "functions.h"
...@@ -19,11 +18,7 @@ void processAdjustGlobalGain_fl(LC3_INT* gg_idx, LC3_INT gg_idx_min, LC3_INT gg_ ...@@ -19,11 +18,7 @@ void processAdjustGlobalGain_fl(LC3_INT* gg_idx, LC3_INT gg_idx_min, LC3_INT gg_
LC3_FLOAT delta; LC3_FLOAT delta;
LC3_INT delta2; LC3_INT delta2;
LC3_INT gg_idx_inc; LC3_INT gg_idx_inc;
#ifdef CR8_G_ADD_75MS
LC3_FLOAT factor; LC3_FLOAT factor;
#else
LC3_INT factor;
#endif
if (frame_dms == 25) if (frame_dms == 25)
{ {
...@@ -37,12 +32,10 @@ void processAdjustGlobalGain_fl(LC3_INT* gg_idx, LC3_INT gg_idx_min, LC3_INT gg_ ...@@ -37,12 +32,10 @@ void processAdjustGlobalGain_fl(LC3_INT* gg_idx, LC3_INT gg_idx_min, LC3_INT gg_
{ {
factor = 2; factor = 2;
} }
#ifdef CR8_G_ADD_75MS
else if (frame_dms == 75) else if (frame_dms == 75)
{ {
factor = 1.2; factor = 1.2;
} }
#endif
else else
{ {
factor = 1; factor = 1;
......
/****************************************************************************** /******************************************************************************
* ETSI TS 103 634 V1.4.3 * * ETSI TS 103 634 V1.5.1 *
* Low Complexity Communication Codec Plus (LC3plus) * * Low Complexity Communication Codec Plus (LC3plus) *
* * * *
* Copyright licence is solely granted through ETSI Intellectual Property * * Copyright licence is solely granted through ETSI Intellectual Property *
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
* estoppel or otherwise. * * estoppel or otherwise. *
******************************************************************************/ ******************************************************************************/
#include "options.h" #include "options.h"
#include "wmc_auto.h" #include "wmc_auto.h"
#include "stdint.h" #include "stdint.h"
...@@ -715,7 +714,6 @@ LC3_INT32 fec_decoder(LC3_UINT8 *iobuf, LC3_INT16 slot_bytes, LC3_INT32 *data_by ...@@ -715,7 +714,6 @@ LC3_INT32 fec_decoder(LC3_UINT8 *iobuf, LC3_INT16 slot_bytes, LC3_INT32 *data_by
if (*bfi == 1) if (*bfi == 1)
{ {
return ERROR_REPORT_BEC_MASK; return ERROR_REPORT_BEC_MASK;
} }
......
/****************************************************************************** /******************************************************************************
* ETSI TS 103 634 V1.4.3 * * ETSI TS 103 634 V1.5.1 *
* Low Complexity Communication Codec Plus (LC3plus) * * Low Complexity Communication Codec Plus (LC3plus) *
* * * *
* Copyright licence is solely granted through ETSI Intellectual Property * * Copyright licence is solely granted through ETSI Intellectual Property *
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
* estoppel or otherwise. * * estoppel or otherwise. *
******************************************************************************/ ******************************************************************************/
#include "options.h" #include "options.h"
#include "wmc_auto.h" #include "wmc_auto.h"
#include "functions.h" #include "functions.h"
......
This diff is collapsed.
/****************************************************************************** /******************************************************************************
* ETSI TS 103 634 V1.4.3 * * ETSI TS 103 634 V1.5.1 *
* Low Complexity Communication Codec Plus (LC3plus) * * Low Complexity Communication Codec Plus (LC3plus) *
* * * *
* Copyright licence is solely granted through ETSI Intellectual Property * * Copyright licence is solely granted through ETSI Intellectual Property *
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
* estoppel or otherwise. * * estoppel or otherwise. *
******************************************************************************/ ******************************************************************************/
#include "options.h" #include "options.h"
#include "wmc_auto.h" #include "wmc_auto.h"
#include "functions.h" #include "functions.h"
......
/****************************************************************************** /******************************************************************************
* ETSI TS 103 634 V1.4.3 * * ETSI TS 103 634 V1.5.1 *
* Low Complexity Communication Codec Plus (LC3plus) * * Low Complexity Communication Codec Plus (LC3plus) *
* * * *
* Copyright licence is solely granted through ETSI Intellectual Property * * Copyright licence is solely granted through ETSI Intellectual Property *
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
* estoppel or otherwise. * * estoppel or otherwise. *
******************************************************************************/ ******************************************************************************/
#ifndef CLIB_H #ifndef CLIB_H
#define CLIB_H #define CLIB_H
......
/****************************************************************************** /******************************************************************************
* ETSI TS 103 634 V1.4.3 * * ETSI TS 103 634 V1.5.1 *
* Low Complexity Communication Codec Plus (LC3plus) * * Low Complexity Communication Codec Plus (LC3plus) *
* * * *
* Copyright licence is solely granted through ETSI Intellectual Property * * Copyright licence is solely granted through ETSI Intellectual Property *
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
* estoppel or otherwise. * * estoppel or otherwise. *
******************************************************************************/ ******************************************************************************/
   
#include "options.h" #include "options.h"
#include "wmc_auto.h" #include "wmc_auto.h"
#include "functions.h" #include "functions.h"
...@@ -1000,7 +999,6 @@ const LC3_INT BW_cutoff_bits_all[MAX_BW_BANDS_NUMBER] = {0, 1, 2, 2, 3, 0}; ...@@ -1000,7 +999,6 @@ const LC3_INT BW_cutoff_bits_all[MAX_BW_BANDS_NUMBER] = {0, 1, 2, 2, 3, 0};
const LC3_INT BW_cutoff_bin_all_5ms[MAX_BW_BANDS_NUMBER] = {40, 80, 120, 160, 200, 200}; const LC3_INT BW_cutoff_bin_all_5ms[MAX_BW_BANDS_NUMBER] = {40, 80, 120, 160, 200, 200};
const LC3_INT BW_cutoff_bin_all_2_5ms[MAX_BW_BANDS_NUMBER] = {20, 40, 60, 80, 100, 100}; const LC3_INT BW_cutoff_bin_all_2_5ms[MAX_BW_BANDS_NUMBER] = {20, 40, 60, 80, 100, 100};
   
#ifdef CR8_G_ADD_75MS
const LC3_INT BW_cutoff_bin_all_7_5ms[] = {60, 120, 180, 240, 300, 300}; const LC3_INT BW_cutoff_bin_all_7_5ms[] = {60, 120, 180, 240, 300, 300};
const LC3_INT bands_number_7_5ms_HR [] = {60, 64, 64, 64, 64, 64}; const LC3_INT bands_number_7_5ms_HR [] = {60, 64, 64, 64, 64, 64};
const LC3_INT bands_number_7_5ms [] = {60, 64, 64, 64, 64}; const LC3_INT bands_number_7_5ms [] = {60, 64, 64, 64, 64};
...@@ -1023,7 +1021,6 @@ const LC3_INT* BW_warp_idx_start_all_7_5ms[4] = {BW_warp_idx_start_16k_7_5ms, BW ...@@ -1023,7 +1021,6 @@ const LC3_INT* BW_warp_idx_start_all_7_5ms[4] = {BW_warp_idx_start_16k_7_5ms, BW
BW_warp_idx_start_32k_7_5ms, BW_warp_idx_start_48k_7_5ms}; BW_warp_idx_start_32k_7_5ms, BW_warp_idx_start_48k_7_5ms};
const LC3_INT* BW_warp_idx_stop_all_7_5ms[4] = {BW_warp_idx_stop_16k_7_5ms, BW_warp_idx_stop_24k_7_5ms, const LC3_INT* BW_warp_idx_stop_all_7_5ms[4] = {BW_warp_idx_stop_16k_7_5ms, BW_warp_idx_stop_24k_7_5ms,
BW_warp_idx_stop_32k_7_5ms, BW_warp_idx_stop_48k_7_5ms}; BW_warp_idx_stop_32k_7_5ms, BW_warp_idx_stop_48k_7_5ms};
#endif
   
/* Arithmetic coding */ /* Arithmetic coding */
const LC3_INT tns_cf[8][18] = {{0, 1, 6, 21, 52, 106, 192, 289, 409, 568, 720, 831, 935, 994, 1016, 1022, 1023, 1024}, const LC3_INT tns_cf[8][18] = {{0, 1, 6, 21, 52, 106, 192, 289, 409, 568, 720, 831, 935, 994, 1016, 1022, 1023, 1024},
...@@ -1039,9 +1036,6 @@ const LC3_INT tns_freq_cf[2][9] = {{0, 3, 12, 35, 89, 200, 390, 658, 1024}, {0, ...@@ -1039,9 +1036,6 @@ const LC3_INT tns_freq_cf[2][9] = {{0, 3, 12, 35, 89, 200, 390, 658, 1024}, {0,
   
/* MDCT Windows */ /* MDCT Windows */
   
#ifdef CR8_G_ADD_75MS
const LC3_FLOAT MDCT_HRA_WINDOW_480_7_5ms[720] = { const LC3_FLOAT MDCT_HRA_WINDOW_480_7_5ms[720] = {
0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00,
0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00,
...@@ -3404,7 +3398,6 @@ const LC3_FLOAT MDCT_WINDOW_480_7_5ms[720] = {0.00172152668161197, ...@@ -3404,7 +3398,6 @@ const LC3_FLOAT MDCT_WINDOW_480_7_5ms[720] = {0.00172152668161197,
0, 0,
0, 0,
0}; 0};
#endif /* #ifdef CR8_G_ADD_75MS */
   
const LC3_FLOAT MDCT_WINDOW_80_2_5ms[40] = { const LC3_FLOAT MDCT_WINDOW_80_2_5ms[40] = {
6.737914289329320e-03, 2.732289618100209e-02, 6.163560962361236e-02, 1.119125037883055e-01, 1.787053464784875e-01, 6.737914289329320e-03, 2.732289618100209e-02, 6.163560962361236e-02, 1.119125037883055e-01, 1.787053464784875e-01,
...@@ -5488,12 +5481,10 @@ const LC3_FLOAT* MDCT_WINS_10ms[2][6] = { ...@@ -5488,12 +5481,10 @@ const LC3_FLOAT* MDCT_WINS_10ms[2][6] = {
{NULL, NULL, NULL, NULL, MDCT_HRA_WINDOW_480_10ms, MDCT_HRA_WINDOW_960_10ms}}; {NULL, NULL, NULL, NULL, MDCT_HRA_WINDOW_480_10ms, MDCT_HRA_WINDOW_960_10ms}};
const LC3_INT MDCT_la_zeroes[6] = {30, 60, 90, 120, 180, 360}; const LC3_INT MDCT_la_zeroes[6] = {30, 60, 90, 120, 180, 360};
   
#ifdef CR8_G_ADD_75MS
const LC3_FLOAT* MDCT_WINS_7_5ms[2][6] = { const LC3_FLOAT* MDCT_WINS_7_5ms[2][6] = {
{MDCT_WINDOW_80_7_5ms, MDCT_WINDOW_160_7_5ms, MDCT_WINDOW_240_7_5ms, MDCT_WINDOW_320_7_5ms, MDCT_WINDOW_480_7_5ms, NULL}, {MDCT_WINDOW_80_7_5ms, MDCT_WINDOW_160_7_5ms, MDCT_WINDOW_240_7_5ms, MDCT_WINDOW_320_7_5ms, MDCT_WINDOW_480_7_5ms, NULL},
{NULL , NULL , NULL , NULL , MDCT_HRA_WINDOW_480_7_5ms, MDCT_HRA_WINDOW_960_7_5ms}}; {NULL , NULL , NULL , NULL , MDCT_HRA_WINDOW_480_7_5ms, MDCT_HRA_WINDOW_960_7_5ms}};
const LC3_INT32 MDCT_la_zeroes_7_5ms[6] = {14, 28, 42, 56, 84, 168}; const LC3_INT32 MDCT_la_zeroes_7_5ms[6] = {14, 28, 42, 56, 84, 168};
#endif
   
const LC3_FLOAT* MDCT_WINS_2_5ms[2][6] = { const LC3_FLOAT* MDCT_WINS_2_5ms[2][6] = {
{MDCT_WINDOW_80_2_5ms, MDCT_WINDOW_160_2_5ms, MDCT_WINDOW_240_2_5ms, MDCT_WINDOW_320_2_5ms, MDCT_WINDOW_480_2_5ms, {MDCT_WINDOW_80_2_5ms, MDCT_WINDOW_160_2_5ms, MDCT_WINDOW_240_2_5ms, MDCT_WINDOW_320_2_5ms, MDCT_WINDOW_480_2_5ms,
...@@ -5624,7 +5615,6 @@ const LC3_INT* ACC_COEFF_PER_BAND_5ms[5] = {ACC_COEFF_PER_BAND_8_5ms, ACC_COEFF_ ...@@ -5624,7 +5615,6 @@ const LC3_INT* ACC_COEFF_PER_BAND_5ms[5] = {ACC_COEFF_PER_BAND_8_5ms, ACC_COEFF_
ACC_COEFF_PER_BAND_24_5ms, ACC_COEFF_PER_BAND_32_5ms, ACC_COEFF_PER_BAND_24_5ms, ACC_COEFF_PER_BAND_32_5ms,
ACC_COEFF_PER_BAND_48_5ms}; ACC_COEFF_PER_BAND_48_5ms};
   
#ifdef CR8_G_ADD_75MS
const LC3_INT ACC_COEFF_PER_BAND_8_7_5ms[61] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, const LC3_INT ACC_COEFF_PER_BAND_8_7_5ms[61] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
...@@ -5704,17 +5694,14 @@ const LC3_INT ACC_COEFF_PER_BAND_PLC_96_7_5ms[81] = { ...@@ -5704,17 +5694,14 @@ const LC3_INT ACC_COEFF_PER_BAND_PLC_96_7_5ms[81] = {
const LC3_INT* ACC_COEFF_PER_BAND_PLC_7_5ms[] = { const LC3_INT* ACC_COEFF_PER_BAND_PLC_7_5ms[] = {
ACC_COEFF_PER_BAND_PLC_8_7_5ms, ACC_COEFF_PER_BAND_PLC_16_7_5ms, ACC_COEFF_PER_BAND_PLC_24_7_5ms, ACC_COEFF_PER_BAND_PLC_8_7_5ms, ACC_COEFF_PER_BAND_PLC_16_7_5ms, ACC_COEFF_PER_BAND_PLC_24_7_5ms,
ACC_COEFF_PER_BAND_PLC_32_7_5ms, ACC_COEFF_PER_BAND_PLC_48_7_5ms, ACC_COEFF_PER_BAND_PLC_96_7_5ms}; ACC_COEFF_PER_BAND_PLC_32_7_5ms, ACC_COEFF_PER_BAND_PLC_48_7_5ms, ACC_COEFF_PER_BAND_PLC_96_7_5ms};
#endif
   
/* Near Nyquist detector */ /* Near Nyquist detector */
const LC3_INT NN_thresh = 30; const LC3_INT NN_thresh = 30;
/* Tone detector */ /* Tone detector */
#ifdef CR8_E_TONE_DETECTOR
const LC3_INT32 TD_HR_thresh_10ms = 83402; const LC3_INT32 TD_HR_thresh_10ms = 83402;
const LC3_INT32 TD_HR_thresh_7_5ms = 743496; const LC3_INT32 TD_HR_thresh_7_5ms = 743496;
const LC3_INT32 TD_HR_thresh_5ms = 382564; const LC3_INT32 TD_HR_thresh_5ms = 382564;
const LC3_INT32 TD_HR_thresh_2_5ms = 301695; const LC3_INT32 TD_HR_thresh_2_5ms = 301695;
#endif // CR8_E_TONE_DETECTOR
   
   
const LC3_INT32 xavg_N_grp[5] = { 4, 5, 6, 7, 8 }; const LC3_INT32 xavg_N_grp[5] = { 4, 5, 6, 7, 8 };
...@@ -5722,8 +5709,6 @@ const LC3_INT32 xavg_N_grp[5] = { 4, 5, 6, 7, 8 }; ...@@ -5722,8 +5709,6 @@ const LC3_INT32 xavg_N_grp[5] = { 4, 5, 6, 7, 8 };
   
const LC3_INT32 gwlpr[MAX_LGW+1] = { 1, 3*QUOT_LPR_LTR, 5*QUOT_LPR_LTR, 9*QUOT_LPR_LTR, 17*QUOT_LPR_LTR, 33*QUOT_LPR_LTR, 49*QUOT_LPR_LTR, 65*QUOT_LPR_LTR, 81*QUOT_LPR_LTR, 97*QUOT_LPR_LTR}; const LC3_INT32 gwlpr[MAX_LGW+1] = { 1, 3*QUOT_LPR_LTR, 5*QUOT_LPR_LTR, 9*QUOT_LPR_LTR, 17*QUOT_LPR_LTR, 33*QUOT_LPR_LTR, 49*QUOT_LPR_LTR, 65*QUOT_LPR_LTR, 81*QUOT_LPR_LTR, 97*QUOT_LPR_LTR};
   
#ifdef CR8_A_PLC_FADEOUT_TUNING
/* PLC_FADEOUT_TUNING, extended table ranging from 30 ms to 140 ms */ /* PLC_FADEOUT_TUNING, extended table ranging from 30 ms to 140 ms */
const LC3_INT16 fade_scheme_tab[24 / 2][3] = { const LC3_INT16 fade_scheme_tab[24 / 2][3] = {
/* tabled {att_per_frame_idx_p3dB , burst_att_thresh, beta_mute_thr } */ /* tabled {att_per_frame_idx_p3dB , burst_att_thresh, beta_mute_thr } */
...@@ -5742,11 +5727,8 @@ const LC3_INT16 fade_scheme_tab[24 / 2][3] = { ...@@ -5742,11 +5727,8 @@ const LC3_INT16 fade_scheme_tab[24 / 2][3] = {
   
}; };
   
/*compressed ATH Abolute hearing THreshold function weights at band borders */ /*compressed ATH Abolute hearing THreshold function weights at band borders */
const LC3_FLOAT scATHFx[MAX_LGW - 2] = { .455444335937500 , 0.930755615234375 , 0.973083496093750 , 0.999969482421875 , 0.908508300781250 , 0.775665283203125 , 0.5 }; const LC3_FLOAT scATHFx[MAX_LGW - 2] = { .455444335937500 , 0.930755615234375 , 0.973083496093750 , 0.999969482421875 , 0.908508300781250 , 0.775665283203125 , 0.5 };
#endif
   
const LC3_FLOAT PhECU_whr16ms_NB[128]={ const LC3_FLOAT PhECU_whr16ms_NB[128]={
8.000000000000002e-02, 8.393536376804722e-02, 9.567411990702857e-02, 1.150154150448081e-01, 1.416283142591582e-01, 8.000000000000002e-02, 8.393536376804722e-02, 9.567411990702857e-02, 1.150154150448081e-01, 1.416283142591582e-01,
...@@ -6330,7 +6312,7 @@ const LC3_INT* ACC_COEFF_PER_BAND_PLC_5ms[] = { ...@@ -6330,7 +6312,7 @@ const LC3_INT* ACC_COEFF_PER_BAND_PLC_5ms[] = {
   
const LC3_INT32 mdct_grp_bins[10] = { 4, 14, 24, 44, 84, 164, 244, 324, 404, 484 }; const LC3_INT32 mdct_grp_bins[10] = { 4, 14, 24, 44, 84, 164, 244, 324, 404, 484 };
   
#if defined(CR8_A_PLC_FADEOUT_TUNING)
const LC3_INT16 plc_fadeout_param_maxlen[4] = {800, 400, 266, 200}; const LC3_INT16 plc_fadeout_param_maxlen[4] = {800, 400, 266, 200};
const LC3_INT16 plc_fadeout_param_maxbytes[4] = {27, 14, 9, 7}; const LC3_INT16 plc_fadeout_param_maxbytes[4] = {27, 14, 9, 7};
#endif
const LC3_INT16 PLC_FADEOUT_TYPE_2_SELECTOR = 10; /* can take values from 0 to 10, default is 10 for longer fadeout */
/****************************************************************************** /******************************************************************************
* ETSI TS 103 634 V1.4.3 * * ETSI TS 103 634 V1.5.1 *
* Low Complexity Communication Codec Plus (LC3plus) * * Low Complexity Communication Codec Plus (LC3plus) *
* * * *
* Copyright licence is solely granted through ETSI Intellectual Property * * Copyright licence is solely granted through ETSI Intellectual Property *
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
* estoppel or otherwise. * * estoppel or otherwise. *
******************************************************************************/ ******************************************************************************/
#ifndef CONSTANTS_H #ifndef CONSTANTS_H
#define CONSTANTS_H #define CONSTANTS_H
...@@ -114,7 +113,6 @@ extern const LC3_INT bands_number_2_5ms_HR[6]; ...@@ -114,7 +113,6 @@ extern const LC3_INT bands_number_2_5ms_HR[6];
extern const LC3_INT BW_cutoff_bin_all_2_5ms[MAX_BW_BANDS_NUMBER]; extern const LC3_INT BW_cutoff_bin_all_2_5ms[MAX_BW_BANDS_NUMBER];
extern const LC3_INT bands_number_2_5ms[5]; extern const LC3_INT bands_number_2_5ms[5];
extern const LC3_INT BW_warp_idx_start_16k_5ms[4]; extern const LC3_INT BW_warp_idx_start_16k_5ms[4];
extern const LC3_INT BW_warp_idx_stop_16k_5ms[4]; extern const LC3_INT BW_warp_idx_stop_16k_5ms[4];
extern const LC3_INT BW_warp_idx_start_24k_5ms[4]; extern const LC3_INT BW_warp_idx_start_24k_5ms[4];
...@@ -132,7 +130,6 @@ extern const LC3_INT BW_cutoff_bin_all_5ms_HR[MAX_BW_BANDS_NUMBER]; ...@@ -132,7 +130,6 @@ extern const LC3_INT BW_cutoff_bin_all_5ms_HR[MAX_BW_BANDS_NUMBER];
extern const LC3_INT BW_cutoff_bin_all[MAX_BW_BANDS_NUMBER]; extern const LC3_INT BW_cutoff_bin_all[MAX_BW_BANDS_NUMBER];
extern const LC3_INT BW_cutoff_bits_all[MAX_BW_BANDS_NUMBER]; extern const LC3_INT BW_cutoff_bits_all[MAX_BW_BANDS_NUMBER];
#ifdef CR8_G_ADD_75MS
extern const LC3_INT BW_cutoff_bin_all_7_5ms[MAX_BW_BANDS_NUMBER]; extern const LC3_INT BW_cutoff_bin_all_7_5ms[MAX_BW_BANDS_NUMBER];
extern const LC3_INT bands_number_7_5ms[6]; extern const LC3_INT bands_number_7_5ms[6];
extern const LC3_INT bands_number_7_5ms_HR[6]; extern const LC3_INT bands_number_7_5ms_HR[6];
...@@ -140,7 +137,6 @@ extern const LC3_INT* BW_warp_idx_start_all_7_5ms[4]; ...@@ -140,7 +137,6 @@ extern const LC3_INT* BW_warp_idx_start_all_7_5ms[4];
extern const LC3_INT* BW_warp_idx_stop_all_7_5ms[4]; extern const LC3_INT* BW_warp_idx_stop_all_7_5ms[4];
extern const LC3_INT brickwall_dist_7_5ms[4]; extern const LC3_INT brickwall_dist_7_5ms[4];
extern const LC3_INT* ACC_COEFF_PER_BAND_PLC_7_5ms[]; extern const LC3_INT* ACC_COEFF_PER_BAND_PLC_7_5ms[];
#endif
/* Arithmetic coding */ /* Arithmetic coding */
extern const LC3_INT tns_cf[8][18]; extern const LC3_INT tns_cf[8][18];
...@@ -172,10 +168,8 @@ extern const LC3_FLOAT MDCT_WINDOW_480_5ms[480]; ...@@ -172,10 +168,8 @@ extern const LC3_FLOAT MDCT_WINDOW_480_5ms[480];
extern const LC3_FLOAT* MDCT_WINS_5ms[2][6]; extern const LC3_FLOAT* MDCT_WINS_5ms[2][6];
extern const LC3_INT MDCT_la_zeroes_5ms[6]; extern const LC3_INT MDCT_la_zeroes_5ms[6];
#ifdef CR8_G_ADD_75MS
extern const LC3_FLOAT* MDCT_WINS_7_5ms[2][6]; extern const LC3_FLOAT* MDCT_WINS_7_5ms[2][6];
extern const LC3_INT32 MDCT_la_zeroes_7_5ms[6]; extern const LC3_INT32 MDCT_la_zeroes_7_5ms[6];
#endif
extern const LC3_INT MDCT_WINDOWS_LENGTHS_10ms[6]; extern const LC3_INT MDCT_WINDOWS_LENGTHS_10ms[6];
extern const LC3_INT MDCT_WINDOWS_LENGTHS_7_5ms[6]; extern const LC3_INT MDCT_WINDOWS_LENGTHS_7_5ms[6];
...@@ -189,10 +183,8 @@ extern const LC3_INT* ACC_COEFF_PER_BAND_HR[6]; ...@@ -189,10 +183,8 @@ extern const LC3_INT* ACC_COEFF_PER_BAND_HR[6];
extern const LC3_INT* ACC_COEFF_PER_BAND_2_5ms_HR[6]; extern const LC3_INT* ACC_COEFF_PER_BAND_2_5ms_HR[6];
extern const LC3_INT* ACC_COEFF_PER_BAND_2_5ms[5]; extern const LC3_INT* ACC_COEFF_PER_BAND_2_5ms[5];
#ifdef CR8_G_ADD_75MS
extern const LC3_INT* ACC_COEFF_PER_BAND_7_5ms_HR[6]; extern const LC3_INT* ACC_COEFF_PER_BAND_7_5ms_HR[6];
extern const LC3_INT* ACC_COEFF_PER_BAND_7_5ms[5]; extern const LC3_INT* ACC_COEFF_PER_BAND_7_5ms[5];
#endif
extern const LC3_INT* ACC_COEFF_PER_BAND_5ms_HR[6]; extern const LC3_INT* ACC_COEFF_PER_BAND_5ms_HR[6];
extern const LC3_INT* ACC_COEFF_PER_BAND_5ms[5]; extern const LC3_INT* ACC_COEFF_PER_BAND_5ms[5];
...@@ -200,20 +192,16 @@ extern const LC3_INT* ACC_COEFF_PER_BAND_5ms[5]; ...@@ -200,20 +192,16 @@ extern const LC3_INT* ACC_COEFF_PER_BAND_5ms[5];
/* Near Nyquist detector */ /* Near Nyquist detector */
extern const LC3_INT NN_thresh; extern const LC3_INT NN_thresh;
/* Tone detector */ /* Tone detector */
#ifdef CR8_E_TONE_DETECTOR
extern const LC3_INT32 TD_HR_thresh_10ms; extern const LC3_INT32 TD_HR_thresh_10ms;
extern const LC3_INT32 TD_HR_thresh_7_5ms; extern const LC3_INT32 TD_HR_thresh_7_5ms;
extern const LC3_INT32 TD_HR_thresh_5ms; extern const LC3_INT32 TD_HR_thresh_5ms;
extern const LC3_INT32 TD_HR_thresh_2_5ms; extern const LC3_INT32 TD_HR_thresh_2_5ms;
#endif // CR8_E_TONE_DETECTOR
extern const LC3_INT32 xavg_N_grp[5]; extern const LC3_INT32 xavg_N_grp[5];
extern const LC3_FLOAT *hannOla_wins[5]; extern const LC3_FLOAT *hannOla_wins[5];
extern const LC3_INT32 gwlpr[MAX_LGW+1]; extern const LC3_INT32 gwlpr[MAX_LGW+1];
#ifdef CR8_A_PLC_FADEOUT_TUNING
extern const LC3_INT16 fade_scheme_tab[24 / 2][3]; extern const LC3_INT16 fade_scheme_tab[24 / 2][3];
extern const LC3_FLOAT scATHFx[MAX_LGW - 2]; extern const LC3_FLOAT scATHFx[MAX_LGW - 2];
#endif
extern const LC3_INT32 mdct_grp_bins[10]; extern const LC3_INT32 mdct_grp_bins[10];
extern const LC3_FLOAT* PhECU_whr16ms_wins[5]; extern const LC3_FLOAT* PhECU_whr16ms_wins[5];
...@@ -230,9 +218,7 @@ extern const LC3_FLOAT plc_tdc_lpc_48[17]; ...@@ -230,9 +218,7 @@ extern const LC3_FLOAT plc_tdc_lpc_48[17];
extern const LC3_FLOAT plc_tdc_lpc_96[17]; extern const LC3_FLOAT plc_tdc_lpc_96[17];
extern const LC3_FLOAT plc_tdc_lpc_8_25ms[9]; extern const LC3_FLOAT plc_tdc_lpc_8_25ms[9];
#if defined(CR8_A_PLC_FADEOUT_TUNING)
extern const LC3_INT16 plc_fadeout_param_maxlen[4]; extern const LC3_INT16 plc_fadeout_param_maxlen[4];
extern const LC3_INT16 plc_fadeout_param_maxbytes[4]; extern const LC3_INT16 plc_fadeout_param_maxbytes[4];
#endif extern const LC3_INT16 PLC_FADEOUT_TYPE_2_SELECTOR;
#endif /* CONSTANTS_H */ #endif /* CONSTANTS_H */
/****************************************************************************** /******************************************************************************
* ETSI TS 103 634 V1.4.3 * * ETSI TS 103 634 V1.5.1 *
* Low Complexity Communication Codec Plus (LC3plus) * * Low Complexity Communication Codec Plus (LC3plus) *
* * * *
* Copyright licence is solely granted through ETSI Intellectual Property * * Copyright licence is solely granted through ETSI Intellectual Property *
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
* estoppel or otherwise. * * estoppel or otherwise. *
******************************************************************************/ ******************************************************************************/
#include "options.h" #include "options.h"
#include "wmc_auto.h" #include "wmc_auto.h"
#include "functions.h" #include "functions.h"
......
/****************************************************************************** /******************************************************************************
* ETSI TS 103 634 V1.4.3 * * ETSI TS 103 634 V1.5.1 *
* Low Complexity Communication Codec Plus (LC3plus) * * Low Complexity Communication Codec Plus (LC3plus) *
* * * *
* Copyright licence is solely granted through ETSI Intellectual Property * * Copyright licence is solely granted through ETSI Intellectual Property *
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
* estoppel or otherwise. * * estoppel or otherwise. *
******************************************************************************/ ******************************************************************************/
#include "options.h" #include "options.h"
#include "wmc_auto.h" #include "wmc_auto.h"
#include "functions.h" #include "functions.h"
...@@ -56,8 +55,8 @@ void dct4_init(Dct4* dct, int length) ...@@ -56,8 +55,8 @@ void dct4_init(Dct4* dct, int length)
dct->twid1 = calloc(sizeof(*dct->twid1), length / 2); dct->twid1 = calloc(sizeof(*dct->twid1), length / 2);
dct->twid2 = calloc(sizeof(*dct->twid2), length / 2); dct->twid2 = calloc(sizeof(*dct->twid2), length / 2);
for (i = 0; i < length / 2; i++) { for (i = 0; i < length / 2; i++) {
dct->twid1[i] = cexpi(-(LC3_FLOAT)M_PI * (i + (LC3_FLOAT)0.25) / length); dct->twid1[i] = cexpi(-(LC3_FLOAT)M_PI_LC3PLUS * (i + (LC3_FLOAT)0.25) / length);
dct->twid2[i] = cexpi(-(LC3_FLOAT)M_PI * i / length); dct->twid2[i] = cexpi(-(LC3_FLOAT)M_PI_LC3PLUS * i / length);
} }
fft_init(&dct->fft, length / 2); fft_init(&dct->fft, length / 2);
} }
......
/****************************************************************************** /******************************************************************************
* ETSI TS 103 634 V1.4.3 * * ETSI TS 103 634 V1.5.1 *
* Low Complexity Communication Codec Plus (LC3plus) * * Low Complexity Communication Codec Plus (LC3plus) *
* * * *
* Copyright licence is solely granted through ETSI Intellectual Property * * Copyright licence is solely granted through ETSI Intellectual Property *
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
* estoppel or otherwise. * * estoppel or otherwise. *
******************************************************************************/ ******************************************************************************/
#include "options.h" #include "options.h"
#include "wmc_auto.h" #include "wmc_auto.h"
#include "functions.h" #include "functions.h"
......
/****************************************************************************** /******************************************************************************
* ETSI TS 103 634 V1.4.3 * * ETSI TS 103 634 V1.5.1 *
* Low Complexity Communication Codec Plus (LC3plus) * * Low Complexity Communication Codec Plus (LC3plus) *
* * * *
* Copyright licence is solely granted through ETSI Intellectual Property * * Copyright licence is solely granted through ETSI Intellectual Property *
...@@ -7,12 +7,10 @@ ...@@ -7,12 +7,10 @@
* estoppel or otherwise. * * estoppel or otherwise. *
******************************************************************************/ ******************************************************************************/
#include "options.h" #include "options.h"
#include "wmc_auto.h" #include "wmc_auto.h"
#include "functions.h" #include "functions.h"
static int Dec_LC3PLUS_Channel_fl(LC3PLUS_Dec* decoder, int channel, uint8_t* bs_in, void* s_out, int bps, int bfi_ext) static int Dec_LC3PLUS_Channel_fl(LC3PLUS_Dec* decoder, int channel, uint8_t* bs_in, void* s_out, int bps, int bfi_ext)
{ {
DecSetup* h_DecSetup; DecSetup* h_DecSetup;
...@@ -65,11 +63,9 @@ static int Dec_LC3PLUS_Channel_fl(LC3PLUS_Dec* decoder, int channel, uint8_t* bs ...@@ -65,11 +63,9 @@ static int Dec_LC3PLUS_Channel_fl(LC3PLUS_Dec* decoder, int channel, uint8_t* bs
case 50: case 50:
max_bw_stopband = max_bw_stopband >> 1; max_bw_stopband = max_bw_stopband >> 1;
break; break;
#ifdef CR8_G_ADD_75MS
case 75: case 75:
max_bw_stopband = 3 * (max_bw_stopband >> 2); max_bw_stopband = 3 * (max_bw_stopband >> 2);
break; break;
#endif
case 100: case 100:
break; break;
} }
...@@ -149,9 +145,7 @@ static int Dec_LC3PLUS_Channel_fl(LC3PLUS_Dec* decoder, int channel, uint8_t* bs ...@@ -149,9 +145,7 @@ static int Dec_LC3PLUS_Channel_fl(LC3PLUS_Dec* decoder, int channel, uint8_t* bs
h_DecSetup->PlcSetup.q_d_prev, h_DecSetup->sqQdec_fl, h_DecSetup->spec_inv_idx, decoder->yLen, bfi, h_DecSetup->PlcSetup.q_d_prev, h_DecSetup->sqQdec_fl, h_DecSetup->spec_inv_idx, decoder->yLen, bfi,
decoder->frame_dms, h_DecSetup->concealMethod, h_DecSetup->ltpf_mem_pitch, h_DecSetup->ltpf_param[0], decoder->frame_dms, h_DecSetup->concealMethod, h_DecSetup->ltpf_mem_pitch, h_DecSetup->ltpf_param[0],
&h_DecSetup->PlcAdvSetup->cum_fflcAtten &h_DecSetup->PlcAdvSetup->cum_fflcAtten
#ifdef CR8_A_PLC_FADEOUT_TUNING
, h_DecSetup->PlcAdvSetup->plc_fadeout_type , h_DecSetup->PlcAdvSetup->plc_fadeout_type
#endif
); );
/* IMDCT */ /* IMDCT */
...@@ -172,9 +166,7 @@ static int Dec_LC3PLUS_Channel_fl(LC3PLUS_Dec* decoder, int channel, uint8_t* bs ...@@ -172,9 +166,7 @@ static int Dec_LC3PLUS_Channel_fl(LC3PLUS_Dec* decoder, int channel, uint8_t* bs
bfi, h_DecSetup->ltpf_param, h_DecSetup->ltpf_param_mem, h_DecSetup->ltpf_conf_beta_idx, bfi, h_DecSetup->ltpf_param, h_DecSetup->ltpf_param_mem, h_DecSetup->ltpf_conf_beta_idx,
h_DecSetup->ltpf_conf_beta, h_DecSetup->concealMethod, h_DecSetup->alpha h_DecSetup->ltpf_conf_beta, h_DecSetup->concealMethod, h_DecSetup->alpha
, &h_DecSetup->ltpf_mem_active , &h_DecSetup->ltpf_mem_active
#ifdef CR9_N_SHORT_FADE_FOR_UNSTABLE_PITCH
, &h_DecSetup->rel_pitch_change, decoder->hrmode, decoder->frame_dms , &h_DecSetup->rel_pitch_change, decoder->hrmode, decoder->frame_dms
#endif
); );
{ {
...@@ -244,9 +236,12 @@ LC3PLUS_Error Dec_LC3PLUS_fl(LC3PLUS_Dec* decoder, uint8_t* input, LC3_INT32 num ...@@ -244,9 +236,12 @@ LC3PLUS_Error Dec_LC3PLUS_fl(LC3PLUS_Dec* decoder, uint8_t* input, LC3_INT32 num
} }
bfi = Dec_LC3PLUS_Channel_fl(decoder, ch, input, output[ch], bps, bfi); bfi = Dec_LC3PLUS_Channel_fl(decoder, ch, input, output[ch], bps, bfi);
if (input != NULL)
{
input += decoder->channel_setup[ch]->targetBytes; input += decoder->channel_setup[ch]->targetBytes;
} }
} }
}
else else
{ {
decoder->epmr = LC3PLUS_EPMR_HIGH_NC; decoder->epmr = LC3PLUS_EPMR_HIGH_NC;
...@@ -275,7 +270,11 @@ LC3PLUS_Error Dec_LC3PLUS_fl(LC3PLUS_Dec* decoder, uint8_t* input, LC3_INT32 num ...@@ -275,7 +270,11 @@ LC3PLUS_Error Dec_LC3PLUS_fl(LC3PLUS_Dec* decoder, uint8_t* input, LC3_INT32 num
channel_bfi = 1; channel_bfi = 1;
} }
if (input != NULL)
{
input = input + np_zero; input = input + np_zero;
}
decoder->n_pc = MAX(decoder->n_pc - (2 * np_zero), 0); decoder->n_pc = MAX(decoder->n_pc - (2 * np_zero), 0);
if (channel_bfi == 2) if (channel_bfi == 2)
...@@ -313,8 +312,11 @@ LC3PLUS_Error Dec_LC3PLUS_fl(LC3PLUS_Dec* decoder, uint8_t* input, LC3_INT32 num ...@@ -313,8 +312,11 @@ LC3PLUS_Error Dec_LC3PLUS_fl(LC3PLUS_Dec* decoder, uint8_t* input, LC3_INT32 num
channel_bfi = Dec_LC3PLUS_Channel_fl(decoder, ch, input, output[ch], bps, channel_bfi); channel_bfi = Dec_LC3PLUS_Channel_fl(decoder, ch, input, output[ch], bps, channel_bfi);
out_bfi |= channel_bfi; out_bfi |= channel_bfi;
if (input != NULL)
{
input += fec_num_bytes; input += fec_num_bytes;
} }
}
bfi = out_bfi & 1; bfi = out_bfi & 1;
} }
...@@ -360,14 +362,16 @@ LC3PLUS_Error Dec_LC3PLUS_fl(LC3PLUS_Dec* decoder, uint8_t* input, LC3_INT32 num ...@@ -360,14 +362,16 @@ LC3PLUS_Error Dec_LC3PLUS_fl(LC3PLUS_Dec* decoder, uint8_t* input, LC3_INT32 num
} }
bfi = Dec_LC3PLUS_Channel_fl(decoder, ch, input, output[ch], bps, bfi); bfi = Dec_LC3PLUS_Channel_fl(decoder, ch, input, output[ch], bps, bfi);
if (input != NULL)
{
input += decoder->channel_setup[ch]->targetBytes; input += decoder->channel_setup[ch]->targetBytes;
} }
} }
}
if ((decoder->last_error == LC3PLUS_OK) && bfi) if ((decoder->last_error == LC3PLUS_OK) && bfi)
{ {
decoder->last_error = LC3PLUS_DECODE_ERROR; decoder->last_error = LC3PLUS_DECODE_ERROR;
} }
return bfi == 1 ? LC3PLUS_DECODE_ERROR : LC3PLUS_OK; return bfi == 1 ? LC3PLUS_DECODE_ERROR : LC3PLUS_OK;
} }