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
d41c028d
Commit
d41c028d
authored
14 years ago
by
Jean-Marc Valin
Browse files
Options
Downloads
Patches
Plain Diff
Revert
de32a5bf
Moves all the delay compensation back into the encoder only
parent
d3dc19ba
Loading
Loading
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/Makefile.am
+1
-1
1 addition, 1 deletion
src/Makefile.am
src/opus_decoder.c
+3
-24
3 additions, 24 deletions
src/opus_decoder.c
src/opus_decoder.h
+0
-4
0 additions, 4 deletions
src/opus_decoder.h
src/opus_encoder.h
+1
-1
1 addition, 1 deletion
src/opus_encoder.h
with
5 additions
and
30 deletions
src/Makefile.am
+
1
−
1
View file @
d41c028d
INCLUDES
=
-I
$(
top_srcdir
)
/celt/libcelt/
-I
$(
top_srcdir
)
/silk/interface
-I
$(
top_srcdir
)
/silk/src_SigProc_FIX
INCLUDES
=
-I
$(
top_srcdir
)
/celt/libcelt/
-I
$(
top_srcdir
)
/silk/interface
lib_LTLIBRARIES
=
libietfcodec.la
libietfcodec_la_SOURCES
=
opus_decoder.c opus_encoder.c
...
...
This diff is collapsed.
Click to expand it.
src/opus_decoder.c
+
3
−
24
View file @
d41c028d
...
...
@@ -36,7 +36,7 @@
#include
"entdec.h"
#include
"modes.h"
#include
"SKP_Silk_SDK_API.h"
#include
"SKP_Silk_SigProc_FIX.h"
OpusDecoder
*
opus_decoder_create
(
int
Fs
,
int
channels
)
{
...
...
@@ -166,12 +166,6 @@ int opus_decode(OpusDecoder *st, const unsigned char *data,
DecControl
.
internalSampleRate
=
16000
;
}
if
(
transition
)
{
/*SKP_Silk_resampler_state_struct state;
SKP_Silk_resampler_init( &state, st->Fs, 16000);
*/
}
lost_flag
=
data
==
NULL
?
1
:
2
*
decode_fec
;
decoded_samples
=
0
;
do
{
...
...
@@ -225,23 +219,8 @@ int opus_decode(OpusDecoder *st, const unsigned char *data,
celt_decoder_ctl
(
st
->
celt_dec
,
CELT_RESET_STATE
);
/* Decode CELT */
celt_ret
=
celt_decode_with_ec
(
st
->
celt_dec
,
decode_fec
?
NULL
:
data
,
len
,
pcm_celt
,
frame_size
,
&
dec
);
/* Mix and add resampler delay compensation to CELT */
for
(
i
=
0
;
i
<
DECODER_DELAY
*
st
->
channels
;
i
++
)
pcm
[
i
]
=
ADD_SAT16
(
pcm
[
i
],
st
->
delay_buffer
[
i
+
(
DECODER_BUFFER
-
DECODER_DELAY
)
*
st
->
channels
]);
for
(;
i
<
frame_size
*
st
->
channels
;
i
++
)
pcm
[
i
]
=
ADD_SAT16
(
pcm
[
i
],
pcm_celt
[
i
-
DECODER_DELAY
*
st
->
channels
]);
if
(
frame_size
>
DECODER_BUFFER
)
{
for
(
i
=
0
;
i
<
DECODER_BUFFER
*
st
->
channels
;
i
++
)
st
->
delay_buffer
[
i
]
=
pcm_celt
[(
frame_size
-
DECODER_BUFFER
)
*
st
->
channels
+
i
];
}
else
{
int
tmp
=
DECODER_BUFFER
-
frame_size
;
for
(
i
=
0
;
i
<
tmp
*
st
->
channels
;
i
++
)
st
->
delay_buffer
[
i
]
=
st
->
delay_buffer
[
i
+
frame_size
*
st
->
channels
];
for
(
i
=
0
;
i
<
frame_size
*
st
->
channels
;
i
++
)
st
->
delay_buffer
[
tmp
*
st
->
channels
+
i
]
=
pcm_celt
[
i
];
}
for
(
i
=
0
;
i
<
frame_size
*
st
->
channels
;
i
++
)
pcm
[
i
]
=
ADD_SAT16
(
pcm
[
i
],
pcm_celt
[
i
]);
}
if
(
transition
)
...
...
This diff is collapsed.
Click to expand it.
src/opus_decoder.h
+
0
−
4
View file @
d41c028d
...
...
@@ -31,9 +31,6 @@
#include
"celt.h"
#include
"opus.h"
#define DECODER_DELAY 5
#define DECODER_BUFFER 120
struct
OpusDecoder
{
CELTDecoder
*
celt_dec
;
void
*
silk_dec
;
...
...
@@ -45,7 +42,6 @@ struct OpusDecoder {
int
Fs
;
int
prev_mode
;
short
delay_buffer
[
DECODER_BUFFER
*
2
];
#ifdef OPUS_TEST_RANGE_CODER_STATE
int
rangeFinal
;
#endif
...
...
This diff is collapsed.
Click to expand it.
src/opus_encoder.h
+
1
−
1
View file @
d41c028d
...
...
@@ -33,7 +33,7 @@
#include
"SKP_Silk_SDK_API.h"
/* FIXME: This is only valid for 48 kHz */
#define ENCODER_DELAY_COMPENSATION 1
25
#define ENCODER_DELAY_COMPENSATION 1
30
#define ENCODER_BUFFER 480
struct
OpusEncoder
{
...
...
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