00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _V_BITRATE_H_
00019 #define _V_BITRATE_H_
00020
00021 #include "vorbis/codec.h"
00022 #include "codec_internal.h"
00023 #include "os.h"
00024
00025
00026 typedef struct bitrate_manager_state {
00027 int managed;
00028
00029 long avg_reservoir;
00030 long minmax_reservoir;
00031 long avg_bitsper;
00032 long min_bitsper;
00033 long max_bitsper;
00034
00035 long short_per_long;
00036 double avgfloat;
00037
00038 vorbis_block *vb;
00039 int choice;
00040 } bitrate_manager_state;
00041
00042 typedef struct bitrate_manager_info{
00043 long avg_rate;
00044 long min_rate;
00045 long max_rate;
00046 long reservoir_bits;
00047 double reservoir_bias;
00048
00049 double slew_damp;
00050
00051 } bitrate_manager_info;
00052
00053 extern void vorbis_bitrate_init(vorbis_info *vi,bitrate_manager_state *bs);
00054 extern void vorbis_bitrate_clear(bitrate_manager_state *bs);
00055 extern int vorbis_bitrate_managed(vorbis_block *vb);
00056 extern int vorbis_bitrate_addblock(vorbis_block *vb);
00057 extern int vorbis_bitrate_flushpacket(vorbis_dsp_state *vd, ogg_packet *op);
00058
00059 #endif