Commit da2a0d29 authored by vaclav's avatar vaclav
Browse files

maintenance

parent 80a428f4
Loading
Loading
Loading
Loading
Loading
+8 −12
Original line number Diff line number Diff line
@@ -3166,12 +3166,11 @@ static ivas_error decodeVoIP(

            for ( i = 0; i < num_subframes; i++ )
            {
                if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i
#ifdef SPLIT_REND_WITH_HEAD_ROT
                                                           ,
                                                           DEFAULT_AXIS
                if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i, DEFAULT_AXIS ) ) != IVAS_ERR_OK )
#else
                if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i ) ) != IVAS_ERR_OK )
#endif
                                                           ) ) != IVAS_ERR_OK )
                {
                    fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                    goto cleanup;
@@ -3189,14 +3188,13 @@ static ivas_error decodeVoIP(

            for ( i = 0; i < num_subframes; i++ )
            {

                if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &Quaternions[i], &enableHeadRotation[i], &enableExternalOrientation[i], &enableRotationInterpolation[i], &numFramesToTargetOrientation[i] ) ) != IVAS_ERR_OK )
                {
                    fprintf( stderr, "\nError %s while reading external orientation from %s\n", IVAS_DEC_GetErrorMessage( error ),
                             RotationFileReader_getFilePath( externalOrientationFileReader ) );
                    fprintf( stderr, "\nError %s while reading external orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( externalOrientationFileReader ) );
                    goto cleanup;
                }
            }

            for ( i = 0; i < num_subframes; i++ )
            {
                if ( ( error = IVAS_DEC_FeedExternalOrientationData( hIvasDec, Quaternions[i], enableHeadRotation[i], enableExternalOrientation[i], enableRotationInterpolation[i], numFramesToTargetOrientation[i], i ) ) != IVAS_ERR_OK )
@@ -3230,13 +3228,12 @@ static ivas_error decodeVoIP(
            else
            {
                auPtr = au; /* might have been set to RTP packet in prev call */
                rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_readNextFrame( &rtpdumpDepacker, &rtpSequenceNumber, &rtpTimeStamp,
                                                                           &nextPacketRcvTime_ms,
                                                                           &isAMRWB_IOmode, &frameTypeIndex, &qBit,
                                                                           &auPtr, (uint16_t *) &auSize );
                rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_readNextFrame( &rtpdumpDepacker, &rtpSequenceNumber, &rtpTimeStamp, &nextPacketRcvTime_ms,
                                                                           &isAMRWB_IOmode, &frameTypeIndex, &qBit, &auPtr, (uint16_t *) &auSize );
                /* EVS RTP payload format has timescale 16000, JBM uses 1000 internally */
                rtpTimeStamp = rtpTimeStamp / 16;
            }

            if ( error == IVAS_ERR_END_OF_FILE || rtpdumpDepackerError == EVS_RTPDUMP_DEPACKER_EOF )
            {
                /* finished reading */
@@ -3259,7 +3256,6 @@ static ivas_error decodeVoIP(


        /* decode and get samples */

#ifdef SPLIT_REND_WITH_HEAD_ROT
#ifdef SUPPORT_JBM_TRACEFILE
        if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, systemTime_ms, writeJbmTraceFileFrameWrapper, jbmTraceWriter ) ) != IVAS_ERR_OK )
+10 −29
Original line number Diff line number Diff line
@@ -986,15 +986,13 @@ typedef enum
#define SPAR_CONFIG_BW                          FB

#define IVAS_SPAR_MAX_CH                        ((( IVAS_MAX_SBA_ORDER ) * ( IVAS_MAX_SBA_ORDER )) + 2) /* HOA2 + pHOA3*/
#define IVAS_HBR_MAX_DECOR_CHS                  (2)
#define IVAS_HBR_MAX_DECOR_CHS                  2

#define IVAS_SPAR_MAX_FB_IN_CHAN                11

#define IVAS_SPAR_P_LOWERTRI                    ((IVAS_SPAR_MAX_CH - 1) * (IVAS_SPAR_MAX_CH - 2)) >> 1
#define IVAS_SPAR_MAX_C_COEFF                   (IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS) * ( IVAS_SPAR_MAX_DMX_CHS - 1)

#define IVAS_SPAR_HOA3_NP_CHS                   8                           /* number of higher order non-planar channels */

#define SPAR_NUM_CODING_STRAT_BITS              3

/* AGC constants */
@@ -1009,8 +1007,8 @@ typedef enum
#define IVAS_ACTIVEW_DM_F_SCALE_VLBR            0.25f
#define IVAS_SPAR_FOA_DFLT_FREQ_PER_CHAN        24000

#define IVAS_SPAR_DYN_ACTIVEW_THRESH           (0.0039f)
#define IVAS_SPAR_SIDE_CH_DYN_ACTIVEW_THRESH   (32.0f)
#define IVAS_SPAR_DYN_ACTIVEW_THRESH            0.0039f
#define IVAS_SPAR_SIDE_CH_DYN_ACTIVEW_THRESH    32.0f

#define MAX_QUANT_STRATS                        3
#define MAX_CODING_STRATS                       3
@@ -1069,21 +1067,13 @@ enum
#define IVAS_DECORR_PARM_APD_TAU                20e-3f

/* IVAS SBA PCA */
#define IVAS_PCA_NB_SUBR                        20 /* 80 -> 0.25 ms, 40 -> 0.5 ms... */
#define IVAS_PCA_COV_THRES                      3e-5f
#define IVAS_PCA_QUAT_EPS                       1e-7f
#define IVAS_PCA_QBITS                          19
#define IVAS_PCA_N1                             91
#define IVAS_PCA_N1_EQ                          ( (IVAS_PCA_N1-1)/2 )
#define IVAS_PCA_BIT_LEN                        ( 1 + ( IVAS_PCA_QBITS - 1 + IVAS_PCA_QBITS ) )
#define IVAS_PCA_INTERP                         4
#define IVAS_PCA_N_SLOTS                        40
#define IVAS_PCA_LEN_INTERP_Q                   ( IVAS_PCA_INTERP * IVAS_PCA_N_SLOTS )
#define IVAS_PCA_DELAY_CMP                      24
#define IVAS_PCA_LEN_INTERP_EIG_DEC             ( (IVAS_PCA_N_SLOTS+IVAS_PCA_DELAY_CMP)*16)
#define IVAS_PCA_THRES_MIN_DOT                  0.8f
#define IVAS_PCA_THRES_MIN_DOT2                 0.0f
#define IVAS_PCA_THRES_DIST_ALT                 6.0f

typedef enum
{
@@ -1216,7 +1206,6 @@ enum
#define OMASA_STEREO_SW_CNT_MAX                 100
#define MASA_BIT_REDUCT_PARAM                   10
#define MASA_MAXIMUM_TWO_DIR_BANDS              24
#define NBITS_HR_COH                            4

#define MASA_JBM_RINGBUFFER_FRAMES              3

@@ -1540,9 +1529,14 @@ typedef enum
 * Split Binaural Rendering Constants
 *----------------------------------------------------------------------------------*/

#ifdef SPLIT_REND_WITH_HEAD_ROT
#define SPLIT_REND_256k                         256000
#define SPLIT_REND_320k                         320000
#define SPLIT_REND_384k                         384000
#define SPLIT_REND_512k                         512000
#define SPLIT_REND_768k                         768000
#define SPLIT_REND_MAX_BRATE                    SPLIT_REND_768k

#define CLDFB_PLC_XF                            2 /* Length of cross-fade into first good frame after frame loss in CLDFB cols. */
#endif

#define SPLIT_REND_DECOR_ALPHA                  0.25f

@@ -1796,19 +1790,6 @@ typedef enum
#define QUANT_STRAT_0                           0
#define QUANT_STRAT_2                           2

#ifdef SPLIT_REND_WITH_HEAD_ROT
/*----------------------------------------------------------------------------------*
 * Split rendering bitrate constants
 *----------------------------------------------------------------------------------*/

#define SPLIT_REND_256k                         256000
#define SPLIT_REND_320k                         320000
#define SPLIT_REND_384k                         384000
#define SPLIT_REND_512k                         512000
#define SPLIT_REND_768k                         768000
#define SPLIT_REND_MAX_BRATE                    SPLIT_REND_768k

#endif

/*----------------------------------------------------------------------------------*
 * Limiter constants
+5 −4
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ void ivas_wrap_arround(
 * get cumulative frequency model
 *-----------------------------------------------------------------------------------------*/

void ivas_get_cum_freq_model(
static void ivas_get_cum_freq_model(
    const int16_t *pFreq_model,
    const int16_t length,
    int16_t *pCum_freq_model )
@@ -102,7 +102,7 @@ void ivas_get_cum_freq_model(
 * Map the ivas_arith_pred_r_consts and ivas_huff_pred_r_consts tables
 *-----------------------------------------------------------------------------------------*/

int16_t ivas_map_num_pred_r_to_idx(
static int16_t ivas_map_num_pred_r_to_idx(
    const int16_t num_quant_points_pred_r,
    const int16_t active_w_flag )
{
@@ -160,7 +160,7 @@ int16_t ivas_map_num_pred_r_to_idx(
 * Map the ivas_arith_drct_r_consts and ivas_huff_drct_r_consts tables
 *-----------------------------------------------------------------------------------------*/

int16_t ivas_map_num_drct_r_to_idx(
static int16_t ivas_map_num_drct_r_to_idx(
    const int16_t num_quant_points_drct_r )
{
    int16_t drct_r_to_idx = -1;
@@ -182,6 +182,7 @@ int16_t ivas_map_num_drct_r_to_idx(
            assert( !"Forbidden value for DRCT quantization strategy index" );
            break;
    }

    return drct_r_to_idx;
}

@@ -192,7 +193,7 @@ int16_t ivas_map_num_drct_r_to_idx(
 * Map the ivas_arith_decd_r_consts and ivas_huff_decd_r_consts tables
 *-----------------------------------------------------------------------------------------*/

int16_t ivas_map_num_decd_r_to_idx(
static int16_t ivas_map_num_decd_r_to_idx(
    const int16_t num_quant_points_decd_r )
{
    int16_t decd_r_to_idx = -1;
+8 −0
Original line number Diff line number Diff line
@@ -44,6 +44,14 @@
#include "prot.h"


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

#define IVAS_PCA_QUAT_EPS 1e-7f
#define IVAS_PCA_N1_EQ    ( ( IVAS_PCA_N1 - 1 ) / 2 )


/*---------------------------------------------------------------------*
 * eye_matrix()
 *
+7 −26
Original line number Diff line number Diff line
@@ -3657,7 +3657,7 @@ ivas_error ivas_dirac_sba_config(

ivas_error ivas_dirac_dec_config(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                                       */
    const DIRAC_CONFIG_FLAG flag_configopen                     /* i/ : Flag determining if we open or reconfigure the DirAC decoder */
    const DIRAC_CONFIG_FLAG flag_configopen                     /* i  : Flag determining if we open or reconfigure the DirAC decoder */
);

void ivas_dirac_dec_close(
@@ -4902,25 +4902,6 @@ void ivas_wrap_arround(
    const int16_t length
);

void ivas_get_cum_freq_model(
    const int16_t *pFreq_model,
    const int16_t length,
    int16_t *pCum_freq_model
);

int16_t ivas_map_num_pred_r_to_idx(
    const int16_t num_quant_points_pred_r,
    const int16_t active_w_flag
);

int16_t ivas_map_num_drct_r_to_idx(
    const int16_t num_quant_points_drct_r
);

int16_t ivas_map_num_decd_r_to_idx(
    const int16_t num_quant_points_decd_r
);

/* Quantization utilities */
void ivas_quantise_real_values(
    const float *values,
@@ -5566,7 +5547,7 @@ ivas_error ivas_mono_dmx_renderer_open(


void ivas_mono_dmx_renderer_close(
    MONO_DOWNMIX_RENDERER_HANDLE *hMonoDmxRenderer              /* i/ i/o: Mono downmix structure                       */
    MONO_DOWNMIX_RENDERER_HANDLE *hMonoDmxRenderer              /* i/o: Mono downmix structure                          */
);

void ivas_mono_downmix_render_passive(
Loading