]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/twinvq.h
aarch64: vp9itxfm: Restructure the idct32 store macros
[ffmpeg] / libavcodec / twinvq.h
index d3a548a9f92781a093275ff37a9461f914b91104..e81056500000f3eac39cafbcf1da47fff3c335f9 100644 (file)
@@ -58,6 +58,8 @@ enum TwinVQFrameType {
 #define TWINVQ_SUBBLOCKS_MAX     16
 #define TWINVQ_BARK_N_COEF_MAX   4
 
+#define TWINVQ_MAX_FRAMES_PER_PACKET 2
+
 /**
  * Parameters and tables that are different for each frame type
  */
@@ -107,7 +109,7 @@ typedef struct TwinVQFrameData {
  * bitrate/sample rate
  */
 typedef struct TwinVQModeTab {
-    struct TwinVQFrameMode fmode[3]; ///< frame type-dependant parameters
+    struct TwinVQFrameMode fmode[3]; ///< frame type-dependent parameters
 
     uint16_t     size;        ///< frame size in samples
     uint8_t      n_lsp;       ///< number of lsp coefficients
@@ -139,6 +141,8 @@ typedef struct TwinVQContext {
 
     const TwinVQModeTab *mtab;
 
+    int is_6kbps;
+
     // history
     float lsp_hist[2][20];           ///< LSP coefficients of the last frame
     float bark_hist[3][2][40];       ///< BSE coefficients of last frame
@@ -162,7 +166,8 @@ typedef struct TwinVQContext {
     // scratch buffers
     float *tmp_buf;
 
-    TwinVQFrameData bits;
+    int frame_size, frames_per_packet, cur_frame;
+    TwinVQFrameData bits[TWINVQ_MAX_FRAMES_PER_PACKET];
 
     enum TwinVQCodec codec;
 
@@ -192,7 +197,7 @@ static inline float twinvq_mulawinv(float y, float clip, float mu)
 
 int ff_twinvq_decode_frame(AVCodecContext *avctx, void *data,
                            int *got_frame_ptr, AVPacket *avpkt);
-av_cold int ff_twinvq_decode_close(AVCodecContext *avctx);
-av_cold int ff_twinvq_decode_init(AVCodecContext *avctx);
+int ff_twinvq_decode_close(AVCodecContext *avctx);
+int ff_twinvq_decode_init(AVCodecContext *avctx);
 
-#endif /* AVCODEC_TWINVQ_DATA_H */
+#endif /* AVCODEC_TWINVQ_H */