Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Michael Niedermayer <michael@niedermayer.cc>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [FFmpeg-cvslog] checkasm: test for abs_pow34
Date: Tue, 23 Jan 2024 20:07:04 +0100
Message-ID: <20240123190704.GL1833374@pb2> (raw)
In-Reply-To: <20231211164227.163BB4115B0@natalya.videolan.org>


[-- Attachment #1.1: Type: text/plain, Size: 2321 bytes --]

On Mon, Dec 11, 2023 at 04:42:26PM +0000, sunyuechi wrote:
> ffmpeg | branch: master | sunyuechi <sunyuechi@iscas.ac.cn> | Tue Nov 28 14:08:12 2023 +0800| [1c3620b2bbe73db9239fcf605e8f535b58f03b86] | committer: Rémi Denis-Courmont
>
> checkasm: test for abs_pow34
>
> Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
>
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1c3620b2bbe73db9239fcf605e8f535b58f03b86
> ---
>
>  tests/checkasm/Makefile    |  1 +
>  tests/checkasm/aacencdsp.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++
>  tests/checkasm/checkasm.c  |  3 ++
>  tests/checkasm/checkasm.h  |  1 +
>  tests/fate/checkasm.mak    |  3 +-
>  5 files changed, 77 insertions(+), 1 deletion(-)
[...]
> +static void test_abs_pow34(AACEncContext *s) {
> +#define BUF_SIZE 1024
> +    LOCAL_ALIGNED_32(float, in, [BUF_SIZE]);
> +
> +    declare_func(void, float *, const float *, int);
> +
> +    randomize_float(in, BUF_SIZE);
> +
> +    if (check_func(s->abs_pow34, "abs_pow34")) {
> +        LOCAL_ALIGNED_32(float, out, [BUF_SIZE]);
> +        LOCAL_ALIGNED_32(float, out2, [BUF_SIZE]);
> +
> +        call_ref(out, in, BUF_SIZE);
> +        call_new(out2, in, BUF_SIZE);
> +
> +        if (memcmp(out, out2, BUF_SIZE * sizeof(float)) != 0)
> +            fail();

This is wrong if one of the functions is implemented in C
C does not specify float to give bitexact results. Any equality check with
float thats expected to end in a reproduceable outcome is generally wrong

it also fails in practice

TEST    checkasm-aacencdsp
Test checkasm-aacencdsp failed. Look at tests/data/fate/checkasm-aacencdsp.err for details.
src/tests/Makefile:308: recipe for target 'fate-checkasm-aacencdsp' failed
make: *** [fate-checkasm-aacencdsp] Error 1

checkasm: using random seed 2523748868
SSE:
   abs_pow34_sse (aacencdsp.c:55)
 - aacencdsp.abs_pow34 [FAILED]
checkasm: 1 of 1 tests have failed
threads=1

thats on plain simple x86-32


thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
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:[~2024-01-23 19:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20231211164227.163BB4115B0@natalya.videolan.org>
2024-01-23 19:07 ` Michael Niedermayer [this message]
2024-01-23 19:17   ` James Almer
2024-01-23 19:33     ` Michael Niedermayer
2024-01-23 19:40       ` James Almer
2024-01-23 19:49         ` Michael Niedermayer
2024-01-23 19:52           ` James Almer
2024-01-23 20:09             ` Michael Niedermayer

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=20240123190704.GL1833374@pb2 \
    --to=michael@niedermayer.cc \
    --cc=ffmpeg-devel@ffmpeg.org \
    /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