Commit 8185b4e0 authored by fotopoulou's avatar fotopoulou
Browse files

Merge branch 'main' into basop-2346-review-potentially-duplicated-igf-functions-2

parents 393d7faa 387619a8
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1649,7 +1649,11 @@ static void resetHeadRotation(
        pPos[i].x_fx = 0;
        pPos[i].y_fx = 0;
        pPos[i].z_fx = 0;
#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION
        pPos[i].q_fact = 22;
#else
        pPos[i].q_fact = 25;
#endif
    }

    return;
+12 −0
Original line number Diff line number Diff line
@@ -63,6 +63,10 @@
#define IVAS_ER_LIST_HEIGHT              1.6f
#define IVAS_ER_LIST_HEIGHT_FX           6710886 /* 1.6f in Q.22 */
#define IVAS_DEFAULT_AEID                65535
#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION
#define IVAS_LISTENER_POSITION_MAX     327.67f
#define IVAS_LISTENER_POSITION_MAX_Q22 1374347592 /* 327.67 in Q22 */
#endif

/* JBM constants for adaptive-playout */
#define IVAS_TIME_SCALE_MIN 50  /* min. time-scaling [%] */
@@ -160,7 +164,11 @@ typedef struct
typedef struct
{
    float x, y, z;
#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION
    Word32 x_fx, y_fx, z_fx; /* Q22, Q22, Q22 */
#else
    Word32 x_fx, y_fx, z_fx;
#endif
    Word16 q_fact;

} IVAS_VECTOR3;
@@ -351,7 +359,11 @@ typedef struct _IVAS_RENDER_CONFIG
    float directivity[IVAS_MAX_NUM_OBJECTS * 3];
    Word16 directivity_fx[IVAS_MAX_NUM_OBJECTS * 3]; // has the following q-factor pattern: {6, 6, 15, 6, 6, 15, 6, 6, 15, 6, 6, 15}
    float distAtt[3];
#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION
    Word32 distAtt_fx[3]; /* {Q25, Q28, Q28} */
#else
    Word32 distAtt_fx[3]; /* {Q27, Q30, Q30} */
#endif

} IVAS_RENDER_CONFIG_DATA, *IVAS_RENDER_CONFIG_HANDLE;

+9 −0
Original line number Diff line number Diff line
@@ -96,6 +96,12 @@
#define HARMONIZE_2499_CONFIGUREFDCNGDEC                /* FhG: basop issue 2499: harmonoize configureFdCngDec */
#define FIX_BASOP_2530_IVAS_DECISION_MAT                /* VA: Fix ambiguous usage of extract_l() */
#define FIX_BASOP_2546_HARMONIZE_TCX_SCALAR             /* FhG: Fix issue 2546 Harmonize function tcx_scalar_quantization_rateloop*/
#define FIX_BASOP_2532_cx_e                             /* FhG: Fix issue 2532 about additional exponent variable*/
#define HARMONIZE_2543_SQ_gain                          /* FhG: Harmonize SQ_gain */
#define FIX_ISSUE_2533_EXTRA_CONDITION                  /* FhG: Fix issue basop 2533 removing the extra condition*/
#define HARMONIZE_2537_SetTCXModeInfo                 /* FhG: Harmonize SetTCXModeInfo  - IVAS_VERSION OBVIOUSLY NOT FITTING FOR EVS - pipes not green */
#define HARMONIZE_2537_GetTCXMaxenergyChange            /* FhG: Harmonize GetTCXMaxenergyChange */
#define HARMONIZE_2508_InitTransientDetection          /* FhG: harmonize GetAttackForTCXDecision derivates for evs/ivas  */
#define FIX_2346_DUPLICATED_IGF_FUNCTIONS_2             /* FhG: part 2 of basop issue 2346: Review potentially duplicated IGF functions */

/* #################### End BE switches ################################## */
@@ -104,6 +110,7 @@
/* any switch which is non-be wrt. TS 26.251 V3.0 */

#define FIX_1540_EXPOSE_PT_IN_RTP_HEADER_API            /* Expose Payload Type setting in RTP Header */
#define FIX_BASOP_2023_TDREND_DISTATT_PRECISION         /* Eri: Basop issue 2023: Distance attenuation scaling, adding clamping of distance att input and listener position */ 
#define USE_RTPDUMP                                     /* FhG: RTPDUMP format (rtptools standard) instead of custom format */
#define FIX_FLOAT_1569_REND_RENDER_CONFIG_CHECKS        /* Nokia: float issue 1569: fix render config checks in renderer */
#define FIX_BASOP_2526_SPAR_MASA_PARAM_MAP_Q_BUG        /* Nokia: BASOP issue 2526: Fix wrong Q variable in SPAR to MASA param mapping */
@@ -119,6 +126,8 @@
#define FIX_BASOP_2531_MCT_CP_BITRATE                   /* FhG: BASOP issue 2531: Fix MCT cp_bitrate calculation; affects bitrate switching only */
#define FIX_BASOP_2541_OMASA_ENC_FIXES                  /* Nokia: BASOP issue 2541: Fix function ivas_encode_masaism_metadata_fx */
#define FIX_BASOP_2545_FIX_LTV_REGRESSION_2529          /* Nokia: BASOP issue 2545: Fix LTV regression caused by issue 2529 fix */
#define FIX_FLOAT_1573_POSITION_UPDATE                  /* Eri: Float issue 1573: For static orientation and listener movement, the PoseUpdated flag is cleared and prevents 5 ms update rate. */
#define FIX_BASOP_2521_DIRAC_STEREO_STEFFI_NRGS         /* FhG: BASOP issue 2521: Fix wrong porting for determination of first subframe length in ivas_sba_dirac_stereo_compute_td_stefi_nrgs() */

/* ##################### End NON-BE switches ########################### */

+25 −1
Original line number Diff line number Diff line
@@ -1801,6 +1801,10 @@ void ivas_param_mc_dec_prepare_renderer(
            }
        }
        cx_e = max_e;
#ifdef FIX_BASOP_2532_cx_e
        cx_next_band_e = max_e;
        move16();
#endif
        move16();

        /* we have to do it similar to the encoder in case of attacks (i.e. accumulate two bands) to ensure correct DMX of the target covariance*/
@@ -1815,7 +1819,11 @@ void ivas_param_mc_dec_prepare_renderer(
                Scale_sig32( cx_fx, len, -Q1 );           // add one bit head room
                Scale_sig32( cx_next_band_fx, len, -Q1 ); // add one bit head room
                cx_e = add( cx_e, Q1 );
#ifndef FIX_BASOP_2532_cx_e
                cx_next_band_e = add( cx_e, Q1 );
#else
                cx_next_band_e = add( cx_next_band_e, Q1 );
#endif // !FIX_BASOP_2532_cx_e
            }
            v_add_fx( cx_fx, cx_next_band_fx, cx_fx, len );
            Copy32( cx_fx, cx_next_band_fx, len );
@@ -1828,13 +1836,17 @@ void ivas_param_mc_dec_prepare_renderer(
            {
                CONTINUE;
            }

#ifndef FIX_ISSUE_2533_EXTRA_CONDITION
            IF( NE_32( hParamMC->synthesis_conf, PARAM_MC_SYNTH_MONO_STEREO ) )
            {
                IF( is_next_band )
                {

#ifndef FIX_BASOP_2532_cx_e
                    ivas_param_mc_get_mixing_matrices_fx( hParamMC, hSynthesisOutputSetup, cx_next_band_fx, cx_next_band_e, add( param_band_idx, is_next_band ), hParamMC->h_output_synthesis_cov_state.mixing_matrix_fx, hParamMC->h_output_synthesis_cov_state.mixing_matrix_exp, hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_fx, hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_exp, nchan_out_transport, hParamMC->synthesis_conf, nchan_transport, nchan_out_cov );
#else
                    ivas_param_mc_get_mixing_matrices_fx( hParamMC, hSynthesisOutputSetup, cx_next_band_fx, cx_e, add( param_band_idx, is_next_band ), hParamMC->h_output_synthesis_cov_state.mixing_matrix_fx, hParamMC->h_output_synthesis_cov_state.mixing_matrix_exp, hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_fx, hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_exp, nchan_out_transport, hParamMC->synthesis_conf, nchan_transport, nchan_out_cov );
#endif
                }
                ELSE
                {
@@ -1842,6 +1854,18 @@ void ivas_param_mc_dec_prepare_renderer(
                    ivas_param_mc_get_mixing_matrices_fx( hParamMC, hSynthesisOutputSetup, cx_fx, cx_e, add( param_band_idx, is_next_band ), hParamMC->h_output_synthesis_cov_state.mixing_matrix_fx, hParamMC->h_output_synthesis_cov_state.mixing_matrix_exp, hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_fx, hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_exp, nchan_out_transport, hParamMC->synthesis_conf, nchan_transport, nchan_out_cov );
                }
            }
#else
            IF( is_next_band )
            {

                ivas_param_mc_get_mixing_matrices_fx( hParamMC, hSynthesisOutputSetup, cx_next_band_fx, cx_e, add( param_band_idx, is_next_band ), hParamMC->h_output_synthesis_cov_state.mixing_matrix_fx, hParamMC->h_output_synthesis_cov_state.mixing_matrix_exp, hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_fx, hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_exp, nchan_out_transport, hParamMC->synthesis_conf, nchan_transport, nchan_out_cov );
            }
            ELSE
            {

                ivas_param_mc_get_mixing_matrices_fx( hParamMC, hSynthesisOutputSetup, cx_fx, cx_e, add( param_band_idx, is_next_band ), hParamMC->h_output_synthesis_cov_state.mixing_matrix_fx, hParamMC->h_output_synthesis_cov_state.mixing_matrix_exp, hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_fx, hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_exp, nchan_out_transport, hParamMC->synthesis_conf, nchan_transport, nchan_out_cov );
            }
#endif
        }
    }

+4 −0
Original line number Diff line number Diff line
@@ -264,7 +264,11 @@ ivas_error ivas_td_binaural_renderer_sf_fx(
            enableCombinedOrientation = st_ivas->hCombinedOrientationData->enableCombinedOrientation[st_ivas->hCombinedOrientationData->subframe_idx];
            move16();

#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION
            /* Shifting x_fx, y_fx, z_fx to the same Q-factor as Listener_p->Pos_q (usually Q22) */
#else
            /* Shifting x_fx, y_fx, z_fx to the same Q-factor as Listener_p->Pos_q (usually Q25) */
#endif
            Word16 pos_q = st_ivas->hBinRendererTd->Listener_p->Pos_q;
            move16();
            tmp_vector_fx->x_fx = L_shr( tmp_vector_fx->x_fx, sub( tmp_vector_fx->q_fact, pos_q ) );
Loading