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: Krzysztof Pyrkosz via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
Cc: Krzysztof Pyrkosz <ffmpeg@szaka.eu>
Subject: Re: [FFmpeg-devel] [PATCH 1/2] tests/checkasm/sw_rgb: Added {yuyv, uyvy}toyuv{420, 422} test cases
Date: Mon, 17 Feb 2025 11:37:13 +0200 (EET)
Message-ID: <fbb8e269-e0e-e1e7-4c7f-f7bd26ebc9b3@martin.st> (raw)
In-Reply-To: <3d9e1071-a7f4-c8c-4cae-bb3c64eb5fbb@martin.st>

On Mon, 17 Feb 2025, Martin Storsjö wrote:

> On Tue, 11 Feb 2025, Krzysztof Pyrkosz via ffmpeg-devel wrote:
>
>> Splitting the previous patch into two.
>> I noticed that on my x86 box, one of the newly added tests fail:
>> 
>> MMXEXT:
>>   uyvytoyuv420_mmxext (sw_rgb.c:126)
>>   yuyvtoyuv420_mmxext (sw_rgb.c:126)
>> - sw_rgb.uyvytoyuv          [FAILED]
>> 
>> SSE2, AVX and AVX2 are passing, though.
>
> I checked this, and the reason that this is failing, is that the chroma 
> values are off by one, for a lot of the output pixels here.
>
> Kinda surprising for something that should only reshuffle pixels and not 
> touch their values...

Ah, right, this does average the chroma values when converting to 420. I 
see that the NEON (which matches the C) doesn't do rounding, while I guess 
the mmxext version does. Either we should tolerate an off-by-one (possibly 
only if SWS_ACCURATE_RND or SWS_BITEXACT aren't set), change the mmxext 
asm to round in the same way as the C code, or just drop the mmxext code. 
(We don't seem to have this particular function implemented in any higher 
x86 instruction set though.)

// 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:[~2025-02-17  9:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-07 19:06 [FFmpeg-devel] [PATCH] swscale/aarch64/rgb2rgb_neon: Implemented uyvytoyuv422 Krzysztof Pyrkosz via ffmpeg-devel
2025-02-10 13:15 ` Martin Storsjö
2025-02-11 21:24   ` Krzysztof Pyrkosz via ffmpeg-devel
2025-02-11 21:33   ` Krzysztof Pyrkosz via ffmpeg-devel
2025-02-11 21:53     ` Martin Storsjö
2025-02-11 22:06       ` [FFmpeg-devel] [PATCH 1/2] tests/checkasm/sw_rgb: Added {yuyv, uyvy}toyuv{420, 422} test cases Krzysztof Pyrkosz via ffmpeg-devel
2025-02-12  9:37         ` Martin Storsjö
2025-02-17  9:06         ` Martin Storsjö
2025-02-17  9:37           ` Martin Storsjö [this message]
2025-02-11 22:06       ` [FFmpeg-devel] [PATCH 2/2] swscale/aarch64/rgb2rgb_neon: Implemented {yuyv, uyvy}toyuv{420, 422} Krzysztof Pyrkosz via ffmpeg-devel
2025-02-12 12:02         ` Martin Storsjö
2025-02-13 19:02           ` [FFmpeg-devel] [PATCH] " Krzysztof Pyrkosz via ffmpeg-devel
2025-02-17  9:39             ` Martin Storsjö

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=fbb8e269-e0e-e1e7-4c7f-f7bd26ebc9b3@martin.st \
    --to=martin@martin.st \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=ffmpeg@szaka.eu \
    /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