Commit fb0c295c authored by Rostislav Pehlivanov's avatar Rostislav Pehlivanov

aacenc_tns: temporarily disable coefficient compression

Hotfix to deal with msvc. Sane compilers lack POSIX ffs().
It only saves a single bit or so and isn't worth it that much.
Signed-off-by: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
parent 58cd5386
...@@ -50,11 +50,11 @@ static inline void conv_to_float(float *arr, int32_t *cof, int num) ...@@ -50,11 +50,11 @@ static inline void conv_to_float(float *arr, int32_t *cof, int num)
static inline int coef_test_compression(int coef) static inline int coef_test_compression(int coef)
{ {
int res = 0; int res = 0;
coef = coef >> 3; /*coef = coef >> 3;
res += ffs(coef); res += ffs(coef);
coef = coef >> 1; coef = coef >> 1;
res += ffs(coef); res += ffs(coef);*/
return res == 1 ? 0 : 1; return 0;
} }
static inline int compress_coef(int *coefs, int num) static inline int compress_coef(int *coefs, int num)
...@@ -62,7 +62,7 @@ static inline int compress_coef(int *coefs, int num) ...@@ -62,7 +62,7 @@ static inline int compress_coef(int *coefs, int num)
int i, res = 0; int i, res = 0;
for (i = 0; i < num; i++) for (i = 0; i < num; i++)
res += coef_test_compression(coefs[i]); res += coef_test_compression(coefs[i]);
return res != num ? 0 : 1; return 0;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment