1 /********************************************************************
3 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
4 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
5 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
6 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
8 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
9 * by the Xiph.Org Foundation http://www.xiph.org/ *
11 ********************************************************************
13 function: bitrate tracking and management
14 last mod: $Id: bitrate.h 13293 2007-07-24 00:09:47Z xiphmont $
16 ********************************************************************/
21 #include "vorbis/codec.h"
22 #include "codec_internal.h"
25 /* encode side bitrate tracking */
26 typedef struct bitrate_manager_state {
30 long minmax_reservoir;
40 } bitrate_manager_state;
42 typedef struct bitrate_manager_info{
47 double reservoir_bias;
51 } bitrate_manager_info;
53 extern void vorbis_bitrate_init(vorbis_info *vi,bitrate_manager_state *bs);
54 extern void vorbis_bitrate_clear(bitrate_manager_state *bs);
55 extern int vorbis_bitrate_managed(vorbis_block *vb);
56 extern int vorbis_bitrate_addblock(vorbis_block *vb);
57 extern int vorbis_bitrate_flushpacket(vorbis_dsp_state *vd, ogg_packet *op);