Commit 9458531c authored by emerit's avatar emerit
Browse files

Merge branch 'main' into update_crend

parents 73b45f5c 4dca2ea1
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ variables:
  SCRIPTS_DIR: "/usr/local/scripts"
  EXIT_CODE_NON_BE: 123
  EXIT_CODE_FAIL: 1
  LONG_TEST_SUITE: "tests/test_param_file_ltv.py tests/renderer"
  LONG_TEST_SUITE: "tests/codec_be_on_mr_nonselection/test_param_file.py tests/renderer --param_file scripts/config/self_test_ltv.prm"
  SHORT_TEST_SUITE: "tests/codec_be_on_mr_nonselection"
  TEST_SUITE: ""
  DUT_ENCODER_PATH: "./IVAS_cod"
@@ -123,10 +123,8 @@ stages:

.update-scripts-repo: &update-scripts-repo
  - cd $SCRIPTS_DIR
  - git remote set-branches --add origin $BASOP_CI_BRANCH_PC_REPO
  - git remote prune origin
  - git branch
  - git fetch
  - sed -i '/fetch/d' .git/config # Remove all fetch lines to clean out dead links
  - git remote set-branches --add origin $BASOP_CI_BRANCH_PC_REPO # Add currently used branch
  - git checkout $BASOP_CI_BRANCH_PC_REPO
  - git pull
  - cd -
@@ -243,7 +241,7 @@ stages:
    - python3 scripts/parse_mld_xml.py report-junit.xml $MLD_ARTIFACT_NAME

    - if [ $USE_LTV -eq 1 ] && [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then
    -    id_previous=$(python3 get_id_of_last_job_occurence.py $CI_DEFAULT_BRANCH $CI_JOB_NAME $CI_PROJECT_ID)
    -    id_previous=$(python3 ci/get_id_of_last_job_occurence.py $CI_DEFAULT_BRANCH $CI_JOB_NAME $CI_PROJECT_ID)
    -    echo "Job ID from variables - $CI_JOB_ID, Job ID from script - $id_previous"
    -    curl --request GET "https://forge.3gpp.org/rep/api/v4/projects/$CI_PROJECT_ID/jobs/$id_previous/artifacts" --output artifacts.zip
    -    unzip artifacts.zip -d previous_artifacts
+0 −10
Original line number Diff line number Diff line
@@ -826,11 +826,6 @@ void masa_sample_rate_band_correction_fx(
    {
        FOR( sf = 0; sf < MAX_PARAM_SPATIAL_SUBFRAMES; sf++ )
        {
#if 1 /* TODO: remove float code */
            hQMetaData->q_direction[0].band_data[band].azimuth[sf] = 0.0f;
            hQMetaData->q_direction[0].band_data[band].elevation[sf] = 0.0f;
            hQMetaData->q_direction[0].band_data[band].energy_ratio[sf] = 0.0f;
#endif
            hQMetaData->q_direction[0].band_data[band].azimuth_fx[sf] = 0;
            move32();
            hQMetaData->q_direction[0].band_data[band].elevation_fx[sf] = 0;
@@ -845,11 +840,6 @@ void masa_sample_rate_band_correction_fx(

            IF( EQ_16( (Word16) hQMetaData->no_directions, 2 ) )
            {
#if 1 /* TODO: remove float code */
                hQMetaData->q_direction[1].band_data[band].azimuth[sf] = 0.0f;
                hQMetaData->q_direction[1].band_data[band].elevation[sf] = 0.0f;
                hQMetaData->q_direction[1].band_data[band].energy_ratio[sf] = 0.0f;
#endif
                hQMetaData->q_direction[1].band_data[band].azimuth_fx[sf] = 0;
                move32();
                hQMetaData->q_direction[1].band_data[band].elevation_fx[sf] = 0;
+17 −16
Original line number Diff line number Diff line
@@ -60,11 +60,11 @@ typedef struct
    int16_t last_ism_metadata_flag;       /* last frame ism_metadata_flag */

#ifdef IVAS_FLOAT_FIXED
    Word32 azimuth_fx;                        /* azimuth value read from the input metadata file */ // q = 22
    Word32 elevation_fx;                      /* elevation value read from the input metadata file */ // q = 22
    Word16 radius_fx;                         /* radius value read from the input metadata file */ // q = 9
    Word32 yaw_fx;                            /* yaw value read from the input metadata file */ // q = 22
    Word32 pitch_fx;                          /* pitch value read from the input metadata file */ // q = 22
    Word32 azimuth_fx;                        /* azimuth value read from the input metadata file */ /* Q22 */
    Word32 elevation_fx;                      /* elevation value read from the input metadata file */ /* Q22 */
    Word16 radius_fx;                         /* radius value read from the input metadata file */ /* Q9 */
    Word32 yaw_fx;                            /* yaw value read from the input metadata file */ /* Q22 */
    Word32 pitch_fx;                          /* pitch value read from the input metadata file */ /* Q22 */
#endif
    float azimuth;                        /* azimuth value read from the input metadata file */
    float elevation;                      /* elevation value read from the input metadata file */
@@ -84,10 +84,10 @@ typedef struct
    float last_true_azimuth;              /* MD smoothing in DTX- last true Q azimuth value */
    float last_true_elevation;            /* MD smoothing in DTX- last true Q elevation value */
#ifdef IVAS_FLOAT_FIXED
    Word32 last_azimuth_fx;        /* MD smoothing in DTX- last Q azimuth value */
    Word32 last_elevation_fx;      /* MD smoothing in DTX - last Q elevation value */
    Word32 last_true_azimuth_fx;   /* MD smoothing in DTX- last true Q azimuth value */
    Word32 last_true_elevation_fx; /* MD smoothing in DTX- last true Q elevation value */
    Word32 last_azimuth_fx;        /* MD smoothing in DTX- last Q azimuth value */ /* Q22 */
    Word32 last_elevation_fx;      /* MD smoothing in DTX - last Q elevation value */ /* Q22 */
    Word32 last_true_azimuth_fx;   /* MD smoothing in DTX- last true Q azimuth value */ /* Q22 */
    Word32 last_true_elevation_fx; /* MD smoothing in DTX- last true Q elevation value */ /* Q22 */
#endif

    int16_t ism_md_fec_cnt_enc;           /* counter of continuous frames where MD are not transmitted */
@@ -232,9 +232,9 @@ typedef struct ivas_spar_md_prev_t
typedef struct ivas_quant_coeffs_t
{
    float min;
    Word32 min_fx;
    Word32 min_fx; /* Q28 */
    float max;
    Word32 max_fx;
    Word32 max_fx; /* Q28 */
    int16_t q_levels[2];
} ivas_quant_coeffs_t;

@@ -375,20 +375,21 @@ typedef struct ivas_cov_smooth_state_t
    int16_t num_bins;
#ifdef IVAS_FLOAT_FIXED
    Word32 *pPrior_cov_real_fx[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH];
    Word32 *pSmoothing_factor_fx;
    Word32 *pSmoothing_factor_fx; /* Q31 */
#endif

} ivas_cov_smooth_state_t;

typedef struct ivas_cov_smooth_cfg_t
{
#ifndef IVAS_FLOAT_FIXED
    float max_update_rate;
#else
    Word32 max_update_rate_fx; /* Q31 */
#endif
    int16_t min_pool_size;
    int16_t max_bands;
    int16_t num_bins;
#ifdef IVAS_FLOAT_FIXED
    Word32 max_update_rate_fx;
#endif

} ivas_cov_smooth_cfg_t;

@@ -636,7 +637,7 @@ typedef struct ivas_param_mc_conf_struct /* structure for ROM Table */
    const float *ild_factors;
#ifdef IVAS_FLOAT_FIXED
    const Word16 *ild_factors_fx;
    const Word32 *dmx_fac_fx;
    const Word32 *dmx_fac_fx; /* Q31 */
#endif

} PARAM_MC_CONF;
+1 −1
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@
/* ################## End DEVELOPMENT switches ######################### */

/* clang-format on */
//#define NONBE_FIX_1010_STEREO_CNG_DIV_BY_ZERO
#define NONBE_FIX_1010_STEREO_CNG_DIV_BY_ZERO

#define UNUSED_PARAM(...) (void)(__VA_ARGS__)

+392 −412
Original line number Diff line number Diff line
@@ -556,7 +556,6 @@ static ivas_error ivas_dirac_rend_config_fx(
    {
        initDiffuseResponses_fx( hDirACRend->diffuse_response_function_fx, nchan_out_woLFE, hDirACRend->hOutSetup.output_config,
                                 hDirACRend->hOutSetup, hDirACRend->hOutSetup.ambisonics_order, st_ivas->ivas_format, &hDirACRend->num_ele_spk_no_diffuse_rendering, st_ivas->transport_config );

    }
    ELSE
    {
@@ -1515,14 +1514,17 @@ ivas_error ivas_dirac_dec_config_fx(
    /* Solve and setup flags for inits */
    dec_config_flag = ( EQ_16( flag_config_inp, DIRAC_RECONFIGURE_MODE ) ) ? DIRAC_RECONFIGURE : flag_config_inp;

    output_Fs = st_ivas->hDecoderConfig->output_Fs; move32();
    output_Fs = st_ivas->hDecoderConfig->output_Fs;
    move32();
    hodirac_flag = ivas_get_hodirac_flag_fx( st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->sba_analysis_order );
    dec_param_estim_old = ( dec_config_flag == DIRAC_RECONFIGURE ) ? st_ivas->hDirAC->hConfig->dec_param_estim : FALSE;

    sparfoa_flag = 0; move16();
    sparfoa_flag = 0;
    move16();
    IF( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_FOA && st_ivas->ivas_format == SBA_FORMAT && !hodirac_flag )
    {
        sparfoa_flag = 1; move16();
        sparfoa_flag = 1;
        move16();
    }

    IF( ( error = ivas_dirac_dec_config_internal_fx( st_ivas, dec_config_flag ) ) != IVAS_ERR_OK )
@@ -1531,26 +1533,32 @@ ivas_error ivas_dirac_dec_config_fx(
    }

    /* This is required for parambin */
    test(); test();
    test();
    test();
    IF( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC ) || EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC_ROOM ) || EQ_16( st_ivas->renderer_type, RENDERER_STEREO_PARAMETRIC ) )
    {
      st_ivas->hDirAC->hConfig->dec_param_estim = FALSE; move16();
        st_ivas->hDirAC->hConfig->dec_param_estim = FALSE;
        move16();
    }

    dec_param_estim_new = st_ivas->hDirAC->hConfig->dec_param_estim; move16();
    dec_param_estim_new = st_ivas->hDirAC->hConfig->dec_param_estim;
    move16();

    /* Setup renderers and meta */
    /* First, free everything if in reconfig and not the active renderer */
    need_parambin = 0; move16();
    need_parambin = 0;
    move16();
    SWITCH( st_ivas->renderer_type )
    {
        case RENDERER_BINAURAL_PARAMETRIC:
        case RENDERER_BINAURAL_PARAMETRIC_ROOM:
        case RENDERER_STEREO_PARAMETRIC:
            need_parambin = 1; move16();
            need_parambin = 1;
            move16();
            BREAK;
        default:
            need_parambin = 0; move16();
            need_parambin = 0;
            move16();
    }

    IF( !need_parambin )
@@ -1558,7 +1566,8 @@ ivas_error ivas_dirac_dec_config_fx(
        ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin );
    }

    need_dirac_rend = 0; move16();
    need_dirac_rend = 0;
    move16();
    SWITCH( st_ivas->renderer_type )
    {
        case RENDERER_DIRAC:
@@ -1568,10 +1577,12 @@ ivas_error ivas_dirac_dec_config_fx(
        case RENDERER_SBA_LINEAR_DEC:
        case RENDERER_OSBA_AMBI:
        case RENDERER_OSBA_LS:
            need_dirac_rend = 1; move16();
            need_dirac_rend = 1;
            move16();
            BREAK;
        default:
            need_dirac_rend = 0; move16();
            need_dirac_rend = 0;
            move16();
    }

    IF( !need_dirac_rend )
@@ -3210,7 +3221,8 @@ void ivas_dirac_dec_set_md_map_fx(

            exp = sub( exp_num, exp_denom );

            IF (num > denom) {
            IF( num > denom )
            {
                num = L_shr( num, 1 );
                exp = add( exp, 1 );
            }
@@ -3318,10 +3330,8 @@ void ivas_dirac_dec_render_fx(
        }
    }

    IF( EQ_16( hSpatParamRendCom->slots_rendered, hSpatParamRendCom->num_slots ) )
    {
        IF( EQ_16( st_ivas->hDirAC->hConfig->dec_param_estim, 1 ) )
        {
    IF( EQ_16( hSpatParamRendCom->slots_rendered, hSpatParamRendCom->num_slots ) ){
        IF( EQ_16( st_ivas->hDirAC->hConfig->dec_param_estim, 1 ) ){
            temp = add( hSpatParamRendCom->dirac_read_idx, DEFAULT_JBM_CLDFB_TIMESLOTS );
    hSpatParamRendCom->dirac_read_idx = sub( temp, i_mult( idiv1616( temp, hSpatParamRendCom->dirac_md_buffer_length ), hSpatParamRendCom->dirac_md_buffer_length ) );
}
@@ -3507,14 +3517,13 @@ void ivas_dirac_dec_render_sf_fx(
    {
        IF( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == SBA_ISM_FORMAT )
        {

        }
        ELSE
        {
            offset = i_mult( hSpatParamRendCom->num_freq_bands, add( hSpatParamRendCom->slots_rendered, slot_idx ) );
            FOR( ch = 0; ch < nchan_transport; ch++ )
            {
                floatToFixed_arrL32( &st_ivas->hTcBuffer->tc[hDirACRend->sba_map_tc[ch]][offset], &st_ivas->hTcBuffer->tc_fx[hDirACRend->sba_map_tc[ch]][offset], Q11, hSpatParamRendCom->num_freq_bands );
                // floatToFixed_arrL32( &st_ivas->hTcBuffer->tc[hDirACRend->sba_map_tc[ch]][offset], &st_ivas->hTcBuffer->tc_fx[hDirACRend->sba_map_tc[ch]][offset], Q11, hSpatParamRendCom->num_freq_bands );
                floatToFixed_arrL32( st_ivas->cldfbAnaDec[ch]->cldfb_state, st_ivas->cldfbAnaDec[ch]->cldfb_state_fx, Q11, ( st_ivas->cldfbAnaDec[ch]->p_filter_length - st_ivas->cldfbAnaDec[ch]->no_channels ) );
            }
        }
@@ -3522,7 +3531,6 @@ void ivas_dirac_dec_render_sf_fx(

    IF( EQ_16( st_ivas->nchan_transport, 1 ) && st_ivas->hSCE[0]->hCoreCoder[0] != NULL && st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag && !( L_or( EQ_16( st_ivas->ivas_format, SBA_FORMAT ), EQ_16( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) ) )
    {
        floatToFixed_arrL32( st_ivas->hTcBuffer->tc[1], st_ivas->hTcBuffer->tc_fx[1], Q11, hSpatParamRendCom->num_freq_bands );
        floatToFixed_arrL32( st_ivas->cldfbAnaDec[1]->cldfb_state, st_ivas->cldfbAnaDec[1]->cldfb_state_fx, Q11, ( st_ivas->cldfbAnaDec[1]->p_filter_length - st_ivas->cldfbAnaDec[1]->no_channels ) );
    }

@@ -3553,10 +3561,6 @@ void ivas_dirac_dec_render_sf_fx(
                ELSE
                {
                    floatToFixed_arrL32( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q, i_mult( 2, hSpatParamRendCom->num_freq_bands ) );
                    IF( hDirACRend->masa_stereo_type_detect )
                    {
                        hDirACRend->masa_stereo_type_detect->subtract_power_y_fx = floatToFixed(hDirACRend->masa_stereo_type_detect->subtract_power_y, hDirACRend->masa_stereo_type_detect->q_subtract_power_y);
                    }
                }
                BREAK;
            case 1:
@@ -3688,15 +3692,6 @@ void ivas_dirac_dec_render_sf_fx(
    ELSE
    {
        floatToFixed_arrL( hDirACRend->h_output_synthesis_psd_state.gains_diff_prev, hDirACRend->h_output_synthesis_psd_state.gains_diff_prev_fx, hDirACRend->h_output_synthesis_psd_state.gains_diff_prev_q, hSpatParamRendCom->num_freq_bands * hDirACRend->hOutSetup.nchan_out_woLFE );
        IF( hDirACRend->masa_stereo_type_detect != NULL )
        {
            hDirACRend->masa_stereo_type_detect->q_target_power_y_smooth = L_get_q( hDirACRend->masa_stereo_type_detect->target_power_y_smooth );
            hDirACRend->masa_stereo_type_detect->target_power_y_smooth_fx = floatToFixed( hDirACRend->masa_stereo_type_detect->target_power_y_smooth, hDirACRend->masa_stereo_type_detect->q_target_power_y_smooth );
            hDirACRend->masa_stereo_type_detect->q_subtract_power_y = L_get_q( hDirACRend->masa_stereo_type_detect->subtract_power_y );
            hDirACRend->masa_stereo_type_detect->q_subtract_power_y_smooth = L_get_q( hDirACRend->masa_stereo_type_detect->subtract_power_y_smooth );
            hDirACRend->masa_stereo_type_detect->subtract_power_y_smooth_fx = floatToFixed( hDirACRend->masa_stereo_type_detect->subtract_power_y_smooth, hDirACRend->masa_stereo_type_detect->q_subtract_power_y_smooth );
            hDirACRend->masa_stereo_type_detect->subtract_power_y_fx = floatToFixed( hDirACRend->masa_stereo_type_detect->subtract_power_y, hDirACRend->masa_stereo_type_detect->q_subtract_power_y );
        }

        hDirACRend->h_output_synthesis_psd_state.q_cy_auto_dir_smooth_prev = L_get_q_buf1( hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_prev, size_ho );
        floatToFixed_arrL( hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_prev, hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_prev_fx, hDirACRend->h_output_synthesis_psd_state.q_cy_auto_dir_smooth_prev, size_ho );
@@ -5108,10 +5103,6 @@ void ivas_dirac_dec_render_sf_fx(
        fixedToFloat_arrL32( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q, i_mult( 2, hSpatParamRendCom->num_freq_bands ) );
        fixedToFloat_arrL32( hDirACRend->proto_frame_f_fx, hDirACRend->proto_frame_f, hDirACRend->proto_frame_f_q, i_mult( 6, hSpatParamRendCom->num_freq_bands ) );
        fixedToFloat_arrL32( reference_power_fx, DirAC_mem.reference_power, DirAC_mem.reference_power_q, hSpatParamRendCom->num_freq_bands );
        IF( hDirACRend->masa_stereo_type_detect )
        {
            hDirACRend->masa_stereo_type_detect->subtract_power_y = fixedToFloat_32( hDirACRend->masa_stereo_type_detect->subtract_power_y_fx, hDirACRend->masa_stereo_type_detect->q_subtract_power_y );
        }
    }
    ELSE
    {
@@ -5136,10 +5127,6 @@ void ivas_dirac_dec_render_sf_fx(
                {
                    fixedToFloat_arrL32( hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_fx, hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f, hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_q, i_mult( hSpatParamRendCom->subframe_nbslots[subframe_idx], i_mult( 4, hSpatParamRendCom->num_freq_bands ) ) );
                    fixedToFloat_arrL32( hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_fx, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth, hDirACRend->h_output_synthesis_psd_state.proto_power_smooth_q, i_mult( 2, hSpatParamRendCom->num_freq_bands ) );
                    IF( hDirACRend->masa_stereo_type_detect )
                    {
                        hDirACRend->masa_stereo_type_detect->subtract_power_y = fixedToFloat_32( hDirACRend->masa_stereo_type_detect->subtract_power_y_fx, hDirACRend->masa_stereo_type_detect->q_subtract_power_y );
                    }
                }
                me2f_buf( hDirACRend->proto_frame_f_fx, hDirACRend->proto_frame_f_q, hDirACRend->proto_frame_f, i_mult( 6, hSpatParamRendCom->num_freq_bands ) );
                fixedToFloat_arrL32( reference_power_fx, DirAC_mem.reference_power, DirAC_mem.reference_power_q, hSpatParamRendCom->num_freq_bands );
@@ -5254,13 +5241,6 @@ void ivas_dirac_dec_render_sf_fx(
    }
    ELSE
    {
        IF( hDirACRend->masa_stereo_type_detect != NULL )
        {
            hDirACRend->masa_stereo_type_detect->target_power_y_smooth = fixedToFloat( hDirACRend->masa_stereo_type_detect->target_power_y_smooth_fx, hDirACRend->masa_stereo_type_detect->q_target_power_y_smooth );
            hDirACRend->masa_stereo_type_detect->subtract_power_y_smooth = fixedToFloat( hDirACRend->masa_stereo_type_detect->subtract_power_y_smooth_fx, hDirACRend->masa_stereo_type_detect->q_subtract_power_y );
            hDirACRend->masa_stereo_type_detect->subtract_power_y = fixedToFloat( hDirACRend->masa_stereo_type_detect->subtract_power_y_fx, hDirACRend->masa_stereo_type_detect->q_subtract_power_y );
        }

        fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_fx, hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth, hDirACRend->h_output_synthesis_psd_state.q_cy_auto_dir_smooth, size );
        fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth_fx, hDirACRend->h_output_synthesis_psd_state.cy_cross_dir_smooth, hDirACRend->h_output_synthesis_psd_state.q_cy_cross_dir_smooth, size_ho );
        fixedToFloat_arrL( hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth_fx, hDirACRend->h_output_synthesis_psd_state.cy_auto_diff_smooth, hDirACRend->h_output_synthesis_psd_state.q_cy_auto_diff_smooth, size );
Loading