Commit 8ac83416 authored by emerit's avatar emerit Committed by Jan Kiene
Browse files

fix issue 1229

parent 81e0d4f0
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -101,5 +101,6 @@
#define FIX_1109_OPTIM_MCT_STEREO_IGF_DEC       /* FhG: optimize mctStereoIGF_dec_fx() */
#define FIX_1110_OPTIM_DIRAC_DECORR_PROC        /* FhG: optimize ivas_dirac_dec_decorr_process() */
#define FIX_1100_REMOVE_LPC_RESCALING           /* VA: Remove the rescaling of LPC coefficient to Q12 as residu and syn-filt are already taking care of it*/
#define FIX_ISSUE_1229                          /* Orange : FIX_ISSUE_1209: Fx Decoder output differs between HRTF from ROM and from file */

#endif
+20 −0
Original line number Diff line number Diff line
@@ -37,6 +37,10 @@
#include "prot_fx.h"
#include "ivas_prot.h"
#include "ivas_prot_fx.h"
#ifdef FIX_ISSUE_1229
#include <math.h>
#endif


/*---------------------------------------------------------------------*
 * Local structures
@@ -958,7 +962,11 @@ static ivas_error create_HRTF_from_rawdata(
                    float *tmp, temp_buf[1];
                    tmp = temp_buf;
                    memcpy( tmp, hrtf_data_rptr, sizeof( float ) );
#ifdef FIX_ISSUE_1229
                    pOut_to_bin_wptr_fx[l] = (Word32) roundf( *tmp * ONE_IN_Q29 );
#else
                    pOut_to_bin_wptr_fx[l] = (Word32) ( *tmp * ONE_IN_Q29 );
#endif
                    hrtf_data_rptr += sizeof( float );
                }
                // hrtf_data_rptr += mem_size;
@@ -990,7 +998,11 @@ static ivas_error create_HRTF_from_rawdata(
                    float *tmp, temp_buf[1];
                    tmp = temp_buf;
                    memcpy( tmp, hrtf_data_rptr, sizeof( float ) );
#ifdef FIX_ISSUE_1229
                    pOut_to_bin_wptr_fx[l] = (Word32) roundf( *tmp * ONE_IN_Q29 );
#else
                    pOut_to_bin_wptr_fx[l] = (Word32) ( *tmp * ONE_IN_Q29 );
#endif
                    hrtf_data_rptr += sizeof( float );
                }
                // hrtf_data_rptr += mem_size;
@@ -1027,7 +1039,11 @@ static ivas_error create_HRTF_from_rawdata(
                    float *tmp, temp_buf[1];
                    tmp = temp_buf;
                    memcpy( tmp, hrtf_data_rptr, sizeof( float ) );
#ifdef FIX_ISSUE_1229
                    pOut_to_bin_wptr_fx[l] = (Word32) roundf( *tmp * ONE_IN_Q31 );
#else
                    pOut_to_bin_wptr_fx[l] = (Word32) ( *tmp * ONE_IN_Q29 );
#endif
                    hrtf_data_rptr += sizeof( float );
                }
                // hrtf_data_rptr += mem_size;
@@ -1057,7 +1073,11 @@ static ivas_error create_HRTF_from_rawdata(
                    float *tmp, temp_buf[1];
                    tmp = temp_buf;
                    memcpy( tmp, hrtf_data_rptr, sizeof( float ) );
#ifdef FIX_ISSUE_1229
                    pOut_to_bin_wptr_fx[l] = (Word32) roundf( *tmp * ONE_IN_Q31 );
#else
                    pOut_to_bin_wptr_fx[l] = (Word32) ( *tmp * ONE_IN_Q29 );
#endif
                    hrtf_data_rptr += sizeof( float );
                }
                // hrtf_data_rptr += mem_size;