Closed Bug 1778812 Opened 3 years ago Closed 3 years ago

Update opus to new version caf56aab41c53b129491c986844de029e619ce27 from 2022-07-09 01:51:02

Categories

(Core :: Audio/Video: Playback, enhancement)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1778875
Tracking Status
firefox104 --- affected

People

(Reporter: update-bot, Unassigned)

References

Details

(Whiteboard: [3pl-filed][task_id: dgFAZ5lNTkWEdkc3yFeauQ])

Attachments

(1 obsolete file)

This update covers 37 commits, including 1 new upstream commit I've never filed a bug on before. (It's the top one.):


caf56aab41c53b129491c986844de029e619ce27 by Marcus Asteborg

https://gitlab.xiph.org/xiph/opuscommit/caf56aab41c53b129491c986844de029e619ce27
Authored: 2022-07-08 18:25:46 -0700
Committed: 2022-07-09 01:51:02 -0400

update doc on custom mode

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>

Files Modified:

  • include/opus_custom.h

1f891e3616b4e8b17276830930c296c9f88332e3 by Marcus Asteborg

https://gitlab.xiph.org/xiph/opuscommit/1f891e3616b4e8b17276830930c296c9f88332e3
Authored: 2022-07-07 20:14:37 -0700
Committed: 2022-07-07 22:07:40 -0700

cmake - move warning C4244 to level 4

Opus compare is used to generate test vectors so no cosmetic changes
is taken. Hence we move this warning to level 4 for opus compare.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>

Files Modified:

  • CMakeLists.txt

510e1029b45aa01a7047e5b3b82169be40911b96 by Marcus Asteborg

https://gitlab.xiph.org/xiph/opuscommit/510e1029b45aa01a7047e5b3b82169be40911b96
Authored: 2022-07-06 21:35:16 -0700
Committed: 2022-07-07 22:07:33 -0700

cmake - fix rtcd detection on x86 non windows

Signed-off-by: Mark Harris <mark.hsj@gmail.com>

Files Added:

  • cmake/cpu_info_by_asm.c
  • cmake/cpu_info_by_c.c

Files Modified:

  • CMakeLists.txt
  • Makefile.am
  • cmake/OpusFunctions.cmake

a80e9e9533d4edeaae282b82f77b8bd8a4903eca by Marcus Asteborg

https://gitlab.xiph.org/xiph/opuscommit/a80e9e9533d4edeaae282b82f77b8bd8a4903eca
Authored: 2022-07-05 22:48:35 -0700
Committed: 2022-07-07 22:01:42 -0700

cmake - fix lrintf, lrint detection

This commit addresses the issues of not finding lrintf and lrint. We
switch to check_symbol_exists instead per cmake documentation. Also
make sure to link math lib for detection for nix.

For MSVC the issue for non x86 builds was that the standard was set to
default which is 199409L. This resulted in not using lrintf even that
it was found. To address this we set the C standard to C11 and it will
only apply to newer versions of MSVC where the /std flag is supported.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>

Files Modified:

  • cmake/OpusConfig.cmake

f1b088001ecbc523ffb07109f301d8773bec44b8 by Mark Harris

https://gitlab.xiph.org/xiph/opuscommit/f1b088001ecbc523ffb07109f301d8773bec44b8
Authored: 2022-07-06 22:45:41 -0700
Committed: 2022-07-07 21:39:42 -0700

Fix uninitialized field on custom mode malloc fail

Files Modified:

  • celt/modes.c

4ad7d2108133d070605b25b1eb91e32c279bf81e by Doug Nazar

https://gitlab.xiph.org/xiph/opuscommit/4ad7d2108133d070605b25b1eb91e32c279bf81e
Authored: 2021-03-26 15:49:02 -0400
Committed: 2022-07-06 09:59:17 -0700

meson: Fix reporting of cpu family if intrinsics not supported

Signed-off-by: Doug Nazar <nazard@nazar.ca>

Files Modified:

  • meson.build

918a09a344fde1eb28e0f8475fa84133691b01b1 by Timothy B. Terriberry

https://gitlab.xiph.org/xiph/opuscommit/918a09a344fde1eb28e0f8475fa84133691b01b1
Authored: 2022-07-02 15:13:10 -0700
Committed: 2022-07-06 09:59:12 -0700

Update x86 CPU detection configure check.

Commit 6577534a80c8 switched from using __get_cpuid() to
__get_cpuid_count(), but the corresponding configure check was not
updated.
Since __get_cpuid_count() was introduced much later, make sure we
check for the function we actually use.

Thanks to Mark Harris for the report.

Files Modified:

  • configure.ac

50407983f2f785adf55a16797e1d42741dc1295b by Jean-Marc Valin

https://gitlab.xiph.org/xiph/opuscommit/50407983f2f785adf55a16797e1d42741dc1295b
Authored: 2022-07-06 00:50:54 -0400
Committed: 2022-07-06 00:50:54 -0400

Fix warnings when compiling with FUZZING enabled

Files Modified:

  • celt/rate.c
  • src/opus_encoder.c

4b8becdfc5df002701ea1dd97b37d424b12b519d by Marcus Asteborg

https://gitlab.xiph.org/xiph/opuscommit/4b8becdfc5df002701ea1dd97b37d424b12b519d
Authored: 2022-07-05 19:53:18 -0700
Committed: 2022-07-05 20:38:37 -0700

cmake - Add OPUS_BUILD to test targets

Signed-off-by: Mark Harris <mark.hsj@gmail.com>

Files Modified:

  • CMakeLists.txt

51fb8955e44ee9ccefd0212f67c7dd6fc7184be0 by Mark Harris

https://gitlab.xiph.org/xiph/opuscommit/51fb8955e44ee9ccefd0212f67c7dd6fc7184be0
Authored: 2022-07-05 20:12:43 -0700
Committed: 2022-07-05 20:14:10 -0700

doc: Use consistent alternative notation

Signed-off-by: Mark Harris <mark.hsj@gmail.com>

Files Modified:

  • include/opus.h

99afa9c48e934711f5b07a917b68411353453338 by Alexander Traud

https://gitlab.xiph.org/xiph/opuscommit/99afa9c48e934711f5b07a917b68411353453338
Authored: 2021-10-22 12:19:42 +0000
Committed: 2022-07-05 19:51:04 -0700

Fix opus.h for doxygen when referencing alternative values

Doxygen was not able to resolve the references because it looked
for OPUS_APPLICATION_VOIP/@ref.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>

Files Modified:

  • include/opus.h

4782baf0afd506da58e5275a254d34a248a63bf9 by Marcus Asteborg

https://gitlab.xiph.org/xiph/opuscommit/4782baf0afd506da58e5275a254d34a248a63bf9
Authored: 2022-07-01 06:41:27 -0700
Committed: 2022-07-05 19:20:24 -0700

Remove unused variable in tests

Signed-off-by: Mark Harris <mark.hsj@gmail.com>

Files Modified:

  • tests/test_opus_padding.c

683592180f64f5723274a9105be2f3af6208a901 by Marcus Asteborg

https://gitlab.xiph.org/xiph/opuscommit/683592180f64f5723274a9105be2f3af6208a901
Authored: 2022-06-30 18:57:08 -0700
Committed: 2022-07-05 19:07:43 -0700

Replace assert with test_failed function in test

This will fix -Wunused-but-set-variable on gcc
9.3 release build. Also remove unused assert.h.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>

Files Modified:

  • tests/opus_encode_regressions.c
  • tests/test_opus_common.h
  • tests/test_opus_projection.c

271d48814912a23c7f9443bc81055cbf58ff355b by Jean-Marc Valin

https://gitlab.xiph.org/xiph/opuscommit/271d48814912a23c7f9443bc81055cbf58ff355b
Authored: 2022-07-05 21:58:02 -0400
Committed: 2022-07-05 21:58:02 -0400

Fix warning with --disable-rfc8251

Files Modified:

  • celt/bands.c

bfebf824addf8027ae60dee6ef271980b283a9c1 by Mark Harris

https://gitlab.xiph.org/xiph/opuscommit/bfebf824addf8027ae60dee6ef271980b283a9c1
Authored: 2022-07-05 15:11:02 -0700
Committed: 2022-07-05 18:25:07 -0700

Fix quoting and whitespace errors in build test

Reviewed by Jean-Marc Valin.

Files Modified:

  • tests/opus_build_test.sh
  • tests/random_config.sh

ef10bf56c34e0da31c4ec5572f4e6f23e5b66306 by Mark Harris

https://gitlab.xiph.org/xiph/opuscommit/ef10bf56c34e0da31c4ec5572f4e6f23e5b66306
Authored: 2022-07-02 11:34:46 -0700
Committed: 2022-07-05 15:16:03 -0700

Silence GCC 11+ -Wmaybe-uninitialized warnings

Reviewed by Timothy B. Terriberry.

Files Modified:

  • silk/float/wrappers_FLP.c

98a6042bb67bbe0ddd9d4291de4292c6882bb095 by Jean-Marc Valin

https://gitlab.xiph.org/xiph/opuscommit/98a6042bb67bbe0ddd9d4291de4292c6882bb095
Authored: 2022-07-05 00:16:44 -0400
Committed: 2022-07-05 17:27:32 -0400

Avoids incrementing uninitialized values

The values were never used, but ubsan + valgrind would complain.

Reviewed by Mark Harris

Files Modified:

  • celt/celt_encoder.c

8489ff3ffa6930ee32a9616ca10c7dceceb05f8d by Jean-Marc Valin

https://gitlab.xiph.org/xiph/opuscommit/8489ff3ffa6930ee32a9616ca10c7dceceb05f8d
Authored: 2022-07-03 03:25:59 -0400
Committed: 2022-07-05 17:27:32 -0400

Avoid undefined behaviour within the debug macros

Even when the macro itself would overflow.

Reviewed by Mark Harris

Files Modified:

  • silk/MacroDebug.h

68d21fb5b0c1f38ef9fc82344094cf02103282c3 by Jean-Marc Valin

https://gitlab.xiph.org/xiph/opuscommit/68d21fb5b0c1f38ef9fc82344094cf02103282c3
Authored: 2022-07-03 03:07:00 -0400
Committed: 2022-07-05 17:27:32 -0400

Fix fixed-point overflow in pitch downsampling

Reviewed by Mark Harris

Files Modified:

  • celt/pitch.c

78fe48adfb5b849f263629d391878c7d34596f11 by Jean-Marc Valin

https://gitlab.xiph.org/xiph/opuscommit/78fe48adfb5b849f263629d391878c7d34596f11
Authored: 2022-07-03 01:42:14 -0400
Committed: 2022-07-05 17:27:31 -0400

Fix some 16-bit overflows (using 32-bit macros)

Reviewed by Mark Harris

Files Modified:

  • silk/stereo_LR_to_MS.c
  • silk/stereo_MS_to_LR.c

3cc09dee34a22f89385447fb7bd230140316281f by Jean-Marc Valin

https://gitlab.xiph.org/xiph/opuscommit/3cc09dee34a22f89385447fb7bd230140316281f
Authored: 2022-07-02 22:46:14 -0400
Committed: 2022-07-05 17:27:31 -0400

Avoid left shifts of negative values in debug macros

Reviewed by Mark Harris

Files Modified:

  • celt/fixed_debug.h
  • silk/MacroDebug.h

e535e894196387b12d9fcbc271a98b21572a630b by Timothy B. Terriberry

https://gitlab.xiph.org/xiph/opuscommit/e535e894196387b12d9fcbc271a98b21572a630b
Authored: 2022-07-02 12:14:06 -0700
Committed: 2022-07-05 17:25:54 -0400

Work around UBSan unaligned access errors.

The underlying objects are all 8-bit integers.
Verified that the generated assembly still just uses MOVD.

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>

Files Modified:

  • celt/x86/x86cpu.h

7b6cede819a673cc21e896283668b2d3ddd9e623 by Jean-Marc Valin

https://gitlab.xiph.org/xiph/opuscommit/7b6cede819a673cc21e896283668b2d3ddd9e623
Authored: 2022-07-02 22:41:15 -0400
Committed: 2022-07-05 17:25:17 -0400

Add asan/ubsan support in random tests

Files Modified:

  • tests/random_config.sh

3acaa70965c5570ef1711fee9b3a15eac3e74ffe by Jean-Marc Valin

https://gitlab.xiph.org/xiph/opuscommit/3acaa70965c5570ef1711fee9b3a15eac3e74ffe
Authored: 2022-06-30 20:11:26 -0400
Committed: 2022-06-30 20:11:26 -0400

Adds OPUS_SET_INBAND_FEC(2) option

Unlike OPUS_SET_INBAND_FEC(1), the encoder does not necessarily
switch to SILK if we have music.

Files Modified:

  • include/opus_defines.h
  • src/opus_encoder.c
  • tests/test_opus_api.c

60c48ade0a9d192b8535023bf7c7db40341ece1e by Jean-Marc Valin

https://gitlab.xiph.org/xiph/opuscommit/60c48ade0a9d192b8535023bf7c7db40341ece1e
Authored: 2022-06-30 16:44:34 -0400
Committed: 2022-06-30 16:44:34 -0400

Estimate the inner product accuracy to fix check-asm

Estimate the rounding error so that we can have a useful margin of
error when checking the asm against the C code even when the float
operations get reordered due to -ffast-math.

Files Modified:

  • celt/arm/pitch_neon_intr.c

e0ca05b1ec5ef4abbfed5f70623ed3e5ea77dd6b by Jean-Marc Valin

https://gitlab.xiph.org/xiph/opuscommit/e0ca05b1ec5ef4abbfed5f70623ed3e5ea77dd6b
Authored: 2022-06-30 16:25:03 -0400
Committed: 2022-06-30 16:25:03 -0400

Adds fuzzing to CPU detection

Makes ti possible to randomize (with --enable-fuzzing) the CPU flags
so we can better test all the intrinsics implementations.

Files Modified:

  • celt/arm/armcpu.c
  • celt/x86/x86cpu.c

6577534a80c833bd310276f1e2bd3254271bb86d by Timothy B. Terriberry

https://gitlab.xiph.org/xiph/opuscommit/6577534a80c833bd310276f1e2bd3254271bb86d
Authored: 2022-06-28 22:42:01 -0700
Committed: 2022-06-28 22:57:47 -0700

Work around a valgrind false-positive in CPUID.

Valgrind versions prior to 3.17.0 assume that an uninitialized value
in ECX causes the whole output of CPUID to be uninitialized, even
though ECX is only "read" by CPUID for certain values of EAX.
Work around that by guaranteeing that ECX is initialized.

Files Modified:

  • celt/x86/x86cpu.c

03889ae76dea9c5e63e64df495fd77d613a03a80 by Timothy B. Terriberry

https://gitlab.xiph.org/xiph/opuscommit/03889ae76dea9c5e63e64df495fd77d613a03a80
Authored: 2022-06-28 22:33:43 -0700
Committed: 2022-06-28 22:57:40 -0700

Check the return value of __get_cpuid().

This function can fail if CPUID is not supported or the maximum
supported value of EAX is less than the requested one.
Check the return value and explicitly disable all SIMD if it does
fail.
This was happening before implicitly because of the initialization
of info[] to zero, but being explicit about it makes it less likely
someone will break this behavior because they did not realize what
was going on.

Files Modified:

  • celt/x86/x86cpu.c

ccb42e05cc6eb98a15874b9695361025b3ee17ab by Jean-Marc Valin

https://gitlab.xiph.org/xiph/opuscommit/ccb42e05cc6eb98a15874b9695361025b3ee17ab
Authored: 2022-06-28 02:07:08 -0400
Committed: 2022-06-28 02:07:08 -0400

Fixes valgrind failure caused by silk_find_pred_coefs_*()

The function copies NLSFs from the stack to the state which for
order 10 means we were copying uninitialized values. That in turn
breaks check-asm when comparing the state under valgrind.

Reviewed by Timothy B. Terriberry.

Files Modified:

  • silk/fixed/find_pred_coefs_FIX.c
  • silk/float/find_pred_coefs_FLP.c

d7d4b3487f9b352942d868d056cba520fc4346c7 by Jean-Marc Valin

https://gitlab.xiph.org/xiph/opuscommit/d7d4b3487f9b352942d868d056cba520fc4346c7
Authored: 2022-06-28 01:13:16 -0400
Committed: 2022-06-28 01:13:16 -0400

Fixes --disable-rtcd

Make sure we don't try to use the rtcd table when rtcd is disabled.
That code still needs a lot more cleaning up.

Files Modified:

  • celt/x86/celt_lpc_sse.h
  • celt/x86/pitch_sse.h
  • tests/random_config.sh

31b922e79cbaad7b5143c044ce58b01b4a9be7f8 by Jean-Marc Valin

https://gitlab.xiph.org/xiph/opuscommit/31b922e79cbaad7b5143c044ce58b01b4a9be7f8
Authored: 2022-06-28 01:02:37 -0400
Committed: 2022-06-28 01:02:37 -0400

Silence some warnings for fixed-point debug builds

Reviewed by Timothy B. Terriberry.

Files Modified:

  • celt/fixed_debug.h

be67ea8c7ca22d4803b3828c183af1d47a3932cb by Jean-Marc Valin

https://gitlab.xiph.org/xiph/opuscommit/be67ea8c7ca22d4803b3828c183af1d47a3932cb
Authored: 2022-06-27 23:27:48 -0400
Committed: 2022-06-27 23:27:48 -0400

Fixes wrap-around in silk_inner_prod16_sse4_1()

Thanks Tim

Files Modified:

  • silk/fixed/x86/vector_ops_FIX_sse4_1.c

57ddf37c83eff80a5064c38fde57b6cc6ad1e739 by Mark Harris

https://gitlab.xiph.org/xiph/opuscommit/57ddf37c83eff80a5064c38fde57b6cc6ad1e739
Authored: 2022-06-26 13:40:45 -0700
Committed: 2022-06-26 14:57:24 -0700

Fix 8101b33 to decode ignored redundancy

Even if the redundancy is ignored, the final range from the decoder is
needed for testing.

Reviewed by Timothy B. Terriberry.

Files Modified:

  • src/opus_decoder.c

63855aff731dcf58875c159dc2fa7463a444d617 by Jean-Marc Valin

https://gitlab.xiph.org/xiph/opuscommit/63855aff731dcf58875c159dc2fa7463a444d617
Authored: 2022-06-26 12:48:44 -0400
Committed: 2022-06-26 12:48:44 -0400

Improve background noise estimation for CELT DTX

We now update the background noise estimate even in frames classified
as transient. It shouldn't be a problem because we're using min
statistics. Also, it avoids problems when update frames get
missclassified as transient.

In addition, we now use the duration of losses rather than the
number of lost packets to make decisions. That should make
PLC/DTX behaviour more consistent across frame sizes.

Files Modified:

  • celt/celt_decoder.c

8101b33e6c59b51b22aeeeaf39045e34a402b01f by Mark Harris

https://gitlab.xiph.org/xiph/opuscommit/8101b33e6c59b51b22aeeeaf39045e34a402b01f
Authored: 2022-06-20 22:23:26 -0700
Committed: 2022-06-25 14:10:35 -0700

Correct redundancy handling with lost/DTX frames

In https://github.com/xiph/opus/issues/253, the encoder generates a
Hybrid frame with redundancy, to switch to CELT-only mode, and then
activates DTX immediately afterwards. The decoder ran Hybrid PLC,
which isn't right. Use CELT PLC instead if there was already a
transition to CELT via redundancy at the end of the previous frame.

Also do not use a stale CELT decoder to decode a second redundancy
frame when the first redundancy frame for a transition from SILK-only
mode was lost. Instead of mixing in old audio from the last time
that CELT was used, ignore the second redundancy frame in this case.
Alternatively the CELT decoder could be reset before decoding, but
it would not be ready until after the 2.5 ms of audio that is needed.

Reviewed by Jean-Marc Valin.

Files Modified:

  • src/opus_decoder.c

ccaaffa9a3ee427e9401c4dcf6462e378d9a4694 by Jean-Marc Valin

https://gitlab.xiph.org/xiph/opuscommit/ccaaffa9a3ee427e9401c4dcf6462e378d9a4694
Authored: 2022-04-02 15:21:48 -0400
Committed: 2022-04-02 15:21:48 -0400

print rate used for testvectors

Files Modified:

  • tests/random_config.sh

6ba284f22feeedb394697d112cf1da80c77bb5a4 by Jean-Marc Valin

https://gitlab.xiph.org/xiph/opuscommit/6ba284f22feeedb394697d112cf1da80c77bb5a4
Authored: 2022-04-02 15:18:07 -0400
Committed: 2022-04-02 15:18:07 -0400

Fix lrint/lrintf detection

Prevents using lrint/lrintf when compiling with -std=c90 even though the
functions are in libm. This was causing tests to fail, likely due to
incorrect prototypes.

Files Modified:

  • celt/float_cast.h

It looks like we experienced one or more build failures when trying to apply this
update. You will need to apply this update manually; you can replicate the patch
locally with ./mach vendor media/libopus/moz.yaml. I'm going to abandon the Phabricator patch and
let you submit a new one.

If the build failure wasn't caused by a library change, and was instead caused by
something structural in the build system please let my maintainers know in
Slack:#secinf.

I do my best to automatically add new files to the build, but some moz.build files
are complicated and you may need to fix them manually.

Flags: needinfo?(kinetik)
Attachment #9284796 - Attachment is obsolete: true

This bug is being closed because a newer revision of the library is available.
This bug will be marked as a duplicate of it (because although this bug is older, it is superseded by the newer one).

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Flags: needinfo?(kinetik)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: