Message ID | 20200617214507.44381-2-summertriangle.dev@gmail.com |
---|---|
State | Accepted |
Commit | 9a24610bf78cc1351d4e9d38e3ac0d631037f5aa |
Headers | show |
Series | [FFmpeg-devel,1/2] avcodec/hcadec: fix decoding of hfr channels | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
Set LGTM On 6/17/20, t <summertriangle.dev@gmail.com> wrote: > 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> > --- > libavcodec/hcadec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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]; > -- > 2.25.0 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
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];
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> --- libavcodec/hcadec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)