examples/SFExamples/oggvorbiscodec/src/libvorbis/lib/modes/residue_44.h

00001 /********************************************************************
00002  *                                                                  *
00003  * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
00004  * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
00005  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
00006  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
00007  *                                                                  *
00008  * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
00009  * by the XIPHOPHORUS Company http://www.xiph.org/                  *
00010  *                                                                  *
00011  ********************************************************************
00012 
00013  function: toplevel residue templates for 32/44.1/48kHz
00014  last mod: $Id: residue_44.h 7187 2004-07-20 07:24:27Z xiphmont $
00015 
00016  ********************************************************************/
00017 
00018 #include "vorbis/codec.h"
00019 #include "backends.h"
00020 #include "books/coupled/res_books_stereo.h"
00021 
00022 /***** residue backends *********************************************/
00023 
00024 static vorbis_info_residue0 _residue_44_low={
00025   0,-1, -1, 9,-1,
00026   /*  0     1     2     3     4     5     6     7  */
00027   {0},
00028   {-1},
00029   {  .5,  1.5,  2.5,  2.5,  4.5,  8.5,  16.5, 32.5},
00030   {  .5,   .5,   .5,  999., 4.5,  8.5,  16.5, 32.5},
00031 };
00032 
00033 static vorbis_info_residue0 _residue_44_mid={
00034   0,-1, -1, 10,-1,
00035   /*  0     1     2     3     4     5     6     7     8  */
00036   {0},
00037   {-1},
00038   {  .5,  1.5,  1.5,  2.5,  2.5,  4.5,  8.5,  16.5, 32.5},
00039   {  .5,   .5, 999.,   .5,  999., 4.5,  8.5,  16.5, 32.5},
00040 };
00041 
00042 static vorbis_info_residue0 _residue_44_high={
00043   0,-1, -1, 10,-1,
00044   /*  0     1     2     3     4     5     6     7     8  */
00045   {0},
00046   {-1},
00047   {  .5,  1.5,  2.5,  4.5,  8.5, 16.5, 32.5, 71.5,157.5},
00048   {  .5,  1.5,  2.5,  3.5,  4.5,  8.5, 16.5, 71.5,157.5},
00049 };
00050 
00051 static static_bookblock _resbook_44s_n1={
00052   {
00053     {0},{0,0,&_44cn1_s_p1_0},{0,0,&_44cn1_s_p2_0},
00054     {0,0,&_44cn1_s_p3_0},{0,0,&_44cn1_s_p4_0},{0,0,&_44cn1_s_p5_0},
00055     {&_44cn1_s_p6_0,&_44cn1_s_p6_1},{&_44cn1_s_p7_0,&_44cn1_s_p7_1},
00056     {&_44cn1_s_p8_0,&_44cn1_s_p8_1,&_44cn1_s_p8_2}
00057    }
00058 };
00059 static static_bookblock _resbook_44sm_n1={
00060   {
00061     {0},{0,0,&_44cn1_sm_p1_0},{0,0,&_44cn1_sm_p2_0},
00062     {0,0,&_44cn1_sm_p3_0},{0,0,&_44cn1_sm_p4_0},{0,0,&_44cn1_sm_p5_0},
00063     {&_44cn1_sm_p6_0,&_44cn1_sm_p6_1},{&_44cn1_sm_p7_0,&_44cn1_sm_p7_1},
00064     {&_44cn1_sm_p8_0,&_44cn1_sm_p8_1,&_44cn1_sm_p8_2}
00065    }
00066 };
00067 
00068 static static_bookblock _resbook_44s_0={
00069   {
00070     {0},{0,0,&_44c0_s_p1_0},{0,0,&_44c0_s_p2_0},
00071     {0,0,&_44c0_s_p3_0},{0,0,&_44c0_s_p4_0},{0,0,&_44c0_s_p5_0},
00072     {&_44c0_s_p6_0,&_44c0_s_p6_1},{&_44c0_s_p7_0,&_44c0_s_p7_1},
00073     {&_44c0_s_p8_0,&_44c0_s_p8_1,&_44c0_s_p8_2}
00074    }
00075 };
00076 static static_bookblock _resbook_44sm_0={
00077   {
00078     {0},{0,0,&_44c0_sm_p1_0},{0,0,&_44c0_sm_p2_0},
00079     {0,0,&_44c0_sm_p3_0},{0,0,&_44c0_sm_p4_0},{0,0,&_44c0_sm_p5_0},
00080     {&_44c0_sm_p6_0,&_44c0_sm_p6_1},{&_44c0_sm_p7_0,&_44c0_sm_p7_1},
00081     {&_44c0_sm_p8_0,&_44c0_sm_p8_1,&_44c0_sm_p8_2}
00082    }
00083 };
00084 
00085 static static_bookblock _resbook_44s_1={
00086   {
00087     {0},{0,0,&_44c1_s_p1_0},{0,0,&_44c1_s_p2_0},
00088     {0,0,&_44c1_s_p3_0},{0,0,&_44c1_s_p4_0},{0,0,&_44c1_s_p5_0},
00089     {&_44c1_s_p6_0,&_44c1_s_p6_1},{&_44c1_s_p7_0,&_44c1_s_p7_1},
00090     {&_44c1_s_p8_0,&_44c1_s_p8_1,&_44c1_s_p8_2}
00091    }
00092 };
00093 static static_bookblock _resbook_44sm_1={
00094   {
00095     {0},{0,0,&_44c1_sm_p1_0},{0,0,&_44c1_sm_p2_0},
00096     {0,0,&_44c1_sm_p3_0},{0,0,&_44c1_sm_p4_0},{0,0,&_44c1_sm_p5_0},
00097     {&_44c1_sm_p6_0,&_44c1_sm_p6_1},{&_44c1_sm_p7_0,&_44c1_sm_p7_1},
00098     {&_44c1_sm_p8_0,&_44c1_sm_p8_1,&_44c1_sm_p8_2}
00099    }
00100 };
00101 
00102 static static_bookblock _resbook_44s_2={
00103   {
00104     {0},{0,0,&_44c2_s_p1_0},{0,0,&_44c2_s_p2_0},{0,0,&_44c2_s_p3_0},
00105     {0,0,&_44c2_s_p4_0},{0,0,&_44c2_s_p5_0},{0,0,&_44c2_s_p6_0},
00106     {&_44c2_s_p7_0,&_44c2_s_p7_1},{&_44c2_s_p8_0,&_44c2_s_p8_1},
00107     {&_44c2_s_p9_0,&_44c2_s_p9_1,&_44c2_s_p9_2}
00108    }
00109 };
00110 static static_bookblock _resbook_44s_3={
00111   {
00112     {0},{0,0,&_44c3_s_p1_0},{0,0,&_44c3_s_p2_0},{0,0,&_44c3_s_p3_0},
00113     {0,0,&_44c3_s_p4_0},{0,0,&_44c3_s_p5_0},{0,0,&_44c3_s_p6_0},
00114     {&_44c3_s_p7_0,&_44c3_s_p7_1},{&_44c3_s_p8_0,&_44c3_s_p8_1},
00115     {&_44c3_s_p9_0,&_44c3_s_p9_1,&_44c3_s_p9_2}
00116    }
00117 };
00118 static static_bookblock _resbook_44s_4={
00119   {
00120     {0},{0,0,&_44c4_s_p1_0},{0,0,&_44c4_s_p2_0},{0,0,&_44c4_s_p3_0},
00121     {0,0,&_44c4_s_p4_0},{0,0,&_44c4_s_p5_0},{0,0,&_44c4_s_p6_0},
00122     {&_44c4_s_p7_0,&_44c4_s_p7_1},{&_44c4_s_p8_0,&_44c4_s_p8_1},
00123     {&_44c4_s_p9_0,&_44c4_s_p9_1,&_44c4_s_p9_2}
00124    }
00125 };
00126 static static_bookblock _resbook_44s_5={
00127   {
00128     {0},{0,0,&_44c5_s_p1_0},{0,0,&_44c5_s_p2_0},{0,0,&_44c5_s_p3_0},
00129     {0,0,&_44c5_s_p4_0},{0,0,&_44c5_s_p5_0},{0,0,&_44c5_s_p6_0},
00130     {&_44c5_s_p7_0,&_44c5_s_p7_1},{&_44c5_s_p8_0,&_44c5_s_p8_1},
00131     {&_44c5_s_p9_0,&_44c5_s_p9_1,&_44c5_s_p9_2}
00132    }
00133 };
00134 static static_bookblock _resbook_44s_6={
00135   {
00136     {0},{0,0,&_44c6_s_p1_0},{0,0,&_44c6_s_p2_0},{0,0,&_44c6_s_p3_0},
00137     {0,0,&_44c6_s_p4_0},
00138     {&_44c6_s_p5_0,&_44c6_s_p5_1},
00139     {&_44c6_s_p6_0,&_44c6_s_p6_1},
00140     {&_44c6_s_p7_0,&_44c6_s_p7_1},
00141     {&_44c6_s_p8_0,&_44c6_s_p8_1},
00142     {&_44c6_s_p9_0,&_44c6_s_p9_1,&_44c6_s_p9_2}
00143    }
00144 };
00145 static static_bookblock _resbook_44s_7={
00146   {
00147     {0},{0,0,&_44c7_s_p1_0},{0,0,&_44c7_s_p2_0},{0,0,&_44c7_s_p3_0},
00148     {0,0,&_44c7_s_p4_0},
00149     {&_44c7_s_p5_0,&_44c7_s_p5_1},
00150     {&_44c7_s_p6_0,&_44c7_s_p6_1},
00151     {&_44c7_s_p7_0,&_44c7_s_p7_1},
00152     {&_44c7_s_p8_0,&_44c7_s_p8_1},
00153     {&_44c7_s_p9_0,&_44c7_s_p9_1,&_44c7_s_p9_2}
00154    }
00155 };
00156 static static_bookblock _resbook_44s_8={
00157   {
00158     {0},{0,0,&_44c8_s_p1_0},{0,0,&_44c8_s_p2_0},{0,0,&_44c8_s_p3_0},
00159     {0,0,&_44c8_s_p4_0},
00160     {&_44c8_s_p5_0,&_44c8_s_p5_1},
00161     {&_44c8_s_p6_0,&_44c8_s_p6_1},
00162     {&_44c8_s_p7_0,&_44c8_s_p7_1},
00163     {&_44c8_s_p8_0,&_44c8_s_p8_1},
00164     {&_44c8_s_p9_0,&_44c8_s_p9_1,&_44c8_s_p9_2}
00165    }
00166 };
00167 static static_bookblock _resbook_44s_9={
00168   {
00169     {0},{0,0,&_44c9_s_p1_0},{0,0,&_44c9_s_p2_0},{0,0,&_44c9_s_p3_0},
00170     {0,0,&_44c9_s_p4_0},
00171     {&_44c9_s_p5_0,&_44c9_s_p5_1},
00172     {&_44c9_s_p6_0,&_44c9_s_p6_1},
00173     {&_44c9_s_p7_0,&_44c9_s_p7_1},
00174     {&_44c9_s_p8_0,&_44c9_s_p8_1},
00175     {&_44c9_s_p9_0,&_44c9_s_p9_1,&_44c9_s_p9_2}
00176    }
00177 };
00178 
00179 static vorbis_residue_template _res_44s_n1[]={
00180   {2,0,  &_residue_44_low,
00181    &_huff_book__44cn1_s_short,&_huff_book__44cn1_sm_short,
00182    &_resbook_44s_n1,&_resbook_44sm_n1},
00183 
00184   {2,0,  &_residue_44_low,
00185    &_huff_book__44cn1_s_long,&_huff_book__44cn1_sm_long,
00186    &_resbook_44s_n1,&_resbook_44sm_n1}
00187 };
00188 static vorbis_residue_template _res_44s_0[]={
00189   {2,0,  &_residue_44_low,
00190    &_huff_book__44c0_s_short,&_huff_book__44c0_sm_short,
00191    &_resbook_44s_0,&_resbook_44sm_0},
00192 
00193   {2,0,  &_residue_44_low,
00194    &_huff_book__44c0_s_long,&_huff_book__44c0_sm_long,
00195    &_resbook_44s_0,&_resbook_44sm_0}
00196 };
00197 static vorbis_residue_template _res_44s_1[]={
00198   {2,0,  &_residue_44_low,
00199    &_huff_book__44c1_s_short,&_huff_book__44c1_sm_short,
00200    &_resbook_44s_1,&_resbook_44sm_1},
00201 
00202   {2,0,  &_residue_44_low,
00203    &_huff_book__44c1_s_long,&_huff_book__44c1_sm_long,
00204    &_resbook_44s_1,&_resbook_44sm_1}
00205 };
00206 
00207 static vorbis_residue_template _res_44s_2[]={
00208   {2,0,  &_residue_44_mid,
00209    &_huff_book__44c2_s_short,&_huff_book__44c2_s_short,
00210    &_resbook_44s_2,&_resbook_44s_2},
00211 
00212   {2,0,  &_residue_44_mid,
00213    &_huff_book__44c2_s_long,&_huff_book__44c2_s_long,
00214    &_resbook_44s_2,&_resbook_44s_2}
00215 };
00216 static vorbis_residue_template _res_44s_3[]={
00217   {2,0,  &_residue_44_mid,
00218    &_huff_book__44c3_s_short,&_huff_book__44c3_s_short,
00219    &_resbook_44s_3,&_resbook_44s_3},
00220 
00221   {2,0,  &_residue_44_mid,
00222    &_huff_book__44c3_s_long,&_huff_book__44c3_s_long,
00223    &_resbook_44s_3,&_resbook_44s_3}
00224 };
00225 static vorbis_residue_template _res_44s_4[]={
00226   {2,0,  &_residue_44_mid,
00227    &_huff_book__44c4_s_short,&_huff_book__44c4_s_short,
00228    &_resbook_44s_4,&_resbook_44s_4},
00229 
00230   {2,0,  &_residue_44_mid,
00231    &_huff_book__44c4_s_long,&_huff_book__44c4_s_long,
00232    &_resbook_44s_4,&_resbook_44s_4}
00233 };
00234 static vorbis_residue_template _res_44s_5[]={
00235   {2,0,  &_residue_44_mid,
00236    &_huff_book__44c5_s_short,&_huff_book__44c5_s_short,
00237    &_resbook_44s_5,&_resbook_44s_5},
00238 
00239   {2,0,  &_residue_44_mid,
00240    &_huff_book__44c5_s_long,&_huff_book__44c5_s_long,
00241    &_resbook_44s_5,&_resbook_44s_5}
00242 };
00243 static vorbis_residue_template _res_44s_6[]={
00244   {2,0,  &_residue_44_high,
00245    &_huff_book__44c6_s_short,&_huff_book__44c6_s_short,
00246    &_resbook_44s_6,&_resbook_44s_6},
00247 
00248   {2,0,  &_residue_44_high,
00249    &_huff_book__44c6_s_long,&_huff_book__44c6_s_long,
00250    &_resbook_44s_6,&_resbook_44s_6}
00251 };
00252 static vorbis_residue_template _res_44s_7[]={
00253   {2,0,  &_residue_44_high,
00254    &_huff_book__44c7_s_short,&_huff_book__44c7_s_short,
00255    &_resbook_44s_7,&_resbook_44s_7},
00256 
00257   {2,0,  &_residue_44_high,
00258    &_huff_book__44c7_s_long,&_huff_book__44c7_s_long,
00259    &_resbook_44s_7,&_resbook_44s_7}
00260 };
00261 static vorbis_residue_template _res_44s_8[]={
00262   {2,0,  &_residue_44_high,
00263    &_huff_book__44c8_s_short,&_huff_book__44c8_s_short,
00264    &_resbook_44s_8,&_resbook_44s_8},
00265 
00266   {2,0,  &_residue_44_high,
00267    &_huff_book__44c8_s_long,&_huff_book__44c8_s_long,
00268    &_resbook_44s_8,&_resbook_44s_8}
00269 };
00270 static vorbis_residue_template _res_44s_9[]={
00271   {2,0,  &_residue_44_high,
00272    &_huff_book__44c9_s_short,&_huff_book__44c9_s_short,
00273    &_resbook_44s_9,&_resbook_44s_9},
00274 
00275   {2,0,  &_residue_44_high,
00276    &_huff_book__44c9_s_long,&_huff_book__44c9_s_long,
00277    &_resbook_44s_9,&_resbook_44s_9}
00278 };
00279 
00280 static vorbis_mapping_template _mapres_template_44_stereo[]={
00281   { _map_nominal, _res_44s_n1 }, /* -1 */
00282   { _map_nominal, _res_44s_0 }, /* 0 */
00283   { _map_nominal, _res_44s_1 }, /* 1 */
00284   { _map_nominal, _res_44s_2 }, /* 2 */
00285   { _map_nominal, _res_44s_3 }, /* 3 */
00286   { _map_nominal, _res_44s_4 }, /* 4 */
00287   { _map_nominal, _res_44s_5 }, /* 5 */
00288   { _map_nominal, _res_44s_6 }, /* 6 */
00289   { _map_nominal, _res_44s_7 }, /* 7 */
00290   { _map_nominal, _res_44s_8 }, /* 8 */
00291   { _map_nominal, _res_44s_9 }, /* 9 */
00292 };
00293 
00294 

Generated by  doxygen 1.6.2