Accepting request 1081128 from multimedia:libs
OBS-URL: https://build.opensuse.org/request/show/1081128 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/opus?expand=0&rev=23
This commit is contained in:
commit
e3426090c3
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d
|
||||
size 1040054
|
BIN
opus-1.4.tar.gz
(Stored with Git LFS)
Normal file
BIN
opus-1.4.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,41 +0,0 @@
|
||||
From 06a651547f4a197c29b6abc23b530833855ee358 Mon Sep 17 00:00:00 2001
|
||||
From: Niclas Olmenius <niclas@voysys.se>
|
||||
Date: Wed, 19 Feb 2020 13:58:35 +0100
|
||||
Subject: [PATCH] Fix celt decoder assertion when using OPUS_CUSTOM
|
||||
|
||||
When using OPUS_CUSTOM, `CELTDecoder->end` can be larger than 21.
|
||||
Assert against 25 instead in OPUS_CUSTOM builds.
|
||||
|
||||
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
|
||||
---
|
||||
celt/celt_decoder.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/celt/celt_decoder.c b/celt/celt_decoder.c
|
||||
index e6efce93..74ca3b74 100644
|
||||
--- a/celt/celt_decoder.c
|
||||
+++ b/celt/celt_decoder.c
|
||||
@@ -117,13 +117,19 @@ void validate_celt_decoder(CELTDecoder *st)
|
||||
#ifndef CUSTOM_MODES
|
||||
celt_assert(st->mode == opus_custom_mode_create(48000, 960, NULL));
|
||||
celt_assert(st->overlap == 120);
|
||||
+ celt_assert(st->end <= 21);
|
||||
+#else
|
||||
+/* From Section 4.3 in the spec: "The normal CELT layer uses 21 of those bands,
|
||||
+ though Opus Custom (see Section 6.2) may use a different number of bands"
|
||||
+
|
||||
+ Check if it's within the maximum number of Bark frequency bands instead */
|
||||
+ celt_assert(st->end <= 25);
|
||||
#endif
|
||||
celt_assert(st->channels == 1 || st->channels == 2);
|
||||
celt_assert(st->stream_channels == 1 || st->stream_channels == 2);
|
||||
celt_assert(st->downsample > 0);
|
||||
celt_assert(st->start == 0 || st->start == 17);
|
||||
celt_assert(st->start < st->end);
|
||||
- celt_assert(st->end <= 21);
|
||||
#ifdef OPUS_ARCHMASK
|
||||
celt_assert(st->arch >= 0);
|
||||
celt_assert(st->arch <= OPUS_ARCHMASK);
|
||||
--
|
||||
2.26.0
|
||||
|
@ -1,40 +0,0 @@
|
||||
From 3ebf4ad86de2469572f7fa2bd6451469e7867c8f Mon Sep 17 00:00:00 2001
|
||||
From: Felicia Lim <flim@google.com>
|
||||
Date: Fri, 31 May 2019 13:58:44 -0700
|
||||
Subject: [PATCH] Silk CNG adapts faster to received packets with lower gains
|
||||
|
||||
---
|
||||
silk/CNG.c | 4 ++++
|
||||
silk/define.h | 1 +
|
||||
2 files changed, 5 insertions(+)
|
||||
|
||||
diff --git a/silk/CNG.c b/silk/CNG.c
|
||||
index ef8e38df..2a910099 100644
|
||||
--- a/silk/CNG.c
|
||||
+++ b/silk/CNG.c
|
||||
@@ -118,6 +118,10 @@ void silk_CNG(
|
||||
/* Smooth gains */
|
||||
for( i = 0; i < psDec->nb_subfr; i++ ) {
|
||||
psCNG->CNG_smth_Gain_Q16 += silk_SMULWB( psDecCtrl->Gains_Q16[ i ] - psCNG->CNG_smth_Gain_Q16, CNG_GAIN_SMTH_Q16 );
|
||||
+ /* If the smoothed gain is 3 dB greater than this subframe's gain, use this subframe's gain to adapt faster. */
|
||||
+ if( silk_SMULWW( psCNG->CNG_smth_Gain_Q16, CNG_GAIN_SMTH_THRESHOLD_Q16 ) > psDecCtrl->Gains_Q16[ i ] ) {
|
||||
+ psCNG->CNG_smth_Gain_Q16 = psDecCtrl->Gains_Q16[ i ];
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/silk/define.h b/silk/define.h
|
||||
index 247cb0bf..491c86f3 100644
|
||||
--- a/silk/define.h
|
||||
+++ b/silk/define.h
|
||||
@@ -225,6 +225,7 @@ extern "C"
|
||||
/* Defines for CN generation */
|
||||
#define CNG_BUF_MASK_MAX 255 /* 2^floor(log2(MAX_FRAME_LENGTH))-1 */
|
||||
#define CNG_GAIN_SMTH_Q16 4634 /* 0.25^(1/4) */
|
||||
+#define CNG_GAIN_SMTH_THRESHOLD_Q16 46396 /* -3 dB */
|
||||
#define CNG_NLSF_SMTH_Q16 16348 /* 0.25 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
--
|
||||
2.11.0
|
||||
|
@ -1,87 +0,0 @@
|
||||
From 812ae3fb5c589aaafe761b8ebf86bcbbb8f0ed76 Mon Sep 17 00:00:00 2001
|
||||
From: Felicia Lim <flim@google.com>
|
||||
Date: Mon, 8 Jul 2019 09:44:35 -0700
|
||||
Subject: [PATCH] Avoid processing LPC coeffs beyond the given order in NEON
|
||||
optimizations
|
||||
|
||||
---
|
||||
silk/arm/LPC_inv_pred_gain_neon_intr.c | 22 +++++++++++++++-------
|
||||
1 file changed, 15 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/silk/arm/LPC_inv_pred_gain_neon_intr.c b/silk/arm/LPC_inv_pred_gain_neon_intr.c
|
||||
index ab426bcd..726e6667 100644
|
||||
--- a/silk/arm/LPC_inv_pred_gain_neon_intr.c
|
||||
+++ b/silk/arm/LPC_inv_pred_gain_neon_intr.c
|
||||
@@ -210,19 +210,23 @@ opus_int32 silk_LPC_inverse_pred_gain_neon( /* O Returns inverse predi
|
||||
/* Increase Q domain of the AR coefficients */
|
||||
t0_s16x8 = vld1q_s16( A_Q12 + 0 );
|
||||
t1_s16x8 = vld1q_s16( A_Q12 + 8 );
|
||||
- t2_s16x8 = vld1q_s16( A_Q12 + 16 );
|
||||
+ if ( order > 16 ) {
|
||||
+ t2_s16x8 = vld1q_s16( A_Q12 + 16 );
|
||||
+ }
|
||||
t0_s32x4 = vpaddlq_s16( t0_s16x8 );
|
||||
|
||||
switch( order - leftover )
|
||||
{
|
||||
case 24:
|
||||
t0_s32x4 = vpadalq_s16( t0_s32x4, t2_s16x8 );
|
||||
+ vst1q_s32( Atmp_QA + 16, vshll_n_s16( vget_low_s16 ( t2_s16x8 ), QA - 12 ) );
|
||||
+ vst1q_s32( Atmp_QA + 20, vshll_n_s16( vget_high_s16( t2_s16x8 ), QA - 12 ) );
|
||||
/* FALLTHROUGH */
|
||||
|
||||
case 16:
|
||||
t0_s32x4 = vpadalq_s16( t0_s32x4, t1_s16x8 );
|
||||
- vst1q_s32( Atmp_QA + 16, vshll_n_s16( vget_low_s16 ( t2_s16x8 ), QA - 12 ) );
|
||||
- vst1q_s32( Atmp_QA + 20, vshll_n_s16( vget_high_s16( t2_s16x8 ), QA - 12 ) );
|
||||
+ vst1q_s32( Atmp_QA + 8, vshll_n_s16( vget_low_s16 ( t1_s16x8 ), QA - 12 ) );
|
||||
+ vst1q_s32( Atmp_QA + 12, vshll_n_s16( vget_high_s16( t1_s16x8 ), QA - 12 ) );
|
||||
/* FALLTHROUGH */
|
||||
|
||||
case 8:
|
||||
@@ -230,8 +234,8 @@ opus_int32 silk_LPC_inverse_pred_gain_neon( /* O Returns inverse predi
|
||||
const int32x2_t t_s32x2 = vpadd_s32( vget_low_s32( t0_s32x4 ), vget_high_s32( t0_s32x4 ) );
|
||||
const int64x1_t t_s64x1 = vpaddl_s32( t_s32x2 );
|
||||
DC_resp = vget_lane_s32( vreinterpret_s32_s64( t_s64x1 ), 0 );
|
||||
- vst1q_s32( Atmp_QA + 8, vshll_n_s16( vget_low_s16 ( t1_s16x8 ), QA - 12 ) );
|
||||
- vst1q_s32( Atmp_QA + 12, vshll_n_s16( vget_high_s16( t1_s16x8 ), QA - 12 ) );
|
||||
+ vst1q_s32( Atmp_QA + 0, vshll_n_s16( vget_low_s16 ( t0_s16x8 ), QA - 12 ) );
|
||||
+ vst1q_s32( Atmp_QA + 4, vshll_n_s16( vget_high_s16( t0_s16x8 ), QA - 12 ) );
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -246,16 +250,22 @@ opus_int32 silk_LPC_inverse_pred_gain_neon( /* O Returns inverse predi
|
||||
case 6:
|
||||
DC_resp += (opus_int32)A_Q12[ 5 ];
|
||||
DC_resp += (opus_int32)A_Q12[ 4 ];
|
||||
+ Atmp_QA[ order - leftover + 5 ] = silk_LSHIFT32( (opus_int32)A_Q12[ 5 ], QA - 12 );
|
||||
+ Atmp_QA[ order - leftover + 4 ] = silk_LSHIFT32( (opus_int32)A_Q12[ 4 ], QA - 12 );
|
||||
/* FALLTHROUGH */
|
||||
|
||||
case 4:
|
||||
DC_resp += (opus_int32)A_Q12[ 3 ];
|
||||
DC_resp += (opus_int32)A_Q12[ 2 ];
|
||||
+ Atmp_QA[ order - leftover + 3 ] = silk_LSHIFT32( (opus_int32)A_Q12[ 3 ], QA - 12 );
|
||||
+ Atmp_QA[ order - leftover + 2 ] = silk_LSHIFT32( (opus_int32)A_Q12[ 2 ], QA - 12 );
|
||||
/* FALLTHROUGH */
|
||||
|
||||
case 2:
|
||||
DC_resp += (opus_int32)A_Q12[ 1 ];
|
||||
DC_resp += (opus_int32)A_Q12[ 0 ];
|
||||
+ Atmp_QA[ order - leftover + 1 ] = silk_LSHIFT32( (opus_int32)A_Q12[ 1 ], QA - 12 );
|
||||
+ Atmp_QA[ order - leftover + 0 ] = silk_LSHIFT32( (opus_int32)A_Q12[ 0 ], QA - 12 );
|
||||
/* FALLTHROUGH */
|
||||
|
||||
default:
|
||||
@@ -266,8 +276,6 @@ opus_int32 silk_LPC_inverse_pred_gain_neon( /* O Returns inverse predi
|
||||
if( DC_resp >= 4096 ) {
|
||||
invGain_Q30 = 0;
|
||||
} else {
|
||||
- vst1q_s32( Atmp_QA + 0, vshll_n_s16( vget_low_s16 ( t0_s16x8 ), QA - 12 ) );
|
||||
- vst1q_s32( Atmp_QA + 4, vshll_n_s16( vget_high_s16( t0_s16x8 ), QA - 12 ) );
|
||||
invGain_Q30 = LPC_inverse_pred_gain_QA_neon( Atmp_QA, order );
|
||||
}
|
||||
}
|
||||
--
|
||||
2.11.0
|
||||
|
18
opus.changes
18
opus.changes
@ -1,3 +1,21 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 20 21:00:25 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||
|
||||
- Update to version 1.4:
|
||||
* Improved tuning of the Opus in-band FEC (LBRR). See the
|
||||
https://gitlab.xiph.org/xiph/opus/-/issues/2360 for details
|
||||
* Added a OPUS_SET_INBAND_FEC(2) option that turns on FEC, but
|
||||
does not force SILK mode (FEC will be disabled in CELT mode)
|
||||
* Improved tuning and various fixes to DTX
|
||||
* Added Meson support, improved CMake support
|
||||
- Change Source to new home on github.
|
||||
- Use autosetup, make_build and ldconfig_scriptlets macros.
|
||||
- Move AUTHORS and README docs to devel package.
|
||||
- Drop patches fixed upstream:
|
||||
* opus-Fix-celt-decoder-assertion-when-using-OPUS_CUSTOM.patch
|
||||
* opus-Silk-CNG-adapts-faster.patch
|
||||
* opus-Silk-fix-arm-optimization.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 15 17:38:39 UTC 2020 - Gustavo Pichorim Boiko <gboiko@suse.com>
|
||||
|
||||
|
26
opus.spec
26
opus.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package opus
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
@ -19,20 +19,14 @@
|
||||
|
||||
%define sover 0
|
||||
Name: opus
|
||||
Version: 1.3.1
|
||||
Version: 1.4
|
||||
Release: 0
|
||||
Summary: Audio Codec Library
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Libraries/C and C++
|
||||
URL: https://opus-codec.org/
|
||||
Source: https://archive.mozilla.org/pub/opus/%{name}-%{version}.tar.gz
|
||||
Source: https://github.com/xiph/opus/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
||||
Source99: baselibs.conf
|
||||
# PATCH-FIX-UPSTREAM opus-Silk-CNG-adapts-faster.patch -- Silk CNG adapts faster to received packets with lower gains
|
||||
Patch0: opus-Silk-CNG-adapts-faster.patch
|
||||
# PATCH-FIX-UPSTREAM opus-Silk-fix-arm-optimization.patch -- Avoid processing LPC coeffs beyond the given order in NEON optimizations
|
||||
Patch1: opus-Silk-fix-arm-optimization.patch
|
||||
# PATCH-FIX-UPSTREAM opus-Fix-celt-decoder-assertion-when-using-OPUS_CUSTOM.patch -- Fix celt decoder assertion when using OPUS_CUSTOM
|
||||
Patch2: opus-Fix-celt-decoder-assertion-when-using-OPUS_CUSTOM.patch
|
||||
BuildRequires: pkgconfig
|
||||
|
||||
%description
|
||||
@ -60,10 +54,7 @@ the Internet. It is designed by the IETF Codec Working Group and incorporates
|
||||
technology from Skype's SILK codec and Xiph.Org's CELT codec.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%configure \
|
||||
@ -71,24 +62,23 @@ technology from Skype's SILK codec and Xiph.Org's CELT codec.
|
||||
--disable-silent-rules \
|
||||
--disable-doc \
|
||||
--enable-custom-modes
|
||||
make %{?_smp_mflags}
|
||||
%make_build
|
||||
|
||||
%check
|
||||
make %{?_smp_mflags} check
|
||||
%make_build check
|
||||
|
||||
%install
|
||||
%make_install
|
||||
find %{buildroot} -type f -name "*.la" -delete -print
|
||||
|
||||
%post -n libopus%{sover} -p /sbin/ldconfig
|
||||
%postun -n libopus%{sover} -p /sbin/ldconfig
|
||||
%ldconfig_scriptlets -n libopus%{sover}
|
||||
|
||||
%files -n libopus%{sover}
|
||||
%license COPYING
|
||||
%doc AUTHORS README
|
||||
%{_libdir}/libopus.so.%{sover}*
|
||||
|
||||
%files -n libopus-devel
|
||||
%doc AUTHORS README
|
||||
%{_libdir}/libopus.so
|
||||
%{_includedir}/opus
|
||||
%{_libdir}/pkgconfig/opus.pc
|
||||
|
Loading…
Reference in New Issue
Block a user