]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mpegaudiotab.h
cngdec: Make the dbov variable have the right unit
[ffmpeg] / libavcodec / mpegaudiotab.h
index ce9416d125063bf0a8d8515dfdd5b8c9309f71ad..45afe9bd161acab546e04a355ba801c2a043e301 100644 (file)
@@ -1,24 +1,49 @@
 /*
  * mpeg audio layer 2 tables. Most of them come from the mpeg audio
  * specification.
- * 
- * Copyright (c) 2000, 2001 Gerard Lantau.
  *
- * The licence of this code is contained in file LICENCE found in the
- * same archive 
+ * Copyright (c) 2000, 2001 Fabrice Bellard
+ *
+ * This file is part of Libav.
+ *
+ * Libav is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * Libav is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Libav; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * mpeg audio layer 2 tables.
+ * Most of them come from the mpeg audio specification.
  */
 
+#ifndef AVCODEC_MPEGAUDIOTAB_H
+#define AVCODEC_MPEGAUDIOTAB_H
+
+#include <stdint.h>
+#include "mpegaudio.h"
+
 #define SQRT2 1.41421356237309514547
 
 static const int costab32[30] = {
     FIX(0.54119610014619701222),
     FIX(1.3065629648763763537),
-    
+
     FIX(0.50979557910415917998),
     FIX(2.5629154477415054814),
     FIX(0.89997622313641556513),
     FIX(0.60134488693504528634),
-    
+
     FIX(0.5024192861881556782),
     FIX(5.1011486186891552563),
     FIX(0.78815462345125020249),
@@ -27,7 +52,7 @@ static const int costab32[30] = {
     FIX(1.0606776859903470633),
     FIX(1.7224470982383341955),
     FIX(0.52249861493968885462),
-    
+
     FIX(10.19000812354803287),
     FIX(0.674808341455005678),
     FIX(1.1694399334328846596),
@@ -54,13 +79,13 @@ static const int bitinv32[32] = {
 };
 
 
-static INT16 filter_bank[512];
+static int16_t filter_bank[512];
 
 static int scale_factor_table[64];
 #ifdef USE_FLOATS
 static float scale_factor_inv_table[64];
 #else
-static INT8 scale_factor_shift[64];
+static int8_t scale_factor_shift[64];
 static unsigned short scale_factor_mult[64];
 #endif
 static unsigned char scale_diff_table[128];
@@ -69,13 +94,13 @@ static unsigned char scale_diff_table[128];
 static unsigned short total_quant_bits[17];
 
 /* signal to noise ratio of each quantification step (could be
-   computed from quant_steps[]). The values are dB multiplied by 10 
+   computed from quant_steps[]). The values are dB multiplied by 10
 */
-static unsigned short quant_snr[17] = { 
+static const unsigned short quant_snr[17] = {
      70, 110, 160, 208,
     253, 316, 378, 439,
-    499, 559, 620, 680, 
-    740, 800, 861, 920, 
+    499, 559, 620, 680,
+    740, 800, 861, 920,
     980
 };
 
@@ -90,3 +115,4 @@ static const float fixed_smr[SBLIMIT] =  {
 
 static const unsigned char nb_scale_factors[4] = { 3, 2, 1, 2 };
 
+#endif /* AVCODEC_MPEGAUDIOTAB_H */