Le torstaina 30. toukokuuta 2024, 22.06.55 EEST Rémi Denis-Courmont a écrit : > The function pointer is appended to the structure for backward binary > compatibility. Fortunately, this is allocated by libavutil, not by the > user, so increasing the structure size is safe. > --- > libavutil/float_dsp.c | 12 ++++++++++++ > libavutil/float_dsp.h | 31 ++++++++++++++++++++++++++++++- > 2 files changed, 42 insertions(+), 1 deletion(-) > > diff --git a/libavutil/float_dsp.c b/libavutil/float_dsp.c > index e9fb023466..08bbc85e3e 100644 > --- a/libavutil/float_dsp.c > +++ b/libavutil/float_dsp.c > @@ -132,6 +132,17 @@ float avpriv_scalarproduct_float_c(const float *v1, > const float *v2, int len) return p; > } > > +double ff_scalarproduct_double_c(const double *v1, const double *v2, > + size_t len) > +{ > + double p = 0.0; > + > + for (size_t i = 0; i < len; i++) > + p += v1[i] * v2[i]; > + > + return p; > +} > +
If somebody wants to write x86 assembly, they can probably borrow most of the code for evaluate_lls. It is a double precision scalar product with a little bit of extra fluff in the prologue. -- レミ・デニ-クールモン http://www.remlab.net/ _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".