Commit ff4c6b7e authored by vaclav's avatar vaclav
Browse files

- Merge remote-tracking branch 'remotes/origin/main' into 1209-leftovers-in-ivas-sid-signalling

- rename NONBE_FIX_1209_SID_SIGNALING to FIX_1209_SID_SIGNALING
parents f3083dbf b746a955
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -233,7 +233,7 @@ 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 NONBE_FIX_1209_SID_SIGNALING
#ifdef FIX_1209_SID_SIGNALING
/*reserved*/                                  /*0x4*/                       /*      0|      0|     1 */
#else
#define SID_MULTICHANNEL                        0x4                         /*      0|      0|     1 */
+3 −1
Original line number Diff line number Diff line
@@ -172,6 +172,8 @@
#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 ################################## */

@@ -187,7 +189,7 @@
#define FIX_1139_REV_COLORATION_SHORT_T60               /* Nokia,FhG: Fix issue 1139, prevent sound coloration artefacts at very low reverberation times */
#define NONBE_FIX_1208_DFT_STEREO_PLC_BURST             /* Ericsson: Issue 1208, fix for overflow of sample offset counter for burst error in DFT Stereo PLC. */
#define FIX_1206_ZERO_OUT_IMDCT_BUFFERS_FOR_MCT_IGNORE  /* FhG: zero out all relevant imdct buffers in MCT decoding of channels with mct_chan_mode == MCT_CHAN_MODE_IGNORE */
#define NONBE_FIX_1209_SID_SIGNALING                    /* VA: issue 1209: remove dead code in IVAS SID signaling */
#define NONBE_1199_OMASA_JBM_BRATE_SW_FLUSH             /* VA: issue 1199: fix bug in renderer flush in OMASA JBM bitrate switching */

/* ##################### End NON-BE switches ########################### */

+17 −5
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ ivas_error ivas_dec_get_format(
    int32_t ivas_total_brate;
    uint16_t *bit_stream_orig;
    AUDIO_CONFIG signaled_config;
#ifdef NONBE_FIX_1209_SID_SIGNALING
#ifdef FIX_1209_SID_SIGNALING
    ivas_error error;
#endif

@@ -123,7 +123,7 @@ ivas_error ivas_dec_get_format(
     * Read IVAS format
     *-------------------------------------------------------------------*/

#ifdef NONBE_FIX_1209_SID_SIGNALING
#ifdef FIX_1209_SID_SIGNALING
    if ( ( error = ivas_read_format( st_ivas, &num_bits_read ) ) != IVAS_ERR_OK )
    {
        return error;
@@ -495,7 +495,7 @@ ivas_error ivas_dec_setup(
     * Read IVAS format
     *-------------------------------------------------------------------*/

#ifdef NONBE_FIX_1209_SID_SIGNALING
#ifdef FIX_1209_SID_SIGNALING
    if ( ( error = ivas_read_format( st_ivas, &num_bits_read ) ) != IVAS_ERR_OK )
    {
        return error;
@@ -589,6 +589,9 @@ ivas_error ivas_dec_setup(
            }

            /* this should be non-zero if original input format was MASA_ISM_FORMAT */
#ifdef NONBE_1199_OMASA_JBM_BRATE_SW_FLUSH
            st_ivas->ism_mode = ISM_MODE_NONE;
#endif
            st_ivas->nchan_ism = st_ivas->bit_stream[( ivas_total_brate / FRAMES_PER_SEC ) - 3] + 2 * st_ivas->bit_stream[( ivas_total_brate / FRAMES_PER_SEC ) - 2];

            if ( st_ivas->nchan_ism > 0 )
@@ -606,6 +609,7 @@ ivas_error ivas_dec_setup(
                {
                    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*/
                st_ivas->nchan_transport = 2;
                element_mode_flag = 1;
@@ -849,6 +853,14 @@ ivas_error ivas_dec_setup(
            }
        }

#ifdef NONBE_1199_OMASA_JBM_BRATE_SW_FLUSH
        if ( st_ivas->ini_frame > 0 && st_ivas->ivas_format == MASA_FORMAT )
        {
            st_ivas->nchan_ism = 0;
            st_ivas->ism_mode = ISM_MODE_NONE;
        }

#endif
        if ( st_ivas->ivas_format == ISM_FORMAT )
        {
            ISM_MODE last_ism_mode = st_ivas->ism_mode;
@@ -1054,7 +1066,7 @@ static ivas_error ivas_read_format(
            case SID_ISM:
                st_ivas->ivas_format = ISM_FORMAT;
                break;
#ifndef NONBE_FIX_1209_SID_SIGNALING
#ifndef FIX_1209_SID_SIGNALING
            case SID_MULTICHANNEL:
                st_ivas->ivas_format = MC_FORMAT;
                break;
@@ -1083,7 +1095,7 @@ static ivas_error ivas_read_format(
                }
                break;
            default:
#ifndef NONBE_FIX_1209_SID_SIGNALING
#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 );
+3 −1
Original line number Diff line number Diff line
@@ -151,7 +151,7 @@ ivas_error ivas_masa_decode(
    {
        if ( !( ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCMASA ) )
        {
#ifdef FIX_HRTF_LOAD
#if ( defined FIX_HRTF_LOAD || defined NONBE_1199_OMASA_JBM_BRATE_SW_FLUSH )
            if ( ivas_format == MASA_FORMAT )
            {
                /* re-read the number of objects, needed in case of bad frame  */
@@ -1490,6 +1490,7 @@ ivas_error ivas_masa_dec_reconfigure(

    ivas_masa_set_elements( ivas_total_brate, st_ivas->mc_mode, st_ivas->nchan_transport, st_ivas->hQMetaData, &tmp, &tmp, &tmp, st_ivas->ivas_format, st_ivas->ism_mode, ism_total_brate );

#ifndef NONBE_1199_OMASA_JBM_BRATE_SW_FLUSH
    if ( st_ivas->ivas_format == MASA_FORMAT )
    {
        if ( st_ivas->hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_EXTERNAL )
@@ -1501,6 +1502,7 @@ ivas_error ivas_masa_dec_reconfigure(
        st_ivas->ism_mode = ISM_MODE_NONE;
    }

#endif
    {
        int16_t tc_nchan_to_allocate;
        int16_t tc_nchan_transport;
+2 −0
Original line number Diff line number Diff line
@@ -1146,11 +1146,13 @@ ivas_error IVAS_DEC_ReadFormat(

            // st_ivas->nchan_transport = nchan_transport_old; // ToDo: temporarily deactivated to keep FIX_HRTF_LOAD bit-exact but this is likely a bug in the main -> see issue #1200

#ifndef NONBE_1199_OMASA_JBM_BRATE_SW_FLUSH
            if ( st_ivas->ivas_format == MASA_FORMAT )
            {
                st_ivas->nchan_ism = 0; // ToDo: temporary hack to keep FIX_HRTF_LOAD bit-exact but this is likely a bug in the main -> see issue #1199
            }

#endif
            if ( tc_granularity_new < st_ivas->hTcBuffer->n_samples_granularity )
            {
                if ( ( error = ivas_jbm_dec_flush_renderer( st_ivas, tc_granularity_new, renderer_type_old, intern_config_old, &st_ivas->hIntSetup, mc_mode_old, ism_mode_old, &hIvasDec->nSamplesFlushed, pcm_type_API_to_internal( hIvasDec->pcmType ), hIvasDec->flushbuffer ) ) != IVAS_ERR_OK )
Loading