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
3ce277ca
Commit
3ce277ca
authored
14 years ago
by
Jean-Marc Valin
Browse files
Options
Downloads
Patches
Plain Diff
Some initial work on stereo support (not complete)
parent
eb1476c7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/opus.h
+2
-2
2 additions, 2 deletions
src/opus.h
src/opus_decoder.c
+2
-2
2 additions, 2 deletions
src/opus_decoder.c
src/opus_encoder.c
+2
-2
2 additions, 2 deletions
src/opus_encoder.c
src/test_opus.c
+2
-2
2 additions, 2 deletions
src/test_opus.c
with
8 additions
and
8 deletions
src/opus.h
+
2
−
2
View file @
3ce277ca
...
...
@@ -77,7 +77,7 @@ extern "C" {
typedef
struct
OpusEncoder
OpusEncoder
;
typedef
struct
OpusDecoder
OpusDecoder
;
OpusEncoder
*
opus_encoder_create
(
int
Fs
);
OpusEncoder
*
opus_encoder_create
(
int
Fs
,
int
channels
);
int
opus_encode
(
OpusEncoder
*
st
,
const
short
*
pcm
,
int
frame_size
,
unsigned
char
*
data
,
int
bytes_per_packet
);
...
...
@@ -86,7 +86,7 @@ void opus_encoder_destroy(OpusEncoder *st);
void
opus_encoder_ctl
(
OpusEncoder
*
st
,
int
request
,
...);
OpusDecoder
*
opus_decoder_create
(
int
Fs
);
OpusDecoder
*
opus_decoder_create
(
int
Fs
,
int
channels
);
int
opus_decode
(
OpusDecoder
*
st
,
const
unsigned
char
*
data
,
int
len
,
short
*
pcm
,
int
frame_size
);
...
...
This diff is collapsed.
Click to expand it.
src/opus_decoder.c
+
2
−
2
View file @
3ce277ca
...
...
@@ -42,7 +42,7 @@
#include
"SKP_Silk_SDK_API.h"
OpusDecoder
*
opus_decoder_create
(
int
Fs
)
OpusDecoder
*
opus_decoder_create
(
int
Fs
,
int
channels
)
{
char
*
raw_state
;
int
ret
,
silkDecSizeBytes
,
celtDecSizeBytes
;
...
...
@@ -68,7 +68,7 @@ OpusDecoder *opus_decoder_create(int Fs)
}
/* Initialize CELT decoder */
st
->
celt_dec
=
celt_decoder_init
(
st
->
celt_dec
,
48000
,
1
,
NULL
);
st
->
celt_dec
=
celt_decoder_init
(
st
->
celt_dec
,
48000
,
channels
,
NULL
);
return
st
;
...
...
This diff is collapsed.
Click to expand it.
src/opus_encoder.c
+
2
−
2
View file @
3ce277ca
...
...
@@ -41,7 +41,7 @@
#include
"modes.h"
#include
"SKP_Silk_SDK_API.h"
OpusEncoder
*
opus_encoder_create
(
int
Fs
)
OpusEncoder
*
opus_encoder_create
(
int
Fs
,
int
channels
)
{
char
*
raw_state
;
OpusEncoder
*
st
;
...
...
@@ -73,7 +73,7 @@ OpusEncoder *opus_encoder_create(int Fs)
/* Create CELT encoder */
/* Initialize CELT encoder */
st
->
celt_enc
=
celt_encoder_init
(
st
->
celt_enc
,
Fs
,
1
,
NULL
);
st
->
celt_enc
=
celt_encoder_init
(
st
->
celt_enc
,
Fs
,
channels
,
NULL
);
st
->
mode
=
MODE_HYBRID
;
st
->
bandwidth
=
BANDWIDTH_FULLBAND
;
...
...
This diff is collapsed.
Click to expand it.
src/test_opus.c
+
2
−
2
View file @
3ce277ca
...
...
@@ -105,8 +105,8 @@ int main(int argc, char *argv[])
return
1
;
}
enc
=
opus_encoder_create
(
rate
);
dec
=
opus_decoder_create
(
rate
);
enc
=
opus_encoder_create
(
rate
,
channels
);
dec
=
opus_decoder_create
(
rate
,
channels
);
mode
=
MODE_HYBRID
;
opus_encoder_ctl
(
enc
,
OPUS_SET_BANDWIDTH
(
BANDWIDTH_FULLBAND
));
...
...
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