summaryrefslogtreecommitdiff
path: root/thirdparty/opus/opus_private.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-11-18 09:56:18 +0100
committerRémi Verschelde <rverschelde@gmail.com>2019-11-18 09:56:48 +0100
commit46ae64cd60166ead412bacc1bf03e9c8f8965e2c (patch)
tree9e592667ffa91e55491a66733e5e3d7de0b666c9 /thirdparty/opus/opus_private.h
parent974646309bfe09c48c8a72bf751b0ea6ad8b5bc5 (diff)
Revert "Update opus to 1.3.1 and opusfile to 0.11"
This reverts commit e00426c512a7905f5f925d382c443bab7a0ca693. The way we handle platform-specific intrinsics is not good, so the current state will not compile on armv8. This commit also requires SSE4.1 support, which is likely not a good idea for portable binaries. We'll have to redo this with more caution after 3.2 is released, or we might simply drop opus as we're only using it as dependency for theora right now. Fixes #33606.
Diffstat (limited to 'thirdparty/opus/opus_private.h')
-rw-r--r--thirdparty/opus/opus_private.h85
1 files changed, 9 insertions, 76 deletions
diff --git a/thirdparty/opus/opus_private.h b/thirdparty/opus/opus_private.h
index 5e2463f546..3b62eed096 100644
--- a/thirdparty/opus/opus_private.h
+++ b/thirdparty/opus/opus_private.h
@@ -33,7 +33,6 @@
#include "opus.h"
#include "celt.h"
-#include <stdarg.h> /* va_list */
#include <stddef.h> /* offsetof */
struct OpusRepacketizer {
@@ -51,59 +50,12 @@ typedef struct ChannelLayout {
unsigned char mapping[256];
} ChannelLayout;
-typedef enum {
- MAPPING_TYPE_NONE,
- MAPPING_TYPE_SURROUND,
- MAPPING_TYPE_AMBISONICS
-} MappingType;
-
-struct OpusMSEncoder {
- ChannelLayout layout;
- int arch;
- int lfe_stream;
- int application;
- int variable_duration;
- MappingType mapping_type;
- opus_int32 bitrate_bps;
- /* Encoder states go here */
- /* then opus_val32 window_mem[channels*120]; */
- /* then opus_val32 preemph_mem[channels]; */
-};
-
-struct OpusMSDecoder {
- ChannelLayout layout;
- /* Decoder states go here */
-};
-
-int opus_multistream_encoder_ctl_va_list(struct OpusMSEncoder *st, int request,
- va_list ap);
-int opus_multistream_decoder_ctl_va_list(struct OpusMSDecoder *st, int request,
- va_list ap);
-
int validate_layout(const ChannelLayout *layout);
int get_left_channel(const ChannelLayout *layout, int stream_id, int prev);
int get_right_channel(const ChannelLayout *layout, int stream_id, int prev);
int get_mono_channel(const ChannelLayout *layout, int stream_id, int prev);
-typedef void (*opus_copy_channel_in_func)(
- opus_val16 *dst,
- int dst_stride,
- const void *src,
- int src_stride,
- int src_channel,
- int frame_size,
- void *user_data
-);
-
-typedef void (*opus_copy_channel_out_func)(
- void *dst,
- int dst_stride,
- int dst_channel,
- const opus_val16 *src,
- int src_stride,
- int frame_size,
- void *user_data
-);
+
#define MODE_SILK_ONLY 1000
#define MODE_HYBRID 1001
@@ -135,12 +87,19 @@ typedef void (*opus_copy_channel_out_func)(
typedef void (*downmix_func)(const void *, opus_val32 *, int, int, int, int, int);
void downmix_float(const void *_x, opus_val32 *sub, int subframe, int offset, int c1, int c2, int C);
void downmix_int(const void *_x, opus_val32 *sub, int subframe, int offset, int c1, int c2, int C);
-int is_digital_silence(const opus_val16* pcm, int frame_size, int channels, int lsb_depth);
int encode_size(int size, unsigned char *data);
opus_int32 frame_size_select(opus_int32 frame_size, int variable_duration, opus_int32 Fs);
+opus_int32 compute_frame_size(const void *analysis_pcm, int frame_size,
+ int variable_duration, int C, opus_int32 Fs, int bitrate_bps,
+ int delay_compensation, downmix_func downmix
+#ifndef DISABLE_FLOAT_API
+ , float *subframe_mem
+#endif
+ );
+
opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_size,
unsigned char *data, opus_int32 out_data_bytes, int lsb_depth,
const void *analysis_pcm, opus_int32 analysis_size, int c1, int c2,
@@ -172,30 +131,4 @@ opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int
int pad_frame(unsigned char *data, opus_int32 len, opus_int32 new_len);
-int opus_multistream_encode_native
-(
- struct OpusMSEncoder *st,
- opus_copy_channel_in_func copy_channel_in,
- const void *pcm,
- int analysis_frame_size,
- unsigned char *data,
- opus_int32 max_data_bytes,
- int lsb_depth,
- downmix_func downmix,
- int float_api,
- void *user_data
-);
-
-int opus_multistream_decode_native(
- struct OpusMSDecoder *st,
- const unsigned char *data,
- opus_int32 len,
- void *pcm,
- opus_copy_channel_out_func copy_channel_out,
- int frame_size,
- int decode_fec,
- int soft_clip,
- void *user_data
-);
-
#endif /* OPUS_PRIVATE_H */