Commit 3ce140aa authored by norvell's avatar norvell
Browse files

Merge branch '173-head-rotation-trajectory-file-remove-subframe-index' into 'main'

Resolve "Head-Rotation Trajectory File: Remove Subframe-Index" [Ref-Using-Main]

See merge request !212
parents 7bb94b29 5c474a75
Loading
Loading
Loading
Loading
Loading
+22 −7
Original line number Diff line number Diff line
@@ -82,9 +82,6 @@ stages:
  - mv IVAS_cod_test IVAS_cod
  - mv IVAS_dec_test IVAS_dec

  ### re-checkout the commit from the source branch to have up-to-date self_test.py and scripts/testv (and actually everything)
  - git checkout $source_branch_commit_sha

.merge-request-comparison-check: &merge-request-comparison-check
    - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi
    - if [ $exit_code -eq 1 ] && [ $non_be_flag == 0 ]; then echo "Non-bitexact cases without non-BE tag encountered!"; exit $EXIT_CODE_FAIL; fi
@@ -334,6 +331,10 @@ ivas-pytest-on-merge-request:

    # some helper variables - "|| true" to prevent failures from grep not finding anything
    - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[non[ -]*be\]") || true
    - ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true

    ### If ref_using_main is not set, checkoug the source branch to use scripts and input from there
    - if [ $ref_using_main == 0 ]; then git checkout $source_branch_commit_sha; fi

    ### prepare pytest
    # create short test vectors
@@ -342,6 +343,9 @@ ivas-pytest-on-merge-request:
    - python3 -m pytest tests -v --update_ref 1 -m create_ref
    - python3 -m pytest tests -v --update_ref 1 -m create_ref_part2

    ### Run test using branch scripts and input
    - if [ $ref_using_main == 1 ]; then git checkout $source_branch_commit_sha; fi

    ### run pytest
    - exit_code=0
    - python3 -m pytest tests -v --junit-xml=report-junit.xml || exit_code=$?
@@ -375,11 +379,18 @@ evs-pytest-on-merge-request:
    
    # some helper variables - "|| true" to prevent failures from grep not finding anything
    - non_be_flag=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[evs[ -]*non[ -]*be\]") || true
    - ref_using_main=$(echo $CI_MERGE_REQUEST_TITLE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true

    ### If ref_using_main is not set, checkoug the source branch to use scripts and input from there
    - if [ $ref_using_main == 0 ]; then git checkout $source_branch_commit_sha; fi

    ### prepare pytest
    # create references
    - python3 -m pytest tests/test_param_file.py -v --update_ref 1 -m create_ref --param_file scripts/config/self_test_evs.prm

    ### Run test using branch scripts and input
    - if [ $ref_using_main == 1 ]; then git checkout $source_branch_commit_sha; fi

    ### run pytest for EVS cases
    - exit_code=0
    - python3 -m pytest tests/test_param_file.py -v --param_file scripts/config/self_test_evs.prm --junit-xml=report-junit-evs.xml || exit_code=$?
@@ -472,11 +483,12 @@ codec-comparison-on-main-push:
    - mv IVAS_dec ../IVAS_dec_ref
    - cd ..

    ### re-checkout the latest commit in the main branch
    - git checkout $latest_commit

    # helper variable - "|| true" to prevent failures from grep not finding anything
    - non_be_flag=$(echo $CI_COMMIT_MESSAGE | grep -c --ignore-case "\[non[ -]*be\]") || true
    - ref_using_main=$(echo $CI_COMMIT_MESSAGE | grep -c --ignore-case "\[ref[ -]*using[ -]*main\]") || true

    ### re-checkout the latest commit in the main branch, if ref_using_main is not set
    - if [ $ref_using_main == 0 ]; then git checkout $latest_commit;fi

    ### prepare pytest
    # create short test vectors
@@ -488,6 +500,9 @@ codec-comparison-on-main-push:
    - python3 -m pytest tests -v --update_ref 1 -m create_ref
    - python3 -m pytest tests -v --update_ref 1 -m create_ref_part2

    ### re-checkout the latest commit here, if ref_using_main is set
    - if [ $ref_using_main -eq 1 ]; then git checkout $latest_commit;fi

    ### run pytest
    - exit_code=0
    - python3 -m pytest tests -v --junit-xml=report-junit.xml || exit_code=$?
+1 −0
Original line number Diff line number Diff line
@@ -149,6 +149,7 @@
#ifdef AGC_TUNING_IMPROVEMENT
#define AGC_ENABLE_FOR_LBR                              /* Issue 168: Enable AGC for low bit rate (1 TC) */
#endif
#define FIX_I173_I174                                   /* Issues 173 and 174: Remove frame and subframe index from ISm metadata and headtracking respectively. */
#define FIX_TCX_DEC_RECONF_BFI

/* ################## End DEVELOPMENT switches ######################### */
+12 −5
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ struct HeadRotFileReader
    bool fileRewind;
};


#ifndef FIX_I173_I174
/*-----------------------------------------------------------------------*
 * HeadRotationFrameCheck()
 *
@@ -66,7 +66,7 @@ static ivas_error HeadRotationFrameCheck(

    return IVAS_ERR_OK;
}

#endif

/*-----------------------------------------------------------------------*
 * HeadRotationFileReader_open()
@@ -121,12 +121,18 @@ ivas_error HeadRotationFileReading(
)
{
    uint16_t i;
#ifndef FIX_I173_I174
    int32_t time_stamp = 0;
#endif
    float w, x, y, z;

    for ( i = 0; i < IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; i++ )
    {
#ifdef FIX_I173_I174
        if ( 4 != fscanf( headRotReader->trajFile, "%f,%f,%f,%f", &w, &x, &y, &z ) )
#else
        if ( 5 != fscanf( headRotReader->trajFile, "%d,%f,%f,%f,%f", &time_stamp, &w, &x, &y, &z ) )
#endif
        {
            if ( feof( headRotReader->trajFile ) )
            {
@@ -137,12 +143,12 @@ ivas_error HeadRotationFileReading(
            return IVAS_ERR_FAILED_FILE_PARSE;
        }


#ifndef FIX_I173_I174
        if ( headRotReader->fileRewind == false && headRotReader->frameCounter != time_stamp )
        {
            return IVAS_ERR_FILE_READER_TIMESTAMP_MISMATCH;
        }

#endif

        ( headRotReader->frameCounter )++;

@@ -151,7 +157,7 @@ ivas_error HeadRotationFileReading(
        Quaternions[i].y = y;
        Quaternions[i].z = z;
    }

#ifndef FIX_I173_I174
    if ( headRotReader->fileRewind == false )
    {
        if ( ( time_stamp + 1 ) % IVAS_MAX_PARAM_SPATIAL_SUBFRAMES != 0 )
@@ -164,6 +170,7 @@ ivas_error HeadRotationFileReading(
    {
        return IVAS_ERR_FILE_READER_TIMESTAMP_MISMATCH;
    }
#endif

    return IVAS_ERR_OK;
}
+7 −1
Original line number Diff line number Diff line
@@ -98,7 +98,9 @@ ivas_error IsmFileReader_readNextFrame(
    float meta_prm[NUM_ISM_METADATA_PER_LINE];
    char *char_ptr;
    int16_t i;
#ifndef FIX_I173_I174
    int32_t time_stamp;
#endif
    FILE *file;

    if ( ismMetadata == NULL || self->file == NULL )
@@ -114,14 +116,18 @@ ivas_error IsmFileReader_readNextFrame(
    }

    char_ptr = strtok( char_buff, "," );
#ifndef FIX_I173_I174
    time_stamp = (int32_t) atoi( char_ptr );

    if ( time_stamp != self->frameCounter )
    {
        return IVAS_ERR_FILE_READER_TIMESTAMP_MISMATCH;
    }

#endif
    i = 0;
#ifdef FIX_I173_I174
    meta_prm[i++] = (float) atof( char_ptr );
#endif
    while ( ( char_ptr = strtok( NULL, "," ) ) != NULL && i < NUM_ISM_METADATA_PER_LINE )
    {
        meta_prm[i++] = (float) atof( char_ptr );
+50 −50
Original line number Diff line number Diff line
0000,-030.00,+00.00,01.00,000.00,1.00
0001,-030.00,+00.00,01.00,000.00,1.00
0002,-030.00,+00.00,01.00,000.00,1.00
0003,-030.00,+00.00,01.00,000.00,1.00
0004,-030.00,+00.00,01.00,000.00,1.00
0005,-030.00,+00.00,01.00,000.00,1.00
0006,-030.00,+00.00,01.00,000.00,1.00
0007,-030.00,+00.00,01.00,000.00,1.00
0008,-030.00,+00.00,01.00,000.00,1.00
0009,-030.00,+00.00,01.00,000.00,1.00
0010,-030.00,+00.00,01.00,000.00,1.00
0011,-030.00,+00.00,01.00,000.00,1.00
0012,-030.00,+00.00,01.00,000.00,1.00
0013,-030.00,+00.00,01.00,000.00,1.00
0014,-030.00,+00.00,01.00,000.00,1.00
0015,-030.00,+00.00,01.00,000.00,1.00
0016,-030.00,+00.00,01.00,000.00,1.00
0017,-030.00,+00.00,01.00,000.00,1.00
0018,-030.00,+00.00,01.00,000.00,1.00
0019,-030.00,+00.00,01.00,000.00,1.00
0020,-030.00,+00.00,01.00,000.00,1.00
0021,-030.00,+00.00,01.00,000.00,1.00
0022,-030.00,+00.00,01.00,000.00,1.00
0023,-030.00,+00.00,01.00,000.00,1.00
0024,-030.00,+00.00,01.00,000.00,1.00
0025,-030.00,+00.00,01.00,000.00,1.00
0026,-030.00,+00.00,01.00,000.00,1.00
0027,-030.00,+00.00,01.00,000.00,1.00
0028,-030.00,+00.00,01.00,000.00,1.00
0029,-030.00,+00.00,01.00,000.00,1.00
0030,-030.00,+00.00,01.00,000.00,1.00
0031,-030.00,+00.00,01.00,000.00,1.00
0032,-030.00,+00.00,01.00,000.00,1.00
0033,-030.00,+00.00,01.00,000.00,1.00
0034,-030.00,+00.00,01.00,000.00,1.00
0035,-030.00,+00.00,01.00,000.00,1.00
0036,-030.00,+00.00,01.00,000.00,1.00
0037,-030.00,+00.00,01.00,000.00,1.00
0038,-030.00,+00.00,01.00,000.00,1.00
0039,-030.00,+00.00,01.00,000.00,1.00
0040,-030.00,+00.00,01.00,000.00,1.00
0041,-030.00,+00.00,01.00,000.00,1.00
0042,-030.00,+00.00,01.00,000.00,1.00
0043,-030.00,+00.00,01.00,000.00,1.00
0044,-030.00,+00.00,01.00,000.00,1.00
0045,-030.00,+00.00,01.00,000.00,1.00
0046,-030.00,+00.00,01.00,000.00,1.00
0047,-030.00,+00.00,01.00,000.00,1.00
0048,-030.00,+00.00,01.00,000.00,1.00
0049,-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
-030.00,+00.00,01.00,000.00,1.00
Loading