Commit cbd98af9 authored by vaclav's avatar vaclav
Browse files

fix merge issue

parent 8ebf247f
Loading
Loading
Loading
Loading
Loading
+38 −7
Original line number Diff line number Diff line
@@ -49,10 +49,14 @@
static ivas_error ivas_ism_bitrate_switching_dec(
    Decoder_Struct *st_ivas,           /* i/o: IVAS decoder structure               */
    const int16_t nchan_transport_old, /* i  : last number of transport channels    */
    const ISM_MODE last_ism_mode,        /* i  : last ISM mode                        */
    const ISM_MODE last_ism_mode       /* i  : last ISM mode                        */
#ifndef FIX_HRTF_LOAD
    ,
    uint16_t *nSamplesRendered,          /* o  : number of samples rendered           */
    const PCM_RESOLUTION pcm_resolution, /* i  : type for the decoded PCM resolution  */
    void *data                           /* o  : output synthesis signal              */
#endif

)
{
    ivas_error error;
@@ -64,11 +68,15 @@ static ivas_error ivas_ism_bitrate_switching_dec(
    int16_t tc_nchan_allocate_new;
    int16_t tc_granularity_new;
    int16_t nchan_out_buff, nchan_out_buff_old;
#ifndef FIX_HRTF_LOAD
    AUDIO_CONFIG intern_config_old;
    IVAS_OUTPUT_SETUP hIntSetupOld;
    RENDERER_TYPE renderer_type_old;
#endif

#ifndef FIX_HRTF_LOAD
    error = IVAS_ERR_OK;
#endif
    nCPE_old = st_ivas->nCPE;
    nSCE_old = st_ivas->nSCE;

@@ -104,12 +112,13 @@ static ivas_error ivas_ism_bitrate_switching_dec(
        return error;
    }

#ifndef FIX_HRTF_LOAD
    /* save old IntSetup, might be needed for JBM flushing...*/
    intern_config_old = st_ivas->intern_config;
    hIntSetupOld = st_ivas->hIntSetup;
    tc_granularity_new = 1;
    renderer_type_old = st_ivas->renderer_type;

#endif
    /*-----------------------------------------------------------------*
     * Initialize the needed renderer struct and destroy the unnecessary renderer struct
     *-----------------------------------------------------------------*/
@@ -387,7 +396,11 @@ static ivas_error ivas_ism_bitrate_switching_dec(
    }
#endif

#ifdef FIX_HRTF_LOAD
    return IVAS_ERR_OK;
#else
    return error;
#endif
}


@@ -400,17 +413,22 @@ static ivas_error ivas_ism_bitrate_switching_dec(

ivas_error ivas_ism_dec_config(
    Decoder_Struct *st_ivas,     /* i/o: IVAS decoder structure              */
    const ISM_MODE last_ism_mode,        /* i/o: last ISM mode                       */
    const ISM_MODE last_ism_mode /* i/o: last ISM mode                       */
#ifndef FIX_HRTF_LOAD
    ,
    uint16_t *nSamplesRendered,          /* o  : number of samples flushed when the renderer granularity changes */
    const PCM_RESOLUTION pcm_resolution, /* i  : type for the decoded PCM resolution */
    void *data                           /* o  : output synthesis signal             */
#endif
)
{
    int32_t ivas_total_brate;
    ivas_error error;
    int16_t nchan_transport_old;

#ifndef FIX_HRTF_LOAD
    error = IVAS_ERR_OK;
#endif
    ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate;

    /* Assumes that num of input objects are constant */
@@ -439,9 +457,13 @@ ivas_error ivas_ism_dec_config(
        if ( st_ivas->ini_active_frame != 0 )
        {
            /* ISM bit-rate switching */
            if ( ( st_ivas->ism_mode != last_ism_mode ) || ( st_ivas->hDecoderConfig->ivas_total_brate != st_ivas->hDecoderConfig->last_ivas_total_brate ) )
            if ( ( st_ivas->ism_mode != last_ism_mode ) || ( ivas_total_brate != st_ivas->hDecoderConfig->last_ivas_total_brate ) )
            {
#ifdef FIX_HRTF_LOAD
                if ( ( error = ivas_ism_bitrate_switching_dec( st_ivas, nchan_transport_old, last_ism_mode ) ) != IVAS_ERR_OK )
#else
                if ( ( error = ivas_ism_bitrate_switching_dec( st_ivas, nchan_transport_old, last_ism_mode, nSamplesRendered, pcm_resolution, data ) ) != IVAS_ERR_OK )
#endif
                {
                    return error;
                }
@@ -463,7 +485,12 @@ ivas_error ivas_ism_dec_config(
        /* ISM mode switching */
        if ( st_ivas->ism_mode != last_ism_mode )
        {

#ifdef FIX_HRTF_LOAD
            if ( ( error = ivas_ism_bitrate_switching_dec( st_ivas, nchan_transport_old, last_ism_mode ) ) != IVAS_ERR_OK )
#else
            if ( ( error = ivas_ism_bitrate_switching_dec( st_ivas, nchan_transport_old, last_ism_mode, nSamplesRendered, pcm_resolution, data ) ) != IVAS_ERR_OK )
#endif
            {
                return error;
            }
@@ -489,5 +516,9 @@ ivas_error ivas_ism_dec_config(
            break;
    }

#ifdef FIX_HRTF_LOAD
    return IVAS_ERR_OK;
#else
    return error;
#endif
}
+1 −1

File changed.

Contains only whitespace changes.