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 E75F84397D for ; Thu, 4 Aug 2022 07:47:45 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 505EE68B906; Thu, 4 Aug 2022 10:47:44 +0300 (EEST) Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 70AFC68B8EC for ; Thu, 4 Aug 2022 10:47:37 +0300 (EEST) Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 2747lYw2017761-2747lYw3017761; Thu, 4 Aug 2022 10:47:34 +0300 Received: from foo.martin.st (host-97-187.parnet.fi [77.234.97.187]) by mail9.parnet.fi (Postfix) with ESMTPS id 8EB8FA146C; Thu, 4 Aug 2022 10:47:34 +0300 (EEST) Date: Thu, 4 Aug 2022 10:47:34 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: ffmpeg-devel@ffmpeg.org In-Reply-To: <20220713204716.3114529-1-martin@martin.st> Message-ID: <773f8bab-9f4d-9b62-ed40-26ebf9355766@martin.st> References: <20220713204716.3114529-1-martin@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 1/2] x86: Don't hardcode the height to 8 in sad8_xy2_mmx 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: Michael Niedermayer , Jonathan Swinney 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 Wed, 13 Jul 2022, Martin Storsj=F6 wrote: > The height is hardcoded in some of the me_cmp functions, but not > in all of them. But in the case of all other functions, it's hardcoded > in the same place in SIMD functions as in the C reference functions, > while this one function differs from the behaviour of the C code. > > (Before 542765ce3eccbca587d54262a512cbdb1407230d, there were a > couple other sad8_*_mmx functions with similar hardcoded height.) > --- > libavcodec/x86/me_cmp_init.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/libavcodec/x86/me_cmp_init.c b/libavcodec/x86/me_cmp_init.c > index 61e9396b8f..dcc2621276 100644 > --- a/libavcodec/x86/me_cmp_init.c > +++ b/libavcodec/x86/me_cmp_init.c > @@ -202,13 +202,12 @@ static inline int sum_mmx(void) > static int sad8_xy2_ ## suf(MpegEncContext *v, uint8_t *blk2, \ > uint8_t *blk1, ptrdiff_t stride, int h) \ > { \ > - av_assert2(h =3D=3D 8); = \ > __asm__ volatile ( \ > "pxor %%mm7, %%mm7 \n\t" \ > "pxor %%mm6, %%mm6 \n\t" \ > ::); \ > \ > - sad8_4_ ## suf(blk1, blk2, stride, 8); \ > + sad8_4_ ## suf(blk1, blk2, stride, h); \ > \ > return sum_ ## suf(); \ > } \ > -- = > 2.25.1 Ping, does this seem reasonable? Michael indicated a desire to make the = me_cmp functions more general and flexible than what they are today, and = this would be a first step to making checkasm test such cases. // 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".