From: flow gg <hlefthleft@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] Subject: [PATCH 3/3] lavc/dnxhdenc: R-V V get_pixels_8x4_sym
Date: Sun, 18 Feb 2024 20:27:56 +0800
Message-ID: <CAEa-L+uvrzoZeu-zrda=dY6zcm70uJ-KztRvvzedCSr7mz6XRA@mail.gmail.com> (raw)
In-Reply-To: <CAEa-L+tr4oCLcW-TYaTJKhek3RWUtmNz9vRn_CuA7nrKsW+Ezw@mail.gmail.com>
ping
flow gg <hlefthleft@gmail.com> 于2024年1月30日周二 00:22写道:
> > I expect that it would be faster to make one large load, and then 4 small
> > stores, but that might work only for exactly 128-bit vectors?
>
> This seems to require vle128, so I didn't modify it.
>
> > That's not needed. You can use immediate values.
> > You can reorder to avoid immediate data dependencies on the addresses.
> > In any case, you need to check the vector length in init.
>
> Okay, I've updated it in the reply.
>
> Rémi Denis-Courmont <remi@remlab.net> 于2024年1月29日周一 23:41写道:
>
>> Hi,
>>
>> +/*
>> + * Copyright (c) 2023 Institue of Software Chinese Academy of Sciences
>> (ISCAS).
>> + *
>> + * 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 "libavutil/riscv/asm.S"
>> +
>> +func ff_get_pixels_8x4_sym_rvv, zve64x
>> + vsetivli zero, 8, e8, mf2, ta, ma
>> + vlse64.v v16, (a1), a2
>> + li t0, 8 * 8
>> + vsetvli zero, t0, e16, m4, ta, ma
>> + vzext.vf2 v8, v16
>> + vse16.v v8, (a0)
>> + li a2, 8*2
>>
>> That's not needed. You can use immediate values.
>>
>> + vsetivli zero, 2, e8, mf8, ta, ma
>> + addi a1, a0, 48
>> + addi a0, a0, 32*2
>> + vle64.v v0, (a1)
>> + vse64.v v0, (a0)
>> + sub a1, a1, a2
>> + vle64.v v0, (a1)
>> + add a0, a0, a2
>> + vse64.v v0, (a0)
>> + sub a1, a1, a2
>> + vle64.v v0, (a1)
>> + add a0, a0, a2
>> + vse64.v v0, (a0)
>> + sub a1, a1, a2
>> + vle64.v v0, (a1)
>> + add a0, a0, a2
>> + vse64.v v0, (a0)
>>
>> You can reorder to avoid immediate data dependencies on the addresses.
>>
>> I expect that it would be faster to make one large load, and then 4 small
>> stores, but that might work only for exactly 128-bit vectors?
>>
>> In any case, you need to check the vector length in init.
>>
>> +
>> + ret
>> +endfunc
>>
>> --
>> 雷米‧德尼-库尔蒙
>> 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-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".
next prev parent reply other threads:[~2024-02-18 12:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-20 8:40 flow gg
2023-12-20 8:46 ` flow gg
2023-12-20 10:15 ` flow gg
2024-01-29 13:51 ` flow gg
2024-01-29 15:40 ` Rémi Denis-Courmont
2024-01-29 16:22 ` flow gg
2024-02-18 12:27 ` flow gg [this message]
2024-02-19 17:48 ` Rémi Denis-Courmont
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='CAEa-L+uvrzoZeu-zrda=dY6zcm70uJ-KztRvvzedCSr7mz6XRA@mail.gmail.com' \
--to=hlefthleft@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