| 1 | /******************************************************************** |
| 2 | * * |
| 3 | * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * |
| 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
| 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
| 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
| 7 | * * |
| 8 | * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * |
| 9 | * by the Xiph.Org Foundation https://xiph.org/ * |
| 10 | * * |
| 11 | ******************************************************************** |
| 12 | |
| 13 | function: libvorbis backend and mapping structures; needed for |
| 14 | static mode headers |
| 15 | |
| 16 | ********************************************************************/ |
| 17 | |
| 18 | /* this is exposed up here because we need it for static modes. |
| 19 | Lookups for each backend aren't exposed because there's no reason |
| 20 | to do so */ |
| 21 | |
| 22 | #ifndef _vorbis_backend_h_ |
| 23 | #define _vorbis_backend_h_cxx . . $ `external/vorbis/vorbis_backends.h:23:9`! |
| 24 | |
| 25 | #include "vorbis_codec_internal.h"cxx . . $ `<file>/external/vorbis/vorbis_codec_internal.h`/ |
| 26 | |
| 27 | /* this would all be simpler/shorter with templates, but.... */ |
| 28 | /* Floor backend generic *****************************************/ |
| 29 | typedef structcxx . . $ $anonymous_type_f527c519943fbe69_0#{ |
| 30 | void (*packcxx . . $ $anonymous_type_f527c519943fbe69_0#pack.) (vorbis_info_floorcxx . . $ vorbis_info_floor# *,oggpack_buffercxx . . $ oggpack_buffer# *); |
| 31 | vorbis_info_floorcxx . . $ vorbis_info_floor# *(*unpackcxx . . $ $anonymous_type_f527c519943fbe69_0#unpack.)(vorbis_infocxx . . $ vorbis_info# *,oggpack_buffercxx . . $ oggpack_buffer# *); |
| 32 | vorbis_look_floorcxx . . $ vorbis_look_floor# *(*lookcxx . . $ $anonymous_type_f527c519943fbe69_0#look.) (vorbis_dsp_statecxx . . $ vorbis_dsp_state# *,vorbis_info_floorcxx . . $ vorbis_info_floor# *); |
| 33 | void (*free_infocxx . . $ $anonymous_type_f527c519943fbe69_0#free_info.) (vorbis_info_floorcxx . . $ vorbis_info_floor# *); |
| 34 | void (*free_lookcxx . . $ $anonymous_type_f527c519943fbe69_0#free_look.) (vorbis_look_floorcxx . . $ vorbis_look_floor# *); |
| 35 | void *(*inverse1cxx . . $ $anonymous_type_f527c519943fbe69_0#inverse1.) (struct vorbis_blockcxx . . $ vorbis_block# *,vorbis_look_floorcxx . . $ vorbis_look_floor# *); |
| 36 | int (*inverse2cxx . . $ $anonymous_type_f527c519943fbe69_0#inverse2.) (struct vorbis_blockcxx . . $ vorbis_block# *,vorbis_look_floorcxx . . $ vorbis_look_floor# *, |
| 37 | void *buffer,float *); |
| 38 | } vorbis_func_floorcxx . . $ vorbis_func_floor#; |
| 39 | |
| 40 | typedef structcxx . . $ $anonymous_type_f527c519943fbe69_1#{ |
| 41 | int ordercxx . . $ $anonymous_type_f527c519943fbe69_1#order.; |
| 42 | long ratecxx . . $ $anonymous_type_f527c519943fbe69_1#rate.; |
| 43 | long barkmapcxx . . $ $anonymous_type_f527c519943fbe69_1#barkmap.; |
| 44 | |
| 45 | int ampbitscxx . . $ $anonymous_type_f527c519943fbe69_1#ampbits.; |
| 46 | int ampdBcxx . . $ $anonymous_type_f527c519943fbe69_1#ampdB.; |
| 47 | |
| 48 | int numbookscxx . . $ $anonymous_type_f527c519943fbe69_1#numbooks.; /* <= 16 */ |
| 49 | int bookscxx . . $ $anonymous_type_f527c519943fbe69_1#books.[16]; |
| 50 | |
| 51 | float lessthancxx . . $ $anonymous_type_f527c519943fbe69_1#lessthan.; /* encode-only config setting hacks for libvorbis */ |
| 52 | float greaterthancxx . . $ $anonymous_type_f527c519943fbe69_1#greaterthan.; /* encode-only config setting hacks for libvorbis */ |
| 53 | |
| 54 | } vorbis_info_floor0cxx . . $ vorbis_info_floor0#; |
| 55 | |
| 56 | |
| 57 | #define VIF_POSITcxx . . $ `external/vorbis/vorbis_backends.h:57:9`! 63 |
| 58 | #define VIF_CLASScxx . . $ `external/vorbis/vorbis_backends.h:58:9`! 16 |
| 59 | #define VIF_PARTScxx . . $ `external/vorbis/vorbis_backends.h:59:9`! 31 |
| 60 | typedef structcxx . . $ $anonymous_type_f527c519943fbe69_2#{ |
| 61 | int partitionscxx . . $ $anonymous_type_f527c519943fbe69_2#partitions.; /* 0 to 31 */ |
| 62 | int partitionclasscxx . . $ $anonymous_type_f527c519943fbe69_2#partitionclass.[VIF_PARTScxx . . $ `external/vorbis/vorbis_backends.h:59:9`!]; /* 0 to 15 */ |
| 63 | |
| 64 | int class_dimcxx . . $ $anonymous_type_f527c519943fbe69_2#class_dim.[VIF_CLASScxx . . $ `external/vorbis/vorbis_backends.h:58:9`!]; /* 1 to 8 */ |
| 65 | int class_subscxx . . $ $anonymous_type_f527c519943fbe69_2#class_subs.[VIF_CLASScxx . . $ `external/vorbis/vorbis_backends.h:58:9`!]; /* 0,1,2,3 (bits: 1<<n poss) */ |
| 66 | int class_bookcxx . . $ $anonymous_type_f527c519943fbe69_2#class_book.[VIF_CLASScxx . . $ `external/vorbis/vorbis_backends.h:58:9`!]; /* subs ^ dim entries */ |
| 67 | int class_subbookcxx . . $ $anonymous_type_f527c519943fbe69_2#class_subbook.[VIF_CLASScxx . . $ `external/vorbis/vorbis_backends.h:58:9`!][8]; /* [VIF_CLASS][subs] */ |
| 68 | |
| 69 | |
| 70 | int multcxx . . $ $anonymous_type_f527c519943fbe69_2#mult.; /* 1 2 3 or 4 */ |
| 71 | int postlistcxx . . $ $anonymous_type_f527c519943fbe69_2#postlist.[VIF_POSITcxx . . $ `external/vorbis/vorbis_backends.h:57:9`!+2]; /* first two implicit */ |
| 72 | |
| 73 | |
| 74 | /* encode side analysis parameters */ |
| 75 | float maxovercxx . . $ $anonymous_type_f527c519943fbe69_2#maxover.; |
| 76 | float maxundercxx . . $ $anonymous_type_f527c519943fbe69_2#maxunder.; |
| 77 | float maxerrcxx . . $ $anonymous_type_f527c519943fbe69_2#maxerr.; |
| 78 | |
| 79 | float twofitweightcxx . . $ $anonymous_type_f527c519943fbe69_2#twofitweight.; |
| 80 | float twofitattencxx . . $ $anonymous_type_f527c519943fbe69_2#twofitatten.; |
| 81 | |
| 82 | int ncxx . . $ $anonymous_type_f527c519943fbe69_2#n.; |
| 83 | |
| 84 | } vorbis_info_floor1cxx . . $ vorbis_info_floor1#; |
| 85 | |
| 86 | /* Residue backend generic *****************************************/ |
| 87 | typedef structcxx . . $ $anonymous_type_f527c519943fbe69_3#{ |
| 88 | void (*packcxx . . $ $anonymous_type_f527c519943fbe69_3#pack.) (vorbis_info_residuecxx . . $ vorbis_info_residue# *,oggpack_buffercxx . . $ oggpack_buffer# *); |
| 89 | vorbis_info_residuecxx . . $ vorbis_info_residue# *(*unpackcxx . . $ $anonymous_type_f527c519943fbe69_3#unpack.)(vorbis_infocxx . . $ vorbis_info# *,oggpack_buffercxx . . $ oggpack_buffer# *); |
| 90 | vorbis_look_residuecxx . . $ vorbis_look_residue# *(*lookcxx . . $ $anonymous_type_f527c519943fbe69_3#look.) (vorbis_dsp_statecxx . . $ vorbis_dsp_state# *, |
| 91 | vorbis_info_residuecxx . . $ vorbis_info_residue# *); |
| 92 | void (*free_infocxx . . $ $anonymous_type_f527c519943fbe69_3#free_info.) (vorbis_info_residuecxx . . $ vorbis_info_residue# *); |
| 93 | void (*free_lookcxx . . $ $anonymous_type_f527c519943fbe69_3#free_look.) (vorbis_look_residuecxx . . $ vorbis_look_residue# *); |
| 94 | long **(*classscxx . . $ $anonymous_type_f527c519943fbe69_3#classs.) (struct vorbis_blockcxx . . $ vorbis_block# *,vorbis_look_residuecxx . . $ vorbis_look_residue# *, |
| 95 | int **,int *,int); |
| 96 | int (*forwardcxx . . $ $anonymous_type_f527c519943fbe69_3#forward.) (oggpack_buffercxx . . $ oggpack_buffer# *,struct vorbis_blockcxx . . $ vorbis_block# *, |
| 97 | vorbis_look_residuecxx . . $ vorbis_look_residue# *, |
| 98 | int **,int *,int,long **,int); |
| 99 | int (*inversecxx . . $ $anonymous_type_f527c519943fbe69_3#inverse.) (struct vorbis_blockcxx . . $ vorbis_block# *,vorbis_look_residuecxx . . $ vorbis_look_residue# *, |
| 100 | float **,int *,int); |
| 101 | } vorbis_func_residuecxx . . $ vorbis_func_residue#; |
| 102 | |
| 103 | typedef struct vorbis_info_residue0cxx . . $ vorbis_info_residue0#{ |
| 104 | /* block-partitioned VQ coded straight residue */ |
| 105 | long begincxx . . $ vorbis_info_residue0#begin.; |
| 106 | long endcxx . . $ vorbis_info_residue0#end.; |
| 107 | |
| 108 | /* first stage (lossless partitioning) */ |
| 109 | int groupingcxx . . $ vorbis_info_residue0#grouping.; /* group n vectors per partition */ |
| 110 | int partitionscxx . . $ vorbis_info_residue0#partitions.; /* possible codebooks for a partition */ |
| 111 | int partvalscxx . . $ vorbis_info_residue0#partvals.; /* partitions ^ groupbook dim */ |
| 112 | int groupbookcxx . . $ vorbis_info_residue0#groupbook.; /* huffbook for partitioning */ |
| 113 | int secondstagescxx . . $ vorbis_info_residue0#secondstages.[64]; /* expanded out to pointers in lookup */ |
| 114 | int booklistcxx . . $ vorbis_info_residue0#booklist.[512]; /* list of second stage books */ |
| 115 | |
| 116 | const int classmetric1cxx . . $ vorbis_info_residue0#classmetric1.[64]; |
| 117 | const int classmetric2cxx . . $ vorbis_info_residue0#classmetric2.[64]; |
| 118 | } vorbis_info_residue0cxx . . $ vorbis_info_residue0#; |
| 119 | |
| 120 | /* Mapping backend generic *****************************************/ |
| 121 | typedef structcxx . . $ $anonymous_type_f527c519943fbe69_4#{ |
| 122 | void (*packcxx . . $ $anonymous_type_f527c519943fbe69_4#pack.) (vorbis_infocxx . . $ vorbis_info# *,vorbis_info_mappingcxx . . $ vorbis_info_mapping# *, |
| 123 | oggpack_buffercxx . . $ oggpack_buffer# *); |
| 124 | vorbis_info_mappingcxx . . $ vorbis_info_mapping# *(*unpackcxx . . $ $anonymous_type_f527c519943fbe69_4#unpack.)(vorbis_infocxx . . $ vorbis_info# *,oggpack_buffercxx . . $ oggpack_buffer# *); |
| 125 | void (*free_infocxx . . $ $anonymous_type_f527c519943fbe69_4#free_info.) (vorbis_info_mappingcxx . . $ vorbis_info_mapping# *); |
| 126 | int (*forwardcxx . . $ $anonymous_type_f527c519943fbe69_4#forward.) (struct vorbis_blockcxx . . $ vorbis_block# *vb); |
| 127 | int (*inversecxx . . $ $anonymous_type_f527c519943fbe69_4#inverse.) (struct vorbis_blockcxx . . $ vorbis_block# *vb,vorbis_info_mappingcxx . . $ vorbis_info_mapping# *); |
| 128 | } vorbis_func_mappingcxx . . $ vorbis_func_mapping#; |
| 129 | |
| 130 | typedef struct vorbis_info_mapping0cxx . . $ vorbis_info_mapping0#{ |
| 131 | int submapscxx . . $ vorbis_info_mapping0#submaps.; /* <= 16 */ |
| 132 | int chmuxlistcxx . . $ vorbis_info_mapping0#chmuxlist.[256]; /* up to 256 channels in a Vorbis stream */ |
| 133 | |
| 134 | int floorsubmapcxx . . $ vorbis_info_mapping0#floorsubmap.[16]; /* [mux] submap to floors */ |
| 135 | int residuesubmapcxx . . $ vorbis_info_mapping0#residuesubmap.[16]; /* [mux] submap to residue */ |
| 136 | |
| 137 | int coupling_stepscxx . . $ vorbis_info_mapping0#coupling_steps.; |
| 138 | int coupling_magcxx . . $ vorbis_info_mapping0#coupling_mag.[256]; |
| 139 | int coupling_angcxx . . $ vorbis_info_mapping0#coupling_ang.[256]; |
| 140 | |
| 141 | } vorbis_info_mapping0cxx . . $ vorbis_info_mapping0#; |
| 142 | |
| 143 | #endif |