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 E2C8F42F6B for ; Sat, 16 Jul 2022 09:18:38 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A1ECA68B8CC; Sat, 16 Jul 2022 12:18:35 +0300 (EEST) Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 775D368B205 for ; Sat, 16 Jul 2022 12:18:29 +0300 (EEST) Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 26G9IRQu023575-26G9IRQv023575 for ; Sat, 16 Jul 2022 12:18:27 +0300 Received: from foo.martin.st (host-97-187.parnet.fi [77.234.97.187]) by mail9.parnet.fi (Postfix) with ESMTPS id AFE04A1518 for ; Sat, 16 Jul 2022 12:18:27 +0300 (EEST) Date: Sat, 16 Jul 2022 12:18:26 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: FFmpeg development discussions and patches In-Reply-To: <20220715211948.GF2088045@pb2> Message-ID: References: <20220713204854.3114817-1-martin@martin.st> <20220713204854.3114817-5-martin@martin.st> <8E07A574-9F34-48B1-98BC-95A5B676A458@amazon.com> <3a7cff5-7691-e8cd-55c6-28f7f63cda27@martin.st> <20220715211948.GF2088045@pb2> 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 5/5] aarch64: me_cmp: Don't do uaddlv once per iteration 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-1"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Fri, 15 Jul 2022, Michael Niedermayer wrote: > On Fri, Jul 15, 2022 at 10:56:03PM +0300, Martin Storsj=F6 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 Also - if extending this, I would expect that you want other widths too. = Right now, most of the functions seem to be arranged such as [0] is w=3D16 = and [0] is w=3D8. For those, for w=3D8, it seems to be mostly hardcoded to = only assume h=3D8, while the w=3D16 functions actually honor the h paramete= r. If it ever would be relevant with h>256, that wouldn't be for the existing = w=3D8 or w=3D16 functions, but for newer functions with a larger width too. So I think this patch is safe (which works for h up to 256), and if = someone wants to extend the interface later, that can be done. // 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".