1 /********************************************************************
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. *
8 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
9 * by the Xiph.Org Foundation https://xiph.org/ *
11 ********************************************************************
13 function: toplevel residue templates 16/22kHz
15 ********************************************************************/
17 /***** residue backends *********************************************/
19 static const static_bookblock _resbook_16s_0={
28 {&_16c0_s_p7_0,&_16c0_s_p7_1},
29 {&_16c0_s_p8_0,&_16c0_s_p8_1},
30 {&_16c0_s_p9_0,&_16c0_s_p9_1,&_16c0_s_p9_2}
33 static const static_bookblock _resbook_16s_1={
42 {&_16c1_s_p7_0,&_16c1_s_p7_1},
43 {&_16c1_s_p8_0,&_16c1_s_p8_1},
44 {&_16c1_s_p9_0,&_16c1_s_p9_1,&_16c1_s_p9_2}
47 static const static_bookblock _resbook_16s_2={
54 {&_16c2_s_p5_0,&_16c2_s_p5_1},
55 {&_16c2_s_p6_0,&_16c2_s_p6_1},
56 {&_16c2_s_p7_0,&_16c2_s_p7_1},
57 {&_16c2_s_p8_0,&_16c2_s_p8_1},
58 {&_16c2_s_p9_0,&_16c2_s_p9_1,&_16c2_s_p9_2}
62 static const vorbis_residue_template _res_16s_0[]={
63 {2,0,32, &_residue_44_mid,
64 &_huff_book__16c0_s_single,&_huff_book__16c0_s_single,
65 &_resbook_16s_0,&_resbook_16s_0},
67 static const vorbis_residue_template _res_16s_1[]={
68 {2,0,32, &_residue_44_mid,
69 &_huff_book__16c1_s_short,&_huff_book__16c1_s_short,
70 &_resbook_16s_1,&_resbook_16s_1},
72 {2,0,32, &_residue_44_mid,
73 &_huff_book__16c1_s_long,&_huff_book__16c1_s_long,
74 &_resbook_16s_1,&_resbook_16s_1}
76 static const vorbis_residue_template _res_16s_2[]={
77 {2,0,32, &_residue_44_high,
78 &_huff_book__16c2_s_short,&_huff_book__16c2_s_short,
79 &_resbook_16s_2,&_resbook_16s_2},
81 {2,0,32, &_residue_44_high,
82 &_huff_book__16c2_s_long,&_huff_book__16c2_s_long,
83 &_resbook_16s_2,&_resbook_16s_2}
86 static const vorbis_mapping_template _mapres_template_16_stereo[3]={
87 { _map_nominal, _res_16s_0 }, /* 0 */
88 { _map_nominal, _res_16s_1 }, /* 1 */
89 { _map_nominal, _res_16s_2 }, /* 2 */
92 static const static_bookblock _resbook_16u_0={
100 {&_16u0__p6_0,&_16u0__p6_1},
101 {&_16u0__p7_0,&_16u0__p7_1,&_16u0__p7_2}
104 static const static_bookblock _resbook_16u_1={
113 {&_16u1__p7_0,&_16u1__p7_1},
114 {&_16u1__p8_0,&_16u1__p8_1},
115 {&_16u1__p9_0,&_16u1__p9_1,&_16u1__p9_2}
118 static const static_bookblock _resbook_16u_2={
125 {&_16u2_p5_0,&_16u2_p5_1},
126 {&_16u2_p6_0,&_16u2_p6_1},
127 {&_16u2_p7_0,&_16u2_p7_1},
128 {&_16u2_p8_0,&_16u2_p8_1},
129 {&_16u2_p9_0,&_16u2_p9_1,&_16u2_p9_2}
133 static const vorbis_residue_template _res_16u_0[]={
134 {1,0,32, &_residue_44_low_un,
135 &_huff_book__16u0__single,&_huff_book__16u0__single,
136 &_resbook_16u_0,&_resbook_16u_0},
138 static const vorbis_residue_template _res_16u_1[]={
139 {1,0,32, &_residue_44_mid_un,
140 &_huff_book__16u1__short,&_huff_book__16u1__short,
141 &_resbook_16u_1,&_resbook_16u_1},
143 {1,0,32, &_residue_44_mid_un,
144 &_huff_book__16u1__long,&_huff_book__16u1__long,
145 &_resbook_16u_1,&_resbook_16u_1}
147 static const vorbis_residue_template _res_16u_2[]={
148 {1,0,32, &_residue_44_hi_un,
149 &_huff_book__16u2__short,&_huff_book__16u2__short,
150 &_resbook_16u_2,&_resbook_16u_2},
152 {1,0,32, &_residue_44_hi_un,
153 &_huff_book__16u2__long,&_huff_book__16u2__long,
154 &_resbook_16u_2,&_resbook_16u_2}
158 static const vorbis_mapping_template _mapres_template_16_uncoupled[3]={
159 { _map_nominal_u, _res_16u_0 }, /* 0 */
160 { _map_nominal_u, _res_16u_1 }, /* 1 */
161 { _map_nominal_u, _res_16u_2 }, /* 2 */