Loading apps/decoder.c +4 −0 Original line number Diff line number Diff line Loading @@ -1659,7 +1659,11 @@ static void resetHeadRotation( pPos[i].x_fx = 0; pPos[i].y_fx = 0; pPos[i].z_fx = 0; #ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION pPos[i].q_fact = 31; #else pPos[i].q_fact = 25; #endif } return; Loading apps/encoder.c +7 −0 Original line number Diff line number Diff line Loading @@ -372,6 +372,13 @@ int main( if ( arg.requestsFileName != NULL ) { if ( !arg.rtpdumpOutput ) { fprintf( stderr, "\nError: RTP requests file can be used with rtpdump output only.\n\n" ); usage_enc(); goto cleanup; } if ( ( error = RequestsFileReader_open( arg.requestsFileName, &requestsFileReader ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: Can't open requests file %s \n\n", arg.requestsFileName ); Loading apps/renderer.c +46 −0 Original line number Diff line number Diff line Loading @@ -1174,7 +1174,53 @@ int main( fprintf( stderr, "\nError in Renderer Config Init: %s\n", ivas_error_to_string( error ) ); goto cleanup; } #ifdef FIX_1452_DEFAULT_REVERB if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { /* Set reverb room size if specified or select based automatically based on default per input formats */ IVAS_ROOM_SIZE_T selectedReverbRoomSize = args.reverbRoomSize; if ( selectedReverbRoomSize == IVAS_ROOM_SIZE_AUTO ) { bool combinedFormat = false; selectedReverbRoomSize = IVAS_ROOM_SIZE_MEDIUM; /* ISM present with MASA/SBA inputs; treat as combined format */ if ( args.inConfig.numAudioObjects > 0 && ( args.inConfig.numMasaBuses > 0 || args.inConfig.numAmbisonicsBuses > 0 ) ) { combinedFormat = true; } if ( combinedFormat ) { selectedReverbRoomSize = IVAS_ROOM_SIZE_MEDIUM; } else { /* Only set large if ISM is present alone, MASA and Ambisonic have been checked above */ if ( args.inConfig.numAudioObjects > 0 && args.inConfig.numMultiChannelBuses == 0 ) { selectedReverbRoomSize = IVAS_ROOM_SIZE_LARGE; } /* if only MC is present, set medium; Will not be overridden by the subsequent block */ else if ( args.inConfig.numMultiChannelBuses > 0 ) { selectedReverbRoomSize = IVAS_ROOM_SIZE_MEDIUM; } else if ( args.inConfig.numMasaBuses > 0 || args.inConfig.numAmbisonicsBuses > 0 ) { selectedReverbRoomSize = IVAS_ROOM_SIZE_SMALL; } } } if ( ( error = IVAS_REND_SetReverbRoomSize( hIvasRend, selectedReverbRoomSize ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError setting reverb room size\n" ); goto cleanup; } } #endif if ( args.renderConfigFilePath[0] != '\0' ) { Loading lib_com/ari_fx.c +7 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,8 @@ #include "prot_fx.h" #include "cnst.h" #ifndef FIX_2402_SIMPLIFY_ARI_CODEC /** * \brief 31x16 Bit multiply (x*y) * Loading @@ -26,6 +28,7 @@ Word32 L_multi31x16_X2( Word16 xh, Word16 xl, Word16 y ) return z; } #endif /*--------------------------------------------------------------- Ari 14 bits common routines Loading @@ -39,6 +42,9 @@ Word32 L_multi31x16_X2( Word16 xh, Word16 xl, Word16 y ) * * \return r*c */ #ifndef FIX_2402_INLINE_FCT_ARI_CODEC /* Note: moved to proto_fx.h */ Word32 mul_sbc_14bits( Word32 r, /* Q0 */ Word16 c /* Q0 */ Loading @@ -57,3 +63,4 @@ Word32 mul_sbc_14bits( return ( ret ); } #endif lib_com/common_api_types.h +12 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,10 @@ #define IVAS_ER_LIST_HEIGHT 1.6f #define IVAS_ER_LIST_HEIGHT_FX 6710886 /* 1.6f in Q.22 */ #define IVAS_DEFAULT_AEID 65535 #ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION #define IVAS_LISTENER_POSITION_MAX 327.67f #define IVAS_LISTENER_POSITION_MAX_Q22 1374347592 /* 327.67 in Q22 */ #endif /* JBM constants for adaptive-playout */ #define IVAS_TIME_SCALE_MIN 50 /* min. time-scaling [%] */ Loading Loading @@ -160,7 +164,11 @@ typedef struct typedef struct { float x, y, z; #ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION Word32 x_fx, y_fx, z_fx; /* qfact, qfact, qfact */ #else Word32 x_fx, y_fx, z_fx; #endif Word16 q_fact; } IVAS_VECTOR3; Loading Loading @@ -351,7 +359,11 @@ typedef struct _IVAS_RENDER_CONFIG float directivity[IVAS_MAX_NUM_OBJECTS * 3]; Word16 directivity_fx[IVAS_MAX_NUM_OBJECTS * 3]; // has the following q-factor pattern: {6, 6, 15, 6, 6, 15, 6, 6, 15, 6, 6, 15} float distAtt[3]; #ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION Word32 distAtt_fx[3]; /* {Q25, Q28, Q28} */ #else Word32 distAtt_fx[3]; /* {Q27, Q30, Q30} */ #endif } IVAS_RENDER_CONFIG_DATA, *IVAS_RENDER_CONFIG_HANDLE; Loading Loading
apps/decoder.c +4 −0 Original line number Diff line number Diff line Loading @@ -1659,7 +1659,11 @@ static void resetHeadRotation( pPos[i].x_fx = 0; pPos[i].y_fx = 0; pPos[i].z_fx = 0; #ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION pPos[i].q_fact = 31; #else pPos[i].q_fact = 25; #endif } return; Loading
apps/encoder.c +7 −0 Original line number Diff line number Diff line Loading @@ -372,6 +372,13 @@ int main( if ( arg.requestsFileName != NULL ) { if ( !arg.rtpdumpOutput ) { fprintf( stderr, "\nError: RTP requests file can be used with rtpdump output only.\n\n" ); usage_enc(); goto cleanup; } if ( ( error = RequestsFileReader_open( arg.requestsFileName, &requestsFileReader ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: Can't open requests file %s \n\n", arg.requestsFileName ); Loading
apps/renderer.c +46 −0 Original line number Diff line number Diff line Loading @@ -1174,7 +1174,53 @@ int main( fprintf( stderr, "\nError in Renderer Config Init: %s\n", ivas_error_to_string( error ) ); goto cleanup; } #ifdef FIX_1452_DEFAULT_REVERB if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { /* Set reverb room size if specified or select based automatically based on default per input formats */ IVAS_ROOM_SIZE_T selectedReverbRoomSize = args.reverbRoomSize; if ( selectedReverbRoomSize == IVAS_ROOM_SIZE_AUTO ) { bool combinedFormat = false; selectedReverbRoomSize = IVAS_ROOM_SIZE_MEDIUM; /* ISM present with MASA/SBA inputs; treat as combined format */ if ( args.inConfig.numAudioObjects > 0 && ( args.inConfig.numMasaBuses > 0 || args.inConfig.numAmbisonicsBuses > 0 ) ) { combinedFormat = true; } if ( combinedFormat ) { selectedReverbRoomSize = IVAS_ROOM_SIZE_MEDIUM; } else { /* Only set large if ISM is present alone, MASA and Ambisonic have been checked above */ if ( args.inConfig.numAudioObjects > 0 && args.inConfig.numMultiChannelBuses == 0 ) { selectedReverbRoomSize = IVAS_ROOM_SIZE_LARGE; } /* if only MC is present, set medium; Will not be overridden by the subsequent block */ else if ( args.inConfig.numMultiChannelBuses > 0 ) { selectedReverbRoomSize = IVAS_ROOM_SIZE_MEDIUM; } else if ( args.inConfig.numMasaBuses > 0 || args.inConfig.numAmbisonicsBuses > 0 ) { selectedReverbRoomSize = IVAS_ROOM_SIZE_SMALL; } } } if ( ( error = IVAS_REND_SetReverbRoomSize( hIvasRend, selectedReverbRoomSize ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError setting reverb room size\n" ); goto cleanup; } } #endif if ( args.renderConfigFilePath[0] != '\0' ) { Loading
lib_com/ari_fx.c +7 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,8 @@ #include "prot_fx.h" #include "cnst.h" #ifndef FIX_2402_SIMPLIFY_ARI_CODEC /** * \brief 31x16 Bit multiply (x*y) * Loading @@ -26,6 +28,7 @@ Word32 L_multi31x16_X2( Word16 xh, Word16 xl, Word16 y ) return z; } #endif /*--------------------------------------------------------------- Ari 14 bits common routines Loading @@ -39,6 +42,9 @@ Word32 L_multi31x16_X2( Word16 xh, Word16 xl, Word16 y ) * * \return r*c */ #ifndef FIX_2402_INLINE_FCT_ARI_CODEC /* Note: moved to proto_fx.h */ Word32 mul_sbc_14bits( Word32 r, /* Q0 */ Word16 c /* Q0 */ Loading @@ -57,3 +63,4 @@ Word32 mul_sbc_14bits( return ( ret ); } #endif
lib_com/common_api_types.h +12 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,10 @@ #define IVAS_ER_LIST_HEIGHT 1.6f #define IVAS_ER_LIST_HEIGHT_FX 6710886 /* 1.6f in Q.22 */ #define IVAS_DEFAULT_AEID 65535 #ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION #define IVAS_LISTENER_POSITION_MAX 327.67f #define IVAS_LISTENER_POSITION_MAX_Q22 1374347592 /* 327.67 in Q22 */ #endif /* JBM constants for adaptive-playout */ #define IVAS_TIME_SCALE_MIN 50 /* min. time-scaling [%] */ Loading Loading @@ -160,7 +164,11 @@ typedef struct typedef struct { float x, y, z; #ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION Word32 x_fx, y_fx, z_fx; /* qfact, qfact, qfact */ #else Word32 x_fx, y_fx, z_fx; #endif Word16 q_fact; } IVAS_VECTOR3; Loading Loading @@ -351,7 +359,11 @@ typedef struct _IVAS_RENDER_CONFIG float directivity[IVAS_MAX_NUM_OBJECTS * 3]; Word16 directivity_fx[IVAS_MAX_NUM_OBJECTS * 3]; // has the following q-factor pattern: {6, 6, 15, 6, 6, 15, 6, 6, 15, 6, 6, 15} float distAtt[3]; #ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION Word32 distAtt_fx[3]; /* {Q25, Q28, Q28} */ #else Word32 distAtt_fx[3]; /* {Q27, Q30, Q30} */ #endif } IVAS_RENDER_CONFIG_DATA, *IVAS_RENDER_CONFIG_HANDLE; Loading