Loading apps/decoder.c +86 −79 Original line number Diff line number Diff line Loading @@ -256,8 +256,7 @@ int main( if ( arg.enableHeadRotation ) { /* sanity check */ if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { fprintf( stderr, "\nError: Head-rotation file file cannot be used in this output configuration.\n\n" ); goto cleanup; Loading Loading @@ -357,8 +356,7 @@ int main( if ( arg.renderConfigEnabled ) { /* sanity check */ if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { fprintf( stderr, "\nError: Renderer configuration file cannot be used in this output configuration.\n\n" ); goto cleanup; Loading Loading @@ -1313,7 +1311,6 @@ static void usage_dec( void ) } /*---------------------------------------------------------------------* * initOnFirstGoodFrame() * Loading Loading @@ -1521,7 +1518,13 @@ static ivas_error decodeG192( #ifdef IVAS_FLOAT_FIXED IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 } }; #else IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0 }, { 0, 0, 0, }, { 0, 0,0 }, { 0, 0, 0 } }; IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0 }, { 0, 0, 0, }, { 0, 0, 0 }, { 0, 0, 0 } }; #endif int16_t vec_pos_update, vec_pos_len; Loading Loading @@ -2092,7 +2095,13 @@ static ivas_error decodeVoIP( #ifdef IVAS_FLOAT_FIXED IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 } }; #else IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0 }, { 0, 0, 0, }, { 0, 0,0 }, { 0, 0, 0 } }; IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0 }, { 0, 0, 0, }, { 0, 0, 0 }, { 0, 0, 0 } }; #endif int16_t vec_pos_update, vec_pos_len; int16_t nOutSamples = 0; Loading Loading @@ -2272,8 +2281,7 @@ static ivas_error decodeVoIP( for ( i = 0; i < num_subframes; i++ ) { if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -2570,5 +2578,4 @@ cleanup: } #undef WMC_TOOL_SKIP apps/renderer.c +44 −44 Original line number Diff line number Diff line Loading @@ -831,7 +831,8 @@ int main( const int16_t frameSize_smpls = (int16_t) ( ( args.render_framesize ) * args.sampleRate * 5 / ( 1000 ) ); #ifdef IVAS_FLOAT_FIXED Word32 nonDiegeticPanGain_fx = (args.nonDiegeticPanGain ==1.0f)? ONE_IN_Q31: (args.nonDiegeticPanGain == -1.0f)? L_negate(ONE_IN_Q31):(Word32)(args.nonDiegeticPanGain*(1LL<< Q31 )); Word32 nonDiegeticPanGain_fx = ( args.nonDiegeticPanGain == 1.0f ) ? ONE_IN_Q31 : ( args.nonDiegeticPanGain == -1.0f ) ? L_negate( ONE_IN_Q31 ) : (Word32) ( args.nonDiegeticPanGain * ( 1LL << Q31 ) ); IF( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, nonDiegeticPanGain_fx, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error opening renderer handle: %s\n", ivas_error_to_string( error ) ); Loading Loading @@ -1443,7 +1444,6 @@ int main( fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } } for ( i = 0; i < args.inConfig.numAudioObjects; ++i ) Loading lib_com/ACcontextMapping_fx.c +16 −17 Original line number Diff line number Diff line Loading @@ -75,4 +75,3 @@ Word16 update_mixed_context(Word16 ctx, Word16 a) } return add( shl( s_and( ctx, 0xf ), 4 ), add( t, 13 ) ); } lib_com/ari_hm.c +60 −61 Original line number Diff line number Diff line Loading @@ -106,8 +106,7 @@ void UnmapIndex_fx( const Word16 LtpPitchLag, const Word8 SmallerLags, Word16 *FractionalResolution, Word32 *Lag ) Word32 *Lag ) { Word16 LtpPitchIndex, Multiplier; Word16 Lag16; Loading Loading @@ -146,7 +145,8 @@ void UnmapIndex_fx( move16(); Lag16 = add( PeriodicityIndex, GET_ADJ2( 80, 12, 3 ) ); } ELSE { ELSE { test(); IF( LT_16( PeriodicityIndex, 224 ) || SmallerLags != 0 ) { Loading @@ -154,7 +154,8 @@ void UnmapIndex_fx( move16(); Lag16 = add( PeriodicityIndex, GET_ADJ2( 208, 28, 1 ) ); } ELSE { ELSE { *FractionalResolution = 0; move16(); Lag16 = add( PeriodicityIndex, GET_ADJ2( 224, 188, 0 ) ); Loading Loading @@ -262,8 +263,7 @@ int16_t CountIndexBits_ivas( Word16 CountIndexBits_fx( Word16 Bandwidth, Word16 PeriodicityIndex ) Word16 PeriodicityIndex ) { Word16 result; Word16 PeriodicityIndexS; Loading Loading @@ -486,7 +486,6 @@ void tcx_hm_modify_envelope_fx( h = add( h, 1 ); k = extract_l( L_shr( imult3216( lag, h ), fract_res ) ); } } Loading lib_com/ari_hm_fx.c +100 −105 Original line number Diff line number Diff line Loading @@ -19,8 +19,7 @@ void UnmapIndex( const Word16 LtpPitchLag, const Word16 SmallerLags, Word16 *FractionalResolution, Word32 *Lag ) Word32 *Lag ) { Word16 LtpPitchIndex, Multiplier; Word16 Lag16; Loading Loading @@ -59,7 +58,8 @@ void UnmapIndex( move16(); Lag16 = add( PeriodicityIndex, GET_ADJ2( 80, 12, 3 ) ); } ELSE { ELSE { test(); IF( LT_16( PeriodicityIndex, 224 ) || SmallerLags != 0 ) { Loading @@ -67,7 +67,8 @@ void UnmapIndex( move16(); Lag16 = add( PeriodicityIndex, GET_ADJ2( 208, 28, 1 ) ); } ELSE { ELSE { *FractionalResolution = 0; move16(); Lag16 = add( PeriodicityIndex, GET_ADJ2( 224, 188, 0 ) ); Loading Loading @@ -162,13 +163,11 @@ void ConfigureContextHm( hm_cfg->numHoleIndices = (Word16) ( tmp - hm_cfg->holeIndices ); *tmp++ = NumCoeffs; move16(); /* Add extremal element signaling the end of the buffer */ } Word16 CountIndexBits( Word16 Bandwidth, Word16 PeriodicityIndex ) Word16 PeriodicityIndex ) { Word16 result; Word16 PeriodicityIndexS; Loading @@ -187,7 +186,6 @@ Word16 CountIndexBits( } int tcx_hm_render( Word32 lag, /* i: pitch lag Q0 */ Word16 fract_res, /* i: fractional resolution of the lag Q0 */ Loading Loading @@ -288,7 +286,4 @@ void tcx_hm_modify_envelope( h = add( h, 1 ); k = extract_l( L_shr( imult3216( lag, h ), fract_res ) ); } } Loading
apps/decoder.c +86 −79 Original line number Diff line number Diff line Loading @@ -256,8 +256,7 @@ int main( if ( arg.enableHeadRotation ) { /* sanity check */ if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { fprintf( stderr, "\nError: Head-rotation file file cannot be used in this output configuration.\n\n" ); goto cleanup; Loading Loading @@ -357,8 +356,7 @@ int main( if ( arg.renderConfigEnabled ) { /* sanity check */ if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { fprintf( stderr, "\nError: Renderer configuration file cannot be used in this output configuration.\n\n" ); goto cleanup; Loading Loading @@ -1313,7 +1311,6 @@ static void usage_dec( void ) } /*---------------------------------------------------------------------* * initOnFirstGoodFrame() * Loading Loading @@ -1521,7 +1518,13 @@ static ivas_error decodeG192( #ifdef IVAS_FLOAT_FIXED IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 } }; #else IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0 }, { 0, 0, 0, }, { 0, 0,0 }, { 0, 0, 0 } }; IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0 }, { 0, 0, 0, }, { 0, 0, 0 }, { 0, 0, 0 } }; #endif int16_t vec_pos_update, vec_pos_len; Loading Loading @@ -2092,7 +2095,13 @@ static ivas_error decodeVoIP( #ifdef IVAS_FLOAT_FIXED IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 } }; #else IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0 }, { 0, 0, 0, }, { 0, 0,0 }, { 0, 0, 0 } }; IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0 }, { 0, 0, 0, }, { 0, 0, 0 }, { 0, 0, 0 } }; #endif int16_t vec_pos_update, vec_pos_len; int16_t nOutSamples = 0; Loading Loading @@ -2272,8 +2281,7 @@ static ivas_error decodeVoIP( for ( i = 0; i < num_subframes; i++ ) { if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -2570,5 +2578,4 @@ cleanup: } #undef WMC_TOOL_SKIP
apps/renderer.c +44 −44 Original line number Diff line number Diff line Loading @@ -831,7 +831,8 @@ int main( const int16_t frameSize_smpls = (int16_t) ( ( args.render_framesize ) * args.sampleRate * 5 / ( 1000 ) ); #ifdef IVAS_FLOAT_FIXED Word32 nonDiegeticPanGain_fx = (args.nonDiegeticPanGain ==1.0f)? ONE_IN_Q31: (args.nonDiegeticPanGain == -1.0f)? L_negate(ONE_IN_Q31):(Word32)(args.nonDiegeticPanGain*(1LL<< Q31 )); Word32 nonDiegeticPanGain_fx = ( args.nonDiegeticPanGain == 1.0f ) ? ONE_IN_Q31 : ( args.nonDiegeticPanGain == -1.0f ) ? L_negate( ONE_IN_Q31 ) : (Word32) ( args.nonDiegeticPanGain * ( 1LL << Q31 ) ); IF( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, nonDiegeticPanGain_fx, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error opening renderer handle: %s\n", ivas_error_to_string( error ) ); Loading Loading @@ -1443,7 +1444,6 @@ int main( fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } } for ( i = 0; i < args.inConfig.numAudioObjects; ++i ) Loading
lib_com/ACcontextMapping_fx.c +16 −17 Original line number Diff line number Diff line Loading @@ -75,4 +75,3 @@ Word16 update_mixed_context(Word16 ctx, Word16 a) } return add( shl( s_and( ctx, 0xf ), 4 ), add( t, 13 ) ); }
lib_com/ari_hm.c +60 −61 Original line number Diff line number Diff line Loading @@ -106,8 +106,7 @@ void UnmapIndex_fx( const Word16 LtpPitchLag, const Word8 SmallerLags, Word16 *FractionalResolution, Word32 *Lag ) Word32 *Lag ) { Word16 LtpPitchIndex, Multiplier; Word16 Lag16; Loading Loading @@ -146,7 +145,8 @@ void UnmapIndex_fx( move16(); Lag16 = add( PeriodicityIndex, GET_ADJ2( 80, 12, 3 ) ); } ELSE { ELSE { test(); IF( LT_16( PeriodicityIndex, 224 ) || SmallerLags != 0 ) { Loading @@ -154,7 +154,8 @@ void UnmapIndex_fx( move16(); Lag16 = add( PeriodicityIndex, GET_ADJ2( 208, 28, 1 ) ); } ELSE { ELSE { *FractionalResolution = 0; move16(); Lag16 = add( PeriodicityIndex, GET_ADJ2( 224, 188, 0 ) ); Loading Loading @@ -262,8 +263,7 @@ int16_t CountIndexBits_ivas( Word16 CountIndexBits_fx( Word16 Bandwidth, Word16 PeriodicityIndex ) Word16 PeriodicityIndex ) { Word16 result; Word16 PeriodicityIndexS; Loading Loading @@ -486,7 +486,6 @@ void tcx_hm_modify_envelope_fx( h = add( h, 1 ); k = extract_l( L_shr( imult3216( lag, h ), fract_res ) ); } } Loading
lib_com/ari_hm_fx.c +100 −105 Original line number Diff line number Diff line Loading @@ -19,8 +19,7 @@ void UnmapIndex( const Word16 LtpPitchLag, const Word16 SmallerLags, Word16 *FractionalResolution, Word32 *Lag ) Word32 *Lag ) { Word16 LtpPitchIndex, Multiplier; Word16 Lag16; Loading Loading @@ -59,7 +58,8 @@ void UnmapIndex( move16(); Lag16 = add( PeriodicityIndex, GET_ADJ2( 80, 12, 3 ) ); } ELSE { ELSE { test(); IF( LT_16( PeriodicityIndex, 224 ) || SmallerLags != 0 ) { Loading @@ -67,7 +67,8 @@ void UnmapIndex( move16(); Lag16 = add( PeriodicityIndex, GET_ADJ2( 208, 28, 1 ) ); } ELSE { ELSE { *FractionalResolution = 0; move16(); Lag16 = add( PeriodicityIndex, GET_ADJ2( 224, 188, 0 ) ); Loading Loading @@ -162,13 +163,11 @@ void ConfigureContextHm( hm_cfg->numHoleIndices = (Word16) ( tmp - hm_cfg->holeIndices ); *tmp++ = NumCoeffs; move16(); /* Add extremal element signaling the end of the buffer */ } Word16 CountIndexBits( Word16 Bandwidth, Word16 PeriodicityIndex ) Word16 PeriodicityIndex ) { Word16 result; Word16 PeriodicityIndexS; Loading @@ -187,7 +186,6 @@ Word16 CountIndexBits( } int tcx_hm_render( Word32 lag, /* i: pitch lag Q0 */ Word16 fract_res, /* i: fractional resolution of the lag Q0 */ Loading Loading @@ -288,7 +286,4 @@ void tcx_hm_modify_envelope( h = add( h, 1 ); k = extract_l( L_shr( imult3216( lag, h ), fract_res ) ); } }