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] [PATCH] ac3dsp: RISC-V V float_to_fixed24
Date: Wed, 22 Nov 2023 13:49:33 -0300
Message-ID: <c4283d87-69f3-45a4-9b1e-1435ce653eaa@gmail.com> (raw)
In-Reply-To: <CAEa-L+vR0hDc6xjLijB-YAkXVk5Vthm0aqEuPzc+MWJ+BDePkw@mail.gmail.com>

On 11/22/2023 1:37 PM, flow gg wrote:
> Thank you for your guidance, I finally understand..  How about choosing
> manual zero-extension for rv64? I modified the patch.
> 
> #if (__riscv_xlen == 64)
>          slli a2, a2, 32
>          srli a2, a2, 32
> #endif

Please, don't top post.

I think it will be better to change the prototype to use ptrdiff_t for 
len, as it's done in other dps functions.

> 
> Rémi Denis-Courmont <remi@remlab.net> 于2023年11月22日周三 22:51写道:
> 
>>
>>
>> Le 22 novembre 2023 16:30:44 GMT+02:00, flow gg <hlefthleft@gmail.com> a
>> écrit :
>>>> How did you test it?
>>>
>>> I wrote a test, but it was a bit rough, so I want to modify it before
>>> submitting. I've added it to this reply.
>>>
>>>> This does not seem according to the C ABI. AFAIK `unsigned` is
>>> sign-extended.
>>>
>>> I'm a bit confused... because this passed in the tests I wrote in qemu.
>>> Maybe there's a problem with my test?
>>
>> You probably didn't test sizes between 2^31 and 2^32-1. This might not
>> even be feasible in QEMU.
>>
>> Ideally the prototype would use size_t, then the problem wouldn't exist.
>>
>>>
>>>> ALU right before dependent conditional branch should be avoided.
>>>
>>> Should the sub be moved forward? I've modified it.
>>>
>>>> SHxADD can be used advantageously.
>>>
>>> Okay, I've made the modification
>>>
>>> Rémi Denis-Courmont <remi@remlab.net> 于2023年11月22日周三 21:41写道:
>>>
>>>> Hi,
>>>>
>>>> How did you test it? As per
>>>> http://ffmpeg.org/pipermail/ffmpeg-devel/2023-June/310720.html we still
>>>> don't have a FATE instance set up with the RISC-V Vector extension. The
>>>> only testing consists of my manual runs of checkasm on a K230 board. (We
>>>> *do* have Zba and Zbb now though, hence the existing
>> extract_exponents()).
>>>>
>>>> Also:
>>>> - This does not seem according to the C ABI. AFAIK `unsigned` is
>>>> sign-extended.
>>>> - ALU right before dependent conditional branch should be avoided.
>>>> - SHxADD can be used advantageously.
>>>>
>>>>
>>>> Le 22 novembre 2023 14:00:07 GMT+02:00, flow gg <hlefthleft@gmail.com>
>> a
>>>> écrit :
>>>>> c910
>>>>>     float_to_fixed24_c: 208.2
>>>>>     float_to_fixed24_rvv_f32: 71.5
>>>> _______________________________________________
>>>> 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".
>>>>
>> _______________________________________________
>> 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".
>>
>>
>> _______________________________________________
>> 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".
_______________________________________________
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:[~2023-11-22 16:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-22 12:00 flow gg
2023-11-22 13:40 ` Rémi Denis-Courmont
2023-11-22 14:30   ` flow gg
2023-11-22 14:35     ` flow gg
2023-11-22 14:51     ` Rémi Denis-Courmont
2023-11-22 16:37       ` flow gg
2023-11-22 16:49         ` James Almer [this message]
2023-11-22 23:17         ` flow gg
2023-11-23 17:08           ` Rémi Denis-Courmont
2023-11-23 22:39             ` flow gg
2023-12-01 18:35               ` Rémi Denis-Courmont
2023-12-01 18:38                 ` Rémi Denis-Courmont
2023-12-01 19:50                   ` flow gg
2023-12-01 20:16                     ` flow gg
2023-11-22 17:18     ` James Almer
2023-11-22 17:34       ` flow gg
2023-11-23  7:11 ` flow gg

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=c4283d87-69f3-45a4-9b1e-1435ce653eaa@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