[FFmpeg-devel] [PATCH 1/4] avcodec: add siren audio decoder
Moritz Barsnick
barsnick at gmx.net
Tue May 21 17:51:19 EEST 2019
On Thu, May 16, 2019 at 12:51:46 +0200, Lynne wrote:
> > +#define STEPSIZE 0.3010299957
>
> Just hardcode this in the powf call.
With an appended 'f'.
> > + const float scale = 1.0f;
> const float scale = 1.0 / 32768;
1.0f, but it doesn't matter here, as the preprocessor reduces it to
float (alledgedly).
> > + s->deviation_inverse[i] = 1.f / s->standard_deviation[i];
>
> Nit: 1.0 instead of 1.f
No, 1.f or 1.0f. Otherwise, it promotes the division to a double
precision operation before casting back to the left hand side float.
(It only matters on hardware which requires double precision software
emulation, but if explicitly using float, make sure to stick to float.)
Moritz
More information about the ffmpeg-devel
mailing list