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-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to