00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _V_CODECI_H_
00019 #define _V_CODECI_H_
00020
00021 #include "envelope.h"
00022 #include "codebook.h"
00023
00024 #define BLOCKTYPE_IMPULSE 0
00025 #define BLOCKTYPE_PADDING 1
00026 #define BLOCKTYPE_TRANSITION 0
00027 #define BLOCKTYPE_LONG 1
00028
00029 #define PACKETBLOBS 15
00030
00031 typedef struct vorbis_block_internal{
00032 float **pcmdelay;
00033 float ampmax;
00034 int blocktype;
00035
00036 oggpack_buffer *packetblob[PACKETBLOBS];
00037
00038
00039
00040 } vorbis_block_internal;
00041
00042 typedef void vorbis_look_floor;
00043 typedef void vorbis_look_residue;
00044 typedef void vorbis_look_transform;
00045
00046
00047 typedef struct {
00048 int blockflag;
00049 int windowtype;
00050 int transformtype;
00051 int mapping;
00052 } vorbis_info_mode;
00053
00054 typedef void vorbis_info_floor;
00055 typedef void vorbis_info_residue;
00056 typedef void vorbis_info_mapping;
00057
00058 #include "psy.h"
00059 #include "bitrate.h"
00060
00061 typedef struct private_state {
00062
00063 envelope_lookup *ve;
00064 int window[2];
00065 vorbis_look_transform **transform[2];
00066 drft_lookup fft_look[2];
00067
00068 int modebits;
00069 vorbis_look_floor **flr;
00070 vorbis_look_residue **residue;
00071 vorbis_look_psy *psy;
00072 vorbis_look_psy_global *psy_g_look;
00073
00074
00075
00076
00077
00078 unsigned char *header;
00079 unsigned char *header1;
00080 unsigned char *header2;
00081
00082 bitrate_manager_state bms;
00083
00084 ogg_int64_t sample_count;
00085 } private_state;
00086
00087
00088
00089
00090
00091
00092
00093 #include "highlevel.h"
00094 typedef struct codec_setup_info {
00095
00096
00097
00098
00099 long blocksizes[2];
00100
00101
00102
00103
00104
00105
00106 int modes;
00107 int maps;
00108 int floors;
00109 int residues;
00110 int books;
00111 int psys;
00112
00113 vorbis_info_mode *mode_param[64];
00114 int map_type[64];
00115 vorbis_info_mapping *map_param[64];
00116 int floor_type[64];
00117 vorbis_info_floor *floor_param[64];
00118 int residue_type[64];
00119 vorbis_info_residue *residue_param[64];
00120 static_codebook *book_param[256];
00121 codebook *fullbooks;
00122
00123 vorbis_info_psy *psy_param[4];
00124 vorbis_info_psy_global psy_g_param;
00125
00126 bitrate_manager_info bi;
00127 highlevel_encode_setup hi;
00128
00129
00130 int halfrate_flag;
00131 } codec_setup_info;
00132
00133 extern vorbis_look_psy_global *_vp_global_look(vorbis_info *vi);
00134 extern void _vp_global_free(vorbis_look_psy_global *look);
00135
00136 #endif
00137