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