Commit 40d41173 authored by Jan Kiene's avatar Jan Kiene
Browse files

fix compilation

parent 2687fb43
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3918,8 +3918,8 @@ static void convertInputBuffer_fx(
                ++i;
            }
        }
        *out_q_factor = in_q_factor;
#ifdef SPLIT_REND_WITH_HEAD_ROT
        *out_q_factor = in_q_factor;
    }
#endif

+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@
#include "options.h"
#include <math.h>
#include "cnst.h"
#include "prot.h"
#include "prot_fx.h"
#include "ivas_prot.h"
#include "ivas_prot_fx.h"
#ifdef DEBUGGING
+1 −1
Original line number Diff line number Diff line
@@ -181,5 +181,5 @@

//#define OPT_STEREO_32KBPS_V1                    /* Optimization made in stereo decoding path for 32kbps decoding */
#define DOT_PROD_CHOLESKY_64BIT                 /* FhG: Issue 1323, optimized 64 bit implementation of dot_product_cholesky() */
#define OPT_BASOP_ADD_v1                        /* optimizations to avoid usage of BASOP_Util_Add_MantExp */
//#define OPT_BASOP_ADD_v1                        /* optimizations to avoid usage of BASOP_Util_Add_MantExp */
#endif
+9 −6
Original line number Diff line number Diff line
@@ -98,6 +98,7 @@ static void ivas_binRenderer_filterModule_fx(
#ifndef OPT_BASOP_ADD_v1
            Q_filterStates = (Word16 *) &( hBinRenderer->hBinRenConvModule->Q_filterStatesLeft[bandIdx][chIdx][0] );
#endif /* OPT_BASOP_ADD_v1 */
#endif /* SPLIT_REND_WITH_HEAD_ROT */

            filterTapsLeftRealPtr_fx = hBinRenderer->hBinRenConvModule->filterTapsLeftReal_fx[bandIdx][chIdx];   // Q29
            filterTapsLeftImagPtr_fx = hBinRenderer->hBinRenConvModule->filterTapsLeftImag_fx[bandIdx][chIdx];   // Q29
@@ -532,6 +533,7 @@ static ivas_error ivas_binRenderer_convModuleOpen(
#else  /* OPT_BASOP_ADD_v1 */
                set16_fx( hBinRenConvModule->Q_filterStatesLeft[bandIdx][chIdx], 31, hBinRenConvModule->numTapsArray[bandIdx] );
#endif /* OPT_BASOP_ADD_v1 */
#endif /* !SPLIT_REND_WITH_HEAD_ROT */
                IF( isLoudspeaker )
                {
                    hBinRenConvModule->filterTapsLeftReal_fx[bandIdx][chIdx] = hHrtf->leftBRIRReal_fx[bandIdx][tmp];
@@ -552,6 +554,7 @@ static ivas_error ivas_binRenderer_convModuleOpen(
#else  /* OPT_BASOP_ADD_v1 */
                set16_fx( hBinRenConvModule->Q_filterStatesLeft[bandIdx][chIdx], 31, hBinRenConvModule->numTaps );
#endif /* OPT_BASOP_ADD_v1 */
#endif /* SPLIT_REND_WITH_HEAD_ROT */
                IF( isLoudspeaker )
                {
                    hBinRenConvModule->filterTapsLeftReal_fx[bandIdx][chIdx] = hHrtf->leftHRIRReal_fx[bandIdx][tmp];
+65 −0
Original line number Diff line number Diff line
@@ -1843,8 +1843,13 @@ void ivas_param_mc_dec_render_fx(
    /*CLDFB*/
    Word32 Cldfb_RealBuffer_fx[MAX_INTERN_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX];
    Word32 Cldfb_ImagBuffer_fx[MAX_INTERN_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX];
#ifdef SPLIT_REND_WITH_HEAD_ROT
    Word32 Cldfb_RealBuffer_Binaural_fx[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX];
    Word32 Cldfb_ImagBuffer_Binaural_fx[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX];
#else
    Word32 Cldfb_RealBuffer_Binaural_fx[BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
    Word32 Cldfb_ImagBuffer_Binaural_fx[BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
#endif
    Word32 *p_output_f_fx[MAX_OUTPUT_CHANNELS];
    FOR( i = 0; i < MAX_OUTPUT_CHANNELS; i++ )
    {
@@ -2178,8 +2183,31 @@ void ivas_param_mc_dec_render_fx(
        {
            Word16 input_q = 6;
            move16();

#ifdef SPLIT_REND_WITH_HEAD_ROT
            IF( EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
            {
                IF( st_ivas->hSplitBinRend->hCldfbDataOut != NULL )
                {
                    FOR( slot_idx = 0; slot_idx < MAX_PARAM_SPATIAL_SUBFRAMES; slot_idx++ )
                    {
                        FOR( ch = 0; ch < ( st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe ); ch++ )
                        {
                            Copy32( Cldfb_RealBuffer_fx[ch][slot_idx], st_ivas->hSplitBinRend->hCldfbDataOut->Cldfb_RealBuffer_fx[ch][add( slot_idx_start, slot_idx )], hParamMC->num_freq_bands );
                            Copy32( Cldfb_ImagBuffer_fx[ch][slot_idx], st_ivas->hSplitBinRend->hCldfbDataOut->Cldfb_ImagBuffer_fx[ch][add( slot_idx_start, slot_idx )], hParamMC->num_freq_bands );
                        }
                    }
                    st_ivas->hSplitBinRend->hCldfbDataOut->config = st_ivas->hIntSetup.output_config;
                    move16();
                }
            }
#endif

            /* Implement binaural rendering */
            ivas_binRenderer_fx( st_ivas->hBinRenderer,
#ifdef SPLIT_REND_WITH_HEAD_ROT
                                 ( st_ivas->hSplitBinRend == NULL ) ? NULL : &st_ivas->hSplitBinRend->splitrend.multiBinPoseData,
#endif
                                 st_ivas->hCombinedOrientationData,
                                 hParamMC->subframe_nbslots[subframe_idx],
                                 Cldfb_RealBuffer_Binaural_fx, Cldfb_ImagBuffer_Binaural_fx,
@@ -2198,6 +2226,20 @@ void ivas_param_mc_dec_render_fx(
                }
            }

#ifdef SPLIT_REND_WITH_HEAD_ROT
            int16_t pos_idx;
            FOR( pos_idx = 0; pos_idx < st_ivas->hBinRenderer->numPoses; pos_idx++ )
            {
                FOR( Word16 idx1 = 0; idx1 < BINAURAL_CHANNELS; idx1++ )
                {
                    FOR( Word16 idx2 = 0; idx2 < hParamMC->subframe_nbslots[subframe_idx]; idx2++ )
                    {
                        Scale_sig32( Cldfb_RealBuffer_Binaural_fx[pos_idx][idx1][idx2], CLDFB_NO_CHANNELS_MAX, sub( Q6, input_q ) ); // Q6
                        Scale_sig32( Cldfb_ImagBuffer_Binaural_fx[pos_idx][idx1][idx2], CLDFB_NO_CHANNELS_MAX, sub( Q6, input_q ) ); // Q6
                    }
                }
            }
#else
            FOR( Word16 idx1 = 0; idx1 < BINAURAL_CHANNELS; idx1++ )
            {
                FOR( Word16 idx2 = 0; idx2 < hParamMC->subframe_nbslots[subframe_idx]; idx2++ )
@@ -2206,6 +2248,24 @@ void ivas_param_mc_dec_render_fx(
                    Scale_sig32( Cldfb_ImagBuffer_Binaural_fx[idx1][idx2], CLDFB_NO_CHANNELS_MAX, sub( Q6, input_q ) ); // Q6
                }
            }
#endif

#ifdef SPLIT_REND_WITH_HEAD_ROT
            IF( EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
            {
                FOR( pos_idx = 0; pos_idx < st_ivas->hBinRenderer->numPoses; pos_idx++ )
                {
                    FOR( slot_idx = 0; slot_idx < hParamMC->subframe_nbslots[subframe_idx]; slot_idx++ )
                    {
                        FOR( ch = 0; ch < nchan_out_cldfb; ch++ )
                        {
                            Copy32( Cldfb_RealBuffer_Binaural_fx[pos_idx][ch][slot_idx], st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural_fx[add( i_mult( pos_idx, BINAURAL_CHANNELS ), ch )][add( slot_idx_start, slot_idx )], hParamMC->num_freq_bands );
                            Copy32( Cldfb_ImagBuffer_Binaural_fx[pos_idx][ch][slot_idx], st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural_fx[add( i_mult( pos_idx, BINAURAL_CHANNELS ), ch )][add( slot_idx_start, slot_idx )], hParamMC->num_freq_bands );
                        }
                    }
                }
            }
#endif
            /* update combined orientation access index */
            ivas_combined_orientation_update_index( st_ivas->hCombinedOrientationData, hParamMC->num_freq_bands * hParamMC->subframe_nbslots[subframe_idx] );
        }
@@ -2229,8 +2289,13 @@ void ivas_param_mc_dec_render_fx(
                {
                    IF( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) || EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) )
                    {
#ifdef SPLIT_REND_WITH_HEAD_ROT
                        RealBuffer_fx[i] = Cldfb_RealBuffer_Binaural_fx[0][ch][i]; // Q6
                        ImagBuffer_fx[i] = Cldfb_ImagBuffer_Binaural_fx[0][ch][i]; // Q6
#else
                        RealBuffer_fx[i] = Cldfb_RealBuffer_Binaural_fx[ch][i]; // Q6
                        ImagBuffer_fx[i] = Cldfb_ImagBuffer_Binaural_fx[ch][i]; // Q6
#endif
                    }
                    ELSE
                    {
Loading