Loading .gitlab-ci.yml +238 −418 File changed.Preview size limit exceeded, changes collapsed. Show changes .gitlab-ci/variables.yml 0 → 100644 +30 −0 Original line number Diff line number Diff line variables: EVS_BE_TEST_DIR: "/usr/local/be_2_evs_test" EVS_BE_WIN_TEST_DIR: "C:/Users/gitlab-runner/testvec" PROCESSING_SCRIPTS_BIN_DIR: "/test-bin" SANITIZER_TESTS: "CLANG1 CLANG2 CLANG3" OUT_FORMATS_CHANNEL_BASED: "stereo mono 5_1 5_1_2 5_1_4 7_1 7_1_4" OUT_FORMATS_SCENE_BASED: "FOA HOA2 HOA3" OUT_FORMATS_BINAURAL: "BINAURAL BINAURAL_ROOM_IR BINAURAL_ROOM_REVERB" OUT_FORMATS_ALL: "$OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT" MANUAL_PIPELINE_TYPE: description: "Type for the manual pipeline run. Use 'test-be-release' to run BE test against release codec." value: 'default' options: - 'default' - 'test-be-release' - 'test-long-self-test' - 'ivas-conformance' - 'ivas-conformance-linux' - 'check-clipping' - 'test-branch-vs-input-passthrough' PYTEST_ARGS: "" LONG_TEST_SUITE: "tests/codec_be_on_mr_nonselection tests/renderer --param_file scripts/config/self_test_ltv.prm --use_ltv" LONG_TEST_SUITE_NO_RENDERER: "tests/codec_be_on_mr_nonselection --param_file scripts/config/self_test_ltv.prm --use_ltv" SHORT_TEST_SUITE: "tests/codec_be_on_mr_nonselection" SHORT_TEST_SUITE_ENCODER: "tests/codec_be_on_mr_nonselection/test_param_file.py --param_file scripts/config/self_test_basop_encoder.prm" LONG_TEST_SUITE_ENCODER: "tests/codec_be_on_mr_nonselection/test_param_file.py --param_file scripts/config/self_test_ltv_basop_encoder.prm" TEST_SUITE: "" # note: currently overwrites default value from ci repo TESTCASE_TIMEOUT_STV_SANITIZERS: 240 apps/decoder.c +26 −76 Original line number Diff line number Diff line Loading @@ -69,22 +69,10 @@ static #endif int32_t frame = 0; /* Counter of frames */ #ifdef DEBUGGING #define MIN_NUM_BITS_ACTIVE_FRAME 56 #define NUM_BITS_SID_IVAS_5K2 104 #define MAX_OUTPUT_PCM_BUFFER_SIZE ( ( IVAS_MAX_OUTPUT_CHANNELS + IVAS_MAX_NUM_OBJECTS ) * IVAS_MAX_FRAME_SIZE ) #define ORIENT_TRK_NONE ( 0 ) #define ORIENT_TRK_REF ( 1 ) #define ORIENT_TRK_AVG ( 2 ) #define ORIENT_TRK_REF_VEC ( 3 ) #define ORIENT_TRK_REF_VEC_LEV ( 4 ) #ifdef VARIABLE_SPEED_DECODING #define VARIABLE_SPEED_FETCH_FRAMESIZE_MS 20 #endif #define JBM_FRONTEND_FETCH_FRAMESIZE_MS 20 #define HEADROTATION_FETCH_FRAMESIZE_MS 5 #define DEFAULT_FETCH_FRAMESIZE_MS 20 /*------------------------------------------------------------------------------------------* Loading Loading @@ -129,7 +117,7 @@ typedef struct IVAS_DEC_INPUT_FORMAT inputFormat; bool customLsOutputEnabled; char *customLsSetupFilename; int16_t orientation_tracking; IVAS_HEAD_ORIENT_TRK_T orientation_tracking; bool non_diegetic_pan_enabled; float non_diegetic_pan_gain; bool renderConfigEnabled; Loading Loading @@ -183,7 +171,7 @@ typedef struct static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg ); static void usage_dec( void ); static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, IVAS_DEC_HANDLE hIvasDec ); static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); static ivas_error load_hrtf_from_file( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, IVAS_DEC_HANDLE hIvasDec, const IVAS_AUDIO_CONFIG OutputConfig, const int32_t output_Fs ); #ifdef DEBUGGING static ivas_error printBitstreamInfoVoip( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec ); Loading Loading @@ -359,7 +347,7 @@ int main( } /* sanity check */ if ( arg.orientation_tracking != ORIENT_TRK_REF ) if ( arg.orientation_tracking != IVAS_HEAD_ORIENT_TRK_REF ) { fprintf( stderr, "\nError: Reference rotation file can be used in '-otr ref' mode only.\n\n" ); goto cleanup; Loading @@ -386,7 +374,7 @@ int main( } /* sanity check */ if ( arg.orientation_tracking != ORIENT_TRK_REF_VEC && arg.orientation_tracking != ORIENT_TRK_REF_VEC_LEV ) if ( arg.orientation_tracking != IVAS_HEAD_ORIENT_TRK_REF_VEC && arg.orientation_tracking != IVAS_HEAD_ORIENT_TRK_REF_VEC_LEV ) { fprintf( stderr, "\nError: Reference trajectory file can be used in '-otr ref_vec' or '-otr ref_vec_lev' mode only.\n\n" ); goto cleanup; Loading Loading @@ -445,18 +433,14 @@ int main( asked_frame_size = arg.renderFramesize; uint16_t aeID = arg.aeSequence.count > 0 ? arg.aeSequence.pID[0] : 65535; #ifdef LIB_DEC_REVISION if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain, arg.dpidEnabled, aeID, arg.objEditEnabled, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.tsmEnabled, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain, arg.dpidEnabled, aeID, arg.objEditEnabled, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( error = IVAS_DEC_GetRenderFramesize( hIvasDec, &arg.renderFramesize ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); Loading Loading @@ -756,13 +740,11 @@ int main( } pcmBuf = malloc( pcmBufSize * sizeof( int16_t ) ); #ifdef LIB_DEC_REVISION if ( pcmBuf == NULL ) { fprintf( stdout, "Error: Unable to allocate memory for output buffer.\n" ); goto cleanup; } #endif /*-----------------------------------------------------------------* * Decoding Loading @@ -770,7 +752,7 @@ int main( if ( arg.voipMode ) { error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, hIvasDec ); error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, hIvasDec, pcmBuf ); } else { Loading Loading @@ -968,6 +950,10 @@ static bool parseCmdlIVAS_dec( int16_t i; char argv_to_upper[FILENAME_MAX]; /*-----------------------------------------------------------------* * Set default values *-----------------------------------------------------------------*/ #ifdef DEBUGGING float ftmp; Loading @@ -976,7 +962,7 @@ static bool parseCmdlIVAS_dec( arg->agcBitstream = NULL; #endif #endif arg->output_Fs = 48000; arg->output_Fs = IVAS_MAX_SAMPLING_RATE; arg->outputConfig = IVAS_AUDIO_CONFIG_MONO; arg->decMode = IVAS_DEC_MODE_IVAS; arg->quietModeEnabled = false; Loading @@ -986,7 +972,7 @@ static bool parseCmdlIVAS_dec( arg->enableHeadRotation = false; arg->headrotTrajFileName = NULL; arg->orientation_tracking = ORIENT_TRK_NONE; arg->orientation_tracking = IVAS_HEAD_ORIENT_TRK_NONE; arg->enableReferenceRotation = false; arg->headrotTrajFileName = NULL; arg->enableReferenceVectorTracking = false; Loading Loading @@ -1064,30 +1050,18 @@ static bool parseCmdlIVAS_dec( if ( strcmp( argv_to_upper, "-VOIP" ) == 0 ) { #ifdef LIB_DEC_REVISION arg->voipMode = true; #else arg->voipMode = 1; #endif i++; } else if ( strcmp( argv_to_upper, "-VOIP_HF_ONLY=0" ) == 0 ) { #ifdef LIB_DEC_REVISION arg->voipMode = true; #else arg->voipMode = 1; #endif arg->inputFormat = IVAS_DEC_INPUT_FORMAT_RTPDUMP; i++; } else if ( strcmp( argv_to_upper, "-VOIP_HF_ONLY=1" ) == 0 ) { #ifdef LIB_DEC_REVISION arg->voipMode = true; #else arg->voipMode = 1; #endif arg->inputFormat = IVAS_DEC_INPUT_FORMAT_RTPDUMP_HF; i++; } Loading Loading @@ -1198,9 +1172,9 @@ static bool parseCmdlIVAS_dec( } arg->tsmScale = (uint16_t) tmp; if ( arg->tsmScale < 50 || arg->tsmScale > 150 ) if ( arg->tsmScale < IVAS_TIME_SCALE_MIN || arg->tsmScale > IVAS_TIME_SCALE_MAX ) { fprintf( stderr, "Error: Scaling factor value must be 50 <= fac <= 150!\n\n" ); fprintf( stderr, "Error: Scaling factor value must be IVAS_TIME_SCALE_MIN <= fac <= IVAS_TIME_SCALE_MAX!\n\n" ); usage_dec(); return false; } Loading Loading @@ -1237,10 +1211,8 @@ static bool parseCmdlIVAS_dec( { if ( !is_digits_only( argv[i] ) ) { #ifdef LIB_DEC_REVISION fprintf( stderr, "Error: Render frame size is invalid or not specified!\n\n" ); usage_dec(); #endif return false; } Loading Loading @@ -1275,23 +1247,23 @@ static bool parseCmdlIVAS_dec( if ( strcmp( argv_to_upper, "NONE" ) == 0 ) { arg->orientation_tracking = ORIENT_TRK_NONE; arg->orientation_tracking = IVAS_HEAD_ORIENT_TRK_NONE; } else if ( strcmp( argv_to_upper, "REF" ) == 0 ) { arg->orientation_tracking = ORIENT_TRK_REF; arg->orientation_tracking = IVAS_HEAD_ORIENT_TRK_REF; } else if ( strcmp( argv_to_upper, "AVG" ) == 0 ) { arg->orientation_tracking = ORIENT_TRK_AVG; arg->orientation_tracking = IVAS_HEAD_ORIENT_TRK_AVG; } else if ( strcmp( argv_to_upper, "REF_VEC" ) == 0 ) { arg->orientation_tracking = ORIENT_TRK_REF_VEC; arg->orientation_tracking = IVAS_HEAD_ORIENT_TRK_REF_VEC; } else if ( strcmp( argv_to_upper, "REF_VEC_LEV" ) == 0 ) { arg->orientation_tracking = ORIENT_TRK_REF_VEC_LEV; arg->orientation_tracking = IVAS_HEAD_ORIENT_TRK_REF_VEC_LEV; } else { Loading Loading @@ -1686,7 +1658,7 @@ static void usage_dec( void ) #ifdef DEBUGGING #ifdef VARIABLE_SPEED_DECODING fprintf( stdout, "-VS fac : Variable Speed mode: change speed of playout fac as integer in percent.\n" ); fprintf( stdout, " 50 <= fac <= 150; fac<100 faster, fac>100 slower\n" ); fprintf( stdout, " IVAS_TIME_SCALE_MIN <= fac <= IVAS_TIME_SCALE_MAX; fac<100 faster, fac>100 slower\n" ); #endif #endif fprintf( stdout, "-fr L : render frame size in ms L=(5,10,20), default is 20)\n" ); Loading Loading @@ -1822,15 +1794,6 @@ static ivas_error initOnFirstGoodFrame( return error; } #ifndef LIB_DEC_REVISION int32_t pcmFrameSize; if ( ( error = IVAS_DEC_GetPcmFrameSize( hIvasDec, &pcmFrameSize ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetPcmFrameSize, error code: %d\n", error ); return error; } #endif if ( isSplitRend ) { /* Open split rendering metadata writer */ Loading Loading @@ -1888,7 +1851,6 @@ static ivas_error initOnFirstGoodFrame( } } #ifdef LIB_DEC_REVISION int16_t pcmFrameSize; if ( ( error = IVAS_DEC_GetOutputBufferSize( hIvasDec, &pcmFrameSize ) ) != IVAS_ERR_OK ) { Loading @@ -1896,15 +1858,12 @@ static ivas_error initOnFirstGoodFrame( return error; } #endif int16_t *zeroBuf = malloc( pcmFrameSize * sizeof( int16_t ) ); #ifdef LIB_DEC_REVISION if ( zeroBuf == NULL ) { fprintf( stdout, "Error: Unable to allocate memory for output buffer.\n" ); return IVAS_ERR_FAILED_ALLOC; } #endif memset( zeroBuf, 0, pcmFrameSize * sizeof( int16_t ) ); for ( int16_t i = 0; i < numInitialBadFrames; ++i ) Loading Loading @@ -2119,7 +2078,6 @@ static ivas_error decodeG192( int16_t isSplitRend, isSplitCoded; #ifdef VARIABLE_SPEED_DECODING #ifdef LIB_DEC_REVISION if ( arg.tsmEnabled ) { if ( ( error = IVAS_DEC_EnableTsm( hIvasDec ) ) != IVAS_ERR_OK ) Loading @@ -2129,7 +2087,6 @@ static ivas_error decodeG192( } } #endif #endif if ( ( error = IVAS_DEC_is_split_rendering_enabled( hIvasDec, &isSplitRend ) ) != IVAS_ERR_OK ) { Loading Loading @@ -3023,14 +2980,15 @@ static ivas_error decodeVoIP( RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, IVAS_DEC_HANDLE hIvasDec ) IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ) { bool decodingFailed = true; /* Assume failure until cleanup is reached without errors */ ivas_error error = IVAS_ERR_OK; uint32_t nextPacketRcvTime_ms = 0; uint32_t systemTime_ms = 0; uint32_t systemTimeInc_ms = (uint32_t) JBM_FRONTEND_FETCH_FRAMESIZE_MS; uint32_t systemTimeInc_ms = (uint32_t) ( 1000 / IVAS_NUM_FRAMES_PER_SEC ); int32_t nFramesFed = 0; uint8_t au[( IVAS_MAX_BITS_PER_FRAME + 7 ) >> 3]; Loading @@ -3044,7 +3002,6 @@ static ivas_error decodeVoIP( MasaFileWriter *masaWriter = NULL; uint16_t numObj = 0; int16_t pcmBuf[MAX_OUTPUT_PCM_BUFFER_SIZE]; AudioFileWriter *afWriter = NULL; #ifdef SUPPORT_JBM_TRACEFILE JbmTraceFileWriter *jbmTraceWriter = NULL; Loading Loading @@ -3445,12 +3402,7 @@ static ivas_error decodeVoIP( { if ( ( error = IVAS_DEC_HasDecodedFirstGoodFrame( hIvasDec, &decodedGoodFrame ) ) != IVAS_ERR_OK ) { #ifdef LIB_DEC_REVISION fprintf( stderr, "Error in IVAS_DEC_HasDecodedFirstGoodFrame(): %s\n", IVAS_DEC_GetErrorMessage( error ) ); #else fprintf( stderr, "Error in IVAS_DEC_HasDecodedFirstGoodFrame, code: %d\n", error ); #endif goto cleanup; } Loading @@ -3462,9 +3414,7 @@ static ivas_error decodeVoIP( if ( ( error = initOnFirstGoodFrame( hIvasDec, arg, numInitialBadFrames, &nOutSamples, NULL, delayNumSamples_orig, &delayNumSamples, &delayTimeScale, &bsFormat, &afWriter, &masaWriter, ismWriters, &nOutChannels, &numObj, &splitRendWriter ) ) != IVAS_ERR_OK ) { #ifdef LIB_DEC_REVISION fprintf( stderr, "Error in initOnFirstGoodFrame(): %s\n", IVAS_DEC_GetErrorMessage( error ) ); #endif goto cleanup; } } Loading apps/encoder.c +22 −26 Original line number Diff line number Diff line Loading @@ -154,7 +154,6 @@ typedef struct * Local functions prototypes *------------------------------------------------------------------------------------------*/ static void initArgStruct( EncArguments *arg ); static bool parseCmdlIVAS_enc( int16_t argc, char *argv[], EncArguments *arg ); static void usage_enc( void ); static bool readBandwidth( FILE *file, IVAS_ENC_BANDWIDTH *bandwidth, int32_t *bandwidthFrameCounter ); Loading Loading @@ -207,8 +206,6 @@ int main( reset_mem( USE_BYTES ); #endif initArgStruct( &arg ); /*------------------------------------------------------------------------------------------* * Parse command-line arguments *------------------------------------------------------------------------------------------*/ Loading Loading @@ -878,14 +875,29 @@ cleanup: * Local functions *-------------------------------------------------------------------*/ #define IVAS_DEFAULT_AGC ( 0 ) /*---------------------------------------------------------------------* * parseCmdlIVAS_enc() * * Encoder command-line parsing *---------------------------------------------------------------------*/ static void initArgStruct( EncArguments *arg ) static bool parseCmdlIVAS_enc( int16_t argc, char *argv[], EncArguments *arg ) { /* Set default values here */ int16_t i, j; char argv_to_upper[FILENAME_MAX]; char stmp[FILENAME_MAX]; int32_t tmp; /*-----------------------------------------------------------------* * Set default values *-----------------------------------------------------------------*/ arg->inputWavFilename = NULL; arg->outputBitstreamFilename = NULL; arg->inputFs = 0; arg->inputFs = IVAS_MAX_SAMPLING_RATE; arg->inputFormat = IVAS_ENC_INPUT_MONO; arg->is_binaural = false; arg->inputFormatConfig.stereoToMonoDownmix = false; Loading Loading @@ -919,25 +931,9 @@ static void initArgStruct( EncArguments *arg ) #endif arg->pca = false; return; } /*---------------------------------------------------------------------* * parseCmdlIVAS_enc() * * Encoder command-line parsing *---------------------------------------------------------------------*/ static bool parseCmdlIVAS_enc( int16_t argc, char *argv[], EncArguments *arg ) { int16_t i, j; char argv_to_upper[FILENAME_MAX]; char stmp[FILENAME_MAX]; int32_t tmp; /*-----------------------------------------------------------------* * Initialization *-----------------------------------------------------------------*/ if ( argc < 5 ) { Loading apps/isar_post_rend.c +4 −20 Original line number Diff line number Diff line Loading @@ -945,7 +945,7 @@ int main( memset( outBuffer.data, 0, outBuffer.config.numSamplesPerChannel * outBuffer.config.numChannels * sizeof( float ) ); bitsBufferSize = SPLIT_REND_BITS_BUFF_SIZE; bitsBufferSize = ISAR_SPLIT_REND_BITS_BUFF_SIZE; if ( bitsBufferSize > 0 ) { Loading Loading @@ -985,9 +985,7 @@ int main( while ( 1 ) { #ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST int16_t bfi = 0; #endif int16_t num_in_channels; num_in_channels = inBuffer.config.numChannels; Loading @@ -995,12 +993,10 @@ int main( if ( ( hSplitRendFileReadWrite != NULL ) && splitBinNeedsNewFrame ) { ivas_error error_tmp; numSamplesRead = (int16_t) inBufferSize; #ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST error_tmp = split_rend_read_bits_from_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten, &bfi ); #else error_tmp = split_rend_read_bits_from_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten ); #endif if ( error_tmp != IVAS_ERR_OK ) { if ( error_tmp == IVAS_ERR_END_OF_FILE ) Loading Loading @@ -1067,24 +1063,13 @@ int main( /* Read from split renderer bfi file if specified */ if ( splitRendBFIReader != NULL && splitBinNeedsNewFrame ) { #ifndef NONBE_1293_CRASH_FIRST_FRAME_LOST int16_t bfi; #endif if ( ( error = SplitRendBFIFileReading( splitRendBFIReader, &bfi ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in SplitRendBFIFileReading(): %s\n", ivas_error_to_string( error ) ); goto cleanup; } #ifndef NONBE_1293_CRASH_FIRST_FRAME_LOST if ( ( error = ISAR_POST_REND_SetSplitRendBFI( hIsarPostRend, bfi ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in ISAR_POST_REND_SetSplitRendBFI(): %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #endif } #ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST if ( splitBinNeedsNewFrame ) { if ( ( error = ISAR_POST_REND_SetSplitRendBFI( hIsarPostRend, bfi ) ) != IVAS_ERR_OK ) Loading @@ -1093,7 +1078,6 @@ int main( goto cleanup; } } #endif for ( i = 0; i < args.inConfig.numBinBuses; ++i ) { Loading Loading
.gitlab-ci/variables.yml 0 → 100644 +30 −0 Original line number Diff line number Diff line variables: EVS_BE_TEST_DIR: "/usr/local/be_2_evs_test" EVS_BE_WIN_TEST_DIR: "C:/Users/gitlab-runner/testvec" PROCESSING_SCRIPTS_BIN_DIR: "/test-bin" SANITIZER_TESTS: "CLANG1 CLANG2 CLANG3" OUT_FORMATS_CHANNEL_BASED: "stereo mono 5_1 5_1_2 5_1_4 7_1 7_1_4" OUT_FORMATS_SCENE_BASED: "FOA HOA2 HOA3" OUT_FORMATS_BINAURAL: "BINAURAL BINAURAL_ROOM_IR BINAURAL_ROOM_REVERB" OUT_FORMATS_ALL: "$OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT" MANUAL_PIPELINE_TYPE: description: "Type for the manual pipeline run. Use 'test-be-release' to run BE test against release codec." value: 'default' options: - 'default' - 'test-be-release' - 'test-long-self-test' - 'ivas-conformance' - 'ivas-conformance-linux' - 'check-clipping' - 'test-branch-vs-input-passthrough' PYTEST_ARGS: "" LONG_TEST_SUITE: "tests/codec_be_on_mr_nonselection tests/renderer --param_file scripts/config/self_test_ltv.prm --use_ltv" LONG_TEST_SUITE_NO_RENDERER: "tests/codec_be_on_mr_nonselection --param_file scripts/config/self_test_ltv.prm --use_ltv" SHORT_TEST_SUITE: "tests/codec_be_on_mr_nonselection" SHORT_TEST_SUITE_ENCODER: "tests/codec_be_on_mr_nonselection/test_param_file.py --param_file scripts/config/self_test_basop_encoder.prm" LONG_TEST_SUITE_ENCODER: "tests/codec_be_on_mr_nonselection/test_param_file.py --param_file scripts/config/self_test_ltv_basop_encoder.prm" TEST_SUITE: "" # note: currently overwrites default value from ci repo TESTCASE_TIMEOUT_STV_SANITIZERS: 240
apps/decoder.c +26 −76 Original line number Diff line number Diff line Loading @@ -69,22 +69,10 @@ static #endif int32_t frame = 0; /* Counter of frames */ #ifdef DEBUGGING #define MIN_NUM_BITS_ACTIVE_FRAME 56 #define NUM_BITS_SID_IVAS_5K2 104 #define MAX_OUTPUT_PCM_BUFFER_SIZE ( ( IVAS_MAX_OUTPUT_CHANNELS + IVAS_MAX_NUM_OBJECTS ) * IVAS_MAX_FRAME_SIZE ) #define ORIENT_TRK_NONE ( 0 ) #define ORIENT_TRK_REF ( 1 ) #define ORIENT_TRK_AVG ( 2 ) #define ORIENT_TRK_REF_VEC ( 3 ) #define ORIENT_TRK_REF_VEC_LEV ( 4 ) #ifdef VARIABLE_SPEED_DECODING #define VARIABLE_SPEED_FETCH_FRAMESIZE_MS 20 #endif #define JBM_FRONTEND_FETCH_FRAMESIZE_MS 20 #define HEADROTATION_FETCH_FRAMESIZE_MS 5 #define DEFAULT_FETCH_FRAMESIZE_MS 20 /*------------------------------------------------------------------------------------------* Loading Loading @@ -129,7 +117,7 @@ typedef struct IVAS_DEC_INPUT_FORMAT inputFormat; bool customLsOutputEnabled; char *customLsSetupFilename; int16_t orientation_tracking; IVAS_HEAD_ORIENT_TRK_T orientation_tracking; bool non_diegetic_pan_enabled; float non_diegetic_pan_gain; bool renderConfigEnabled; Loading Loading @@ -183,7 +171,7 @@ typedef struct static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg ); static void usage_dec( void ); static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, IVAS_DEC_HANDLE hIvasDec ); static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); static ivas_error load_hrtf_from_file( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, IVAS_DEC_HANDLE hIvasDec, const IVAS_AUDIO_CONFIG OutputConfig, const int32_t output_Fs ); #ifdef DEBUGGING static ivas_error printBitstreamInfoVoip( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec ); Loading Loading @@ -359,7 +347,7 @@ int main( } /* sanity check */ if ( arg.orientation_tracking != ORIENT_TRK_REF ) if ( arg.orientation_tracking != IVAS_HEAD_ORIENT_TRK_REF ) { fprintf( stderr, "\nError: Reference rotation file can be used in '-otr ref' mode only.\n\n" ); goto cleanup; Loading @@ -386,7 +374,7 @@ int main( } /* sanity check */ if ( arg.orientation_tracking != ORIENT_TRK_REF_VEC && arg.orientation_tracking != ORIENT_TRK_REF_VEC_LEV ) if ( arg.orientation_tracking != IVAS_HEAD_ORIENT_TRK_REF_VEC && arg.orientation_tracking != IVAS_HEAD_ORIENT_TRK_REF_VEC_LEV ) { fprintf( stderr, "\nError: Reference trajectory file can be used in '-otr ref_vec' or '-otr ref_vec_lev' mode only.\n\n" ); goto cleanup; Loading Loading @@ -445,18 +433,14 @@ int main( asked_frame_size = arg.renderFramesize; uint16_t aeID = arg.aeSequence.count > 0 ? arg.aeSequence.pID[0] : 65535; #ifdef LIB_DEC_REVISION if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain, arg.dpidEnabled, aeID, arg.objEditEnabled, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.tsmEnabled, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain, arg.dpidEnabled, aeID, arg.objEditEnabled, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( error = IVAS_DEC_GetRenderFramesize( hIvasDec, &arg.renderFramesize ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); Loading Loading @@ -756,13 +740,11 @@ int main( } pcmBuf = malloc( pcmBufSize * sizeof( int16_t ) ); #ifdef LIB_DEC_REVISION if ( pcmBuf == NULL ) { fprintf( stdout, "Error: Unable to allocate memory for output buffer.\n" ); goto cleanup; } #endif /*-----------------------------------------------------------------* * Decoding Loading @@ -770,7 +752,7 @@ int main( if ( arg.voipMode ) { error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, hIvasDec ); error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, hIvasDec, pcmBuf ); } else { Loading Loading @@ -968,6 +950,10 @@ static bool parseCmdlIVAS_dec( int16_t i; char argv_to_upper[FILENAME_MAX]; /*-----------------------------------------------------------------* * Set default values *-----------------------------------------------------------------*/ #ifdef DEBUGGING float ftmp; Loading @@ -976,7 +962,7 @@ static bool parseCmdlIVAS_dec( arg->agcBitstream = NULL; #endif #endif arg->output_Fs = 48000; arg->output_Fs = IVAS_MAX_SAMPLING_RATE; arg->outputConfig = IVAS_AUDIO_CONFIG_MONO; arg->decMode = IVAS_DEC_MODE_IVAS; arg->quietModeEnabled = false; Loading @@ -986,7 +972,7 @@ static bool parseCmdlIVAS_dec( arg->enableHeadRotation = false; arg->headrotTrajFileName = NULL; arg->orientation_tracking = ORIENT_TRK_NONE; arg->orientation_tracking = IVAS_HEAD_ORIENT_TRK_NONE; arg->enableReferenceRotation = false; arg->headrotTrajFileName = NULL; arg->enableReferenceVectorTracking = false; Loading Loading @@ -1064,30 +1050,18 @@ static bool parseCmdlIVAS_dec( if ( strcmp( argv_to_upper, "-VOIP" ) == 0 ) { #ifdef LIB_DEC_REVISION arg->voipMode = true; #else arg->voipMode = 1; #endif i++; } else if ( strcmp( argv_to_upper, "-VOIP_HF_ONLY=0" ) == 0 ) { #ifdef LIB_DEC_REVISION arg->voipMode = true; #else arg->voipMode = 1; #endif arg->inputFormat = IVAS_DEC_INPUT_FORMAT_RTPDUMP; i++; } else if ( strcmp( argv_to_upper, "-VOIP_HF_ONLY=1" ) == 0 ) { #ifdef LIB_DEC_REVISION arg->voipMode = true; #else arg->voipMode = 1; #endif arg->inputFormat = IVAS_DEC_INPUT_FORMAT_RTPDUMP_HF; i++; } Loading Loading @@ -1198,9 +1172,9 @@ static bool parseCmdlIVAS_dec( } arg->tsmScale = (uint16_t) tmp; if ( arg->tsmScale < 50 || arg->tsmScale > 150 ) if ( arg->tsmScale < IVAS_TIME_SCALE_MIN || arg->tsmScale > IVAS_TIME_SCALE_MAX ) { fprintf( stderr, "Error: Scaling factor value must be 50 <= fac <= 150!\n\n" ); fprintf( stderr, "Error: Scaling factor value must be IVAS_TIME_SCALE_MIN <= fac <= IVAS_TIME_SCALE_MAX!\n\n" ); usage_dec(); return false; } Loading Loading @@ -1237,10 +1211,8 @@ static bool parseCmdlIVAS_dec( { if ( !is_digits_only( argv[i] ) ) { #ifdef LIB_DEC_REVISION fprintf( stderr, "Error: Render frame size is invalid or not specified!\n\n" ); usage_dec(); #endif return false; } Loading Loading @@ -1275,23 +1247,23 @@ static bool parseCmdlIVAS_dec( if ( strcmp( argv_to_upper, "NONE" ) == 0 ) { arg->orientation_tracking = ORIENT_TRK_NONE; arg->orientation_tracking = IVAS_HEAD_ORIENT_TRK_NONE; } else if ( strcmp( argv_to_upper, "REF" ) == 0 ) { arg->orientation_tracking = ORIENT_TRK_REF; arg->orientation_tracking = IVAS_HEAD_ORIENT_TRK_REF; } else if ( strcmp( argv_to_upper, "AVG" ) == 0 ) { arg->orientation_tracking = ORIENT_TRK_AVG; arg->orientation_tracking = IVAS_HEAD_ORIENT_TRK_AVG; } else if ( strcmp( argv_to_upper, "REF_VEC" ) == 0 ) { arg->orientation_tracking = ORIENT_TRK_REF_VEC; arg->orientation_tracking = IVAS_HEAD_ORIENT_TRK_REF_VEC; } else if ( strcmp( argv_to_upper, "REF_VEC_LEV" ) == 0 ) { arg->orientation_tracking = ORIENT_TRK_REF_VEC_LEV; arg->orientation_tracking = IVAS_HEAD_ORIENT_TRK_REF_VEC_LEV; } else { Loading Loading @@ -1686,7 +1658,7 @@ static void usage_dec( void ) #ifdef DEBUGGING #ifdef VARIABLE_SPEED_DECODING fprintf( stdout, "-VS fac : Variable Speed mode: change speed of playout fac as integer in percent.\n" ); fprintf( stdout, " 50 <= fac <= 150; fac<100 faster, fac>100 slower\n" ); fprintf( stdout, " IVAS_TIME_SCALE_MIN <= fac <= IVAS_TIME_SCALE_MAX; fac<100 faster, fac>100 slower\n" ); #endif #endif fprintf( stdout, "-fr L : render frame size in ms L=(5,10,20), default is 20)\n" ); Loading Loading @@ -1822,15 +1794,6 @@ static ivas_error initOnFirstGoodFrame( return error; } #ifndef LIB_DEC_REVISION int32_t pcmFrameSize; if ( ( error = IVAS_DEC_GetPcmFrameSize( hIvasDec, &pcmFrameSize ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetPcmFrameSize, error code: %d\n", error ); return error; } #endif if ( isSplitRend ) { /* Open split rendering metadata writer */ Loading Loading @@ -1888,7 +1851,6 @@ static ivas_error initOnFirstGoodFrame( } } #ifdef LIB_DEC_REVISION int16_t pcmFrameSize; if ( ( error = IVAS_DEC_GetOutputBufferSize( hIvasDec, &pcmFrameSize ) ) != IVAS_ERR_OK ) { Loading @@ -1896,15 +1858,12 @@ static ivas_error initOnFirstGoodFrame( return error; } #endif int16_t *zeroBuf = malloc( pcmFrameSize * sizeof( int16_t ) ); #ifdef LIB_DEC_REVISION if ( zeroBuf == NULL ) { fprintf( stdout, "Error: Unable to allocate memory for output buffer.\n" ); return IVAS_ERR_FAILED_ALLOC; } #endif memset( zeroBuf, 0, pcmFrameSize * sizeof( int16_t ) ); for ( int16_t i = 0; i < numInitialBadFrames; ++i ) Loading Loading @@ -2119,7 +2078,6 @@ static ivas_error decodeG192( int16_t isSplitRend, isSplitCoded; #ifdef VARIABLE_SPEED_DECODING #ifdef LIB_DEC_REVISION if ( arg.tsmEnabled ) { if ( ( error = IVAS_DEC_EnableTsm( hIvasDec ) ) != IVAS_ERR_OK ) Loading @@ -2129,7 +2087,6 @@ static ivas_error decodeG192( } } #endif #endif if ( ( error = IVAS_DEC_is_split_rendering_enabled( hIvasDec, &isSplitRend ) ) != IVAS_ERR_OK ) { Loading Loading @@ -3023,14 +2980,15 @@ static ivas_error decodeVoIP( RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, IVAS_DEC_HANDLE hIvasDec ) IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ) { bool decodingFailed = true; /* Assume failure until cleanup is reached without errors */ ivas_error error = IVAS_ERR_OK; uint32_t nextPacketRcvTime_ms = 0; uint32_t systemTime_ms = 0; uint32_t systemTimeInc_ms = (uint32_t) JBM_FRONTEND_FETCH_FRAMESIZE_MS; uint32_t systemTimeInc_ms = (uint32_t) ( 1000 / IVAS_NUM_FRAMES_PER_SEC ); int32_t nFramesFed = 0; uint8_t au[( IVAS_MAX_BITS_PER_FRAME + 7 ) >> 3]; Loading @@ -3044,7 +3002,6 @@ static ivas_error decodeVoIP( MasaFileWriter *masaWriter = NULL; uint16_t numObj = 0; int16_t pcmBuf[MAX_OUTPUT_PCM_BUFFER_SIZE]; AudioFileWriter *afWriter = NULL; #ifdef SUPPORT_JBM_TRACEFILE JbmTraceFileWriter *jbmTraceWriter = NULL; Loading Loading @@ -3445,12 +3402,7 @@ static ivas_error decodeVoIP( { if ( ( error = IVAS_DEC_HasDecodedFirstGoodFrame( hIvasDec, &decodedGoodFrame ) ) != IVAS_ERR_OK ) { #ifdef LIB_DEC_REVISION fprintf( stderr, "Error in IVAS_DEC_HasDecodedFirstGoodFrame(): %s\n", IVAS_DEC_GetErrorMessage( error ) ); #else fprintf( stderr, "Error in IVAS_DEC_HasDecodedFirstGoodFrame, code: %d\n", error ); #endif goto cleanup; } Loading @@ -3462,9 +3414,7 @@ static ivas_error decodeVoIP( if ( ( error = initOnFirstGoodFrame( hIvasDec, arg, numInitialBadFrames, &nOutSamples, NULL, delayNumSamples_orig, &delayNumSamples, &delayTimeScale, &bsFormat, &afWriter, &masaWriter, ismWriters, &nOutChannels, &numObj, &splitRendWriter ) ) != IVAS_ERR_OK ) { #ifdef LIB_DEC_REVISION fprintf( stderr, "Error in initOnFirstGoodFrame(): %s\n", IVAS_DEC_GetErrorMessage( error ) ); #endif goto cleanup; } } Loading
apps/encoder.c +22 −26 Original line number Diff line number Diff line Loading @@ -154,7 +154,6 @@ typedef struct * Local functions prototypes *------------------------------------------------------------------------------------------*/ static void initArgStruct( EncArguments *arg ); static bool parseCmdlIVAS_enc( int16_t argc, char *argv[], EncArguments *arg ); static void usage_enc( void ); static bool readBandwidth( FILE *file, IVAS_ENC_BANDWIDTH *bandwidth, int32_t *bandwidthFrameCounter ); Loading Loading @@ -207,8 +206,6 @@ int main( reset_mem( USE_BYTES ); #endif initArgStruct( &arg ); /*------------------------------------------------------------------------------------------* * Parse command-line arguments *------------------------------------------------------------------------------------------*/ Loading Loading @@ -878,14 +875,29 @@ cleanup: * Local functions *-------------------------------------------------------------------*/ #define IVAS_DEFAULT_AGC ( 0 ) /*---------------------------------------------------------------------* * parseCmdlIVAS_enc() * * Encoder command-line parsing *---------------------------------------------------------------------*/ static void initArgStruct( EncArguments *arg ) static bool parseCmdlIVAS_enc( int16_t argc, char *argv[], EncArguments *arg ) { /* Set default values here */ int16_t i, j; char argv_to_upper[FILENAME_MAX]; char stmp[FILENAME_MAX]; int32_t tmp; /*-----------------------------------------------------------------* * Set default values *-----------------------------------------------------------------*/ arg->inputWavFilename = NULL; arg->outputBitstreamFilename = NULL; arg->inputFs = 0; arg->inputFs = IVAS_MAX_SAMPLING_RATE; arg->inputFormat = IVAS_ENC_INPUT_MONO; arg->is_binaural = false; arg->inputFormatConfig.stereoToMonoDownmix = false; Loading Loading @@ -919,25 +931,9 @@ static void initArgStruct( EncArguments *arg ) #endif arg->pca = false; return; } /*---------------------------------------------------------------------* * parseCmdlIVAS_enc() * * Encoder command-line parsing *---------------------------------------------------------------------*/ static bool parseCmdlIVAS_enc( int16_t argc, char *argv[], EncArguments *arg ) { int16_t i, j; char argv_to_upper[FILENAME_MAX]; char stmp[FILENAME_MAX]; int32_t tmp; /*-----------------------------------------------------------------* * Initialization *-----------------------------------------------------------------*/ if ( argc < 5 ) { Loading
apps/isar_post_rend.c +4 −20 Original line number Diff line number Diff line Loading @@ -945,7 +945,7 @@ int main( memset( outBuffer.data, 0, outBuffer.config.numSamplesPerChannel * outBuffer.config.numChannels * sizeof( float ) ); bitsBufferSize = SPLIT_REND_BITS_BUFF_SIZE; bitsBufferSize = ISAR_SPLIT_REND_BITS_BUFF_SIZE; if ( bitsBufferSize > 0 ) { Loading Loading @@ -985,9 +985,7 @@ int main( while ( 1 ) { #ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST int16_t bfi = 0; #endif int16_t num_in_channels; num_in_channels = inBuffer.config.numChannels; Loading @@ -995,12 +993,10 @@ int main( if ( ( hSplitRendFileReadWrite != NULL ) && splitBinNeedsNewFrame ) { ivas_error error_tmp; numSamplesRead = (int16_t) inBufferSize; #ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST error_tmp = split_rend_read_bits_from_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten, &bfi ); #else error_tmp = split_rend_read_bits_from_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten ); #endif if ( error_tmp != IVAS_ERR_OK ) { if ( error_tmp == IVAS_ERR_END_OF_FILE ) Loading Loading @@ -1067,24 +1063,13 @@ int main( /* Read from split renderer bfi file if specified */ if ( splitRendBFIReader != NULL && splitBinNeedsNewFrame ) { #ifndef NONBE_1293_CRASH_FIRST_FRAME_LOST int16_t bfi; #endif if ( ( error = SplitRendBFIFileReading( splitRendBFIReader, &bfi ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in SplitRendBFIFileReading(): %s\n", ivas_error_to_string( error ) ); goto cleanup; } #ifndef NONBE_1293_CRASH_FIRST_FRAME_LOST if ( ( error = ISAR_POST_REND_SetSplitRendBFI( hIsarPostRend, bfi ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in ISAR_POST_REND_SetSplitRendBFI(): %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #endif } #ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST if ( splitBinNeedsNewFrame ) { if ( ( error = ISAR_POST_REND_SetSplitRendBFI( hIsarPostRend, bfi ) ) != IVAS_ERR_OK ) Loading @@ -1093,7 +1078,6 @@ int main( goto cleanup; } } #endif for ( i = 0; i < args.inConfig.numBinBuses; ++i ) { Loading