Mercurial > libavcodec.hg
comparison ra144.h @ 11870:6b1a63ea6e61 libavcodec
RealAudio 14.4k encoder.
Patch by Francesco Lavra (firstnamelastname@interfree.it)
author | vitor |
---|---|
date | Fri, 11 Jun 2010 09:01:25 +0000 |
parents | 159554445343 |
children |
comparison
equal
deleted
inserted
replaced
11869:7d12639b4b05 | 11870:6b1a63ea6e61 |
---|---|
21 | 21 |
22 #ifndef AVCODEC_RA144_H | 22 #ifndef AVCODEC_RA144_H |
23 #define AVCODEC_RA144_H | 23 #define AVCODEC_RA144_H |
24 | 24 |
25 #include <stdint.h> | 25 #include <stdint.h> |
26 #include "dsputil.h" | |
26 | 27 |
27 #define NBLOCKS 4 ///< number of subblocks within a block | 28 #define NBLOCKS 4 ///< number of subblocks within a block |
28 #define BLOCKSIZE 40 ///< subblock size in 16-bit words | 29 #define BLOCKSIZE 40 ///< subblock size in 16-bit words |
29 #define BUFFERSIZE 146 ///< the size of the adaptive codebook | 30 #define BUFFERSIZE 146 ///< the size of the adaptive codebook |
31 #define FIXED_CB_SIZE 128 ///< size of fixed codebooks | |
32 #define FRAMESIZE 20 ///< size of encoded frame | |
33 #define LPC_ORDER 10 ///< order of LPC filter | |
30 | 34 |
31 typedef struct { | 35 typedef struct { |
32 AVCodecContext *avctx; | 36 AVCodecContext *avctx; |
37 DSPContext dsp; | |
33 | 38 |
34 unsigned int old_energy; ///< previous frame energy | 39 unsigned int old_energy; ///< previous frame energy |
35 | 40 |
36 unsigned int lpc_tables[2][10]; | 41 unsigned int lpc_tables[2][10]; |
37 | 42 |
38 /** LPC coefficients: lpc_coef[0] is the coefficients of the current frame | 43 /** LPC coefficients: lpc_coef[0] is the coefficients of the current frame |
39 * and lpc_coef[1] of the previous one. */ | 44 * and lpc_coef[1] of the previous one. */ |
40 unsigned int *lpc_coef[2]; | 45 unsigned int *lpc_coef[2]; |
41 | 46 |
42 unsigned int lpc_refl_rms[2]; | 47 unsigned int lpc_refl_rms[2]; |
48 | |
49 int16_t curr_block[NBLOCKS * BLOCKSIZE]; | |
43 | 50 |
44 /** The current subblock padded by the last 10 values of the previous one. */ | 51 /** The current subblock padded by the last 10 values of the previous one. */ |
45 int16_t curr_sblock[50]; | 52 int16_t curr_sblock[50]; |
46 | 53 |
47 /** Adaptive codebook, its size is two units bigger to avoid a | 54 /** Adaptive codebook, its size is two units bigger to avoid a |