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 5818946C1D for ; Wed, 5 Jul 2023 21:20:01 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7001A68C66F; Thu, 6 Jul 2023 00:19:59 +0300 (EEST) Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D66F268C620 for ; Thu, 6 Jul 2023 00:19:52 +0300 (EEST) Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 365LJpbt023329-365LJpbu023329; Thu, 6 Jul 2023 00:19:51 +0300 Received: from foo.martin.st (host-97-187.parnet.fi [77.234.97.187]) by mail9.parnet.fi (Postfix) with ESMTPS id 787D7A1436; Thu, 6 Jul 2023 00:19:51 +0300 (EEST) Date: Thu, 6 Jul 2023 00:19:50 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: John Cox In-Reply-To: <20230704140445.240426-1-jc@kynesim.co.uk> Message-ID: <2fc449f-836b-43b-32c6-7b5c575d5ad9@martin.st> References: <20230704140445.240426-1-jc@kynesim.co.uk> MIME-Version: 1.0 X-FE-Policy-ID: 3:14:2:SYSTEM Subject: Re: [FFmpeg-devel] [PATCH v4 0/7] avfilter/vf_bwdif: Add aarch64 neon functions 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 Cc: thomas.mundt@hr.de, ffmpeg-devel@ffmpeg.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Tue, 4 Jul 2023, John Cox wrote: > Also adds a filter_line3 method which on aarch64 neon yields approx 30% > speedup over 2xfilter_line and a memcpy > > Differences from v3: > Remove a few lines of neon in filter_line that should have been removed > when copying from line3 > > Sorry about the two patch sets in quick succession, but I think I've > applied all the requested changes and I didn't want this mistake in the > final patchset. (The mistake was benign - it just wasted a few cycles.) > > John Cox (7): > tests/checkasm: Add test for vf_bwdif filter_intra > avfilter/vf_bwdif: Add neon for filter_intra > tests/checkasm: Add test for vf_bwdif filter_edge > avfilter/vf_bwdif: Add neon for filter_edge > avfilter/vf_bwdif: Add neon for filter_line > avfilter/vf_bwdif: Add a filter_line3 method for optimisation > avfilter/vf_bwdif: Add neon for filter_line3 I think this looks ok to me, so I'll go ahead and push it. The tests pass on x86 too, msvc/aarch64, llvm-mingw/aarch64, macOS and linux. Just a couple notes I didn't remember to mention before: - Regarding the int parameters on the stack; as long as you do have the C wrapper functions, you don't strictly need to have the same function signature for the NEON function as for the actual DSP function. So if you'd have wanted to have a different signature for the NEON function (changing it to intptr_t), that'd worked too. But I do see the benefit of keeping it identical to the DSP function interface. - The way of making the the C function exported and calling that for the tail is neat, but kinda unusual within ffmpeg. In most cases (except for parts of swscale), we can just assume and rely on buffers being aligned enough for the SIMD vector length of the current platform, and freely overwrite a little into the padding at the end of the lines. Not sure if this is the case here though. (If it is, it's easy enough to remove those bits and make the C functions static again as a follow-up.) Also, checkasm coverage for >8bpp would be nice as mentioned, but if someone wants to write asm for that, it should be doable to factorize the new tests to run them for both 8 and 16 bpp. That said, it looks ok enough to me so I'll push it. // Martin _______________________________________________ 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".