Commit 5e5e2ec5 authored by vaclav's avatar vaclav
Browse files

Merge branch '20221108_maintenance' into 'main'

20221108 Maintenance

See merge request !242
parents 979faade 567d80a6
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ typedef struct

#ifdef DEBUG_AGC_ENCODER_CMD_OPTION
    IVAS_ENC_AGC agc;
#endif /* DEBUG_AGC_ENCODER_CMD_OPTION */
#endif
    bool pca;
#ifdef DEBUG_FOA_AGC
    FILE *agcBitstream; /* temporary */
@@ -888,7 +888,7 @@ static void initArgStruct( EncArguments *arg )

#ifdef DEBUG_AGC_ENCODER_CMD_OPTION
    arg->agc = IVAS_ENC_AGC_UNDEFINED;
#endif /* DEBUG_AGC_ENCODER_CMD_OPTION */
#endif
    arg->pca = false;
#ifdef DEBUG_FOA_AGC
    arg->agcBitstream = NULL;
@@ -1660,7 +1660,7 @@ static void usage_enc( void )
    fprintf( stdout, "-agc op             : SBA Adaptive gain control, op = (0, 1).  \n" );
    fprintf( stdout, "                      By default op is 1 (activated) for bitrates between 24400 and 32000,\n" );
    fprintf( stdout, "                      otherwise it is 0 (deactivated) for all other bitrates\n" );
#endif /* DEBUG_AGC_ENCODER_CMD_OPTION */
#endif

    fprintf( stdout, "-bypass mode        : SBA PCA by-pass, mode = (1, 2), 1 = PCA off, 2 = signal adaptive, default is 1\n" );
#ifdef DEBUGGING
+2 −1
Original line number Diff line number Diff line
@@ -1022,6 +1022,7 @@ enum
#define SIZE_BK22_36b                       128
#define SIZE_BK23_36b                       64

/* Gain quantizer constants */
#define NB_QUA_GAIN5B                       32                      /* Number of quantization level        */
#define NB_QUA_GAIN6B                       64                      /* Number of quantization level        */
#define NB_QUA_GAIN7B                       128                     /* Number of quantization level        */
+12 −22
Original line number Diff line number Diff line
@@ -189,10 +189,12 @@ typedef enum

#define IVAS_MAX_SBA_ORDER                      3                           /* Maximum supported Ambisonics order */

#define IVAS_NUM_SUPPORTED_FS                   3                           /* number of supported sampling-rates in IVAS */

/*----------------------------------------------------------------------------------*
 * IVAS Bitrates
 *----------------------------------------------------------------------------------*/

#define IVAS_SID_5k2                            5200 /* SID frame bitrate */
#define IVAS_13k2                               13200
#define IVAS_16k4                               16400
@@ -1420,36 +1422,33 @@ typedef enum


/*----------------------------------------------------------------------------------*
 * Crend constants
 * Orientation tracking constants
 *----------------------------------------------------------------------------------*/

#define IVAS_REV_MAX_NR_BRANCHES                8                           /* setup is for maximum                */

#define IVAS_REV_MAX_IIR_FILTER_LENGTH          4                           /* maximum nr of taps - MUST BE EVEN! */

#define RV_FILTER_MAX_FFT_SIZE                  ( 512 )
#define RV_FILTER_MAX_HISTORY                   ( 512 - 160 )               /* for longest history */

#define RV_LENGTH_NR_FC                         ( RV_FILTER_MAX_FFT_SIZE / 2 ) + 1


/* Orientation tracking types */
#define IVAS_ORIENT_TRK_REF                     0
#define IVAS_ORIENT_TRK_AVG                     1

typedef enum
{
    OTR_TRACKING_NONE = IVAS_ORIENT_TRK_REF-1, /* track orientation relative to external reference orientation (default: yaw=pitch=roll=0) */
    OTR_TRACKING_NONE = IVAS_ORIENT_TRK_REF-1, /* track orientation relative to external reference orientation (default: yaw=pitch=roll=0) */ // VE: not really used in IVAS (only in unit-test)
    OTR_TRACKING_REF_ORIENT = IVAS_ORIENT_TRK_REF, /* track orientation relative to external reference orientation (default: yaw=pitch=roll=0) */
    OTR_TRACKING_AVG_ORIENT = IVAS_ORIENT_TRK_AVG  /* track orientation relative to average orientation */
} OTR_TRACKING_T;

} OTR_TRACKING_T;


/*----------------------------------------------------------------------------------*
 * Reverberator constants
 *----------------------------------------------------------------------------------*/

#define IVAS_REV_MAX_NR_BRANCHES                8                           /* setup is for maximum                */
#define IVAS_REV_MAX_IIR_FILTER_LENGTH          4                           /* maximum nr of taps - MUST BE EVEN! */

#define RV_FILTER_MAX_FFT_SIZE                  ( 512 )
#define RV_FILTER_MAX_HISTORY                   ( 512 - 160 )               /* for longest history */
#define RV_LENGTH_NR_FC                         ( RV_FILTER_MAX_FFT_SIZE / 2 ) + 1

#define IVAS_REVERB_DEFAULT_N_BANDS             31
#define IVAS_REVERB_DEFAULT_PRE_DELAY           0.016f
#define IVAS_REVERB_DEFAULT_INPUT_DELAY         0.1f
@@ -1459,13 +1458,6 @@ typedef enum
 * FB mixer constants
 *----------------------------------------------------------------------------------*/

#define IVAS_ONE_BY_960                         0.001041666666666666f
#define IVAS_ONE_BY_640                         0.0015625f
#define IVAS_ONE_BY_320                         0.003125f
#define IVAS_ONE_BY_240                         0.004166666666666667f
#define IVAS_ONE_BY_160                         0.00625f
#define IVAS_ONE_BY_80                          0.0125f

#define IVAS_960_PT_LEN                         960
#define IVAS_640_PT_LEN                         640
#define IVAS_480_PT_LEN                         480
@@ -1475,8 +1467,6 @@ typedef enum
#define IVAS_80_PT_LEN                          80
#define IVAS_40_PT_LEN                          40

#define IVAS_NUM_SUPPORTED_FS                   3

/* FB windows ovlp */
#define IVAS_FB_4MS_48K_SAMP                    192
#define IVAS_FB_1MS_48K_SAMP                    48
+12 −0
Original line number Diff line number Diff line
@@ -42,6 +42,18 @@
#include "wmops.h"


/*-----------------------------------------------------------------------------------------*
 * Local constants
 *-----------------------------------------------------------------------------------------*/

#define IVAS_ONE_BY_960 0.001041666666666666f
#define IVAS_ONE_BY_640 0.0015625f
#define IVAS_ONE_BY_320 0.003125f
#define IVAS_ONE_BY_240 0.004166666666666667f
#define IVAS_ONE_BY_160 0.00625f
#define IVAS_ONE_BY_80  0.0125f


/*-----------------------------------------------------------------------------------------*
 * Function ivas_get_mdft_twid_factors()
 *
+7 −9
Original line number Diff line number Diff line
@@ -3918,7 +3918,7 @@ ivas_error ivas_spar_md_enc_process(
    float *cov_real[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH],
    float *cov_dtx_real[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH],
    BSTR_ENC_HANDLE hMetaData,                                  /* i/o: MetaData handle                         */
    int16_t dtx_vad,
    const int16_t dtx_vad,
    const int16_t nchan_inp,
    const int16_t sba_order                                     /* i  : Ambisonic (SBA) order                   */
);
@@ -3982,8 +3982,7 @@ void ivas_get_spar_md_from_dirac(
ivas_error ivas_spar_md_dec_open(
    ivas_spar_md_dec_state_t **hMdDec_out,                      /* i/o: SPAR MD decoder handle                  */
    const DECODER_CONFIG_HANDLE hDecoderConfig,                 /* i  : configuration structure                 */
    const int16_t num_channels                                  /* i  : number of internal channels             */
    ,
    const int16_t num_channels,                                 /* i  : number of internal channels             */
	const int16_t sba_order                                     /* i  : SBA order                               */
);

@@ -4064,8 +4063,8 @@ void ivas_enc_cov_handler_process(
    float *cov_dtx_real[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH],
    ivas_filterbank_t *pFb,                                     /* i/o: FB handle                               */
    const int16_t start_band,
    const int16_t end_band 
   ,const int16_t nchan_inp,
    const int16_t end_band,
    const int16_t nchan_inp,
    const int16_t dtx_vad,
    const int16_t transient_det
);
@@ -4087,8 +4086,7 @@ void ivas_cov_smooth_process(
    float *cov_real[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH],
    ivas_filterbank_t *pFb,                                     /* i/o: FB handle                               */
    const int16_t start_band,
    const int16_t end_band
    ,
    const int16_t end_band,
    const int16_t num_ch,
    const int16_t transient_det
);
@@ -4560,7 +4558,7 @@ ivas_error ivas_headTrack_open(
void rotateFrame_shd(
    HEAD_TRACK_DATA_HANDLE hHeadTrackData,                      /* i  : head track handle                                       */
    float output[][L_FRAME48k],                                 /* i/o: unrotated HOA3 signal buffer in TD                      */
    const int32_t output_fs,                                    /* i  : output sampling frequency                               */
    const int32_t output_Fs,                                    /* i  : output sampling frequency                               */
    const int16_t subframe_len,                                 /* i  : subframe length per channel                             */
    const IVAS_OUTPUT_SETUP hTransSetup,                        /* i  : format for rotation                                     */
    const int16_t subframe_idx                                  /* i  : subframe index                                          */
@@ -4569,7 +4567,7 @@ void rotateFrame_shd(
void rotateFrame_sd(
    HEAD_TRACK_DATA_HANDLE hHeadTrackData,                      /* i  : head track handle                                       */
    float output[][L_FRAME48k],                                 /* i/o: unrotated SD signal buffer in TD                        */
    const int32_t output_fs,                                    /* i  : output sampling frequency                               */
    const int32_t output_Fs,                                    /* i  : output sampling frequency                               */
    const int16_t subframe_len,                                 /* i  : subframe length per channel                             */
    const IVAS_OUTPUT_SETUP hTransSetup,                        /* i  : format for rotation                                     */
    const EFAP_HANDLE hEFAPdata,                                /* i  : EFAP structure                                          */
Loading