Commit ed917fbb authored by Anika Treffehn's avatar Anika Treffehn
Browse files
Merge branch 'main' of https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec into 244-problems-with-angle-wrapping

# Conflicts:
#	lib_com/options.h
parents 1ff2ef1b d99522e0
Loading
Loading
Loading
Loading
Loading
+29 −13
Original line number Diff line number Diff line
@@ -1080,6 +1080,12 @@ complexity-StereoDmxEVS-stereo-in-mono-out:
# Other jobs
# ---------------------------------------------------------------


# helper for pages job
.unzip-or-cat: &unzip-or-cat
  - unzip -t $ARTIFACTS >> /dev/null
  - if [ $? -eq 0 ]; then unzip -o $ARTIFACTS; rm $ARTIFACTS; else cat $ARTIFACTS; rm $ARTIFACTS; fi

# job that sets up gitlab pages website
# is run on a separate schedule and collects artifacts from other jobs (currently
# only the complexity measurements) multiple times a day
@@ -1096,39 +1102,49 @@ pages:
    - branch=$CI_COMMIT_REF_NAME

    - mkdir public
    - ARTIFACTS=artifacts.zip

    ### fetch artifacts from latest run of complexity jobs
    - job_id=$(python3 ci/get_id_of_last_job_occurence.py $branch complexity-stereo-in-stereo-out)
    - echo $job_id
    - echo "$API_URL_BASE/$job_id/artifacts"
    - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output artifacts_comp_stereo.zip
    - cat artifacts_comp_stereo.zip
    - unzip -o artifacts_comp_stereo.zip
    - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output $ARTIFACTS
    - *unzip-or-cat
    - mv complexity-stereo-in-stereo-out-public ./public/

    - job_id=$(python3 ci/get_id_of_last_job_occurence.py $branch complexity-ism-in-binaural-out)
    - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output artifacts_comp_ism.zip
    - unzip -o artifacts_comp_ism.zip
    - echo $job_id
    - echo "$API_URL_BASE/$job_id/artifacts"
    - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output $ARTIFACTS
    - *unzip-or-cat
    - mv complexity-ism-in-binaural-out-public ./public/

    - job_id=$(python3 ci/get_id_of_last_job_occurence.py $branch complexity-sba-hoa3-in-hoa3-out)
    - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output artifacts_comp_sba.zip
    - unzip -o artifacts_comp_sba.zip
    - echo $job_id
    - echo "$API_URL_BASE/$job_id/artifacts"
    - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output $ARTIFACTS
    - *unzip-or-cat
    - mv complexity-sba-hoa3-in-hoa3-out-public ./public/

    - job_id=$(python3 ci/get_id_of_last_job_occurence.py $branch complexity-mc-in-7_1_4-out)
    - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output artifacts_comp_mc.zip
    - unzip -o artifacts_comp_mc.zip
    - echo $job_id
    - echo "$API_URL_BASE/$job_id/artifacts"
    - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output $ARTIFACTS
    - *unzip-or-cat
    - mv complexity-mc-in-7_1_4-out-public ./public/

    - job_id=$(python3 ci/get_id_of_last_job_occurence.py $branch complexity-masa-in-7_1_4-out)
    - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output artifacts_comp_masa.zip
    - unzip -o artifacts_comp_masa.zip
    - echo $job_id
    - echo "$API_URL_BASE/$job_id/artifacts"
    - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output $ARTIFACTS
    - *unzip-or-cat
    - mv complexity-masa-in-7_1_4-out-public ./public/

    - job_id=$(python3 ci/get_id_of_last_job_occurence.py $branch complexity-StereoDmxEVS-stereo-in-mono-out)
    - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output artifacts_comp_StereoDmxEVS.zip
    - unzip -o artifacts_comp_StereoDmxEVS.zip
    - echo $job_id
    - echo "$API_URL_BASE/$job_id/artifacts"
    - curl --request GET "$API_URL_BASE/$job_id/artifacts" --output $ARTIFACTS
    - *unzip-or-cat
    - mv complexity-StereoDmxEVS-stereo-in-mono-out-public ./public/

    - cp ci/index-pages.html public/index.html
+2 −31
Original line number Diff line number Diff line
@@ -1273,20 +1273,14 @@ static bool parseCmdlIVAS_enc(
            arg->inputFormat = IVAS_ENC_INPUT_ISM;
            i++;

#ifdef IMPROVE_CMDLINE_ROBUSTNESS
            if ( i < argc - 4 )
#else
            if ( i < argc - 5 )
#endif
            {
#ifdef IMPROVE_CMDLINE_ROBUSTNESS
                if ( !is_digits_only( argv[i] ) )
                {
                    fprintf( stderr, "Error: Number of ISM channels must be an integer number!\n\n" );
                    usage_enc();
                    return false;
                }
#endif

                if ( sscanf( argv[i], "%d", &tmp ) > 0 )
                {
@@ -1299,14 +1293,12 @@ static bool parseCmdlIVAS_enc(
                    usage_enc();
                    return false;
                }
#ifdef IMPROVE_CMDLINE_ROBUSTNESS
                else if ( tmp > IVAS_MAX_NUM_OBJECTS )
                {
                    fprintf( stderr, "Error: Too high number of ISM channels specified!\n\n" );
                    usage_enc();
                    return false;
                }
#endif
                else
                {
                    arg->inputFormatConfig.ism.numObjects = (int16_t) tmp;
@@ -1338,11 +1330,7 @@ static bool parseCmdlIVAS_enc(
                }
                else
                {
#ifdef IMPROVE_CMDLINE_ROBUSTNESS
                    fprintf( stderr, "Error: not enough metadata arguments specified!\n\n" );
#else
                    fprintf( stderr, "Error: not enough arguments\n\n" );
#endif
                    usage_enc();
                    return false;
                }
@@ -1354,20 +1342,9 @@ static bool parseCmdlIVAS_enc(
            arg->inputFormat = IVAS_ENC_INPUT_SBA;

            /* SBA configuration */
            if ( i < argc - 4
#ifdef IMPROVE_CMDLINE_ROBUSTNESS
                 && is_number( argv[i] ) && sscanf( argv[i], "%d", &tmp ) > 0
#endif
            )
            if ( i < argc - 4 && is_number( argv[i] ) && sscanf( argv[i], "%d", &tmp ) > 0 )
            {
#ifndef IMPROVE_CMDLINE_ROBUSTNESS
                if ( sscanf( argv[i], "%d", &tmp ) > 0 )
                {
#endif
                i++;
#ifndef IMPROVE_CMDLINE_ROBUSTNESS
                }
#endif
            }
            else
            {
@@ -1404,14 +1381,12 @@ static bool parseCmdlIVAS_enc(

            if ( i < argc - 4 )
            {
#ifdef IMPROVE_CMDLINE_ROBUSTNESS
                if ( !is_digits_only( argv[i] ) )
                {
                    fprintf( stderr, "Error: Number of MASA channels must be an integer number!\n\n" );
                    usage_enc();
                    return false;
                }
#endif

                if ( sscanf( argv[i], "%d", &tmp ) > 0 )
                {
@@ -1427,11 +1402,7 @@ static bool parseCmdlIVAS_enc(
                        arg->inputFormatConfig.masaVariant = IVAS_ENC_MASA_2CH;
                        break;
                    default:
#ifdef IMPROVE_CMDLINE_ROBUSTNESS
                        fprintf( stderr, "Error: MASA channels must be 1 or 2.\n\n" );
#else
                        fprintf( stderr, "Error: MASA channels must for the moment be 1 or 2.\n\n" );
#endif
                        usage_enc();
                        return false;
                }
+0 −6
Original line number Diff line number Diff line
@@ -2432,9 +2432,7 @@ static void convertOutputBuffer(
    int16_t *intBuffer )
{
    int16_t chnl, smpl, i;
#ifdef FIX_REND_ROUNDING
    float temp;
#endif

    i = 0;

@@ -2442,7 +2440,6 @@ static void convertOutputBuffer(
    {
        for ( chnl = 0; chnl < numChannels; ++chnl )
        {
#ifdef FIX_REND_ROUNDING
            temp = floatBuffer[chnl * numSamplesPerChannel + smpl];
            temp = (float) floor( temp + 0.5f );
            if ( temp > MAX16B_FLT )
@@ -2454,9 +2451,6 @@ static void convertOutputBuffer(
                temp = MIN16B_FLT;
            }
            intBuffer[i] = (int16_t) temp;
#else
            intBuffer[i] = (int16_t) roundf( floatBuffer[chnl * numSamplesPerChannel + smpl] );
#endif

            ++i;
        }
+0 −12
Original line number Diff line number Diff line
@@ -1950,24 +1950,12 @@ ivas_error preview_indices(
            /* read number of objects from the bitstream */
            st_ivas->nchan_transport = 1;

#ifdef FIX_ISM_DECODER_PRINTOUT
            k = (int16_t) ( ( total_brate / FRAMES_PER_SEC ) - 1 );
            while ( bit_stream[k] == 1 && st_ivas->nchan_transport < MAX_NUM_OBJECTS )
            {
                st_ivas->nchan_transport++;
                k--;
            }
#else
            if ( total_brate != SID_2k40 && total_brate != FRAME_NO_DATA )
            {
                k = (int16_t) ( ( total_brate / FRAMES_PER_SEC ) - 1 );
                while ( bit_stream[k] == 1 && st_ivas->hDecoderConfig->nchan_out < MAX_NUM_OBJECTS )
                {
                    st_ivas->nchan_transport++;
                    k--;
                }
            }
#endif
            st_ivas->transport_config = AUDIO_CONFIG_EXTERNAL + st_ivas->nchan_transport;

            st_ivas->ism_mode = ivas_ism_mode_select( st_ivas->nchan_transport, total_brate );
+16 −0
Original line number Diff line number Diff line
@@ -375,6 +375,13 @@ void hq2_bit_alloc_har(

    Word32 L_y[BANDS_MAX];

#ifdef FIX_150
#ifdef BASOP_NOGLOB
    Flag Overflow;
    Overflow = 0;
#endif
#endif

    grp_rngmax_fx[0] = 0;
    grp_rngmax_fx[1] = 0;

@@ -639,7 +646,16 @@ void hq2_bit_alloc_har(

    L_temp = Mpy_32_16( L_Ravg_sub[GRP_SB - 1], sub( GRP_SB, 1 ) ); /* Qbe+0+1 */
    L_temp = Mpy_32_16( L_temp, Inv_norm_sum_fx );                  /* Qbe+1+QIpb+1 */
#ifdef FIX_150
#ifdef BASOP_NOGLOB
    lf_hf_ge_r_fx = round_fx_o( L_shl_o( L_temp, sub( 15 + 16, sub( add( SWB_BWE_LR_Qbe, QIns ), 30 ) ), &Overflow ), &Overflow );
    Overflow = 0; /* reset BASOP Overflow */
#else
    lf_hf_ge_r_fx = round_fx( L_shl( L_temp, sub( 15 + 16, sub( add( SWB_BWE_LR_Qbe, QIns ), 30 ) ) ) );
#endif
#else
    lf_hf_ge_r_fx = round_fx( L_shl( L_temp, sub( 15 + 16, sub( add( SWB_BWE_LR_Qbe, QIns ), 30 ) ) ) );
#endif

    exp_normn = norm_s( norm_sum_fx );
    exp_normn = sub( exp_normn, 1 );
Loading