[FFmpeg-cvslog] aacenc_tns: temporarily disable coefficient compression

Rostislav Pehlivanov git at videolan.org
Fri Aug 21 21:58:18 CEST 2015


ffmpeg | branch: master | Rostislav Pehlivanov <atomnuker at gmail.com> | Fri Aug 21 20:55:46 2015 +0100| [fb0c295cc3d22a2a18de9ade9412527f8a7de0e9] | committer: 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: Rostislav Pehlivanov <atomnuker at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fb0c295cc3d22a2a18de9ade9412527f8a7de0e9
---

 libavcodec/aacenc_tns.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/aacenc_tns.c b/libavcodec/aacenc_tns.c
index 50ac29c..fd20923 100644
--- a/libavcodec/aacenc_tns.c
+++ b/libavcodec/aacenc_tns.c
@@ -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)
 {
     int res = 0;
-    coef = coef >> 3;
+    /*coef = coef >> 3;
     res += ffs(coef);
     coef = coef >> 1;
-    res += ffs(coef);
-    return res == 1 ? 0 : 1;
+    res += ffs(coef);*/
+    return 0;
 }
 
 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;
     for (i = 0; i < num; i++)
         res += coef_test_compression(coefs[i]);
-    return res != num ? 0 : 1;
+    return 0;
 }
 
 /**



More information about the ffmpeg-cvslog mailing list