dbf-halloween2015
diff libs/vorbis/bitrate.h @ 1:c3f5c32cb210
barfed all the libraries in the source tree to make porting easier
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 01 Nov 2015 00:36:56 +0200 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/libs/vorbis/bitrate.h Sun Nov 01 00:36:56 2015 +0200 1.3 @@ -0,0 +1,59 @@ 1.4 +/******************************************************************** 1.5 + * * 1.6 + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * 1.7 + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 1.8 + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 1.9 + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 1.10 + * * 1.11 + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * 1.12 + * by the Xiph.Org Foundation http://www.xiph.org/ * 1.13 + * * 1.14 + ******************************************************************** 1.15 + 1.16 + function: bitrate tracking and management 1.17 + last mod: $Id: bitrate.h 13293 2007-07-24 00:09:47Z xiphmont $ 1.18 + 1.19 + ********************************************************************/ 1.20 + 1.21 +#ifndef _V_BITRATE_H_ 1.22 +#define _V_BITRATE_H_ 1.23 + 1.24 +#include "vorbis/codec.h" 1.25 +#include "codec_internal.h" 1.26 +#include "os.h" 1.27 + 1.28 +/* encode side bitrate tracking */ 1.29 +typedef struct bitrate_manager_state { 1.30 + int managed; 1.31 + 1.32 + long avg_reservoir; 1.33 + long minmax_reservoir; 1.34 + long avg_bitsper; 1.35 + long min_bitsper; 1.36 + long max_bitsper; 1.37 + 1.38 + long short_per_long; 1.39 + double avgfloat; 1.40 + 1.41 + vorbis_block *vb; 1.42 + int choice; 1.43 +} bitrate_manager_state; 1.44 + 1.45 +typedef struct bitrate_manager_info{ 1.46 + long avg_rate; 1.47 + long min_rate; 1.48 + long max_rate; 1.49 + long reservoir_bits; 1.50 + double reservoir_bias; 1.51 + 1.52 + double slew_damp; 1.53 + 1.54 +} bitrate_manager_info; 1.55 + 1.56 +extern void vorbis_bitrate_init(vorbis_info *vi,bitrate_manager_state *bs); 1.57 +extern void vorbis_bitrate_clear(bitrate_manager_state *bs); 1.58 +extern int vorbis_bitrate_managed(vorbis_block *vb); 1.59 +extern int vorbis_bitrate_addblock(vorbis_block *vb); 1.60 +extern int vorbis_bitrate_flushpacket(vorbis_dsp_state *vd, ogg_packet *op); 1.61 + 1.62 +#endif