]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/opus.h
configure: Print list of enabled programs
[ffmpeg] / libavcodec / opus.h
index ab2975fa2273a58c3f939516f78f83ec0110b214..55c91fa01202e822d30c9325cb4885785d212300 100644 (file)
 #define ROUND_MUL16(a,b)  ((MUL16(a, b) + 16384) >> 15)
 #define opus_ilog(i) (av_log2(i) + !!(i))
 
+#define OPUS_TS_HEADER     0x7FE0        // 0x3ff (11 bits)
+#define OPUS_TS_MASK       0xFFE0        // top 11 bits
+
+static const uint8_t opus_default_extradata[30] = {
+    'O', 'p', 'u', 's', 'H', 'e', 'a', 'd',
+    1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+};
+
 enum OpusMode {
     OPUS_MODE_SILK,
     OPUS_MODE_HYBRID,
@@ -92,8 +101,6 @@ typedef struct OpusRangeCoder {
 
 typedef struct SilkContext SilkContext;
 
-typedef struct CeltIMDCTContext CeltIMDCTContext;
-
 typedef struct CeltContext CeltContext;
 
 typedef struct OpusPacket {
@@ -166,6 +173,16 @@ typedef struct ChannelMap {
 
 typedef struct OpusContext {
     OpusStreamContext *streams;
+
+    /* current output buffers for each streams */
+    float **out;
+    int   *out_size;
+    /* Buffers for synchronizing the streams when they have different
+     * resampling delays */
+    AVAudioFifo **sync_buffers;
+    /* number of decoded samples for each stream */
+    int         *decoded_samples;
+
     int             nb_streams;
     int      nb_stereo_streams;
 
@@ -398,22 +415,6 @@ int ff_silk_decode_superframe(SilkContext *s, OpusRangeCoder *rc,
                               enum OpusBandwidth bandwidth, int coded_channels,
                               int duration_ms);
 
-/**
- * Init an iMDCT of the length 2 * 15 * (2^N)
- */
-int ff_celt_imdct_init(CeltIMDCTContext **s, int N);
-
-/**
- * Free an iMDCT.
- */
-void ff_celt_imdct_uninit(CeltIMDCTContext **s);
-
-/**
- * Calculate the middle half of the iMDCT
- */
-void ff_celt_imdct_half(CeltIMDCTContext *s, float *dst, const float *src,
-                        int src_stride, float scale);
-
 int ff_celt_init(AVCodecContext *avctx, CeltContext **s, int output_channels);
 
 void ff_celt_free(CeltContext **s);