Skip to content

Commit

Permalink
fp_sqrt() is only FIXED_POINT
Browse files Browse the repository at this point in the history
  • Loading branch information
schreibfaul1 committed Sep 13, 2024
1 parent 848d390 commit c308d9f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/aac_decoder/libfaad/fixed.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,12 @@ typedef float real_t;
#define COEF_CONST(A) ((real_t)(A))
#define Q2_CONST(A) ((real_t)(A))
#define FRAC_CONST(A) ((real_t)(A)) /* pure fractional part */
/* Complex multiplication */
static void ComplexMult(real_t* y1, real_t* y2, real_t x1, real_t x2, real_t c1, real_t c2) {
*y1 = MUL_F(x1, c1) + MUL_F(x2, c2);
*y2 = MUL_F(x2, c1) - MUL_F(x1, c2);
}
/* Complex multiplication */
static void ComplexMult(real_t* y1, real_t* y2, real_t x1, real_t x2, real_t c1, real_t c2) {
*y1 = MUL_F(x1, c1) + MUL_F(x2, c2);
*y2 = MUL_F(x2, c1) - MUL_F(x1, c2);
}

#endif /* USE_DOUBLE_PRECISION */
#endif // FIXED_POINT

Expand Down
2 changes: 2 additions & 0 deletions src/aac_decoder/libfaad/neaacdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -3805,6 +3805,7 @@ void is_decode(ic_stream* ics, ic_stream* icsr, real_t* l_spec, real_t* r_spec,
}
}
//——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
#ifdef FIXED_POINT
real_t fp_sqrt(real_t value) {
real_t root = 0;
step(0);
Expand All @@ -3827,6 +3828,7 @@ real_t fp_sqrt(real_t value) {
root <<= (REAL_BITS / 2);
return root;
}
#endif /*FIXED_POINT*/
//——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
mdct_info* faad_mdct_init(uint16_t N) {
mdct_info* mdct = (mdct_info*)faad_malloc(sizeof(mdct_info));
Expand Down

0 comments on commit c308d9f

Please sign in to comment.