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
f997ad51
Commit
f997ad51
authored
Jan 31, 2008
by
Jean-Marc Valin
Browse files
Mode info
parent
abe043f0
Changes
3
Hide whitespace changes
Inline
Side-by-side
libcelt/celt.c
View file @
f997ad51
...
...
@@ -278,8 +278,6 @@ int celt_encode(CELTEncoder *st, celt_int16_t *pcm, unsigned char *compressed, i
{
stereo_mix
(
st
->
mode
,
X
,
bandE
,
1
);
stereo_mix
(
st
->
mode
,
P
,
bandE
,
1
);
//haar1(X, B*N*C, 1);
//haar1(P, B*N*C, 1);
}
/* Simulates intensity stereo */
//for (i=30;i<N*B;i++)
...
...
libcelt/celt.h
View file @
f997ad51
...
...
@@ -44,7 +44,9 @@ extern "C" {
#define CELT_INTERNAL_ERROR -3
#define CELT_CORRUPTED_DATA -4
#define CELT_GET_FRAME_SIZE 1000
#define CELT_GET_LOOKAHEAD 1001
typedef
struct
CELTEncoder
CELTEncoder
;
typedef
struct
CELTDecoder
CELTDecoder
;
...
...
@@ -69,6 +71,11 @@ void celt_decoder_destroy(CELTDecoder *st);
int
celt_decode
(
CELTDecoder
*
st
,
char
*
data
,
int
len
,
celt_int16_t
*
pcm
);
/* Mode calls */
int
celt_mode_info
(
const
CELTMode
*
mode
,
int
request
,
celt_int32_t
*
value
);
#ifdef __cplusplus
}
#endif
...
...
libcelt/modes.c
View file @
f997ad51
...
...
@@ -145,3 +145,18 @@ static const CELTMode stereo_mode = {
const
CELTMode
const
*
celt_mono
=
&
mono_mode
;
const
CELTMode
const
*
celt_stereo
=
&
stereo_mode
;
int
celt_mode_info
(
const
CELTMode
*
mode
,
int
request
,
celt_int32_t
*
value
)
{
switch
(
request
)
{
case
CELT_GET_FRAME_SIZE
:
*
value
=
mode
->
mdctSize
;
break
;
case
CELT_GET_LOOKAHEAD
:
*
value
=
mode
->
overlap
;
break
;
}
}
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