Changeset 78 for mppenc/branches/r2d/libmpcenc/libmpcenc.h
- Timestamp:
- 10/27/06 18:42:05 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mppenc/branches/r2d/libmpcenc/libmpcenc.h
r71 r78 20 20 21 21 #include "config_types.h" 22 #include <stdio.h> 22 23 23 24 // FIXME : define this somewhere else … … 32 33 33 34 // bitstream.c 34 #define BUFFER_ALMOST_FULL 8192 35 #define BUFFER_FULL (BUFFER_ALMOST_FULL + 4352) // 34490 bit/frame 1320.3 kbps 36 37 #ifndef ENDIAN 38 #define HAVE_LITTLE_ENDIAN 1234 39 #define HAVE_BIG_ENDIAN 4321 40 41 #define ENDIAN HAVE_LITTLE_ENDIAN 42 #endif 43 44 // bitstream.c 45 typedef struct { 46 mpc_uint32_t* ptr; 47 unsigned int bit; 48 } BitstreamPos; 35 #define FRAMES_PER_BLOCK_PWR 6 36 #define FRAMES_PER_BLOCK (1 << FRAMES_PER_BLOCK_PWR) 37 #define BUFFER_FULL (4352 * FRAMES_PER_BLOCK) // 34490 bit/frame 1320.3 kbps 49 38 50 39 typedef struct { … … 55 44 // TODO : enc/dec common struct 56 45 // just the same struct as below, dup ? 57 typedef struct {58 mpc_uint16_t Code; // >= 14 bit59 mpc_uint16_t Length; // >= 4 bit60 } HuffSrc_t ;61 46 62 47 typedef struct { 63 48 mpc_uint16_t Code; // >= 14 bit 64 49 mpc_uint16_t Length; // >= 4 bit 65 } Huffman_t 50 } Huffman_t; 66 51 67 // TODO : match with mpc_decoder_t68 // FIXME : add init code69 52 typedef struct { 70 mpc_uint32_t Buffer [BUFFER_FULL]; // Buffer for bitstream-file 71 mpc_uint32_t dword; // = 0; // 32-bit-Word for Bitstream-I/O 72 mpc_int32_t filled; // = 32; // Position in the the 32-bit-word that's currently about to be filled 73 mpc_uint32_t Zaehler; // = 0; // Position pointer for the processed bitstream-word (32 bit) 74 mpc_uint64_t BufferedBits; // = 0; // Counter for the number of written bits in the bitstream 53 mpc_uint_t pos; // next free byte position in the buffer 54 mpc_uint_t bitsCount; // number of used bits in bitsBuff 55 mpc_uint64_t outputBits; // Counter for the number of written bits in the bitstream 56 mpc_uint32_t bitsBuff; // bits buffer 57 mpc_uint8_t buffer [BUFFER_FULL]; // Buffer for bitstream-file 58 mpc_uint_t framesInBlock; 59 60 FILE * outputFile; // ouput file 75 61 76 62 unsigned int MS_Channelmode; 77 63 unsigned int Overflows; // = 0; // number of internal (filterbank) clippings 78 } mpc_encoder_t;64 } mpc_encoder_t; 79 65
Note: See TracChangeset
for help on using the changeset viewer.