Commit 176af066 authored by Shikha Shetgeri's avatar Shikha Shetgeri
Browse files

Merge branch 'main' into FIX_331_ALL_BRS

parents 09a83dba 939890ac
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1065,7 +1065,7 @@ complexity-ism-in-binaural-out:
    - *complexity-measurements-setup
    - in_format=ISM
    - out_format=BINAURAL
    - bash ci/complexity_measurements/getWmops.sh "ISM1 ISM2 ISM3 ISM4" "$out_format"
    - bash ci/complexity_measurements/getWmops.sh "ISM+1 ISM+2 ISM+3 ISM+4" "$out_format"
    - *complexity-measurements-prepare-artifacts

complexity-sba-hoa3-in-hoa3-out:
+17 −5
Original line number Diff line number Diff line
@@ -1130,18 +1130,31 @@ static bool parseCmdlIVAS_enc(
            {
                strncpy( stmp, argv[i], sizeof( stmp ) );
                stmp[sizeof( stmp ) - 1] = '\0';
#ifdef FIX_411_EVS_BE_TESTS_ON_WINDOWS_FAILING
                to_upper( stmp );
                if ( strcmp( stmp, "LO" ) == 0 )
#else
                to_upper( argv[i] );
                if ( strcmp( argv[i], "LO" ) == 0 )
#endif
                {
                    arg->caConfig.fec_indicator = IVAS_ENC_FEC_LO;
                }
#ifdef FIX_411_EVS_BE_TESTS_ON_WINDOWS_FAILING
                else if ( strcmp( stmp, "HI" ) == 0 )
#else
                else if ( strcmp( argv[i], "HI" ) == 0 )
#endif
                {
                    arg->caConfig.fec_indicator = IVAS_ENC_FEC_HI;
                }
                else
                {
#ifdef FIX_411_EVS_BE_TESTS_ON_WINDOWS_FAILING
                    arg->ca_config_file = argv[i];
#else
                    arg->ca_config_file = stmp;
#endif
                }
                i++;

@@ -1648,18 +1661,17 @@ static void usage_enc( void )
    fprintf( stdout, "Options:\n" );
    fprintf( stdout, "--------\n" );
    fprintf( stdout, "EVS mono is default, for IVAS choose one of the following: -stereo, -ism, -sba, -masa, -mc\n" );
    fprintf( stdout, "-stereo [Mode]      : Stereo format, default is unified stereo \n" );
    fprintf( stdout, "                      optional for Mode: 1: DFT Stereo, 2: TD Stereo, 3: MDCT Stereo\n" );
    fprintf( stdout, "-stereo             : Stereo format \n" );
    fprintf( stdout, "-ism (+)Ch Files    : ISM format \n" );
    fprintf( stdout, "                      where Ch specifies the number of ISMs (1-4)\n" );
    fprintf( stdout, "                      where positive (+) means extended metadata format is used (including orientation and radius) \n" );
    fprintf( stdout, "                      where positive (+) indicates extended metadata (only 64 kbps and up) \n" );
    fprintf( stdout, "                      and Files specify input files containing metadata, one file per object\n" );
    fprintf( stdout, "                      (use NULL for no input metadata)\n" );
    fprintf( stdout, "-sba +/-Order       : Scene Based Audio input format (Ambisonics ACN/SN3D),\n" );
    fprintf( stdout, "                      where Order specifies the Ambisionics order (1-3),\n" );
    fprintf( stdout, "                      where positive (+) means full 3D and negative (-) only 2D/planar components to be coded\n" );
    fprintf( stdout, "-masa Channels File : MASA format \n" );
    fprintf( stdout, "                      where Channels specifies the number of input/transport channels (1 or 2): \n" );
    fprintf( stdout, "-masa Ch File       : MASA format \n" );
    fprintf( stdout, "                      where Ch specifies the number of input/transport channels (1 or 2): \n" );
    fprintf( stdout, "                      and File specifies input file containing parametric MASA metadata \n" );
    fprintf( stdout, "-mc InputConf       : Multi-channel format\n" );
    fprintf( stdout, "                      where InputConf specifies the channel configuration: 5_1, 7_1, 5_1_2, 5_1_4, 7_1_4\n" );
+3 −3
Original line number Diff line number Diff line
@@ -1787,7 +1787,7 @@ IsmPositionProvider *IsmPositionProvider_open(
    IsmPositionProvider *ipp;
    uint16_t i;

    ipp = (IsmPositionProvider *) malloc_( sizeof( IsmPositionProvider ) );
    ipp = (IsmPositionProvider *) malloc( sizeof( IsmPositionProvider ) );
    ipp->frameCounter = 0;
    ipp->numObjects = 0;

@@ -2182,8 +2182,8 @@ static void parseIsm(
    if ( parseUint32( line, &numberOfObjectPositionsToRead ) == 0 )
    {
        positionProvider->numPositions[idx] = numberOfObjectPositionsToRead;
        positionProvider->positions[idx] = malloc_( numberOfObjectPositionsToRead * sizeof( IVAS_REND_AudioObjectPosition ) );
        positionProvider->positionDurations[idx] = malloc_( numberOfObjectPositionsToRead * sizeof( uint16_t ) );
        positionProvider->positions[idx] = malloc( numberOfObjectPositionsToRead * sizeof( IVAS_REND_AudioObjectPosition ) );
        positionProvider->positionDurations[idx] = malloc( numberOfObjectPositionsToRead * sizeof( uint16_t ) );

        for ( i = 0; i < numberOfObjectPositionsToRead; ++i )
        {
+21 −53
Original line number Diff line number Diff line
@@ -536,9 +536,7 @@ ivas_error config_acelp1(
    const int16_t tdm_lp_reuse_flag,    /* i  : LPC reuse flag (can be 1 only with secondary channel */
    const int16_t tdm_low_rate_mode,    /* i  : secondary channel low rate mode flag */
    const int16_t idchan,               /* i  : stereo channel ID               */
#ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE
    const int16_t active_cnt,           /* i  : Active frame counter            */
#endif
    const int16_t tdm_Pitch_reuse_flag, /* i  : primary channel pitch reuse flag*/
    const int16_t tdm_LRTD_flag,        /* i  : LRTD stereo mode flag           */
    const int16_t GSC_IVAS_mode         /* i  : GSC IVAS mode                   */
@@ -756,12 +754,10 @@ ivas_error config_acelp1(

            bits -= acelp_cfg->mid_lsf_bits;
        }
#ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE
        else if ( tdm_lp_reuse_flag == 1 && idchan == 1 && active_cnt != 1 )
        {
            bits -= TDM_IC_LSF_PRED_BITS;
        }
#endif

        /* gain Q bit-budget - part 1 */
        if ( ( coder_type != UNVOICED && coder_type != AUDIO && coder_type != INACTIVE && !( core_brate <= ACELP_8k00 && coder_type != TRANSITION ) ) || ( coder_type == INACTIVE && total_brate > MAX_GSC_INACTIVE_BRATE ) )
@@ -1318,7 +1314,6 @@ ivas_error config_acelp1(
        {
            if ( idchan > 0 && element_mode == IVAS_CPE_TD )
            {
#ifdef LSF_RE_USE_SECONDARY_CHANNEL
                if ( !tdm_lp_reuse_flag )
                {
                    acelp_cfg->lsf_bits += bits; /* increase LSF Q bits */
@@ -1348,33 +1343,6 @@ ivas_error config_acelp1(
                        bits -= allocate_unused( core_brate, coder_type, bits, 1, 0, LSFPRM, &acelp_cfg->lsf_bits );
                    }
                }
#else
                int16_t nb_prm = 4;

                if ( tdm_low_rate_mode == 1 )
                {
                    nb_prm = 2;
                }

                /* First add remaining bits on gains */
                if ( !( *uc_two_stage_flag ) )
                {
                    bits -= allocate_unused( core_brate, coder_type, bits, nb_prm, 0, GAINSPRM, acelp_cfg->gains_mode );
                }

                /* Then, Increase pitch bit budget */
                if ( tdm_Pitch_reuse_flag == 0 && bits > 0 )
                {
                    bits -= allocate_unused( core_brate, coder_type, bits, nb_prm, 0, PITCHPRM, acelp_cfg->pitch_bits );
                }

                /* Increase mid-lsf bit budget */
                if ( tdm_lp_reuse_flag == 0 && bits > 0 )
                {
                    bits -= allocate_unused( core_brate, coder_type, bits, 1, 0, MID_LSFSPRM, &acelp_cfg->mid_lsf_bits );
                    bits -= allocate_unused( core_brate, coder_type, bits, 1, 0, LSFPRM, &acelp_cfg->lsf_bits );
                }
#endif
#ifdef DEBUGGING
                if ( idchan > 0 && bits > 0 && ( coder_type > UNVOICED || tdm_low_rate_mode == 0 ) )
                {
+25 −19
Original line number Diff line number Diff line
@@ -1801,11 +1801,7 @@ ivas_error preview_indices(
                if ( bit_stream[2] == 0 )
                {
                    st_ivas->ivas_format = SBA_FORMAT;
#ifndef LBR_SBA
                    st_ivas->sba_mode = ivas_sba_mode_select( total_brate );
#else
                    st_ivas->sba_mode = ivas_sba_mode_select();
#endif
                }
                else
                {
@@ -1918,7 +1914,11 @@ ivas_error preview_indices(
                k = IVAS_FORMAT_SIGNALING_NBITS;
                if ( st_ivas->ivas_format == MASA_FORMAT )
                {
#ifdef COMBINED_FORMAT_SIGNALING
                    k = IVAS_FORMAT_SIGNALING_NBITS_EXTENDED;
#else
                    k = IVAS_FORMAT_SIGNALING_NBITS_SBA;
#endif
                }

                if ( total_brate < MIN_BRATE_MDCT_STEREO )
@@ -1958,9 +1958,15 @@ ivas_error preview_indices(
        else if ( st_ivas->ivas_format == SBA_FORMAT )
        {
            /* Read SBA planar flag and SBA order */
#ifdef COMBINED_FORMAT_SIGNALING
            st_ivas->sba_planar = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED] == 1 );
            st_ivas->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + 2] == 1 );
            st_ivas->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + 1] == 1 );
#else
            st_ivas->sba_planar = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA] == 1 );
            st_ivas->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 2] == 1 );
            st_ivas->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 1] == 1 );
#endif

            st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( total_brate, st_ivas->sba_order );

Loading