Commit 567c12f5 authored by vaillancour's avatar vaillancour
Browse files

merge main

parents d78a4fbe 2a6ae17b
Loading
Loading
Loading
Loading
Loading
+60 −1
Original line number Diff line number Diff line
@@ -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"
@@ -74,6 +74,7 @@ workflow:


stages:
  - prevalidate
  - build
  - test
  - deploy
@@ -125,6 +126,8 @@ stages:
  - cd $SCRIPTS_DIR
  - 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 -
@@ -309,6 +312,62 @@ stages:
      junit:
        - report-junit.xml

# ---------------------------------------------------------------
# verification jobs
# ---------------------------------------------------------------

clang-format-check:
  extends:
    - .test-job-linux
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" # only have MR pipelines for MRs to main
    - if: $CI_PIPELINE_SOURCE == 'push'
      when: never
    - if: $CI_PIPELINE_SOURCE == 'schedule'
      when: never
  variables:
    ARTIFACT_BASE_NAME: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--formatting-fix"
  stage: prevalidate
  needs: []
  timeout: "5 minutes"
  script:
    - *update-scripts-repo
    # Set up variables. This can't be done in the "variables" section because variables are not expanded properly there
    - PATCH_FILE_NAME="$ARTIFACT_BASE_NAME".patch
    - >
      INSTRUCTIONS_GITLAB="To fix formatting issues:\n
      - download the diff patch available as artifact of this job\n
      - unzip the artifact and place the patch file in the root directory of your local IVAS repo\n
      - run: git apply $PATCH_FILE_NAME\n
      - commit new changes"
    - >
      INSTRUCTIONS_README="To fix formatting issues:\n
      - place the patch file in the root directory of your local IVAS repo\n
      - run: git apply $PATCH_FILE_NAME\n
      - commit new changes"

    - format_problems=0
    - scripts/check-format.sh -afD -p 8 || format_problems=$?
    - if [ $format_problems == 0 ] ; then exit 0; fi

    - mkdir tmp-formatting-fix
    - git diff > "tmp-formatting-fix/$PATCH_FILE_NAME"

    # Print instructions to job output
    - echo -e "$INSTRUCTIONS_GITLAB"

    # Include readme in the artifact, in case someone misses the job printout (e.g. getting the artifact via MR interface)
    - echo -e "$INSTRUCTIONS_README" > "tmp-formatting-fix/readme.txt"

    - exit $format_problems
  artifacts:
    expire_in: 1 day
    paths:
      - tmp-formatting-fix/
    when: on_failure
    name: "$ARTIFACT_BASE_NAME"
    expose_as: "formatting patch"

# ---------------------------------------------------------------
# Build jobs
# ---------------------------------------------------------------
+86 −79
Original line number Diff line number Diff line
@@ -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;
@@ -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;
@@ -1313,7 +1311,6 @@ static void usage_dec( void )
}



/*---------------------------------------------------------------------*
 * initOnFirstGoodFrame()
 *
@@ -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;

@@ -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;
@@ -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;
@@ -2570,5 +2578,4 @@ cleanup:
}



#undef WMC_TOOL_SKIP
+44 −44
Original line number Diff line number Diff line
@@ -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 ) );
@@ -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 )
+16 −17
Original line number Diff line number Diff line
@@ -75,4 +75,3 @@ Word16 update_mixed_context(Word16 ctx, Word16 a)
    }
    return add( shl( s_and( ctx, 0xf ), 4 ), add( t, 13 ) );
}
+60 −61
Original line number Diff line number Diff line
@@ -106,8 +106,7 @@ void UnmapIndex_fx(
    const Word16 LtpPitchLag,
    const Word8 SmallerLags,
    Word16 *FractionalResolution,
    Word32 *Lag
)
    Word32 *Lag )
{
    Word16 LtpPitchIndex, Multiplier;
    Word16 Lag16;
@@ -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 )
            {
@@ -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 ) );
@@ -262,8 +263,7 @@ int16_t CountIndexBits_ivas(

Word16 CountIndexBits_fx(
    Word16 Bandwidth,
    Word16 PeriodicityIndex
)
    Word16 PeriodicityIndex )
{
    Word16 result;
    Word16 PeriodicityIndexS;
@@ -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