michael@0: /******************************************************************** michael@0: * * michael@0: * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * 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 SOURCE CODE IS (C) COPYRIGHT 1994-2009 * michael@0: * by the Xiph.Org Foundation http://www.xiph.org/ * michael@0: * * michael@0: ******************************************************************** michael@0: michael@0: function: libvorbis backend and mapping structures; needed for michael@0: static mode headers michael@0: last mod: $Id: backends.h 16962 2010-03-11 07:30:34Z xiphmont $ 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: /* Floor backend generic *****************************************/ michael@0: typedef struct{ michael@0: void (*pack) (vorbis_info_floor *,oggpack_buffer *); michael@0: vorbis_info_floor *(*unpack)(vorbis_info *,oggpack_buffer *); michael@0: vorbis_look_floor *(*look) (vorbis_dsp_state *,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,float *); 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: float lessthan; /* encode-only config setting hacks for libvorbis */ michael@0: float greaterthan; /* encode-only config setting hacks for libvorbis */ michael@0: michael@0: } vorbis_info_floor0; michael@0: 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<