Commit 1c3fc634 authored by multrus's avatar multrus
Browse files

Merge branch '690-fix-compilation-for-split_rend_with_head_rot-disabled' into 'main'

Resolve "Fix compilation for SPLIT_REND_WITH_HEAD_ROT disabled"

See merge request !944
parents e245b8db bbfa93da
Loading
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -156,6 +156,9 @@
#define SPLIT_REND_PRED_QUANT_63_PNTS
#define SPLIT_REND_WITH_HEAD_ROT_PARAMBIN               /* Nokia: Issue 623: Split rendering support for parambin renderer */
#define FIX_658_SPLIT_REND_MASA                         /*Dlb : Fix for issue 658, uninitialized memory access in MASA in Split rendering 0DOF mode*/
#ifdef SBA_AND_OBJECTS
#define OSBA_SPLIT_RENDERING
#endif
#endif

#define MASA_AND_OBJECTS                                /* Nokia: Combination of MASA and objects */
@@ -163,7 +166,6 @@
#define SBA_AND_OBJECTS
#ifdef SBA_AND_OBJECTS
#define OSBA_BR_SWITCHING
#define OSBA_SPLIT_RENDERING
#endif

#define FIX_264_AUDIO_CHANNELS_TO_HEAP                  /* VA: issue 243: Move audio channels memory from stack to heap */
+15 −3
Original line number Diff line number Diff line
@@ -60,7 +60,11 @@ 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 SPLIT_REND_WITH_HEAD_ROT
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 );

@@ -562,7 +566,11 @@ void ivas_mc_paramupmix_dec_render(
        {
            int16_t n_samples_sf = slot_size * st_ivas->hTcBuffer->subframe_nbslots[subframe_idx];

#ifdef SPLIT_REND_WITH_HEAD_ROT
            ivas_mc_paramupmix_dec_sf( st_ivas, output_f_local, slot_index_start );
#else
            ivas_mc_paramupmix_dec_sf( st_ivas, output_f_local );
#endif
            slot_index_start += st_ivas->hTcBuffer->subframe_nbslots[subframe_idx];
            for ( ch = 0; ch < MAX_OUTPUT_CHANNELS; ch++ )
            {
@@ -974,8 +982,12 @@ 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  */
    int16_t slot_index_start )
    float *output_f[MAX_OUTPUT_CHANNELS] /* i/o: synthesized core-coder transport channels  */
#ifdef SPLIT_REND_WITH_HEAD_ROT
    ,
    int16_t slot_index_start
#endif
)
{
    int16_t i, ch, slot_idx, k;
    float *pPcm_temp[MC_PARAMUPMIX_COMBINATIONS * 2]; /* decorrelated and undecorrelated*/
+14 −0
Original line number Diff line number Diff line
@@ -102,7 +102,11 @@ typedef struct parambin_rend_config_data
 * Local function prototypes
 *------------------------------------------------------------------------*/

#ifdef SPLIT_REND_WITH_HEAD_ROT_PARAMBIN
static void ivas_dirac_dec_binaural_internal( Decoder_Struct *st_ivas, COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, float *output_f[], const int16_t nchan_transport, const int16_t subframe );
#else
static void ivas_dirac_dec_binaural_internal( Decoder_Struct *st_ivas, COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, const int16_t nchan_transport, const int16_t subframe );
#endif

static void ivas_dirac_dec_decorrelate_slot( DIRAC_DEC_BIN_HANDLE hDiracDecBin, const int16_t num_freq_bands, const int16_t slot, float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float decRe[][CLDFB_NO_CHANNELS_MAX], float decIm[][CLDFB_NO_CHANNELS_MAX] );

@@ -525,7 +529,11 @@ void ivas_dirac_dec_binaural_render(
    for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ )
    {
        int16_t n_samples_sf = slot_size * hSpatParamRendCom->subframe_nbslots[subframe_idx];
#ifdef SPLIT_REND_WITH_HEAD_ROT_PARAMBIN
        ivas_dirac_dec_binaural_internal( st_ivas, st_ivas->hCombinedOrientationData, output_f_local, nchan_transport, subframe_idx );
#else
        ivas_dirac_dec_binaural_internal( st_ivas, st_ivas->hCombinedOrientationData, nchan_transport, subframe_idx );
#endif

        for ( ch = 0; ch < nchan_out; ch++ )
        {
@@ -695,7 +703,11 @@ void ivas_dirac_dec_binaural(
    {
        int16_t n_samples_sf = slot_size * hSpatParamRendCom->subframe_nbslots[subframe];

#ifdef SPLIT_REND_WITH_HEAD_ROT_PARAMBIN
        ivas_dirac_dec_binaural_internal( st_ivas, hCombinedOrientationData, p_output, nchan_transport, subframe );
#else
        ivas_dirac_dec_binaural_internal( st_ivas, hCombinedOrientationData, nchan_transport, subframe );
#endif

        for ( ch = 0; ch < 2 * BINAURAL_CHANNELS; ch++ )
        {
@@ -720,7 +732,9 @@ void ivas_dirac_dec_binaural(
static void ivas_dirac_dec_binaural_internal(
    Decoder_Struct *st_ivas,
    COMBINED_ORIENTATION_HANDLE hCombinedOrientationData,
#ifdef SPLIT_REND_WITH_HEAD_ROT_PARAMBIN
    float *output_f[],
#endif
    const int16_t nchan_transport,
    const int16_t subframe )
{
+2 −0
Original line number Diff line number Diff line
@@ -383,10 +383,12 @@ int16_t ivas_get_nchan_buffers_dec(
        }
    }

#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( output_config == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    {
        nchan_out_buff = max( nchan_out_buff, st_ivas->splitBinRend.splitrend.multiBinPoseData.num_poses * BINAURAL_CHANNELS );
    }
#endif

    return nchan_out_buff;
}
+9 −6
Original line number Diff line number Diff line
@@ -60,13 +60,12 @@
#define MAX_BUFFER_LENGTH       ( MAX_BUFFER_LENGTH_PER_CHANNEL * MAX_INPUT_CHANNELS )
#define MAX_CLDFB_BUFFER_LENGTH ( MAX_CLDFB_BUFFER_LENGTH_PER_CHANNEL * MAX_INPUT_CHANNELS )
#define MAX_BIN_BUFFER_LENGTH   ( MAX_BUFFER_LENGTH_PER_CHANNEL * BINAURAL_CHANNELS )

#define MAX_BIN_DELAY_SAMPLES 50 /* Maximum supported rendering latency for binaural IRs */

#else
#define MAX_BUFFER_LENGTH ( MAX_BUFFER_LENGTH_PER_CHANNEL * MAX_INPUT_CHANNELS )
#endif

#define MAX_BIN_DELAY_SAMPLES 50 /* Maximum supported rendering latency for binaural IRs */

/* Frame size required when rendering to binaural */
#define BINAURAL_RENDERING_FRAME_SIZE_MS 20

@@ -1445,7 +1444,7 @@ static ivas_error setRendInputActiveIsm(
        }
        if ( outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        {
            if ( ( error = ivas_reverb_open( &( inputIsm->hReverb ), getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, &inputIsm->tdRendWrapper.hBinRendererTd->HrFiltSet_p->lr_energy_and_iac, hRendCfg, *rendCtx.pOutSampleRate ) ) != IVAS_ERR_OK )
            if ( ( error = ivas_reverb_open( &( inputIsm->hReverb ), getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, inputIsm->tdRendWrapper.hBinRendererTd->HrFiltSet_p->lr_energy_and_iac, hRendCfg, *rendCtx.pOutSampleRate ) ) != IVAS_ERR_OK )
            {
                return error;
            }
@@ -6414,7 +6413,7 @@ static ivas_error renderLfeToBinaural(
    /* Copy LFE to left and right ears */
    for ( ear_idx = 0; ear_idx < BINAURAL_CHANNELS; ++ear_idx )
    {
        writePtr = getSmplPtr( outAudio, pose_idx * BINAURAL_CHANNELS + ear_idx, 0 );
        writePtr = getSmplPtr( outAudio, ear_idx, 0 );
        v_add( writePtr, tmpLfeBuffer, writePtr, frame_size );
    }
#endif /* SPLIT_REND_WITH_HEAD_ROT */
@@ -8054,6 +8053,7 @@ static void renderMasaToBinaural(
    copyMasaMetadataToDiracRenderer( &masaInput->masaMetadata, masaInput->decDummy->hSpatParamRendCom );

    ivas_dirac_dec_binaural( masaInput->decDummy, *masaInput->base.ctx.pCombinedOrientationData, tmpBuffer, masaInput->base.inputBuffer.config.numChannels );
#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( is_split_rend_mode )
    {
        accumulateCLDFBArrayToBuffer(
@@ -8063,12 +8063,15 @@ static void renderMasaToBinaural(
    }
    else
    {
#endif
#ifdef FIX_264_AUDIO_CHANNELS_TO_HEAP
        accumulate2dArrayToBuffer( tmpBuffer_buff, &outAudio );
#else
    accumulate2dArrayToBuffer( tmpBuffer, &outAudio );
#endif
#ifdef SPLIT_REND_WITH_HEAD_ROT
    }
#endif

    return;
}
Loading