Commit 3536cac9 authored by emerit's avatar emerit
Browse files

fix

parent 00790c6b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -337,6 +337,11 @@ typedef enum
#define ADJUST_ISM_BRATE_POS                    8000

#define ISM_AZIMUTH_NBITS                       7
#ifdef FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW   
#define ISM_AZIMUTH_MIN_NON_DIEGETIC_FX         32                          /* 90.0f in ism metadata */
#define ISM_AZIMUTH_ZERO_NON_DIEGETIC_FX        64                          /* 0.0f in ism metadata */
#define ISM_AZIMUTH_MAX_NON_DIEGETIC_FX         96                          /* 90.0f in ism metadata */
#endif
#define ISM_AZIMUTH_MIN_FX                      -754974720                  /* -180.0f in Q22 */
#define ISM_AZIMUTH_MAX_FX                      754974720                   /*  180.0f in Q22 */
#define ISM_AZIMUTH_LOW_BORDER_FX               -587202560                  /* -140.0f in Q22 */
+11 −0
Original line number Diff line number Diff line
@@ -1034,6 +1034,17 @@ static void decode_angle_indices_fx(
    }
    ELSE
    {
#ifdef FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW        
        /* azimuth/yaw is on a circle - check for diff coding for -90 -> 90 and vice versa changes */
        IF( GT_16( idx_angle1, ISM_AZIMUTH_MAX_NON_DIEGETIC_FX ) )
        {
            idx_angle1 = ISM_AZIMUTH_MIN_NON_DIEGETIC_FX;
        }
        ELSE IF( LE_16( idx_angle1, ISM_AZIMUTH_MIN_NON_DIEGETIC_FX ) )
        {
            idx_angle1 = ISM_AZIMUTH_MIN_NON_DIEGETIC_FX;
        }
#endif
        idx_angle2 = angle->last_angle2_idx; /* second MD parameter is not transmitted for non-diegetic object */
        move16();
    }
+1 −1
Original line number Diff line number Diff line
@@ -488,7 +488,7 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams_fx(
        set32_fx( hrf_right, 0, *filterlength );
#ifdef FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW
#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION
        pan = add( extract_h( L_shl( SrcSpatial_p->Pos_p_fx[1], sub( Q21, SrcSpatial_p->q_Pos_p ) ) ), 32 );
        pan = add( extract_h( L_shr( SrcSpatial_p->Pos_p_fx[1], sub( SrcSpatial_p->q_Pos_p , Q21) ) ), 32 );
#else
        pan = add( mult_r( extract_h( SrcSpatial_p->Pos_p_fx[1] ), 2048 ), 32 );
#endif