Vargol / ffmpeg-apple-arm64-build

Build script for ffmpeg targeting the latest open source video codecs running on macOS using Apple's M1 processor.
221 stars 38 forks source link

aom av1: illegal instruction during test #19

Closed n808 closed 11 months ago

n808 commented 11 months ago

Thanks for doing this work! ffmpeg compiled without issues on my Macbook Air M1, but fails in one test: run test aom av1 encoding

/Users/name/git/ffmpeg-apple-arm64-build/test/test.sh: line 48: 84859 Illegal instruction: 4 $4/bin/ffmpeg -y -i "$2/test.mp4" -c:v "libaom-av1" -cpu-used 6 -row-mt 1 -an "$3/test-aom-av1.mp4" > "$3/test-aom-av1.log" 2>&1 check failed: test aom av1

I don't plan on using AV1 at the moment, but it's a curious failure.

Vargol commented 11 months ago

Thanks for letting me know. Looks like there’s been a few Neon changes to AV1 recently, I wonder if they’ve used something from later ARM variants. I’m away from home so I’ll look into it when I get back

Vargol commented 11 months ago

I've reported this at the AOM issues tracker

https://bugs.chromium.org/p/aomedia/issues/detail?id=3475

looks like some optimisation has had unexpected results.

Vargol commented 11 months ago

This should all be fixed now, it was just the build getting out of date, The runtime CPU detection used to be broke for ARM so was disabled in the script. At some point they've fixed it and now some of the code is dependant on it or else it tries to use ARM features not in the M series.

https://github.com/Vargol/ffmpeg-apple-arm64-build/commit/fc9495c4f6b8daa3407c5ab04dace0646a78add8