Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCHv2 1/5] lavu/float_dsp: add double-precision scalar product
Date: Thu, 30 May 2024 16:33:17 -0300
Message-ID: <8870845f-74c2-4f67-b7b6-a989120b9d17@gmail.com> (raw)
In-Reply-To: <3678258.JuP5TrKuHb@basile.remlab.net>

On 5/30/2024 4:31 PM, Rémi Denis-Courmont wrote:
> 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.

I already did, I'm just waiting for this set to be pushed before sending it.
_______________________________________________
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".

      reply	other threads:[~2024-05-30 19:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-30 19:06 Rémi Denis-Courmont
2024-05-30 19:06 ` [FFmpeg-devel] [PATCH 2/5] lavu/lls: use ff_scalarproduct_double_c() Rémi Denis-Courmont
2024-05-30 19:06 ` [FFmpeg-devel] [PATCH 3/5] lavfi: get rid of bespoke double scalar products Rémi Denis-Courmont
2024-05-30 19:06 ` [FFmpeg-devel] [PATCH 4/5] checkasm/float_dsp: add double-precision scalar product Rémi Denis-Courmont
2024-05-30 19:06 ` [FFmpeg-devel] [PATCH 5/5] lavu/float_dsp: R-V V scalarproduct_double Rémi Denis-Courmont
2024-05-30 19:10 ` [FFmpeg-devel] [PATCHv2 1/5] lavu/float_dsp: add double-precision scalar product James Almer
2024-05-30 19:21   ` Rémi Denis-Courmont
2024-05-30 19:28     ` James Almer
2024-05-30 19:31 ` Rémi Denis-Courmont
2024-05-30 19:33   ` James Almer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8870845f-74c2-4f67-b7b6-a989120b9d17@gmail.com \
    --to=jamrial@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git