#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
*/
* 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
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
// 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;
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 */