]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/opus_celt.h
libswscale: add gray9 support
[ffmpeg] / libavcodec / opus_celt.h
index f0d55d600bff413e6d77094bf6a5003f4fbfb13a..31299912bd7eb84cdac48d9e32a955ac87336a8d 100644 (file)
@@ -27,6 +27,7 @@
 #include <float.h>
 
 #include "opus.h"
+#include "opus_pvq.h"
 
 #include "mdct15.h"
 #include "libavutil/float_dsp.h"
@@ -43,6 +44,8 @@
 #define CELT_POSTFILTER_MINPERIOD    15
 #define CELT_ENERGY_SILENCE          (-28.0f)
 
+typedef struct CeltPVQ CeltPVQ;
+
 enum CeltSpread {
     CELT_SPREAD_NONE,
     CELT_SPREAD_LIGHT,
@@ -72,8 +75,8 @@ typedef struct CeltBlock {
     DECLARE_ALIGNED(32, float, coeffs)[CELT_MAX_FRAME_SIZE];
 
     /* Used by the encoder */
-    DECLARE_ALIGNED(32, float, overlap)[120];
-    DECLARE_ALIGNED(32, float, samples)[CELT_MAX_FRAME_SIZE];
+    DECLARE_ALIGNED(32, float, overlap)[FFALIGN(CELT_OVERLAP, 16)];
+    DECLARE_ALIGNED(32, float, samples)[FFALIGN(CELT_MAX_FRAME_SIZE, 16)];
 
     /* postfilter parameters */
     int   pf_period_new;
@@ -92,6 +95,7 @@ struct CeltFrame {
     MDCT15Context       *imdct[4];
     AVFloatDSPContext   *dsp;
     CeltBlock           block[2];
+    CeltPVQ             *pvq;
     int channels;
     int output_channels;
 
@@ -125,8 +129,6 @@ struct CeltFrame {
     int fine_priority[CELT_MAX_BANDS];
     int pulses       [CELT_MAX_BANDS];
     int tf_change    [CELT_MAX_BANDS];
-
-    DECLARE_ALIGNED(32, float, scratch)[22 * 8]; // MAX(ff_celt_freq_range) * 1<<CELT_MAX_LOG_BLOCKS
 };
 
 /* LCG for noise generation */