From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 0334B4A452 for ; Thu, 30 May 2024 19:07:08 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BD63068D355; Thu, 30 May 2024 22:07:05 +0300 (EEST) Received: from ursule.remlab.net (vps-a2bccee9.vps.ovh.net [51.75.19.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 14A6E68D265 for ; Thu, 30 May 2024 22:07:00 +0300 (EEST) Received: from basile.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id A3FA4C013D for ; Thu, 30 May 2024 22:06:59 +0300 (EEST) From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= To: ffmpeg-devel@ffmpeg.org Date: Thu, 30 May 2024 22:06:56 +0300 Message-ID: <20240530190659.65309-2-remi@remlab.net> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240530190659.65309-1-remi@remlab.net> References: <20240530190659.65309-1-remi@remlab.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/5] lavu/lls: use ff_scalarproduct_double_c() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --- libavutil/lls.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/libavutil/lls.c b/libavutil/lls.c index c1e038daf1..1096ae69d5 100644 --- a/libavutil/lls.c +++ b/libavutil/lls.c @@ -30,6 +30,7 @@ #include "config.h" #include "attributes.h" +#include "float_dsp.h" #include "lls.h" static void update_lls(LLSModel *m, const double *var) @@ -102,13 +103,7 @@ void avpriv_solve_lls(LLSModel *m, double threshold, unsigned short min_order) static double evaluate_lls(LLSModel *m, const double *param, int order) { - int i; - double out = 0; - - for (i = 0; i <= order; i++) - out += param[i] * m->coeff[order][i]; - - return out; + return ff_scalarproduct_double_c(m->coeff[order], param, order + 1); } av_cold void avpriv_init_lls(LLSModel *m, int indep_count) -- 2.45.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".