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 B83EC40AD5 for ; Thu, 4 Aug 2022 11:37:01 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4D2EA68B99F; Thu, 4 Aug 2022 14:36:58 +0300 (EEST) Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C9A3A68B590 for ; Thu, 4 Aug 2022 14:36:51 +0300 (EEST) Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 274BafqJ025595-274BafqK025595; Thu, 4 Aug 2022 14:36:41 +0300 Received: from foo.martin.st (host-97-187.parnet.fi [77.234.97.187]) by mail9.parnet.fi (Postfix) with ESMTPS id C0B81A1468; Thu, 4 Aug 2022 14:36:41 +0300 (EEST) Date: Thu, 4 Aug 2022 14:36:41 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: "Swinney, Jonathan" In-Reply-To: <8ce08abb20944ba4987c8bc1ba41c55f@amazon.com> Message-ID: References: <8ce08abb20944ba4987c8bc1ba41c55f@amazon.com> MIME-Version: 1.0 X-FE-Policy-ID: 3:14:2:SYSTEM Subject: Re: [FFmpeg-devel] [PATCH v2 1/2] checkasm: updated tests for sw_scale 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: "Pop, Sebastian" , "J. Dekker" , Hubert Mazur , "ffmpeg-devel@ffmpeg.org" 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, 27 Jul 2022, Swinney, Jonathan wrote: > - added a test for yuv2plane1 > - fixed test for yuv2planeX for aarch64 which was previously not working > at all > - updated the test for yuv2planeX to check exact results or approximated > results > > Signed-off-by: Jonathan Swinney > --- > libswscale/x86/swscale.c | 8 +- > tests/checkasm/sw_scale.c | 189 ++++++++++++++++++++++++++++++-------- > 2 files changed, 155 insertions(+), 42 deletions(-) > > diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c > index 628f12137c..32d441245d 100644 > --- a/libswscale/x86/swscale.c > +++ b/libswscale/x86/swscale.c > @@ -534,7 +534,8 @@ switch(c->dstBpc){ \ > ASSIGN_SSE_SCALE_FUNC(c->hcScale, c->hChrFilterSize, sse2, sse2); > ASSIGN_VSCALEX_FUNC(c->yuv2planeX, sse2, , > HAVE_ALIGNED_STACK || ARCH_X86_64); > - ASSIGN_VSCALE_FUNC(c->yuv2plane1, sse2); > + if (!(c->flags & SWS_ACCURATE_RND)) > + ASSIGN_VSCALE_FUNC(c->yuv2plane1, sse2); > > switch (c->srcFormat) { > case AV_PIX_FMT_YA8: > @@ -583,14 +584,15 @@ switch(c->dstBpc){ \ > ASSIGN_VSCALEX_FUNC(c->yuv2planeX, sse4, > if (!isBE(c->dstFormat)) c->yuv2planeX = ff_yuv2planeX_16_sse4, > HAVE_ALIGNED_STACK || ARCH_X86_64); > - if (c->dstBpc == 16 && !isBE(c->dstFormat)) > + if (c->dstBpc == 16 && !isBE(c->dstFormat) && !(c->flags & SWS_ACCURATE_RND)) > c->yuv2plane1 = ff_yuv2plane1_16_sse4; > } > > if (EXTERNAL_AVX(cpu_flags)) { > ASSIGN_VSCALEX_FUNC(c->yuv2planeX, avx, , > HAVE_ALIGNED_STACK || ARCH_X86_64); > - ASSIGN_VSCALE_FUNC(c->yuv2plane1, avx); > + if (!(c->flags & SWS_ACCURATE_RND)) > + ASSIGN_VSCALE_FUNC(c->yuv2plane1, avx); > > switch (c->srcFormat) { > case AV_PIX_FMT_YUYV422: I think it would be good to have someone who's more familiar with swscale (or just someone else overall) acknowledge these changes too. > diff --git a/tests/checkasm/sw_scale.c b/tests/checkasm/sw_scale.c > index b643a47c30..b01fc31fd9 100644 > --- a/tests/checkasm/sw_scale.c > +++ b/tests/checkasm/sw_scale.c > @@ -18,6 +18,7 @@ > */ > > #include > +#include We don't generally use stdbool in ffmpeg, even if it's C99 - just use a plain int and 0/1. Other than that, the checkasm changes look fine (I coauthored part of them - and your cleanup of my WIP patch looks good!). // 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".