Thanks for merging the fix! You’re right—only changing L_shl() is enough to
resolve the issue. I initially updated both for consistency, but L_shr()
doesn’t actually contribute to the problem.
On Wed, Feb 12, 2025 at 8:27 PM Martin Storsjö <ma...@ma...> wrote:
> Hi,
>
> On Wed, 5 Feb 2025, Alper Coskun wrote:
>
> > We have identified and resolved an audio distortion issue affecting
> speech
> > prompts in the AMR-WB encoder. The problem originated in hp50.c
> (HP50_12k8
> > function), where improper bit shifting and signal scaling resulted in
> > high-frequency artifacts above 4 kHz that do not exist in the original
> > signal.
> >
> > A patch has been created with the following fixes:
> >
> > • Replaced >> and << with L_shr() and L_shl() to ensure consistent
> > bit-shifting behavior.
>
> Thanks for your contribution, I've merged the fix!
>
> (Technically speaking, I guess it would have been enough to change only
> the cases with L_shl(), as L_shr() can't really overflow, or am I missing
> anything?)
>
> // Martin
>
|