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 BF2904891B for ; Wed, 21 Feb 2024 12:08:29 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 98BC668D1C0; Wed, 21 Feb 2024 14:08:26 +0200 (EET) Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 188DD68CC25 for ; Wed, 21 Feb 2024 14:08:19 +0200 (EET) Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 41LC8In2023944-41LC8In3023944 for ; Wed, 21 Feb 2024 14:08:18 +0200 Received: from cone.home.martin.st (host-97-144.parnet.fi [77.234.97.144]) by mail9.parnet.fi (Postfix) with ESMTPS id D132CA14A7 for ; Wed, 21 Feb 2024 14:08:18 +0200 (EET) Date: Wed, 21 Feb 2024 14:08:16 +0200 (EET) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: FFmpeg development discussions and patches In-Reply-To: <20240221111003.185240-3-jdek@itanimul.li> Message-ID: References: <20240221111003.185240-1-jdek@itanimul.li> <20240221111003.185240-3-jdek@itanimul.li> MIME-Version: 1.0 X-FE-Policy-ID: 3:14:2:SYSTEM Subject: Re: [FFmpeg-devel] [PATCH 3/3] avcodec/aarch64: add hevc deblock NEON 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 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 Wed, 21 Feb 2024, J. Dekker wrote: > Benched using single-threaded full decode on an Ampere Altra. > > Bpp Before After Speedup > 8 73,3s 65,2s 1.124x > 10 114,2s 104,0s 1.098x > 12 125,8s 115,7s 1.087x > > Signed-off-by: J. Dekker > --- > libavcodec/aarch64/hevcdsp_deblock_neon.S | 421 ++++++++++++++++++++++ > libavcodec/aarch64/hevcdsp_init_aarch64.c | 18 + > 2 files changed, 439 insertions(+) > +0: // STRONG FILTER > + > + // P0 = p0 + av_clip(((p2 + 2 * p1 + 2 * p0 + 2 * q0 + q1 + 4) >> 3) - p0, -tc3, tc3); > + add v21.8h, v2.8h, v3.8h // (p1 + p0 > + add v21.8h, v4.8h, v21.8h // + q0) > + shl v21.8h, v21.8h, #1 // * 2 > + add v22.8h, v1.8h, v5.8h // (p2 + q1) > + add v21.8h, v22.8h, v21.8h // + > + srshr v21.8h, v21.8h, #3 // >> 3 > + sub v21.8h, v21.8h, v3.8h // - p0 > + The srshr line is incorrectly indented here (and elsewhere) > + sqxtun v4.8b, v4.8h > + sqxtun v5.8b, v5.8h > + sqxtun v6.8b, v6.8h > + sqxtun v7.8b, v7.8h > +.endif > + ret > +3: ret x6 Please indent the "x6" here like other operands > +.macro hevc_loop_filter_luma dir bitdepth > +function ff_hevc_\dir\()_loop_filter_luma_\bitdepth\()_neon, export=1 > + mov x6, x30 > +.if \dir == v In GAS assembler, .if does a numerical comparison - it can't do string comparisons. The right way to do this is to do ".ifc \dir, v", which does a string comparison. (If you really do need to do this like a numerical comparison, it's possible to define e.g. "v" as a numeric symbol as well, see e.g. https://code.videolan.org/videolan/dav1d/-/merge_requests/1603/diffs?commit_id=d4746c908c56cb2e8545efd348b8cdc13f2f2253 but that's not really the nicest way to do it.) This issue breaks compilation with Clang. With gas-preprocessor (for MSVC), it manages to build correctly, but does the wrong thing. To avoid me having to test all these build configurations manually, remembering to check all these corner case build configurations and check indentation and all, I've set up a PoC for testing such things on Github Actions. If you have a repo on github, grab my commits from https://github.com/mstorsjo/FFmpeg/commits/gha-aarch64 (there are a couple of them), add your changes on top of these, and push it as a branch to your own github repo, then check the output from the actions. Here's the output of a run with the patches you just posted: https://github.com/mstorsjo/FFmpeg/actions/runs/7988312683 // 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".