annotate src/libvorbis-1.3.3/lib/backends.h @ 169:223a55898ab9 tip default

Add null config files
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 02 Mar 2020 14:03:47 +0000
parents 98c1576536ae
children
rev   line source
cannam@86 1 /********************************************************************
cannam@86 2 * *
cannam@86 3 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
cannam@86 4 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
cannam@86 5 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
cannam@86 6 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
cannam@86 7 * *
cannam@86 8 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
cannam@86 9 * by the Xiph.Org Foundation http://www.xiph.org/ *
cannam@86 10 * *
cannam@86 11 ********************************************************************
cannam@86 12
cannam@86 13 function: libvorbis backend and mapping structures; needed for
cannam@86 14 static mode headers
cannam@86 15 last mod: $Id: backends.h 16962 2010-03-11 07:30:34Z xiphmont $
cannam@86 16
cannam@86 17 ********************************************************************/
cannam@86 18
cannam@86 19 /* this is exposed up here because we need it for static modes.
cannam@86 20 Lookups for each backend aren't exposed because there's no reason
cannam@86 21 to do so */
cannam@86 22
cannam@86 23 #ifndef _vorbis_backend_h_
cannam@86 24 #define _vorbis_backend_h_
cannam@86 25
cannam@86 26 #include "codec_internal.h"
cannam@86 27
cannam@86 28 /* this would all be simpler/shorter with templates, but.... */
cannam@86 29 /* Floor backend generic *****************************************/
cannam@86 30 typedef struct{
cannam@86 31 void (*pack) (vorbis_info_floor *,oggpack_buffer *);
cannam@86 32 vorbis_info_floor *(*unpack)(vorbis_info *,oggpack_buffer *);
cannam@86 33 vorbis_look_floor *(*look) (vorbis_dsp_state *,vorbis_info_floor *);
cannam@86 34 void (*free_info) (vorbis_info_floor *);
cannam@86 35 void (*free_look) (vorbis_look_floor *);
cannam@86 36 void *(*inverse1) (struct vorbis_block *,vorbis_look_floor *);
cannam@86 37 int (*inverse2) (struct vorbis_block *,vorbis_look_floor *,
cannam@86 38 void *buffer,float *);
cannam@86 39 } vorbis_func_floor;
cannam@86 40
cannam@86 41 typedef struct{
cannam@86 42 int order;
cannam@86 43 long rate;
cannam@86 44 long barkmap;
cannam@86 45
cannam@86 46 int ampbits;
cannam@86 47 int ampdB;
cannam@86 48
cannam@86 49 int numbooks; /* <= 16 */
cannam@86 50 int books[16];
cannam@86 51
cannam@86 52 float lessthan; /* encode-only config setting hacks for libvorbis */
cannam@86 53 float greaterthan; /* encode-only config setting hacks for libvorbis */
cannam@86 54
cannam@86 55 } vorbis_info_floor0;
cannam@86 56
cannam@86 57
cannam@86 58 #define VIF_POSIT 63
cannam@86 59 #define VIF_CLASS 16
cannam@86 60 #define VIF_PARTS 31
cannam@86 61 typedef struct{
cannam@86 62 int partitions; /* 0 to 31 */
cannam@86 63 int partitionclass[VIF_PARTS]; /* 0 to 15 */
cannam@86 64
cannam@86 65 int class_dim[VIF_CLASS]; /* 1 to 8 */
cannam@86 66 int class_subs[VIF_CLASS]; /* 0,1,2,3 (bits: 1<<n poss) */
cannam@86 67 int class_book[VIF_CLASS]; /* subs ^ dim entries */
cannam@86 68 int class_subbook[VIF_CLASS][8]; /* [VIF_CLASS][subs] */
cannam@86 69
cannam@86 70
cannam@86 71 int mult; /* 1 2 3 or 4 */
cannam@86 72 int postlist[VIF_POSIT+2]; /* first two implicit */
cannam@86 73
cannam@86 74
cannam@86 75 /* encode side analysis parameters */
cannam@86 76 float maxover;
cannam@86 77 float maxunder;
cannam@86 78 float maxerr;
cannam@86 79
cannam@86 80 float twofitweight;
cannam@86 81 float twofitatten;
cannam@86 82
cannam@86 83 int n;
cannam@86 84
cannam@86 85 } vorbis_info_floor1;
cannam@86 86
cannam@86 87 /* Residue backend generic *****************************************/
cannam@86 88 typedef struct{
cannam@86 89 void (*pack) (vorbis_info_residue *,oggpack_buffer *);
cannam@86 90 vorbis_info_residue *(*unpack)(vorbis_info *,oggpack_buffer *);
cannam@86 91 vorbis_look_residue *(*look) (vorbis_dsp_state *,
cannam@86 92 vorbis_info_residue *);
cannam@86 93 void (*free_info) (vorbis_info_residue *);
cannam@86 94 void (*free_look) (vorbis_look_residue *);
cannam@86 95 long **(*class) (struct vorbis_block *,vorbis_look_residue *,
cannam@86 96 int **,int *,int);
cannam@86 97 int (*forward) (oggpack_buffer *,struct vorbis_block *,
cannam@86 98 vorbis_look_residue *,
cannam@86 99 int **,int *,int,long **,int);
cannam@86 100 int (*inverse) (struct vorbis_block *,vorbis_look_residue *,
cannam@86 101 float **,int *,int);
cannam@86 102 } vorbis_func_residue;
cannam@86 103
cannam@86 104 typedef struct vorbis_info_residue0{
cannam@86 105 /* block-partitioned VQ coded straight residue */
cannam@86 106 long begin;
cannam@86 107 long end;
cannam@86 108
cannam@86 109 /* first stage (lossless partitioning) */
cannam@86 110 int grouping; /* group n vectors per partition */
cannam@86 111 int partitions; /* possible codebooks for a partition */
cannam@86 112 int partvals; /* partitions ^ groupbook dim */
cannam@86 113 int groupbook; /* huffbook for partitioning */
cannam@86 114 int secondstages[64]; /* expanded out to pointers in lookup */
cannam@86 115 int booklist[512]; /* list of second stage books */
cannam@86 116
cannam@86 117 const int classmetric1[64];
cannam@86 118 const int classmetric2[64];
cannam@86 119 } vorbis_info_residue0;
cannam@86 120
cannam@86 121 /* Mapping backend generic *****************************************/
cannam@86 122 typedef struct{
cannam@86 123 void (*pack) (vorbis_info *,vorbis_info_mapping *,
cannam@86 124 oggpack_buffer *);
cannam@86 125 vorbis_info_mapping *(*unpack)(vorbis_info *,oggpack_buffer *);
cannam@86 126 void (*free_info) (vorbis_info_mapping *);
cannam@86 127 int (*forward) (struct vorbis_block *vb);
cannam@86 128 int (*inverse) (struct vorbis_block *vb,vorbis_info_mapping *);
cannam@86 129 } vorbis_func_mapping;
cannam@86 130
cannam@86 131 typedef struct vorbis_info_mapping0{
cannam@86 132 int submaps; /* <= 16 */
cannam@86 133 int chmuxlist[256]; /* up to 256 channels in a Vorbis stream */
cannam@86 134
cannam@86 135 int floorsubmap[16]; /* [mux] submap to floors */
cannam@86 136 int residuesubmap[16]; /* [mux] submap to residue */
cannam@86 137
cannam@86 138 int coupling_steps;
cannam@86 139 int coupling_mag[256];
cannam@86 140 int coupling_ang[256];
cannam@86 141
cannam@86 142 } vorbis_info_mapping0;
cannam@86 143
cannam@86 144 #endif