Commit c67b6595 authored by Manuel Jander's avatar Manuel Jander
Browse files

Merge remote-tracking branch 'origin' into...

Merge remote-tracking branch 'origin' into 2206-assert-in-stereo_switching_enc_fx-for-omasa-rate-switching-input-new-stv
parents 519ec4aa 872360e1
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -2,10 +2,16 @@ variables:
  # note: GitLab cannot reference variables defined by users in the include ref:, we need to use a YAML anchor for this
  # see https://docs.gitlab.com/ci/yaml/includes/#use-variables-with-include for more information
  IVAS_CODEC_CI_REF: &IVAS_CODEC_CI_REF main
  # If you need to set some config variable only in a local branch, then add an overwrite here
  # One example is DISABLE_HRTF - this will be set on a branch which is about to be merged and will be removed in a subsequent second MR
  # this is more easily done directly here in the child repo

  # these lines are suposed to stay commented out to serve as an example
  # # set this to true to skip the external HRTF testcases in pytest calls
  # DISABLE_HRTF: "true"

# all CI code and config is included from https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec-ci
include:
  - project: ivas-codec-pc/ivas-codec-ci
    ref: *IVAS_CODEC_CI_REF
    file: main-basop.yml
  - local: .gitlab-ci/variables.yml
  - local: .gitlab-ci/rules-basis.yml

.gitlab-ci/rules-basis.yml

deleted100644 → 0
+0 −56
Original line number Diff line number Diff line
# overwrites the default rules in the IVAS CI repository
# should be refactored and unified
.rules-basis:
  rules:
    # see https://docs.gitlab.com/ee/ci/yaml/workflow.html#switch-between-branch-pipelines-and-merge-request-pipelines
    - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
      when: never
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
      variables:
        IVAS_PIPELINE_NAME: 'MR pipeline: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME'
    ### disabled for now because pipeline cd is redundant with MR pipeline with current workflow
    # - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Pushes to main
    #   variables:
    #     IVAS_PIPELINE_NAME: 'Push pipeline: $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'default' # for testing
      variables:
        IVAS_PIPELINE_NAME: 'Web run pipeline: $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-compare'
      variables:
        IVAS_PIPELINE_NAME: 'Run comparison tools against float ref: $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-compare-enc-dmx'
      variables:
        IVAS_PIPELINE_NAME: 'Run encoder dmx comparison against float ref: $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-compare-long'
      variables:
        IVAS_PIPELINE_NAME: 'Run comparison tools against float ref (long test vectors): $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-compare-to-input'
      variables:
        IVAS_PIPELINE_NAME: 'Run comparison tools against input (pass-through only): $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-saturation-smoke-test'
      variables:
        IVAS_PIPELINE_NAME: 'Run saturation smoke-test: $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'evs-26444'
      variables:
        IVAS_PIPELINE_NAME: 'EVS 26.444 test: $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'sanitizer'
      variables:
        IVAS_PIPELINE_NAME: 'Short testvectors sanitizers'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-renderer'
      variables:
        IVAS_PIPELINE_NAME: 'Renderer test: $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'complexity'
      variables:
        IVAS_PIPELINE_NAME: 'Complexity Measurement on $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'voip-be-test'
      variables:
        IVAS_PIPELINE_NAME: 'Voip BE test on $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'peaq-enc-passthrough'
      variables:
        IVAS_PIPELINE_NAME: 'PEAQ encoder pass-through test: $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'ivas-conformance'
      variables:
        IVAS_PIPELINE_NAME: 'IVAS conformance: $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'schedule' # Scheduled in any branch
      variables:
        IVAS_PIPELINE_NAME: 'Scheduled pipeline: $CI_COMMIT_BRANCH'

.gitlab-ci/variables.yml

deleted100644 → 0
+0 −108
Original line number Diff line number Diff line
variables:
  TESTV_DIR: "/usr/local/testv"
  LTV_DIR: "/usr/local/ltv"
  EVS_BE_TEST_DIR_BASOP: "/usr/local/be_2_evs_basop"
  # TODO: cleanup and use global var defined in ivas-codec-ci
  FLOAT_REF_BRANCH: "ivas-float-update"
  FLOAT_REF_BRANCH_MERGE_SOURCE: ""
  BUILD_OUTPUT: "build_output.txt"
  SCRIPTS_DIR: "/usr/local/scripts"
  EXIT_CODE_NON_BE: 123
  EXIT_CODE_FAIL: 1
  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: ""
  # These path variables are used by the pytest calls.
  # They can be overwritten in the job templates to e.g. only test encoder or decoder in the chain
  DUT_ENCODER_PATH: "./IVAS_cod_dut"
  DUT_DECODER_PATH: "./IVAS_dec_dut"
  DUT_RENDERER_PATH: "./IVAS_rend_dut"
  DUT_POST_RENDERER_PATH: "./ISAR_post_rend_dut"
  REF_ENCODER_PATH: "./IVAS_cod_ref"
  REF_DECODER_PATH: "./IVAS_dec_ref"
  REF_RENDERER_PATH: "./IVAS_rend_ref"
  REF_POST_RENDERER_PATH: "./ISAR_post_rend_ref"
  MERGE_TARGET_ENCODER_PATH: "./IVAS_cod_merge_target"
  MERGE_TARGET_DECODER_PATH: "./IVAS_dec_merge_target"
  MERGE_TARGET_RENDERER_PATH: "./IVAS_rend_merge_target"
  MERGE_TARGET_POST_RENDERER_PATH: "./ISAR_post_rend_merge_target"
  MERGE_SOURCE_FLOAT_REF_ENCODER_PATH: "./IVAS_cod_merge_source_float_ref"
  MERGE_SOURCE_FLOAT_REF_DECODER_PATH: "./IVAS_dec_merge_source_float_ref"
  MERGE_SOURCE_FLOAT_REF_RENDERER_PATH: "./IVAS_rend_merge_source_float_ref"
  MERGE_SOURCE_FLOAT_REF_POST_RENDERER_PATH: "./ISAR_post_rend_merge_source_float_ref"
  # These path variables are used for building the binaries
  # They should never be overwritten!
  DUT_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_cod_dut"
  DUT_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_dec_dut"
  DUT_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_rend_dut"
  DUT_POST_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./ISAR_post_rend_dut"
  REF_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_cod_ref"
  REF_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_dec_ref"
  REF_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_rend_ref"
  REF_POST_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./ISAR_post_rend_ref"
  MERGE_TARGET_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_cod_merge_target"
  MERGE_TARGET_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_dec_merge_target"
  MERGE_TARGET_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_rend_merge_target"
  MERGE_TARGET_POST_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./ISAR_post_rend_merge_target"
  MERGE_SOURCE_FLOAT_REF_ENCODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_cod_merge_source_float_ref"
  MERGE_SOURCE_FLOAT_REF_DECODER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_dec_merge_source_float_ref"
  MERGE_SOURCE_FLOAT_REF_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./IVAS_rend_merge_source_float_ref"
  MERGE_SOURCE_FLOAT_REF_POST_RENDERER_PATH_FOR_BUILD_DO_NOT_MODIFY: "./ISAR_post_rend_merge_source_float_ref"
  LEVEL_SCALING: "1.0"
  IVAS_PIPELINE_NAME: ''
  PRM_FILES: "scripts/config/self_test.prm scripts/config/self_test_ltv.prm"
  TESTCASE_TIMEOUT_STV: 900
  TESTCASE_TIMEOUT_LTV: 2400
  TESTCASE_TIMEOUT_LTV_SANITIZERS: 10800
  CI_REGRESSION_THRESH_MLD: "0.1"
  CI_REGRESSION_THRESH_MAX_ABS_DIFF: "50"
  CI_REGRESSION_THRESH_SSNR: "-1"
  CI_REGRESSION_THRESH_ODG: "-0.05"
  GIT_CLEAN_FLAGS: -ffdxq
  INSTR_DIR: "scripts/c-code_instrument"
  TESTS_DIR_CODEC_BE_ON_MR: "tests/codec_be_on_mr_nonselection"
  BUILD_WITH_DEBUG_MODE_INFO: ""
  ENCODER_TEST: ""
  DELTA_ODG: ""
  COMPARE_DMX: ""
  SPLIT_COMPARISON: ""
  SKIP_REGRESSION_CHECK: ""
  FAILED_TESTCASES_LIST: "failed-testcases.txt"
  ERRORS_TESTCASES_LIST: "errors-testcases.txt"
  PYTEST_CACHE_ARTIFACT: "pytest_cache.zip"
  MEASURES_FOR_REPORT: "MLD MAX_ABS_DIFF MIN_SSNR MIN_ODG"
  FLOAT_REF_COMMIT_FILE: "float-ref-git-sha.txt"
  CUT_COMMIT_FILE: "CuT-git-sha.txt"
  MERGE_TARGET_COMMIT_FILE: "merge-target-git-sha.txt"
  MERGE_SOURCE_FLOAT_REF_COMMIT_FILE: "merge-source-float-ref-git-sha.txt"
  RUNNER_TAG: "ivas-basop-linux"
  LOGS_BACKUP_SOURCE_DIR: ""
  LOGS_BACKUP_TARGET_DIR: ""
  # set this to true to skip the external HRTF testcases in pytest calls
  DISABLE_HRTF: "false"
  MANUAL_PIPELINE_TYPE:
    description: "Type for the manual pipeline run. Use 'pytest-compare' to run comparison test against reference float codec."
    value: 'default'
    options:
      - 'default'
      - 'pytest-compare'
      - 'pytest-compare-enc-dmx'
      - 'pytest-compare-long'
      - 'pytest-compare-long-fx-fx'
      - 'pytest-compare-to-input'
      - 'pytest-saturation-smoke-test'
      - 'evs-26444'
      - 'sanitizer'
      - 'pytest-renderer'
      - 'complexity'
      - 'coverage'
      - 'voip-be-test'
      - 'renderer-framesize-be'
      - 'peaq-enc-passthrough'
      - 'long-term-logs'
      - 'backup-long-term-logs'
      - 'test-long-self-test'
      - 'ivas-conformance-linux'
+25 −0
Original line number Diff line number Diff line
<!--- Basic information that is useful -->
- Related issues:
- Requested reviewers: 

### Reason why this change is needed

* This may be a direct copy from the issue.

### Description of the change

* Describe what is done.

### Affected operating points

* Describe here as well as possible what operating points are affected and how
* In minimum, there should be a status for bitstream compatibility and output bit exactness
* For bitstream compatibility, the following levels are helpful for describing encoder
  1. Produced bitstream is BE compared to previous state.
  2. Produced bitstream is non-BE but it is fully backwards compatible for decoding. Decoded output may differ.
  3. Produced bitstream is non-BC. Old decoder cannot decode the produced bitstream correctly.
* For output difference, use BE or non-BE. Additionally, amount of difference can be presented.


<!--- By default, no labels are added as they often come from the issue. Add labels if there is no issue for this. -->
+152 −13
Original line number Diff line number Diff line
@@ -109,7 +109,8 @@ static Word16 Q_factor_L_32(
{
    Word16 Q = 31;

    if ( x >= 1 || x <= -1 )
    test();
    IF( GE_32( x, 1 ) || LE_32( x, -1 ) )
    {
        Q = norm_l( L_abs( (Word32) x ) );
    }
@@ -220,7 +221,7 @@ void QuatToRotMat_fx(
        // Euler2Quat_fx( deg2rad( quat.x_fx ), deg2rad( quat.y_fx ), deg2rad( quat.z_fx ), &quat_local );
        // QuatToRotMat_fx( quat_local, Rmat );
    }
    else
    ELSE
    {
        Word32 w = quat.w_fx; // Qx
        move32();
@@ -1402,7 +1403,17 @@ ivas_error ivas_combined_orientation_open_fx(
    ( *hCombinedOrientationData )->isInterpolationOngoing = FALSE;
    move16();
    ( *hCombinedOrientationData )->Quaternions_ext_interpolation_start = identity;
    move32();
    move32();
    move32();
    move32();
    move16();
    ( *hCombinedOrientationData )->Quaternions_ext_interpolation_target = identity;
    move32();
    move32();
    move32();
    move32();
    move16();

    /* Initialise orientations to identity */
    FOR( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ )
@@ -1410,7 +1421,17 @@ ivas_error ivas_combined_orientation_open_fx(
        ( *hCombinedOrientationData )->enableCombinedOrientation[i] = 0;
        move16();
        ( *hCombinedOrientationData )->Quaternions[i] = identity;
        move32();
        move32();
        move32();
        move32();
        move16();
        ( *hCombinedOrientationData )->listenerPos[i] = origo;
        move32();
        move32();
        move32();
        move32();
        move16();

        FOR( j = 0; j < 3; j++ )
        {
@@ -1434,10 +1455,24 @@ ivas_error ivas_combined_orientation_open_fx(
    move32();
    move16();

    ( *hCombinedOrientationData )
        ->Quaternion_prev_extOrientation = identity;
    ( *hCombinedOrientationData )->Quaternion_prev_extOrientation = identity;
    move32();
    move32();
    move32();
    move32();
    move16();
    ( *hCombinedOrientationData )->Quaternion_frozen_ext = identity;
    move32();
    move32();
    move32();
    move32();
    move16();
    ( *hCombinedOrientationData )->Quaternion_frozen_head = identity;
    move32();
    move32();
    move32();
    move32();
    move16();
    set_zero_fx( ( *hCombinedOrientationData )->chEneIIR_fx[0], MASA_FREQUENCY_BANDS );
    set_zero_fx( ( *hCombinedOrientationData )->chEneIIR_fx[1], MASA_FREQUENCY_BANDS );
    set_zero_fx( ( *hCombinedOrientationData )->procChEneIIR_fx[0], MASA_FREQUENCY_BANDS );
@@ -1516,10 +1551,12 @@ ivas_error combine_external_and_head_orientations_dec(
        pHeadRotQuaternion = hHeadTrackData->Quaternions;
        listenerPos = hHeadTrackData->Pos;
        sr_pose_pred_axis = hHeadTrackData->sr_pose_pred_axis;
        move32();
    }
    ELSE
    {
        sr_pose_pred_axis = DEFAULT_AXIS;
        move32();
    }

    return combine_external_and_head_orientations( pHeadRotQuaternion, listenerPos, sr_pose_pred_axis, hExtOrientationData, hCombinedOrientationData );
@@ -1544,12 +1581,14 @@ ivas_error combine_external_and_head_orientations_rend(
    Word16 i;

    sr_pose_pred_axis = DEFAULT_AXIS;
    move32();

    IF( hHeadTrackData->headRotEnabled )
    {
        headRotQuaternions = hHeadTrackData->headPositions;
        listenerPos = hHeadTrackData->Pos;
        sr_pose_pred_axis = hHeadTrackData->sr_pose_pred_axis;
        move32();
    }
    ELSE IF( hExtOrientationData != NULL )
    {
@@ -1631,13 +1670,32 @@ ivas_error combine_external_and_head_orientations(
        hCombinedOrientationData->interpolationIncrement_fx = ONE_IN_Q30;
        move32();
        hCombinedOrientationData->Quaternions_ext_interpolation_start = identity;
        move32();
        move32();
        move32();
        move32();
        move16();
        hCombinedOrientationData->Quaternions_ext_interpolation_target = identity;
        move32();
        move32();
        move32();
        move32();
        move16();
        FOR( i = 0; i < hCombinedOrientationData->num_subframes; i++ )
        {
            hCombinedOrientationData->enableCombinedOrientation[i] = 0;
            move16();
            hCombinedOrientationData->Quaternions[i] = identity;
            move32();
            move32();
            move32();
            move32();
            move16();
            hCombinedOrientationData->listenerPos[i] = origo;
            move32();
            move32();
            move32();
            move16();

            FOR( j = 0; j < 3; j++ )
            {
@@ -1701,6 +1759,11 @@ ivas_error combine_external_and_head_orientations(
                IF( NE_16( hCombinedOrientationData->isExtOrientationFrozen, 1 ) )
                {
                    hCombinedOrientationData->Quaternion_frozen_ext = hExtOrientationData->Quaternions[i];
                    move32();
                    move32();
                    move32();
                    move32();
                    move16();
                    hCombinedOrientationData->isExtOrientationFrozen = 1;
                    move16();
                }
@@ -1708,11 +1771,16 @@ ivas_error combine_external_and_head_orientations(
            ELSE
            {
                hCombinedOrientationData->Quaternion_frozen_ext = identity;
                move32();
                move32();
                move32();
                move32();
                move16();
                hCombinedOrientationData->isExtOrientationFrozen = 0;
                move16();
            }
            test();
            IF( EQ_16( hExtOrientationData->enableRotationInterpolation[i], 1 ) && hExtOrientationData->enableExternalOrientation[i] > 0 )
            IF( EQ_16( hExtOrientationData->enableRotationInterpolation[i], 1 ) && GT_16( hExtOrientationData->enableExternalOrientation[i], 0 ) )
            {
                test();
                test();
@@ -1778,11 +1846,21 @@ ivas_error combine_external_and_head_orientations(
                IF( EQ_16( hExtOrientationData->enableExternalOrientation[i], 1 ) )
                {
                    hCombinedOrientationData->Quaternions[i] = hExtOrientationData->Quaternions[i];
                    move32();
                    move32();
                    move32();
                    move32();
                    move16();
                }
                /* Use the freezed external orientation */
                ELSE IF( EQ_16( hExtOrientationData->enableExternalOrientation[i], 2 ) )
                {
                    hCombinedOrientationData->Quaternions[i] = hCombinedOrientationData->Quaternion_frozen_ext;
                    move32();
                    move32();
                    move32();
                    move32();
                    move16();
                }
            }
        }
@@ -1800,6 +1878,11 @@ ivas_error combine_external_and_head_orientations(
                IF( NE_16( hCombinedOrientationData->isHeadRotationFrozen, 1 ) )
                {
                    hCombinedOrientationData->Quaternion_frozen_head = headRotQuaternions[i];
                    move32();
                    move32();
                    move32();
                    move32();
                    move16();
                    hCombinedOrientationData->isHeadRotationFrozen = 1;
                    move16();
                }
@@ -1807,12 +1890,22 @@ ivas_error combine_external_and_head_orientations(
            ELSE
            {
                hCombinedOrientationData->Quaternion_frozen_head = identity;
                move32();
                move32();
                move32();
                move32();
                move16();
                hCombinedOrientationData->isHeadRotationFrozen = 0;
                move16();
            }

#ifdef RTP_S4_251135_CR26253_0016_REV1
            /* Disable head rotation if diegetic PI data indicating non-diegetic audio is received */
            test();
            test();
            test();
            test();
            test();
            IF( hCombinedOrientationData->isDiegeticInputPISet && !hCombinedOrientationData->isDiegeticInputPI[0] && !hCombinedOrientationData->isDiegeticInputPI[1] && !hCombinedOrientationData->isDiegeticInputPI[2] && !hCombinedOrientationData->isDiegeticInputPI[3] && !hCombinedOrientationData->isDiegeticInputPI[4] )
            {
                CONTINUE;
@@ -1882,9 +1975,14 @@ ivas_error combine_external_and_head_orientations(
#endif
            /* Reset the combined orientations to identity */
            test();
            if ( hExtOrientationData->enableHeadRotation[i] == 0 && hExtOrientationData->enableExternalOrientation[i] == 0 )
            IF( hExtOrientationData->enableHeadRotation[i] == 0 && hExtOrientationData->enableExternalOrientation[i] == 0 )
            {
                hCombinedOrientationData->Quaternions[i] = identity;
                move32();
                move32();
                move32();
                move32();
                move16();
            }
        }
    }
@@ -1902,13 +2000,23 @@ ivas_error combine_external_and_head_orientations(
    /* Save the current orientations */
    IF( hExtOrientationData != NULL )
    {
        IF( hExtOrientationData->enableExternalOrientation[hExtOrientationData->num_subframes - 1] > 0 )
        IF( GT_16( hExtOrientationData->enableExternalOrientation[hExtOrientationData->num_subframes - 1], 0 ) )
        {
            hCombinedOrientationData->Quaternion_prev_extOrientation = hExtOrientationData->Quaternions[hExtOrientationData->num_subframes - 1];
            move32();
            move32();
            move32();
            move32();
            move16();
        }
        ELSE
        {
            hCombinedOrientationData->Quaternion_prev_extOrientation = identity;
            move32();
            move32();
            move32();
            move32();
            move16();
        }
    }

@@ -1917,6 +2025,10 @@ ivas_error combine_external_and_head_orientations(
        FOR( i = 0; i < hCombinedOrientationData->num_subframes; i++ )
        {
            hCombinedOrientationData->listenerPos[i] = listenerPos[i];
            move32();
            move32();
            move32();
            move16();
        }
    }

@@ -2012,6 +2124,7 @@ ivas_error combine_external_and_head_orientations(
    }

    hCombinedOrientationData->sr_pose_pred_axis = sr_pose_pred_axis;
    move32();
#ifdef IVAS_RTPDUMP

    /* Reset external orientations */
@@ -2058,42 +2171,68 @@ static void external_target_interpolation_fx(

            /* Set the received orientation as the target */
            hCombinedOrientationData->Quaternions_ext_interpolation_target = hExtOrientationData->Quaternions[i];
            move32();
            move32();
            move32();
            move32();
            move16();

            /* Use the most recent external orientation as the starting orientation */
            IF( EQ_16( hExtOrientationData->enableExternalOrientation[i], 1 ) )
            {
                IF( i > 0 )
                IF( GT_16( i, 0 ) )
                {
                    IF( hExtOrientationData->enableExternalOrientation[i - 1] == 0 )
                    {
                        IVAS_QUATERNION identity;
                        identity.w_fx = ONE_IN_Q31;
                        /* Set to identity */
                        hCombinedOrientationData->Quaternions_ext_interpolation_start.w_fx = ONE_IN_Q31;
                        hCombinedOrientationData->Quaternions_ext_interpolation_start.x_fx = 0;
                        hCombinedOrientationData->Quaternions_ext_interpolation_start.y_fx = 0;
                        hCombinedOrientationData->Quaternions_ext_interpolation_start.z_fx = 0;
                        hCombinedOrientationData->Quaternions_ext_interpolation_start.q_fact = 31;
                        move32();
                        identity.x_fx = identity.y_fx = identity.z_fx = 0;
                        move32();
                        move32();
                        move32();
                        identity.q_fact = 31;
                        move16();
                        hCombinedOrientationData->Quaternions_ext_interpolation_start = identity;
                    }
                    ELSE IF( EQ_16( hExtOrientationData->enableExternalOrientation[i - 1], 2 ) )
                    {
                        hCombinedOrientationData->Quaternions_ext_interpolation_start = hCombinedOrientationData->Quaternion_frozen_ext;
                        move32();
                        move32();
                        move32();
                        move32();
                        move16();
                    }
                    ELSE
                    {
                        hCombinedOrientationData->Quaternions_ext_interpolation_start = hExtOrientationData->Quaternions[i - 1];
                        move32();
                        move32();
                        move32();
                        move32();
                        move16();
                    }
                }
                ELSE
                {
                    hCombinedOrientationData->Quaternions_ext_interpolation_start = hCombinedOrientationData->Quaternion_prev_extOrientation;
                    move32();
                    move32();
                    move32();
                    move32();
                    move16();
                }
            }
            ELSE IF( EQ_16( hExtOrientationData->enableExternalOrientation[i], 2 ) )
            {
                hCombinedOrientationData->Quaternions_ext_interpolation_start = hCombinedOrientationData->Quaternion_frozen_ext;
                move32();
                move32();
                move32();
                move32();
                move16();
            }
            Word16 tmp_e = 0;
            move16();