Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Opus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marcus Asteborg
Opus
Commits
fd152f55
Commit
fd152f55
authored
13 years ago
by
Koen Vos
Committed by
Jean-Marc Valin
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fixes a mixup between decoder and PLC states
parent
1ee6b48c
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
silk/PLC.c
+3
-3
3 additions, 3 deletions
silk/PLC.c
silk/PLC.h
+0
-1
0 additions, 1 deletion
silk/PLC.h
with
3 additions
and
4 deletions
silk/PLC.c
+
3
−
3
View file @
fd152f55
...
...
@@ -56,6 +56,8 @@ void silk_PLC_Reset(
psDec
->
sPLC
.
pitchL_Q8
=
silk_LSHIFT
(
psDec
->
frame_length
,
8
-
1
);
psDec
->
sPLC
.
prevGain_Q16
[
0
]
=
SILK_FIX_CONST
(
1
,
16
);
psDec
->
sPLC
.
prevGain_Q16
[
1
]
=
SILK_FIX_CONST
(
1
,
16
);
psDec
->
sPLC
.
subfr_length
=
20
;
psDec
->
sPLC
.
nb_subfr
=
2
;
}
void
silk_PLC
(
...
...
@@ -123,10 +125,8 @@ static inline void silk_PLC_update(
}
}
#if USE_SINGLE_TAP
silk_memset
(
psPLC
->
LTPCoef_Q14
,
0
,
LTP_ORDER
*
sizeof
(
opus_int16
)
);
psPLC
->
LTPCoef_Q14
[
LTP_ORDER
/
2
]
=
LTP_Gain_Q14
;
#endif
/* Limit LT coefs */
if
(
LTP_Gain_Q14
<
V_PITCH_GAIN_START_MIN_Q14
)
{
...
...
@@ -196,7 +196,7 @@ static inline void silk_PLC_conceal(
}
/* Find the subframe with lowest energy of the last two and use that as random noise generator */
silk_sum_sqr_shift
(
&
energy1
,
&
shift1
,
exc_buf
,
psPLC
->
subfr_length
);
silk_sum_sqr_shift
(
&
energy2
,
&
shift2
,
&
exc_buf
[
ps
Dec
->
subfr_length
],
psPLC
->
subfr_length
);
silk_sum_sqr_shift
(
&
energy2
,
&
shift2
,
&
exc_buf
[
ps
PLC
->
subfr_length
],
psPLC
->
subfr_length
);
if
(
silk_RSHIFT
(
energy1
,
shift2
)
<
silk_RSHIFT
(
energy2
,
shift1
)
)
{
/* First sub-frame has lowest energy */
...
...
This diff is collapsed.
Click to expand it.
silk/PLC.h
+
0
−
1
View file @
fd152f55
...
...
@@ -35,7 +35,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define V_PITCH_GAIN_START_MAX_Q14 15565
/* 0.95 in Q14 */
#define MAX_PITCH_LAG_MS 18
#define SA_THRES_Q8 50
#define USE_SINGLE_TAP 1
#define RAND_BUF_SIZE 128
#define RAND_BUF_MASK ( RAND_BUF_SIZE - 1 )
#define LOG2_INV_LPC_GAIN_HIGH_THRES 3
/* 2^3 = 8 dB LPC gain */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment