Commit 48f80f41 authored by PLAINSI's avatar PLAINSI
Browse files

Merge branch 'main' into mc_paramupmix_160_headrotation_fix

parents c35488cc 006a21f5
Loading
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ variables:
  EXIT_CODE_FAIL: 1
  PROCESSING_SCRIPTS_BIN_DIR: "/test-bin"
  TESTS_DIR_CODEC_BE_ON_MR: "tests/codec_be_on_mr_nonselection"
  IVAS_PIPELINE_NAME: ''
  MANUAL_PIPELINE_TYPE:
    description: "Type for the manual pipeline run. Use 'test-be-release' to run BE test against release codec."
    value: 'default'
@@ -25,14 +26,26 @@ default:

# This sets when pipelines are created. Jobs have more specific rules to restrict them.
workflow:
  name: '$IVAS_PIPELINE_NAME'
  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'
    - 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 == 'schedule' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Scheduled in main
    - if: $CI_PIPELINE_SOURCE == 'web' # for testing
      variables:
        IVAS_PIPELINE_NAME: 'Scheduled 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 == 'test-be-release'
      variables:
        IVAS_PIPELINE_NAME: 'Test BE to release pipeline: $CI_COMMIT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == 'trigger'

stages:
@@ -353,7 +366,7 @@ codec-smoke-test:
  extends:
    - .test-job-linux-needs-testv-dir
    - .rules-merge-request
  timeout: "10 minutes"
  timeout: "15 minutes"
  stage: test
  needs: ["build-codec-linux-cmake", "build-codec-linux-make", "build-codec-instrumented-linux", "build-codec-sanitizers-linux"]
  script:
+73 −4
Original line number Diff line number Diff line
@@ -146,6 +146,9 @@ typedef struct
#endif
#endif
    uint16_t acousticEnvironmentId;
#ifdef FIX_708_DPID_COMMAND_LINE
    int16_t Opt_dpid_on;
#endif
    uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS];
} DecArguments;

@@ -473,9 +476,6 @@ int main(
     * Configure the decoder
     *------------------------------------------------------------------------------------------*/

/*------------------------------------------------------------------------------------------*
 * Configure the decoder
 *------------------------------------------------------------------------------------------*/
#ifdef SPLIT_REND_WITH_HEAD_ROT
    if ( arg.outputConfig == AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    {
@@ -496,7 +496,11 @@ int main(

    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig,
                                       arg.tsmEnabled, arg.enable5ms,
                                       arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK )
                                       arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain,
#ifdef FIX_708_DPID_COMMAND_LINE
                                       arg.Opt_dpid_on,
#endif
                                       arg.delayCompensationEnabled ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
        goto cleanup;
@@ -674,7 +678,11 @@ int main(

        if ( ( error = RenderConfigReader_getDirectivity( renderConfigReader, arg.directivityPatternId, renderConfig.directivity ) ) != IVAS_ERR_OK )
        {
#ifdef FIX_730_DPID_NOT_SET_CORRECTLY
            fprintf( stderr, "Failed to get directivity patterns for one or more of IDs: %d %d %d %d\n\n", arg.directivityPatternId[0], arg.directivityPatternId[1], arg.directivityPatternId[2], arg.directivityPatternId[3] );
#else
            fprintf( stderr, "Failed to get directivity for objects: %d %d %d %d\n\n", arg.directivityPatternId[0], arg.directivityPatternId[1], arg.directivityPatternId[2], arg.directivityPatternId[3] );
#endif
            goto cleanup;
        }

@@ -1035,6 +1043,9 @@ static bool parseCmdlIVAS_dec(

    arg->renderConfigEnabled = false;
    arg->renderConfigFilename = NULL;
#ifdef FIX_708_DPID_COMMAND_LINE
    arg->Opt_dpid_on = 0;
#endif

#ifdef SPLIT_REND_WITH_HEAD_ROT
    arg->outputMdFilename = NULL;
@@ -1062,7 +1073,11 @@ static bool parseCmdlIVAS_dec(
    arg->acousticEnvironmentId = 0;
    for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; ++i )
    {
#ifdef FIX_730_DPID_NOT_SET_CORRECTLY
        arg->directivityPatternId[i] = 65535;
#else
        arg->directivityPatternId[i] = 0;
#endif
    }
    /*-----------------------------------------------------------------*
     * Initialization
@@ -1437,14 +1452,52 @@ static bool parseCmdlIVAS_dec(
        }
        else if ( strcmp( argv_to_upper, "-DPID" ) == 0 )
        {
#ifdef FIX_708_DPID_COMMAND_LINE
            int16_t id;

            arg->Opt_dpid_on = 1;
#endif
            ++i;
            int16_t tmp;
            tmp = 0;
            while ( is_number( argv[i + tmp] ) && tmp < IVAS_MAX_NUM_OBJECTS )
            {
#ifdef FIX_708_DPID_COMMAND_LINE
                id = (int16_t) atoi( argv[i + tmp] );

                if ( !is_digits_only( argv[i + tmp] ) || id < 0 )
                {
                    fprintf( stdout, "Error: Invalid directivity pattern ID specified: %s\n\n", argv[i + tmp] );
                    usage_dec();
                    return false;
                }

                arg->directivityPatternId[tmp] = id;
#else
                arg->directivityPatternId[tmp] = (int16_t) atoi( argv[i + tmp] );
#endif
                ++tmp;
            }

#ifdef FIX_708_DPID_COMMAND_LINE
            if ( tmp == 0 )
            {
                if ( argc - i <= 4 || argv[i][0] == '-' )
                {
                    fprintf( stderr, "Error: Directivity pattern ID not specified!\n\n" );
                    usage_dec();
                    return false;
                }

                if ( !is_digits_only( argv[i + tmp] ) )
                {
                    fprintf( stdout, "Error: Invalid directivity pattern ID specified: %s\n\n", argv[i + tmp] );
                    usage_dec();
                    return false;
                }
            }
#endif

            i += tmp;
        }

@@ -1633,7 +1686,15 @@ static void usage_dec( void )
    fprintf( stdout, "-force R            : Force specific binaural rendering mode, R = (TDREND, CLDFBREND),\n" );
#endif
    fprintf( stdout, "-exof File          : External orientation File for external orientation trajectory\n" );
#ifdef FIX_708_DPID_COMMAND_LINE
    fprintf( stdout, "-dpid ID            : Directivity pattern ID(s) = [ID1, ID2, ID3, ID4]. Space-separated list of up\n" );
    fprintf( stdout, "                      to 4 numbers (unsigned integers) can be specified for BINAURAL output configuration.\n" );
    fprintf( stdout, "                      ID1, ID2, ID3, ID4 specify the directivity pattern IDs used for ISMs 1,2,3 and 4 respectively.\n" );
    fprintf( stdout, "                      This options needs to be accompanied by a render_config file, otherwise a default\n" );
    fprintf( stdout, "                      directivity pattern is used.\n" );
#else
    fprintf( stdout, "-dpid ID            : Directivity pattern ID(s) (space-separated list of up to 4 numbers can be specified) for binaural output configuration\n" );
#endif
    fprintf( stdout, "-aeid ID            : Acoustic environment ID (number >= 0) for BINAURAL_ROOM_REVERB output configuration\n" );
    fprintf( stdout, "-level level        : Complexity level, level = (1, 2, 3), will be defined after characterisation. \n" );
    fprintf( stdout, "                      Currently, all values default to level 3 (full functionality).\n" );
@@ -2470,10 +2531,18 @@ static ivas_error decodeG192(
        if ( vec_pos_update == 0 )
        {
            update_wmops();
#ifdef FIX_RAM_COUNTING_5MS_RENDERING
            update_mem();
#ifdef MEM_COUNT_DETAILS
            export_mem( "mem_analysis.csv" );
#endif
#endif
        }
#ifndef FIX_RAM_COUNTING_5MS_RENDERING
#ifdef MEM_COUNT_DETAILS
        export_mem( "mem_analysis.csv" );
#endif
#endif
#endif
    }

+8 −0
Original line number Diff line number Diff line
@@ -383,7 +383,11 @@ static const CmdLnParser_Option cliOptions[] = {
        .id = CmdLnOptionId_directivityPatternId,
        .match = "ism_directivity_pattern_id",
        .matchShort = "dpid",
#ifdef FIX_708_DPID_COMMAND_LINE
        .description = "Directivity pattern ID(s) = [ID1, ID2, ID3, ID4]. Space-separated list of up to 4 numbers (unsigned integers) can be specified for BINAURAL output configuration.\nID1, ID2, ID3, ID4 specify the directivity pattern IDs used for ISMs 1,2,3 and 4 respectively.\nThis options needs to be accompanied by a render_config file, otherwise a default directivity pattern is used.",
#else
        .description = "Directivity pattern ID(s) (space-separated list of up to 4 numbers can be specified) for binaural output configuration",
#endif
    },
    {
        .id = CmdLnOptionId_acousticEnvironmentId,
@@ -2570,7 +2574,11 @@ static CmdlnArgs defaultArgs(

    for ( int32_t i = 0; i < RENDERER_MAX_ISM_INPUTS; ++i )
    {
#ifdef FIX_730_DPID_NOT_SET_CORRECTLY
        args.directivityPatternId[i] = 65535;
#else
        args.directivityPatternId[i] = 0;
#endif
    }

    args.acousticEnvironmentId = 0;
+14 −7
Original line number Diff line number Diff line
@@ -476,6 +476,10 @@ static ivas_error acelp_FCB_allocator(
        }

        /* try to increase the FCB of the first subframe in cases when the next step is lower than the current step */
#ifdef NONBE_FIX_694_OMASA_ACELP
        if ( fixed_cdk_index[sfr] < ACELP_FIXED_CDK_NB - 1 )
        {
#endif
            step = fcb_table( fixed_cdk_index[sfr] + 1, L_subfr ) - fcb_table( fixed_cdk_index[sfr], L_subfr );
            if ( *nBits >= step && cdbk >= 0 )
            {
@@ -489,6 +493,9 @@ static ivas_error acelp_FCB_allocator(
                    *nBits -= step;
                }
            }
#ifdef NONBE_FIX_694_OMASA_ACELP
        }
#endif
    }
    /* TRANSITION coding: allocate highest FCBQ bit-budget to the subframe with the glottal-shape codebook */
    if ( tc_subfr >= L_SUBFR )
+4 −0
Original line number Diff line number Diff line
@@ -2740,7 +2740,11 @@ ivas_error preview_indices(
            /* Read SBA planar flag and SBA order */
            st_ivas->sba_planar = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + IVAS_COMBINED_FORMAT_SIGNALLING_BITS] == 1 );

#ifdef NONBE_FIX_752_OSBA_MISCONFIG_MCT
            if ( total_brate >= IVAS_256k )
#else
            if ( total_brate > IVAS_256k )
#endif
            {
                st_ivas->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + IVAS_COMBINED_FORMAT_SIGNALLING_BITS + 2] == 1 );
                st_ivas->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + IVAS_COMBINED_FORMAT_SIGNALLING_BITS + 1] == 1 );
Loading