Debian Patches

Status for webrtc-audio-processing/1.3-3

Patch Description Author Forwarded Bugs Origin Last update
big-endian-support.patch big endian support Provide endianness converters before writing or after reading WAV Nicholas Guriev <nicholas@guriev.su> no https://github.com/desktop-app/tg_owt/commit/65f002e 2022-02-01
avoid-sse2-on-i386.patch media-libs/webrtc-audio-processing: fix x86 w/o SSE
Tested with CFLAGS="-O2" CFLAGS_x86="-m32 -O2 -mno-sse -march=i686 -fcf-protection=none" e webrtc-audio-processing-1.3-r3.ebuild clean compile.
Sam James <sam@gentoo.org> yes upstream https://gitweb.gentoo.org/repo/gentoo.git/tree/media-libs/webrtc-audio-processing/files/webrtc-audio-processing-1.3-x86-no-sse.patch?id=29cd0e622b574df6adff5704ab4e220709619767 2024-11-01
Add-generic-byte-order-and-pointer-size-detection.patch Add generic byte order and pointer size detection Than <than@redhat.com> no https://bugs.freedesktop.org/show_bug.cgi?id=95738#c4 2022-02-01
fix-mips-source-path.patch fix MIPS-specific source path Jonas Smedegaard <dr@jones.dk> yes 2024-11-01
file_wrapper-include-stdint.patch file_wrapper.h: Fix build with GCC13
It is a missed instance of cdec109331de34958a892a1418d67806b171b862 (!31).

Fixes #32
"L. E. Segovia" <amy@centricular.com> no upstream, https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/commit/9a202fb8 2024-11-01
task_queue_base-include-stdint.patch webrtc/api/task_queue/task_queue_base.h: add missing <stdint.h> include
Without the change the build fails on upcoming `gcc-15` as:

FAILED: webrtc/rtc_base/liblibbase.a.p/platform_thread.cc.o
g++ -Iwebrtc/rtc_base/liblibbase.a.p -Iwebrtc/rtc_base -I../webrtc/rtc_base -Iwebrtc -I../webrtc -I/nix/store/w2k6x9126cffd3db93bs4435krsbsz90-abseil-cpp-20240116.2/include -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++17 -fPIC -DNOMINMAX -pthread -DWEBRTC_LIBRARY_IMPL -DWEBRTC_ENABLE_SYMBOL_EXPORT -DNDEBUG -DWEBRTC_POSIX -DWEBRTC_LINUX -DWEBRTC_THREAD_RR -DWEBRTC_ENABLE_AVX2 -MD -MQ webrtc/rtc_base/liblibbase.a.p/platform_thread.cc.o -MF webrtc/rtc_base/liblibbase.a.p/platform_thread.cc.o.d -o webrtc/rtc_base/liblibbase.a.p/platform_thread.cc.o -c ../webrtc/rtc_base/platform_thread.cc
In file included from ../webrtc/rtc_base/synchronization/sequence_checker.h:15,
from ../webrtc/rtc_base/thread_checker.h:17,
from ../webrtc/rtc_base/platform_thread.h:22,
from ../webrtc/rtc_base/platform_thread.cc:11:
../webrtc/api/task_queue/task_queue_base.h:53:32: error: 'uint32_t' has not been declared
53 | uint32_t milliseconds) = 0;
| ^~~~~~~~
Sergei Trofimovich <slyich@gmail.com> yes upstream 2024-11-01
decode-base64-files.patch Decode base64-encoded third-party files
Some files were committed into the repository as base64 encoded files.
Presumably, this is because the "text" download links on Google's
Gitiles web interface sends them as such. These can be found by running
`git grep "^[[:alnum:]]\{128,\}=*$"`. Decode them with `base64 -d`.
Alper Nebi Yasak <alpernebiyasak@gmail.com> yes 2024-11-01
aecm-mips-use-uintptr_t.patch AECM: MIPS: Use uintptr_t for pointer arithmetic
Trying to compile the MIPS-specific AECM audio processing file for
mips64el on Debian results in the following errors:

../webrtc/modules/audio_processing/aecm/aecm_core_mips.cc: In function ‘int webrtc::WebRtcAecm_ProcessBlock(AecmCore*, const int16_t*, const int16_t*, const int16_t*, int16_t*)’:
../webrtc/modules/audio_processing/aecm/aecm_core_mips.cc:955:30: error: cast from ‘int16_t*’ {aka ‘short int*’} to ‘uint32_t’ {aka ‘unsigned int’} loses precision [-fpermissive]
955 | int16_t* fft = (int16_t*)(((uint32_t)fft_buf + 31) & ~31);
| ^~~~~~~~~~~~~~~~~
../webrtc/modules/audio_processing/aecm/aecm_core_mips.cc:955:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
955 | int16_t* fft = (int16_t*)(((uint32_t)fft_buf + 31) & ~31);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../webrtc/modules/audio_processing/aecm/aecm_core_mips.cc:956:36: error: cast from ‘int32_t*’ {aka ‘int*’} to ‘uint32_t’ {aka ‘unsigned int’} loses precision [-fpermissive]
956 | int32_t* echoEst32 = (int32_t*)(((uint32_t)echoEst32_buf + 31) & ~31);
| ^~~~~~~~~~~~~~~~~~~~~~~
../webrtc/modules/audio_processing/aecm/aecm_core_mips.cc:956:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
956 | int32_t* echoEst32 = (int32_t*)(((uint32_t)echoEst32_buf + 31) & ~31);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../webrtc/modules/audio_processing/aecm/aecm_core_mips.cc:957:40: error: cast from ‘int32_t*’ {aka ‘int*’} to ‘uint32_t’ {aka ‘unsigned int’} loses precision [-fpermissive]
957 | ComplexInt16* dfw = (ComplexInt16*)(((uint32_t)dfw_buf + 31) & ~31);
| ^~~~~~~~~~~~~~~~~
../webrtc/modules/audio_processing/aecm/aecm_core_mips.cc:957:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
957 | ComplexInt16* dfw = (ComplexInt16*)(((uint32_t)dfw_buf + 31) & ~31);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../webrtc/modules/audio_processing/aecm/aecm_core_mips.cc:958:40: error: cast from ‘int32_t*’ {aka ‘int*’} to ‘uint32_t’ {aka ‘unsigned int’} loses precision [-fpermissive]
958 | ComplexInt16* efw = (ComplexInt16*)(((uint32_t)efw_buf + 31) & ~31);
| ^~~~~~~~~~~~~~~~~
../webrtc/modules/audio_processing/aecm/aecm_core_mips.cc:958:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
958 | ComplexInt16* efw = (ComplexInt16*)(((uint32_t)efw_buf + 31) & ~31);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Presumably, this file was written for 32-bit MIPS so the author used
uint32_t to do pointer arithmetic over these arrays. Fix the errors by
using uintptr_t to work with pointers.
Alper Nebi Yasak <alpernebiyasak@gmail.com> yes 2024-11-01
avoid-default-aecm-on-mips.patch meson: Avoid default AECM implementation on MIPS
Trying to link both aecm/aecm_core_mips.cc and aecm/aecm_core_c.cc into
the same library results in an error because they both try to implement
webrtc::WebRtcAecm_ProcessBlock():

[306/306] Linking target webrtc/modules/audio_processing/libwebrtc-audio-processing-1.so.3
FAILED: webrtc/modules/audio_processing/libwebrtc-audio-processing-1.so.3
c++ @webrtc/modules/audio_processing/libwebrtc-audio-processing-1.so.3.rsp
/usr/bin/ld: webrtc/modules/audio_processing/libwebrtc-audio-processing-1.so.3.p/aecm_aecm_core_mips.cc.o: in function `webrtc::WebRtcAecm_ProcessBlock(webrtc::AecmCore*, short const*, short const*, short const*, short*)':
[...]/webrtc/modules/audio_processing/aecm/aecm_core_mips.cc:934: multiple definition of `webrtc::WebRtcAecm_ProcessBlock(webrtc::AecmCore*, short const*, short const*, short const*, short*)'; webrtc/modules/audio_processing/libwebrtc-audio-processing-1.so.3.p/aecm_aecm_core_c.cc.o:[...]/webrtc/modules/audio_processing/aecm/aecm_core_c.cc:377: first defined here
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

The MIPS-specific file is a replacement for the other, unlike the NEON
case. Don't add the default implementation unconditionally, add it only
for non-MIPS builds.
Alper Nebi Yasak <alpernebiyasak@gmail.com> yes 2024-11-01
drop-bad-mips-cflag.patch meson: Drop malformed WEBRTC_ARCH_MIPS_FAMILY cflags argument
The top-level meson.build file adds WEBRTC_ARCH_MIPS_FAMILY to
arch_cflags for mips architectures, which causes the following error:

[1/306] Compiling C++ object webrtc/rtc_base/liblibbase.a.p/synchronization_yield.cc.o
FAILED: webrtc/rtc_base/liblibbase.a.p/synchronization_yield.cc.o
c++ [...] -DWEBRTC_THREAD_RR WEBRTC_ARCH_MIPS_FAMILY -MD [...] ../webrtc/rtc_base/synchronization/yield.cc
c++: warning: WEBRTC_ARCH_MIPS_FAMILY: linker input file unused because linking not done
c++: error: WEBRTC_ARCH_MIPS_FAMILY: linker input file not found: No such file or directory

It is supposed to be "-DWEBRTC_ARCH_MIPS_FAMILY". But, that macro is
already defined in arch.h when building for mips:

[30/306] Compiling C++ object webrtc/system_wrappers/libsystem_wrappers.a.p/source_cpu_features.cc.o
In file included from ../webrtc/system_wrappers/source/cpu_features.cc:13:
../webrtc/rtc_base/system/arch.h:47:9: warning: "WEBRTC_ARCH_MIPS_FAMILY" redefined
47 | #define WEBRTC_ARCH_MIPS_FAMILY
| ^~~~~~~~~~~~~~~~~~~~~~~
<command-line>: note: this is the location of the previous definition

Drop the broken, unnecessary argument from cflags.
Alper Nebi Yasak <alpernebiyasak@gmail.com> yes 2024-11-01
mips-vector-ops-dsp-guard.patch common_audio: Add MIPS_DSP_R1_LE guard for vector scaling ops
The MIPS-specific source for vector scaling operations fails to build on
Debian's mips64el:

[97/303] Compiling C object webrtc/common_audio/libcommon_audio.a.p/signal_processing_vector_scaling_operations_mips.c.o
FAILED: webrtc/common_audio/libcommon_audio.a.p/signal_processing_vector_scaling_operations_mips.c.o
cc [...] webrtc/common_audio/libcommon_audio.a.p/signal_processing_vector_scaling_operations_mips.c.o.d -o webrtc/common_audio/libcommon_audio.a.p/signal_processing_vector_scaling_operations_mips.c.o -c ../webrtc/common_audio/signal_processing/vector_scaling_operations_mips.c
/tmp/cc7UGPkY.s: Assembler messages:
/tmp/cc7UGPkY.s:57: Error: opcode not supported on this processor: mips64r2 (mips64r2) `extrv_r.w $3,$ac0,$8'
ninja: build stopped: subcommand failed.

The EXTRV_R.W instruction it uses is part of DSP extensions for this
architecture. In signal_processing_library.h, this function's prototype
is guarded with #if defined(MIPS_DSP_R1_LE). Guard the implementation
like that as well to fix the error.
Alper Nebi Yasak <alpernebiyasak@gmail.com> yes 2024-11-01

All known versions for source package 'webrtc-audio-processing'

Links