dbf-halloween2015

annotate libs/vorbis/bitrate.h @ 3:c37fe5d8a4ed

windows port
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 01 Nov 2015 06:04:28 +0200
parents
children
rev   line source
nuclear@1 1 /********************************************************************
nuclear@1 2 * *
nuclear@1 3 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
nuclear@1 4 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
nuclear@1 5 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
nuclear@1 6 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
nuclear@1 7 * *
nuclear@1 8 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
nuclear@1 9 * by the Xiph.Org Foundation http://www.xiph.org/ *
nuclear@1 10 * *
nuclear@1 11 ********************************************************************
nuclear@1 12
nuclear@1 13 function: bitrate tracking and management
nuclear@1 14 last mod: $Id: bitrate.h 13293 2007-07-24 00:09:47Z xiphmont $
nuclear@1 15
nuclear@1 16 ********************************************************************/
nuclear@1 17
nuclear@1 18 #ifndef _V_BITRATE_H_
nuclear@1 19 #define _V_BITRATE_H_
nuclear@1 20
nuclear@1 21 #include "vorbis/codec.h"
nuclear@1 22 #include "codec_internal.h"
nuclear@1 23 #include "os.h"
nuclear@1 24
nuclear@1 25 /* encode side bitrate tracking */
nuclear@1 26 typedef struct bitrate_manager_state {
nuclear@1 27 int managed;
nuclear@1 28
nuclear@1 29 long avg_reservoir;
nuclear@1 30 long minmax_reservoir;
nuclear@1 31 long avg_bitsper;
nuclear@1 32 long min_bitsper;
nuclear@1 33 long max_bitsper;
nuclear@1 34
nuclear@1 35 long short_per_long;
nuclear@1 36 double avgfloat;
nuclear@1 37
nuclear@1 38 vorbis_block *vb;
nuclear@1 39 int choice;
nuclear@1 40 } bitrate_manager_state;
nuclear@1 41
nuclear@1 42 typedef struct bitrate_manager_info{
nuclear@1 43 long avg_rate;
nuclear@1 44 long min_rate;
nuclear@1 45 long max_rate;
nuclear@1 46 long reservoir_bits;
nuclear@1 47 double reservoir_bias;
nuclear@1 48
nuclear@1 49 double slew_damp;
nuclear@1 50
nuclear@1 51 } bitrate_manager_info;
nuclear@1 52
nuclear@1 53 extern void vorbis_bitrate_init(vorbis_info *vi,bitrate_manager_state *bs);
nuclear@1 54 extern void vorbis_bitrate_clear(bitrate_manager_state *bs);
nuclear@1 55 extern int vorbis_bitrate_managed(vorbis_block *vb);
nuclear@1 56 extern int vorbis_bitrate_addblock(vorbis_block *vb);
nuclear@1 57 extern int vorbis_bitrate_flushpacket(vorbis_dsp_state *vd, ogg_packet *op);
nuclear@1 58
nuclear@1 59 #endif