Code Search for Developers
 
 
  

bitrate.h from NeoEngineNG at Krugle


Show bitrate.h syntax highlighted

/********************************************************************
 *                                                                  *
 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
 *                                                                  *
 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
 * by the XIPHOPHORUS Company http://www.xiph.org/                  *
 *                                                                  *
 ********************************************************************

 function: bitrate tracking and management
 last mod: $Id: bitrate.h,v 1.1 2004/03/17 18:22:56 arithon Exp $

 ********************************************************************/

#ifndef _V_BITRATE_H_
#define _V_BITRATE_H_

#include "vorbis/codec.h"
#include "codec_internal.h"
#include "os.h"

/* encode side bitrate tracking */
typedef struct bitrate_manager_state {
  ogg_uint32_t  *queue_binned;
  ogg_uint32_t  *queue_actual;
  int            queue_size;

  int            queue_head;
  int            queue_bins;

  long          *avg_binacc;
  int            avg_center;
  int            avg_tail;
  ogg_uint32_t   avg_centeracc;
  ogg_uint32_t   avg_sampleacc;
  ogg_uint32_t   avg_sampledesired;
  ogg_uint32_t   avg_centerdesired;

  long          *minmax_binstack;
  long          *minmax_posstack;
  long          *minmax_limitstack;
  long           minmax_stackptr;

  long           minmax_acctotal;
  int            minmax_tail;
  ogg_uint32_t   minmax_sampleacc;
  ogg_uint32_t   minmax_sampledesired;

  int            next_to_flush;
  int            last_to_flush;
  
  double         avgfloat;

  /* unfortunately, we need to hold queued packet data somewhere */
  oggpack_buffer *packetbuffers;
  ogg_packet     *packets;

} bitrate_manager_state;

typedef struct bitrate_manager_info{
  /* detailed bitrate management setup */
  double queue_avg_time;
  double queue_avg_center;
  double queue_minmax_time;
  double queue_hardmin;
  double queue_hardmax;
  double queue_avgmin;
  double queue_avgmax;

  double avgfloat_downslew_max;
  double avgfloat_upslew_max;

} bitrate_manager_info;

extern void vorbis_bitrate_init(vorbis_info *vi,bitrate_manager_state *bs);
extern void vorbis_bitrate_clear(bitrate_manager_state *bs);
extern int vorbis_bitrate_managed(vorbis_block *vb);
extern int vorbis_bitrate_addblock(vorbis_block *vb);
extern int vorbis_bitrate_flushpacket(vorbis_dsp_state *vd, ogg_packet *op);

#endif




See more files for this project here

NeoEngineNG

NeoenEngine NG (Next Generation) is the evolution of neoengine one,it\'s a different development from NeoEngine2, it\'s a direct inherits from NeoEngine one.\n

Project homepage: http://sourceforge.net/projects/neoengineng
Programming language(s): C,C++
License: other

  books/
    coupled/
      res_books_stereo.h
    floor/
      floor_books.h
    uncoupled/
      res_books_uncoupled.h
  modes/
    floor_all.h
    psych_11.h
    psych_16.h
    psych_44.h
    psych_8.h
    residue_16.h
    residue_44.h
    residue_44u.h
    residue_8.h
    setup_11.h
    setup_16.h
    setup_22.h
    setup_32.h
    setup_44.h
    setup_44u.h
    setup_8.h
    setup_X.h
  analysis.c
  backends.h
  barkmel.c
  bitrate.c
  bitrate.h
  block.c
  codebook.c
  codebook.h
  codec.h
  codec_internal.h
  envelope.c
  envelope.h
  floor0.c
  floor1.c
  highlevel.h
  info.c
  lookup.c
  lookup.h
  lookup_data.h
  lookups.pl
  lpc.c
  lpc.h
  lsp.c
  lsp.h
  mapping0.c
  masking.h
  mdct.c
  mdct.h
  misc.h
  os.h
  psy.c
  psy.h
  psytune.c
  registry.c
  registry.h
  res0.c
  scales.h
  sharedbook.c
  smallft.c
  smallft.h
  synthesis.c
  tone.c
  vorbisenc.c
  vorbisenc.h
  vorbisfile.c
  vorbisfile.h
  window.c
  window.h