michael@0: /******************************************************************** michael@0: * * michael@0: * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * michael@0: * * michael@0: * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * michael@0: * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * michael@0: * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * michael@0: * * michael@0: * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * michael@0: * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * michael@0: * * michael@0: ******************************************************************** michael@0: michael@0: function: backend and mapping structures michael@0: michael@0: ********************************************************************/ michael@0: michael@0: /* this is exposed up here because we need it for static modes. michael@0: Lookups for each backend aren't exposed because there's no reason michael@0: to do so */ michael@0: michael@0: #ifndef _vorbis_backend_h_ michael@0: #define _vorbis_backend_h_ michael@0: michael@0: #include "codec_internal.h" michael@0: michael@0: /* this would all be simpler/shorter with templates, but.... */ michael@0: /* Transform backend generic *************************************/ michael@0: michael@0: /* only mdct right now. Flesh it out more if we ever transcend mdct michael@0: in the transform domain */ michael@0: michael@0: /* Floor backend generic *****************************************/ michael@0: typedef struct{ michael@0: vorbis_info_floor *(*unpack)(vorbis_info *,oggpack_buffer *); michael@0: vorbis_look_floor *(*look) (vorbis_dsp_state *,vorbis_info_mode *, michael@0: vorbis_info_floor *); michael@0: void (*free_info) (vorbis_info_floor *); michael@0: void (*free_look) (vorbis_look_floor *); michael@0: void *(*inverse1) (struct vorbis_block *,vorbis_look_floor *); michael@0: int (*inverse2) (struct vorbis_block *,vorbis_look_floor *, michael@0: void *buffer,ogg_int32_t *); michael@0: } vorbis_func_floor; michael@0: michael@0: typedef struct{ michael@0: int order; michael@0: long rate; michael@0: long barkmap; michael@0: michael@0: int ampbits; michael@0: int ampdB; michael@0: michael@0: int numbooks; /* <= 16 */ michael@0: int books[16]; michael@0: michael@0: } vorbis_info_floor0; michael@0: michael@0: #define VIF_POSIT 63 michael@0: #define VIF_CLASS 16 michael@0: #define VIF_PARTS 31 michael@0: typedef struct{ michael@0: int partitions; /* 0 to 31 */ michael@0: int partitionclass[VIF_PARTS]; /* 0 to 15 */ michael@0: michael@0: int class_dim[VIF_CLASS]; /* 1 to 8 */ michael@0: int class_subs[VIF_CLASS]; /* 0,1,2,3 (bits: 1<