examples/SFExamples/oggvorbiscodec94/src/libvorbis/lib/bitrate.h

00001 /********************************************************************
00002  *                                                                  *
00003  * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
00004  * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
00005  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
00006  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
00007  *                                                                  *
00008  * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
00009  * by the XIPHOPHORUS Company http://www.xiph.org/                  *
00010  *                                                                  *
00011  ********************************************************************
00012 
00013  function: bitrate tracking and management
00014  last mod: $Id: bitrate.h 7187 2004-07-20 07:24:27Z xiphmont $
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 /* encode side bitrate tracking */
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

Generated by  doxygen 1.6.2