[FFmpeg-devel] [PATCH 2/2] swscale/aarch64: Add rgb24 to yuv implementation
Ronald S. Bultje
rsbultje at gmail.com
Mon Jun 3 20:22:43 EEST 2024
Hi,
On Mon, Jun 3, 2024 at 12:14 PM Zhao Zhili <quinkblack at foxmail.com> wrote:
>
>
> > On Jun 3, 2024, at 22:17, Rémi Denis-Courmont <remi at remlab.net> wrote:
> >
> > Le maanantaina 3. kesäkuuta 2024, 16.11.15 EEST Zhao Zhili a écrit :
> >>> See https://github.com/mstorsjo/FFmpeg/actions/runs/9346228714 for one
> >>> example run of these actions with your patches.
> >> Wow, it’s very helpful. This is the action result of the updated patch:
> >>
> >> https://github.com/quink-black/FFmpeg/actions/runs/9350348848
> >>
> >> https://ffmpeg.org/pipermail/ffmpeg-devel/2024-June/328786.html
> >>
> >> The test still failed on x86, but success on all arm64 platform and
> >> longarch. I have tried to call rgb24ToY_c and ff_rgb24ToY_avx
> >> directly and compare the results, they don't match. I’m confused.
> >
> > As Martin write, some x86 code is imprecise, or even wrong.
>
> On x86:
>
> With the following command:
> ./ffmpeg -bitexact -cpuflags 0 -f lavfi -i testsrc -frames 1 -pix_fmt
> yuv420p -f framemd5 -
> 0, 0, 0, 1, 115200,
> d6b3abfc5280311c2758d5e4028c07b5
>
> Without “-cpuflags 0”
> ./ffmpeg -bitexact -f lavfi -i testsrc -frames 1 -pix_fmt yuv420p -f
> framemd5 -
> 0, 0, 0, 1, 115200,
> 1d302ce90bd5b6eec681730cc0868be4
>
> It's indeed non bitexact.
>
> On aarch64 with the neon implementation I can get the same result as
> "-cpuflags 0":
> ./ffmpeg -bitexact -f lavfi -i testsrc -frames 1 -pix_fmt yuv420p -f
> framemd5 -
> 0, 0, 0, 1, 115200,
> d6b3abfc5280311c2758d5e4028c07b5
>
> Now I can disable the test for x86 and continue the work on aarch64.
>
Uhm, that's a bit hacky. I think things like -sws_flags +bitexact need to
be after the -i argument and then it might work?
Ronald
More information about the ffmpeg-devel
mailing list