diff --git a/Workspace_msvc/lib_lc3plus.vcxproj b/Workspace_msvc/lib_lc3plus.vcxproj
index 55a291fa9c768769f213dac4423688e2db81f8e3..3f1527357ad6c96d8629a85f7ab3937e82fb3bb0 100644
--- a/Workspace_msvc/lib_lc3plus.vcxproj
+++ b/Workspace_msvc/lib_lc3plus.vcxproj
@@ -106,7 +106,6 @@
-
@@ -116,13 +115,13 @@
-
-
+
+
-
+
@@ -133,35 +132,36 @@
+
-
-
-
+
+
+
+
-
-
-
+
+
+
-
@@ -169,14 +169,12 @@
-
-
-
-
+
+
+
+
-
-
diff --git a/lib_isar/isar_lc3plus_common.c b/lib_isar/isar_lc3plus_common.c
index 4236c9ced7cc64a4615b798d79b0ab1a0ac14300..a186908990ca5366ef81bb6e5a5b53c8726eb6fc 100644
--- a/lib_isar/isar_lc3plus_common.c
+++ b/lib_isar/isar_lc3plus_common.c
@@ -33,7 +33,7 @@
#include "options.h"
#include "isar_lc3plus_common.h"
#include "ivas_error.h"
-#include "lc3.h"
+#include "lc3plus.h"
/*-----------------------------------------------------------------------------------------*
* Function ISAR_LC3PLUS_LC3plusErrToIvasErr()
diff --git a/lib_isar/isar_lc3plus_common.h b/lib_isar/isar_lc3plus_common.h
index b99348e0ed33b2269ce7e5b9e41d2715c8102712..eb3e7b0ad2d7d245c046cd7fc7699d7a178b8b78 100644
--- a/lib_isar/isar_lc3plus_common.h
+++ b/lib_isar/isar_lc3plus_common.h
@@ -37,7 +37,7 @@
#include
#include "options.h"
#include "ivas_error.h"
-#include "lc3.h"
+#include "lc3plus.h"
#include "isar_lc3plus_payload.h"
/*! common configuration parameters between encoder and decoder */
diff --git a/lib_isar/isar_lc3plus_dec.c b/lib_isar/isar_lc3plus_dec.c
index 560f34f1c46077a88416829e3c748c11caf75e2b..c5d78f444684b1433894114ea9f1377ee9a49e4b 100644
--- a/lib_isar/isar_lc3plus_dec.c
+++ b/lib_isar/isar_lc3plus_dec.c
@@ -36,7 +36,7 @@
#include "ivas_prot.h"
#include "isar_lc3plus_dec.h"
#include "isar_lc3plus_common.h"
-#include "lc3.h"
+#include "lc3plus.h"
#include "ivas_error_utils.h"
#include "wmc_auto.h"
diff --git a/lib_isar/isar_lc3plus_dec.h b/lib_isar/isar_lc3plus_dec.h
index 82b9e51e1948a81bed58b6e63dbb49b88a5033d0..d5cb37aaa917dfc2dc004a1ca7b64a6ad6eb3d20 100644
--- a/lib_isar/isar_lc3plus_dec.h
+++ b/lib_isar/isar_lc3plus_dec.h
@@ -35,7 +35,7 @@
#include
#include "options.h"
-#include "lc3.h"
+#include "lc3plus.h"
#include "ivas_error.h"
#include "ivas_cnst.h"
#include "isar_lc3plus_common.h"
diff --git a/lib_isar/isar_lc3plus_enc.c b/lib_isar/isar_lc3plus_enc.c
index 62a803f38fc4c72e08084c22905c7d6f00561cbc..c6e2d31334271169367f7f0695806256a7f4c049 100644
--- a/lib_isar/isar_lc3plus_enc.c
+++ b/lib_isar/isar_lc3plus_enc.c
@@ -32,7 +32,7 @@
#include "isar_lc3plus_enc.h"
#include "isar_lc3plus_common.h"
-#include "lc3.h"
+#include "lc3plus.h"
#include "ivas_error_utils.h"
#include "prot.h"
#include "wmc_auto.h"
diff --git a/lib_isar/isar_lc3plus_enc.h b/lib_isar/isar_lc3plus_enc.h
index 9c80033fd36a9d7fea205bd63bb9497611131167..ed6c526011d7a4861dd040ae4d6b3696437aa578 100644
--- a/lib_isar/isar_lc3plus_enc.h
+++ b/lib_isar/isar_lc3plus_enc.h
@@ -35,7 +35,7 @@
#include
#include "ivas_error.h"
-#include "lc3.h"
+#include "lc3plus.h"
#include "isar_lc3plus_common.h"
#include "isar_lc3plus_payload.h"
diff --git a/lib_isar/isar_lc3plus_payload.h b/lib_isar/isar_lc3plus_payload.h
index e95128578493f5561fdcb2292aef37f0c202e428..580a58ca651defe96eeb84229b8f07b3407a756c 100644
--- a/lib_isar/isar_lc3plus_payload.h
+++ b/lib_isar/isar_lc3plus_payload.h
@@ -35,7 +35,7 @@
#include
#include
-#include "lc3.h"
+#include "lc3plus.h"
#include "options.h"
diff --git a/lib_lc3plus/functions.h b/lib_lc3plus/functions.h
index 46daa64bf3f3757f8f546a4c2d5c878a7924eb2b..a2f4857b2ae4a3d10511b5e08249d95a73634be4 100644
--- a/lib_lc3plus/functions.h
+++ b/lib_lc3plus/functions.h
@@ -15,9 +15,9 @@
#include "clib.h"
#include "defines.h"
#include "float.h"
-#include "lc3.h"
-#include "setup_dec_lc3.h"
-#include "setup_enc_lc3.h"
+#include "lc3plus.h"
+#include "setup_dec_lc3plus.h"
+#include "setup_enc_lc3plus.h"
#include "structs.h"
#include "util.h"
diff --git a/lib_lc3plus/lc3.c b/lib_lc3plus/lc3plus.c
similarity index 99%
rename from lib_lc3plus/lc3.c
rename to lib_lc3plus/lc3plus.c
index b275ed8084fc1b1caa5cce48e6ef18db7fa1af86..d208cfb1512bfd8a028e01bca5b8db1bfa0efbfa 100644
--- a/lib_lc3plus/lc3.c
+++ b/lib_lc3plus/lc3plus.c
@@ -9,13 +9,13 @@
#include "options.h"
#include "wmc_auto.h"
-#include "lc3.h"
+#include "lc3plus.h"
#include "defines.h"
#include "functions.h"
#include
-#include "setup_dec_lc3.h"
-#include "setup_enc_lc3.h"
+#include "setup_dec_lc3plus.h"
+#include "setup_enc_lc3plus.h"
#define RETURN_IF(cond, error) \
if (cond) \
diff --git a/lib_lc3plus/lc3.h b/lib_lc3plus/lc3plus.h
similarity index 99%
rename from lib_lc3plus/lc3.h
rename to lib_lc3plus/lc3plus.h
index b5f8809e7e167302c30da51e2989743d09fd21fe..063714467da07d43f63d214cbfcec5eb13ff507c 100644
--- a/lib_lc3plus/lc3.h
+++ b/lib_lc3plus/lc3plus.h
@@ -7,7 +7,7 @@
* estoppel or otherwise. *
******************************************************************************/
-/*! \file lc3.h
+/*! \file lc3plus.h
* This header provides the API for LC3plus.
*
* This library is targeting devices with extreme memory limitations, so memory management
diff --git a/lib_lc3plus/setup_com_lc3.c b/lib_lc3plus/setup_com_lc3plus.c
similarity index 100%
rename from lib_lc3plus/setup_com_lc3.c
rename to lib_lc3plus/setup_com_lc3plus.c
diff --git a/lib_lc3plus/setup_dec_lc3.c b/lib_lc3plus/setup_dec_lc3plus.c
similarity index 99%
rename from lib_lc3plus/setup_dec_lc3.c
rename to lib_lc3plus/setup_dec_lc3plus.c
index 7bdbf0523da2e9867aa93f84029a261739b6384c..9e9a5ea64e021c3669e4b439ac19bd22f9f1c43c 100644
--- a/lib_lc3plus/setup_dec_lc3.c
+++ b/lib_lc3plus/setup_dec_lc3plus.c
@@ -9,7 +9,7 @@
#include "options.h"
#include "wmc_auto.h"
-#include "setup_dec_lc3.h"
+#include "setup_dec_lc3plus.h"
#include "functions.h"
#include
#include
diff --git a/lib_lc3plus/setup_dec_lc3.h b/lib_lc3plus/setup_dec_lc3plus.h
similarity index 100%
rename from lib_lc3plus/setup_dec_lc3.h
rename to lib_lc3plus/setup_dec_lc3plus.h
diff --git a/lib_lc3plus/setup_enc_lc3.c b/lib_lc3plus/setup_enc_lc3plus.c
similarity index 99%
rename from lib_lc3plus/setup_enc_lc3.c
rename to lib_lc3plus/setup_enc_lc3plus.c
index 750a97bb043fb78f7c3f3f0f6149c470dd8e233d..80bd909ab3268179e74cc61bf9c09e5223c570dc 100644
--- a/lib_lc3plus/setup_enc_lc3.c
+++ b/lib_lc3plus/setup_enc_lc3plus.c
@@ -9,7 +9,7 @@
#include "options.h"
#include "wmc_auto.h"
-#include "setup_enc_lc3.h"
+#include "setup_enc_lc3plus.h"
#include "functions.h"
#include
diff --git a/lib_lc3plus/setup_enc_lc3.h b/lib_lc3plus/setup_enc_lc3plus.h
similarity index 100%
rename from lib_lc3plus/setup_enc_lc3.h
rename to lib_lc3plus/setup_enc_lc3plus.h
diff --git a/scripts/lc3plus_lib_setup/get_lc3plus.sh b/scripts/lc3plus_lib_setup/get_lc3plus.sh
index d44aff06996dd9c812d29804c36602f9c3c18c38..f654768707921d45b2f6cbfbe90881cc6a528649 100755
--- a/scripts/lc3plus_lib_setup/get_lc3plus.sh
+++ b/scripts/lc3plus_lib_setup/get_lc3plus.sh
@@ -6,13 +6,13 @@ printf "Cleaning old version of LC3plus\n"
rm -rf lib_lc3plus
printf "Downloading LC3plus code\n"
-if false; then
+if true; then
# Waiting for official ETSI release.
# TODO: add new URL, remove `if false` when package goes public
- curl -o ./lc3plus_sources.zip NEW_URL_HERE
+ curl -o ./lc3plus_sources.zip https://www.etsi.org/deliver/etsi_ts/103600_103699/103634/01.05.01_60/ts_103634v010501p0.zip
unzip lc3plus_sources.zip -d .
rm lc3plus_sources.zip
- cp -r "ETSI_Release//src/floating_point" lib_lc3plus
+ cp -r "ETSI_Release/LC3plus_ETSI_src_v5f640bd48cc_20240516/src/floating_point" lib_lc3plus
rm -r ETSI_Release
else
# Temp solution for downloading WIP ETSI package
@@ -59,7 +59,7 @@ sed -i 's/^#[[:space:]]\+/#/' {}
# fix for sanitizer issues
sed -i 's/st->low << 8/(LC3_INT)((LC3_UINT32)st->low << 8)/' lib_lc3plus/ari_codec.c
-sed -i 's/~3/(uintptr_t)(~3)/' lib_lc3plus/lc3.c
+sed -i 's/~3/(uintptr_t)(~3)/' lib_lc3plus/lc3plus.c
# Add .clang-format file to lib_lc3plus to disable formatting there
printf "Disabling clang-format in lib_lc3plus directory\n"
diff --git a/scripts/split_rendering/lc3plus_basop/ivas_lc3plus_unit_test.c b/scripts/split_rendering/lc3plus_basop/ivas_lc3plus_unit_test.c
index 1bba6af9d451b4f61798e085c08a0c5848be034d..7cdda5634263cb52e123897c0bf9c0215507757d 100644
--- a/scripts/split_rendering/lc3plus_basop/ivas_lc3plus_unit_test.c
+++ b/scripts/split_rendering/lc3plus_basop/ivas_lc3plus_unit_test.c
@@ -38,16 +38,9 @@ the United Nations Convention on Contracts on the International Sales of Goods.
#include "isar_lc3plus_common.h"
#include "isar_lc3plus_dec.h"
#include "ivas_error_utils.h"
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
-#include "lc3.h"
-#endif
+#include "lc3plus.h"
-#ifdef SPLIT_REND_WITH_HEAD_ROT
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
#define MAX_SAMPLES_PER_CHANNEL 960 / 4
-#else
-#define MAX_SAMPLES_PER_CHANNEL 960
-#endif
#define DEFAULT_BPS 256000
#ifndef PCM_SAMPLE_TYPEDEF_DEFINED
@@ -100,7 +93,6 @@ static int encodeAndDecodeOneStereoFrame( LC3PLUS_CONFIG config, uint32_t bps )
uint8_t *bitstream_out = malloc( bitstreamSizePerIvasFrame );
memset( bitstream_out, 0, bitstreamSizePerIvasFrame );
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
int perChannelBitrate = lc3plus_enc_get_real_bitrate(encHandle->handles[0]);
int perLc3plusFrameDataBlockOctets = encHandle->num_ftds * perChannelBitrate / 8 / (1000*1000/config.lc3plus_frame_duration_us);
int targetOctets = bps / 8 / (1000*1000/config.isar_frame_duration_us);
@@ -118,9 +110,6 @@ static int encodeAndDecodeOneStereoFrame( LC3PLUS_CONFIG config, uint32_t bps )
Word16 Q_in[16];
memset(Q_in, 0, sizeof(Q_in) );
err = ISAR_LC3PLUS_ENC_Encode( encHandle, pcm_in, bitstream_out, bitstreamSizePerIvasFrame, Q_in );
-#else
- err = ISAR_LC3PLUS_ENC_Encode( encHandle, pcm_in, bitstream_out );
-#endif
if ( IVAS_ERR_OK != err )
{
ISAR_LC3PLUS_ENC_Close( &encHandle );
@@ -200,11 +189,7 @@ static int encodeAndDecodeOneStereoFrame( LC3PLUS_CONFIG config, uint32_t bps )
static int openCloseEncoder( void )
{
ivas_error err;
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 5 * 1000, .isar_frame_duration_us = 5000, .channels = 1, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 20000, .channels = 1, .samplerate = 48000 };
-#endif
uint32_t bps = 128000;
ISAR_LC3PLUS_ENC_HANDLE encHandle;
@@ -221,36 +206,23 @@ static int openCloseEncoder( void )
static int tryOpenEncoderWithInvalidBitrate( void )
{
ivas_error err;
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 5 * 1000, .isar_frame_duration_us = 5000, .channels = 1, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 20000, .channels = 1, .samplerate = 48000 };
-#endif
/* lc3plus max bitrate is 320000 per channel */
uint32_t invalid_high_bps = 700000;
uint32_t invalid_low_bps = 8;
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
uint32_t limitedBitrate;
-#endif
ISAR_LC3PLUS_ENC_HANDLE encHandle;
err = ISAR_LC3PLUS_ENC_Open( config, invalid_high_bps, &encHandle );
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
/* setting an invalid bitrate should result in a limited bitrate*/
if ( IVAS_ERR_OK != err )
-#else
- /* setting an invalid bitrate should trigger an error - which is what we expect */
- if ( IVAS_ERR_LC3PLUS_INVALID_BITRATE != err )
-#endif
{
return 1;
}
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
limitedBitrate = lc3plus_enc_get_real_bitrate(encHandle->handles[0]);
if(limitedBitrate != 320000)
{
return 1;
}
-#endif
ISAR_LC3PLUS_ENC_Close(&encHandle);
err = ISAR_LC3PLUS_ENC_Open( config, invalid_low_bps, &encHandle );
/* setting an invalid bitrate should trigger an error - which is what we expect */
@@ -265,11 +237,7 @@ static int tryOpenEncoderWithInvalidBitrate( void )
static int tryOpenEncoderWithInvalidFrameDuration( void )
{
ivas_error err;
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 5 * 1000, .isar_frame_duration_us = 5000, .channels = 1, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 20000, .channels = 1, .samplerate = 48000 };
-#endif
config.lc3plus_frame_duration_us = 1234; /*unsupported frame duration*/
uint32_t bps = 320000;
@@ -286,11 +254,7 @@ static int tryOpenEncoderWithInvalidFrameDuration( void )
static int tryOpenEncoderWithInvalidSampleRate( void )
{
ivas_error err;
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 5 * 1000, .isar_frame_duration_us = 5000, .channels = 1, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 20000, .channels = 1, .samplerate = 48000 };
-#endif
config.samplerate = 1234; /*unsupported sample rate */
uint32_t bps = 320000;
@@ -330,22 +294,14 @@ static int tryCallEncoderApiWithInvalidParams( void )
return 1;
}
ISAR_LC3PLUS_ENC_Close( &invalidEncHandle );
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
Word16 Q_in[16];
memset(Q_in, 0, sizeof(Q_in) );
if ( IVAS_ERR_UNEXPECTED_NULL_POINTER != ISAR_LC3PLUS_ENC_Encode( invalidEncHandle, invalidPcm_in, invalidBitstream_out, bsSize, Q_in ) )
-#else
- if ( IVAS_ERR_UNEXPECTED_NULL_POINTER != ISAR_LC3PLUS_ENC_Encode( invalidEncHandle, invalidPcm_in, invalidBitstream_out ) )
-#endif
{
return 1;
}
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
memset(Q_in, 0, sizeof(Q_in) );
if ( IVAS_ERR_UNEXPECTED_NULL_POINTER != ISAR_LC3PLUS_ENC_Encode( invalidEncHandle, pcm_in, invalidBitstream_out, bsSize, Q_in) || IVAS_ERR_UNEXPECTED_NULL_POINTER != ISAR_LC3PLUS_ENC_Encode( invalidEncHandle, invalidPcm_in, bitstream_out, bsSize, Q_in ) || IVAS_ERR_UNEXPECTED_NULL_POINTER != ISAR_LC3PLUS_ENC_Encode( invalidEncHandle, pcm_in, bitstream_out, bsSize, Q_in ) )
-#else
- if ( IVAS_ERR_UNEXPECTED_NULL_POINTER != ISAR_LC3PLUS_ENC_Encode( invalidEncHandle, pcm_in, invalidBitstream_out ) || IVAS_ERR_UNEXPECTED_NULL_POINTER != ISAR_LC3PLUS_ENC_Encode( invalidEncHandle, invalidPcm_in, bitstream_out ) || IVAS_ERR_UNEXPECTED_NULL_POINTER != ISAR_LC3PLUS_ENC_Encode( invalidEncHandle, pcm_in, bitstream_out ) )
-#endif
{
return 1;
}
@@ -391,11 +347,7 @@ static int tryCallDecoderApiWithInvalidParams( void )
static int openCloseDecoderWithCaching( void )
{
ivas_error err;
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 5 * 1000, .isar_frame_duration_us = 5000, .channels = 1, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 20000, .channels = 1, .samplerate = 48000 };
-#endif
ISAR_LC3PLUS_DEC_HANDLE decHandle;
err = ISAR_LC3PLUS_DEC_Open( config,
#ifdef LC3PLUS_DEC_ALLOW_DISABLE_CACHING
@@ -414,11 +366,7 @@ static int openCloseDecoderWithCaching( void )
static int openCloseDecoderWithoutCaching( void )
{
ivas_error err;
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 5 * 1000, .isar_frame_duration_us = 5000, .channels = 1, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 20000, .channels = 1, .samplerate = 48000 };
-#endif
ISAR_LC3PLUS_DEC_HANDLE decHandle;
err = ISAR_LC3PLUS_DEC_Open( config,
#ifdef LC3PLUS_DEC_ALLOW_DISABLE_CACHING
@@ -438,11 +386,7 @@ static int openCloseDecoderWithoutCaching( void )
static int tryOpenDecoderWithInvalidFrameDuration( void )
{
ivas_error err;
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 5 * 1000, .isar_frame_duration_us = 5000, .channels = 1, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 20000, .channels = 1, .samplerate = 48000 };
-#endif
config.lc3plus_frame_duration_us = 1234; /*unsupported frame duration*/
ISAR_LC3PLUS_DEC_HANDLE decHandle;
@@ -462,11 +406,7 @@ static int tryOpenDecoderWithInvalidFrameDuration( void )
static int tryOpenDecoderWithInvalidSampleRate( void )
{
ivas_error err;
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 5 * 1000, .isar_frame_duration_us = 5000, .channels = 1, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 20000, .channels = 1, .samplerate = 48000 };
-#endif
config.samplerate = 1234; /*unsupported sample rate*/
ISAR_LC3PLUS_DEC_HANDLE decHandle;
@@ -486,11 +426,7 @@ static int tryOpenDecoderWithInvalidSampleRate( void )
static int encodeOneFrame( void )
{
ivas_error err;
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 5 * 1000, .isar_frame_duration_us = 5000, .channels = 1, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 20000, .channels = 1, .samplerate = 48000 };
-#endif
uint32_t bps = 128000;
ISAR_LC3PLUS_ENC_HANDLE encHandle;
@@ -511,14 +447,10 @@ static int encodeOneFrame( void )
return err;
uint8_t *bitstream_out = malloc( bitstreamSizePerIvasFrame );
memset( bitstream_out, 0, bitstreamSizePerIvasFrame );
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
Word16 Q_in[16];
memset(Q_in, 0, sizeof(Q_in) );
err = ISAR_LC3PLUS_ENC_Encode( encHandle, pcm, bitstream_out, bitstreamSizePerIvasFrame, Q_in );
-#else
- err = ISAR_LC3PLUS_ENC_Encode( encHandle, pcm, bitstream_out );
-#endif
if ( IVAS_ERR_OK != err )
return err;
@@ -531,11 +463,7 @@ static int encodeOneFrame( void )
static int encodeAndDecodeOneMonoFrame( void )
{
ivas_error err;
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 5 * 1000, .isar_frame_duration_us = 5000, .channels = 1, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 20000, .channels = 1, .samplerate = 48000 };
-#endif
uint32_t bps = 128000;
ISAR_LC3PLUS_ENC_HANDLE encHandle;
@@ -559,13 +487,9 @@ static int encodeAndDecodeOneMonoFrame( void )
uint8_t *bitstream_out = malloc( bitstreamSizePerIvasFrame );
memset( bitstream_out, 0, bitstreamSizePerIvasFrame );
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
Word16 Q_in[16];
memset(Q_in, 0, sizeof(Q_in) );
err = ISAR_LC3PLUS_ENC_Encode( encHandle, pcm_in, bitstream_out, bitstreamSizePerIvasFrame, Q_in );
-#else
- err = ISAR_LC3PLUS_ENC_Encode( encHandle, pcm_in, bitstream_out );
-#endif
if ( IVAS_ERR_OK != err )
return err;
ISAR_LC3PLUS_ENC_Close( &encHandle );
@@ -608,11 +532,7 @@ static int encodeAndDecodeOneMonoFrame( void )
static int encodeAndDecodeOneStereoFrameIvas20msLc3plus10ms_48kHz( void )
{
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 20 * 1000, .channels = 2, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 20 * 1000, .channels = 2, .samplerate = 48000 };
-#endif
return encodeAndDecodeOneStereoFrame( config, DEFAULT_BPS );
}
@@ -630,140 +550,84 @@ static int encodeAndDecodeOneStereoFrameIvas20msLc3plus10ms_16kHz( void )
static int encodeAndDecodeOneStereoFrameIvas5msLc3plus5ms_48kHz( void )
{
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 5 * 1000, .isar_frame_duration_us = 5 * 1000, .channels = 2, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 5 * 1000, .isar_frame_duration_us = 5 * 1000, .channels = 2, .samplerate = 48000 };
-#endif
return encodeAndDecodeOneStereoFrame( config, DEFAULT_BPS );
}
static int encodeAndDecodeOneStereoFrameIvas10msLc3plus10ms_48kHz( void )
{
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 10 * 1000, .channels = 2, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 5 * 1000, .isar_frame_duration_us = 5 * 1000, .channels = 2, .samplerate = 48000 };
-#endif
return encodeAndDecodeOneStereoFrame( config, DEFAULT_BPS );
}
static int encodeAndDecodeOneMonoFrameIvas20msLc3plus10ms_48kHz( void )
{
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 20 * 1000, .channels = 1, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 20 * 1000, .channels = 1, .samplerate = 48000 };
-#endif
return encodeAndDecodeOneStereoFrame( config, DEFAULT_BPS );
}
static int encodeAndDecodeOneMonoFrameIvas5msLc3plus5ms_48kHz( void )
{
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 5 * 1000, .isar_frame_duration_us = 5 * 1000, .channels = 1, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 5 * 1000, .isar_frame_duration_us = 5 * 1000, .channels = 1, .samplerate = 48000 };
-#endif
return encodeAndDecodeOneStereoFrame( config, DEFAULT_BPS );
}
static int encodeAndDecodeOneStereoFrameIvas20msLc3plus2_5ms_48kHz( void )
{
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 2.5 * 1000, .isar_frame_duration_us = 20 * 1000, .channels = 2, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 2.5 * 1000, .isar_frame_duration_us = 20 * 1000, .channels = 2, .samplerate = 48000 };
-#endif
return encodeAndDecodeOneStereoFrame( config, DEFAULT_BPS );
}
static int encodeAndDecodeOneStereoFrameIvas10msLc3_10ms_48kHz_80kbpsPerChannel( void )
{
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 10 * 1000, .channels = 2, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 10 * 1000, .channels = 2, .samplerate = 48000 };
-#endif
return encodeAndDecodeOneStereoFrame( config, config.channels * 82*1000 );
}
static int encodeAndDecodeOneStereoFrameIvas10msLc3_10ms_48kHz_96kbpsPerChannel( void )
{
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 10 * 1000, .channels = 2, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 10 * 1000, .channels = 2, .samplerate = 48000 };
-#endif
return encodeAndDecodeOneStereoFrame( config, config.channels * 98*1000 );
}
static int encodeAndDecodeOneStereoFrameIvas10msLc3_10ms_48kHz_124kbpsPerChannel( void )
{
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 10 * 1000, .channels = 2, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 10 * 1000, .channels = 2, .samplerate = 48000 };
-#endif
return encodeAndDecodeOneStereoFrame( config, config.channels * 126*1000 );
}
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
static int encodeAndDecodeOneStereoFrameIvas10msLc3_10ms_48kHz_800kbpsPerChannel( void )
{
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 10 * 1000, .channels = 2, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 10 * 1000, .channels = 2, .samplerate = 48000 };
-#endif
return encodeAndDecodeOneStereoFrame( config, config.channels * 800*1000 );
}
-#endif
static int encodeAndDecodeOneStereoFrameIvas10msLc3_10ms_48kHz_204800bpsPerChannel( void )
{
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 10 * 1000, .channels = 1, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 10 * 1000, .channels = 2, .samplerate = 48000 };
-#endif
return encodeAndDecodeOneStereoFrame( config, config.channels * 204800 );
}
static int encodeAndDecodeOneStereoFrameIvas10msLc3_10ms_48kHz_205600bpsPerChannel( void )
{
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 10 * 1000, .channels = 1, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 10 * 1000, .channels = 2, .samplerate = 48000 };
-#endif
return encodeAndDecodeOneStereoFrame( config, config.channels * 205600 );
}
static int encodeAndDecodeOneStereoFrameIvas10msLc3_10ms_48kHz_206400bpsPerChannel( void )
{
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 10 * 1000, .channels = 1, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 10 * 1000, .channels = 2, .samplerate = 48000 };
-#endif
return encodeAndDecodeOneStereoFrame( config, config.channels * 206400 );
}
static int encodeAndDecodeOneStereoFrameIvas10msLc3_10ms_48kHz_207200bpsPerChannel( void )
{
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 10 * 1000, .channels = 1, .samplerate = 48000, .high_res_mode_enabled = 0 };
-#else
- LC3PLUS_CONFIG config = { .lc3plus_frame_duration_us = 10 * 1000, .isar_frame_duration_us = 10 * 1000, .channels = 2, .samplerate = 48000 };
-#endif
return encodeAndDecodeOneStereoFrame( config, config.channels * 207200 );
}
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
#include "ivas_lc3plus_unit_test_payload_format.c"
-#endif
int main(
int argc,
@@ -841,11 +705,9 @@ int main(
ret = encodeAndDecodeOneStereoFrameIvas10msLc3_10ms_48kHz_124kbpsPerChannel();
if ( ret != 0 )
return 1;
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
ret = encodeAndDecodeOneStereoFrameIvas10msLc3_10ms_48kHz_800kbpsPerChannel();
if ( ret != 0 )
return 1;
-#endif
/* start configs around the FDL threshold */
ret = encodeAndDecodeOneStereoFrameIvas10msLc3_10ms_48kHz_204800bpsPerChannel();
if ( ret != 0 )
@@ -860,16 +722,8 @@ int main(
if ( ret != 0 )
return 1;
/* end configs around the FDL threshold */
-#ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS
ret = run_all_payload_tests();
if ( ret != 0 )
return 1;
-#endif
return 0;
}
-#else
-int main( void )
-{
- return EXIT_SUCCESS;
-}
-#endif /* SPLIT_REND_WITH_HEAD_ROT */
diff --git a/scripts/split_rendering/lc3plus_float/ivas_lc3plus_unit_test.c b/scripts/split_rendering/lc3plus_float/ivas_lc3plus_unit_test.c
index d2becedec9cbcc48f041b34601d5d3a5ff8adc35..c15f14b4ccfa6d8d0311950926fddb4c5cc0dc70 100644
--- a/scripts/split_rendering/lc3plus_float/ivas_lc3plus_unit_test.c
+++ b/scripts/split_rendering/lc3plus_float/ivas_lc3plus_unit_test.c
@@ -38,7 +38,7 @@ the United Nations Convention on Contracts on the International Sales of Goods.
#include "isar_lc3plus_common.h"
#include "isar_lc3plus_dec.h"
#include "ivas_error_utils.h"
-#include "lc3.h"
+#include "lc3plus.h"
#define MAX_SAMPLES_PER_CHANNEL 960 / 4
#define DEFAULT_BPS 256000