aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsummertriangle.dev@gmail.com <summertriangle.dev@gmail.com>2020-06-17 14:45:07 -0700
committerPaul B Mahol <onemda@gmail.com>2020-06-21 11:13:29 +0200
commit9a24610bf78cc1351d4e9d38e3ac0d631037f5aa (patch)
treecefd0dc59a7b20957fcc78b653fd62e213931327
parentbc2dcae897da64349d690b9e2f951a63b97309fd (diff)
downloadffmpeg-9a24610bf78cc1351d4e9d38e3ac0d631037f5aa.tar.gz
avcodec/hcadec: get intensity from correct channel
Fixes an issue with one output channel being slightly louder than the other. The output now matches other public HCA decoders. Signed-off-by: t <summertriangle.dev@gmail.com>
-rw-r--r--libavcodec/hcadec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hcadec.c b/libavcodec/hcadec.c
index a890e75a13..28e7d07cec 100644
--- a/libavcodec/hcadec.c
+++ b/libavcodec/hcadec.c
@@ -263,7 +263,7 @@ static void apply_intensity_stereo(HCAContext *s, ChannelContext *ch1, ChannelCo
int index, unsigned band_count, unsigned base_band_count,
unsigned stereo_band_count)
{
- float ratio_l = intensity_ratio_table[ch1->intensity[index]];
+ float ratio_l = intensity_ratio_table[ch2->intensity[index]];
float ratio_r = ratio_l - 2.0f;
float *c1 = &ch1->imdct_in[base_band_count];
float *c2 = &ch2->imdct_in[base_band_count];