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>
This commit is contained in:
summertriangle.dev@gmail.com 2020-06-17 14:45:07 -07:00 committed by Paul B Mahol
parent bc2dcae897
commit 9a24610bf7
1 changed files with 1 additions and 1 deletions

View File

@ -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];