aboutsummaryrefslogtreecommitdiff
path: root/libavcodec/ac3dsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/ac3dsp.c')
-rw-r--r--libavcodec/ac3dsp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/ac3dsp.c b/libavcodec/ac3dsp.c
index 9902f905f0..23abc5685e 100644
--- a/libavcodec/ac3dsp.c
+++ b/libavcodec/ac3dsp.c
@@ -213,7 +213,7 @@ static void ac3_sum_square_butterfly_float_c(float sum[4],
}
}
-static void ac3_downmix_c(float **samples, float (*matrix)[2],
+static void ac3_downmix_c(float **samples, float **matrix,
int out_ch, int in_ch, int len)
{
int i, j;
@@ -222,8 +222,8 @@ static void ac3_downmix_c(float **samples, float (*matrix)[2],
for (i = 0; i < len; i++) {
v0 = v1 = 0.0f;
for (j = 0; j < in_ch; j++) {
- v0 += samples[j][i] * matrix[j][0];
- v1 += samples[j][i] * matrix[j][1];
+ v0 += samples[j][i] * matrix[0][j];
+ v1 += samples[j][i] * matrix[1][j];
}
samples[0][i] = v0;
samples[1][i] = v1;
@@ -232,13 +232,13 @@ static void ac3_downmix_c(float **samples, float (*matrix)[2],
for (i = 0; i < len; i++) {
v0 = 0.0f;
for (j = 0; j < in_ch; j++)
- v0 += samples[j][i] * matrix[j][0];
+ v0 += samples[j][i] * matrix[0][j];
samples[0][i] = v0;
}
}
}
-static void ac3_downmix_c_fixed(int32_t **samples, int16_t (*matrix)[2],
+static void ac3_downmix_c_fixed(int32_t **samples, int16_t **matrix,
int out_ch, int in_ch, int len)
{
int i, j;
@@ -247,8 +247,8 @@ static void ac3_downmix_c_fixed(int32_t **samples, int16_t (*matrix)[2],
for (i = 0; i < len; i++) {
v0 = v1 = 0;
for (j = 0; j < in_ch; j++) {
- v0 += (int64_t)samples[j][i] * matrix[j][0];
- v1 += (int64_t)samples[j][i] * matrix[j][1];
+ v0 += (int64_t)samples[j][i] * matrix[0][j];
+ v1 += (int64_t)samples[j][i] * matrix[1][j];
}
samples[0][i] = (v0+2048)>>12;
samples[1][i] = (v1+2048)>>12;
@@ -257,7 +257,7 @@ static void ac3_downmix_c_fixed(int32_t **samples, int16_t (*matrix)[2],
for (i = 0; i < len; i++) {
v0 = 0;
for (j = 0; j < in_ch; j++)
- v0 += (int64_t)samples[j][i] * matrix[j][0];
+ v0 += (int64_t)samples[j][i] * matrix[0][j];
samples[0][i] = (v0+2048)>>12;
}
}