Commit 29825e93 authored by multrus's avatar multrus
Browse files

[cleanup] accept PARAMUPMIX_BINAURAL_UPDATES

parent 2b99bd7b
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -172,7 +172,6 @@



#define PARAMUPMIX_BINAURAL_UPDATES                     /* Dlb : issue 652, MC ParamUpmix Binaural Updates */
#define FIX_657_REMOVE_EDITING                          /* Nokia: Remove remaining unused coded related to object editing */
#define FIX_634_MASA_JBM_UNUSED_PARAMETER               /* Nokia: Fix issue 634 by removing the unnecessary argument. */
#define FIX_675_WB_OMASA                                /* Nokia: Fix for issue 675 solving the crash in OMASA for WB input */
+0 −4
Original line number Diff line number Diff line
@@ -3009,7 +3009,6 @@ void ivas_init_dec_get_num_cldfb_instances(

    if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX && st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO && st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO )
    {
#ifdef PARAMUPMIX_BINAURAL_UPDATES
        if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC )
        {
            *numCldfbAnalyses = max( MC_PARAMUPMIX_MAX_INPUT_CHANS, *numCldfbAnalyses );
@@ -3018,9 +3017,6 @@ void ivas_init_dec_get_num_cldfb_instances(
        {
            *numCldfbAnalyses = max( MC_PARAMUPMIX_MIN_CLDFB, *numCldfbAnalyses );
        }
#else
        *numCldfbAnalyses = max( MC_PARAMUPMIX_MIN_CLDFB, *numCldfbAnalyses );
#endif
        *numCldfbSyntheses = max( MC_PARAMUPMIX_MIN_CLDFB, *numCldfbSyntheses );
    }

+0 −49
Original line number Diff line number Diff line
@@ -60,11 +60,7 @@ static void ps_pred_process( MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix, float qmf_m

static void ps_pred_process_sf( MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix, DECODER_TC_BUFFER_HANDLE hTcBuffer, float qmf_mod_re[JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float qmf_mod_im[JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float qmf_side_re[JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float qmf_side_im[JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float *param_interpol, const int16_t ch, const int16_t slots_rendered );

#ifdef PARAMUPMIX_BINAURAL_UPDATES
static void ivas_mc_paramupmix_dec_sf( Decoder_Struct *st_ivas, float *output_f[MAX_OUTPUT_CHANNELS], int16_t slot_index_start );
#else
static void ivas_mc_paramupmix_dec_sf( Decoder_Struct *st_ivas, float *output_f[MAX_OUTPUT_CHANNELS] );
#endif

static void ivas_param_upmix_dec_decorr_subframes( Decoder_Struct *st_ivas, const int16_t nSamplesForRendering );

@@ -194,7 +190,6 @@ void ivas_mc_paramupmix_dec(
    float *pPcm_temp[MC_PARAMUPMIX_COMBINATIONS * 2];         /* decorrelated and undecorrelated*/
    int16_t noparamupmix_delay;
    AUDIO_CONFIG output_config;
#ifdef PARAMUPMIX_BINAURAL_UPDATES
    int16_t subframeIdx, idx_in, index_slot, maxBand;
#ifdef SPLIT_REND_WITH_HEAD_ROT
    float Cldfb_RealBuffer_subfr[MC_PARAMUPMIX_MAX_INPUT_CHANS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
@@ -211,9 +206,6 @@ void ivas_mc_paramupmix_dec(
    /*  boxes = { 0 1 2 3 [4 6] [5 7] [8 10] [9 11] }; */
    int16_t chidx1[MC_PARAMUPMIX_COMBINATIONS] = { 0, 1, 4, 5 };
    int16_t chidx2[MC_PARAMUPMIX_COMBINATIONS] = { 2, 3, 6, 7 };
#else
    float *p_output[MAX_OUTPUT_CHANNELS];
#endif

    hMCParamUpmix = st_ivas->hMCParamUpmix;
    assert( hMCParamUpmix );
@@ -231,19 +223,6 @@ void ivas_mc_paramupmix_dec(
    {
        first_empty_channel = 8; /* Don't upmix */
    }
#ifndef PARAMUPMIX_BINAURAL_UPDATES
    else if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM )
    {
        /* Implement binaural rendering */
        first_empty_channel = 4; /* don't erase LFE */

        for ( ch = 0; ch < MC_PARAMUPMIX_COMBINATIONS * 2; ch++ )
        {
            p_output[ch] = output_f[ch];
        }
        ivas_binaural_cldfb( st_ivas, p_output );
    }
#endif
    else
    {
        first_empty_channel = 12;
@@ -300,7 +279,6 @@ void ivas_mc_paramupmix_dec(
            mvr2r( hMCParamUpmix->betas[ch], hMCParamUpmix->beta_prev[ch], IVAS_MAX_NUM_BANDS );
        }

#ifdef PARAMUPMIX_BINAURAL_UPDATES
        if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM )
        {
            maxBand = (int16_t) ( ( CLDFB_NO_CHANNELS_MAX * st_ivas->hDecoderConfig->output_Fs ) / 48000 );
@@ -448,7 +426,6 @@ void ivas_mc_paramupmix_dec(
        }
        else
        {
#endif
            pPcm_temp[0] = output_f[4];
            pPcm_temp[1] = output_f[6];
            pPcm_temp[2] = output_f[5];
@@ -482,9 +459,7 @@ void ivas_mc_paramupmix_dec(
                mvr2r( hMCParamUpmix->pcm_delay[ch], output_f[ch], noparamupmix_delay );
                mvr2r( tmp_buf, hMCParamUpmix->pcm_delay[ch], noparamupmix_delay );
            }
#ifdef PARAMUPMIX_BINAURAL_UPDATES
        }
#endif
    }

#ifdef FIX_264_AUDIO_CHANNELS_TO_HEAP
@@ -540,9 +515,7 @@ void ivas_mc_paramupmix_dec_render(
    int16_t slots_to_render, first_sf, last_sf, subframe_idx;
    uint16_t slot_size, ch;
    float *output_f_local[MAX_OUTPUT_CHANNELS];
#ifdef PARAMUPMIX_BINAURAL_UPDATES
    int16_t slot_index_start;
#endif
    MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix;

    hMCParamUpmix = st_ivas->hMCParamUpmix;
@@ -575,14 +548,6 @@ void ivas_mc_paramupmix_dec_render(
    }
#ifdef DEBUGGING
    assert( slots_to_render == 0 );
#endif
#ifndef PARAMUPMIX_BINAURAL_UPDATES
    /* Implement binaural rendering */
    if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM )
    {
        ivas_binaural_cldfb_sf( st_ivas, *nSamplesRendered, slot_size, output_f_local );
    }
    else
#endif
    {

@@ -592,19 +557,13 @@ void ivas_mc_paramupmix_dec_render(
            mvr2r( hMCParamUpmix->beta_prev[ch], hMCParamUpmix->beta_sf[ch], IVAS_MAX_NUM_BANDS );
        }

#ifdef PARAMUPMIX_BINAURAL_UPDATES
        slot_index_start = 0;
#endif
        for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ )
        {
            int16_t n_samples_sf = slot_size * st_ivas->hTcBuffer->subframe_nbslots[subframe_idx];

#ifdef PARAMUPMIX_BINAURAL_UPDATES
            ivas_mc_paramupmix_dec_sf( st_ivas, output_f_local, slot_index_start );
            slot_index_start += st_ivas->hTcBuffer->subframe_nbslots[subframe_idx];
#else
            ivas_mc_paramupmix_dec_sf( st_ivas, output_f_local );
#endif
            for ( ch = 0; ch < MAX_OUTPUT_CHANNELS; ch++ )
            {
                output_f_local[ch] += n_samples_sf;
@@ -1016,10 +975,8 @@ static void ps_pred_process_sf(
static void ivas_mc_paramupmix_dec_sf(
    Decoder_Struct *st_ivas,             /* i/o: IVAS decoder handle                        */
    float *output_f[MAX_OUTPUT_CHANNELS] /* i/o: synthesized core-coder transport channels  */
#ifdef PARAMUPMIX_BINAURAL_UPDATES
    ,
    int16_t slot_index_start
#endif
)
{
    int16_t i, ch, slot_idx, k;
@@ -1029,7 +986,6 @@ static void ivas_mc_paramupmix_dec_sf(
    float Cldfb_ImagBuffer[MC_PARAMUPMIX_MAX_TRANSPORT_CHANS][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX];
    int16_t noparamupmix_delay, n_samples_rendered;
    MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix;
#ifdef PARAMUPMIX_BINAURAL_UPDATES
    int16_t subframeIdx, idx_in, maxBand;
#ifdef SPLIT_REND_WITH_HEAD_ROT
    float Cldfb_RealBuffer_subfr[MC_PARAMUPMIX_MAX_INPUT_CHANS][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX];
@@ -1046,7 +1002,6 @@ static void ivas_mc_paramupmix_dec_sf(
    /*  boxes = { 0 1 2 3 [4 6] [5 7] [8 10] [9 11] }; */
    int16_t chidx1[MC_PARAMUPMIX_COMBINATIONS] = { 0, 1, 4, 5 };
    int16_t chidx2[MC_PARAMUPMIX_COMBINATIONS] = { 2, 3, 6, 7 };
#endif
    hMCParamUpmix = st_ivas->hMCParamUpmix;
    assert( hMCParamUpmix );

@@ -1096,7 +1051,6 @@ static void ivas_mc_paramupmix_dec_sf(
            }
        }
    }
#ifdef PARAMUPMIX_BINAURAL_UPDATES
    if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM )
    {
        maxBand = (int16_t) ( ( CLDFB_NO_CHANNELS_MAX * st_ivas->hDecoderConfig->output_Fs ) / 48000 );
@@ -1218,7 +1172,6 @@ static void ivas_mc_paramupmix_dec_sf(
    }
    else
    {
#endif
        /*  boxes = { 0 1 2 3 [4 6] [5 7] [8 10] [9 11] }; */
        pPcm_temp[0] = output_f[4];
        pPcm_temp[1] = output_f[6];
@@ -1267,9 +1220,7 @@ static void ivas_mc_paramupmix_dec_sf(
                mvr2r( tmp_buf, &hMCParamUpmix->pcm_delay[ch][noparamupmix_delay - n_samples_rendered], n_samples_rendered );
            }
        }
#ifdef PARAMUPMIX_BINAURAL_UPDATES
    }
#endif

    st_ivas->hTcBuffer->slots_rendered += st_ivas->hTcBuffer->subframe_nbslots[st_ivas->hTcBuffer->subframes_rendered];
    st_ivas->hTcBuffer->subframes_rendered++;
+0 −4
Original line number Diff line number Diff line
@@ -269,11 +269,7 @@ void ivas_renderer_select(
                        }
                        if ( ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) && ( *renderer_type == RENDERER_BINAURAL_FASTCONV ) )
                        {
#ifndef PARAMUPMIX_BINAURAL_UPDATES
                            *internal_config = AUDIO_CONFIG_5_1_2;
#else
                            *internal_config = AUDIO_CONFIG_7_1_4;
#endif
                        }
                    }
                }