From: Michael Niedermayer <michael@niedermayer.cc> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH 5/5] aarch64: me_cmp: Don't do uaddlv once per iteration Date: Sat, 16 Jul 2022 15:20:10 +0200 Message-ID: <20220716132010.GJ2088045@pb2> (raw) In-Reply-To: <cca163-479-2c93-22c-f57ec713bc16@martin.st> [-- Attachment #1.1: Type: text/plain, Size: 3401 bytes --] On Sat, Jul 16, 2022 at 03:30:23PM +0300, Martin Storsjö wrote: > On Sat, 16 Jul 2022, Michael Niedermayer wrote: > > > On Sat, Jul 16, 2022 at 12:25:37AM +0300, Martin Storsjö wrote: > > > On Fri, 15 Jul 2022, Michael Niedermayer wrote: > > > > > > > On Fri, Jul 15, 2022 at 10:56:03PM +0300, Martin Storsjö wrote: > > > > > On Fri, 15 Jul 2022, Swinney, Jonathan wrote: > > > > > > > > > > > If the max height is just 16, then this should be fine. I assumed that h > > > > > > could have a much higher value (>1024), but if that is not the case, > > > > > > then this is a useful optimization. > > > > > > > > > > At least according to the me_cmp.h header, which says: > > > > > > > > > > /* Motion estimation: > > > > > * h is limited to { width / 2, width, 2 * width }, > > > > > * but never larger than 16 and never smaller than 2. > > > > > * Although currently h < 4 is not used as functions with > > > > > * width < 8 are neither used nor implemented. */ > > > > > > > > These rules where written with support for encoding of all > > > > standard formats in mind at the time that was written. > > > > today it may make sense to extend these rules to cover the > > > > things which where created since then > > > > > > Right, but if that suddenly changes, such a change also must expect that it > > > might need updates to all assembly implementations that implement that > > > interface currently. Right now, both the defacto case (any callers in the > > > codebase) and the explicit documentation says that it can't be called with > > > parameters outside of that range. > > > > What i meant was that newly added functions should be more flexible than > > these old rules. That is 2 sets of rules > > 1. What a caller ATM can do and expect to work (thats whats written there) > > 2. What an implementor of new functions should make sure is supported > > With 2., do you mean if adding a new function into the same struct, or if > implementing the existing pix_abs[0][..] functions? i would say both > > If you mean new implementations of the existing function interface, you say > they "should be more flexible". How flexible must they be? Is it ok to > assume h<=256 for the w=16 functions? i think thats fine > > Gradually increasing the requirements for existing function interfaces like > you suggest is really problematic. why ? iam really just saying "when you add new code, dont base it on old limitations" And i suggest this because its much easier to do when a function is added than when later one wants to use it When i originally wrote this list of restrictions it didnt list what our code actually used but tried to look ahead to what we would need when we write encoders for all standard formats at that time. We never wrote a h264 encoder but this API was designed to support it. > > If we want to require more of the functions, we should document it, and > extend the checkasm test to test that new requirement - which also extends > the requirement to the existing functions. If we don't have a checkasm test > for the required behaviour, we can pretty much assume it's broken, even in > new implementations. yes [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No snowflake in an avalanche ever feels responsible. -- Voltaire [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 195 bytes --] [-- Attachment #2: Type: text/plain, Size: 251 bytes --] _______________________________________________ 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:[~2022-07-16 13:20 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-07-13 20:48 [FFmpeg-devel] [PATCH 1/5] libavcodec: aarch64: Don't clobber v8 in the h%4 case in ff_pix_abs16_xy2_neon Martin Storsjö 2022-07-13 20:48 ` [FFmpeg-devel] [PATCH 2/5] checkasm: motion: Make the benchmarks more stable Martin Storsjö 2022-07-15 19:35 ` Swinney, Jonathan 2022-07-13 20:48 ` [FFmpeg-devel] [PATCH 3/5] aarch64: me_cmp: Interleave some of the loads in ff_pix_abs16_xy2_neon Martin Storsjö 2022-07-15 19:34 ` Swinney, Jonathan 2022-07-13 20:48 ` [FFmpeg-devel] [PATCH 4/5] aarch64: me_cmp: Switch from uabd to uabal " Martin Storsjö 2022-07-15 19:38 ` Swinney, Jonathan 2022-07-13 20:48 ` [FFmpeg-devel] [PATCH 5/5] aarch64: me_cmp: Don't do uaddlv once per iteration Martin Storsjö 2022-07-15 19:32 ` Swinney, Jonathan 2022-07-15 19:56 ` Martin Storsjö 2022-07-15 21:19 ` Michael Niedermayer 2022-07-15 21:25 ` Martin Storsjö 2022-07-16 11:23 ` Michael Niedermayer 2022-07-16 12:30 ` Martin Storsjö 2022-07-16 13:20 ` Michael Niedermayer [this message] 2022-07-16 14:23 ` Martin Storsjö 2022-07-16 12:50 ` Ronald S. Bultje 2022-07-16 13:06 ` Michael Niedermayer 2022-07-16 9:18 ` Martin Storsjö 2022-07-15 19:35 ` [FFmpeg-devel] [PATCH 1/5] libavcodec: aarch64: Don't clobber v8 in the h%4 case in ff_pix_abs16_xy2_neon Swinney, Jonathan
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=20220716132010.GJ2088045@pb2 \ --to=michael@niedermayer.cc \ --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