Commit c23d256a authored by vaclav's avatar vaclav
Browse files

formatting comments

parent 93308703
Loading
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -5152,7 +5152,7 @@ void ivas_binRenderer(
    BINAURAL_RENDERER_HANDLE hBinRenderer,                      /* i/o: fastconv binaural renderer handle                       */
    COMBINED_ORIENTATION_HANDLE hCombinedOrientationData,       /* i  : combined head and external orientation handle           */
    int16_t subframe_idx,                                       /* i  : subframe index                                          */
    const int16_t numTimeSlots,                                 /* i: : number of time slots to process                         */
    const int16_t numTimeSlots,                                 /* i  : number of time slots to process                         */
    float Cldfb_RealBuffer_Binaural[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o  : Binaural signals             */
    float Cldfb_ImagBuffer_Binaural[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o  : Binaural signals             */
    float RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX],                /* i  : LS signals                   */
+2 −2
Original line number Diff line number Diff line
@@ -1297,7 +1297,7 @@ typedef struct Decoder_Struct
    EFAP_HANDLE hEFAPdata;                                     /* EFAP structure */
    VBAP_HANDLE hVBAPdata;                                     /* VBAP structure */
    MONO_DOWNMIX_RENDERER_HANDLE hMonoDmxRenderer;             /* Mono downmix structure */
    CREND_WRAPPER_HANDLE hCrendWrapper;
    CREND_WRAPPER_HANDLE hCrendWrapper;                        /* Crend handle */
    REVERB_HANDLE hReverb;                                     /* Reverb handle */
	HRTFS_CREND_HANDLE hSetOfHRTF;                             /* Set of HRTFs handle (CRend) */
    HRTFS_FASTCONV_HANDLE hHrtfFastConv;                       /* FASTCONV HRTF tables for binaural rendering */
+7 −7
Original line number Diff line number Diff line
@@ -872,8 +872,8 @@ ivas_error IVAS_DEC_GetTcSamples(

ivas_error IVAS_DEC_RendererFeedTcSamples(
    IVAS_DEC_HANDLE hIvasDec,           /* i/o: IVAS decoder handle                                                                 */
    const int16_t nSamplesForRendering, /* i:  : number of TC samples wanted from the renderer */
    int16_t *nSamplesResidual,          /* o:  : number of samples not fitting into the renderer grid and buffer for the next call*/
    const int16_t nSamplesForRendering, /* i  : number of TC samples wanted from the renderer                                       */
    int16_t *nSamplesResidual,          /* o  : number of samples not fitting into the renderer grid and buffer for the next call   */
    float *pcmBuf                       /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels  */
)
{
@@ -907,7 +907,7 @@ ivas_error IVAS_DEC_RendererFeedTcSamples(

ivas_error IVAS_DEC_GetRenderedSamples(
    IVAS_DEC_HANDLE hIvasDec,            /* i/o: IVAS decoder handle                                        */
    const uint16_t nSamplesForRendering, /* i:  : number of TC samples wanted from the renderer */
    const uint16_t nSamplesForRendering, /* i  : number of TC samples wanted from the renderer              */
    uint16_t *nSamplesRendered,          /* o  : number of samples rendered                                 */
    uint16_t *nSamplesAvailableNext,     /* o  : number of samples still available in the renerer pipeline  */
    int16_t *pcmBuf                      /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels  */
+70 −86
Original line number Diff line number Diff line
@@ -439,24 +439,9 @@ void msvq_enc(
            assert( N == FDCNG_VQ_MAX_LEN || N == FDCNG_VQ_MAX_LEN_WB ); /* 21 and 24 allowed */
            assert( maxC == 2 * FDCNG_VQ_DCT_NSEGM );

            p_max = msvq_stage1_dct_search( u, FDCNG_VQ_MAX_LEN, maxC,
                                            DCT_T2_24_XX,
                                            FDCNG_VQ_DCT_MAXTRUNC,
                                            invTrfMatrix,                             /* i : IDCT synthesis matrix for dim N          */
                                            cdk1r_tr_midQ_truncQ,                     /* i: midQ  vector */
                                            fdcng_dct_invScaleF,                      /* i: global inv scale factors*/
                                            fdcng_dct_scaleF,                         /* i: global scale factors*/
                                            FDCNG_VQ_DCT_NSEGM,                       /* i: number of segments  */
                                            cdk1_ivas_cols_per_segment,               /* i: remaining length per segment  */
                                            cdk1_ivas_trunc_dct_cols_per_segment,     /* i: trunc length per segment   */
                                            cdk1_ivas_entries_per_segment,            /* i: number of rows per segment */
                                            cdk1_ivas_cum_entries_per_segment,        /* i: number of cumulative entries  */
                                            cdk_37bits_ivas_stage1_W8Qx_dct_sections, /*i: Word8(byte) segment  table ptrs  */
                                            stage1_dct_col_syn_shift,                 /*i: columnwise  syn shift tables  */
                                            cdk1_ivas_segm_neighbour_fwd,             /*i: circular neighbour list fwd */
                                            cdk1_ivas_segm_neighbour_rev,             /*i: circular neighbour list reverse */
                                            FDCNG_VQ_DCT_NPOST,                       /*i: number of circ. neigbours to post check  */
                                            st1_mse_ptr, indices_st1_local, st1_syn_vec_ptr, dist[1] );
            p_max = msvq_stage1_dct_search( u, FDCNG_VQ_MAX_LEN, maxC, DCT_T2_24_XX, FDCNG_VQ_DCT_MAXTRUNC, invTrfMatrix, cdk1r_tr_midQ_truncQ, fdcng_dct_invScaleF, fdcng_dct_scaleF, FDCNG_VQ_DCT_NSEGM,
                                            cdk1_ivas_cols_per_segment, cdk1_ivas_trunc_dct_cols_per_segment, cdk1_ivas_entries_per_segment, cdk1_ivas_cum_entries_per_segment, cdk_37bits_ivas_stage1_W8Qx_dct_sections,
                                            stage1_dct_col_syn_shift, cdk1_ivas_segm_neighbour_fwd, cdk1_ivas_segm_neighbour_rev, FDCNG_VQ_DCT_NPOST, st1_mse_ptr, indices_st1_local, st1_syn_vec_ptr, dist[1] );


            /*    move established stage#1  indices  to the global MSVQ list structure */
@@ -469,8 +454,7 @@ void msvq_enc(
            /* non-DCT Stage #1 code below */
            if ( !s ) /* means: m==1 */
        {
                /* This loop is identical to the one below, except, that the inner
                           loop over c=0..m is hardcoded to c=0, since m=1.                 */
            /* This loop is identical to the one below, except, that the inner loop over c=0..m is hardcoded to c=0, since m=1.    */
            /* dist[0][0] */
            for ( j = 0; j < levels[s]; j++ )
            {
+5 −20
Original line number Diff line number Diff line
@@ -79,11 +79,7 @@ typedef struct hrtfGainCache
 * Local function prototypes
 *------------------------------------------------------------------------*/

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 );
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 );

static void ivas_dirac_dec_decorrelate_slot( DIRAC_DEC_HANDLE hDirAC, 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] );

@@ -93,23 +89,12 @@ static void ivas_dirac_dec_binaural_determine_processing_matrices( Decoder_Struc

static void ivas_dirac_dec_binaural_process_output( Decoder_Struct *st_ivas, float *output_f[], float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], const int16_t max_band_decorr, const int16_t numInChannels, const int16_t subframe );

static void adaptTransportSignalsHeadtracked(
    COMBINED_ORIENTATION_HANDLE hHeadTrackData,
    float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX],
    float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX],
    const int16_t nBins,
    const int16_t nSlots,
    float Rmat[3][3] );
static void adaptTransportSignalsHeadtracked( COMBINED_ORIENTATION_HANDLE hHeadTrackData, float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], const int16_t nBins, const int16_t nSlots, float Rmat[3][3] );

static void ivas_dirac_dec_binaural_check_and_switch_transports_headtracked(
    COMBINED_ORIENTATION_HANDLE hHeadTrackData,
    float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX],
    float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX],
    const int16_t nBins,
    const int16_t nSlots,
    float Rmat[3][3] );
static void ivas_dirac_dec_binaural_check_and_switch_transports_headtracked( COMBINED_ORIENTATION_HANDLE hHeadTrackData, float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], const int16_t nBins, const int16_t nSlots, float Rmat[3][3] );

static void formulate2x2MixingMatrix( float Ein1, float Ein2, float CinRe, float CinIm, float Eout1, float Eout2, float CoutRe, float CoutIm, float Q[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float Mre[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float Mim[BINAURAL_CHANNELS][BINAURAL_CHANNELS], const float regularizationFactor );

static void hrtfShGetHrtf( const int16_t bin, const int16_t aziDeg, const int16_t eleDeg, float *lRealp, float *lImagp, float *rRealp, float *rImagp, PARAMBIN_HRTF_GAIN_CACHE *gainCache, const int16_t useCachedValue );

static void getDirectPartGains( const int16_t bin, int16_t aziDeg, int16_t eleDeg, float *lRealp, float *lImagp, float *rRealp, float *rImagp, const uint8_t stereoMode, float Rmat[3][3], PARAMBIN_HRTF_GAIN_CACHE *gainCache, const int16_t isHeadtracked );
Loading