]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/alpha/simple_idct_alpha.c
aac: Don't attempt to output configure an invalid channel configuration.
[ffmpeg] / libavcodec / alpha / simple_idct_alpha.c
index 45e70dcf2d39b206655754f5b1f1cde96e5d1ec7..61bc5f2084d01099705b213b7b2956da3424c58d 100644 (file)
@@ -9,48 +9,44 @@
  * Alpha optimizations by Måns Rullgård <mans@mansr.com>
  *                     and Falk Hueffner <falk@debian.org>
  *
- * This file is part of FFmpeg.
+ * This file is part of Libav.
  *
- * FFmpeg is free software; you can redistribute it and/or
+ * 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.
  *
- * FFmpeg is distributed in the hope that it will be useful,
+ * 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 FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include "libavcodec/dsputil.h"
+#include "dsputil_alpha.h"
 #include "asm.h"
 
-extern void (*put_pixels_clamped_axp_p)(const DCTELEM *block, uint8_t *pixels,
-                                        int line_size);
-extern void (*add_pixels_clamped_axp_p)(const DCTELEM *block, uint8_t *pixels,
-                                        int line_size);
-
 // cos(i * M_PI / 16) * sqrt(2) * (1 << 14)
 // W4 is actually exactly 16384, but using 16383 works around
 // accumulating rounding errors for some encoders
-#define W1 ((int_fast32_t) 22725)
-#define W2 ((int_fast32_t) 21407)
-#define W3 ((int_fast32_t) 19266)
-#define W4 ((int_fast32_t) 16383)
-#define W5 ((int_fast32_t) 12873)
-#define W6 ((int_fast32_t)  8867)
-#define W7 ((int_fast32_t)  4520)
+#define W1 22725
+#define W2 21407
+#define W3 19266
+#define W4 16383
+#define W5 12873
+#define W6  8867
+#define W7  4520
 #define ROW_SHIFT 11
 #define COL_SHIFT 20
 
 /* 0: all entries 0, 1: only first entry nonzero, 2: otherwise  */
 static inline int idct_row(DCTELEM *row)
 {
-    int_fast32_t a0, a1, a2, a3, b0, b1, b2, b3, t;
+    int a0, a1, a2, a3, b0, b1, b2, b3, t;
     uint64_t l, r, t2;
     l = ldq(row);
     r = ldq(row + 4);
@@ -158,7 +154,7 @@ static inline int idct_row(DCTELEM *row)
 
 static inline void idct_col(DCTELEM *col)
 {
-    int_fast32_t a0, a1, a2, a3, b0, b1, b2, b3;
+    int a0, a1, a2, a3, b0, b1, b2, b3;
 
     col[0] += (1 << (COL_SHIFT - 1)) / W4;
 
@@ -239,7 +235,7 @@ static inline void idct_col2(DCTELEM *col)
     uint64_t l, r;
 
     for (i = 0; i < 8; ++i) {
-        int_fast32_t a0 = col[i] + (1 << (COL_SHIFT - 1)) / W4;
+        int a0 = col[i] + (1 << (COL_SHIFT - 1)) / W4;
 
         a0 *= W4;
         col[i] = a0 >> COL_SHIFT;