[FFmpeg-user] Multiply audio samples
gyandoshi at gmail.com
Sat Sep 15 12:10:25 EEST 2018
On Sat, Sep 15, 2018 at 2:14 PM Paul B Mahol <onemda at gmail.com> wrote:
> On 9/15/18, Michael Koch <astroelectronic at t-online.de> wrote:
> > 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
> > My question is how to make this multipliaction or division by 2^15.
> Filter inputs will be auto-converted from any non-float formats to
> float or double one.
And aformat=s16p can be added afterwards to get back to [-2^15..2^15]
More information about the ffmpeg-user