diff --git a/lib_com/options.h b/lib_com/options.h index f595af53409a22ca5fd443f75ce70784f90d851c..a66408dd600cf2afccb54b3020f14379141a0eff 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -166,7 +166,7 @@ #define ISM_FB_16k4 /* VA: Issue: 579: change BW from SWB to FB in NxISM conditions to match the EVS codec */ #define FIX_580_PARAMMC_ENER_BURSTS /* FhG: issue 580: energy bursts due to ILD holding when energy relations change too much */ #define FIX_593_STL_INCLUDE /* FhG: Issue 593: correct include of stl.h in lib_enc/ivas_stereo_eclvq_enc.c */ - +#define FIX_583_CLANG_TRANS_DET /* FhG: Issue 583: clang left shift on ramp_up_flag in transient detector */ /* ################## End BE DEVELOPMENT switches ######################### */ diff --git a/lib_enc/stat_enc.h b/lib_enc/stat_enc.h index 4a47761f9c49f7da8551edcaf925993bc6b2b7a0..2e7924f37169ae01820e8ff5d16f13ab85ad4179 100644 --- a/lib_enc/stat_enc.h +++ b/lib_enc/stat_enc.h @@ -124,7 +124,11 @@ typedef struct float firState1; float firState2; +#ifdef FIX_583_CLANG_TRANS_DET + uint16_t ramp_up_flag; /* bit map flags to indicate a ramp up in beginning of TCX frame */ +#else int16_t ramp_up_flag; /* bit map flags to indicate a ramp up in beginning of TCX frame */ +#endif } SubblockEnergies; diff --git a/lib_enc/transient_detection.c b/lib_enc/transient_detection.c index 1f8b36819f22bfa028814c617b723c4f0760a872..3b345b733396d022a2eae591fef15730b7a09238 100644 --- a/lib_enc/transient_detection.c +++ b/lib_enc/transient_detection.c @@ -241,7 +241,11 @@ void RunTransientDetection( UpdateDelayBuffer( filteredInput, length, &hTranDet->delayBuffer ); /* compute ramp up flag */ +#ifdef FIX_583_CLANG_TRANS_DET + pSubblockEnergies->ramp_up_flag = ( ( pSubblockEnergies->ramp_up_flag << 1 ) & 0x0003 ); +#else pSubblockEnergies->ramp_up_flag = pSubblockEnergies->ramp_up_flag << 1; +#endif e0 = dotp( filteredInput + length / 2, filteredInput + length / 2, pSubblockEnergies->pDelayBuffer->nSubblockSize / 2 ) + 0.5f * MIN_BLOCK_ENERGY; e1 = pSubblockEnergies->subblockNrg[pSubblockEnergies->nDelay + 4] - e0; if ( e1 > e0 )