Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Opus
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mark Harris
Opus
Commits
7e122394
Unverified
Commit
7e122394
authored
Oct 29, 2016
by
Jean-Marc Valin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use hybrid "weak transients" on vowels
parent
e8b6ee2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
celt/celt_encoder.c
celt/celt_encoder.c
+8
-4
No files found.
celt/celt_encoder.c
View file @
7e122394
...
...
@@ -226,7 +226,7 @@ void opus_custom_encoder_destroy(CELTEncoder *st)
static
int
transient_analysis
(
const
opus_val32
*
OPUS_RESTRICT
in
,
int
len
,
int
C
,
opus_val16
*
tf_estimate
,
int
*
tf_chan
,
int
low_rate
,
opus_val16
*
tf_estimate
,
int
*
tf_chan
,
int
allow_weak_transients
,
int
*
weak_transient
)
{
int
i
;
...
...
@@ -262,7 +262,7 @@ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int
decay of 3.3 dB/ms. This avoids having to code transients at very low
bitrate (mostly for hybrid), which can result in unstable energy and/or
partial collapse. */
if
(
low_rate
)
if
(
allow_weak_transients
)
{
#ifdef FIXED_POINT
forward_shift
=
5
;
...
...
@@ -385,7 +385,7 @@ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int
is_transient
=
mask_metric
>
200
;
/* For low bitrates, define "weak transients" that need to be
handled differently to avoid partial collapse. */
if
(
low_rate
&&
is_transient
&&
mask_metric
<
600
)
{
if
(
allow_weak_transients
&&
is_transient
&&
mask_metric
<
600
)
{
is_transient
=
0
;
*
weak_transient
=
1
;
}
...
...
@@ -1612,8 +1612,12 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
shortBlocks
=
0
;
if
(
st
->
complexity
>=
1
&&
!
st
->
lfe
)
{
/* Reduces the likelihood of energy instability on fricatives at low bitrate
in hybrid mode. It seems like we still want to have real transients on vowels
though (small SILK quantization offset value). */
int
allow_weak_transients
=
hybrid
&&
effectiveBytes
<
15
&&
st
->
silk_info
.
offset
>=
100
;
isTransient
=
transient_analysis
(
in
,
N
+
overlap
,
CC
,
&
tf_estimate
,
&
tf_chan
,
effectiveBytes
<
15
,
&
weak_transient
);
&
tf_estimate
,
&
tf_chan
,
allow_weak_transients
,
&
weak_transient
);
}
if
(
LM
>
0
&&
ec_tell
(
enc
)
+
3
<=
total_bits
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment