Skip to content

Commit

Permalink
Remove usages of sve functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
mamaheux committed Jul 10, 2024
1 parent 9418cd6 commit 4e92082
Show file tree
Hide file tree
Showing 8 changed files with 1,138 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker/ubuntu-20.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ RUN mkdir build

WORKDIR /root/webrtc-native-build/build
RUN cmake ../ -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_BUILD_ARCHITECTURE=${BUILD_ARCHITECTURE}
RUN patch -u ../3rdParty/webrtc_native/webrtc/src/third_party/libvpx/BUILD.gn ../patches/libvpx_BUILD.gn.patch
RUN ../patches/apply_patch.sh
RUN cmake ../ -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_BUILD_ARCHITECTURE=${BUILD_ARCHITECTURE}
RUN export PATH=/root/webrtc-native-build/3rdParty/depot_tools:$PATH && make -j2
RUN make install
Expand Down
2 changes: 1 addition & 1 deletion docker/ubuntu-22.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN mkdir build
WORKDIR /root/webrtc-native-build/build

RUN cmake ../ -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_BUILD_ARCHITECTURE=${BUILD_ARCHITECTURE}
RUN patch -u ../3rdParty/webrtc_native/webrtc/src/third_party/libvpx/BUILD.gn ../patches/libvpx_BUILD.gn.patch
RUN ../patches/apply_patch.sh
RUN cmake ../ -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_BUILD_ARCHITECTURE=${BUILD_ARCHITECTURE}
RUN export PATH=/root/webrtc-native-build/3rdParty/depot_tools:$PATH && make -j2
RUN make install
Expand Down
2 changes: 1 addition & 1 deletion docker/ubuntu-24.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ WORKDIR /root/webrtc-native-build/3rdParty/webrtc_native/webrtc/src/third_party/
RUN git checkout 7c2b62e93487b772990fddc1905f22d4cfaee4a4

WORKDIR /root/webrtc-native-build/build
RUN patch -u ../3rdParty/webrtc_native/webrtc/src/third_party/libvpx/BUILD.gn ../patches/libvpx_BUILD.gn.patch
RUN ../patches/apply_patch.sh
RUN cmake ../ -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_BUILD_ARCHITECTURE=${BUILD_ARCHITECTURE}
RUN export PATH=/root/webrtc-native-build/3rdParty/depot_tools:$PATH && make -j2
RUN make install
Expand Down
10 changes: 10 additions & 0 deletions patches/apply_patch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#! /usr/bin/bash

SCRIPT=`realpath $0`
SCRIPT_PATH=`dirname $SCRIPT`

patch -u $SCRIPT_PATH/../3rdParty/webrtc_native/webrtc/src/third_party/libvpx/BUILD.gn $SCRIPT_PATH/libvpx_BUILD.gn.patch
patch -u $SCRIPT_PATH/../3rdParty/webrtc_native/webrtc/src/third_party/libvpx/source/config/linux/arm64-highbd/vp9_rtcd.h $SCRIPT_PATH/libvpx_linux_arm64-highbd_vp9_rtcd.h.patch
patch -u $SCRIPT_PATH/../3rdParty/webrtc_native/webrtc/src/third_party/libvpx/source/config/linux/arm64-highbd/vpx_dsp_rtcd.h $SCRIPT_PATH/libvpx_linux_arm64_vpx_dsp_rtcd.h.patch
patch -u $SCRIPT_PATH/../3rdParty/webrtc_native/webrtc/src/third_party/libvpx/source/config/linux/arm64/vp9_rtcd.h $SCRIPT_PATH/libvpx_linux_arm64_vp9_rtcd.h.patch
patch -u $SCRIPT_PATH/../3rdParty/webrtc_native/webrtc/src/third_party/libvpx/source/config/linux/arm64/vpx_dsp_rtcd.h $SCRIPT_PATH/libvpx_linux_arm64_vpx_dsp_rtcd.h.patch
39 changes: 39 additions & 0 deletions patches/libvpx_linux_arm64-highbd_vp9_rtcd.h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
diff --git a/libvpx/source/config/linux/arm64-highbd/vp9_rtcd.h b/libvpx/source/config/linux/arm64-highbd/vp9_rtcd.h
index 53900f30360..a5c0c263753 100644
--- a/libvpx/source/config/linux/arm64-highbd/vp9_rtcd.h
+++ b/libvpx/source/config/linux/arm64-highbd/vp9_rtcd.h
@@ -41,10 +41,6 @@ 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,
@@ -56,9 +52,6 @@ int64_t vp9_block_error_fp_c(const tran_low_t* coeff,
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);
@@ -395,13 +388,7 @@ 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

1,025 changes: 1,025 additions & 0 deletions patches/libvpx_linux_arm64-highbd_vpx_dsp_rtcd.h.patch

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions patches/libvpx_linux_arm64_vp9_rtcd.h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
diff --git a/libvpx/source/config/linux/arm64/vp9_rtcd.h b/libvpx/source/config/linux/arm64/vp9_rtcd.h
index d9c47bef7fd..32f641648bc 100644
--- a/libvpx/source/config/linux/arm64/vp9_rtcd.h
+++ b/libvpx/source/config/linux/arm64/vp9_rtcd.h
@@ -41,10 +41,6 @@ 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,
@@ -56,9 +52,6 @@ int64_t vp9_block_error_fp_c(const tran_low_t* coeff,
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);
@@ -240,13 +233,7 @@ 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

22 changes: 22 additions & 0 deletions patches/libvpx_linux_arm64_vpx_dsp_rtcd.h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/libvpx/source/config/linux/arm64/vpx_dsp_rtcd.h b/libvpx/source/config/linux/arm64/vpx_dsp_rtcd.h
index 0e5bfd955c8..7bcc7b5f717 100644
--- a/libvpx/source/config/linux/arm64/vpx_dsp_rtcd.h
+++ b/libvpx/source/config/linux/arm64/vpx_dsp_rtcd.h
@@ -3106,7 +3106,6 @@ void vpx_subtract_block_neon(int rows,

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);
@@ -3720,9 +3719,6 @@ static void setup_rtcd_internal(void) {
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;

0 comments on commit 4e92082

Please sign in to comment.