aboutsummaryrefslogtreecommitdiff
path: root/libavcodec/ac3dec_fixed.c
diff options
context:
space:
mode:
authorClément Bœsch2017-03-22 11:11:28 +0100
committerClément Bœsch2017-03-22 11:29:46 +0100
commite39d4ff150f45d82aabafa5a34f5c9ec7a829d15 (patch)
tree907c884f1148517e9cd97bf647bde28825d217ea /libavcodec/ac3dec_fixed.c
parent8ddadf56f621ddaeaa877e5739c03645ee7e57f8 (diff)
parent43717469f9daa402f6acb48997255827a56034e9 (diff)
Merge commit '43717469f9daa402f6acb48997255827a56034e9'
* commit '43717469f9daa402f6acb48997255827a56034e9': ac3dsp: Reverse matrix in/out order in downmix() Merged-by: Clément Bœsch <u@pkh.me>
Diffstat (limited to 'libavcodec/ac3dec_fixed.c')
-rw-r--r--libavcodec/ac3dec_fixed.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/ac3dec_fixed.c b/libavcodec/ac3dec_fixed.c
index 1f79adee34..682fe935b0 100644
--- a/libavcodec/ac3dec_fixed.c
+++ b/libavcodec/ac3dec_fixed.c
@@ -139,7 +139,7 @@ static void scale_coefs (
* Downmix samples from original signal to stereo or mono (this is for 16-bit samples
* and fixed point decoder - original (for 32-bit samples) is in ac3dsp.c).
*/
-static void ac3_downmix_c_fixed16(int16_t **samples, int16_t (*matrix)[2],
+static void ac3_downmix_c_fixed16(int16_t **samples, int16_t **matrix,
int out_ch, int in_ch, int len)
{
int i, j;
@@ -148,8 +148,8 @@ static void ac3_downmix_c_fixed16(int16_t **samples, int16_t (*matrix)[2],
for (i = 0; i < len; i++) {
v0 = v1 = 0;
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+2048)>>12;
samples[1][i] = (v1+2048)>>12;
@@ -158,7 +158,7 @@ static void ac3_downmix_c_fixed16(int16_t **samples, int16_t (*matrix)[2],
for (i = 0; i < len; i++) {
v0 = 0;
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+2048)>>12;
}
}