[FFmpeg-devel] [PATCH V2 1/2] avcodec/vorbisenc: Add pre-echo detection

Moritz Barsnick barsnick at gmx.net
Wed Jul 26 15:19:34 EEST 2017


On Wed, Jul 26, 2017 at 00:51:31 +0100, Rostislav Pehlivanov wrote:
> > +    float last_var;
> > +    const float eps = 1e-4;
> 
> Use normal notation for floats and add an f at the end to inform the
> compiler the constant is a float.

Since I've been nitpicking float/double promotion issues recently: In
this case, the compiler already knows. ;-) The number will be casted
down automatically at build time, not run time. In calculations, on the
other hand, a missing ".f" will often imply a double precision
operation.

(I haven't nitpicked this style for consts, there are lots of const
float arrays without ".f" notation in recent patches. But I like
attention to style. :-))

0.02,
Moritz


More information about the ffmpeg-devel mailing list