On Fri, May 3, 2013 at 7:32 AM, Nicolas George <
[email protected]> wrote:

> > +    float lowlambda = av_clip(120.f / lambda, 0.25f, 1.f);
> > +    float rlambda = av_clip(120.f / lambda, 0.3f, 2.f);
> > +    const int minq = av_clip(2 * log2f(120.f / lambda) + 150, 100, 218
> - SCALE_MAX_DIFF);
> > +    const int maxq = minq + SCALE_MAX_DIFF - 1;
>
> Do you have a specific reason to use float instead of double?
>


lambda is a quality scaler, it's clipped to the range 0..65535, so double
would be overkill IMO.
Lambda's also a float everywhere else. Mixing float and double arithmetic
creates unnecessary conversion steps, slowing things down.
Here in particular, I don't think it's critical, but it's good practice to
never mix them up - except, perhaps, on trig functions, where the float
versions are rather imprecise.
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to