Commit 213f62ce authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

add missing defines not ported from ivas_prot.h to ivas_prot_fx.h into isar_prot.h

parent 5bbf4a42
Loading
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -445,6 +445,29 @@ void ivas_calculate_abs_fx( Word32 re_fx, Word16 exp_re, Word32 im_fx, Word16 ex

void ivas_calculate_rabs_fx( Word32 re_fx, Word16 exp_re, Word32 *out_fx, Word16 *exp_out );

#define IVAS_CMULT_FLOAT( in1_re, in1_im, in2_re, in2_im, out1_re, out1_im ) \
    out1_re = ( in1_re * in2_re ) - ( in1_im * in2_im );   \
    out1_im = ( in1_re * in2_im ) + ( in2_re * in1_im ); 

#define IVAS_CALCULATE_ABS( re, im, out ) \
    out = sqrtf( ( re * re ) + ( im * im ) ); 

#define IVAS_CALCULATE_RABS( re, out ) \
    out = sqrtf( re * re );

#define IVAS_CALCULATE_SQ_ABS( re, im, out ) \
    out = (float) ( ( re * re ) + ( im * im ) ); 

#define IVAS_RMULT_DOUBLE( in1_re, in2_re, out1_re ) \
    out1_re = ( in1_re * in2_re );    \

#define IVAS_CALCULATE_SQ_ABS_N( re, out ) \
    out = (float) ( re * re );

#define IVAS_RMULT_FLOAT( in1_re, in2_re, out1_re ) \
    out1_re = ( in1_re * in2_re ); 


/* clang-format on */

#endif /* IVAS_PROT_REND_H */