diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-03-15 22:26:26 +0100 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2025-03-28 14:33:08 -0300 |
commit | 0ccf385e130377e3796c6abc82d51a913296ebc4 (patch) | |
tree | 1fd8b8c89930857ebe7bb2fca7360754525c0843 /libavutil/float_scalarproduct.c | |
parent | c389d9ac788a529331722f6b3f13c5894114a28c (diff) | |
download | ffmpeg-0ccf385e130377e3796c6abc82d51a913296ebc4.tar.gz |
avutil/float_dsp: Unavpriv avpriv_scalarproduct_float_c()
Not worth the overhead of exporting it.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavutil/float_scalarproduct.c')
-rw-r--r-- | libavutil/float_scalarproduct.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libavutil/float_scalarproduct.c b/libavutil/float_scalarproduct.c new file mode 100644 index 0000000000..e95e67fde1 --- /dev/null +++ b/libavutil/float_scalarproduct.c @@ -0,0 +1,32 @@ +/* + * Copyright 2005 Balatoni Denes + * Copyright 2006 Loren Merritt + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "float_dsp.h" + +float ff_scalarproduct_float_c(const float *v1, const float *v2, int len) +{ + float p = 0.0; + + for (int i = 0; i < len; i++) + p += v1[i] * v2[i]; + + return p; +} |