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 E0E2343D69 for ; Tue, 9 Aug 2022 11:22:08 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8951568B7F1; Tue, 9 Aug 2022 14:22:05 +0300 (EEST) Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0E0FB68B4B1 for ; Tue, 9 Aug 2022 14:21:58 +0300 (EEST) Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 279BLwXW021280-279BLwXX021280 for ; Tue, 9 Aug 2022 14:21:58 +0300 Received: from foo.martin.st (host-97-187.parnet.fi [77.234.97.187]) by mail9.parnet.fi (Postfix) with ESMTPS id 5028BA1469 for ; Tue, 9 Aug 2022 14:21:58 +0300 (EEST) Date: Tue, 9 Aug 2022 14:21:58 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: FFmpeg development discussions and patches In-Reply-To: <5734bfec-e85e-903d-e047-282d58010bf@martin.st> Message-ID: References: <20220623180407.21081-1-jdek@itanimul.li> <20220623180407.21081-3-jdek@itanimul.li> <5734bfec-e85e-903d-e047-282d58010bf@martin.st> MIME-Version: 1.0 X-FE-Policy-ID: 3:14:2:SYSTEM X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH 3/3] lavc/aarch64: hevc_add_res add 12bit variants 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: quoted-printable Content-Type: text/plain; charset="iso-8859-15"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Tue, 9 Aug 2022, Martin Storsj=F6 wrote: > On Thu, 23 Jun 2022, J. Dekker wrote: > >> hevc_add_res_4x4_12_c: 46.0 >> hevc_add_res_4x4_12_neon: 18.7 >> hevc_add_res_8x8_12_c: 194.7 >> hevc_add_res_8x8_12_neon: 25.2 >> hevc_add_res_16x16_12_c: 716.0 >> hevc_add_res_16x16_12_neon: 69.7 >> hevc_add_res_32x32_12_c: 3820.7 >> hevc_add_res_32x32_12_neon: 261.0 >> = >> Signed-off-by: J. Dekker >> --- >> libavcodec/aarch64/hevcdsp_idct_neon.S | 148 ++++++++++++---------- >> libavcodec/aarch64/hevcdsp_init_aarch64.c | 34 ++--- >> 2 files changed, 97 insertions(+), 85 deletions(-) > > LGTM. The patch is a bit hard to inspect thoroughly (to see exactly how = > little has changed) due to the functions being moved around at the same t= ime = > as they're modified, but I checked and the changes do look fine. > > By splitting things up in individual macros for each function, (e.g. = > add_res_4x4, add_res_8x8 etc, then add_res setting the mask and calling t= he = > others) you could keep the code in place and make the diff even easier to = > read, but it's not strictly necessary. Actually, I do want you to make a change here. The only single thing that differs between the 10 and 12 bit versions, is = what the mask register is initialized to. It's totally a waste of space to = produce two near-identical versions of everything. Instead I'd suggest making just two frontend functions, which sets the = mask register and then calls the (non-exported) 16 bit generic function. = Also, have a look at e.g. vp9mc_16bpp_neon.S, where we have something = similar: .macro do_8tap_v_func type, filter, offset, size, bpp function ff_vp9_\type\()_\filter\()\size\()_v_\bpp\()_neon, export=3D1 uxtw x4, w4 mvni v1.8h, #((0xff << (\bpp - 8)) & 0xff), lsl #8 movrel x5, X(ff_vp9_subpel_filters), 256*\offset add x6, x5, w6, uxtw #4 mov x5, #\size .if \size >=3D 8 b \type\()_8tap_8v ... For your case, you don't need anything else than the mvni instruction and = then a branch to the actual implementation. // 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".