[MPlayer-dev-eng] [PATCH] More accurate af_volume
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Feb 20 21:41:21 CET 2005
Hi,
On Sun, Feb 20, 2005 at 09:21:34PM +0100, Reimar Döffinger wrote:
> On Sun, Feb 20, 2005 at 01:55:16PM -0600, Zoltan Hidvegi wrote:
> > Reimar Döffinger wrote:
> > > Next, I don't understand why you need to clamp before scaling?
> >
> > If you don't, the multiply will overflow on 32-bit.
>
> As I understand the code, vol will be 65536 at most. As you assume that
> int is at least 32 bits and the input is 16 bits I don't think it can overflow??
Um, sorry, now I see where I thought wrong... Will have to check, but I
guess the old code could overflow, too?
I must say, I'm not too happy about the additional (also complexity)
xmax and xmin calculations... Can't think of anything much better for
the moment.
Btw. would be nice to know why you would like this additionaly
precision...
Greetings,
Reimar Döffinger
More information about the MPlayer-dev-eng
mailing list