Bug 1886378 - Update linux/aarch64 sources to SVE-disabled version r=glandium

This patch updates the linux/aarch64 sources in our code base to the
SVE-disabled version. The commit version remains at 7fb8cec.

Differential Revision: https://phabricator.services.mozilla.com/D206720
This commit is contained in:
Chun-Min Chang 2024-04-16 16:37:25 +00:00
parent 6f46fb6bb4
commit be484e5383
7 changed files with 1369 additions and 28 deletions

View file

@ -35,13 +35,11 @@ extern "C" {
int64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz);
int64_t vp9_block_error_neon(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz);
int64_t vp9_block_error_sve(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz);
RTCD_EXTERN int64_t (*vp9_block_error)(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz);
#define vp9_block_error vp9_block_error_neon
int64_t vp9_block_error_fp_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, int block_size);
int64_t vp9_block_error_fp_neon(const tran_low_t *coeff, const tran_low_t *dqcoeff, int block_size);
int64_t vp9_block_error_fp_sve(const tran_low_t *coeff, const tran_low_t *dqcoeff, int block_size);
RTCD_EXTERN int64_t (*vp9_block_error_fp)(const tran_low_t *coeff, const tran_low_t *dqcoeff, int block_size);
#define vp9_block_error_fp vp9_block_error_fp_neon
int vp9_diamond_search_sad_c(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, uint32_t start_mv_sad, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_sad_table *sad_fn_ptr, const struct mv *center_mv);
int vp9_diamond_search_sad_neon(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, uint32_t start_mv_sad, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_sad_table *sad_fn_ptr, const struct mv *center_mv);
@ -98,10 +96,6 @@ static void setup_rtcd_internal(void)
(void)flags;
vp9_block_error = vp9_block_error_neon;
if (flags & HAS_SVE) vp9_block_error = vp9_block_error_sve;
vp9_block_error_fp = vp9_block_error_fp_neon;
if (flags & HAS_SVE) vp9_block_error_fp = vp9_block_error_fp_sve;
}
#endif

View file

@ -12,8 +12,8 @@
.equ HAVE_NEON , 1
.equ HAVE_NEON_DOTPROD , 1
.equ HAVE_NEON_I8MM , 1
.equ HAVE_SVE , 1
.equ HAVE_SVE2 , 1
.equ HAVE_SVE , 0
.equ HAVE_SVE2 , 0
.equ HAVE_MIPS32 , 0
.equ HAVE_DSPR2 , 0
.equ HAVE_MSA , 0

View file

@ -6,5 +6,5 @@
/* in the file PATENTS. All contributing project authors may */
/* be found in the AUTHORS file in the root of the source tree. */
#include "vpx/vpx_codec.h"
static const char* const cfg = "--target=arm64-linux-gcc --enable-external-build --disable-examples --disable-install-docs --disable-unit-tests --enable-multi-res-encoding --size-limit=8192x4608 --enable-pic --disable-avx512 --enable-realtime-only --log=/home/cm/Work/gecko-dev/media/libvpx/config/linux/arm64/config.log";
static const char* const cfg = "--target=arm64-linux-gcc --enable-external-build --disable-examples --disable-install-docs --disable-unit-tests --enable-multi-res-encoding --size-limit=8192x4608 --enable-pic --disable-avx512 --enable-realtime-only --disable-sve --log=/home/cm/Work/gecko-dev/media/libvpx/config/linux/arm64/config.log";
const char *vpx_codec_build_config(void) {return cfg;}

View file

@ -21,8 +21,8 @@
#define HAVE_NEON 1
#define HAVE_NEON_DOTPROD 1
#define HAVE_NEON_I8MM 1
#define HAVE_SVE 1
#define HAVE_SVE2 1
#define HAVE_SVE 0
#define HAVE_SVE2 0
#define HAVE_MIPS32 0
#define HAVE_DSPR2 0
#define HAVE_MSA 0

View file

@ -916,8 +916,7 @@ void vpx_subtract_block_neon(int rows, int cols, int16_t *diff_ptr, ptrdiff_t di
uint64_t vpx_sum_squares_2d_i16_c(const int16_t *src, int stride, int size);
uint64_t vpx_sum_squares_2d_i16_neon(const int16_t *src, int stride, int size);
uint64_t vpx_sum_squares_2d_i16_sve(const int16_t *src, int stride, int size);
RTCD_EXTERN uint64_t (*vpx_sum_squares_2d_i16)(const int16_t *src, int stride, int size);
#define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_neon
void vpx_tm_predictor_16x16_c(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left);
void vpx_tm_predictor_16x16_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left);
@ -1149,8 +1148,6 @@ static void setup_rtcd_internal(void)
if (flags & HAS_NEON_DOTPROD) vpx_sad_skip_64x64x4d = vpx_sad_skip_64x64x4d_neon_dotprod;
vpx_sse = vpx_sse_neon;
if (flags & HAS_NEON_DOTPROD) vpx_sse = vpx_sse_neon_dotprod;
vpx_sum_squares_2d_i16 = vpx_sum_squares_2d_i16_neon;
if (flags & HAS_SVE) vpx_sum_squares_2d_i16 = vpx_sum_squares_2d_i16_sve;
vpx_variance16x16 = vpx_variance16x16_neon;
if (flags & HAS_NEON_DOTPROD) vpx_variance16x16 = vpx_variance16x16_neon_dotprod;
vpx_variance16x32 = vpx_variance16x32_neon;

View file

@ -83,7 +83,7 @@ function convert_srcs_to_project_files {
# the config file path requires adjustment. To ensure the list remains sorted,
# we must first remove it and then insert it at the beginning of the list.
# Remove vpx_config.c.
# Remove vpx_config.c
source_list=$(echo "$source_list" | grep -v 'vpx_config\.c')
# Insert vpx_config.c at the beginning of the list.
local config=$(echo "../$LIBVPX_CONFIG_DIR/$3/vpx_config.c")

File diff suppressed because it is too large Load diff