]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/opus.h
adpcm: fix clipping for yamaha
[ffmpeg] / libavcodec / opus.h
index 2c3d63a7a29317e3fd1c644bdb5250ae7d3c5efc..c3cbaec35d60b67937eecf1dfa82042708d9fc26 100644 (file)
 #define CELT_MAX_LOG_BLOCKS          3
 #define CELT_MAX_FRAME_SIZE          (CELT_SHORT_BLOCKSIZE * (1 << CELT_MAX_LOG_BLOCKS))
 #define CELT_MAX_BANDS               21
-#define CELT_VECTORS                 11
-#define CELT_ALLOC_STEPS             6
-#define CELT_FINE_OFFSET             21
-#define CELT_MAX_FINE_BITS           8
-#define CELT_NORM_SCALE              16384
-#define CELT_QTHETA_OFFSET           4
-#define CELT_QTHETA_OFFSET_TWOPHASE  16
-#define CELT_DEEMPH_COEFF            0.85000610f
-#define CELT_POSTFILTER_MINPERIOD    15
-#define CELT_ENERGY_SILENCE          (-28.0f)
 
 #define SILK_HISTORY                 322
 #define SILK_MAX_LPC                 16
@@ -72,7 +62,9 @@ static const uint8_t opus_default_extradata[30] = {
 enum OpusMode {
     OPUS_MODE_SILK,
     OPUS_MODE_HYBRID,
-    OPUS_MODE_CELT
+    OPUS_MODE_CELT,
+
+    OPUS_MODE_NB
 };
 
 enum OpusBandwidth {
@@ -80,12 +72,14 @@ enum OpusBandwidth {
     OPUS_BANDWIDTH_MEDIUMBAND,
     OPUS_BANDWIDTH_WIDEBAND,
     OPUS_BANDWIDTH_SUPERWIDEBAND,
-    OPUS_BANDWIDTH_FULLBAND
+    OPUS_BANDWIDTH_FULLBAND,
+
+    OPUS_BANDWITH_NB
 };
 
 typedef struct SilkContext SilkContext;
 
-typedef struct CeltContext CeltContext;
+typedef struct CeltFrame CeltFrame;
 
 typedef struct OpusPacket {
     int packet_size;                /**< packet size */
@@ -110,7 +104,7 @@ typedef struct OpusStreamContext {
     OpusRangeCoder rc;
     OpusRangeCoder redundancy_rc;
     SilkContext *silk;
-    CeltContext *celt;
+    CeltFrame *celt;
     AVFloatDSPContext *fdsp;
 
     float silk_buf[2][960];
@@ -195,14 +189,4 @@ int ff_silk_decode_superframe(SilkContext *s, OpusRangeCoder *rc,
                               enum OpusBandwidth bandwidth, int coded_channels,
                               int duration_ms);
 
-int ff_celt_init(AVCodecContext *avctx, CeltContext **s, int output_channels);
-
-void ff_celt_free(CeltContext **s);
-
-void ff_celt_flush(CeltContext *s);
-
-int ff_celt_decode_frame(CeltContext *s, OpusRangeCoder *rc,
-                         float **output, int coded_channels, int frame_size,
-                         int startband,  int endband);
-
 #endif /* AVCODEC_OPUS_H */