diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index 105c0e8057fc08f9b1f63be8e0b0aa4d3fc8771d..4e6ad47f249fe7551212aed8faafc94327e2836c 100755 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -233,7 +233,11 @@ typedef enum #define SID_MDCT_STEREO 0x1 /* 1| 0| 0 */ #define SID_ISM 0x2 /* 0| 1| 0 */ #define SID_MASA_1TC 0x3 /* 1| 1| 0 */ +#ifdef FIX_1209_SID_SIGNALING +/*reserved*/ /*0x4*/ /* 0| 0| 1 */ +#else #define SID_MULTICHANNEL 0x4 /* 0| 0| 1 */ +#endif #define SID_SBA_1TC 0x5 /* 1| 0| 1 */ #define SID_SBA_2TC 0x6 /* 0| 1| 1 */ #define SID_MASA_2TC 0x7 /* 1| 1| 1 */ diff --git a/lib_com/options.h b/lib_com/options.h index f57c066bdcdefe19f1af1bc5269877a3cb79e635..b82706a7eb022af29454c4379f57ddff739baeef 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -174,6 +174,7 @@ #define FIX_587_DEFAULT_REVERB /* Philips: issue 587: inconsistent default reverb parameters across renderers */ #define FIX_HRTF_LOAD /* VA: issue 1187: fix memory issue when HRTFs are loaded from a binary file */ +#define FIX_1209_SID_SIGNALING /* VA: issue 1209: remove dead code in IVAS SID signaling */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 006f23216a7731f1839d2202946704a839e12750..0984693976cbb8908ff984c5fa9693f84e23018b 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -109,6 +109,9 @@ ivas_error ivas_dec_get_format( int32_t ivas_total_brate; uint16_t *bit_stream_orig; AUDIO_CONFIG signaled_config; +#ifdef FIX_1209_SID_SIGNALING + ivas_error error; +#endif num_bits_read = 0; element_mode_flag = 0; @@ -120,7 +123,14 @@ ivas_error ivas_dec_get_format( * Read IVAS format *-------------------------------------------------------------------*/ +#ifdef FIX_1209_SID_SIGNALING + if ( ( error = ivas_read_format( st_ivas, &num_bits_read ) ) != IVAS_ERR_OK ) + { + return error; + } +#else ivas_read_format( st_ivas, &num_bits_read ); +#endif if ( st_ivas->ini_frame > 0 && st_ivas->ivas_format != st_ivas->last_ivas_format && !( st_ivas->ivas_format == MASA_FORMAT && st_ivas->last_ivas_format == MASA_ISM_FORMAT ) && @@ -485,7 +495,14 @@ ivas_error ivas_dec_setup( * Read IVAS format *-------------------------------------------------------------------*/ +#ifdef FIX_1209_SID_SIGNALING + if ( ( error = ivas_read_format( st_ivas, &num_bits_read ) ) != IVAS_ERR_OK ) + { + return error; + } +#else ivas_read_format( st_ivas, &num_bits_read ); +#endif /*-------------------------------------------------------------------* * Read other signling (ISM/MC mode, number of channels, etc.) @@ -1048,11 +1065,12 @@ static ivas_error ivas_read_format( break; case SID_ISM: st_ivas->ivas_format = ISM_FORMAT; - break; +#ifndef FIX_1209_SID_SIGNALING case SID_MULTICHANNEL: st_ivas->ivas_format = MC_FORMAT; break; +#endif case SID_SBA_1TC: st_ivas->ivas_format = SBA_FORMAT; st_ivas->element_mode_init = IVAS_SCE; @@ -1077,7 +1095,9 @@ static ivas_error ivas_read_format( } break; default: +#ifndef FIX_1209_SID_SIGNALING /* This should actually be impossible, since only 3 bits are read, so if this happens something is broken */ +#endif return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Invalid value %c found in SID format field.", st_ivas->sid_format ); } diff --git a/lib_enc/ivas_init_enc.c b/lib_enc/ivas_init_enc.c index 48a3286a4ed55b74249f954b260f6663d7e8b706..c4ad5e3c9cadae7f1c40fcf244126a462d78312b 100644 --- a/lib_enc/ivas_init_enc.c +++ b/lib_enc/ivas_init_enc.c @@ -161,9 +161,11 @@ void ivas_write_format_sid( case ISM_FORMAT: ind = SID_ISM; break; +#ifndef FIX_1209_SID_SIGNALING case MC_FORMAT: ind = SID_MULTICHANNEL; break; +#endif case SBA_FORMAT: switch ( element_mode ) {