Skip to content

Commit

Permalink
Bug 1778921 - Update libopus build config to prepare for next update.…
Browse files Browse the repository at this point in the history
… r=media-playback-reviewers,alwu

Differential Revision: https://phabricator.services.mozilla.com/D151462
  • Loading branch information
kinetiknz committed Jul 12, 2022
1 parent 81d66e3 commit d2210dd
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 39 deletions.
5 changes: 4 additions & 1 deletion media/libopus/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,16 @@ else:

if CONFIG["CPU_ARCH"] in ("x86", "x86_64"):
DEFINES["OPUS_HAVE_RTCD"] = True
DEFINES["CPU_INFO_BY_ASM"] = True
DEFINES["OPUS_X86_MAY_HAVE_SSE"] = True
DEFINES["OPUS_X86_MAY_HAVE_SSE2"] = True
DEFINES["OPUS_X86_MAY_HAVE_SSE4_1"] = True
DEFINES["OPUS_X86_MAY_HAVE_AVX"] = True
SOURCES += celt_sources_x86_rtcd
SOURCES += celt_sources_sse
SOURCES += celt_sources_sse2
SOURCES += celt_sources_sse4_1
SOURCES += silk_sources_x86_rtcd
SOURCES += silk_sources_sse4_1
if not CONFIG["MOZ_SAMPLE_TYPE_FLOAT32"]:
SOURCES += silk_sources_fixed_sse4_1
Expand All @@ -106,7 +109,7 @@ if CONFIG["CPU_ARCH"] in ("x86", "x86_64"):
SOURCES[f].flags += ["-msse4.1"]

if CONFIG["CPU_ARCH"] == "arm" and CONFIG["GNU_AS"]:
SOURCES += celt_sources_arm
SOURCES += celt_sources_arm_rtcd
SOURCES += [
"!celt_pitch_xcorr_arm-gnu.s"
]
Expand Down
2 changes: 2 additions & 0 deletions media/libopus/moz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ vendoring:
- COPYING
- gen-sources.py
- "*.patch"
- Makefile.in
- README_MOZILLA
- sources.mozbuild
- update.sh
Expand All @@ -65,3 +66,4 @@ vendoring:
file: moz.build
pattern: 'DEFINES\["OPUS_VERSION"\] = "(.+)"'
with: 'DEFINES["OPUS_VERSION"] = "{revision}"'

8 changes: 5 additions & 3 deletions media/libopus/nonunified.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@ diff --git a/media/libopus/sources.mozbuild b/media/libopus/sources.mozbuild
index 8a39b9f..dfc2c62 100644
--- a/media/libopus/sources.mozbuild
+++ b/media/libopus/sources.mozbuild
@@ -2,8 +2,6 @@
@@ -2,8 +2,5 @@
celt_sources = [
'celt/bands.c',
'celt/celt.c',
- 'celt/celt.c',
- 'celt/celt_decoder.c',
- 'celt/celt_encoder.c',
'celt/celt_lpc.c',
'celt/cwrs.c',
'celt/entcode.c',
@@ -20,6 +18,15 @@ celt_sources = [
@@ -20,6 +18,17 @@ celt_sources = [
'celt/vq.c',
]

+opus_nonunified_sources = [
+ # Disabled because of undefined reference to celt_fatal at link time
+ 'celt/celt.c',
+ # Disabled because of name clash of opus_custom_encoder_get_size.
+ 'celt/celt_decoder.c',
+ 'celt/celt_encoder.c',
Expand Down
34 changes: 0 additions & 34 deletions media/libopus/nonunified2.patch

This file was deleted.

1 change: 0 additions & 1 deletion media/libopus/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,3 @@ python3 gen-sources.py $1

# apply outstanding local patches
patch -p3 --no-backup-if-mismatch < nonunified.patch
patch -p3 --no-backup-if-mismatch < nonunified2.patch

0 comments on commit d2210dd

Please sign in to comment.