Commit 6a6f8226 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_470_MASA_JBM_EXT, FIX_564

parent 7f29d71a
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
@@ -1804,11 +1804,7 @@ static ivas_error initOnFirstGoodFrame(
#endif
                /* Duplicate good first frame metadata to fill the beginning of stream. */
                MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta = NULL;
#ifdef FIX_470_MASA_JBM_EXT
                if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK )
#else
            if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta ) ) != IVAS_ERR_OK )
#endif
                {
                    fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                    return error;
@@ -2198,11 +2194,7 @@ static ivas_error decodeG192(
#endif
            {
                MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta;
#ifdef FIX_470_MASA_JBM_EXT
                if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK )
#else
                if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta ) ) != IVAS_ERR_OK )
#endif
                {
                    fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                    goto cleanup;
@@ -2794,11 +2786,7 @@ static ivas_error decodeVoIP(
#endif
                {
                    MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta;
#ifdef FIX_470_MASA_JBM_EXT
                    if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 1 ) ) != IVAS_ERR_OK )
#else
                    if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta ) ) != IVAS_ERR_OK )
#endif
                    {
                        fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                        goto cleanup;
@@ -3239,11 +3227,7 @@ static ivas_error decodeVariableSpeed(
#endif
            {
                MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta;
#ifdef FIX_470_MASA_JBM_EXT
                if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 1 ) ) != IVAS_ERR_OK )
#else
                if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta ) ) != IVAS_ERR_OK )
#endif
                {
                    fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                    goto cleanup;
@@ -3427,11 +3411,7 @@ static ivas_error decodeVariableSpeed(
#endif
            {
                MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta;
#ifdef FIX_470_MASA_JBM_EXT
                if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK )
#else
                if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta ) ) != IVAS_ERR_OK )
#endif
                {
                    fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                    goto cleanup;
+0 −2
Original line number Diff line number Diff line
@@ -230,9 +230,7 @@ typedef enum
#define MAX_JBM_L_FRAME_NS                      40000000L
#define MAX_SPAR_INTERNAL_CHANNELS              IVAS_SPAR_MAX_CH
#define MAX_CLDFB_DIGEST_CHANNELS               4
#ifdef FIX_470_MASA_JBM_EXT
#define MASA_JBM_RINGBUFFER_FRAMES              3
#endif

typedef enum
{
+0 −4
Original line number Diff line number Diff line
@@ -873,7 +873,6 @@ int16_t ivas_jbm_dec_get_num_tc_channels(
    Decoder_Struct *st_ivas                                     /* i  : IVAS decoder handle                                         */
);

#ifdef FIX_470_MASA_JBM_EXT
void ivas_jbm_dec_get_md_map_even_spacing(
#ifndef FIX_634_MASA_JBM_UNUSED_PARAMETER
    const int16_t default_len,  /* i  : default frame length in metadata slots         */
@@ -884,7 +883,6 @@ void ivas_jbm_dec_get_md_map_even_spacing(
    const int16_t buf_len,      /* i  : length of the metadata buffer                  */
    int16_t *map                /* o  : metadata index map                             */
);
#endif

TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode(
    Decoder_Struct *st_ivas                                     /* i  : IVAS decoder handle                                         */
@@ -926,7 +924,6 @@ void ivas_jbm_dec_td_renderers_adapt_subframes(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                                      */
);

#ifdef FIX_470_MASA_JBM_EXT
ivas_error ivas_jbm_dec_metadata_open(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                                      */
);
@@ -934,7 +931,6 @@ ivas_error ivas_jbm_dec_metadata_open(
void ivas_jbm_masa_sf_to_sf_map(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                                      */
);
#endif


/*----------------------------------------------------------------------------------*
+0 −2
Original line number Diff line number Diff line
@@ -149,8 +149,6 @@
/* only BE switches wrt operation points tested in selection */

/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define FIX_470_MASA_JBM_EXT                            /* Nokia: Issue 470, fix MASA EXT output with JBM */
#define FIX_564                                         /* Nokia: Issue 564: Fix gains in JBM path for SBA with parametric binaural renderer */
#define FIX_559_EXTL_IGF_MISMATCH                       /* VA: issue 559: fix mismatch between st->extl and st->igf observed as crash in PlanarSBA bitrate switching */
#define FIX_571_REVERB_NOT_ACTIVATED_ISM                /* Philips: Issue 571: Reverb not activated for discrete and parametric ISM */

+0 −36
Original line number Diff line number Diff line
@@ -515,26 +515,8 @@ ivas_error ivas_dec(
        }
        else if ( st_ivas->ivas_format == SBA_FORMAT && ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) )
        {
#ifdef FIX_564
            /* loudness correction */
            ivas_dirac_dec_binaural_sba_gain( output, nchan_remapped, output_frame );
#else
            float gain;

            if ( nchan_remapped == 1 )
            {
                gain = 1.4454f;
            }
            else
            {
                gain = 1.3657f;
            }

            for ( n = 0; n < nchan_remapped; n++ )
            {
                v_multc( output[n], gain, output[n], output_frame );
            }
#endif
        }

        /* Loudspeakers, Ambisonics or Binaural rendering */
@@ -801,26 +783,8 @@ ivas_error ivas_dec(

        if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM )
        {
#ifdef FIX_564
            /* loudness correction */
            ivas_dirac_dec_binaural_sba_gain( &output[sba_ch_idx], nchan_remapped, output_frame );
#else
            float gain;

            if ( nchan_remapped == 1 )
            {
                gain = 1.4454f;
            }
            else
            {
                gain = 1.3657f;
            }

            for ( n = 0; n < nchan_remapped; n++ )
            {
                v_multc( output[n], gain, output[n], output_frame );
            }
#endif
        }

        /* Loudspeakers, Ambisonics or Binaural rendering */
Loading