From 7d6579d0a7a6aff7fa9662aa2ed4b954a6996123 Mon Sep 17 00:00:00 2001 From: Jouni Paulus Date: Wed, 24 May 2023 15:17:06 +0200 Subject: [PATCH 1/3] issue #502: adjust the index list sizes for MASA content based on a set of items. modifications under switch FIX_502_IND_LIST_SIZE. --- lib_com/bitstream.c | 28 ++++++++++++++++++++++++++++ lib_com/options.h | 2 ++ 2 files changed, 30 insertions(+) diff --git a/lib_com/bitstream.c b/lib_com/bitstream.c index d2aae93ed4..981dc80328 100644 --- a/lib_com/bitstream.c +++ b/lib_com/bitstream.c @@ -791,7 +791,11 @@ int16_t get_ivas_max_num_indices_metadata( /* o } else if ( ivas_total_brate <= IVAS_32k ) { +#ifdef FIX_502_IND_LIST_SIZE + return 125; +#else return 110; +#endif } else if ( ivas_total_brate <= IVAS_48k ) { @@ -799,23 +803,43 @@ int16_t get_ivas_max_num_indices_metadata( /* o } else if ( ivas_total_brate <= IVAS_96k ) { +#ifdef FIX_502_IND_LIST_SIZE + return 240; +#else return 200; +#endif } else if ( ivas_total_brate <= IVAS_128k ) { +#ifdef FIX_502_IND_LIST_SIZE + return 305; +#else return 250; +#endif } else if ( ivas_total_brate <= IVAS_160k ) { +#ifdef FIX_502_IND_LIST_SIZE + return 425; +#else return 320; +#endif } else if ( ivas_total_brate <= IVAS_192k ) { +#ifdef FIX_502_IND_LIST_SIZE + return 630; +#else return 430; +#endif } else if ( ivas_total_brate <= IVAS_256k ) { +#ifdef FIX_502_IND_LIST_SIZE + return 850; +#else return 600; +#endif } else if ( ivas_total_brate <= IVAS_384k ) { @@ -823,7 +847,11 @@ int16_t get_ivas_max_num_indices_metadata( /* o } else { +#ifdef FIX_502_IND_LIST_SIZE + return 1750; +#else return 1500; +#endif } } else if ( ivas_format == MC_FORMAT ) diff --git a/lib_com/options.h b/lib_com/options.h index bc6458d295..8d441cb9f1 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -208,6 +208,8 @@ #define FIX_485_STATIC_BUFFERS /* FhG: move static buffers in DirAC parameter estimator to the DirAC struct */ +#define FIX_502_IND_LIST_SIZE /* Fix issue #502: insufficient index buffer sizes */ + /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ -- GitLab From 548d03a3f9d9da9aa4befdd71d02e7ecab86470e Mon Sep 17 00:00:00 2001 From: Jouni Paulus Date: Thu, 25 May 2023 09:51:33 +0200 Subject: [PATCH 2/3] adjust the index buffer size for MASA 48kbps --- lib_com/bitstream.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib_com/bitstream.c b/lib_com/bitstream.c index 981dc80328..5ba6577faf 100644 --- a/lib_com/bitstream.c +++ b/lib_com/bitstream.c @@ -799,7 +799,11 @@ int16_t get_ivas_max_num_indices_metadata( /* o } else if ( ivas_total_brate <= IVAS_48k ) { +#ifdef FIX_502_IND_LIST_SIZE + return 205; +#else return 180; +#endif } else if ( ivas_total_brate <= IVAS_96k ) { -- GitLab From 24f08b2668644a309c0b02c6184eb3842760e2bd Mon Sep 17 00:00:00 2001 From: Jouni Paulus Date: Thu, 25 May 2023 15:01:12 +0200 Subject: [PATCH 3/3] adjust the metadata index buffer size for McMASA 32-64kbps --- lib_com/bitstream.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib_com/bitstream.c b/lib_com/bitstream.c index 5ba6577faf..04fdb8fe0b 100644 --- a/lib_com/bitstream.c +++ b/lib_com/bitstream.c @@ -870,7 +870,11 @@ int16_t get_ivas_max_num_indices_metadata( /* o } else if ( ivas_total_brate <= IVAS_64k ) { +#ifdef FIX_502_IND_LIST_SIZE + return 210; +#else return 200; +#endif } else if ( ivas_total_brate <= IVAS_96k ) { -- GitLab