Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update webrtc #14

Merged
merged 19 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
architecture: [arm64, amd64]
build-type: [Release, Debug]

Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-11, macos-12, macos-13]
os: [macos-12, macos-13]
architecture: [osx64]
build-type: [Release, Debug]

Expand Down Expand Up @@ -192,6 +192,7 @@ jobs:
working-directory: build
run: |
cmake ../ -DCMAKE_BUILD_TYPE=${{ matrix.build-type}} -DCMAKE_BUILD_ARCHITECTURE=${{ matrix.architecture }}
export PATH=$PWD/../3rdParty/depot_tools:$PATH
make -j3
make install

Expand Down
2 changes: 1 addition & 1 deletion 3rdParty/depot_tools
Submodule depot_tools updated from 6953eb to 9e9fc9
4 changes: 2 additions & 2 deletions 3rdParty/webrtc_native/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# VERSION MAJOR = 121, MINOR=0, BUILD=6167, PATCH=54
set(WEBRTC_CHECKOUT 3df661f79828194d0acb51a1480833bafd9e5066)
# VERSION MAJOR = 125, MINOR=0, BUILD=6422, PATCH=224
set(WEBRTC_CHECKOUT 8505a9838ea91c66c96c173d30cd66f9dbcc7548)

if(WIN32)

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6167.3df661.54
6422.8505a9.224
5 changes: 3 additions & 2 deletions docker/ubuntu-20.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ WORKDIR /root/webrtc-native-build
RUN mkdir build

WORKDIR /root/webrtc-native-build/build

RUN cmake ../ -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_BUILD_ARCHITECTURE=${BUILD_ARCHITECTURE}
RUN make -j2
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

VOLUME [ "/data" ]
Expand Down
4 changes: 3 additions & 1 deletion docker/ubuntu-22.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ RUN mkdir build
WORKDIR /root/webrtc-native-build/build

RUN cmake ../ -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_BUILD_ARCHITECTURE=${BUILD_ARCHITECTURE}
RUN make -j2
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

VOLUME [ "/data" ]
Expand Down
42 changes: 42 additions & 0 deletions docker/ubuntu-24.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM ubuntu:24.04
# Change default shell to bash
SHELL ["/bin/bash", "--login", "-c"]

# Install build dependencies
RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -y \
build-essential git sudo vim libprotobuf-dev protobuf-compiler locales wget curl cmake pkg-config ca-certificates \
ninja-build libssl-dev libboost-all-dev libglib2.0-dev libgtk-3-dev libpulse-dev libasound2-dev patch

# Install cross-compiler
RUN apt install -y g++-aarch64-linux-gnu gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf clang

# Define a build-time argument
ARG BUILD_TYPE=Release
ARG BUILD_ARCHITECTURE=amd64
ARG BUILD_BRANCH=main

# Set Working directory
WORKDIR /root

# Checkout code
RUN git clone -b ${BUILD_BRANCH} https://github.com/introlab/webrtc-native-build.git --recurse-submodules

WORKDIR /root/webrtc-native-build
RUN mkdir build

WORKDIR /root/webrtc-native-build/build
RUN cmake ../ -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_BUILD_ARCHITECTURE=${BUILD_ARCHITECTURE}

WORKDIR /root/webrtc-native-build/3rdParty/webrtc_native/webrtc/src/third_party/boringssl/src
RUN git checkout 7c2b62e93487b772990fddc1905f22d4cfaee4a4

WORKDIR /root/webrtc-native-build/build
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

VOLUME [ "/data" ]

WORKDIR /root/webrtc-native-build/dist/${BUILD_TYPE}
CMD ["/bin/bash", "-c", "tar cvzf /data/release.tar.gz ."]
4 changes: 4 additions & 0 deletions docker/ubuntu-24.04/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
docker buildx build -t webrtc --build-arg BUILD_TYPE=Debug --build-arg BUILD_ARCHITECTURE=arm64 --build-arg BUILD_BRANCH=update-webrtc .
docker run --rm \
--volume $PWD:/data webrtc \
tar cvzf /data/release.tar.gz ./
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
18 changes: 18 additions & 0 deletions patches/libvpx_BUILD.gn.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@@ -369,7 +369,7 @@ if (current_cpu == "arm64") {
# SVE is disabled for Windows due to a limitation with clang-cl-18:
# third_party\llvm-build\Release+Asserts\lib\clang\18\include\arm_sve.h(271,1):
# error: cannot mangle this built-in __SVInt8_t type yet
- if (!is_win) {
+ if (!is_win && is_clang) {
source_set("libvpx_intrinsics_sve") {
check_includes = false
configs -= [ "//build/config/compiler:chromium_code" ]
@@ -583,7 +583,7 @@ static_library("libvpx") {
if (current_cpu == "arm64") {
deps += [ ":libvpx_intrinsics_neon_dotprod" ]
deps += [ ":libvpx_intrinsics_neon_i8mm" ]
- if (!is_win) {
+ if (!is_win && is_clang) {
deps += [
":libvpx_intrinsics_sve",
":libvpx_intrinsics_sve2",
35 changes: 35 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,35 @@
@@ -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

Loading
Loading