Handle Arm/AArch64 runtime feature detection
authorWan-Teh Chang <wtc@google.com>
Sat, 7 Oct 2023 14:06:36 +0000 (07:06 -0700)
committerWan-Teh Chang <wtc@google.com>
Tue, 10 Oct 2023 16:27:20 +0000 (09:27 -0700)
commit9c377eafbedd3911e83ee80793b4fba80710d4e0
tree9499452a9a6cc2e0372118e939633787898a5a18
parent7c31749387e0297a16289ba851559df4fd2f935d
Handle Arm/AArch64 runtime feature detection

Port the following libaom CLs to libvpx:
https://aomedia-review.googlesource.com/c/aom/+/178361
https://aomedia-review.googlesource.com/c/aom/+/180701
https://aomedia-review.googlesource.com/c/aom/+/181821

The tests themselves are not feature-gated in the same way that they are
used in the rest of the codebase since they are not controlled by
rtcd.pl. This means that tests that assume the existence of features not
present on the target can cause SIGILL to be thrown.

This commit extends init_vpx_test.cc to match the behaviour for other
targets and automatically disable testing for features that are not
available on the machine running the tests.

Call arm_cpu_caps() and x86_simd_caps() inside #if !CONFIG_SHARED.
All the SIMD-specialized functions (arm or x86) are internal functions,
so they are not exported from the libvpx shared library. If
CONFIG_SHARED is 1, it is not necessary to call arm_cpu_caps(),
x86_simd_caps(), and append_negative_gtest_filter() either.

Change-Id: I330631816bdb52842020c5aa2a1ad802865cc285
test/init_vpx_test.cc