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