Signed-off-by: Mans Rullgard <[email protected]>
---
This might be merged into the other patch touching this function I
sent earlier today.
---
libavcodec/mpegaudiodec.c | 26 ++++++++++++--------------
1 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 0f2b7d3..dca53e2 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -1336,25 +1336,25 @@ static void compute_stereo(MPADecodeContext *s,
}
#if CONFIG_FLOAT
-#define AA(j) do { \
- float tmp0 = ptr[-1-j]; \
- float tmp1 = ptr[ j]; \
- ptr[-1-j] = tmp0 * csa[0+4*j] - tmp1 * csa[1+4*j]; \
- ptr[ j] = tmp0 * csa[1+4*j] + tmp1 * csa[0+4*j]; \
+#define AA(j) do { \
+ float tmp0 = ptr[-1-j]; \
+ float tmp1 = ptr[ j]; \
+ ptr[-1-j] = tmp0 * csa_table[j][0] - tmp1 * csa_table[j][1]; \
+ ptr[ j] = tmp0 * csa_table[j][1] + tmp1 * csa_table[j][0]; \
} while (0)
#else
-#define AA(j) do { \
- int tmp0 = ptr[-1-j]; \
- int tmp1 = ptr[ j]; \
- int tmp2 = MULH(tmp0 + tmp1, csa[0+4*j]); \
- ptr[-1-j] = 4*(tmp2 - MULH(tmp1, csa[2+4*j])); \
- ptr[ j] = 4*(tmp2 + MULH(tmp0, csa[3+4*j])); \
+#define AA(j) do { \
+ int tmp0 = ptr[-1-j]; \
+ int tmp1 = ptr[ j]; \
+ int tmp2 = MULH(tmp0 + tmp1, csa_table[j][0]); \
+ ptr[-1-j] = 4*(tmp2 - MULH(tmp1, csa_table[j][2])); \
+ ptr[ j] = 4*(tmp2 + MULH(tmp0, csa_table[j][3])); \
} while (0)
#endif
static void compute_antialias(MPADecodeContext *s, GranuleDef *g)
{
- INTFLOAT *ptr, *csa;
+ INTFLOAT *ptr;
int n, i;
/* we antialias only "long" bands */
@@ -1369,8 +1369,6 @@ static void compute_antialias(MPADecodeContext *s,
GranuleDef *g)
ptr = g->sb_hybrid + 18;
for(i = n;i > 0;i--) {
- csa = &csa_table[0][0];
-
AA(0);
AA(1);
AA(2);
--
1.7.4.5
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel