Loading apps/decoder.c +248 −19 File changed.Preview size limit exceeded, changes collapsed. Show changes apps/renderer.c +86 −90 Original line number Diff line number Diff line Loading @@ -433,8 +433,7 @@ static int16_t getTotalNumInChannels( IVAS_REND_InputId mcIds[RENDERER_MAX_MC_INPUTS], IVAS_REND_InputId ismIds[RENDERER_MAX_ISM_INPUTS], IVAS_REND_InputId sbaIds[RENDERER_MAX_SBA_INPUTS], IVAS_REND_InputId masaIds[RENDERER_MAX_MASA_INPUTS] ) IVAS_REND_InputId masaIds[RENDERER_MAX_MASA_INPUTS] ) { int16_t totalNumInChannels = 0; int16_t i, numInputChannels; Loading Loading @@ -520,8 +519,7 @@ static void setupWithSingleFormatInput( CmdlnArgs args, char *audioFilePath, IsmPositionProvider *positionProvider, MasaFileReader **masaReaders ) MasaFileReader **masaReaders ) { /* With single-format input, inputFilePath is the path to input audio file. */ strncpy( audioFilePath, args.inputFilePath, FILENAME_MAX - 1 ); Loading Loading @@ -580,8 +578,6 @@ static float dBToLin( } /*------------------------------------------------------------------------------------------* * main() * Loading Loading @@ -855,7 +851,6 @@ int main( fprintf( stderr, "\nIVAS_DEC_FeedRenderConfig failed\n" ); exit( -1 ); } } if ( ( error = IVAS_REND_SetOrientationTrackingMode( hIvasRend, args.orientation_tracking ) ) != IVAS_ERR_OK ) Loading Loading @@ -1208,7 +1203,11 @@ int main( exit( -1 ); } #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( error = IVAS_REND_SetHeadRotation( hIvasRend, headRot, Pos, DEFAULT_AXIS, sf_idx ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_REND_SetHeadRotation( hIvasRend, headRot, Pos, sf_idx ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); Loading Loading @@ -1366,7 +1365,6 @@ int main( } if ( ( error = IVAS_REND_GetSamples( hIvasRend, outBuffer ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in getting samples\n" ); Loading Loading @@ -3270,8 +3268,7 @@ static void convertInputBuffer( const int16_t numIntSamplesPerChannel, const int16_t numFloatSamplesPerChannel, const int16_t numChannels, float *floatBuffer ) float *floatBuffer ) { int16_t chnl, smpl, i; Loading Loading @@ -3308,8 +3305,7 @@ static void convertOutputBuffer( const float *floatBuffer, const int16_t numSamplesPerChannel, const int16_t numChannels, int16_t *intBuffer ) int16_t *intBuffer ) { int16_t chnl, smpl, i; float temp; Loading lib_com/common_api_types.h +0 −2 Original line number Diff line number Diff line Loading @@ -147,7 +147,6 @@ typedef enum } IVAS_HEAD_ORIENT_TRK_T; #ifdef NONBE_UNIFIED_DECODING_PATHS typedef enum { IVAS_RENDER_FRAMESIZE_UNKNOWN = 0, Loading @@ -156,7 +155,6 @@ typedef enum IVAS_RENDER_FRAMESIZE_20MS = 4 } IVAS_RENDER_FRAMESIZE; #endif typedef struct ivas_masa_metadata_frame_struct *IVAS_MASA_METADATA_HANDLE; typedef struct ivas_masa_decoder_ext_out_meta_struct *IVAS_MASA_DECODER_EXT_OUT_META_HANDLE; Loading lib_com/ivas_cnst.h +0 −23 Original line number Diff line number Diff line Loading @@ -1345,49 +1345,26 @@ typedef struct { unsigned short length[81]; } HUFF_ELEMENTS; #ifdef FIX_891_PARAMUPMIX_CLEANUP typedef struct { HUFF_ELEMENTS df0; HUFF_ELEMENTS df; } HUFF_TABLE; #else typedef struct { HUFF_ELEMENTS df0; HUFF_ELEMENTS df; HUFF_ELEMENTS dt; } HUFF_TABLE; #endif typedef enum { ALPHA, BETA } PAR_TYPE; #ifndef FIX_891_PARAMUPMIX_CLEANUP typedef enum { FINE, COARSE } QUANT_TYPE; #endif typedef struct { int16_t nquant; int16_t offset; float data[35]; } ACPL_QUANT_TABLE; #ifdef FIX_891_PARAMUPMIX_CLEANUP typedef struct { const int16_t (*alpha)[2]; const int16_t (*beta)[2]; } HUFF_NODE_TABLE; #else typedef struct { const int16_t (*alpha[2])[2]; const int16_t (*beta[2])[2]; } HUFF_NODE_TABLE; #endif /*----------------------------------------------------------------------------------* * Parametric MC Constants Loading lib_com/ivas_dirac_com.c +0 −10 Original line number Diff line number Diff line Loading @@ -163,10 +163,8 @@ ivas_error ivas_dirac_config( if ( ivas_format == SBA_FORMAT || ivas_format == SBA_ISM_FORMAT ) /* skip for MASA decoder */ { if ( ( error = ivas_dirac_sba_config( hQMetaData, element_mode, ivas_total_brate, sba_order, hConfig->nbands - spar_dirac_split_band #ifdef NONBE_FIX_871_ACELP_CRASH_IN_OSBA , ivas_format #endif ) ) != IVAS_ERR_OK ) { return error; Loading Loading @@ -325,10 +323,8 @@ void ivas_get_dirac_sba_max_md_bits( int16_t *metadata_max_bits, int16_t *qmetadata_max_bit_req, const int16_t nbands #ifdef NONBE_FIX_871_ACELP_CRASH_IN_OSBA , IVAS_FORMAT ivas_format #endif ) { if ( sba_total_brate <= IVAS_13k2 ) Loading @@ -345,13 +341,11 @@ void ivas_get_dirac_sba_max_md_bits( { *bits_frame_nominal = ACELP_16k40 / FRAMES_PER_SEC; *metadata_max_bits = 103; #ifdef NONBE_FIX_871_ACELP_CRASH_IN_OSBA /* OSBA needs an additional 2-bits safety margin to avoid acelp crashes */ if ( ivas_format == SBA_ISM_FORMAT ) { ( *metadata_max_bits ) -= 3; } #endif } else if ( sba_total_brate <= IVAS_32k ) { Loading Loading @@ -407,10 +401,8 @@ ivas_error ivas_dirac_sba_config( int32_t sba_total_brate, /* i : SBA total bitrate */ const int16_t sba_order, /* i : Ambisonic (SBA) order */ const int16_t nbands /* i : number of frequency bands */ #ifdef NONBE_FIX_871_ACELP_CRASH_IN_OSBA , IVAS_FORMAT ivas_format #endif ) { int16_t nbands_coded; Loading Loading @@ -474,10 +466,8 @@ ivas_error ivas_dirac_sba_config( } ivas_get_dirac_sba_max_md_bits( sba_total_brate, &hQMetaData->bits_frame_nominal, &hQMetaData->metadata_max_bits, &hQMetaData->qmetadata_max_bit_req, hQMetaData->q_direction[0].cfg.nbands #ifdef NONBE_FIX_871_ACELP_CRASH_IN_OSBA , ivas_format #endif ); return error; Loading Loading
apps/renderer.c +86 −90 Original line number Diff line number Diff line Loading @@ -433,8 +433,7 @@ static int16_t getTotalNumInChannels( IVAS_REND_InputId mcIds[RENDERER_MAX_MC_INPUTS], IVAS_REND_InputId ismIds[RENDERER_MAX_ISM_INPUTS], IVAS_REND_InputId sbaIds[RENDERER_MAX_SBA_INPUTS], IVAS_REND_InputId masaIds[RENDERER_MAX_MASA_INPUTS] ) IVAS_REND_InputId masaIds[RENDERER_MAX_MASA_INPUTS] ) { int16_t totalNumInChannels = 0; int16_t i, numInputChannels; Loading Loading @@ -520,8 +519,7 @@ static void setupWithSingleFormatInput( CmdlnArgs args, char *audioFilePath, IsmPositionProvider *positionProvider, MasaFileReader **masaReaders ) MasaFileReader **masaReaders ) { /* With single-format input, inputFilePath is the path to input audio file. */ strncpy( audioFilePath, args.inputFilePath, FILENAME_MAX - 1 ); Loading Loading @@ -580,8 +578,6 @@ static float dBToLin( } /*------------------------------------------------------------------------------------------* * main() * Loading Loading @@ -855,7 +851,6 @@ int main( fprintf( stderr, "\nIVAS_DEC_FeedRenderConfig failed\n" ); exit( -1 ); } } if ( ( error = IVAS_REND_SetOrientationTrackingMode( hIvasRend, args.orientation_tracking ) ) != IVAS_ERR_OK ) Loading Loading @@ -1208,7 +1203,11 @@ int main( exit( -1 ); } #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( error = IVAS_REND_SetHeadRotation( hIvasRend, headRot, Pos, DEFAULT_AXIS, sf_idx ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_REND_SetHeadRotation( hIvasRend, headRot, Pos, sf_idx ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); Loading Loading @@ -1366,7 +1365,6 @@ int main( } if ( ( error = IVAS_REND_GetSamples( hIvasRend, outBuffer ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in getting samples\n" ); Loading Loading @@ -3270,8 +3268,7 @@ static void convertInputBuffer( const int16_t numIntSamplesPerChannel, const int16_t numFloatSamplesPerChannel, const int16_t numChannels, float *floatBuffer ) float *floatBuffer ) { int16_t chnl, smpl, i; Loading Loading @@ -3308,8 +3305,7 @@ static void convertOutputBuffer( const float *floatBuffer, const int16_t numSamplesPerChannel, const int16_t numChannels, int16_t *intBuffer ) int16_t *intBuffer ) { int16_t chnl, smpl, i; float temp; Loading
lib_com/common_api_types.h +0 −2 Original line number Diff line number Diff line Loading @@ -147,7 +147,6 @@ typedef enum } IVAS_HEAD_ORIENT_TRK_T; #ifdef NONBE_UNIFIED_DECODING_PATHS typedef enum { IVAS_RENDER_FRAMESIZE_UNKNOWN = 0, Loading @@ -156,7 +155,6 @@ typedef enum IVAS_RENDER_FRAMESIZE_20MS = 4 } IVAS_RENDER_FRAMESIZE; #endif typedef struct ivas_masa_metadata_frame_struct *IVAS_MASA_METADATA_HANDLE; typedef struct ivas_masa_decoder_ext_out_meta_struct *IVAS_MASA_DECODER_EXT_OUT_META_HANDLE; Loading
lib_com/ivas_cnst.h +0 −23 Original line number Diff line number Diff line Loading @@ -1345,49 +1345,26 @@ typedef struct { unsigned short length[81]; } HUFF_ELEMENTS; #ifdef FIX_891_PARAMUPMIX_CLEANUP typedef struct { HUFF_ELEMENTS df0; HUFF_ELEMENTS df; } HUFF_TABLE; #else typedef struct { HUFF_ELEMENTS df0; HUFF_ELEMENTS df; HUFF_ELEMENTS dt; } HUFF_TABLE; #endif typedef enum { ALPHA, BETA } PAR_TYPE; #ifndef FIX_891_PARAMUPMIX_CLEANUP typedef enum { FINE, COARSE } QUANT_TYPE; #endif typedef struct { int16_t nquant; int16_t offset; float data[35]; } ACPL_QUANT_TABLE; #ifdef FIX_891_PARAMUPMIX_CLEANUP typedef struct { const int16_t (*alpha)[2]; const int16_t (*beta)[2]; } HUFF_NODE_TABLE; #else typedef struct { const int16_t (*alpha[2])[2]; const int16_t (*beta[2])[2]; } HUFF_NODE_TABLE; #endif /*----------------------------------------------------------------------------------* * Parametric MC Constants Loading
lib_com/ivas_dirac_com.c +0 −10 Original line number Diff line number Diff line Loading @@ -163,10 +163,8 @@ ivas_error ivas_dirac_config( if ( ivas_format == SBA_FORMAT || ivas_format == SBA_ISM_FORMAT ) /* skip for MASA decoder */ { if ( ( error = ivas_dirac_sba_config( hQMetaData, element_mode, ivas_total_brate, sba_order, hConfig->nbands - spar_dirac_split_band #ifdef NONBE_FIX_871_ACELP_CRASH_IN_OSBA , ivas_format #endif ) ) != IVAS_ERR_OK ) { return error; Loading Loading @@ -325,10 +323,8 @@ void ivas_get_dirac_sba_max_md_bits( int16_t *metadata_max_bits, int16_t *qmetadata_max_bit_req, const int16_t nbands #ifdef NONBE_FIX_871_ACELP_CRASH_IN_OSBA , IVAS_FORMAT ivas_format #endif ) { if ( sba_total_brate <= IVAS_13k2 ) Loading @@ -345,13 +341,11 @@ void ivas_get_dirac_sba_max_md_bits( { *bits_frame_nominal = ACELP_16k40 / FRAMES_PER_SEC; *metadata_max_bits = 103; #ifdef NONBE_FIX_871_ACELP_CRASH_IN_OSBA /* OSBA needs an additional 2-bits safety margin to avoid acelp crashes */ if ( ivas_format == SBA_ISM_FORMAT ) { ( *metadata_max_bits ) -= 3; } #endif } else if ( sba_total_brate <= IVAS_32k ) { Loading Loading @@ -407,10 +401,8 @@ ivas_error ivas_dirac_sba_config( int32_t sba_total_brate, /* i : SBA total bitrate */ const int16_t sba_order, /* i : Ambisonic (SBA) order */ const int16_t nbands /* i : number of frequency bands */ #ifdef NONBE_FIX_871_ACELP_CRASH_IN_OSBA , IVAS_FORMAT ivas_format #endif ) { int16_t nbands_coded; Loading Loading @@ -474,10 +466,8 @@ ivas_error ivas_dirac_sba_config( } ivas_get_dirac_sba_max_md_bits( sba_total_brate, &hQMetaData->bits_frame_nominal, &hQMetaData->metadata_max_bits, &hQMetaData->qmetadata_max_bit_req, hQMetaData->q_direction[0].cfg.nbands #ifdef NONBE_FIX_871_ACELP_CRASH_IN_OSBA , ivas_format #endif ); return error; Loading