Loading .gitlab-ci.yml +44 −7 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ variables: SCRIPTS_DIR: "/usr/local/scripts" EXIT_CODE_NON_BE: 123 EXIT_CODE_FAIL: 1 LONG_TEST_SUITE: "tests/test_param_file_ltv.py tests/renderer" LONG_TEST_SUITE: "tests/codec_be_on_mr_nonselection/test_param_file.py tests/renderer --param_file scripts/config/self_test_ltv.prm" SHORT_TEST_SUITE: "tests/codec_be_on_mr_nonselection" TEST_SUITE: "" DUT_ENCODER_PATH: "./IVAS_cod" Loading Loading @@ -77,6 +77,7 @@ stages: - prevalidate - build - test - deploy # --------------------------------------------------------------- # Generic script anchors Loading Loading @@ -123,10 +124,10 @@ stages: .update-scripts-repo: &update-scripts-repo - cd $SCRIPTS_DIR - git remote set-branches --add origin $BASOP_CI_BRANCH_PC_REPO - git remote prune origin - git branch - sed -i '/fetch/d' .git/config # Remove all fetch lines to clean out dead links - git remote set-branches --add origin $BASOP_CI_BRANCH_PC_REPO # Add currently used branch - git fetch - git restore . # Just as a precaution - git checkout $BASOP_CI_BRANCH_PC_REPO - git pull - cd - Loading Loading @@ -217,6 +218,8 @@ stages: stage: test needs: ["build-codec-linux-make"] timeout: "240 minutes" variables: MLD_ARTIFACT_NAME: "mld--$CI_JOB_NAME-$CI_JOB_ID--sha-$CI_COMMIT_SHORT_SHA.csv" script: - *print-common-info - *update-scripts-repo Loading @@ -238,7 +241,21 @@ stages: - python3 -m pytest $TEST_SUITE -v --create_cut --html=report.html --self-contained-html --junit-xml=report-junit.xml --mld --dut_encoder_path $DUT_ENCODER_PATH --dut_decoder_path $DUT_DECODER_PATH -n auto --testcase_timeout $testcase_timeout || exit_code=$? - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true - python3 scripts/parse_mld_xml.py report-junit.xml mld.csv - python3 scripts/parse_mld_xml.py report-junit.xml $MLD_ARTIFACT_NAME - if [ $USE_LTV -eq 1 ] && [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then - id_previous=$(python3 ci/get_id_of_last_job_occurence.py $CI_DEFAULT_BRANCH $CI_JOB_NAME $CI_PROJECT_ID) - echo "Job ID from variables - $CI_JOB_ID, Job ID from script - $id_previous" - curl --request GET "https://forge.3gpp.org/rep/api/v4/projects/$CI_PROJECT_ID/jobs/$id_previous/artifacts" --output artifacts.zip - unzip artifacts.zip -d previous_artifacts # This wildcard thingy relies on only one csv file being present per job - file_previous="previous_artifacts/mld--ivas-pytest-mld-long-dec-$id_previous--sha-*.csv" - python3 ci/basop-pages/create_report_pages.py $CI_JOB_NAME-index.html $CI_JOB_NAME--merged_csv--$CI_JOB_ID--$id_previous.csv $MLD_ARTIFACT_NAME $file_previous $CI_JOB_ID $id_previous $CI_JOB_NAME - else # create empty file for artifacts to avoid errors - touch $CI_JOB_NAME-index.html - touch $CI_JOB_NAME--merged_csv--$CI_JOB_ID--$id_previous.csv - fi - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi - if [ $exit_code -eq 1 ]; then echo "Differences encountered"; exit $EXIT_CODE_NON_BE; fi Loading @@ -254,7 +271,9 @@ stages: paths: - report-junit.xml - report.html - mld.csv - $CI_JOB_NAME-index.html - $MLD_ARTIFACT_NAME - $CI_JOB_NAME-merged_csv--$CI_JOB_ID--$id_previous.csv expose_as: "pytest mld results" reports: junit: Loading Loading @@ -656,3 +675,21 @@ be-2-evs-26444: reports: junit: - report-junit.xml # job that sets up gitlab pages website pages: stage: deploy tags: - ivas-basop-linux rules: - if: $UPDATE_PAGES script: - *print-common-info - *update-scripts-repo - python3 ci/setup_pages.py - ls - ls public artifacts: paths: - public expire_in: 1 day apps/decoder.c +1 −1 Original line number Diff line number Diff line Loading @@ -452,7 +452,7 @@ int main( { renderConfig.directivity_fx[i * 3] = (Word16) ( renderConfig.directivity[i * 3] * ( 1u << 6 ) ); renderConfig.directivity_fx[i * 3 + 1] = (Word16) ( renderConfig.directivity[i * 3 + 1] * ( 1u << 6 ) ); renderConfig.directivity_fx[i * 3 + 2] = (Word16) ( renderConfig.directivity[i * 3 + 2] * ( 1u << 15 ) ); renderConfig.directivity_fx[i * 3 + 2] = (Word16) ( renderConfig.directivity[i * 3 + 2] * ( (1u << 15)-1 ) ); } #endif // IVAS_FLOAT_FIXED Loading apps/renderer.c +37 −2 Original line number Diff line number Diff line Loading @@ -48,6 +48,10 @@ #include "vector3_pair_file_reader.h" #include "wmc_auto.h" #ifdef IVAS_FLOAT_FIXED #include "prot_fx1.h" #endif #define WMC_TOOL_SKIP /*------------------------------------------------------------------------------------------* Loading Loading @@ -826,11 +830,20 @@ int main( } const int16_t frameSize_smpls = (int16_t) ( ( args.render_framesize ) * args.sampleRate * 5 / ( 1000 ) ); if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, args.nonDiegeticPanGain, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) #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 )); 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 ) ); exit( -1 ); } #else IF ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, args.nonDiegeticPanGain, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error opening renderer handle: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #endif // IVAS_FLOAT_FIXED /* === Configure === */ if ( ( error = IVAS_REND_InitConfig( hIvasRend, args.outConfig.audioConfig ) ) != IVAS_ERR_OK ) Loading Loading @@ -924,12 +937,20 @@ int main( fprintf( stderr, "Error in IVAS_REND_SetTotalNumberOfObjects(): %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #ifdef IVAS_FLOAT_FIXED Word32 var1 = (Word32)(args.syncMdDelay); IF((error = IVAS_REND_SetIsmMetadataDelay(hIvasRend, var1)) != IVAS_ERR_OK) { fprintf(stderr, "Error in IVAS_REND_SetIsmMetadataDelay(): %s\n", ivas_error_to_string(error)); exit(-1); } #else if ( ( error = IVAS_REND_SetIsmMetadataDelay( hIvasRend, args.syncMdDelay ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in IVAS_REND_SetIsmMetadataDelay(): %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #endif } IVAS_REND_LfePanMtx lfePanMatrix; Loading Loading @@ -2540,6 +2561,9 @@ void getMetadataFromFileReader( #ifdef IVAS_FLOAT_FIXED objectMetadataBuffer->positions[objIdx].azimuth_fx = (Word32)(ismMetadata.azimuth * (1<<22)); objectMetadataBuffer->positions[objIdx].elevation_fx = (Word32)(ismMetadata.elevation * (1 << 22)); objectMetadataBuffer->positions[objIdx].radius_fx = (Word16)(ismMetadata.radius * (1 << 9)); objectMetadataBuffer->positions[objIdx].yaw_fx = (Word32)(ismMetadata.yaw * (1 << 22)); objectMetadataBuffer->positions[objIdx].pitch_fx = (Word32)(ismMetadata.pitch * (1 << 22)); #endif // DEBUG objectMetadataBuffer->positions[objIdx].azimuth = ismMetadata.azimuth; Loading Loading @@ -2605,6 +2629,13 @@ static void IsmPositionProvider_getNextFrame( objectMetadataBuffer->positions[objIdx].radius = 1.0f; objectMetadataBuffer->positions[objIdx].yaw = 0.0f; objectMetadataBuffer->positions[objIdx].pitch = 0.0f; #ifdef IVAS_FLOAT_FIXED objectMetadataBuffer->positions[objIdx].azimuth_fx = 0; objectMetadataBuffer->positions[objIdx].elevation_fx = 0; objectMetadataBuffer->positions[objIdx].radius_fx = 512; objectMetadataBuffer->positions[objIdx].yaw_fx = 0; objectMetadataBuffer->positions[objIdx].pitch_fx = 0; #endif objectMetadataBuffer->positions[objIdx].non_diegetic_flag = 0; } Loading Loading @@ -2636,6 +2667,10 @@ static void IsmPositionProvider_getNextFrame( /* Clamp pitch to lie within [-90, 90] range (can't be wrapped easily) */ objectMetadataBuffer->positions[objIdx].pitch = min( max( objectMetadataBuffer->positions[objIdx].pitch, -90 ), 90 ); #ifdef IVAS_FLOAT_FIXED objectMetadataBuffer->positions[objIdx].yaw_fx = (Word32)objectMetadataBuffer->positions[objIdx].yaw * (1 << Q22); objectMetadataBuffer->positions[objIdx].pitch_fx = (Word32)objectMetadataBuffer->positions[objIdx].pitch * (1 << Q22); #endif } ++positionProvider->frameCounter; Loading lib_com/bitstream.c +43 −1 Original line number Diff line number Diff line Loading @@ -2438,6 +2438,48 @@ void mdct_switching_dec( * Simulate packet losses by reading FEC pattern from external file *-------------------------------------------------------------------*/ #ifdef IVAS_FLOAT_FIXED Decoder_State **reset_elements( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ) { Word16 k, n; Decoder_State **sts = NULL; /* to avoid compilation warning */ FOR ( k = 0; k < st_ivas->nSCE; k++ ) { sts = st_ivas->hSCE[k]->hCoreCoder; sts[0]->bfi = 0; sts[0]->BER_detect = 0; sts[0]->mdct_sw_enable = 0; sts[0]->mdct_sw = 0; move16(); move16(); move16(); move16(); reset_indices_dec( sts[0] ); } FOR ( k = 0; k < st_ivas->nCPE; k++ ) { sts = st_ivas->hCPE[k]->hCoreCoder; FOR ( n = 0; n < CPE_CHANNELS; n++ ) { sts[n]->bfi = 0; sts[n]->BER_detect = 0; sts[n]->mdct_sw_enable = 0; sts[n]->mdct_sw = 0; move16(); move16(); move16(); move16(); reset_indices_dec( sts[n] ); } } return sts; /* return last decoder state */ } #else Decoder_State **reset_elements( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ) Loading Loading @@ -2474,7 +2516,7 @@ Decoder_State **reset_elements( return sts; /* return last decoder state */ } #endif /*-------------------------------------------------------------------* * ivas_set_bitstream_pointers() Loading lib_com/cldfb.c +6 −2 Original line number Diff line number Diff line Loading @@ -731,6 +731,8 @@ void cldfbAnalysis_ts_fx( Copy32( timeIn_fx, timeBuffer_fx + offset, frameSize ); } h_cldfb->Q_cldfb_state = *q_cldfb; /* only process needed cols */ if ( samplesToProcess > -1 ) { Loading Loading @@ -968,6 +970,7 @@ void cldfbAnalysis_ts_fx_fixed_q( /* prepare input buffer */ timeBuffer_fx = buffer_fx; Copy32( h_cldfb->cldfb_state_fx, timeBuffer_fx, offset ); h_cldfb->Q_cldfb_state = *q_cldfb; if ( samplesToProcess > -1 ) { Loading Loading @@ -1659,7 +1662,7 @@ ivas_error openCldfb_ivas( hs->cldfb_state_length = buf_len;//Temporarily added to store the length of buffer hs->cldfb_size = buf_len; /*for having original size at intermediatery conversion, will be removed on removing conversion*/ set32_fx(hs->cldfb_state_fx, 0, buf_len); hs->Q_cldfb_state = Q31; hs->Q_cldfb_state = Q11; #endif // IVAS_FLOAT_FIXED Loading Loading @@ -1756,7 +1759,7 @@ ivas_error openCldfb_ivas_fx( hs->cldfb_state_length = buf_len; // Temporarily added to store the length of buffer hs->cldfb_size = buf_len; /*for having original size at intermediatery conversion, will be removed on removing conversion*/ set32_fx(hs->cldfb_state_fx, 0, buf_len); hs->Q_cldfb_state = Q11; /* TODO: remove the floating point dependency */ IF ( ( hs->cldfb_state = (float *) malloc( buf_len * sizeof( float ) ) ) == NULL ) Loading Loading @@ -2609,6 +2612,7 @@ void cldfb_reset_memory_fx( hs->cldfb_state_length = memory_length; /* save the memory */ set32_fx(hs->cldfb_state_fx, 0, memory_length); hs->Q_cldfb_state = Q11; return; } Loading Loading
.gitlab-ci.yml +44 −7 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ variables: SCRIPTS_DIR: "/usr/local/scripts" EXIT_CODE_NON_BE: 123 EXIT_CODE_FAIL: 1 LONG_TEST_SUITE: "tests/test_param_file_ltv.py tests/renderer" LONG_TEST_SUITE: "tests/codec_be_on_mr_nonselection/test_param_file.py tests/renderer --param_file scripts/config/self_test_ltv.prm" SHORT_TEST_SUITE: "tests/codec_be_on_mr_nonselection" TEST_SUITE: "" DUT_ENCODER_PATH: "./IVAS_cod" Loading Loading @@ -77,6 +77,7 @@ stages: - prevalidate - build - test - deploy # --------------------------------------------------------------- # Generic script anchors Loading Loading @@ -123,10 +124,10 @@ stages: .update-scripts-repo: &update-scripts-repo - cd $SCRIPTS_DIR - git remote set-branches --add origin $BASOP_CI_BRANCH_PC_REPO - git remote prune origin - git branch - sed -i '/fetch/d' .git/config # Remove all fetch lines to clean out dead links - git remote set-branches --add origin $BASOP_CI_BRANCH_PC_REPO # Add currently used branch - git fetch - git restore . # Just as a precaution - git checkout $BASOP_CI_BRANCH_PC_REPO - git pull - cd - Loading Loading @@ -217,6 +218,8 @@ stages: stage: test needs: ["build-codec-linux-make"] timeout: "240 minutes" variables: MLD_ARTIFACT_NAME: "mld--$CI_JOB_NAME-$CI_JOB_ID--sha-$CI_COMMIT_SHORT_SHA.csv" script: - *print-common-info - *update-scripts-repo Loading @@ -238,7 +241,21 @@ stages: - python3 -m pytest $TEST_SUITE -v --create_cut --html=report.html --self-contained-html --junit-xml=report-junit.xml --mld --dut_encoder_path $DUT_ENCODER_PATH --dut_decoder_path $DUT_DECODER_PATH -n auto --testcase_timeout $testcase_timeout || exit_code=$? - zero_errors=$(cat report-junit.xml | grep -c 'errors="0"') || true - python3 scripts/parse_mld_xml.py report-junit.xml mld.csv - python3 scripts/parse_mld_xml.py report-junit.xml $MLD_ARTIFACT_NAME - if [ $USE_LTV -eq 1 ] && [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then - id_previous=$(python3 ci/get_id_of_last_job_occurence.py $CI_DEFAULT_BRANCH $CI_JOB_NAME $CI_PROJECT_ID) - echo "Job ID from variables - $CI_JOB_ID, Job ID from script - $id_previous" - curl --request GET "https://forge.3gpp.org/rep/api/v4/projects/$CI_PROJECT_ID/jobs/$id_previous/artifacts" --output artifacts.zip - unzip artifacts.zip -d previous_artifacts # This wildcard thingy relies on only one csv file being present per job - file_previous="previous_artifacts/mld--ivas-pytest-mld-long-dec-$id_previous--sha-*.csv" - python3 ci/basop-pages/create_report_pages.py $CI_JOB_NAME-index.html $CI_JOB_NAME--merged_csv--$CI_JOB_ID--$id_previous.csv $MLD_ARTIFACT_NAME $file_previous $CI_JOB_ID $id_previous $CI_JOB_NAME - else # create empty file for artifacts to avoid errors - touch $CI_JOB_NAME-index.html - touch $CI_JOB_NAME--merged_csv--$CI_JOB_ID--$id_previous.csv - fi - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi - if [ $exit_code -eq 1 ]; then echo "Differences encountered"; exit $EXIT_CODE_NON_BE; fi Loading @@ -254,7 +271,9 @@ stages: paths: - report-junit.xml - report.html - mld.csv - $CI_JOB_NAME-index.html - $MLD_ARTIFACT_NAME - $CI_JOB_NAME-merged_csv--$CI_JOB_ID--$id_previous.csv expose_as: "pytest mld results" reports: junit: Loading Loading @@ -656,3 +675,21 @@ be-2-evs-26444: reports: junit: - report-junit.xml # job that sets up gitlab pages website pages: stage: deploy tags: - ivas-basop-linux rules: - if: $UPDATE_PAGES script: - *print-common-info - *update-scripts-repo - python3 ci/setup_pages.py - ls - ls public artifacts: paths: - public expire_in: 1 day
apps/decoder.c +1 −1 Original line number Diff line number Diff line Loading @@ -452,7 +452,7 @@ int main( { renderConfig.directivity_fx[i * 3] = (Word16) ( renderConfig.directivity[i * 3] * ( 1u << 6 ) ); renderConfig.directivity_fx[i * 3 + 1] = (Word16) ( renderConfig.directivity[i * 3 + 1] * ( 1u << 6 ) ); renderConfig.directivity_fx[i * 3 + 2] = (Word16) ( renderConfig.directivity[i * 3 + 2] * ( 1u << 15 ) ); renderConfig.directivity_fx[i * 3 + 2] = (Word16) ( renderConfig.directivity[i * 3 + 2] * ( (1u << 15)-1 ) ); } #endif // IVAS_FLOAT_FIXED Loading
apps/renderer.c +37 −2 Original line number Diff line number Diff line Loading @@ -48,6 +48,10 @@ #include "vector3_pair_file_reader.h" #include "wmc_auto.h" #ifdef IVAS_FLOAT_FIXED #include "prot_fx1.h" #endif #define WMC_TOOL_SKIP /*------------------------------------------------------------------------------------------* Loading Loading @@ -826,11 +830,20 @@ int main( } const int16_t frameSize_smpls = (int16_t) ( ( args.render_framesize ) * args.sampleRate * 5 / ( 1000 ) ); if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, args.nonDiegeticPanGain, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) #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 )); 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 ) ); exit( -1 ); } #else IF ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, args.nonDiegeticPanGain, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error opening renderer handle: %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #endif // IVAS_FLOAT_FIXED /* === Configure === */ if ( ( error = IVAS_REND_InitConfig( hIvasRend, args.outConfig.audioConfig ) ) != IVAS_ERR_OK ) Loading Loading @@ -924,12 +937,20 @@ int main( fprintf( stderr, "Error in IVAS_REND_SetTotalNumberOfObjects(): %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #ifdef IVAS_FLOAT_FIXED Word32 var1 = (Word32)(args.syncMdDelay); IF((error = IVAS_REND_SetIsmMetadataDelay(hIvasRend, var1)) != IVAS_ERR_OK) { fprintf(stderr, "Error in IVAS_REND_SetIsmMetadataDelay(): %s\n", ivas_error_to_string(error)); exit(-1); } #else if ( ( error = IVAS_REND_SetIsmMetadataDelay( hIvasRend, args.syncMdDelay ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error in IVAS_REND_SetIsmMetadataDelay(): %s\n", ivas_error_to_string( error ) ); exit( -1 ); } #endif } IVAS_REND_LfePanMtx lfePanMatrix; Loading Loading @@ -2540,6 +2561,9 @@ void getMetadataFromFileReader( #ifdef IVAS_FLOAT_FIXED objectMetadataBuffer->positions[objIdx].azimuth_fx = (Word32)(ismMetadata.azimuth * (1<<22)); objectMetadataBuffer->positions[objIdx].elevation_fx = (Word32)(ismMetadata.elevation * (1 << 22)); objectMetadataBuffer->positions[objIdx].radius_fx = (Word16)(ismMetadata.radius * (1 << 9)); objectMetadataBuffer->positions[objIdx].yaw_fx = (Word32)(ismMetadata.yaw * (1 << 22)); objectMetadataBuffer->positions[objIdx].pitch_fx = (Word32)(ismMetadata.pitch * (1 << 22)); #endif // DEBUG objectMetadataBuffer->positions[objIdx].azimuth = ismMetadata.azimuth; Loading Loading @@ -2605,6 +2629,13 @@ static void IsmPositionProvider_getNextFrame( objectMetadataBuffer->positions[objIdx].radius = 1.0f; objectMetadataBuffer->positions[objIdx].yaw = 0.0f; objectMetadataBuffer->positions[objIdx].pitch = 0.0f; #ifdef IVAS_FLOAT_FIXED objectMetadataBuffer->positions[objIdx].azimuth_fx = 0; objectMetadataBuffer->positions[objIdx].elevation_fx = 0; objectMetadataBuffer->positions[objIdx].radius_fx = 512; objectMetadataBuffer->positions[objIdx].yaw_fx = 0; objectMetadataBuffer->positions[objIdx].pitch_fx = 0; #endif objectMetadataBuffer->positions[objIdx].non_diegetic_flag = 0; } Loading Loading @@ -2636,6 +2667,10 @@ static void IsmPositionProvider_getNextFrame( /* Clamp pitch to lie within [-90, 90] range (can't be wrapped easily) */ objectMetadataBuffer->positions[objIdx].pitch = min( max( objectMetadataBuffer->positions[objIdx].pitch, -90 ), 90 ); #ifdef IVAS_FLOAT_FIXED objectMetadataBuffer->positions[objIdx].yaw_fx = (Word32)objectMetadataBuffer->positions[objIdx].yaw * (1 << Q22); objectMetadataBuffer->positions[objIdx].pitch_fx = (Word32)objectMetadataBuffer->positions[objIdx].pitch * (1 << Q22); #endif } ++positionProvider->frameCounter; Loading
lib_com/bitstream.c +43 −1 Original line number Diff line number Diff line Loading @@ -2438,6 +2438,48 @@ void mdct_switching_dec( * Simulate packet losses by reading FEC pattern from external file *-------------------------------------------------------------------*/ #ifdef IVAS_FLOAT_FIXED Decoder_State **reset_elements( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ) { Word16 k, n; Decoder_State **sts = NULL; /* to avoid compilation warning */ FOR ( k = 0; k < st_ivas->nSCE; k++ ) { sts = st_ivas->hSCE[k]->hCoreCoder; sts[0]->bfi = 0; sts[0]->BER_detect = 0; sts[0]->mdct_sw_enable = 0; sts[0]->mdct_sw = 0; move16(); move16(); move16(); move16(); reset_indices_dec( sts[0] ); } FOR ( k = 0; k < st_ivas->nCPE; k++ ) { sts = st_ivas->hCPE[k]->hCoreCoder; FOR ( n = 0; n < CPE_CHANNELS; n++ ) { sts[n]->bfi = 0; sts[n]->BER_detect = 0; sts[n]->mdct_sw_enable = 0; sts[n]->mdct_sw = 0; move16(); move16(); move16(); move16(); reset_indices_dec( sts[n] ); } } return sts; /* return last decoder state */ } #else Decoder_State **reset_elements( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ) Loading Loading @@ -2474,7 +2516,7 @@ Decoder_State **reset_elements( return sts; /* return last decoder state */ } #endif /*-------------------------------------------------------------------* * ivas_set_bitstream_pointers() Loading
lib_com/cldfb.c +6 −2 Original line number Diff line number Diff line Loading @@ -731,6 +731,8 @@ void cldfbAnalysis_ts_fx( Copy32( timeIn_fx, timeBuffer_fx + offset, frameSize ); } h_cldfb->Q_cldfb_state = *q_cldfb; /* only process needed cols */ if ( samplesToProcess > -1 ) { Loading Loading @@ -968,6 +970,7 @@ void cldfbAnalysis_ts_fx_fixed_q( /* prepare input buffer */ timeBuffer_fx = buffer_fx; Copy32( h_cldfb->cldfb_state_fx, timeBuffer_fx, offset ); h_cldfb->Q_cldfb_state = *q_cldfb; if ( samplesToProcess > -1 ) { Loading Loading @@ -1659,7 +1662,7 @@ ivas_error openCldfb_ivas( hs->cldfb_state_length = buf_len;//Temporarily added to store the length of buffer hs->cldfb_size = buf_len; /*for having original size at intermediatery conversion, will be removed on removing conversion*/ set32_fx(hs->cldfb_state_fx, 0, buf_len); hs->Q_cldfb_state = Q31; hs->Q_cldfb_state = Q11; #endif // IVAS_FLOAT_FIXED Loading Loading @@ -1756,7 +1759,7 @@ ivas_error openCldfb_ivas_fx( hs->cldfb_state_length = buf_len; // Temporarily added to store the length of buffer hs->cldfb_size = buf_len; /*for having original size at intermediatery conversion, will be removed on removing conversion*/ set32_fx(hs->cldfb_state_fx, 0, buf_len); hs->Q_cldfb_state = Q11; /* TODO: remove the floating point dependency */ IF ( ( hs->cldfb_state = (float *) malloc( buf_len * sizeof( float ) ) ) == NULL ) Loading Loading @@ -2609,6 +2612,7 @@ void cldfb_reset_memory_fx( hs->cldfb_state_length = memory_length; /* save the memory */ set32_fx(hs->cldfb_state_fx, 0, memory_length); hs->Q_cldfb_state = Q11; return; } Loading