summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs/libopus/opus_private.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/codecs/libopus/opus_private.h')
-rw-r--r--lib/rbcodec/codecs/libopus/opus_private.h35
1 files changed, 24 insertions, 11 deletions
diff --git a/lib/rbcodec/codecs/libopus/opus_private.h b/lib/rbcodec/codecs/libopus/opus_private.h
index 9d8210b5f0..83225f2b6c 100644
--- a/lib/rbcodec/codecs/libopus/opus_private.h
+++ b/lib/rbcodec/codecs/libopus/opus_private.h
@@ -82,35 +82,48 @@ int get_mono_channel(const ChannelLayout *layout, int stream_id, int prev);
82#define OPUS_SET_FORCE_MODE_REQUEST 11002 82#define OPUS_SET_FORCE_MODE_REQUEST 11002
83#define OPUS_SET_FORCE_MODE(x) OPUS_SET_FORCE_MODE_REQUEST, __opus_check_int(x) 83#define OPUS_SET_FORCE_MODE(x) OPUS_SET_FORCE_MODE_REQUEST, __opus_check_int(x)
84 84
85typedef void (*downmix_func)(const void *, float *, int, int, int); 85typedef void (*downmix_func)(const void *, opus_val32 *, int, int, int, int, int);
86void downmix_float(const void *_x, float *sub, int subframe, int offset, int C); 86void downmix_float(const void *_x, opus_val32 *sub, int subframe, int offset, int c1, int c2, int C);
87void downmix_int(const void *_x, float *sub, int subframe, int offset, int C); 87void downmix_int(const void *_x, opus_val32 *sub, int subframe, int offset, int c1, int c2, int C);
88 88
89int optimize_framesize(const opus_val16 *x, int len, int C, opus_int32 Fs, 89int optimize_framesize(const opus_val16 *x, int len, int C, opus_int32 Fs,
90 int bitrate, opus_val16 tonality, opus_val32 *mem, int buffering, 90 int bitrate, opus_val16 tonality, float *mem, int buffering,
91 downmix_func downmix); 91 downmix_func downmix);
92 92
93int encode_size(int size, unsigned char *data); 93int encode_size(int size, unsigned char *data);
94 94
95opus_int32 frame_size_select(opus_int32 frame_size, int variable_duration, opus_int32 Fs); 95opus_int32 frame_size_select(opus_int32 frame_size, int variable_duration, opus_int32 Fs);
96 96
97opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_size, 97opus_int32 compute_frame_size(const void *analysis_pcm, int frame_size,
98 unsigned char *data, opus_int32 out_data_bytes, int lsb_depth 98 int variable_duration, int C, opus_int32 Fs, int bitrate_bps,
99#ifndef FIXED_POINT 99 int delay_compensation, downmix_func downmix
100 , AnalysisInfo *analysis_info 100#ifndef DISABLE_FLOAT_API
101 , float *subframe_mem
101#endif 102#endif
102 ); 103 );
103 104
105opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_size,
106 unsigned char *data, opus_int32 out_data_bytes, int lsb_depth,
107 const void *analysis_pcm, opus_int32 analysis_size, int c1, int c2, int analysis_channels, downmix_func downmix);
108
104int opus_decode_native(OpusDecoder *st, const unsigned char *data, opus_int32 len, 109int opus_decode_native(OpusDecoder *st, const unsigned char *data, opus_int32 len,
105 opus_val16 *pcm, int frame_size, int decode_fec, int self_delimited, 110 opus_val16 *pcm, int frame_size, int decode_fec, int self_delimited,
106 int *packet_offset, int soft_clip); 111 opus_int32 *packet_offset, int soft_clip);
107 112
108/* Make sure everything's aligned to sizeof(void *) bytes */ 113/* Make sure everything's aligned to sizeof(void *) bytes */
109static inline int align(int i) 114static OPUS_INLINE int align(int i)
110{ 115{
111 return (i+(int)sizeof(void *)-1)&-(int)sizeof(void *); 116 return (i+(int)sizeof(void *)-1)&-(int)sizeof(void *);
112} 117}
113 118
114opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int end, unsigned char *data, opus_int32 maxlen, int self_delimited); 119int opus_packet_parse_impl(const unsigned char *data, opus_int32 len,
120 int self_delimited, unsigned char *out_toc,
121 const unsigned char *frames[48], opus_int16 size[48],
122 int *payload_offset, opus_int32 *packet_offset);
123
124opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int end,
125 unsigned char *data, opus_int32 maxlen, int self_delimited, int pad);
126
127int pad_frame(unsigned char *data, opus_int32 len, opus_int32 new_len);
115 128
116#endif /* OPUS_PRIVATE_H */ 129#endif /* OPUS_PRIVATE_H */