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
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Alexander Traud
Opus
Commits
99774976
Commit
99774976
authored
13 years ago
by
Jean-Marc Valin
Browse files
Options
Downloads
Patches
Plain Diff
Making sure that everything in opus.h has a opus prefix
parent
9f71309a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/opus.h
+29
-33
29 additions, 33 deletions
src/opus.h
src/opus_private.h
+4
-0
4 additions, 0 deletions
src/opus_private.h
with
33 additions
and
33 deletions
src/opus.h
+
29
−
33
View file @
99774976
...
...
@@ -52,9 +52,9 @@ extern "C" {
#endif
#define __check_int(x) (((void)((x) == (opus_int32)0)), (opus_int32)(x))
#define __check_int_ptr(ptr) ((ptr) + ((ptr) - (opus_int32*)(ptr)))
#define __check_uint_ptr(ptr) ((ptr) + ((ptr) - (opus_uint32*)(ptr)))
#define __
opus_
check_int(x) (((void)((x) == (opus_int32)0)), (opus_int32)(x))
#define __
opus_
check_int_ptr(ptr) ((ptr) + ((ptr) - (opus_int32*)(ptr)))
#define __
opus_
check_uint_ptr(ptr) ((ptr) + ((ptr) - (opus_uint32*)(ptr)))
/* Error codes */
/** No error */
...
...
@@ -83,10 +83,6 @@ extern "C" {
#define OPUS_SIGNAL_VOICE 3001
#define OPUS_SIGNAL_MUSIC 3002
#define MODE_SILK_ONLY 1000
#define MODE_HYBRID 1001
#define MODE_CELT_ONLY 1002
#define OPUS_BANDWIDTH_AUTO 1100
#define OPUS_BANDWIDTH_NARROWBAND 1101
#define OPUS_BANDWIDTH_MEDIUMBAND 1102
...
...
@@ -97,74 +93,74 @@ extern "C" {
/* OPUS_APPLICATION_VOIP or OPUS_APPLICATION_AUDIO */
#define OPUS_SET_APPLICATION_REQUEST 0
#define OPUS_SET_APPLICATION(x) OPUS_SET_APPLICATION_REQUEST, __check_int(x)
#define OPUS_SET_APPLICATION(x) OPUS_SET_APPLICATION_REQUEST, __
opus_
check_int(x)
#define OPUS_GET_APPLICATION_REQUEST 1
#define OPUS_GET_APPLICATION(x) OPUS_GET_APPLICATION_REQUEST, __check_int_ptr(x)
#define OPUS_GET_APPLICATION(x) OPUS_GET_APPLICATION_REQUEST, __
opus_
check_int_ptr(x)
/* Coding bit-rate in bit/second */
#define OPUS_SET_BITRATE_REQUEST 2
#define OPUS_SET_BITRATE(x) OPUS_SET_BITRATE_REQUEST, __check_int(x)
#define OPUS_SET_BITRATE(x) OPUS_SET_BITRATE_REQUEST, __
opus_
check_int(x)
#define OPUS_GET_BITRATE_REQUEST 3
#define OPUS_GET_BITRATE(x) OPUS_GET_BITRATE_REQUEST, __check_int_ptr(x)
#define OPUS_GET_BITRATE(x) OPUS_GET_BITRATE_REQUEST, __
opus_
check_int_ptr(x)
/* 0 for CBR, 1 for VBR */
#define OPUS_SET_VBR_REQUEST 6
#define OPUS_SET_VBR(x) OPUS_SET_VBR_REQUEST, __check_int(x)
#define OPUS_SET_VBR(x) OPUS_SET_VBR_REQUEST, __
opus_
check_int(x)
#define OPUS_GET_VBR_REQUEST 7
#define OPUS_GET_VBR(x) OPUS_GET_VBR_REQUEST, __check_int_ptr(x)
#define OPUS_GET_VBR(x) OPUS_GET_VBR_REQUEST, __
opus_
check_int_ptr(x)
#define OPUS_SET_BANDWIDTH_REQUEST 8
#define OPUS_SET_BANDWIDTH(x) OPUS_SET_BANDWIDTH_REQUEST, __check_int(x)
#define OPUS_SET_BANDWIDTH(x) OPUS_SET_BANDWIDTH_REQUEST, __
opus_
check_int(x)
#define OPUS_GET_BANDWIDTH_REQUEST 9
#define OPUS_GET_BANDWIDTH(x) OPUS_GET_BANDWIDTH_REQUEST, __check_int_ptr(x)
#define OPUS_GET_BANDWIDTH(x) OPUS_GET_BANDWIDTH_REQUEST, __
opus_
check_int_ptr(x)
#define OPUS_SET_COMPLEXITY_REQUEST 10
#define OPUS_SET_COMPLEXITY(x) OPUS_SET_COMPLEXITY_REQUEST, __check_int(x)
#define OPUS_SET_COMPLEXITY(x) OPUS_SET_COMPLEXITY_REQUEST, __
opus_
check_int(x)
#define OPUS_GET_COMPLEXITY_REQUEST 11
#define OPUS_GET_COMPLEXITY(x) OPUS_GET_COMPLEXITY_REQUEST, __check_int_ptr(x)
#define OPUS_GET_COMPLEXITY(x) OPUS_GET_COMPLEXITY_REQUEST, __
opus_
check_int_ptr(x)
#define OPUS_SET_INBAND_FEC_FLAG_REQUEST 12
#define OPUS_SET_INBAND_FEC_FLAG(x) OPUS_SET_INBAND_FEC_FLAG_REQUEST, __check_int(x)
#define OPUS_SET_INBAND_FEC_FLAG(x) OPUS_SET_INBAND_FEC_FLAG_REQUEST, __
opus_
check_int(x)
#define OPUS_GET_INBAND_FEC_FLAG_REQUEST 13
#define OPUS_GET_INBAND_FEC_FLAG(x) OPUS_GET_INBAND_FEC_FLAG_REQUEST, __check_int_ptr(x)
#define OPUS_GET_INBAND_FEC_FLAG(x) OPUS_GET_INBAND_FEC_FLAG_REQUEST, __
opus_
check_int_ptr(x)
#define OPUS_SET_PACKET_LOSS_PERC_REQUEST 14
#define OPUS_SET_PACKET_LOSS_PERC(x) OPUS_SET_PACKET_LOSS_PERC_REQUEST, __check_int(x)
#define OPUS_SET_PACKET_LOSS_PERC(x) OPUS_SET_PACKET_LOSS_PERC_REQUEST, __
opus_
check_int(x)
#define OPUS_GET_PACKET_LOSS_PERC_REQUEST 15
#define OPUS_GET_PACKET_LOSS_PERC(x) OPUS_GET_PACKET_LOSS_PERC_REQUEST, __check_int_ptr(x)
#define OPUS_GET_PACKET_LOSS_PERC(x) OPUS_GET_PACKET_LOSS_PERC_REQUEST, __
opus_
check_int_ptr(x)
#define OPUS_SET_DTX_REQUEST 16
#define OPUS_SET_DTX(x) OPUS_SET_DTX_REQUEST, __check_int(x)
#define OPUS_SET_DTX(x) OPUS_SET_DTX_REQUEST, __
opus_
check_int(x)
#define OPUS_GET_DTX_REQUEST 17
#define OPUS_GET_DTX(x) OPUS_GET_DTX_REQUEST, __check_int_ptr(x)
#define OPUS_GET_DTX(x) OPUS_GET_DTX_REQUEST, __
opus_
check_int_ptr(x)
#define OPUS_SET_VOICE_RATIO_REQUEST 18
#define OPUS_SET_VOICE_RATIO(x) OPUS_SET_VOICE_RATIO_REQUEST, __check_int(x)
#define OPUS_SET_VOICE_RATIO(x) OPUS_SET_VOICE_RATIO_REQUEST, __
opus_
check_int(x)
#define OPUS_GET_VOICE_RATIO_REQUEST 19
#define OPUS_GET_VOICE_RATIO(x) OPUS_GET_VOICE_RATIO_REQUEST, __check_int_ptr(x)
#define OPUS_GET_VOICE_RATIO(x) OPUS_GET_VOICE_RATIO_REQUEST, __
opus_
check_int_ptr(x)
#define OPUS_SET_VBR_CONSTRAINT_REQUEST 20
#define OPUS_SET_VBR_CONSTRAINT(x) OPUS_SET_VBR_CONSTRAINT_REQUEST, __check_int(x)
#define OPUS_SET_VBR_CONSTRAINT(x) OPUS_SET_VBR_CONSTRAINT_REQUEST, __
opus_
check_int(x)
#define OPUS_GET_VBR_CONSTRAINT_REQUEST 21
#define OPUS_GET_VBR_CONSTRAINT(x) OPUS_GET_VBR_CONSTRAINT_REQUEST, __check_int_ptr(x)
#define OPUS_GET_VBR_CONSTRAINT(x) OPUS_GET_VBR_CONSTRAINT_REQUEST, __
opus_
check_int_ptr(x)
#define OPUS_SET_FORCE_MONO_REQUEST 22
#define OPUS_SET_FORCE_MONO(x) OPUS_SET_FORCE_MONO_REQUEST, __check_int(x)
#define OPUS_SET_FORCE_MONO(x) OPUS_SET_FORCE_MONO_REQUEST, __
opus_
check_int(x)
#define OPUS_GET_FORCE_MONO_REQUEST 23
#define OPUS_GET_FORCE_MONO(x) OPUS_GET_FORCE_MONO_REQUEST, __check_int_ptr(x)
#define OPUS_GET_FORCE_MONO(x) OPUS_GET_FORCE_MONO_REQUEST, __
opus_
check_int_ptr(x)
#define OPUS_SET_SIGNAL_REQUEST 24
#define OPUS_SET_SIGNAL(x) OPUS_SET_SIGNAL_REQUEST, __check_int(x)
#define OPUS_SET_SIGNAL(x) OPUS_SET_SIGNAL_REQUEST, __
opus_
check_int(x)
#define OPUS_GET_SIGNAL_REQUEST 25
#define OPUS_GET_SIGNAL(x) OPUS_GET_SIGNAL_REQUEST, __check_int_ptr(x)
#define OPUS_GET_SIGNAL(x) OPUS_GET_SIGNAL_REQUEST, __
opus_
check_int_ptr(x)
#define OPUS_GET_LOOKAHEAD_REQUEST 27
#define OPUS_GET_LOOKAHEAD(x) OPUS_GET_LOOKAHEAD_REQUEST, __check_int_ptr(x)
#define OPUS_GET_LOOKAHEAD(x) OPUS_GET_LOOKAHEAD_REQUEST, __
opus_
check_int_ptr(x)
/* For testing purposes: the encoder and decoder state should
always be identical after coding a payload */
#define OPUS_GET_FINAL_RANGE_REQUEST 29
#define OPUS_GET_FINAL_RANGE(x) OPUS_GET_FINAL_RANGE_REQUEST, __check_uint_ptr(x)
#define OPUS_GET_FINAL_RANGE(x) OPUS_GET_FINAL_RANGE_REQUEST, __
opus_
check_uint_ptr(x)
typedef
struct
OpusEncoder
OpusEncoder
;
typedef
struct
OpusDecoder
OpusDecoder
;
...
...
This diff is collapsed.
Click to expand it.
src/opus_private.h
+
4
−
0
View file @
99774976
...
...
@@ -32,6 +32,10 @@
#include
"arch.h"
#include
"opus.h"
#define MODE_SILK_ONLY 1000
#define MODE_HYBRID 1001
#define MODE_CELT_ONLY 1002
int
encode_size
(
int
size
,
unsigned
char
*
data
);
int
opus_decode_native
(
OpusDecoder
*
st
,
const
unsigned
char
*
data
,
int
len
,
...
...
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