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 3E5CF439E6 for ; Thu, 4 Aug 2022 15:31:31 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 071F868B9E2; Thu, 4 Aug 2022 18:31:29 +0300 (EEST) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 555C368B8B7 for ; Thu, 4 Aug 2022 18:31:22 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 8F9AD1BF20F for ; Thu, 4 Aug 2022 15:31:21 +0000 (UTC) Date: Thu, 4 Aug 2022 17:31:20 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220804153120.GM2088045@pb2> References: <20220713204716.3114529-1-martin@martin.st> <773f8bab-9f4d-9b62-ed40-26ebf9355766@martin.st> MIME-Version: 1.0 In-Reply-To: <773f8bab-9f4d-9b62-ed40-26ebf9355766@martin.st> 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 Content-Type: multipart/mixed; boundary="===============4768371467374834642==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============4768371467374834642== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ura8jf0QYTXVPAoa" Content-Disposition: inline --ura8jf0QYTXVPAoa Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 04, 2022 at 10:47:34AM +0300, Martin Storsj=F6 wrote: > On Wed, 13 Jul 2022, Martin Storsj=F6 wrote: >=20 > > 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. > >=20 > > (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(-) > >=20 > > 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(); = \ > > } = \ > > --=20 > > 2.25.1 >=20 > 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. LGTM assuming it doesnt have any problematic perforamce impact thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. U= ser questions about the command line tools should be sent to the ffmpeg-user ML. And questions about how to use libav* should be sent to the libav-user ML. --ura8jf0QYTXVPAoa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYuvmQQAKCRBhHseHBAsP q2DkAJ9wUzKUu64RvAjPvzrDL/l12P3FEQCgjBz0AuJzjF57zCQv3C1yQqqBB4c= =LWAM -----END PGP SIGNATURE----- --ura8jf0QYTXVPAoa-- --===============4768371467374834642== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============4768371467374834642==--