Commit 7547df03 authored by Jan Kiene's avatar Jan Kiene
Browse files

Accept FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW

parent 09edd649
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -3169,11 +3169,7 @@ static void IsmPositionProvider_getNextFrame(
        }


#ifdef FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW
        /* Wrap azimuth to lie within (0, 360] range */
#else
        /* Wrap azimuth to lie within (-180, 180] range */
#endif

        while ( LT_32( objectMetadataBuffer->positions[objIdx].azimuth_fx, 0 ) )
        {
@@ -3184,13 +3180,11 @@ static void IsmPositionProvider_getNextFrame(
            objectMetadataBuffer->positions[objIdx].azimuth_fx = L_sub( objectMetadataBuffer->positions[objIdx].azimuth_fx, DEG_360_IN_Q22 );
        }

#ifdef FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW
        IF( objectMetadataBuffer->positions[objIdx].non_diegetic_flag && objectMetadataBuffer->positions[objIdx].azimuth_fx >= DEG_180_IN_Q22 )
        {
            /* Wrap azimuth to lie within [-180, 180) range for non-diegetic panning */
            objectMetadataBuffer->positions[objIdx].azimuth_fx = L_sub( objectMetadataBuffer->positions[objIdx].azimuth_fx, DEG_360_IN_Q22 );
        }
#endif

        /* Clamp elevation to lie within [-90, 90] range (can't be wrapped easily) */
        objectMetadataBuffer->positions[objIdx].elevation_fx = L_min( L_max( objectMetadataBuffer->positions[objIdx].elevation_fx, -DEG_90_IN_Q22 ), DEG_90_IN_Q22 );
+0 −2
Original line number Diff line number Diff line
@@ -1951,9 +1951,7 @@ typedef enum
#define ONE_IN_Q31                              0x7fffffff
#define ONE_IN_Q45                              (Word64)0x200000000000
#define ONE_IN_Q62                              (Word64)0x4000000000000000
#ifdef FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW
#define MINUS_ONE_IN_Q31                        ( -2147483647 - 1 ) /* same as (Word32)0x80000000 */
#endif

#define MAX_WORD16                              32767

+0 −1
Original line number Diff line number Diff line
@@ -99,7 +99,6 @@
/* any switch which is non-be wrt. TS 26.251 V3.0 */

#define FIX_1576_LCLD_CRASH_DIFFERENT_CODEC_ISAR_FRAME_SIZE  /* Dolby: float issue 1576: fix for crash in LCLD mode when codec frame size is less than isar frame size */
#define FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW     /* Orange: float issue 1548: Harmonize non diegetic panning law in ISM and renderers */
#define FIX_1452_DEFAULT_REVERB                         /* Nokia/Philips/FhG: Fix default room presets and their usage in renderer */
#define NONBE_FIX_ISSUE_2206_MDCT_STEREO_FIX_2549       /* FhG: Correct scale inconsistency of old_inp_16k_fx buffer scale. */
#define FIX_BASOP_2548_ProcessIGF_fx_PREDICTIONGAIN     /* FhG: fixes obvious bug for IVAS path. For EVS path, issue is still not resolved */
+0 −3
Original line number Diff line number Diff line
@@ -49,9 +49,6 @@
#define SVD_ZERO_FLUSH_THRESHOLD_FX ( 0 )
#define CONVERGENCE_FACTOR_FX       214748 /* factor for SVD convergence (as per latest float code: 1.0e-04f) */

#ifndef FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW
#define MINUS_ONE_IN_Q31 ( -2147483647 - 1 )
#endif

/*-----------------------------------------------------------------------*
 * Local function prototypes
+0 −11
Original line number Diff line number Diff line
@@ -36,9 +36,7 @@
#include "ivas_prot_rend_fx.h"
#include "wmc_auto.h"
#include "ivas_prot_fx.h"
#ifdef FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW
#include "rom_com.h"
#endif

/*---------------------------------------------------------------------*
 * Local function prototypes
@@ -327,9 +325,7 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams_fx(
    Word32 azim_delta;
    Word32 elev_delta;
    Word16 ListRelPos_e, ListRelDist_e;
#ifdef FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW
    Word16 pan;
#endif
    Word32 wrapped_angle;
    Word16 pos_q;
    Word32 Src_p_tmp[3];
@@ -474,7 +470,6 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams_fx(
        move32();
        set32_fx( hrf_left, 0, *filterlength );
        set32_fx( hrf_right, 0, *filterlength );
#ifdef FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW
        IF( LT_32( L_add( ONE_IN_Q25, SrcSpatial_p->Pos_p_fx[1] ), 0 ) )
        {
            wrapped_angle = L_negate( L_add( ONE_IN_Q26, SrcSpatial_p->Pos_p_fx[1] ) );
@@ -491,12 +486,6 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams_fx(
        pan = add( extract_h( L_shr( wrapped_angle, sub( SrcSpatial_p->q_Pos_p, Q21 ) ) ), 32 );
        hrf_left[0] = L_shl_r( cos_table_129[64 - pan], 10 );
        hrf_right[0] = L_shl_r( cos_table_129[pan], 10 );
#else
        hrf_left[0] = L_shr( L_add( L_shl( SrcSpatial_p->Pos_p_fx[1], sub( Q25, SrcSpatial_p->q_Pos_p ) ), ONE_IN_Q25 ), 1 ); // Q25
        move32();
        hrf_right[0] = L_sub( ONE_IN_Q25, hrf_left[0] ); // Q25
        move32();
#endif

        hrf_left_e = 6;
        move16();
Loading