nuclear@0: /******************************************************************** nuclear@0: * * nuclear@0: * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * nuclear@0: * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * nuclear@0: * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * nuclear@0: * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * nuclear@0: * * nuclear@0: * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * nuclear@0: * by the Xiph.Org Foundation http://www.xiph.org/ * nuclear@0: * * nuclear@0: ******************************************************************** nuclear@0: nuclear@0: function: libvorbis backend and mapping structures; needed for nuclear@0: static mode headers nuclear@0: last mod: $Id: backends.h 16962 2010-03-11 07:30:34Z xiphmont $ nuclear@0: nuclear@0: ********************************************************************/ nuclear@0: nuclear@0: /* this is exposed up here because we need it for static modes. nuclear@0: Lookups for each backend aren't exposed because there's no reason nuclear@0: to do so */ nuclear@0: nuclear@0: #ifndef _vorbis_backend_h_ nuclear@0: #define _vorbis_backend_h_ nuclear@0: nuclear@0: #include "codec_internal.h" nuclear@0: nuclear@0: /* this would all be simpler/shorter with templates, but.... */ nuclear@0: /* Floor backend generic *****************************************/ nuclear@0: typedef struct{ nuclear@0: void (*pack) (vorbis_info_floor *,oggpack_buffer *); nuclear@0: vorbis_info_floor *(*unpack)(vorbis_info *,oggpack_buffer *); nuclear@0: vorbis_look_floor *(*look) (vorbis_dsp_state *,vorbis_info_floor *); nuclear@0: void (*free_info) (vorbis_info_floor *); nuclear@0: void (*free_look) (vorbis_look_floor *); nuclear@0: void *(*inverse1) (struct vorbis_block *,vorbis_look_floor *); nuclear@0: int (*inverse2) (struct vorbis_block *,vorbis_look_floor *, nuclear@0: void *buffer,float *); nuclear@0: } vorbis_func_floor; nuclear@0: nuclear@0: typedef struct{ nuclear@0: int order; nuclear@0: long rate; nuclear@0: long barkmap; nuclear@0: nuclear@0: int ampbits; nuclear@0: int ampdB; nuclear@0: nuclear@0: int numbooks; /* <= 16 */ nuclear@0: int books[16]; nuclear@0: nuclear@0: float lessthan; /* encode-only config setting hacks for libvorbis */ nuclear@0: float greaterthan; /* encode-only config setting hacks for libvorbis */ nuclear@0: nuclear@0: } vorbis_info_floor0; nuclear@0: nuclear@0: nuclear@0: #define VIF_POSIT 63 nuclear@0: #define VIF_CLASS 16 nuclear@0: #define VIF_PARTS 31 nuclear@0: typedef struct{ nuclear@0: int partitions; /* 0 to 31 */ nuclear@0: int partitionclass[VIF_PARTS]; /* 0 to 15 */ nuclear@0: nuclear@0: int class_dim[VIF_CLASS]; /* 1 to 8 */ nuclear@0: int class_subs[VIF_CLASS]; /* 0,1,2,3 (bits: 1<