[FFmpeg-user] Multiply audio samples

Michael Koch astroelectronic at t-online.de
Sat Sep 15 11:05:08 EEST 2018

Am 15.09.2018 um 09:33 schrieb Gyan:
> On Sat, Sep 15, 2018 at 12:13 PM Michael Koch <astroelectronic at t-online.de>
> wrote:
>> Which other filter can I use to convert the input to -1..+1 interval,
>> and convert the output back to 16bit or 24bit interval? I saw that the
>> multiply filter in sox has these normalizations already included.
> The aformat filter will allow you to convert between integer and floating
> point formats.

That's not what I mean.
Let's assume I want to multiply two 16-bit audio samples. The interval 
is [-2^15 ... +2^15].
After multiplication  the interval would be [-2^30 ... +2^30], which is 
not a usable interval for audio samples.
That means I must either divide the result by 2^15, or I must convert 
the inputs to the [-1 ... +1] interval before multiplication, so that 
the result is also in the [-1 ... +1] interval, and then multiply by 2^15.
My question is how to make this multipliaction or division by 2^15.


More information about the ffmpeg-user mailing list