[FFmpeg-devel] [PATCH 1/2] avcodec/aactab: do not use floats for constants

Marton Balint cus at passwd.hu
Sun Mar 6 12:18:48 CET 2016


This may improve precision for some compilers and architectures.

Signed-off-by: Marton Balint <cus at passwd.hu>
---
 libavcodec/aactab.h | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/libavcodec/aactab.h b/libavcodec/aactab.h
index b48e7da..a0d44a2 100644
--- a/libavcodec/aactab.h
+++ b/libavcodec/aactab.h
@@ -92,8 +92,8 @@ static inline void ff_aac_tableinit(void)
  * Table of the LTP coefficients
  */
 static const INTFLOAT ltp_coef[8] = {
-    Q30(0.570829f), Q30(0.696616f), Q30(0.813004f), Q30(0.911304f),
-    Q30(0.984900f), Q30(1.067894f), Q30(1.194601f), Q30(1.369533f),
+    Q30(0.570829), Q30(0.696616), Q30(0.813004), Q30(0.911304),
+    Q30(0.984900), Q30(1.067894), Q30(1.194601), Q30(1.369533),
 };
 
 /* @name tns_tmp2_map
@@ -103,24 +103,24 @@ static const INTFLOAT ltp_coef[8] = {
  * @{
  */
 static const INTFLOAT tns_tmp2_map_1_3[4] = {
-    Q31(0.00000000f), Q31(-0.43388373f),  Q31(0.64278758f),  Q31(0.34202015f),
+    Q31(0.00000000), Q31(-0.43388373),  Q31(0.64278758),  Q31(0.34202015),
 };
 
 static const INTFLOAT tns_tmp2_map_0_3[8] = {
-    Q31(0.00000000f), Q31(-0.43388373f), Q31(-0.78183150f), Q31(-0.97492790f),
-    Q31(0.98480773f), Q31( 0.86602539f), Q31( 0.64278758f), Q31( 0.34202015f),
+    Q31(0.00000000), Q31(-0.43388373), Q31(-0.78183150), Q31(-0.97492790),
+    Q31(0.98480773), Q31( 0.86602539), Q31( 0.64278758), Q31( 0.34202015),
 };
 
 static const INTFLOAT tns_tmp2_map_1_4[8] = {
-    Q31(0.00000000f), Q31(-0.20791170f), Q31(-0.40673664f), Q31(-0.58778524f),
-    Q31(0.67369562f), Q31( 0.52643216f), Q31( 0.36124167f), Q31( 0.18374951f),
+    Q31(0.00000000), Q31(-0.20791170), Q31(-0.40673664), Q31(-0.58778524),
+    Q31(0.67369562), Q31( 0.52643216), Q31( 0.36124167), Q31( 0.18374951),
 };
 
 static const INTFLOAT tns_tmp2_map_0_4[16] = {
-    Q31( 0.00000000f), Q31(-0.20791170f), Q31(-0.40673664f), Q31(-0.58778524f),
-    Q31(-0.74314481f), Q31(-0.86602539f), Q31(-0.95105654f), Q31(-0.99452192f),
-    Q31( 0.99573416f), Q31( 0.96182561f), Q31( 0.89516330f), Q31( 0.79801720f),
-    Q31( 0.67369562f), Q31( 0.52643216f), Q31( 0.36124167f), Q31( 0.18374951f),
+    Q31( 0.00000000), Q31(-0.20791170), Q31(-0.40673664), Q31(-0.58778524),
+    Q31(-0.74314481), Q31(-0.86602539), Q31(-0.95105654), Q31(-0.99452192),
+    Q31( 0.99573416), Q31( 0.96182561), Q31( 0.89516330), Q31( 0.79801720),
+    Q31( 0.67369562), Q31( 0.52643216), Q31( 0.36124167), Q31( 0.18374951),
 };
 
 static const INTFLOAT * const tns_tmp2_map[4] = {
-- 
2.6.2



More information about the ffmpeg-devel mailing list