Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Martin Storsjö" <martin@martin.st>
To: "Swinney, Jonathan" <jswinney@amazon.com>
Cc: "Pop, Sebastian" <spop@amazon.com>,
	"J. Dekker" <jdek@itanimul.li>, Hubert Mazur <hum@semihalf.com>,
	"ffmpeg-devel@ffmpeg.org" <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v2 1/2] checkasm: updated tests for sw_scale
Date: Thu, 4 Aug 2022 14:36:41 +0300 (EEST)
Message-ID: <ef776163-aa8b-d7ae-c262-b32ea0465c8@martin.st> (raw)
In-Reply-To: <8ce08abb20944ba4987c8bc1ba41c55f@amazon.com>

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 <jswinney@amazon.com>
> ---
> 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 <string.h>
> +#include <stdbool.h>

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".

      reply	other threads:[~2022-08-04 11:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-27 17:19 Swinney, Jonathan
2022-08-04 11:36 ` Martin Storsjö [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ef776163-aa8b-d7ae-c262-b32ea0465c8@martin.st \
    --to=martin@martin.st \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=hum@semihalf.com \
    --cc=jdek@itanimul.li \
    --cc=jswinney@amazon.com \
    --cc=spop@amazon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git