[FFmpeg-devel] [PATCH 1/4] lavu/float_dsp: add double-precision scalar product

Rémi Denis-Courmont remi at remlab.net
Wed May 29 18:51:59 EEST 2024


Le keskiviikkona 29. toukokuuta 2024, 18.44.13 EEST Andreas Rheinhardt a écrit 
:
> > +static double ff_scalarproduct_double_c(const double *v1,

> Don't use an ff_ prefix for a static function.

I can see over 300 such identifiers in the code base (many but not all inline), 
and I don't see why that would be a problem.

> > +
> > +    /**
> > +     * Calculate the scalar product of two vectors of doubles.
> > +     *
> > +     * @param v1  first vector
> > +     * @param v2  second vector
> 
> Are these supposed to obey additional alignment beyond that imposed by
> double?

The C and RISC-V implementations require the natural alignment of double, 64-
bit. If somebody wants to increase the required alignment(s), they are free to 
audit the call sites and update the comments accordingly, since this won't be 
an ABI break.

> (Does your RISC-V implementation require it?)

-- 
Rémi Denis-Courmont
http://www.remlab.net/





More information about the ffmpeg-devel mailing list