Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mark Harris
Opus
Commits
96408b62
Commit
96408b62
authored
Dec 02, 2013
by
Jean-Marc Valin
Browse files
Fixes Opus-custom preemphasis
Also adds denorm avoidance for non-48 kHz rates
parent
086ea7c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
celt/celt_decoder.c
View file @
96408b62
...
...
@@ -213,7 +213,7 @@ void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, c
opus_val16
coef3
=
coef
[
3
];
for
(
j
=
0
;
j
<
N
;
j
++
)
{
celt_sig
tmp
=
x
[
j
]
+
m
;
celt_sig
tmp
=
x
[
j
]
+
m
+
VERY_SMALL
;
m
=
MULT16_32_Q15
(
coef0
,
tmp
)
-
MULT16_32_Q15
(
coef1
,
x
[
j
]);
tmp
=
SHL32
(
MULT16_32_Q15
(
coef3
,
tmp
),
2
);
...
...
@@ -227,7 +227,7 @@ void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, c
/* Shortcut for the standard (non-custom modes) case */
for
(
j
=
0
;
j
<
N
;
j
++
)
{
celt_sig
tmp
=
x
[
j
]
+
m
;
celt_sig
tmp
=
x
[
j
]
+
m
+
VERY_SMALL
;
m
=
MULT16_32_Q15
(
coef0
,
tmp
);
scratch
[
j
]
=
tmp
;
}
...
...
celt/celt_encoder.c
View file @
96408b62
...
...
@@ -508,7 +508,7 @@ void celt_preemphasis(const opus_val16 * OPUS_RESTRICT pcmp, celt_sig * OPUS_RES
opus_val16
coef2
=
coef
[
2
];
for
(
i
=
0
;
i
<
N
;
i
++
)
{
opus_val16
x
,
tmp
;
celt_sig
x
,
tmp
;
x
=
inp
[
i
];
/* Apply pre-emphasis */
tmp
=
MULT16_16
(
coef2
,
x
);
...
...
Write
Preview
Supports
Markdown
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