summaryrefslogtreecommitdiff
path: root/apps/codecs/mp3_enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/mp3_enc.c')
-rw-r--r--apps/codecs/mp3_enc.c2860
1 files changed, 2860 insertions, 0 deletions
diff --git a/apps/codecs/mp3_enc.c b/apps/codecs/mp3_enc.c
new file mode 100644
index 0000000000..1cd84988aa
--- /dev/null
+++ b/apps/codecs/mp3_enc.c
@@ -0,0 +1,2860 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 Antonius Hellmann
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20// Shine is an MP3 encoder
21// Copyright (C) 1999-2000 Gabriel Bouvigne
22//
23// This library is free software; you can redistribute it and/or
24// modify it under the terms of the GNU Library General Public
25// License as published by the Free Software Foundation; either
26// version 2 of the License, or (at your option) any later version.
27//
28// This library is distributed in the hope that it will be useful,
29// but WITHOUT ANY WARRANTY; without even the implied warranty of
30// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
31// Library General Public License for more details.
32
33#include "codeclib.h"
34
35#ifndef SIMULATOR
36
37CODEC_HEADER
38
39#define SAMP_PER_FRAME 1152
40#define SAMP_PER_FRAME2 576
41#define HAN_SIZE 512
42#define SBLIMIT 32
43#define WAVE_RIFF_PCM 0
44#define MAX_CHANNELS 2
45#define MAX_GRANULES 2
46#define HTN 34
47
48typedef unsigned long uint32;
49typedef unsigned short uint16;
50typedef unsigned char uint8;
51
52enum e_byte_order { order_unknown, order_bigEndian, order_littleEndian };
53
54#define memcpy ci->memcpy
55#define memset ci->memset
56
57typedef struct {
58 int type; /* 0=(22.05,24,16kHz) 1=(44.1,48,32kHz) */
59 int mode; /* 0=stereo, 1=jstereo, 2=dual, 3=mono */
60 int bitrate;
61 int padding;
62 long bits_per_frame;
63 long bitrate_index;
64 int smprate_index;
65} mpeg_t;
66
67/* Side information */
68typedef struct {
69 unsigned part2_3_length;
70 unsigned big_values;
71 int count1;
72 unsigned global_gain;
73 unsigned table_select[4];
74 unsigned region0_count;
75 unsigned region1_count;
76 unsigned address1;
77 unsigned address2;
78 unsigned address3;
79 long quantizerStepSize;
80} side_info_t;
81
82typedef struct {
83 enum e_byte_order byte_order;
84 side_info_t cod_info[2][2];
85 long frac_per_frame;
86 long byte_per_frame;
87 long slot_lag;
88 int sideinfo_len;
89 int mean_bits;
90 int channels;
91 long samplerate;
92 mpeg_t mpg;
93} config_t;
94
95typedef struct {
96 int bitpos; /* current bitpos for writing */
97 uint32 bbuf[263];
98} BF_Data;
99
100struct huffcodetab {
101 int xlen; /*max. x-index+ */
102 int ylen; /*max. y-index+ */
103 int linbits; /*number of linbits */
104 int linmax; /*max number stored in linbits */
105 const uint16 *table; /*pointer to array[xlen][ylen] */
106 const uint8 *hlen; /*pointer to array[xlen][ylen] */
107};
108
109/* !!!!!!!! start of IRAM area: do not insert before x_int1 array !!!!!!!!! */
110short x_int0 [HAN_SIZE] IBSS_ATTR; // 1024 Bytes
111int mdct_freq [2][2][SAMP_PER_FRAME2] IBSS_ATTR; // 9216 Bytes
112short x_int1 [HAN_SIZE] IBSS_ATTR; // 1024 Bytes
113/* !!!!!!!!!!!!!!!!!! here you may insert other data !!!!!!!!!!!!!!!!!!!!!! */
114uint8 int2idx [5000] IBSS_ATTR; // 5000 Bytes
115uint16 enc_data [2][2][SAMP_PER_FRAME2] IBSS_ATTR; // 4608 Bytes
116short y_int [64] IBSS_ATTR; // 256 Bytes
117int scalefac [23] IBSS_ATTR; // 92 Bytes
118int mdct_in [36] IBSS_ATTR; // 144 Bytes
119int sb_sample [2][3][18][SBLIMIT] IBSS_ATTR; // 13824 Bytes
120BF_Data CodedData IBSS_ATTR; // 1040 Bytes
121int ca_int [8] IBSS_ATTR; // 32 Bytes
122int cs_int [8] IBSS_ATTR; // 32 Bytes
123int win_int [18][36] IBSS_ATTR; // 2592 Bytes
124short filter_int [SBLIMIT][64] IBSS_ATTR; // 8192 Bytes
125short enwindow_int[512] IBSS_ATTR; // 1024 Bytes
126uint8 ht_count1 [2][2][16] IBSS_ATTR; // 64 Bytes
127uint16 t1HB [ 4] IBSS_ATTR; // Bytes
128uint16 t2HB [ 9] IBSS_ATTR; // Bytes
129uint16 t3HB [ 9] IBSS_ATTR; // Bytes
130uint16 t5HB [ 16] IBSS_ATTR; // Bytes
131uint16 t6HB [ 16] IBSS_ATTR; // Bytes
132uint16 t7HB [ 36] IBSS_ATTR; // Bytes
133uint16 t8HB [ 36] IBSS_ATTR; // Bytes
134uint16 t9HB [ 36] IBSS_ATTR; // Bytes
135uint16 t10HB [ 64] IBSS_ATTR; // Bytes
136uint16 t11HB [ 64] IBSS_ATTR; // Bytes
137uint16 t12HB [ 64] IBSS_ATTR; // Bytes
138uint16 t13HB [256] IBSS_ATTR; // Bytes
139uint16 t15HB [256] IBSS_ATTR; // Bytes
140uint16 t16HB [256] IBSS_ATTR; // Bytes
141uint16 t24HB [256] IBSS_ATTR; // Bytes
142uint8 t1l [ 4] IBSS_ATTR; // Bytes
143uint8 t2l [ 9] IBSS_ATTR; // Bytes
144uint8 t3l [ 9] IBSS_ATTR; // Bytes
145uint8 t5l [ 16] IBSS_ATTR; // Bytes
146uint8 t6l [ 16] IBSS_ATTR; // Bytes
147uint8 t7l [ 36] IBSS_ATTR; // Bytes
148uint8 t8l [ 36] IBSS_ATTR; // Bytes
149uint8 t9l [ 36] IBSS_ATTR; // Bytes
150uint8 t10l [ 64] IBSS_ATTR; // Bytes
151uint8 t11l [ 64] IBSS_ATTR; // Bytes
152uint8 t12l [ 64] IBSS_ATTR; // Bytes
153uint8 t13l [256] IBSS_ATTR; // Bytes
154uint8 t15l [256] IBSS_ATTR; // Bytes
155uint8 t16l [256] IBSS_ATTR; // Bytes
156uint8 t24l [256] IBSS_ATTR; // Bytes
157struct huffcodetab ht [HTN] IBSS_ATTR; // Bytes
158
159static struct codec_api *ci;
160static int enc_channels;
161static short *x_int[2];
162static config_t cfg;
163
164static const uint8 ht_count1_const[2][2][16] =
165{ { { 1, 5, 4, 5, 6, 5,4,4,7,3,6,0,7,2,3, 1 }, /* table0 */
166 { 1, 5, 5, 7, 5, 8,7,9,5,7,7,9,7,9,9,10 } }, /* hleng0 */
167 { {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1, 0 }, /* table1 */
168 { 4, 5, 5, 6, 5, 6,6,7,5,6,6,7,6,7,7, 8 } } }; /* hleng1 */
169
170static const uint16 t1HB_const[4] = {1,1,1,0};
171static const uint16 t2HB_const[9] = {1,2,1,3,1,1,3,2,0};
172static const uint16 t3HB_const[9] = {3,2,1,1,1,1,3,2,0};
173static const uint16 t5HB_const[16] = {1,2,6,5,3,1,4,4,7,5,7,1,6,1,1,0};
174static const uint16 t6HB_const[16] = {7,3,5,1,6,2,3,2,5,4,4,1,3,3,2,0};
175static const uint16 t7HB_const[36] = {1,2,10,19,16,10,3,3,7,10,5,3,11,4,13,17,8,4,12,11,18,15,11,2,7,6,9,14,3,1,6,4,5,3,2,0};
176static const uint16 t8HB_const[36] = {3,4,6,18,12,5,5,1,2,16,9,3,7,3,5,14,7,3,19,17,15,13,10,4,13,5,8,11,5,1,12,4,4,1,1,0};
177static const uint16 t9HB_const[36] = {7,5,9,14,15,7,6,4,5,5,6,7,7,6,8,8,8,5,15,6,9,10,5,1,11,7,9,6,4,1,14,4,6,2,6,0};
178static const uint16 t10HB_const[64] = {1,2,10,23,35,30,12,17,3,3,8,12,18,21,12,7,11,9,15,21,32,40,19,6,14,13,22,34,46,23,18,
179 7,20,19,33,47,27,22,9,3,31,22,41,26,21,20,5,3,14,13,10,11,16,6,5,1,9,8,7,8,4 ,4,2,0};
180static const uint16 t11HB_const[64] = {3,4,10,24,34,33,21,15,5,3,4,10,32,17,11,10,11,7,13,18,30,31,20,5,25,11,19,59,27,18,12,
181 5,35,33,31,58,30,16,7,5,28,26,32,19,17,15,8,14,14,12,9,13,14,9,4,1,11,4,6,6,6,3,2,0};
182static const uint16 t12HB_const[64] = {9,6,16,33,41,39,38,26,7,5,6,9,23,16,26,11,17,7,11,14,21,30,10,7,17,10,15,12,18,28,14,
183 5,32,13,22,19,18,16,9,5,40,17,31,29,17,13,4,2,27,12,11,15,10,7,4,1,27,12,8,12,6,3,1,0};
184static const uint16 t13HB_const[256] = {1,5,14,21,34,51,46,71,42,52,68,52,67,44,43,19,3,4,12,19,31,26,44,33,31,24,32,
185 24,31,35,22,14,15,13,23,36,59,49,77,65,29,40,30,40,27,33,42,16,22,20,37,61,56,
186 79,73,64,43,76,56,37,26,31,25,14,35,16,60,57,97,75,114,91,54,73,55,41,48,53,
187 23,24,58,27,50,96,76,70,93,84,77,58,79,29,74,49,41,17,47,45,78,74,115,94,90,
188 79,69,83,71,50,59,38,36,15,72,34,56,95,92,85,91,90,86,73,77,65,51,44,43,42,43,
189 20,30,44,55,78,72,87,78,61,46,54,37,30,20,16,53,25,41,37,44,59,54,81,66,76,57,
190 54,37,18,39,11,35,33,31,57,42,82,72,80,47,58,55,21,22,26,38,22,53,25,23,38,70,
191 60,51,36,55,26,34,23,27,14,9,7,34,32,28,39,49,75,30,52,48,40,52,28,18,17,9,5,
192 45,21,34,64,56,50,49,45,31,19,12,15,10,7,6,3,48,23,20,39,36,35,53,21,16,23,13,
193 10,6,1,4,2,16,15,17,27,25,20,29,11,17,12,16,8,1,1,0,1};
194static const uint16 t15HB_const[256] = {7,12,18,53,47,76,124,108,89,123,108,119,107,81,122,63,13,5,16,27,46,36,61,51,
195 42,70,52,83,65,41,59,36,19,17,15,24,41,34,59,48,40,64,50,78,62,80,56,33,29,28,
196 25,43,39,63,55,93,76,59,93,72,54,75,50,29,52,22,42,40,67,57,95,79,72,57,89,69,
197 49,66,46,27,77,37,35,66,58,52,91,74,62,48,79,63,90,62,40,38,125,32,60,56,50,
198 92,78,65,55,87,71,51,73,51,70,30,109,53,49,94,88,75,66,122,91,73,56,42,64,44,
199 21,25,90,43,41,77,73,63,56,92,77,66,47,67,48,53,36,20,71,34,67,60,58,49,88,76,
200 67,106,71,54,38,39,23,15,109,53,51,47,90,82,58,57,48,72,57,41,23,27,62,9,86,
201 42,40,37,70,64,52,43,70,55,42,25,29,18,11,11,118,68,30,55,50,46,74,65,49,39,
202 24,16,22,13,14,7,91,44,39,38,34,63,52,45,31,52,28,19,14,8,9,3,123,60,58,53,47,
203 43,32,22,37,24,17,12,15,10,2,1,71,37,34,30,28,20,17,26,21,16,10,6,8,6,2,0};
204static const uint16 t16HB_const[256] = {1,5,14,44,74,63,110,93,172,149,138,242,225,195,376,17,3,4,12,20,35,62,53,47,
205 83,75,68,119,201,107,207,9,15,13,23,38,67,58,103,90,161,72,127,117,110,209,
206 206,16,45,21,39,69,64,114,99,87,158,140,252,212,199,387,365,26,75,36,68,65,
207 115,101,179,164,155,264,246,226,395,382,362,9,66,30,59,56,102,185,173,265,142,
208 253,232,400,388,378,445,16,111,54,52,100,184,178,160,133,257,244,228,217,385,
209 366,715,10,98,48,91,88,165,157,148,261,248,407,397,372,380,889,884,8,85,84,81,
210 159,156,143,260,249,427,401,392,383,727,713,708,7,154,76,73,141,131,256,245,
211 426,406,394,384,735,359,710,352,11,139,129,67,125,247,233,229,219,393,743,737,
212 720,885,882,439,4,243,120,118,115,227,223,396,746,742,736,721,712,706,223,436,
213 6,202,224,222,218,216,389,386,381,364,888,443,707,440,437,1728,4,747,211,210,
214 208,370,379,734,723,714,1735,883,877,876,3459,865,2,377,369,102,187,726,722,
215 358,711,709,866,1734,871,3458,870,434,0,12,10,7,11,10,17,11,9,13,12,10,7,5,3,1,3};
216static const uint16 t24HB_const[256] = {15,13,46,80,146,262,248,434,426,669,653,649,621,517,1032,88,14,12,21,38,71,
217 130,122,216,209,198,327,345,319,297,279,42,47,22,41,74,68,128,120,221,207,194,
218 182,340,315,295,541,18,81,39,75,70,134,125,116,220,204,190,178,325,311,293,
219 271,16,147,72,69,135,127,118,112,210,200,188,352,323,306,285,540,14,263,66,
220 129,126,119,114,214,202,192,180,341,317,301,281,262,12,249,123,121,117,113,
221 215,206,195,185,347,330,308,291,272,520,10,435,115,111,109,211,203,196,187,
222 353,332,313,298,283,531,381,17,427,212,208,205,201,193,186,177,169,320,303,
223 286,268,514,377,16,335,199,197,191,189,181,174,333,321,305,289,275,521,379,
224 371,11,668,184,183,179,175,344,331,314,304,290,277,530,383,373,366,10,652,346,
225 171,168,164,318,309,299,287,276,263,513,375,368,362,6,648,322,316,312,307,302,
226 292,284,269,261,512,376,370,364,359,4,620,300,296,294,288,282,273,266,515,380,
227 374,369,365,361,357,2,1033,280,278,274,267,264,259,382,378,372,367,363,360,
228 358,356,0,43,20,19,17,15,13,11,9,7,6,4,7,5,3,1,3};
229
230static const uint8 t1l_const[4] = {1,3,2,3};
231static const uint8 t2l_const[9] = {1,3,6,3,3,5,5,5,6};
232static const uint8 t3l_const[9] = {2,2,6,3,2,5,5,5,6};
233static const uint8 t5l_const[16] = {1,3,6,7,3,3,6,7,6,6,7,8,7,6,7,8};
234static const uint8 t6l_const[16] = {3,3,5,7,3,2,4,5,4,4,5,6,6,5,6,7};
235static const uint8 t7l_const[36] = {1,3,6,8,8,9,3,4,6,7,7,8,6,5,7,8,8,9,7,7,8,9,9,9,7,7,8,9,9,10,8,8,9,10,10,10};
236static const uint8 t8l_const[36] = {2,3,6,8,8,9,3,2,4,8,8,8,6,4,6,8,8,9,8,8,8,9,9,10,8,7,8,9,10,10,9,8,9,9,11,11};
237static const uint8 t9l_const[36] = {3,3,5,6,8,9,3,3,4,5,6,8,4,4,5,6,7,8,6,5,6,7,7,8,7,6,7,7,8,9,8,7,8,8,9,9};
238static const uint8 t10l_const[64] = {1,3,6,8,9,9,9,10,3,4,6,7,8,9,8,8,6,6,7,8,9,10,9,9,7,7,8,9,10,10,9,10,8,8,9,10,
239 10,10,10,10,9,9,10,10,11,11,10,11,8,8,9,10,10,10,11,11,9,8,9,10,10,11,11,11};
240static const uint8 t11l_const[64] = {2,3,5,7,8,9,8,9,3,3,4,6,8,8,7,8,5,5,6,7,8,9,8,8,7,6,7,9,8,10,8,9,8,8,8,9,9,10,
241 9,10,8,8,9,10,10,11,10,11,8,7,7,8,9,10,10,10,8,7,8,9,10,10,10,10};
242static const uint8 t12l_const[64] = {4,3,5,7,8,9,9,9,3,3,4,5,7,7,8,8,5,4,5,6,7,8,7,8,6,5,6,6,7,8,8,8,7,6,7,7,8,
243 8,8,9,8,7,8,8,8,9,8,9,8,7,7,8,8,9,9,10,9,8,8,9,9,9,9,10};
244static const uint8 t13l_const[256] = {1,4,6,7,8,9,9,10,9,10,11,11,12,12,13,13,3,4,6,7,8,8,9,9,9,9,10,10,11,12,12,12,
245 6,6,7,8,9,9,10,10,9,10,10,11,11,12,13,13,7,7,8,9,9,10,10,10,10,11,11,11,11,12,
246 13,13,8,7,9,9,10,10,11,11,10,11,11,12,12,13,13,14,9,8,9,10,10,10,11,11,11,11,
247 12,11,13,13,14,14,9,9,10,10,11,11,11,11,11,12,12,12,13,13,14,14,10,9,10,11,11,
248 11,12,12,12,12,13,13,13,14,16,16,9,8,9,10,10,11,11,12,12,12,12,13,13,14,15,15,
249 10,9,10,10,11,11,11,13,12,13,13,14,14,14,16,15,10,10,10,11,11,12,12,13,12,13,
250 14,13,14,15,16,17,11,10,10,11,12,12,12,12,13,13,13,14,15,15,15,16,11,11,11,12,
251 12,13,12,13,14,14,15,15,15,16,16,16,12,11,12,13,13,13,14,14,14,14,14,15,16,15,
252 16,16,13,12,12,13,13,13,15,14,14,17,15,15,15,17,16,16,12,12,13,14,14,14,15,14,
253 15,15,16,16,19,18,19,16};
254static const uint8 t15l_const[256] = {3,4,5,7,7,8,9,9,9,10,10,11,11,11,12,13,4,3,5,6,7,7,8,8,8,9,9,10,10,10,11,11,5,
255 5,5,6,7,7,8,8,8,9,9,10,10,11,11,11,6,6,6,7,7,8,8,9,9,9,10,10,10,11,11,11,7,6,7,
256 7,8,8,9,9,9,9,10,10,10,11,11,11,8,7,7,8,8,8,9,9,9,9,10,10,11,11,11,12,9,7,8,8,
257 8,9,9,9,9,10,10,10,11,11,12,12,9,8,8,9,9,9,9,10,10,10,10,10,11,11,11,12,9,8,8,
258 9,9,9,9,10,10,10,10,11,11,12,12,12,9,8,9,9,9,9,10,10,10,11,11,11,11,12,12,12,10,
259 9,9,9,10,10,10,10,10,11,11,11,11,12,13,12,10,9,9,9,10,10,10,10,11,11,11,11,12,
260 12,12,13,11,10,9,10,10,10,11,11,11,11,11,11,12,12,13,13,11,10,10,10,10,11,11,11,
261 11,12,12,12,12,12,13,13,12,11,11,11,11,11,11,11,12,12,12,12,13,13,12,13,12,11,
262 11,11,11,11,11,12,12,12,12,12,13,13,13,13};
263static const uint8 t16l_const[256] = {1,4,6,8,9,9,10,10,11,11,11,12,12,12,13,9,3,4,6,7,8,9,9,9,10,10,10,11,12,11,12,
264 8,6,6,7,8,9,9,10,10,11,10,11,11,11,12,12,9,8,7,8,9,9,10,10,10,11,11,12,12,12,
265 13,13,10,9,8,9,9,10,10,11,11,11,12,12,12,13,13,13,9,9,8,9,9,10,11,11,12,11,12,
266 12,13,13,13,14,10,10,9,9,10,11,11,11,11,12,12,12,12,13,13,14,10,10,9,10,10,11,
267 11,11,12,12,13,13,13,13,15,15,10,10,10,10,11,11,11,12,12,13,13,13,13,14,14,14,
268 10,11,10,10,11,11,12,12,13,13,13,13,14,13,14,13,11,11,11,10,11,12,12,12,12,13,
269 14,14,14,15,15,14,10,12,11,11,11,12,12,13,14,14,14,14,14,14,13,14,11,12,12,12,
270 12,12,13,13,13,13,15,14,14,14,14,16,11,14,12,12,12,13,13,14,14,14,16,15,15,15,
271 17,15,11,13,13,11,12,14,14,13,14,14,15,16,15,17,15,14,11,9,8,8,9,9,10,10,10,11,
272 11,11,11,11,11,11,8};
273static const uint8 t24l_const[256] = {4,4,6,7,8,9,9,10,10,11,11,11,11,11,12,9,4,4,5,6,7,8,8,9,9,9,10,10,10,10,10,8,6,
274 5,6,7,7,8,8,9,9,9,9,10,10,10,11,7,7,6,7,7,8,8,8,9,9,9,9,10,10,10,10,7,8,7,7,8,
275 8,8,8,9,9,9,10,10,10,10,11,7,9,7,8,8,8,8,9,9,9,9,10,10,10,10,10,7,9,8,8,8,8,9,
276 9,9,9,10,10,10,10,10,11,7,10,8,8,8,9,9,9,9,10,10,10,10,10,11,11,8,10,9,9,9,9,9,
277 9,9,9,10,10,10,10,11,11,8,10,9,9,9,9,9,9,10,10,10,10,10,11,11,11,8,11,9,9,9,9,
278 10,10,10,10,10,10,11,11,11,11,8,11,10,9,9,9,10,10,10,10,10,10,11,11,11,11,8,11,
279 10,10,10,10,10,10,10,10,10,11,11,11,11,11,8,11,10,10,10,10,10,10,10,11,11,11,11,
280 11,11,11,8,12,10,10,10,10,10,10,11,11,11,11,11,11,11,11,8,8,7,7,7,7,7,7,7,7,7,
281 7,8,8,8,8,4};
282
283static const struct huffcodetab ht_const[HTN] =
284{
285{ 0, 0, 0, 0, NULL, NULL},
286{ 2, 2, 0, 0, t1HB, t1l},
287{ 3, 3, 0, 0, t2HB, t2l},
288{ 3, 3, 0, 0, t3HB, t3l},
289{ 0, 0, 0, 0, NULL, NULL},// Apparently not used
290{ 4, 4, 0, 0, t5HB, t5l},
291{ 4, 4, 0, 0, t6HB, t6l},
292{ 6, 6, 0, 0, t7HB, t7l},
293{ 6, 6, 0, 0, t8HB, t8l},
294{ 6, 6, 0, 0, t9HB, t9l},
295{ 8, 8, 0, 0,t10HB, t10l},
296{ 8, 8, 0, 0,t11HB, t11l},
297{ 8, 8, 0, 0,t12HB, t12l},
298{16,16, 0, 0,t13HB, t13l},
299{ 0, 0, 0, 0, NULL, NULL},// Apparently not used
300{16,16, 0, 0,t15HB, t15l},
301{16,16, 1, 1,t16HB, t16l},
302{16,16, 2, 3,t16HB, t16l},
303{16,16, 3, 7,t16HB, t16l},
304{16,16, 4, 15,t16HB, t16l},
305{16,16, 6, 63,t16HB, t16l},
306{16,16, 8, 255,t16HB, t16l},
307{16,16,10,1023,t16HB, t16l},
308{16,16,13,8191,t16HB, t16l},
309{16,16, 4, 15,t24HB, t24l},
310{16,16, 5, 31,t24HB, t24l},
311{16,16, 6, 63,t24HB, t24l},
312{16,16, 7, 127,t24HB, t24l},
313{16,16, 8, 255,t24HB, t24l},
314{16,16, 9, 511,t24HB, t24l},
315{16,16,11,2047,t24HB, t24l},
316{16,16,13,8191,t24HB, t24l} };
317
318static const struct
319{
320 unsigned region0_count;
321 unsigned region1_count;
322} subdv_table[23] =
323{ {0, 0}, /* 0 bands */
324 {0, 0}, /* 1 bands */
325 {0, 0}, /* 2 bands */
326 {0, 0}, /* 3 bands */
327 {0, 0}, /* 4 bands */
328 {0, 1}, /* 5 bands */
329 {1, 1}, /* 6 bands */
330 {1, 1}, /* 7 bands */
331 {1, 2}, /* 8 bands */
332 {2, 2}, /* 9 bands */
333 {2, 3}, /* 10 bands */
334 {2, 3}, /* 11 bands */
335 {3, 4}, /* 12 bands */
336 {3, 4}, /* 13 bands */
337 {3, 4}, /* 14 bands */
338 {4, 5}, /* 15 bands */
339 {4, 5}, /* 16 bands */
340 {4, 6}, /* 17 bands */
341 {5, 6}, /* 18 bands */
342 {5, 6}, /* 19 bands */
343 {5, 7}, /* 20 bands */
344 {6, 7}, /* 21 bands */
345 {6, 7}, /* 22 bands */
346};
347
348/* This is table B.9: coefficients for aliasing reduction */
349static const int ca_int_const[8] = {0xffffbe25,0xffffc39e,0xffffd7e3,0xffffe8b7,0xfffff3e5,0xfffffac2,0xfffffe2f,0xffffff87};
350static const int cs_int_const[8] = {0x00006dc2,0x000070dd,0x0000798d,0x00007ddd,0x00007f6d,0x00007fe4,0x00007ffd,0x00008000};
351static const int win_int_const[18][36] = {
352{ 0x0000006b,0x00000121,0x000001a7,0x000001f9,0x00000215,0x000001f9,0x000001a7,0x00000121,0x0000006b,0xffffff8b,0xfffffe87,0xfffffd68,0xfffffc35,0xfffffaf9,0xfffff9bd,0xfffff88b,0xfffff76b,0xfffff667,0xfffff587,0xfffff4d1,0xfffff44b,0xfffff3f8,0xfffff3dd,0xfffff3f8,0xfffff44b,0xfffff4d1,0xfffff587,0xfffff667,0xfffff76b,0xfffff88b,0xfffff9bd,0xfffffaf9,0xfffffc35,0xfffffd68,0xfffffe87,0xffffff8b,},
353{ 0xffffff83,0xfffffe49,0xfffffcf3,0xfffffbc3,0xfffffaf9,0xfffffacb,0xfffffb5a,0xfffffcb0,0xfffffebf,0x0000015e,0x00000451,0x0000074d,0x00000a02,0x00000c23,0x00000d72,0x00000dc4,0x00000d06,0x00000b45,0x000008a6,0x00000565,0x000001cf,0xfffffe3b,0xfffffaf9,0xfffff853,0xfffff67c,0xfffff594,0xfffff59b,0xfffff67a,0xfffff801,0xfffff9f1,0xfffffc01,0xfffffdeb,0xffffff72,0x00000066,0x000000b5,0x00000060,},
354{ 0xffffffab,0xffffffc2,0x000000ec,0x000002e3,0x00000507,0x0000068f,0x000006c7,0x00000545,0x00000214,0xfffffdbc,0xfffff922,0xfffff55d,0xfffff366,0xfffff3dd,0xfffff6d7,0xfffffbd4,0x000001d7,0x000007a2,0x00000bfb,0x00000dfa,0x00000d3e,0x00000a00,0x00000507,0xffffff74,0xfffffa77,0xfffff70d,0xfffff5c4,0xfffff69f,0xfffff922,0xfffffc79,0xffffffb7,0x00000215,0x00000327,0x000002ef,0x000001d7,0x00000085,},
355{ 0x0000008c,0x000001d7,0x00000244,0x000000ec,0xfffffdeb,0xfffffa77,0xfffff85e,0xfffff922,0xfffffd1d,0x00000327,0x000008f3,0x00000bfb,0x00000aa3,0x00000507,0xfffffd11,0xfffff5c4,0xfffff206,0xfffff366,0xfffff971,0x000001d7,0x00000961,0x00000d3e,0x00000c23,0x000006c7,0xffffff7b,0xfffff922,0xfffff600,0xfffff6d7,0xfffffabb,0xffffffab,0x00000387,0x00000507,0x0000042c,0x00000214,0x0000003e,0xffffffb7,},
356{ 0x0000003c,0xffffff4b,0xfffffd28,0xfffffc0d,0xfffffdeb,0x00000283,0x0000070f,0x000007ff,0x000003ad,0xfffffbfd,0xfffff594,0xfffff4ec,0xfffffb2d,0x00000507,0x00000c88,0x00000cd4,0x00000565,0xfffffa91,0xfffff2e0,0xfffff2fa,0xfffffab0,0x00000530,0x00000c23,0x00000ba7,0x00000497,0xfffffbaf,0xfffff650,0xfffff720,0xfffffcb0,0x000002ec,0x00000611,0x00000507,0x000001a2,0xfffffed3,0xfffffe49,0xffffff6e,},
357{ 0xffffff69,0xfffffe87,0x00000022,0x0000039b,0x00000507,0x0000016b,0xfffffad7,0xfffff76b,0xfffffb91,0x000004d7,0x00000b2f,0x0000081a,0xfffffd46,0xfffff3dd,0xfffff490,0xffffff65,0x00000b2f,0x00000d8d,0x00000445,0xfffff76b,0xfffff221,0xfffff8b7,0x00000507,0x00000c50,0x000008d7,0xfffffe87,0xfffff6b3,0xfffff77b,0xfffffedf,0x000005a2,0x00000669,0x00000215,0xfffffdb4,0xfffffced,0xfffffedf,0x0000002f,},
358{ 0xffffffde,0x00000179,0x000002ba,0xffffffd1,0xfffffaf9,0xfffffb29,0x0000024c,0x00000895,0x00000529,0xfffffa5e,0xfffff4d1,0xfffffc65,0x0000094d,0x00000c23,0x00000097,0xfffff3b0,0xfffff4d1,0x00000313,0x00000ddf,0x00000895,0xfffff997,0xfffff273,0xfffffaf9,0x00000885,0x00000b70,0x00000179,0xfffff729,0xfffff7e6,0x00000121,0x00000749,0x0000046f,0xfffffdeb,0xfffffbbb,0xfffffe95,0x00000121,0x0000009b,},
359{ 0x0000009d,0x000000b5,0xfffffd8f,0xfffffc9c,0x00000215,0x00000682,0x000000ff,0xfffff801,0xfffffa27,0x00000662,0x00000a6c,0xfffffe70,0xfffff37f,0xfffffaf9,0x00000ac2,0x00000b04,0xfffffa9b,0xfffff1ea,0xfffffe26,0x00000d06,0x00000873,0xfffff7bf,0xfffff3dd,0x000001a5,0x00000be4,0x00000451,0xfffff7af,0xfffff861,0x00000350,0x00000793,0x000000db,0xfffffaf9,0xfffffd66,0x000001df,0x000001b7,0xffffffec,},
360{ 0x00000006,0xfffffe29,0xffffff56,0x00000414,0x00000215,0xfffffa2d,0xfffffbe5,0x000006de,0x0000067d,0xfffff8eb,0xfffff70d,0x00000671,0x00000b30,0xfffffaf9,0xfffff311,0x00000301,0x00000dfa,0xffffff62,0xfffff1cf,0xfffffe29,0x00000d8e,0x00000414,0xfffff3dd,0xfffffa2d,0x00000a1d,0x000006de,0xfffff845,0xfffff8eb,0x00000545,0x00000671,0xfffffcf8,0xfffffaf9,0x00000149,0x00000301,0xffffffc2,0xffffff62,},
361{ 0xffffff62,0x0000003e,0x00000301,0xfffffeb7,0xfffffaf9,0x00000308,0x00000671,0xfffffabb,0xfffff8eb,0x000007bb,0x000006de,0xfffff5e3,0xfffffa2d,0x00000c23,0x00000414,0xfffff272,0xfffffe29,0x00000e31,0xffffff62,0xfffff206,0x00000301,0x00000cef,0xfffffaf9,0xfffff4d0,0x00000671,0x000008f3,0xfffff8eb,0xfffff983,0x000006de,0x0000041b,0xfffffa2d,0xfffffdeb,0x00000414,0x000000aa,0xfffffe29,0xfffffffa,},
362{ 0x00000014,0x000001b7,0xfffffe21,0xfffffd66,0x00000507,0x000000db,0xfffff86d,0x00000350,0x0000079f,0xfffff7af,0xfffffbaf,0x00000be4,0xfffffe5b,0xfffff3dd,0x00000841,0x00000873,0xfffff2fa,0xfffffe26,0x00000e16,0xfffffa9b,0xfffff4fc,0x00000ac2,0x00000507,0xfffff37f,0x00000190,0x00000a6c,0xfffff99e,0xfffffa27,0x000007ff,0x000000ff,0xfffff97e,0x00000215,0x00000364,0xfffffd8f,0xffffff4b,0x0000009d,},
363{ 0x0000009b,0xfffffedf,0xfffffe95,0x00000445,0xfffffdeb,0xfffffb91,0x00000749,0xfffffedf,0xfffff7e6,0x000008d7,0x00000179,0xfffff490,0x00000885,0x00000507,0xfffff273,0x00000669,0x00000895,0xfffff221,0x00000313,0x00000b2f,0xfffff3b0,0xffffff69,0x00000c23,0xfffff6b3,0xfffffc65,0x00000b2f,0xfffffa5e,0xfffffad7,0x00000895,0xfffffdb4,0xfffffb29,0x00000507,0xffffffd1,0xfffffd46,0x00000179,0x00000022,},
364{ 0xffffffd1,0xfffffedf,0x00000313,0xfffffdb4,0xfffffdeb,0x00000669,0xfffffa5e,0xfffffedf,0x00000885,0xfffff6b3,0x00000179,0x000008d7,0xfffff3b0,0x00000507,0x00000749,0xfffff221,0x00000895,0x00000445,0xfffff273,0x00000b2f,0x0000009b,0xfffff490,0x00000c23,0xfffffd46,0xfffff7e6,0x00000b2f,0xfffffb29,0xfffffb91,0x00000895,0xfffffad7,0xfffffe95,0x00000507,0xfffffc65,0x00000022,0x00000179,0xffffff69,},
365{ 0xffffff6e,0x000001b7,0xfffffed3,0xfffffe5e,0x00000507,0xfffff9ef,0x000002ec,0x00000350,0xfffff720,0x000009b0,0xfffffbaf,0xfffffb69,0x00000ba7,0xfffff3dd,0x00000530,0x00000550,0xfffff2fa,0x00000d20,0xfffffa91,0xfffffa9b,0x00000cd4,0xfffff378,0x00000507,0x000004d3,0xfffff4ec,0x00000a6c,0xfffffbfd,0xfffffc53,0x000007ff,0xfffff8f1,0x00000283,0x00000215,0xfffffc0d,0x000002d8,0xffffff4b,0xffffffc4,},
366{ 0x00000049,0x0000003e,0xfffffdec,0x0000042c,0xfffffaf9,0x00000387,0x00000055,0xfffffabb,0x00000929,0xfffff600,0x000006de,0xffffff7b,0xfffff939,0x00000c23,0xfffff2c2,0x00000961,0xfffffe29,0xfffff971,0x00000c9a,0xfffff206,0x00000a3c,0xfffffd11,0xfffffaf9,0x00000aa3,0xfffff405,0x000008f3,0xfffffcd9,0xfffffd1d,0x000006de,0xfffff85e,0x00000589,0xfffffdeb,0xffffff14,0x00000244,0xfffffe29,0x0000008c,},
367{ 0x00000085,0xfffffe29,0x000002ef,0xfffffcd9,0x00000215,0x00000049,0xfffffc79,0x000006de,0xfffff69f,0x00000a3c,0xfffff70d,0x00000589,0xffffff74,0xfffffaf9,0x00000a00,0xfffff2c2,0x00000dfa,0xfffff405,0x000007a2,0xfffffe29,0xfffffbd4,0x00000929,0xfffff3dd,0x00000c9a,0xfffff55d,0x000006de,0xfffffdbc,0xfffffdec,0x00000545,0xfffff939,0x0000068f,0xfffffaf9,0x000002e3,0xffffff14,0xffffffc2,0x00000055,},
368{ 0xffffffa0,0x000000b5,0xffffff9a,0xffffff72,0x00000215,0xfffffc01,0x0000060f,0xfffff801,0x00000986,0xfffff59b,0x00000a6c,0xfffff67c,0x000007ad,0xfffffaf9,0x000001c5,0x000001cf,0xfffffa9b,0x000008a6,0xfffff4bb,0x00000d06,0xfffff23c,0x00000d72,0xfffff3dd,0x00000a02,0xfffff8b3,0x00000451,0xfffffea2,0xfffffebf,0x00000350,0xfffffb5a,0x00000535,0xfffffaf9,0x0000043d,0xfffffcf3,0x000001b7,0xffffff83,},
369{ 0xffffff8b,0x00000179,0xfffffd68,0x000003cb,0xfffffaf9,0x00000643,0xfffff88b,0x00000895,0xfffff667,0x00000a79,0xfffff4d1,0x00000bb5,0xfffff3f8,0x00000c23,0xfffff3f8,0x00000bb5,0xfffff4d1,0x00000a79,0xfffff667,0x00000895,0xfffff88b,0x00000643,0xfffffaf9,0x000003cb,0xfffffd68,0x00000179,0xffffff8b,0xffffff95,0x00000121,0xfffffe59,0x000001f9,0xfffffdeb,0x000001f9,0xfffffe59,0x00000121,0xffffff95,}};
370
371static const short filter_int_const[SBLIMIT][64] = {
372{ 23170, 24279, 25330, 26320, 27246, 28106, 28899, 29622, 30274, 30853, 31357, 31786, 32138, 32413, 32610, 32729, 32767, 32729, 32610, 32413, 32138, 31786, 31357, 30853, 30274, 29622, 28899, 28106, 27246, 26320, 25330, 24279, 23170, 22006, 20788, 19520, 18205, 16846, 15447, 14010, 12540, 11039, 9512, 7962, 6393, 4808, 3212, 1608, 0, -1607, -3211, -4807, -6392, -7961, -9511,-11038,-12539,-14009,-15446,-16845,-18204,-19519,-20787,-22005, },
373{ -23169,-19519,-15446,-11038, -6392, -1607, 3212, 7962, 12540, 16846, 20788, 24279, 27246, 29622, 31357, 32413, 32767, 32413, 31357, 29622, 27246, 24279, 20788, 16846, 12540, 7962, 3212, -1607, -6392,-11038,-15446,-19519,-23169,-26319,-28898,-30852,-32137,-32728,-32609,-31785,-30273,-28105,-25329,-22005,-18204,-14009, -9511, -4807, 0, 4808, 9512, 14010, 18205, 22006, 25330, 28106, 30274, 31786, 32610, 32729, 32138, 30853, 28899, 26320, },
374{ -23169,-28105,-31356,-32728,-32137,-29621,-25329,-19519,-12539, -4807, 3212, 11039, 18205, 24279, 28899, 31786, 32767, 31786, 28899, 24279, 18205, 11039, 3212, -4807,-12539,-19519,-25329,-29621,-32137,-32728,-31356,-28105,-23169,-16845, -9511, -1607, 6393, 14010, 20788, 26320, 30274, 32413, 32610, 30853, 27246, 22006, 15447, 7962, 0, -7961,-15446,-22005,-27245,-30852,-32609,-32412,-30273,-26319,-20787,-14009, -6392, 1608, 9512, 16846, },
375{ 23170, 14010, 3212, -7961,-18204,-26319,-31356,-32728,-30273,-24278,-15446, -4807, 6393, 16846, 25330, 30853, 32767, 30853, 25330, 16846, 6393, -4807,-15446,-24278,-30273,-32728,-31356,-26319,-18204, -7961, 3212, 14010, 23170, 29622, 32610, 31786, 27246, 19520, 9512, -1607,-12539,-22005,-28898,-32412,-32137,-28105,-20787,-11038, 0, 11039, 20788, 28106, 32138, 32413, 28899, 22006, 12540, 1608, -9511,-19519,-27245,-31785,-32609,-29621, },
376{ 23170, 30853, 32610, 28106, 18205, 4808, -9511,-22005,-30273,-32728,-28898,-19519, -6392, 7962, 20788, 29622, 32767, 29622, 20788, 7962, -6392,-19519,-28898,-32728,-30273,-22005, -9511, 4808, 18205, 28106, 32610, 30853, 23170, 11039, -3211,-16845,-27245,-32412,-31356,-24278,-12539, 1608, 15447, 26320, 32138, 31786, 25330, 14010, 0,-14009,-25329,-31785,-32137,-26319,-15446, -1607, 12540, 24279, 31357, 32413, 27246, 16846, 3212,-11038, },
377{ -23169, -7961, 9512, 24279, 32138, 30853, 20788, 4808,-12539,-26319,-32609,-29621,-18204, -1607, 15447, 28106, 32767, 28106, 15447, -1607,-18204,-29621,-32609,-26319,-12539, 4808, 20788, 30853, 32138, 24279, 9512, -7961,-23169,-31785,-31356,-22005, -6392, 11039, 25330, 32413, 30274, 19520, 3212,-14009,-27245,-32728,-28898,-16845, 0, 16846, 28899, 32729, 27246, 14010, -3211,-19519,-30273,-32412,-25329,-11038, 6393, 22006, 31357, 31786, },
378{ -23169,-32412,-28898,-14009, 6393, 24279, 32610, 28106, 12540, -7961,-25329,-32728,-27245,-11038, 9512, 26320, 32767, 26320, 9512,-11038,-27245,-32728,-25329, -7961, 12540, 28106, 32610, 24279, 6393,-14009,-28898,-32412,-23169, -4807, 15447, 29622, 32138, 22006, 3212,-16845,-30273,-31785,-20787, -1607, 18205, 30853, 31357, 19520, 0,-19519,-31356,-30852,-18204, 1608, 20788, 31786, 30274, 16846, -3211,-22005,-32137,-29621,-15446, 4808, },
379{ 23170, 1608,-20787,-32412,-27245, -7961, 15447, 30853, 30274, 14010, -9511,-28105,-32137,-19519, 3212, 24279, 32767, 24279, 3212,-19519,-32137,-28105, -9511, 14010, 30274, 30853, 15447, -7961,-27245,-32412,-20787, 1608, 23170, 32729, 25330, 4808,-18204,-31785,-28898,-11038, 12540, 29622, 31357, 16846, -6392,-26319,-32609,-22005, 0, 22006, 32610, 26320, 6393,-16845,-31356,-29621,-12539, 11039, 28899, 31786, 18205, -4807,-25329,-32728, },
380{ 23170, 32729, 20788, -4807,-27245,-31785,-15446, 11039, 30274, 29622, 9512,-16845,-32137,-26319, -3211, 22006, 32767, 22006, -3211,-26319,-32137,-16845, 9512, 29622, 30274, 11039,-15446,-31785,-27245, -4807, 20788, 32729, 23170, -1607,-25329,-32412,-18204, 7962, 28899, 30853, 12540,-14009,-31356,-28105, -6392, 19520, 32610, 24279, 0,-24278,-32609,-19519, 6393, 28106, 31357, 14010,-12539,-30852,-28898, -7961, 18205, 32413, 25330, 1608, },
381{ -23169, 4808, 28899, 29622, 6393,-22005,-32609,-16845, 12540, 31786, 25330, -1607,-27245,-30852, -9511, 19520, 32767, 19520, -9511,-30852,-27245, -1607, 25330, 31786, 12540,-16845,-32609,-22005, 6393, 29622, 28899, 4808,-23169,-32412,-15446, 14010, 32138, 24279, -3211,-28105,-30273, -7961, 20788, 32729, 18205,-11038,-31356,-26319, 0, 26320, 31357, 11039,-18204,-32728,-20787, 7962, 30274, 28106, 3212,-24278,-32137,-14009, 15447, 32413, },
382{ -23169,-31785, -9511, 22006, 32138, 11039,-20787,-32412,-12539, 19520, 32610, 14010,-18204,-32728,-15446, 16846, 32767, 16846,-15446,-32728,-18204, 14010, 32610, 19520,-12539,-32412,-20787, 11039, 32138, 22006, -9511,-31785,-23169, 7962, 31357, 24279, -6392,-30852,-25329, 4808, 30274, 26320, -3211,-29621,-27245, 1608, 28899, 28106, 0,-28105,-28898, -1607, 27246, 29622, 3212,-26319,-30273, -4807, 25330, 30853, 6393,-24278,-31356, -7961, },
383{ 23170,-11038,-32609,-16845, 18205, 32413, 9512,-24278,-30273, -1607, 28899, 26320, -6392,-31785,-20787, 14010, 32767, 14010,-20787,-31785, -6392, 26320, 28899, -1607,-30273,-24278, 9512, 32413, 18205,-16845,-32609,-11038, 23170, 30853, 3212,-28105,-27245, 4808, 31357, 22006,-12539,-32728,-15446, 19520, 32138, 7962,-25329,-29621, 0, 29622, 25330, -7961,-32137,-19519, 15447, 32729, 12540,-22005,-31356, -4807, 27246, 28106, -3211,-30852, },
384{ 23170, 29622, -3211,-31785,-18204, 19520, 31357, 1608,-30273,-22005, 15447, 32413, 6393,-28105,-25329, 11039, 32767, 11039,-25329,-28105, 6393, 32413, 15447,-22005,-30273, 1608, 31357, 19520,-18204,-31785, -3211, 29622, 23170,-14009,-32609, -7961, 27246, 26320, -9511,-32728,-12539, 24279, 28899, -4807,-32137,-16845, 20788, 30853, 0,-30852,-20787, 16846, 32138, 4808,-28898,-24278, 12540, 32729, 9512,-26319,-27245, 7962, 32610, 14010, },
385{ -23169, 16846, 31357, -1607,-32137,-14009, 25330, 26320,-12539,-32412, -3211, 30853, 18205,-22005,-28898, 7962, 32767, 7962,-28898,-22005, 18205, 30853, -3211,-32412,-12539, 26320, 25330,-14009,-32137, -1607, 31357, 16846,-23169,-28105, 9512, 32729, 6393,-29621,-20787, 19520, 30274, -4807,-32609,-11038, 27246, 24279,-15446,-31785, 0, 31786, 15447,-24278,-27245, 11039, 32610, 4808,-30273,-19519, 20788, 29622, -6392,-32728, -9511, 28106, },
386{ -23169,-26319, 15447, 30853, -6392,-32728, -3211, 31786, 12540,-28105,-20787, 22006, 27246,-14009,-31356, 4808, 32767, 4808,-31356,-14009, 27246, 22006,-20787,-28105, 12540, 31786, -3211,-32728, -6392, 30853, 15447,-26319,-23169, 19520, 28899,-11038,-32137, 1608, 32610, 7962,-30273,-16845, 25330, 24279,-18204,-29621, 9512, 32413, 0,-32412, -9511, 29622, 18205,-24278,-25329, 16846, 30274, -7961,-32609, -1607, 32138, 11039,-28898,-19519, },
387{ 23170,-22005,-25329, 19520, 27246,-16845,-28898, 14010, 30274,-11038,-31356, 7962, 32138, -4807,-32609, 1608, 32767, 1608,-32609, -4807, 32138, 7962,-31356,-11038, 30274, 14010,-28898,-16845, 27246, 19520,-25329,-22005, 23170, 24279,-20787,-26319, 18205, 28106,-15446,-29621, 12540, 30853, -9511,-31785, 6393, 32413, -3211,-32728, 0, 32729, 3212,-32412, -6392, 31786, 9512,-30852,-12539, 29622, 15447,-28105,-18204, 26320, 20788,-24278, },
388{ 23170, 22006,-25329,-19519, 27246, 16846,-28898,-14009, 30274, 11039,-31356, -7961, 32138, 4808,-32609, -1607, 32767, -1607,-32609, 4808, 32138, -7961,-31356, 11039, 30274,-14009,-28898, 16846, 27246,-19519,-25329, 22006, 23170,-24278,-20787, 26320, 18205,-28105,-15446, 29622, 12540,-30852, -9511, 31786, 6393,-32412, -3211, 32729, 0,-32728, 3212, 32413, -6392,-31785, 9512, 30853,-12539,-29621, 15447, 28106,-18204,-26319, 20788, 24279, },
389{ -23169, 26320, 15447,-30852, -6392, 32729, -3211,-31785, 12540, 28106,-20787,-22005, 27246, 14010,-31356, -4807, 32767, -4807,-31356, 14010, 27246,-22005,-20787, 28106, 12540,-31785, -3211, 32729, -6392,-30852, 15447, 26320,-23169,-19519, 28899, 11039,-32137, -1607, 32610, -7961,-30273, 16846, 25330,-24278,-18204, 29622, 9512,-32412, 0, 32413, -9511,-29621, 18205, 24279,-25329,-16845, 30274, 7962,-32609, 1608, 32138,-11038,-28898, 19520, },
390{ -23169,-16845, 31357, 1608,-32137, 14010, 25330,-26319,-12539, 32413, -3211,-30852, 18205, 22006,-28898, -7961, 32767, -7961,-28898, 22006, 18205,-30852, -3211, 32413,-12539,-26319, 25330, 14010,-32137, 1608, 31357,-16845,-23169, 28106, 9512,-32728, 6393, 29622,-20787,-19519, 30274, 4808,-32609, 11039, 27246,-24278,-15446, 31786, 0,-31785, 15447, 24279,-27245,-11038, 32610, -4807,-30273, 19520, 20788,-29621, -6392, 32729, -9511,-28105, },
391{ 23170,-29621, -3211, 31786,-18204,-19519, 31357, -1607,-30273, 22006, 15447,-32412, 6393, 28106,-25329,-11038, 32767,-11038,-25329, 28106, 6393,-32412, 15447, 22006,-30273, -1607, 31357,-19519,-18204, 31786, -3211,-29621, 23170, 14010,-32609, 7962, 27246,-26319, -9511, 32729,-12539,-24278, 28899, 4808,-32137, 16846, 20788,-30852, 0, 30853,-20787,-16845, 32138, -4807,-28898, 24279, 12540,-32728, 9512, 26320,-27245, -7961, 32610,-14009, },
392{ 23170, 11039,-32609, 16846, 18205,-32412, 9512, 24279,-30273, 1608, 28899,-26319, -6392, 31786,-20787,-14009, 32767,-14009,-20787, 31786, -6392,-26319, 28899, 1608,-30273, 24279, 9512,-32412, 18205, 16846,-32609, 11039, 23170,-30852, 3212, 28106,-27245, -4807, 31357,-22005,-12539, 32729,-15446,-19519, 32138, -7961,-25329, 29622, 0,-29621, 25330, 7962,-32137, 19520, 15447,-32728, 12540, 22006,-31356, 4808, 27246,-28105, -3211, 30853, },
393{ -23169, 31786, -9511,-22005, 32138,-11038,-20787, 32413,-12539,-19519, 32610,-14009,-18204, 32729,-15446,-16845, 32767,-16845,-15446, 32729,-18204,-14009, 32610,-19519,-12539, 32413,-20787,-11038, 32138,-22005, -9511, 31786,-23169, -7961, 31357,-24278, -6392, 30853,-25329, -4807, 30274,-26319, -3211, 29622,-27245, -1607, 28899,-28105, 0, 28106,-28898, 1608, 27246,-29621, 3212, 26320,-30273, 4808, 25330,-30852, 6393, 24279,-31356, 7962, },
394{ -23169, -4807, 28899,-29621, 6393, 22006,-32609, 16846, 12540,-31785, 25330, 1608,-27245, 30853, -9511,-19519, 32767,-19519, -9511, 30853,-27245, 1608, 25330,-31785, 12540, 16846,-32609, 22006, 6393,-29621, 28899, -4807,-23169, 32413,-15446,-14009, 32138,-24278, -3211, 28106,-30273, 7962, 20788,-32728, 18205, 11039,-31356, 26320, 0,-26319, 31357,-11038,-18204, 32729,-20787, -7961, 30274,-28105, 3212, 24279,-32137, 14010, 15447,-32412, },
395{ 23170,-32728, 20788, 4808,-27245, 31786,-15446,-11038, 30274,-29621, 9512, 16846,-32137, 26320, -3211,-22005, 32767,-22005, -3211, 26320,-32137, 16846, 9512,-29621, 30274,-11038,-15446, 31786,-27245, 4808, 20788,-32728, 23170, 1608,-25329, 32413,-18204, -7961, 28899,-30852, 12540, 14010,-31356, 28106, -6392,-19519, 32610,-24278, 0, 24279,-32609, 19520, 6393,-28105, 31357,-14009,-12539, 30853,-28898, 7962, 18205,-32412, 25330, -1607, },
396{ 23170, -1607,-20787, 32413,-27245, 7962, 15447,-30852, 30274,-14009, -9511, 28106,-32137, 19520, 3212,-24278, 32767,-24278, 3212, 19520,-32137, 28106, -9511,-14009, 30274,-30852, 15447, 7962,-27245, 32413,-20787, -1607, 23170,-32728, 25330, -4807,-18204, 31786,-28898, 11039, 12540,-29621, 31357,-16845, -6392, 26320,-32609, 22006, 0,-22005, 32610,-26319, 6393, 16846,-31356, 29622,-12539,-11038, 28899,-31785, 18205, 4808,-25329, 32729, },
397{ -23169, 32413,-28898, 14010, 6393,-24278, 32610,-28105, 12540, 7962,-25329, 32729,-27245, 11039, 9512,-26319, 32767,-26319, 9512, 11039,-27245, 32729,-25329, 7962, 12540,-28105, 32610,-24278, 6393, 14010,-28898, 32413,-23169, 4808, 15447,-29621, 32138,-22005, 3212, 16846,-30273, 31786,-20787, 1608, 18205,-30852, 31357,-19519, 0, 19520,-31356, 30853,-18204, -1607, 20788,-31785, 30274,-16845, -3211, 22006,-32137, 29622,-15446, -4807, },
398{ -23169, 7962, 9512,-24278, 32138,-30852, 20788, -4807,-12539, 26320,-32609, 29622,-18204, 1608, 15447,-28105, 32767,-28105, 15447, 1608,-18204, 29622,-32609, 26320,-12539, -4807, 20788,-30852, 32138,-24278, 9512, 7962,-23169, 31786,-31356, 22006, -6392,-11038, 25330,-32412, 30274,-19519, 3212, 14010,-27245, 32729,-28898, 16846, 0,-16845, 28899,-32728, 27246,-14009, -3211, 19520,-30273, 32413,-25329, 11039, 6393,-22005, 31357,-31785, },
399{ 23170,-30852, 32610,-28105, 18205, -4807, -9511, 22006,-30273, 32729,-28898, 19520, -6392, -7961, 20788,-29621, 32767,-29621, 20788, -7961, -6392, 19520,-28898, 32729,-30273, 22006, -9511, -4807, 18205,-28105, 32610,-30852, 23170,-11038, -3211, 16846,-27245, 32413,-31356, 24279,-12539, -1607, 15447,-26319, 32138,-31785, 25330,-14009, 0, 14010,-25329, 31786,-32137, 26320,-15446, 1608, 12540,-24278, 31357,-32412, 27246,-16845, 3212, 11039, },
400{ 23170,-14009, 3212, 7962,-18204, 26320,-31356, 32729,-30273, 24279,-15446, 4808, 6393,-16845, 25330,-30852, 32767,-30852, 25330,-16845, 6393, 4808,-15446, 24279,-30273, 32729,-31356, 26320,-18204, 7962, 3212,-14009, 23170,-29621, 32610,-31785, 27246,-19519, 9512, 1608,-12539, 22006,-28898, 32413,-32137, 28106,-20787, 11039, 0,-11038, 20788,-28105, 32138,-32412, 28899,-22005, 12540, -1607, -9511, 19520,-27245, 31786,-32609, 29622, },
401{ -23169, 28106,-31356, 32729,-32137, 29622,-25329, 19520,-12539, 4808, 3212,-11038, 18205,-24278, 28899,-31785, 32767,-31785, 28899,-24278, 18205,-11038, 3212, 4808,-12539, 19520,-25329, 29622,-32137, 32729,-31356, 28106,-23169, 16846, -9511, 1608, 6393,-14009, 20788,-26319, 30274,-32412, 32610,-30852, 27246,-22005, 15447, -7961, 0, 7962,-15446, 22006,-27245, 30853,-32609, 32413,-30273, 26320,-20787, 14010, -6392, -1607, 9512,-16845, },
402{ -23169, 19520,-15446, 11039, -6392, 1608, 3212, -7961, 12540,-16845, 20788,-24278, 27246,-29621, 31357,-32412, 32767,-32412, 31357,-29621, 27246,-24278, 20788,-16845, 12540, -7961, 3212, 1608, -6392, 11039,-15446, 19520,-23169, 26320,-28898, 30853,-32137, 32729,-32609, 31786,-30273, 28106,-25329, 22006,-18204, 14010, -9511, 4808, 0, -4807, 9512,-14009, 18205,-22005, 25330,-28105, 30274,-31785, 32610,-32728, 32138,-30852, 28899,-26319, },
403{ 23170,-24278, 25330,-26319, 27246,-28105, 28899,-29621, 30274,-30852, 31357,-31785, 32138,-32412, 32610,-32728, 32767,-32728, 32610,-32412, 32138,-31785, 31357,-30852, 30274,-29621, 28899,-28105, 27246,-26319, 25330,-24278, 23170,-22005, 20788,-19519, 18205,-16845, 15447,-14009, 12540,-11038, 9512, -7961, 6393, -4807, 3212, -1607, 0, 1608, -3211, 4808, -6392, 7962, -9511, 11039,-12539, 14010,-15446, 16846,-18204, 19520,-20787, 22006, } };
404
405static const int sfBand[6][23] =
406{
407/* Table B.2.b: 22.05 kHz */
408{0,6,12,18,24,30,36,44,54,66,80,96,116,140,168,200,238,284,336,396,464,522,576},
409/* Table B.2.c: 24 kHz */
410{0,6,12,18,24,30,36,44,54,66,80,96,114,136,162,194,232,278,330,394,464,540,576},
411/* Table B.2.a: 16 kHz */
412{0,6,12,18,24,30,36,44,45,66,80,96,116,140,168,200,238,248,336,396,464,522,576},
413/* Table B.8.b: 44.1 kHz */
414{0,4, 8,12,16,20,24,30,36,44,52,62, 74, 90,110,134,162,196,238,288,342,418,576},
415/* Table B.8.c: 48 kHz */
416{0,4, 8,12,16,20,24,30,36,42,50,60, 72, 88,106,128,156,190,230,276,330,384,576},
417/* Table B.8.a: 32 kHz */
418{0,4, 8,12,16,20,24,30,36,44,54,66, 82,102,126,156,194,240,296,364,448,550,576} };
419
420static const uint16 enwindow_int_const[512] = {
4210x0000,0x0035,0x01fd,0x066c,0x4948,0x066c,0x01fd,0x0035,0x0000,0x0037,0x01f4,0x05d2,0x493c,0x06f8,0x0204,0x0034,
4220x0000,0x0038,0x01e8,0x052a,0x491a,0x0776,0x0208,0x0032,0x0000,0x0038,0x01d9,0x0474,0x48e1,0x07e7,0x020a,0x0031,
4230x0000,0x0039,0x01c8,0x03b0,0x4892,0x084b,0x0209,0x0030,0x0000,0x0039,0x01b3,0x02de,0x482d,0x08a2,0x0207,0x002e,
4240x0000,0x0039,0x019b,0x01fd,0x47b2,0x08ed,0x0202,0x002c,0x0000,0x0039,0x0180,0x010f,0x4721,0x092b,0x01fc,0x002a,
4250x0000,0x0038,0x0161,0x0011,0x467a,0x095e,0x01f4,0x0028,0x0000,0x0037,0x0140,0xff07,0x45bf,0x0985,0x01eb,0x0026,
4260x0000,0x0036,0x011b,0xfdee,0x44f0,0x09a2,0x01e0,0x0025,0x0000,0x0034,0x00f3,0xfcc8,0x440c,0x09b4,0x01d4,0x0023,
4270x0000,0x0032,0x00c7,0xfb93,0x4315,0x09bb,0x01c6,0x0021,0x0000,0x002f,0x0097,0xfa53,0x420b,0x09ba,0x01b8,0x001f,
4280x0000,0x002c,0x0065,0xf905,0x40f0,0x09af,0x01a9,0x001d,0x0000,0x0029,0x002e,0xf7aa,0x3fc3,0x099b,0x0198,0x001c,
4290x0000,0x0025,0xfff6,0xf643,0x3e85,0x0980,0x0188,0x001a,0xffff,0x0020,0xffb9,0xf4d1,0x3d37,0x095c,0x0176,0x0018,
4300xffff,0x001b,0xff79,0xf354,0x3bda,0x0932,0x0165,0x0017,0xffff,0x0015,0xff36,0xf1cc,0x3a70,0x0901,0x0153,0x0015,
4310xffff,0x000e,0xfeef,0xf03a,0x38f7,0x08ca,0x0141,0x0014,0xffff,0x0007,0xfea6,0xee9f,0x3773,0x088d,0x012f,0x0012,
4320xfffe,0x0000,0xfe5a,0xecfb,0x35e3,0x084b,0x011c,0x0011,0xfffe,0xfff8,0xfe0b,0xeb50,0x3447,0x0804,0x010a,0x0010,
4330xfffe,0xffef,0xfdbb,0xe99d,0x32a3,0x07ba,0x00f8,0x000f,0xfffd,0xffe5,0xfd67,0xe7e4,0x30f6,0x076b,0x00e6,0x000d,
4340xfffd,0xffdb,0xfd12,0xe624,0x2f41,0x071a,0x00d4,0x000c,0xfffd,0xffd0,0xfcbb,0xe461,0x2d86,0x06c6,0x00c3,0x000b,
4350xfffc,0xffc4,0xfc63,0xe299,0x2bc5,0x066f,0x00b2,0x000a,0xfffc,0xffb8,0xfc09,0xe0ce,0x2a00,0x0617,0x00a1,0x0009,
4360xfffb,0xffaa,0xfbaf,0xdf01,0x2836,0x05be,0x0091,0x0009,0xfffb,0xff9d,0xfb54,0xdd33,0x266a,0x0563,0x0081,0x0008,
4370xfffa,0xff8e,0xfaf9,0xdb65,0x249c,0x0508,0x0073,0x0007,0xfff9,0xff80,0xfa9e,0xd997,0x22ce,0x04ad,0x0064,0x0006,
4380xfff8,0xff70,0xfa43,0xd7cb,0x2100,0x0452,0x0057,0x0006,0xfff8,0xff60,0xf9ea,0xd601,0x1f33,0x03f8,0x0049,0x0005,
4390xfff7,0xff4f,0xf992,0xd43c,0x1d68,0x039e,0x003d,0x0005,0xfff6,0xff3e,0xf93b,0xd27b,0x1ba0,0x0346,0x0031,0x0004,
4400xfff5,0xff2d,0xf8e7,0xd0c0,0x19dd,0x02ef,0x0026,0x0004,0xfff4,0xff1b,0xf896,0xcf0b,0x181d,0x029a,0x001c,0x0004,
4410xfff2,0xff09,0xf847,0xcd5e,0x1664,0x0246,0x0012,0x0003,0xfff1,0xfef7,0xf7fd,0xcbba,0x14b1,0x01f6,0x0009,0x0003,
4420xfff0,0xfee5,0xf7b6,0xca1e,0x1306,0x01a7,0x0001,0x0003,0xffef,0xfed2,0xf774,0xc88e,0x1162,0x015b,0xfffa,0x0002,
4430xffed,0xfec0,0xf737,0xc70a,0x0fc7,0x0112,0xfff3,0x0002,0xffec,0xfeae,0xf700,0xc591,0x0e35,0x00cb,0xffec,0x0002,
4440xffea,0xfe9c,0xf6cf,0xc427,0x0cad,0x0088,0xffe6,0x0002,0xffe9,0xfe8b,0xf6a5,0xc2ca,0x0b30,0x0048,0xffe1,0x0002,
4450xffe7,0xfe79,0xf681,0xc17c,0x09be,0x000b,0xffdc,0x0001,0xffe5,0xfe69,0xf666,0xc03e,0x0857,0xffd3,0xffd8,0x0001,
4460xffe4,0xfe58,0xf652,0xbf11,0x06fc,0xff9c,0xffd5,0x0001,0xffe2,0xfe49,0xf647,0xbdf6,0x05ae,0xff6a,0xffd2,0x0001,
4470xffe0,0xfe3b,0xf646,0xbcec,0x046e,0xff3a,0xffcf,0x0001,0xffde,0xfe2d,0xf64d,0xbbf5,0x0339,0xff0e,0xffcd,0x0001,
4480xffdc,0xfe21,0xf65f,0xbb11,0x0213,0xfee6,0xffcb,0x0001,0xffdb,0xfe16,0xf67c,0xba42,0x00fa,0xfec1,0xffca,0x0001,
4490xffd9,0xfe0d,0xf6a3,0xb987,0xfff0,0xfea0,0xffc9,0x0001,0xffd7,0xfe05,0xf6d6,0xb8e0,0xfef2,0xfe81,0xffc8,0x0001,
4500xffd5,0xfdff,0xf714,0xb84f,0xfe04,0xfe66,0xffc8,0x0000,0xffd3,0xfdfa,0xf75f,0xb7d4,0xfd23,0xfe4e,0xffc8,0x0000,
4510xffd1,0xfdf8,0xf7b6,0xb76f,0xfc51,0xfe39,0xffc8,0x0000,0xffd0,0xfdf7,0xf81a,0xb720,0xfb8d,0xfe28,0xffc9,0x0000,
4520xffcf,0xfdf9,0xf88b,0xb6e7,0xfad7,0xfe19,0xffc9,0x0000,0xffcd,0xfdfd,0xf909,0xb6c5,0xfa2f,0xfe0d,0xffca,0x0000,
453};
454
455static const uint8 int2idx_const[5000] = {
456 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5,
457 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8,
458 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11,
459 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
460 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16,
461 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18,
462 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
463 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23,
464 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25,
465 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27,
466 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29,
467 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 31,
468 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
469 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
470 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
471 36, 36, 36, 36, 36, 36, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 38, 38, 38, 38, 38, 38, 38, 38,
472 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 40, 40, 40, 40,
473 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
474 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
475 43, 43, 43, 43, 43, 43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, 45, 45, 45, 45, 45, 45, 45,
476 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 47, 47,
477 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
478 48, 48, 48, 48, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 50, 50, 50, 50, 50, 50, 50,
479 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
480 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
481 53, 53, 53, 53, 53, 53, 53, 53, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 55, 55, 55, 55,
482 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
483 56, 56, 56, 56, 56, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 58, 58, 58, 58, 58, 58, 58,
484 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
485 59, 59, 59, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 61, 61, 61, 61, 61, 61, 61, 61,
486 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
487 62, 62, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 64, 64, 64, 64, 64, 64, 64, 64, 64,
488 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
489 65, 65, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67, 67, 67, 67,
490 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
491 68, 68, 68, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 70, 70, 70, 70, 70, 70, 70,
492 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
493 71, 71, 71, 71, 71, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 73, 73, 73, 73, 73,
494 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
495 74, 74, 74, 74, 74, 74, 74, 74, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 76, 76,
496 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
497 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
498 78, 78, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 80, 80, 80, 80, 80, 80, 80,
499 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
500 81, 81, 81, 81, 81, 81, 81, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 83,
501 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
502 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
503 85, 85, 85, 85, 85, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 87, 87, 87, 87,
504 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
505 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
506 89, 89, 89, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 91, 91, 91, 91, 91,
507 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
508 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
509 93, 93, 93, 93, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 95, 95, 95, 95,
510 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
511 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
512 97, 97, 97, 97, 97, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 99, 99,
513 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,100,100,100,100,100,100,100,100,100,100,
514100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
515101,101,101,101,101,101,101,101,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
516102,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,104,104,104,104,104,104,
517104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,105,105,105,105,105,105,105,105,105,105,105,105,105,
518105,105,105,105,105,105,105,105,105,105,105,105,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,
519106,106,106,106,106,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,108,
520108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,109,109,109,109,109,109,109,109,
521109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
522110,110,110,110,110,110,110,110,110,110,110,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
523111,111,111,111,111,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,113,
524113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,114,114,114,114,114,114,114,114,
525114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
526115,115,115,115,115,115,115,115,115,115,115,115,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
527116,116,116,116,116,116,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
528118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,119,119,119,119,119,119,
529119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,120,120,120,120,120,120,120,120,120,120,120,
530120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
531121,121,121,121,121,121,121,121,121,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
532122,122,122,122,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,124,124,
533124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,125,125,125,125,125,125,125,
534125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,126,126,126,126,126,126,126,126,126,126,126,126,
535126,126,126,126,126,126,126,126,126,126,126,126,126,126,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
536127,127,127,127,127,127,127,127,127,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
537128,128,128,128,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,130,
538130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,131,131,131,131,131,131,
539131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,132,132,132,132,132,132,132,132,132,132,132,
540132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,
541133,133,133,133,133,133,133,133,133,133,133,133,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,
542134,134,134,134,134,134,134,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
543135,135,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,137,137,
544137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,138,138,138,138,138,138,138,
545138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,139,139,139,139,139,139,139,139,139,139,139,
546139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
547140,140,140,140,140,140,140,140,140,140,140,140,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,
548141,141,141,141,141,141,141,141,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
549142,142,142,142,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,144,
550144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,145,145,145,145,145,
551145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,146,146,146,146,146,146,146,146,146,
552146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,147,147,147,147,147,147,147,147,147,147,147,147,
553147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,
554148,148,148,148,148,148,148,148,148,148,148,148,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,
555149,149,149,149,149,149,149,149,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,
556150,150,150,150,150,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,
557151,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,153,153,153,
558153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,154,154,154,154,154,154,
559154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,155,155,155,155,155,155,155,155,155,
560155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,156,156,156,156,156,156,156,156,156,156,156,156,156,
561156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
562157,157,157,157,157,157,157,157,157,157,157,157,157,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,
563158,158,158,158,158,158,158,158,158,158,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
564159,159,159,159,159,159,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,
565160,160,160,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,
566162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,163,163,163,
567163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,164,164,164,164,164,
568164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,165,165,165,165,165,165,165,165,
569165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,166,166,166,166,166,166,166,166,166,166,166,
570166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,167,167,167,167,167,167,167,167,167,167,167,167,167,167,
571167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
572168,168,168,168,168,168,168,168,168,168,168,168,168,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
573169,169,169,169,169,169,169,169,169,169,169,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
574170,170,170,170,170,170,170,170,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,
575171,171,171,171,171,171,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
576172,172,172,172,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
577173,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,175,
578175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,176,176,176,
579176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,177,177,177,177,177,
580177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,178,178,178,178,178,178,178,
581178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,179,179,179,179,179,179,179,179,179,
582179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,180,180,180,180,180,180,180,180,180,180,
583180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,181,181,181,181,181,181,181,181,181,181,181,181,181,
584181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
585182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,
586183,183,183,183,183,183,183,183,183,183,183,183,183,183,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
587184,184,184,184,184,184,184,184,184,184,184,184,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
588185,185,185,185,185,185,185,185,185,185,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
589186,186,186,186,186,186,186,186,186,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
590187,187,187,187,187,187,187,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
591188,188,188,188,188,188,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
592189,189,189,189,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
593190,190,190,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
594191,191,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,
595192,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,194,
596194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,195,195,
597195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,196,196,196,
598196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,197,197,197,197,
599197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,198,198,198,198,198,
600198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,199,199,199,199,199,199,
601199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,200,200,200,200,200,200,200,
602200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,201,201,201,201,201,201,201,
603201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,202,202,202,202,202,202,202,202,
604202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,203,203,203,203,203,203,203,203,203,
605203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,204,204,204,204,204,204,204,204,204,
606204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,205,205,205,205,205,205,205,205,205,205,
607205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,206,206,206,206,206,206,206,206,206,206,206,
608206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,207,207,207,207,207,207,207,207,207,207,207,
609207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,208,208,208,208,208,208,208,208,208,208,208,208,
610208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,209,209,209,209,209,209,209,209,209,209,209,209,
611209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,210,210,210,210,210,210,210,210,210,210,210,210,
612210,210,210,210,210,210,210,210 };
613
614static const uint16 int3idx[32768] = {
615 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5,
616 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8,
617 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11,
618 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
619 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16,
620 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18,
621 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
622 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23,
623 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25,
624 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27,
625 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29,
626 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 31,
627 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
628 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
629 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
630 36, 36, 36, 36, 36, 36, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 38, 38, 38, 38, 38, 38, 38, 38,
631 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 40, 40, 40, 40,
632 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
633 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
634 43, 43, 43, 43, 43, 43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, 45, 45, 45, 45, 45, 45, 45,
635 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 47, 47,
636 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
637 48, 48, 48, 48, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 50, 50, 50, 50, 50, 50, 50,
638 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
639 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
640 53, 53, 53, 53, 53, 53, 53, 53, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 55, 55, 55, 55,
641 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
642 56, 56, 56, 56, 56, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 58, 58, 58, 58, 58, 58, 58,
643 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
644 59, 59, 59, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 61, 61, 61, 61, 61, 61, 61, 61,
645 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
646 62, 62, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 64, 64, 64, 64, 64, 64, 64, 64, 64,
647 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
648 65, 65, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67, 67, 67, 67,
649 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
650 68, 68, 68, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 70, 70, 70, 70, 70, 70, 70,
651 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
652 71, 71, 71, 71, 71, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 73, 73, 73, 73, 73,
653 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
654 74, 74, 74, 74, 74, 74, 74, 74, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 76, 76,
655 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
656 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
657 78, 78, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 80, 80, 80, 80, 80, 80, 80,
658 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
659 81, 81, 81, 81, 81, 81, 81, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 83,
660 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
661 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
662 85, 85, 85, 85, 85, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 87, 87, 87, 87,
663 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
664 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
665 89, 89, 89, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 91, 91, 91, 91, 91,
666 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
667 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
668 93, 93, 93, 93, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 95, 95, 95, 95,
669 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
670 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
671 97, 97, 97, 97, 97, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 99, 99,
672 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,100,100,100,100,100,100,100,100,100,100,
673100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
674101,101,101,101,101,101,101,101,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
675102,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,104,104,104,104,104,104,
676104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,105,105,105,105,105,105,105,105,105,105,105,105,105,
677105,105,105,105,105,105,105,105,105,105,105,105,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,
678106,106,106,106,106,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,108,
679108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,109,109,109,109,109,109,109,109,
680109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
681110,110,110,110,110,110,110,110,110,110,110,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
682111,111,111,111,111,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,113,
683113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,114,114,114,114,114,114,114,114,
684114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
685115,115,115,115,115,115,115,115,115,115,115,115,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
686116,116,116,116,116,116,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
687118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,119,119,119,119,119,119,
688119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,120,120,120,120,120,120,120,120,120,120,120,
689120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
690121,121,121,121,121,121,121,121,121,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
691122,122,122,122,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,124,124,
692124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,125,125,125,125,125,125,125,
693125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,126,126,126,126,126,126,126,126,126,126,126,126,
694126,126,126,126,126,126,126,126,126,126,126,126,126,126,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
695127,127,127,127,127,127,127,127,127,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
696128,128,128,128,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,130,
697130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,131,131,131,131,131,131,
698131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,132,132,132,132,132,132,132,132,132,132,132,
699132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,
700133,133,133,133,133,133,133,133,133,133,133,133,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,
701134,134,134,134,134,134,134,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
702135,135,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,137,137,
703137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,138,138,138,138,138,138,138,
704138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,139,139,139,139,139,139,139,139,139,139,139,
705139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
706140,140,140,140,140,140,140,140,140,140,140,140,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,
707141,141,141,141,141,141,141,141,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
708142,142,142,142,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,144,
709144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,145,145,145,145,145,
710145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,146,146,146,146,146,146,146,146,146,
711146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,147,147,147,147,147,147,147,147,147,147,147,147,
712147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,
713148,148,148,148,148,148,148,148,148,148,148,148,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,
714149,149,149,149,149,149,149,149,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,
715150,150,150,150,150,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,
716151,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,153,153,153,
717153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,154,154,154,154,154,154,
718154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,155,155,155,155,155,155,155,155,155,
719155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,156,156,156,156,156,156,156,156,156,156,156,156,156,
720156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
721157,157,157,157,157,157,157,157,157,157,157,157,157,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,
722158,158,158,158,158,158,158,158,158,158,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
723159,159,159,159,159,159,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,
724160,160,160,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,
725162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,163,163,163,
726163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,164,164,164,164,164,
727164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,165,165,165,165,165,165,165,165,
728165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,166,166,166,166,166,166,166,166,166,166,166,
729166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,167,167,167,167,167,167,167,167,167,167,167,167,167,167,
730167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
731168,168,168,168,168,168,168,168,168,168,168,168,168,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
732169,169,169,169,169,169,169,169,169,169,169,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
733170,170,170,170,170,170,170,170,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,
734171,171,171,171,171,171,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
735172,172,172,172,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
736173,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,175,
737175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,176,176,176,
738176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,177,177,177,177,177,
739177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,178,178,178,178,178,178,178,
740178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,179,179,179,179,179,179,179,179,179,
741179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,180,180,180,180,180,180,180,180,180,180,
742180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,181,181,181,181,181,181,181,181,181,181,181,181,181,
743181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
744182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,
745183,183,183,183,183,183,183,183,183,183,183,183,183,183,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
746184,184,184,184,184,184,184,184,184,184,184,184,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
747185,185,185,185,185,185,185,185,185,185,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
748186,186,186,186,186,186,186,186,186,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
749187,187,187,187,187,187,187,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
750188,188,188,188,188,188,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
751189,189,189,189,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
752190,190,190,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
753191,191,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,
754192,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,194,
755194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,195,195,
756195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,196,196,196,
757196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,197,197,197,197,
758197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,198,198,198,198,198,
759198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,199,199,199,199,199,199,
760199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,200,200,200,200,200,200,200,
761200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,201,201,201,201,201,201,201,
762201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,202,202,202,202,202,202,202,202,
763202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,203,203,203,203,203,203,203,203,203,
764203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,204,204,204,204,204,204,204,204,204,
765204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,205,205,205,205,205,205,205,205,205,205,
766205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,206,206,206,206,206,206,206,206,206,206,206,
767206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,207,207,207,207,207,207,207,207,207,207,207,
768207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,208,208,208,208,208,208,208,208,208,208,208,208,
769208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,209,209,209,209,209,209,209,209,209,209,209,209,
770209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,210,210,210,210,210,210,210,210,210,210,210,210,
771210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,211,211,211,211,211,211,211,211,211,211,211,211,211,
772211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,212,212,212,212,212,212,212,212,212,212,212,212,212,
773212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,213,213,213,213,213,213,213,213,213,213,213,213,213,
774213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,214,214,214,214,214,214,214,214,214,214,214,214,214,
775214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,215,215,215,215,215,215,215,215,215,215,215,215,215,
776215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,216,216,216,216,216,216,216,216,216,216,216,216,216,
777216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,217,217,217,217,217,217,217,217,217,217,217,217,217,
778217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,218,218,218,218,218,218,218,218,218,218,218,218,218,
779218,218,218,218,218,218,218,218,218,218,218,218,218,218,218,218,218,218,218,219,219,219,219,219,219,219,219,219,219,219,219,219,
780219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,220,220,220,220,220,220,220,220,220,220,220,220,220,
781220,220,220,220,220,220,220,220,220,220,220,220,220,220,220,220,220,220,220,221,221,221,221,221,221,221,221,221,221,221,221,221,
782221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,222,222,222,222,222,222,222,222,222,222,222,222,222,
783222,222,222,222,222,222,222,222,222,222,222,222,222,222,222,222,222,222,222,222,223,223,223,223,223,223,223,223,223,223,223,223,
784223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,224,224,224,224,224,224,224,224,224,224,224,224,
785224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,225,225,225,225,225,225,225,225,225,225,225,
786225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,226,226,226,226,226,226,226,226,226,226,226,
787226,226,226,226,226,226,226,226,226,226,226,226,226,226,226,226,226,226,226,226,226,227,227,227,227,227,227,227,227,227,227,227,
788227,227,227,227,227,227,227,227,227,227,227,227,227,227,227,227,227,227,227,227,227,227,228,228,228,228,228,228,228,228,228,228,
789228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,229,229,229,229,229,229,229,229,229,
790229,229,229,229,229,229,229,229,229,229,229,229,229,229,229,229,229,229,229,229,229,229,229,230,230,230,230,230,230,230,230,230,
791230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,231,231,231,231,231,231,231,231,
792231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,232,232,232,232,232,232,232,
793232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,233,233,233,233,233,233,233,
794233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,234,234,234,234,234,234,
795234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,235,235,235,235,235,
796235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,236,236,236,236,
797236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,237,237,237,
798237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,238,238,
799238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,239,
800239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,
801240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
802240,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,
803241,241,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
804242,242,242,242,243,243,243,243,243,243,243,243,243,243,243,243,243,243,243,243,243,243,243,243,243,243,243,243,243,243,243,243,
805243,243,243,243,243,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,
806244,244,244,244,244,244,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,
807245,245,245,245,245,245,245,245,246,246,246,246,246,246,246,246,246,246,246,246,246,246,246,246,246,246,246,246,246,246,246,246,
808246,246,246,246,246,246,246,246,246,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,
809247,247,247,247,247,247,247,247,247,247,247,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,
810248,248,248,248,248,248,248,248,248,248,248,248,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,
811249,249,249,249,249,249,249,249,249,249,249,249,249,249,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,
812250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,
813251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
814252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,253,253,253,253,253,253,
815253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,254,254,254,254,254,254,254,254,254,254,254,254,
816254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,255,255,255,255,255,255,255,255,255,255,
817255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,256,256,256,256,256,256,256,256,
818256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,257,257,257,257,257,257,
819257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,258,258,258,258,
820258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,259,259,
821259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
822260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,
823260,260,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
824261,261,261,261,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
825262,262,262,262,262,262,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,
826263,263,263,263,263,263,263,263,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
827264,264,264,264,264,264,264,264,264,264,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,
828265,265,265,265,265,265,265,265,265,265,265,265,265,266,266,266,266,266,266,266,266,266,266,266,266,266,266,266,266,266,266,266,
829266,266,266,266,266,266,266,266,266,266,266,266,266,266,266,267,267,267,267,267,267,267,267,267,267,267,267,267,267,267,267,267,
830267,267,267,267,267,267,267,267,267,267,267,267,267,267,267,267,267,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,
831268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,269,269,269,269,269,269,269,269,269,269,269,269,
832269,269,269,269,269,269,269,269,269,269,269,269,269,269,269,269,269,269,269,269,269,269,270,270,270,270,270,270,270,270,270,270,
833270,270,270,270,270,270,270,270,270,270,270,270,270,270,270,270,270,270,270,270,270,270,270,270,270,271,271,271,271,271,271,271,
834271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,272,272,272,272,272,
835272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,273,273,
836273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,
837274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
838274,274,274,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
839275,275,275,275,275,275,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
840276,276,276,276,276,276,276,276,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,
841277,277,277,277,277,277,277,277,277,277,277,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
842278,278,278,278,278,278,278,278,278,278,278,278,278,278,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
843279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,
844280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,281,281,281,281,281,281,281,281,281,281,281,281,
845281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,282,282,282,282,282,282,282,282,282,
846282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,283,283,283,283,283,283,
847283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,284,284,284,
848284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
849285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,
850285,285,285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
851286,286,286,286,286,286,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
852287,287,287,287,287,287,287,287,287,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
853288,288,288,288,288,288,288,288,288,288,288,288,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
854289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,
855290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,291,291,291,291,291,291,291,291,291,291,291,291,291,
856291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,292,292,292,292,292,292,292,292,292,292,
857292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,293,293,293,293,293,293,
858293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,294,294,294,
859294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
860295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,
861295,295,295,295,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
862296,296,296,296,296,296,296,297,297,297,297,297,297,297,297,297,297,297,297,297,297,297,297,297,297,297,297,297,297,297,297,297,
863297,297,297,297,297,297,297,297,297,297,297,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,
864298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,299,299,299,299,299,299,299,299,299,299,299,299,299,299,299,299,299,
865299,299,299,299,299,299,299,299,299,299,299,299,299,299,299,299,299,299,300,300,300,300,300,300,300,300,300,300,300,300,300,300,
866300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,301,301,301,301,301,301,301,301,301,301,
867301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,302,302,302,302,302,302,
868302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,303,303,
869303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,
870303,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
871304,304,304,304,304,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,
872305,305,305,305,305,305,305,305,305,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,
873306,306,306,306,306,306,306,306,306,306,306,306,306,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,
874307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
875308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,309,309,309,309,309,309,309,309,309,309,309,
876309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,310,310,310,310,310,310,310,
877310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,311,311,311,
878311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
879311,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
880312,312,312,312,312,312,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
881313,313,313,313,313,313,313,313,313,313,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
882314,314,314,314,314,314,314,314,314,314,314,314,314,314,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
883315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
884316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,317,317,317,317,317,317,317,317,317,
885317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,318,318,318,318,318,
886318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,319,
887319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
888319,319,319,319,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
889320,320,320,320,320,320,320,320,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,
890321,321,321,321,321,321,321,321,321,321,321,321,321,322,322,322,322,322,322,322,322,322,322,322,322,322,322,322,322,322,322,322,
891322,322,322,322,322,322,322,322,322,322,322,322,322,322,322,322,322,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,
892323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,324,324,324,324,324,324,324,324,324,324,
893324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,325,325,325,325,325,
894325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,326,
895326,326,326,326,326,326,326,326,326,326,326,326,326,326,326,326,326,326,326,326,326,326,326,326,326,326,326,326,326,326,326,326,
896326,326,326,326,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
897327,327,327,327,327,327,327,327,327,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
898328,328,328,328,328,328,328,328,328,328,328,328,328,328,329,329,329,329,329,329,329,329,329,329,329,329,329,329,329,329,329,329,
899329,329,329,329,329,329,329,329,329,329,329,329,329,329,329,329,329,329,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
900330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,331,331,331,331,331,331,331,331,331,
901331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,332,332,332,332,
902332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
903332,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
904333,333,333,333,333,333,334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,
905334,334,334,334,334,334,334,334,334,334,334,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
906335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,
907336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,337,337,337,337,337,337,337,337,337,337,337,
908337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,338,338,338,338,338,338,
909338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,338,
910339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,
911339,339,339,339,339,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,
912340,340,340,340,340,340,340,340,340,340,341,341,341,341,341,341,341,341,341,341,341,341,341,341,341,341,341,341,341,341,341,341,
913341,341,341,341,341,341,341,341,341,341,341,341,341,341,341,342,342,342,342,342,342,342,342,342,342,342,342,342,342,342,342,342,
914342,342,342,342,342,342,342,342,342,342,342,342,342,342,342,342,342,342,342,342,343,343,343,343,343,343,343,343,343,343,343,343,
915343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,344,344,344,344,344,344,
916344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,345,
917345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,345,
918345,345,345,345,345,346,346,346,346,346,346,346,346,346,346,346,346,346,346,346,346,346,346,346,346,346,346,346,346,346,346,346,
919346,346,346,346,346,346,346,346,346,346,347,347,347,347,347,347,347,347,347,347,347,347,347,347,347,347,347,347,347,347,347,347,
920347,347,347,347,347,347,347,347,347,347,347,347,347,347,347,347,348,348,348,348,348,348,348,348,348,348,348,348,348,348,348,348,
921348,348,348,348,348,348,348,348,348,348,348,348,348,348,348,348,348,348,348,348,348,349,349,349,349,349,349,349,349,349,349,349,
922349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,350,350,350,350,350,
923350,350,350,350,350,350,350,350,350,350,350,350,350,350,350,350,350,350,350,350,350,350,350,350,350,350,350,350,350,350,350,350,
924351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,
925351,351,351,351,351,351,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,
926352,352,352,352,352,352,352,352,352,352,352,353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,
927353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,354,354,354,354,354,354,354,354,354,354,354,354,354,354,354,
928354,354,354,354,354,354,354,354,354,354,354,354,354,354,354,354,354,354,354,354,354,354,354,355,355,355,355,355,355,355,355,355,
929355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,356,356,356,
930356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,
931356,356,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,
932357,357,357,357,357,357,357,357,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,
933358,358,358,358,358,358,358,358,358,358,358,358,358,358,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,
934359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,360,360,360,360,360,360,360,360,360,360,360,360,
935360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,361,361,361,361,361,361,
936361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,
937362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
938362,362,362,362,362,362,363,363,363,363,363,363,363,363,363,363,363,363,363,363,363,363,363,363,363,363,363,363,363,363,363,363,
939363,363,363,363,363,363,363,363,363,363,363,363,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
940364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,365,365,365,365,365,365,365,365,365,365,365,365,365,365,
941365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,366,366,366,366,366,366,366,366,
942366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,367,367,
943367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
944367,367,367,367,367,368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,
945368,368,368,368,368,368,368,368,368,368,368,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
946369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,
947370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,371,371,371,371,371,371,371,371,371,
948371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,372,372,
949372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
950372,372,372,372,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,
951373,373,373,373,373,373,373,373,373,373,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
952374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,375,375,375,375,375,375,375,375,375,375,375,375,375,375,375,
953375,375,375,375,375,375,375,375,375,375,375,375,375,375,375,375,375,375,375,375,375,375,375,376,376,376,376,376,376,376,376,376,
954376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,377,377,
955377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
956377,377,377,377,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
957378,378,378,378,378,378,378,378,378,378,378,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,
958379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,380,380,380,380,380,380,380,380,380,380,380,380,380,380,
959380,380,380,380,380,380,380,380,380,380,380,380,380,380,380,380,380,380,380,380,380,380,380,380,381,381,381,381,381,381,381,381,
960381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,382,
961382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,
962382,382,382,382,382,382,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,
963383,383,383,383,383,383,383,383,383,383,383,383,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,
964384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,385,385,385,385,385,385,385,385,385,385,385,385,385,
965385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,386,386,386,386,386,386,
966386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,386,
967386,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,
968387,387,387,387,387,387,387,387,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,
969388,388,388,388,388,388,388,388,388,388,388,388,388,388,389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,
970389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,390,390,390,390,390,390,390,390,390,390,390,
971390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,391,391,391,391,
972391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
973391,391,391,392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,
974392,392,392,392,392,392,392,392,392,392,393,393,393,393,393,393,393,393,393,393,393,393,393,393,393,393,393,393,393,393,393,393,
975393,393,393,393,393,393,393,393,393,393,393,393,393,393,393,393,393,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,
976394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,395,395,395,395,395,395,395,
977395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,
978396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,
979396,396,396,396,396,396,396,397,397,397,397,397,397,397,397,397,397,397,397,397,397,397,397,397,397,397,397,397,397,397,397,397,
980397,397,397,397,397,397,397,397,397,397,397,397,397,397,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,
981398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,399,399,399,399,399,399,399,399,399,399,399,
982399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,400,400,400,
983400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
984400,400,400,400,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
985401,401,401,401,401,401,401,401,401,401,401,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,
986402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,403,403,403,403,403,403,403,403,403,403,403,403,403,
987403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,404,404,404,404,404,404,
988404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,
989404,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,
990405,405,405,405,405,405,405,405,405,406,406,406,406,406,406,406,406,406,406,406,406,406,406,406,406,406,406,406,406,406,406,406,
991406,406,406,406,406,406,406,406,406,406,406,406,406,406,406,406,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
992407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,408,408,408,408,408,408,408,408,
993408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,409,
994409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
995409,409,409,409,409,409,409,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,
996410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
997411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,412,412,412,412,412,412,412,412,412,412,
998412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,413,413,
999413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,
1000413,413,413,413,413,413,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
1001414,414,414,414,414,414,414,414,414,414,414,414,414,415,415,415,415,415,415,415,415,415,415,415,415,415,415,415,415,415,415,415,
1002415,415,415,415,415,415,415,415,415,415,415,415,415,415,415,415,415,415,415,415,415,416,416,416,416,416,416,416,416,416,416,416,
1003416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,417,417,417,
1004417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,417,
1005417,417,417,417,417,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,418,
1006418,418,418,418,418,418,418,418,418,418,418,418,418,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,
1007419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,420,420,420,420,420,420,420,420,420,420,420,
1008420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,421,421,421,
1009421,421,421,421,421,421,421,421,421,421,421,421,421,421,421,421,421,421,421,421,421,421,421,421,421,421,421,421,421,421,421,421,
1010421,421,421,421,421,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,
1011422,422,422,422,422,422,422,422,422,422,422,422,422,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,
1012423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,424,424,424,424,424,424,424,424,424,424,424,
1013424,424,424,424,424,424,424,424,424,424,424,424,424,424,424,424,424,424,424,424,424,424,424,424,424,424,424,424,424,425,425,425,
1014425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,
1015425,425,425,425,425,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
1016426,426,426,426,426,426,426,426,426,426,426,426,426,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427,
1017427,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427,428,428,428,428,428,428,428,428,428,428,428,
1018428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,429,429,429,
1019429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
1020429,429,429,429,429,429,430,430,430,430,430,430,430,430,430,430,430,430,430,430,430,430,430,430,430,430,430,430,430,430,430,430,
1021430,430,430,430,430,430,430,430,430,430,430,430,430,430,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,
1022431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,432,432,432,432,432,432,432,432,432,432,
1023432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,433,433,
1024433,433,433,433,433,433,433,433,433,433,433,433,433,433,433,433,433,433,433,433,433,433,433,433,433,433,433,433,433,433,433,433,
1025433,433,433,433,433,433,433,434,434,434,434,434,434,434,434,434,434,434,434,434,434,434,434,434,434,434,434,434,434,434,434,434,
1026434,434,434,434,434,434,434,434,434,434,434,434,434,434,434,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,
1027435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,436,436,436,436,436,436,436,436,
1028436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,
1029437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
1030437,437,437,437,437,437,437,437,437,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
1031438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
1032439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,440,440,440,440,440,440,
1033440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,
1034440,440,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,
1035441,441,441,441,441,441,441,441,441,441,441,442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,
1036442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,443,443,443,443,443,443,443,443,443,443,443,443,443,
1037443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,444,444,444,444,
1038444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,
1039444,444,444,444,444,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,
1040445,445,445,445,445,445,445,445,445,445,445,445,445,446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,
1041446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,447,447,447,447,447,447,447,447,447,447,
1042447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,448,
1043448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,
1044448,448,448,448,448,448,448,448,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,
1045449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,
1046450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,451,451,451,451,451,451,451,
1047451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,
1048451,451,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,
1049452,452,452,452,452,452,452,452,452,452,452,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,
1050453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,454,454,454,454,454,454,454,454,454,454,454,454,
1051454,454,454,454,454,454,454,454,454,454,454,454,454,454,454,454,454,454,454,454,454,454,454,454,454,454,454,454,454,455,455,455,
1052455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,
1053455,455,455,455,455,455,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,
1054456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,457,457,457,457,457,457,457,457,457,457,457,457,457,457,457,457,457,
1055457,457,457,457,457,457,457,457,457,457,457,457,457,457,457,457,457,457,457,457,457,457,457,457,458,458,458,458,458,458,458,458,
1056458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,
1057458,458,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,
1058459,459,459,459,459,459,459,459,459,459,459,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,
1059460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,461,461,461,461,461,461,461,461,461,461,461,461,
1060461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,462,462,462,
1061462,462,462,462,462,462,462,462,462,462,462,462,462,462,462,462,462,462,462,462,462,462,462,462,462,462,462,462,462,462,462,462,
1062462,462,462,462,462,462,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
1063463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,
1064464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,465,465,465,465,465,465,465,
1065465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,
1066465,465,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,
1067466,466,466,466,466,466,466,466,466,466,466,466,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
1068467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,468,468,468,468,468,468,468,468,468,468,468,
1069468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,469,469,
1070469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
1071469,469,469,469,469,469,469,469,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,
1072470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,
1073471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,472,472,472,472,472,
1074472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
1075472,472,472,472,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
1076473,473,473,473,473,473,473,473,473,473,473,473,473,473,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,
1077474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,475,475,475,475,475,475,475,475,475,
1078475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
1079475,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
1080476,476,476,476,476,476,476,476,476,476,476,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,
1081477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,478,478,478,478,478,478,478,478,478,478,478,478,
1082478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,479,479,
1083479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
1084479,479,479,479,479,479,479,479,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
1085480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
1086481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,482,482,482,482,482,
1087482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
1088482,482,482,482,482,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,
1089483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
1090484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,485,485,485,485,485,485,485,
1091485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
1092485,485,485,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
1093486,486,486,486,486,486,486,486,486,486,486,486,486,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,
1094487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,488,488,488,488,488,488,488,488,488,
1095488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
1096488,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,
1097489,489,489,489,489,489,489,489,489,489,489,490,490,490,490,490,490,490,490,490,490,490,490,490,490,490,490,490,490,490,490,490,
1098490,490,490,490,490,490,490,490,490,490,490,490,490,490,490,490,490,490,490,490,490,491,491,491,491,491,491,491,491,491,491,491,
1099491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,492,
1100492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,
1101492,492,492,492,492,492,492,492,492,493,493,493,493,493,493,493,493,493,493,493,493,493,493,493,493,493,493,493,493,493,493,493,
1102493,493,493,493,493,493,493,493,493,493,493,493,493,493,493,493,493,493,493,494,494,494,494,494,494,494,494,494,494,494,494,494,
1103494,494,494,494,494,494,494,494,494,494,494,494,494,494,494,494,494,494,494,494,494,494,494,494,494,494,494,494,494,495,495,495,
1104495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,
1105495,495,495,495,495,495,495,496,496,496,496,496,496,496,496,496,496,496,496,496,496,496,496,496,496,496,496,496,496,496,496,496,
1106496,496,496,496,496,496,496,496,496,496,496,496,496,496,496,496,496,496,497,497,497,497,497,497,497,497,497,497,497,497,497,497,
1107497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,498,498,498,498,
1108498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
1109498,498,498,498,498,498,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,
1110499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,
1111500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,501,501,501,501,501,
1112501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,
1113501,501,501,501,501,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,
1114502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,
1115503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,504,504,504,504,504,504,
1116504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,
1117504,504,504,504,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,
1118505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,
1119506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,507,507,507,507,507,507,507,
1120507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
1121507,507,507,507,508,508,508,508,508,508,508,508,508,508,508,508,508,508,508,508,508,508,508,508,508,508,508,508,508,508,508,508,
1122508,508,508,508,508,508,508,508,508,508,508,508,508,508,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,
1123509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,510,510,510,510,510,510,510,
1124510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,
1125510,510,510,510,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,
1126511,511,511,511,511,511,511,511,511,511,511,511,511,511,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
1127512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,513,513,513,513,513,513,513,
1128513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,
1129513,513,513,513,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,
1130514,514,514,514,514,514,514,514,514,514,514,514,514,514,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,
1131515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,516,516,516,516,516,516,516,
1132516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
1133516,516,516,516,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,
1134517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,
1135518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,519,519,519,519,519,519,
1136519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,
1137519,519,519,519,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,
1138520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,
1139521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,522,522,522,522,522,522,
1140522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,522,
1141522,522,522,522,522,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,
1142523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,523,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,
1143524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,525,525,525,525,525,
1144525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,
1145525,525,525,525,525,525,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,
1146526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,526,527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,
1147527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,528,528,528,528,
1148528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,528,
1149528,528,528,528,528,528,528,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,
1150529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,530,530,530,530,530,530,530,530,530,530,530,530,530,
1151530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,531,531,
1152531,531,531,531,531,531,531,531,531,531,531,531,531,531,531,531,531,531,531,531,531,531,531,531,531,531,531,531,531,531,531,531,
1153531,531,531,531,531,531,531,531,531,532,532,532,532,532,532,532,532,532,532,532,532,532,532,532,532,532,532,532,532,532,532,532,
1154532,532,532,532,532,532,532,532,532,532,532,532,532,532,532,532,532,532,532,532,533,533,533,533,533,533,533,533,533,533,533,533,
1155533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,534,
1156534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,
1157534,534,534,534,534,534,534,534,534,534,534,535,535,535,535,535,535,535,535,535,535,535,535,535,535,535,535,535,535,535,535,535,
1158535,535,535,535,535,535,535,535,535,535,535,535,535,535,535,535,535,535,535,535,535,535,536,536,536,536,536,536,536,536,536,536,
1159536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
1160536,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
1161537,537,537,537,537,537,537,537,537,537,537,537,537,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
1162538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,539,539,539,539,539,539,539,539,
1163539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,
1164539,539,539,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,
1165540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,
1166541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,542,542,542,542,542,542,
1167542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,
1168542,542,542,542,542,542,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,
1169543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,
1170544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,544,545,545,545,
1171545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,
1172545,545,545,545,545,545,545,545,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,
1173546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,547,547,547,547,547,547,547,547,547,547,547,547,
1174547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,
1175548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,
1176548,548,548,548,548,548,548,548,548,548,548,549,549,549,549,549,549,549,549,549,549,549,549,549,549,549,549,549,549,549,549,549,
1177549,549,549,549,549,549,549,549,549,549,549,549,549,549,549,549,549,549,549,549,549,549,549,550,550,550,550,550,550,550,550,550,
1178550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
1179550,550,550,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,
1180551,551,551,551,551,551,551,551,551,551,551,551,551,551,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
1181552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,553,553,553,553,553,553,
1182553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,553,
1183553,553,553,553,553,553,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,
1184554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
1185555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,556,556,
1186556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
1187556,556,556,556,556,556,556,556,556,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
1188557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,558,558,558,558,558,558,558,558,558,558,558,
1189558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,
1190558,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,
1191559,559,559,559,559,559,559,559,559,559,559,559,559,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,
1192560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,561,561,561,561,561,561,561,
1193561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
1194561,561,561,561,561,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,
1195562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,
1196563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,564,564,564,
1197564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,
1198564,564,564,564,564,564,564,564,564,565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,
1199565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,566,566,566,566,566,566,566,566,566,566,566,
1200566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,
1201566,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,
1202567,567,567,567,567,567,567,567,567,567,567,567,567,567,568,568,568,568,568,568,568,568,568,568,568,568,568,568,568,568,568,568,
1203568,568,568,568,568,568,568,568,568,568,568,568,568,568,568,568,568,568,568,568,568,568,568,568,568,568,569,569,569,569,569,569,
1204569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,
1205569,569,569,569,569,569,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
1206570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,571,571,571,571,571,571,571,571,571,571,571,571,571,571,
1207571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,572,572,
1208572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,
1209572,572,572,572,572,572,572,572,572,572,572,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,
1210573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,574,574,574,574,574,574,574,574,574,
1211574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,
1212574,574,574,575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,
1213575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,
1214576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,577,577,577,577,
1215577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,
1216577,577,577,577,577,577,577,577,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,
1217578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,579,579,579,579,579,579,579,579,579,579,579,
1218579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,
1219579,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,
1220580,580,580,580,580,580,580,580,580,580,580,580,580,580,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,
1221581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,582,582,582,582,582,582,
1222582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,
1223582,582,582,582,582,582,582,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,
1224583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,584,584,584,584,584,584,584,584,584,584,584,584,584,
1225584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,
1226585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,585,
1227585,585,585,585,585,585,585,585,585,585,585,585,585,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
1228586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,587,587,587,587,587,587,587,
1229587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
1230587,587,587,587,587,587,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,
1231588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,589,589,589,589,589,589,589,589,589,589,589,589,589,
1232589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,590,
1233590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,
1234590,590,590,590,590,590,590,590,590,590,590,590,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,
1235591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,592,592,592,592,592,592,592,
1236592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,
1237592,592,592,592,592,592,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,
1238593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,593,594,594,594,594,594,594,594,594,594,594,594,594,594,594,
1239594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,595,
1240595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,595,
1241595,595,595,595,595,595,595,595,595,595,595,595,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,
1242596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,597,597,597,597,597,597,597,
1243597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,
1244597,597,597,597,597,597,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,
1245598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,599,599,599,599,599,599,599,599,599,599,599,599,599,
1246599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,
1247600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,
1248600,600,600,600,600,600,600,600,600,600,600,600,600,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,
1249601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,602,602,602,602,602,602,
1250602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,
1251602,602,602,602,602,602,602,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,
1252603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,604,604,604,604,604,604,604,604,604,604,604,604,
1253604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,
1254604,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,
1255605,605,605,605,605,605,605,605,605,605,605,605,605,605,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,
1256606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,607,607,607,607,607,
1257607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,
1258607,607,607,607,607,607,607,607,608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,
1259608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,609,609,609,609,609,609,609,609,609,609,609,
1260609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,609,
1261609,609,609,610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,
1262610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,
1263611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,612,612,612,
1264612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,
1265612,612,612,612,612,612,612,612,612,612,613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,
1266613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,614,614,614,614,614,614,614,614,
1267614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,
1268614,614,614,614,614,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,
1269615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
1270616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
1271617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,617,
1272617,617,617,617,617,617,617,617,617,617,617,617,617,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,
1273618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,619,619,619,619,619,
1274619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,
1275619,619,619,619,619,619,619,619,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
1276620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,621,621,621,621,621,621,621,621,621,621,
1277621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,
1278621,621,621,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,
1279622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,623,623,623,623,623,623,623,623,623,623,623,623,623,623,623,
1280623,623,623,623,623,623,623,623,623,623,623,623,623,623,623,623,623,623,623,623,623,623,623,623,623,623,623,623,623,623,624,624,
1281624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,
1282624,624,624,624,624,624,624,624,624,624,624,624,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,
1283625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,626,626,626,626,626,626,626,
1284626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,
1285626,626,626,626,626,626,626,627,627,627,627,627,627,627,627,627,627,627,627,627,627,627,627,627,627,627,627,627,627,627,627,627,
1286627,627,627,627,627,627,627,627,627,627,627,627,627,627,627,627,627,627,627,627,627,628,628,628,628,628,628,628,628,628,628,628,
1287628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,628,
1288628,628,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,
1289629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,
1290630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,631,631,
1291631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,
1292631,631,631,631,631,631,631,631,631,631,631,632,632,632,632,632,632,632,632,632,632,632,632,632,632,632,632,632,632,632,632,632,
1293632,632,632,632,632,632,632,632,632,632,632,632,632,632,632,632,632,632,632,632,632,632,632,632,632,633,633,633,633,633,633,633,
1294633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,
1295633,633,633,633,633,633,633,634,634,634,634,634,634,634,634,634,634,634,634,634,634,634,634,634,634,634,634,634,634,634,634,634,
1296634,634,634,634,634,634,634,634,634,634,634,634,634,634,634,634,634,634,634,634,634,635,635,635,635,635,635,635,635,635,635,635,
1297635,635,635,635,635,635,635,635,635,635,635,635,635,635,635,635,635,635,635,635,635,635,635,635,635,635,635,635,635,635,635,635,
1298635,635,635,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,
1299636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,
1300637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,638,638,
1301638,638,638,638,638,638,638,638,638,638,638,638,638,638,638,638,638,638,638,638,638,638,638,638,638,638,638,638,638,638,638,638,
1302638,638,638,638,638,638,638,638,638,638,638,638,639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,
1303639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,639,640,640,640,640,640,640,
1304640,640,640,640,640,640,640,640,640,640,640,640,640,640,640,640,640,640,640,640,640,640,640,640,640,640,640,640,640,640,640,640,
1305640,640,640,640,640,640,640,640,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,
1306641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,642,642,642,642,642,642,642,642,642,642,
1307642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,
1308642,642,642,642,643,643,643,643,643,643,643,643,643,643,643,643,643,643,643,643,643,643,643,643,643,643,643,643,643,643,643,643,
1309643,643,643,643,643,643,643,643,643,643,643,643,643,643,643,643,643,643,644,644,644,644,644,644,644,644,644,644,644,644,644,644,
1310644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,
1311645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,
1312645,645,645,645,645,645,645,645,645,645,645,645,645,645,646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,
1313646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,647,647,647,
1314647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,
1315647,647,647,647,647,647,647,647,647,647,647,648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,
1316648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,649,649,649,649,649,649,649,
1317649,649,649,649,649,649,649,649,649,649,649,649,649,649,649,649,649,649,649,649,649,649,649,649,649,649,649,649,649,649,649,649,
1318649,649,649,649,649,649,649,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,
1319650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,651,651,651,651,651,651,651,651,651,651,651,
1320651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,
1321651,651,651,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,
1322652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,653,653,653,653,653,653,653,653,653,653,653,653,653,653,
1323653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,
1324654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,
1325654,654,654,654,654,654,654,654,654,654,654,654,654,654,655,655,655,655,655,655,655,655,655,655,655,655,655,655,655,655,655,655,
1326655,655,655,655,655,655,655,655,655,655,655,655,655,655,655,655,655,655,655,655,655,655,655,655,655,655,655,655,655,656,656,656,
1327656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,
1328656,656,656,656,656,656,656,656,656,656,656,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,
1329657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,658,658,658,658,658,658,658,
1330658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,658,
1331658,658,658,658,658,658,658,658,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,
1332659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,660,660,660,660,660,660,660,660,660,660,
1333660,660,660,660,660,660,660,660,660,660,660,660,660,660,660,660,660,660,660,660,660,660,660,660,660,660,660,660,660,660,660,660,
1334660,660,660,660,660,661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,
1335661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,662,662,662,662,662,662,662,662,662,662,662,662,662,
1336662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,
1337662,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,
1338663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,663,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,
1339664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,664,665,
1340665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,
1341665,665,665,665,665,665,665,665,665,665,665,665,665,666,666,666,666,666,666,666,666,666,666,666,666,666,666,666,666,666,666,666,
1342666,666,666,666,666,666,666,666,666,666,666,666,666,666,666,666,666,666,666,666,666,666,666,666,666,666,666,666,667,667,667,667,
1343667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,
1344667,667,667,667,667,667,667,667,667,667,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,
1345668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,669,669,669,669,669,669,669,
1346669,669,669,669,669,669,669,669,669,669,669,669,669,669,669,669,669,669,669,669,669,669,669,669,669,669,669,669,669,669,669,669,
1347669,669,669,669,669,669,669,669,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,
1348670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,670,671,671,671,671,671,671,671,671,671,671,
1349671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,
1350671,671,671,671,671,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,
1351672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,672,673,673,673,673,673,673,673,673,673,673,673,673,
1352673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,
1353673,673,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674,
1354674,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,
1355675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,
1356676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,
1357676,676,676,676,676,676,676,676,676,676,676,676,676,676,676,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,
1358677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,678,678,
1359678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,
1360678,678,678,678,678,678,678,678,678,678,678,678,679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,
1361679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,679,680,680,680,680,680,
1362680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,
1363680,680,680,680,680,680,680,680,680,680,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,
1364681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,682,682,682,682,682,682,682,
1365682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,
1366682,682,682,682,682,682,682,682,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,
1367683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,684,684,684,684,684,684,684,684,684,
1368684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,
1369684,684,684,684,684,684,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,
1370685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,686,686,686,686,686,686,686,686,686,686,686,
1371686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,
1372686,686,686,686,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,
1373687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,688,688,688,688,688,688,688,688,688,688,688,688,688,
1374688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,
1375688,688,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,
1376689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,
1377690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,
1378691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,
1379691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,
1380692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,693,
1381693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,
1382693,693,693,693,693,693,693,693,693,693,693,693,693,693,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,
1383694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,695,695,695,
1384695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,
1385695,695,695,695,695,695,695,695,695,695,695,695,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,
1386696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,697,697,697,697,
1387697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,697,
1388697,697,697,697,697,697,697,697,697,697,697,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,
1389698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,699,699,699,699,699,699,
1390699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,
1391699,699,699,699,699,699,699,699,699,699,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,
1392700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,701,701,701,701,701,701,701,
1393701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,
1394701,701,701,701,701,701,701,701,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,
1395702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,703,703,703,703,703,703,703,703,
1396703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,
1397703,703,703,703,703,703,703,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,
1398704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,705,705,705,705,705,705,705,705,705,
1399705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,
1400705,705,705,705,705,705,706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,
1401706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,707,707,707,707,707,707,707,707,707,707,
1402707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,
1403707,707,707,707,707,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
1404708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,709,709,709,709,709,709,709,709,709,709,709,
1405709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,
1406709,709,709,709,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,
1407710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,710,711,711,711,711,711,711,711,711,711,711,711,711,
1408711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,
1409711,711,711,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
1410712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,713,713,713,713,713,713,713,713,713,713,713,713,713,
1411713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,
1412713,713,713,714,714,714,714,714,714,714,714,714,714,714,714,714,714,714,714,714,714,714,714,714,714,714,714,714,714,714,714,714,
1413714,714,714,714,714,714,714,714,714,714,714,714,714,714,714,714,714,714,715,715,715,715,715,715,715,715,715,715,715,715,715,715,
1414715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,
1415715,715,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,
1416716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,717,717,717,717,717,717,717,717,717,717,717,717,717,717,
1417717,717,717,717,717,717,717,717,717,717,717,717,717,717,717,717,717,717,717,717,717,717,717,717,717,717,717,717,717,717,717,717,
1418717,718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,
1419718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,
1420719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,
1421719,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,
1422720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,720,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,
1423721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,721,
1424721,722,722,722,722,722,722,722,722,722,722,722,722,722,722,722,722,722,722,722,722,722,722,722,722,722,722,722,722,722,722,722,
1425722,722,722,722,722,722,722,722,722,722,722,722,722,722,722,722,722,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,
1426723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,723,
1427724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,
1428724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,724,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,
1429725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,725,
1430726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,
1431726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,
1432727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,
1433728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,
1434728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,728,729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,
1435729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,729,
1436730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,
1437730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,
1438731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,731,
1439732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,
1440732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,732,733,733,733,733,733,733,733,733,733,733,733,733,733,733,733,733,
1441733,733,733,733,733,733,733,733,733,733,733,733,733,733,733,733,733,733,733,733,733,733,733,733,733,733,733,733,733,733,733,733,
1442734,734,734,734,734,734,734,734,734,734,734,734,734,734,734,734,734,734,734,734,734,734,734,734,734,734,734,734,734,734,734,734,
1443734,734,734,734,734,734,734,734,734,734,734,734,734,734,734,734,735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,
1444735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,735,
1445735,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,
1446736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,
1447737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,
1448737,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,
1449738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,738,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
1450739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
1451739,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,
1452740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,741,741,741,741,741,741,741,741,741,741,741,741,741,741,
1453741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,
1454741,741,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,
1455742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,743,743,743,743,743,743,743,743,743,743,743,743,743,743,
1456743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,743,
1457743,743,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,
1458744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,745,745,745,745,745,745,745,745,745,745,745,745,745,
1459745,745,745,745,745,745,745,745,745,745,745,745,745,745,745,745,745,745,745,745,745,745,745,745,745,745,745,745,745,745,745,745,
1460745,745,745,746,746,746,746,746,746,746,746,746,746,746,746,746,746,746,746,746,746,746,746,746,746,746,746,746,746,746,746,746,
1461746,746,746,746,746,746,746,746,746,746,746,746,746,746,746,746,746,746,746,747,747,747,747,747,747,747,747,747,747,747,747,747,
1462747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,
1463747,747,747,747,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,
1464748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,748,749,749,749,749,749,749,749,749,749,749,749,749,
1465749,749,749,749,749,749,749,749,749,749,749,749,749,749,749,749,749,749,749,749,749,749,749,749,749,749,749,749,749,749,749,749,
1466749,749,749,749,749,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,
1467750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,751,751,751,751,751,751,751,751,751,751,751,
1468751,751,751,751,751,751,751,751,751,751,751,751,751,751,751,751,751,751,751,751,751,751,751,751,751,751,751,751,751,751,751,751,
1469751,751,751,751,751,751,752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,
1470752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,752,753,753,753,753,753,753,753,753,753,753,
1471753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,753,
1472753,753,753,753,753,753,753,754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,
1473754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,754,755,755,755,755,755,755,755,755,755,
1474755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,755,
1475755,755,755,755,755,755,755,755,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,
1476756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,757,757,757,757,757,757,757,757,
1477757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,757,
1478757,757,757,757,757,757,757,757,757,758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,
1479758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,758,759,759,759,759,759,759,
1480759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,759,
1481759,759,759,759,759,759,759,759,759,759,760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,
1482760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,760,761,761,761,761,761,
1483761,761,761,761,761,761,761,761,761,761,761,761,761,761,761,761,761,761,761,761,761,761,761,761,761,761,761,761,761,761,761,761,
1484761,761,761,761,761,761,761,761,761,761,761,761,762,762,762,762,762,762,762,762,762,762,762,762,762,762,762,762,762,762,762,762,
1485762,762,762,762,762,762,762,762,762,762,762,762,762,762,762,762,762,762,762,762,762,762,762,762,762,762,762,762,763,763,763,763,
1486763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,763,
1487763,763,763,763,763,763,763,763,763,763,763,763,763,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,
1488764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,765,765,
1489765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,
1490765,765,765,765,765,765,765,765,765,765,765,765,765,765,765,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,
1491766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,766,767,
1492767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,
1493767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,
1494768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,768,
1495768,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,
1496769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,769,770,770,770,770,770,770,770,770,770,770,770,770,770,770,
1497770,770,770,770,770,770,770,770,770,770,770,770,770,770,770,770,770,770,770,770,770,770,770,770,770,770,770,770,770,770,770,770,
1498770,770,770,771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,
1499771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,771,772,772,772,772,772,772,772,772,772,772,772,772,
1500772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,772,
1501772,772,772,772,772,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,
1502773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,773,774,774,774,774,774,774,774,774,774,774,
1503774,774,774,774,774,774,774,774,774,774,774,774,774,774,774,774,774,774,774,774,774,774,774,774,774,774,774,774,774,774,774,774,
1504774,774,774,774,774,774,774,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,
1505775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,775,776,776,776,776,776,776,776,776,
1506776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,
1507776,776,776,776,776,776,776,776,776,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,
1508777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,777,778,778,778,778,778,778,
1509778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,778,
1510778,778,778,778,778,778,778,778,778,778,778,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,
1511779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,780,780,780,780,
1512780,780,780,780,780,780,780,780,780,780,780,780,780,780,780,780,780,780,780,780,780,780,780,780,780,780,780,780,780,780,780,780,
1513780,780,780,780,780,780,780,780,780,780,780,780,780,781,781,781,781,781,781,781,781,781,781,781,781,781,781,781,781,781,781,781,
1514781,781,781,781,781,781,781,781,781,781,781,781,781,781,781,781,781,781,781,781,781,781,781,781,781,781,781,781,781,781,782,782,
1515782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,
1516782,782,782,782,782,782,782,782,782,782,782,782,782,782,782,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,
1517783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,783,
1518784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,
1519784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,784,785,785,785,785,785,785,785,785,785,785,785,785,785,785,785,
1520785,785,785,785,785,785,785,785,785,785,785,785,785,785,785,785,785,785,785,785,785,785,785,785,785,785,785,785,785,785,785,785,
1521785,785,785,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,
1522786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,786,787,787,787,787,787,787,787,787,787,787,787,787,
1523787,787,787,787,787,787,787,787,787,787,787,787,787,787,787,787,787,787,787,787,787,787,787,787,787,787,787,787,787,787,787,787,
1524787,787,787,787,787,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,
1525788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,789,789,789,789,789,789,789,789,789,789,
1526789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,789,
1527789,789,789,789,789,789,789,789,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,
1528790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,790,791,791,791,791,791,791,791,
1529791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,791,
1530791,791,791,791,791,791,791,791,791,791,792,792,792,792,792,792,792,792,792,792,792,792,792,792,792,792,792,792,792,792,792,792,
1531792,792,792,792,792,792,792,792,792,792,792,792,792,792,792,792,792,792,792,792,792,792,792,792,792,792,792,792,793,793,793,793,
1532793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,793,
1533793,793,793,793,793,793,793,793,793,793,793,793,793,794,794,794,794,794,794,794,794,794,794,794,794,794,794,794,794,794,794,794,
1534794,794,794,794,794,794,794,794,794,794,794,794,794,794,794,794,794,794,794,794,794,794,794,794,794,794,794,794,794,794,795,795,
1535795,795,795,795,795,795,795,795,795,795,795,795,795,795,795,795,795,795,795,795,795,795,795,795,795,795,795,795,795,795,795,795,
1536795,795,795,795,795,795,795,795,795,795,795,795,795,795,795,795,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
1537796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,796,
1538796,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,
1539797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,797,798,798,798,798,798,798,798,798,798,798,798,798,798,
1540798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,798,
1541798,798,798,798,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,
1542799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,800,800,800,800,800,800,800,800,800,800,
1543800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,
1544800,800,800,800,800,800,800,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,
1545801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,801,802,802,802,802,802,802,802,
1546802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,802,
1547802,802,802,802,802,802,802,802,802,802,803,803,803,803,803,803,803,803,803,803,803,803,803,803,803,803,803,803,803,803,803,803,
1548803,803,803,803,803,803,803,803,803,803,803,803,803,803,803,803,803,803,803,803,803,803,803,803,803,803,803,803,804,804,804,804,
1549804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,804,
1550804,804,804,804,804,804,804,804,804,804,804,804,804,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,
1551805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,805,806,
1552806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,
1553806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,806,807,807,807,807,807,807,807,807,807,807,807,807,807,807,807,
1554807,807,807,807,807,807,807,807,807,807,807,807,807,807,807,807,807,807,807,807,807,807,807,807,807,807,807,807,807,807,807,807,
1555807,807,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,
1556808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,808,809,809,809,809,809,809,809,809,809,809,809,809,
1557809,809,809,809,809,809,809,809,809,809,809,809,809,809,809,809,809,809,809,809,809,809,809,809,809,809,809,809,809,809,809,809,
1558809,809,809,809,809,809,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,
1559810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,810,811,811,811,811,811,811,811,811,811,
1560811,811,811,811,811,811,811,811,811,811,811,811,811,811,811,811,811,811,811,811,811,811,811,811,811,811,811,811,811,811,811,811,
1561811,811,811,811,811,811,811,811,811,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,
1562812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,812,813,813,813,813,813,
1563813,813,813,813,813,813,813,813,813,813,813,813,813,813,813,813,813,813,813,813,813,813,813,813,813,813,813,813,813,813,813,813,
1564813,813,813,813,813,813,813,813,813,813,813,813,813,814,814,814,814,814,814,814,814,814,814,814,814,814,814,814,814,814,814,814,
1565814,814,814,814,814,814,814,814,814,814,814,814,814,814,814,814,814,814,814,814,814,814,814,814,814,814,814,814,814,814,815,815,
1566815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,
1567815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,815,816,816,816,816,816,816,816,816,816,816,816,816,816,816,816,816,
1568816,816,816,816,816,816,816,816,816,816,816,816,816,816,816,816,816,816,816,816,816,816,816,816,816,816,816,816,816,816,816,816,
1569816,816,817,817,817,817,817,817,817,817,817,817,817,817,817,817,817,817,817,817,817,817,817,817,817,817,817,817,817,817,817,817,
1570817,817,817,817,817,817,817,817,817,817,817,817,817,817,817,817,817,817,817,817,818,818,818,818,818,818,818,818,818,818,818,818,
1571818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,818,
1572818,818,818,818,818,818,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,
1573819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,819,820,820,820,820,820,820,820,820,
1574820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,820,
1575820,820,820,820,820,820,820,820,820,820,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,
1576821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,821,822,822,822,822,
1577822,822,822,822,822,822,822,822,822,822,822,822,822,822,822,822,822,822,822,822,822,822,822,822,822,822,822,822,822,822,822,822,
1578822,822,822,822,822,822,822,822,822,822,822,822,822,822,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,
1579823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,823,
1580824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,
1581824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,824,825,825,825,825,825,825,825,825,825,825,825,825,825,825,
1582825,825,825,825,825,825,825,825,825,825,825,825,825,825,825,825,825,825,825,825,825,825,825,825,825,825,825,825,825,825,825,825,
1583825,825,825,825,826,826,826,826,826,826,826,826,826,826,826,826,826,826,826,826,826,826,826,826,826,826,826,826,826,826,826,826,
1584826,826,826,826,826,826,826,826,826,826,826,826,826,826,826,826,826,826,826,826,826,826,827,827,827,827,827,827,827,827,827,827,
1585827,827,827,827,827,827,827,827,827,827,827,827,827,827,827,827,827,827,827,827,827,827,827,827,827,827,827,827,827,827,827,827,
1586827,827,827,827,827,827,827,827,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,
1587828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,829,829,829,829,829,829,
1588829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,829,
1589829,829,829,829,829,829,829,829,829,829,829,829,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,
1590830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,830,831,831,
1591831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,
1592831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,831,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,
1593832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,832,
1594832,832,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,
1595833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,833,834,834,834,834,834,834,834,834,834,834,834,834,
1596834,834,834,834,834,834,834,834,834,834,834,834,834,834,834,834,834,834,834,834,834,834,834,834,834,834,834,834,834,834,834,834,
1597834,834,834,834,834,834,834,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,
1598835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,835,836,836,836,836,836,836,836,
1599836,836,836,836,836,836,836,836,836,836,836,836,836,836,836,836,836,836,836,836,836,836,836,836,836,836,836,836,836,836,836,836,
1600836,836,836,836,836,836,836,836,836,836,836,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,
1601837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,837,838,838,838,
1602838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,
1603838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,838,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,
1604839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,839,
1605839,839,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,
1606840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,840,841,841,841,841,841,841,841,841,841,841,841,841,
1607841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,
1608841,841,841,841,841,841,841,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,
1609842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,842,843,843,843,843,843,843,843,
1610843,843,843,843,843,843,843,843,843,843,843,843,843,843,843,843,843,843,843,843,843,843,843,843,843,843,843,843,843,843,843,843,
1611843,843,843,843,843,843,843,843,843,843,843,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,
1612844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,844,845,845,
1613845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,
1614845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,845,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,
1615846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,846,
1616846,846,846,847,847,847,847,847,847,847,847,847,847,847,847,847,847,847,847,847,847,847,847,847,847,847,847,847,847,847,847,847,
1617847,847,847,847,847,847,847,847,847,847,847,847,847,847,847,847,847,847,847,847,847,848,848,848,848,848,848,848,848,848,848,848,
1618848,848,848,848,848,848,848,848,848,848,848,848,848,848,848,848,848,848,848,848,848,848,848,848,848,848,848,848,848,848,848,848,
1619848,848,848,848,848,848,848,848,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,
1620849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,849,850,850,850,850,850,850,
1621850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,
1622850,850,850,850,850,850,850,850,850,850,850,850,850,851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,
1623851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,851,852,
1624852,852,852,852,852,852,852,852,852,852,852,852,852,852,852,852,852,852,852,852,852,852,852,852,852,852,852,852,852,852,852,852,
1625852,852,852,852,852,852,852,852,852,852,852,852,852,852,852,852,852,852,853,853,853,853,853,853,853,853,853,853,853,853,853,853,
1626853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,853,
1627853,853,853,853,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,
1628854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,854,855,855,855,855,855,855,855,855,855,
1629855,855,855,855,855,855,855,855,855,855,855,855,855,855,855,855,855,855,855,855,855,855,855,855,855,855,855,855,855,855,855,855,
1630855,855,855,855,855,855,855,855,855,855,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,
1631856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,857,857,857,857,
1632857,857,857,857,857,857,857,857,857,857,857,857,857,857,857,857,857,857,857,857,857,857,857,857,857,857,857,857,857,857,857,857,
1633857,857,857,857,857,857,857,857,857,857,857,857,857,857,857,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,
1634858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,858,
1635858,858,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,
1636859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,860,860,860,860,860,860,860,860,860,860,860,860,
1637860,860,860,860,860,860,860,860,860,860,860,860,860,860,860,860,860,860,860,860,860,860,860,860,860,860,860,860,860,860,860,860,
1638860,860,860,860,860,860,860,861,861,861,861,861,861,861,861,861,861,861,861,861,861,861,861,861,861,861,861,861,861,861,861,861 };
1639
1640/* forward declarations */
1641void encodeSideInfo( side_info_t si[2][2] );
1642void Huffmancodebits( uint16 *ix, int *xr, side_info_t *gi );
1643int HuffmanCode(int table_select, uint16 *ix, int *xr);
1644int HuffmanCount1(unsigned tbl, uint16 *ix, int *xr );
1645int new_choose_table( uint16 ix[SAMP_PER_FRAME2], uint32 begin, uint32 end );
1646void putbits(uint32 val, uint32 nbit);
1647int count_bit(uint16 ix[SAMP_PER_FRAME2], uint32 start, uint32 end, uint32 table );
1648int bigv_bitcount(uint16 ix[SAMP_PER_FRAME2], side_info_t *gi);
1649void bigv_tab_select( uint16 ix[SAMP_PER_FRAME2], side_info_t *cod_info );
1650void subdivide(side_info_t *cod_info);
1651void mdct_sub_int(int sb_sample[2][3][18][SBLIMIT], int (*mdct_freq)[2][SAMP_PER_FRAME2]);
1652void filter_subband(int s[SBLIMIT], int off, int k);
1653
1654void putbits(uint32 val, uint32 nbit)
1655{
1656 int new_bitpos = CodedData.bitpos + nbit;
1657 int ptrpos = CodedData.bitpos >> 5;
1658
1659 val = val & (0xffffffff >> (32 - nbit));
1660
1661 /* data fit in one uint32 */
1662 if(((new_bitpos - 1) >> 5) == ptrpos)
1663 CodedData.bbuf[ptrpos] |= val << ((32 - new_bitpos) & 31);
1664 else
1665 {
1666 CodedData.bbuf[ptrpos ] |= val >> ((new_bitpos - 32) & 31);
1667 CodedData.bbuf[ptrpos+1] = val << ((32 - new_bitpos) & 31);
1668 }
1669
1670 CodedData.bitpos = new_bitpos;
1671}
1672
1673/* This is called after a frame of audio has been quantized and coded.
1674 It will write the encoded audio to the bitstream. Note that from a
1675 layer3 encoder's perspective the bit stream is primarily a series
1676 of main_data() blocks, with header and side information inserted at
1677 the proper locations to maintain framing. See Figure A.7 in the IS */
1678void format_bitstream( uint16 enc[2][2][SAMP_PER_FRAME2],
1679 side_info_t side[2][2], int (*xr)[2][SAMP_PER_FRAME2] )
1680{
1681 int gr, ch;
1682
1683 encodeSideInfo( side );
1684
1685 for(gr=0; gr<2; gr++)
1686 for(ch=0; ch<cfg.channels; ch++)
1687 Huffmancodebits( &enc[gr][ch][0], &xr[gr][ch][0], &side[gr][ch] );
1688}
1689
1690void encodeSideInfo( side_info_t si[2][2] )
1691{
1692 int gr, ch, header;
1693
1694 header = 0xfff00000;
1695 header |= cfg.mpg.type << 19; /* mp3 type: 1 */
1696 header |= 1 << 17; /* mp3 layer: 1 */
1697 header |= 1 << 16; /* mp3 crc: 1 */
1698 header |= cfg.mpg.bitrate_index << 12;
1699 header |= cfg.mpg.smprate_index << 10;
1700 header |= cfg.mpg.padding << 9;
1701 header |= cfg.mpg.mode << 6;
1702 header |= 1 << 2; /* mp3 original: 1 */
1703
1704 putbits( header, 32 );
1705 putbits( 0, cfg.channels == 2 ? 20 : 18 );
1706
1707 for(gr=0; gr<2; gr++)
1708 for(ch=0; ch<cfg.channels; ch++)
1709 {
1710 side_info_t *gi = &si[gr][ch];
1711
1712 putbits( gi->part2_3_length, 12 );
1713 putbits( gi->big_values, 9 );
1714 putbits( gi->global_gain, 8 );
1715 putbits( gi->table_select[0], 10 );
1716 putbits( gi->table_select[1], 5 );
1717 putbits( gi->table_select[2], 5 );
1718 putbits( gi->region0_count, 4 );
1719 putbits( gi->region1_count, 3 );
1720 putbits( gi->table_select[3], 3 );
1721 }
1722}
1723
1724/* Note the discussion of huffmancodebits() on pages 28 and 29 of the IS,
1725 as well as the definitions of the side information on pages 26 and 27. */
1726void Huffmancodebits( uint16 *ix, int *xr, side_info_t *gi )
1727{
1728 int region1Start;
1729 int region2Start;
1730 int i, bigvalues, count1End;
1731 int stuffingBits;
1732 int bitsWritten = 0;
1733 uint32 scalefac_index;
1734
1735 /* 1: Write the bigvalues */
1736 bigvalues = gi->big_values << 1;
1737 scalefac_index = gi->region0_count + 1;
1738 region1Start = scalefac[ scalefac_index ];
1739 scalefac_index += gi->region1_count + 1;
1740 region2Start = scalefac[ scalefac_index ];
1741
1742 for(i=0; i<region1Start; i+=2)
1743 bitsWritten += HuffmanCode(gi->table_select[0], ix+i, xr+i);
1744
1745 for( ; i<region2Start; i+=2)
1746 bitsWritten += HuffmanCode(gi->table_select[1], ix+i, xr+i);
1747
1748 for( ; i<bigvalues; i+=2)
1749 bitsWritten += HuffmanCode(gi->table_select[2], ix+i, xr+i);
1750
1751 /* 2: Write count1 area */
1752 count1End = bigvalues + (gi->count1 << 2);
1753 for(i=bigvalues; i<count1End; i+=4)
1754 bitsWritten += HuffmanCount1(gi->table_select[3], ix+i, xr+i);
1755
1756 if((stuffingBits = gi->part2_3_length - bitsWritten) != 0)
1757 {
1758 int stuffingWords = stuffingBits / 32;
1759 int remainingBits = stuffingBits % 32;
1760
1761 if( remainingBits )
1762 putbits( ~0, remainingBits );
1763
1764 /* Due to the nature of the Huffman code tables, we will pad with ones */
1765 while( stuffingWords-- )
1766 putbits( ~0, 32 );
1767
1768 bitsWritten += stuffingBits;
1769 }
1770}
1771
1772int HuffmanCount1(unsigned tbl, uint16 *ix, int *xr)
1773{
1774 uint32 dat, p, s;
1775 int len, v, w, x, y;
1776 #define signv (xr[0] < 0 ? 1 : 0)
1777 #define signw (xr[1] < 0 ? 1 : 0)
1778 #define signx (xr[2] < 0 ? 1 : 0)
1779 #define signy (xr[3] < 0 ? 1 : 0)
1780
1781 v = ix[0];
1782 w = ix[1];
1783 x = ix[2];
1784 y = ix[3];
1785 p = v + (w << 1) + (x << 2) + (y << 3);
1786
1787 switch(p)
1788 {
1789 default: len = 0; s = 0; break;
1790 case 1: len = 1; s = signv; break;
1791 case 2: len = 1; s = signw; break;
1792 case 3: len = 2; s = (signv << 1) + signw; break;
1793 case 4: len = 1; s = signx; break;
1794 case 5: len = 2; s = (signv << 1) + signx; break;
1795 case 6: len = 2; s = (signw << 1) + signx; break;
1796 case 7: len = 3; s = (signv << 2) + (signw << 1) + signx; break;
1797 case 8: len = 1; s = signy; break;
1798 case 9: len = 2; s = (signv << 1) + signy; break;
1799 case 10: len = 2; s = (signw << 1) + signy; break;
1800 case 11: len = 3; s = (signv << 2) + (signw << 1) + signy; break;
1801 case 12: len = 2; s = (signx << 1) + signy; break;
1802 case 13: len = 3; s = (signv << 2) + (signx << 1) + signy; break;
1803 case 14: len = 3; s = (signw << 2) + (signx << 1) + signy; break;
1804 case 15: len = 4; s = (signv << 3) + (signw << 2) + (signx << 1) + signy; break;
1805 }
1806
1807 dat = (ht_count1[tbl][0][p] << len) + s;
1808 len = ht_count1[tbl][1][p];
1809 putbits( dat, len );
1810
1811 return len;
1812}
1813
1814/* Implements the pseudocode of page 98 of the IS */
1815int HuffmanCode(int table_select, uint16 *ix, int *xr)
1816{
1817 unsigned int linbitsx, linbitsy, linbits, idx;
1818 const struct huffcodetab *h;
1819 int x, y, bit;
1820 uint32 code;
1821 #define sign_x (xr[0] < 0 ? 1 : 0)
1822 #define sign_y (xr[1] < 0 ? 1 : 0)
1823
1824 if(table_select == 0)
1825 return 0;
1826
1827 x = ix[0];
1828 y = ix[1];
1829 h = &ht[table_select];
1830 linbits = h->linbits;
1831 linbitsx = linbitsy = 0;
1832
1833 if( table_select > 15 )
1834 { /* ESC-table is used */
1835 if(x > 14) { linbitsx = x - 15; x = 15; }
1836 if(y > 14) { linbitsy = y - 15; y = 15; }
1837
1838 idx = (x * h->ylen) + y;
1839 code = h->table[idx];
1840 bit = h->hlen [idx];
1841
1842 if(x)
1843 {
1844 if(x > 14)
1845 {
1846 code = (code << linbits) | linbitsx;
1847 bit += linbits;
1848 }
1849
1850 code = (code << 1) | sign_x;
1851 bit += 1;
1852 }
1853
1854 if(y)
1855 {
1856 if(y > 14)
1857 {
1858 code = (code << linbits) | linbitsy;
1859 bit += linbits;
1860 }
1861
1862 code = (code << 1) | sign_y;
1863 bit += 1;
1864 }
1865 }
1866 else
1867 { /* No ESC-words */
1868 idx = (x * h->ylen) + y;
1869 code = h->table[idx];
1870 bit = h->hlen [idx];
1871
1872 if(x)
1873 {
1874 code = (code << 1) | sign_x;
1875 bit += 1;
1876 }
1877
1878 if(y)
1879 {
1880 code = (code << 1) | sign_y;
1881 bit += 1;
1882 }
1883 }
1884
1885 putbits( code, bit );
1886
1887 return bit;
1888}
1889
1890/***************************************************************************/
1891/* Choose the Huffman table that will encode ix[begin..end] with */
1892/* the fewest bits. */
1893/* Note: This code contains knowledge about the sizes and characteristic */
1894/* of the Huffman tables as defined in the IS (Table B.7), and will not */
1895/* work with any arbitrary tables. */
1896/***************************************************************************/
1897int new_choose_table( uint16 ix[SAMP_PER_FRAME2], uint32 begin, uint32 end )
1898{
1899 uint32 i;
1900 int max, sum0, sum1, table0, table1;
1901
1902 for(i=begin,max=0; i<end; i++)
1903 if(ix[i] > max)
1904 max = ix[i];
1905
1906 if(!max)
1907 return 0;
1908
1909 table0 = 0;
1910 table1 = 0;
1911
1912 if(max <= 15)
1913 {
1914 /* try tables with no linbits */
1915 /* indx: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */
1916 /* xlen: 0, 2, 3, 3, 0, 4, 4, 6, 6, 6, 8, 8, 8, 16, 0, 16 */
1917 for(table0=0; table0<14; table0++)
1918 if(ht[table0].xlen > max)
1919 break;
1920
1921 sum0 = count_bit(ix, begin, end, table0);
1922
1923 switch( table0 )
1924 {
1925 case 2: sum1 = count_bit( ix, begin, end, 3 );
1926 if(sum1 <= sum0) table0 = 3; break;
1927
1928 case 5: sum1 = count_bit( ix, begin, end, 6 );
1929 if(sum1 <= sum0) table0 = 6; break;
1930
1931 case 7: sum1 = count_bit( ix, begin, end, 8 );
1932 if(sum1 <= sum0) { table0 = 8; sum0 = sum1; }
1933 sum1 = count_bit( ix, begin, end, 9 );
1934 if(sum1 <= sum0) table0 = 9; break;
1935
1936 case 10: sum1 = count_bit( ix, begin, end, 11 );
1937 if(sum1 <= sum0) { table0 =11; sum0 = sum1; }
1938 sum1 = count_bit( ix, begin, end, 12);
1939 if(sum1 <= sum0) table0 = 12; break;
1940
1941 case 13: sum1 = count_bit( ix, begin, end, 15 );
1942 if(sum1 <= sum0) table0 = 15; break;
1943 }
1944 }
1945 else
1946 {
1947 /* try tables with linbits */
1948 max -= 15;
1949
1950 /* index : 15 16 17 18 19 20 21 22 23 */
1951 /* linmax: 0 1 3 7 15 63 255 1023 8191 */
1952 for(table0=15; table0<24; table0++)
1953 if(ht[table0].linmax >= max)
1954 break;
1955
1956 /* index : 24 25 26 27 28 29 30 31 */
1957 /* linmax: 15 31 63 127 255 511 2047 8191 */
1958 for(table1=24; table1<32; table1++)
1959 if(ht[table1].linmax >= max)
1960 break;
1961
1962 sum0 = count_bit(ix, begin, end, table0);
1963 sum1 = count_bit(ix, begin, end, table1);
1964
1965 if(sum1 < sum0)
1966 table0 = table1;
1967 }
1968 return table0;
1969}
1970
1971/*************************************************************************/
1972/* Function: Count the number of bits necessary to code the subregion. */
1973/*************************************************************************/
1974int count_bit(uint16 ix[SAMP_PER_FRAME2], uint32 start, uint32 end, uint32 table)
1975{
1976 uint32 i;
1977 int sum;
1978 int x, y;
1979 unsigned linbits, ylen;
1980 const struct huffcodetab *h;
1981
1982 h = &ht[table];
1983 sum = 0;
1984 ylen = h->ylen;
1985
1986 if(table > 15)
1987 { // ESC-table is used
1988 linbits = h->linbits;
1989 for(i=start; i<end; i+=2)
1990 {
1991 x = ix[i];
1992 y = ix[i+1];
1993
1994 if(x)
1995 {
1996 if(x > 14) { x = 15; sum += linbits; }
1997 sum++;
1998 }
1999
2000 if(y)
2001 {
2002 if(y > 14) { y = 15; sum += linbits; }
2003 sum++;
2004 }
2005
2006 sum += h->hlen[(x * ylen) + y];
2007 }
2008 }
2009 else
2010 { /* No ESC-words */
2011 for(i=start; i<end; i+=2)
2012 {
2013 x = ix[i];
2014 y = ix[i+1];
2015
2016 sum += h->hlen[(x * ylen) + y];
2017
2018 if(x) sum++;
2019 if(y) sum++;
2020 }
2021 }
2022
2023 return sum;
2024}
2025
2026/*************************************************************************/
2027/* Function: Quantization of the vector xr ( -> ix) */
2028/*************************************************************************/
2029int quantize_int(int xr[SAMP_PER_FRAME2], uint16 ix[SAMP_PER_FRAME2], side_info_t *cod_info)
2030{
2031 uint32 i, ind, step, frac_pow[] = { 0x80000, 0x6ba28, 0x5a828, 0x4c1c0 };
2032
2033 step = frac_pow[cod_info->quantizerStepSize & 3] >> cod_info->quantizerStepSize / 4;
2034
2035 for(i=SAMP_PER_FRAME2; i--; )
2036 {
2037 ind = (abs(xr[i]) * step + 32768) >> 16;
2038
2039 if(ind < 5000)
2040 ix[i] = int2idx[ind];
2041 else
2042 if(ind < 32768)
2043 ix[i] = int3idx[ind];
2044 else
2045 return 0;
2046 }
2047
2048 return 1;
2049}
2050
2051/*************************************************************************/
2052/* Function: Calculation of rzero, count1, big_values */
2053/* (Partitions ix into big values, quadruples and zeros). */
2054/*************************************************************************/
2055int calc_runlen( uint16 ix[SAMP_PER_FRAME2], side_info_t *cod_info )
2056{
2057 int p, i, sum0 = 0, sum1 = 0;
2058
2059 for(i=SAMP_PER_FRAME2; i-=2; )
2060 if(ix[i-1] | ix[i-2])
2061 break;
2062
2063 cod_info->count1 = 0;
2064
2065 for( ; i>3; i-=4)
2066 {
2067 int v = ix[i-1];
2068 int w = ix[i-2];
2069 int x = ix[i-3];
2070 int y = ix[i-4];
2071
2072 if((v | w | x | y) <= 1)
2073 {
2074 p = (y) + (x<<1) + (w<<2) + (v<<3);
2075
2076 sum0 += ht_count1[0][1][p]; /* add table0 hlength */
2077 sum1 += ht_count1[1][1][p]; /* add table1 hlength */
2078
2079 cod_info->count1++;
2080 }
2081 else break;
2082 }
2083
2084 cod_info->big_values = i >> 1;
2085
2086 if(sum0 < sum1)
2087 {
2088 cod_info->table_select[3] = 0;
2089 return sum0;
2090 }
2091 else
2092 {
2093 cod_info->table_select[3] = 1;
2094 return sum1;
2095 }
2096}
2097
2098/*************************************************************************/
2099/* presumable subdivides the bigvalue region which will use separate Huffman tables */
2100/*************************************************************************/
2101void subdivide(side_info_t *cod_info)
2102{
2103 int scfb_anz = 0;
2104 int bigvalues_region;
2105 int thiscount, index;
2106
2107 if( !cod_info->big_values )
2108 { /* no big_values region */
2109 cod_info->region0_count = 0;
2110 cod_info->region1_count = 0;
2111 }
2112 else
2113 {
2114 bigvalues_region = 2 * cod_info->big_values;
2115
2116 /* Calculate scfb_anz */
2117 while( scalefac[scfb_anz] < bigvalues_region )
2118 scfb_anz++;
2119
2120 cod_info->region0_count = subdv_table[scfb_anz].region0_count;
2121 thiscount = cod_info->region0_count;
2122 index = thiscount + 1;
2123 while(thiscount && (scalefac[index] > bigvalues_region))
2124 {
2125 thiscount--;
2126 index--;
2127 }
2128 cod_info->region0_count = thiscount;
2129 cod_info->region1_count = subdv_table[scfb_anz].region1_count;
2130 index = cod_info->region0_count + cod_info->region1_count + 2;
2131 thiscount = cod_info->region1_count;
2132 while(thiscount && (scalefac[index] > bigvalues_region))
2133 {
2134 thiscount--;
2135 index--;
2136 }
2137 cod_info->region1_count = thiscount;
2138 cod_info->address1 = scalefac[cod_info->region0_count+1];
2139 cod_info->address2 = scalefac[cod_info->region0_count+cod_info->region1_count+2];
2140 cod_info->address3 = bigvalues_region;
2141 }
2142}
2143
2144/*************************************************************************/
2145/* Function: Select huffman code tables for bigvalues regions */
2146/*************************************************************************/
2147void bigv_tab_select( uint16 ix[SAMP_PER_FRAME2], side_info_t *cod_info )
2148{
2149 cod_info->table_select[0] = 0;
2150 cod_info->table_select[1] = 0;
2151 cod_info->table_select[2] = 0;
2152
2153 if( cod_info->address1 > 0 )
2154 cod_info->table_select[0] = new_choose_table(ix, 0 , cod_info->address1);
2155
2156 if( cod_info->address2 > cod_info->address1 )
2157 cod_info->table_select[1] = new_choose_table(ix, cod_info->address1, cod_info->address2);
2158
2159 if( cod_info->big_values<<1 > cod_info->address2 )
2160 cod_info->table_select[2] = new_choose_table(ix, cod_info->address2, cod_info->big_values<<1);
2161}
2162
2163/*************************************************************************/
2164/* Function: Count the number of bits necessary to code the bigvalues region */
2165/*************************************************************************/
2166int bigv_bitcount(uint16 ix[SAMP_PER_FRAME2], side_info_t *gi)
2167{
2168 int bits = 0;
2169 uint32 table;
2170
2171 if((table=gi->table_select[0])) /* region0 */
2172 bits += count_bit(ix, 0 , gi->address1, table);
2173
2174 if((table=gi->table_select[1])) /* region1 */
2175 bits += count_bit(ix, gi->address1, gi->address2, table);
2176
2177 if((table=gi->table_select[2])) /* region2 */
2178 bits += count_bit(ix, gi->address2, gi->address3, table);
2179
2180 return bits;
2181}
2182
2183int quantcnt;
2184
2185/* Speed up the outer_loop code which is called by iteration_loop.
2186 The outer_loop function precedes the call to the function inner_loop
2187 with a call to bin_search gain defined below,
2188 which returns a good starting quantizerStepSize. */
2189int quantize_and_count_bits(int xr[SAMP_PER_FRAME2], uint16 ix[SAMP_PER_FRAME2], side_info_t *cod_info)
2190{
2191 int bits = 10000;
2192
2193 quantcnt++;
2194
2195 if(quantize_int(xr, ix, cod_info))
2196 {
2197 bits = calc_runlen(ix, cod_info); /* rzero,count1,big_values*/
2198 subdivide(cod_info); /* bigvalues sfb division */
2199 bigv_tab_select(ix,cod_info); /* codebook selection*/
2200 bits += bigv_bitcount(ix,cod_info); /* bit count */
2201 }
2202
2203 return bits;
2204}
2205
2206/******************************************************************************/
2207/* The code selects the best quantizerStepSize for a particular set of scalefacs */
2208/******************************************************************************/
2209int inner_loop_int(int xr[2][2][SAMP_PER_FRAME2], int max_bits, side_info_t *cod_info, int gr, int ch )
2210{
2211 int *xrs; /* int[SAMP_PER_FRAME2] *xr; */
2212 uint16 *ix; /* int[SAMP_PER_FRAME2] *ix; */
2213 int bits;
2214
2215 xrs = &xr[gr][ch][0];
2216 ix = enc_data[gr][ch];
2217
2218 while((bits=quantize_and_count_bits(xrs, ix, cod_info)) < max_bits-64)
2219 {
2220 if(cod_info->quantizerStepSize == 0)
2221 break;
2222
2223 if(cod_info->quantizerStepSize <= 2)
2224 cod_info->quantizerStepSize = 0;
2225 else
2226 cod_info->quantizerStepSize -= 2;
2227 }
2228
2229 while(bits > max_bits)
2230 {
2231 cod_info->quantizerStepSize++;
2232 bits = quantize_and_count_bits(xrs, ix, cod_info);
2233 }
2234
2235 return bits;
2236}
2237
2238/************************************************************************/
2239/* iteration_loop() */
2240/************************************************************************/
2241void iteration_loop(int mdct_freq_org[2][2][SAMP_PER_FRAME2], side_info_t cod_info[2][2], int mean_bits)
2242{
2243 int max_bits;
2244 int ch, gr;
2245 int ResvSize = 0; /* Layer3 bit reservoir: Described in C.1.5.4.2.2 of the IS */
2246
2247 for(gr=2; gr--; )
2248 {
2249 for(ch=cfg.channels; ch--; )
2250 {
2251 /* calculation of number of available bit( per granule ) */
2252 max_bits = mean_bits / cfg.channels;
2253
2254 cod_info[gr][ch].big_values = 0;
2255 cod_info[gr][ch].count1 = 0;
2256 cod_info[gr][ch].table_select[0] = 0;
2257 cod_info[gr][ch].table_select[1] = 0;
2258 cod_info[gr][ch].table_select[2] = 0;
2259 cod_info[gr][ch].region0_count = 0;
2260 cod_info[gr][ch].region1_count = 0;
2261 cod_info[gr][ch].table_select[3] = 0;
2262 cod_info[gr][ch].part2_3_length = inner_loop_int(mdct_freq_org, max_bits, &cod_info[gr][ch], gr, ch);
2263 cod_info[gr][ch].global_gain = cod_info[gr][ch].quantizerStepSize + 210 - 0x40;
2264
2265 /* Readjusts the size of the reservoir to reflect the granule's usage */
2266 ResvSize += max_bits - cod_info[gr][ch].part2_3_length;
2267 }
2268 }
2269
2270/* Makes sure that the reservoir size is within limits, possibly by adding
2271 stuffing bits. Note that stuffing bits are added by increasing a granule's
2272 part2_3_length */
2273 cod_info[0][0].part2_3_length += ResvSize;
2274}
2275
2276/*-------------------------------------------------------------------*/
2277/* Function: Calculation of the MDCT */
2278/* In the case of long blocks ( block_type 0,1,3 ) there are */
2279/* 36 coefficents in the time domain and 18 in the frequency */
2280/* domain. */
2281/*-------------------------------------------------------------------*/
2282
2283/* TODO: This MDCT implementation is very crude, and should be replaced by
2284 a completely different algorithm. */
2285void mdct_int( int *in, int *out )
2286{
2287 int m, tmp=0;
2288
2289 for(m=18; m--; )
2290 {
2291#ifdef CPU_COLDFIRE
2292 { int *wint = win_int[m];
2293 int *indat = in;
2294
2295 asm volatile(
2296 "movem.l (%[indat]), %%d0-%%d7\n"
2297 "move.l (%[wint])+, %%a5\n"
2298 "mac.l %%d0, %%a5, (%[wint])+, %%a5, %%acc0\n"
2299 "mac.l %%d1, %%a5, (%[wint])+, %%a5, %%acc0\n"
2300 "mac.l %%d2, %%a5, (%[wint])+, %%a5, %%acc0\n"
2301 "mac.l %%d3, %%a5, (%[wint])+, %%a5, %%acc0\n"
2302 "mac.l %%d4, %%a5, (%[wint])+, %%a5, %%acc0\n"
2303 "mac.l %%d5, %%a5, (%[wint])+, %%a5, %%acc0\n"
2304 "mac.l %%d6, %%a5, (%[wint])+, %%a5, %%acc0\n"
2305 "mac.l %%d7, %%a5, (%[wint])+, %%a5, %%acc0\n"
2306 "movem.l (32,%[indat]), %%d0-%%d7\n"
2307 "mac.l %%d0, %%a5, (%[wint])+, %%a5, %%acc0\n"
2308 "mac.l %%d1, %%a5, (%[wint])+, %%a5, %%acc0\n"
2309 "mac.l %%d2, %%a5, (%[wint])+, %%a5, %%acc0\n"
2310 "mac.l %%d3, %%a5, (%[wint])+, %%a5, %%acc0\n"
2311 "mac.l %%d4, %%a5, (%[wint])+, %%a5, %%acc0\n"
2312 "mac.l %%d5, %%a5, (%[wint])+, %%a5, %%acc0\n"
2313 "mac.l %%d6, %%a5, (%[wint])+, %%a5, %%acc0\n"
2314 "mac.l %%d7, %%a5, (%[wint])+, %%a5, %%acc0\n"
2315 "movem.l (64,%[indat]), %%d0-%%d7\n"
2316 "mac.l %%d0, %%a5, (%[wint])+, %%a5, %%acc0\n"
2317 "mac.l %%d1, %%a5, (%[wint])+, %%a5, %%acc0\n"
2318 "mac.l %%d2, %%a5, (%[wint])+, %%a5, %%acc0\n"
2319 "mac.l %%d3, %%a5, (%[wint])+, %%a5, %%acc0\n"
2320 "mac.l %%d4, %%a5, (%[wint])+, %%a5, %%acc0\n"
2321 "mac.l %%d5, %%a5, (%[wint])+, %%a5, %%acc0\n"
2322 "mac.l %%d6, %%a5, (%[wint])+, %%a5, %%acc0\n"
2323 "mac.l %%d7, %%a5, (%[wint])+, %%a5, %%acc0\n"
2324 "movem.l (96,%[indat]), %%d0-%%d7\n"
2325 "mac.l %%d0, %%a5, (%[wint])+, %%a5, %%acc0\n"
2326 "mac.l %%d1, %%a5, (%[wint])+, %%a5, %%acc0\n"
2327 "mac.l %%d2, %%a5, (%[wint])+, %%a5, %%acc0\n"
2328 "mac.l %%d3, %%a5, (%[wint])+, %%a5, %%acc0\n"
2329 "mac.l %%d4, %%a5, (%[wint])+, %%a5, %%acc0\n"
2330 "mac.l %%d5, %%a5, (%[wint])+, %%a5, %%acc0\n"
2331 "mac.l %%d6, %%a5, (%[wint])+, %%a5, %%acc0\n"
2332 "mac.l %%d7, %%a5, (%[wint])+, %%a5, %%acc0\n"
2333 "movem.l (128,%[indat]), %%d0-%%d3\n"
2334 "mac.l %%d0, %%a5, (%[wint])+, %%a5, %%acc0\n"
2335 "mac.l %%d1, %%a5, (%[wint])+, %%a5, %%acc0\n"
2336 "mac.l %%d2, %%a5, (%[wint])+, %%a5, %%acc0\n"
2337 "mac.l %%d3, %%a5, %%acc0\n"
2338 "movclr.l %%acc0, %[tmp]"
2339 : [wint] "+a" (wint), [tmp] "+r" (tmp) : [indat] "a" (indat)
2340 : "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "a5");
2341 }
2342#else
2343 int k;
2344 for(k=36,tmp=0; k--; )
2345 tmp += in[k] * win_int[m][k];
2346#endif
2347 out[m] = (tmp + 16384) >> 15;
2348 }
2349}
2350
2351
2352void mdct_sub_int(int sb_sample[2][3][18][SBLIMIT], int (*mdct_freq)[2][SAMP_PER_FRAME2])
2353{
2354 int (*mdct_enc)[2][32][18] = (int (*)[2][32][18]) mdct_freq;
2355 int ch, gr, band, k, bu, bd;
2356
2357 for(gr=0; gr<2; gr++)
2358 for(ch=cfg.channels; ch--; )
2359 {
2360 /* 576=4*16*9: Compensate for inversion in the analysis filter */
2361 for(band=33; (band-=2)>0; )
2362 for(k=19; (k-=2)>0; )
2363 sb_sample[ch][gr+1][k][band] = -sb_sample[ch][gr+1][k][band];
2364
2365 /* 82944=4*32*648: Perform imdct of 18 previous subband samples + 18 current subband samples */
2366 for(band=32; band--; )
2367 {
2368 for(k=18; k--; )
2369 {
2370 mdct_in[k] = sb_sample[ch][ gr ][k][band];
2371 mdct_in[k+18] = sb_sample[ch][gr+1][k][band];
2372 }
2373
2374 mdct_int(mdct_in, &mdct_enc[gr][ch][band][0]);
2375 }
2376
2377 /* 1024=4*256: Perform aliasing reduction butterfly*/
2378 for(band=31; band--; )
2379 for(k=8; k--; )
2380 {
2381 bu = mdct_enc[gr][ch][band][17-k] * cs_int[k] + mdct_enc[gr][ch][band+1][k] * ca_int[k];
2382 bd = mdct_enc[gr][ch][band+1][k] * cs_int[k] - mdct_enc[gr][ch][band][17-k] * ca_int[k];
2383 mdct_enc[gr][ch][band][17-k] = (bu + 16384) >> 15;
2384 mdct_enc[gr][ch][band+1][k] = (bd + 16384) >> 15;
2385 }
2386 }
2387
2388 /* Save latest granule's subband samples to be used in the next mdct call */
2389 for(ch=cfg.channels ;ch--; )
2390 memcpy(sb_sample[ch][0], sb_sample[ch][2], 18 * 32 * sizeof(int));
2391}
2392
2393void fill_subband(long *buffer, int off)
2394{
2395 long i, t;
2396
2397 /* replace 32 oldest left/right samples with 32 new samples */
2398 if(enc_channels == 2)
2399 {
2400 for(i=32; i--; )
2401 {
2402 t = *buffer++;
2403 x_int0[i+off] = (short)(t >> 16);
2404 x_int1[i+off] = (short)t;
2405 }
2406 }
2407 else
2408 {
2409 for(i=32; i--; )
2410 {
2411 t = *buffer++;
2412 x_int0[i+off] = (short)((((t<<16)>>16) + (t>>16)) >> 1);
2413 }
2414 }
2415}
2416
2417void filter_subband(int s[SBLIMIT], int off, int k)
2418{
2419 short *enwindow = enwindow_int;
2420 int i, tmp = 0;
2421#ifdef CPU_COLDFIRE
2422 int reg_buff[14]; /* register storage buffer */
2423#endif
2424
2425 /* 36864=72*512: shift samples into proper window positions */
2426#ifdef CPU_COLDFIRE
2427 { short *xint = &x_int[k][off];
2428 short *yint = y_int;
2429
2430 asm volatile ("movem.l %%d0/%%d2-%%d7/%%a2-%%a7,%0\n" : "=m" (*(int*)reg_buff));
2431 asm volatile(
2432 "moveq.l #32, %%d0\n"
2433 "move.l %%d0, %[i]\n" /* set loop counter */
2434 "move.l %[xint], %%d0\n" /* d0 = x_int[k] */
2435 "or.l #0x3ff, %%d0\n"
2436 "move.l %%d0, %%mask\n" /* set address mask */
2437 "move.l (%[xint]), %%d4\n" /* d4 = x_int[k][off] */
2438
2439 "loop_start:\n"
2440 "movem.l (%[enwindow]), %%d0-%%d3\n" /* load 4 values */
2441 "mac.w %%d0u, %%d4u, (0x080,%[xint])&, %%d5, %%acc0\n"
2442 "mac.w %%d0l, %%d5u, (0x100,%[xint])&, %%d6, %%acc0\n"
2443 "mac.w %%d1u, %%d6u, (0x180,%[xint])&, %%d7, %%acc0\n"
2444 "mac.w %%d1l, %%d7u, (0x200,%[xint])&, %%a2, %%acc0\n"
2445 "mac.w %%d2u, %%a2u, (0x280,%[xint])&, %%a3, %%acc0\n"
2446 "mac.w %%d2l, %%a3u, (0x300,%[xint])&, %%a4, %%acc0\n"
2447 "mac.w %%d3u, %%a4u, (0x380,%[xint])&, %%a5, %%acc0\n"
2448 "mac.w %%d3l, %%a5u, %%acc0\n"
2449
2450 "movem.l (16,%[enwindow]), %%d0-%%d3\n" /* load 8 values */
2451 "mac.w %%d0u, %%d4l, %%acc1\n"
2452 "mac.w %%d0l, %%d5l, %%acc1\n"
2453 "mac.w %%d1u, %%d6l, %%acc1\n"
2454 "mac.w %%d1l, %%d7l, %%acc1\n"
2455 "mac.w %%d2u, %%a2l, %%acc1\n"
2456 "mac.w %%d2l, %%a3l, %%acc1\n"
2457 "mac.w %%d3u, %%a4l, %%acc1\n"
2458 "addq.l #4, %[xint]\n" /* xint += 2 */
2459 "mac.w %%d3l, %%a5l, (%[xint])&, %%d4, %%acc1\n"
2460
2461 "movclr.l %%acc0, %%d5\n"
2462 "movclr.l %%acc1, %%d6\n"
2463 "move.l #262144, %%d7\n"
2464 "add.l %%d7, %%d5\n"
2465 "add.l %%d7, %%d6\n"
2466 "moveq.l #19, %%d7\n"
2467 "asr.l %%d7, %%d5\n"
2468 "asr.l %%d7, %%d6\n"
2469 "move.w %%d5, (%[yint])+\n"
2470 "move.w %%d6, (%[yint])+\n"
2471
2472 "add.l #32, %[enwindow]\n" /* enwindow += 16 */
2473
2474 "sub.l #1, %[i]\n"
2475 "jbne loop_start\n"
2476
2477 : [xint] "+a" (xint), [yint] "+a" (yint), [i] "+m" (i)
2478 : [enwindow] "a" (enwindow)
2479 : "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "a2", "a3", "a4", "a5");
2480
2481 asm volatile ("movem.l %0,%%d0/%%d2-%%d7/%%a2-%%a7\n" : : "m" (*(int*)reg_buff));
2482 }
2483#else
2484 for(i=0; i<64; i++)
2485 {
2486 for(j=0, tmp=0; j<512; j+=64)
2487 tmp += (int)x_int[k][(i+j+off)&(HAN_SIZE-1)] * (int)*(enwindow++);
2488 y_int[i] = (short)((tmp + (1<<18)) >> 19);
2489 }
2490#endif
2491
2492 /* 147456=72*2048 */
2493 for(i=SBLIMIT; i--; ) // SBLIMIT: 32
2494 {
2495 short *filt = filter_int[i];
2496
2497#ifdef CPU_COLDFIRE
2498 {
2499 asm volatile(
2500 "move.l (%[yint])+, %%a5\n"
2501 "movem.l (%[filt]), %%d0-%%d7\n"
2502 "mac.w %%d0u, %%a5u, %%acc0\n"
2503 "mac.w %%d0l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2504 "mac.w %%d1u, %%a5u, %%acc0\n"
2505 "mac.w %%d1l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2506 "mac.w %%d2u, %%a5u, %%acc0\n"
2507 "mac.w %%d2l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2508 "mac.w %%d3u, %%a5u, %%acc0\n"
2509 "mac.w %%d3l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2510 "mac.w %%d4u, %%a5u, %%acc0\n"
2511 "mac.w %%d4l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2512 "mac.w %%d5u, %%a5u, %%acc0\n"
2513 "mac.w %%d5l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2514 "mac.w %%d6u, %%a5u, %%acc0\n"
2515 "mac.w %%d6l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2516 "mac.w %%d7u, %%a5u, %%acc0\n"
2517 "mac.w %%d7l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2518 "movem.l (32,%[filt]), %%d0-%%d7\n"
2519 "mac.w %%d0u, %%a5u, %%acc0\n"
2520 "mac.w %%d0l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2521 "mac.w %%d1u, %%a5u, %%acc0\n"
2522 "mac.w %%d1l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2523 "mac.w %%d2u, %%a5u, %%acc0\n"
2524 "mac.w %%d2l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2525 "mac.w %%d3u, %%a5u, %%acc0\n"
2526 "mac.w %%d3l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2527 "mac.w %%d4u, %%a5u, %%acc0\n"
2528 "mac.w %%d4l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2529 "mac.w %%d5u, %%a5u, %%acc0\n"
2530 "mac.w %%d5l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2531 "mac.w %%d6u, %%a5u, %%acc0\n"
2532 "mac.w %%d6l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2533 "mac.w %%d7u, %%a5u, %%acc0\n"
2534 "mac.w %%d7l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2535 "movem.l (64,%[filt]), %%d0-%%d7\n"
2536 "mac.w %%d0u, %%a5u, %%acc0\n"
2537 "mac.w %%d0l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2538 "mac.w %%d1u, %%a5u, %%acc0\n"
2539 "mac.w %%d1l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2540 "mac.w %%d2u, %%a5u, %%acc0\n"
2541 "mac.w %%d2l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2542 "mac.w %%d3u, %%a5u, %%acc0\n"
2543 "mac.w %%d3l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2544 "mac.w %%d4u, %%a5u, %%acc0\n"
2545 "mac.w %%d4l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2546 "mac.w %%d5u, %%a5u, %%acc0\n"
2547 "mac.w %%d5l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2548 "mac.w %%d6u, %%a5u, %%acc0\n"
2549 "mac.w %%d6l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2550 "mac.w %%d7u, %%a5u, %%acc0\n"
2551 "mac.w %%d7l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2552 "movem.l (96,%[filt]), %%d0-%%d7\n"
2553 "mac.w %%d0u, %%a5u, %%acc0\n"
2554 "mac.w %%d0l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2555 "mac.w %%d1u, %%a5u, %%acc0\n"
2556 "mac.w %%d1l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2557 "mac.w %%d2u, %%a5u, %%acc0\n"
2558 "mac.w %%d2l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2559 "mac.w %%d3u, %%a5u, %%acc0\n"
2560 "mac.w %%d3l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2561 "mac.w %%d4u, %%a5u, %%acc0\n"
2562 "mac.w %%d4l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2563 "mac.w %%d5u, %%a5u, %%acc0\n"
2564 "mac.w %%d5l, %%a5l, (%[yint])+, %%a5, %%acc0\n"
2565 "mac.w %%d6u, %%a5u, %%acc0\n"
2566 "mac.w %%d6l, %%a5l, (%[yint]) , %%a5, %%acc0\n"
2567 "mac.w %%d7u, %%a5u, %%acc0\n"
2568 "mac.w %%d7l, %%a5l, %%acc0\n"
2569 "lea.l (-31*4, %[yint]), %[yint]\n" /* wrap yint back to start */
2570 "movclr.l %%acc0, %[tmp]"
2571 : [tmp] "=r" (tmp) : [filt] "a" (filt), [yint] "a" (y_int)
2572 : "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "a5" );
2573 }
2574#else
2575 for(j=64, tmp=0; j--; )
2576 tmp += (long)filt[j] * (long)y_int[j];
2577#endif
2578 s[i] = (tmp + 16384) >> 15;
2579 }
2580}
2581
2582static int find_bitrate_index(int bitrate)
2583{
2584 static long mpeg1[15] = {0,32,40,48,56,64,80,96,112,128,160,192,224,256,320};
2585 int i;
2586
2587 for(i=0; i<15; i++)
2588 if(bitrate == mpeg1[i])
2589 return i;
2590
2591 return -1;
2592}
2593
2594static int find_samplerate_index(long freq)
2595{
2596 static long mpeg1[3] = {44100, 48000, 32000};
2597 int i;
2598
2599 for(i=0; i<3; i++)
2600 if(freq == mpeg1[i])
2601 return i;
2602
2603 return -1;
2604}
2605
2606void init_mp3_encoder_engine(bool stereo, int quality)
2607{
2608 /* keep in sync with rec_quality_info_afmt in id3.h/.c */
2609 static int bitr_s[9] = { 64, 96, 128, 160, 192, 224, 320, 64, 64 };
2610 static int bitr_m[9] = { 64, 96, 128, 160, 160, 160, 160, 64, 64 };
2611 uint32 avg_byte_per_frame;
2612
2613 cfg.byte_order = order_bigEndian;
2614 cfg.mpg.type = 1;
2615 cfg.samplerate = 44100;
2616 cfg.channels = stereo ? 2 : 1;
2617 cfg.mpg.mode = stereo ? 0 : 3; /* 0=stereo, 3=mono */
2618 cfg.mpg.bitrate = stereo ? bitr_s[quality] : bitr_m[quality];
2619 cfg.mpg.bitrate_index = find_bitrate_index(cfg.mpg.bitrate);
2620 cfg.mpg.smprate_index = find_samplerate_index(cfg.samplerate);
2621
2622 memset(x_int0 , 0 , sizeof(x_int0 ));
2623 memset(x_int1 , 0 , sizeof(x_int1 ));
2624 memset(y_int , 0 , sizeof(y_int ));
2625 memset(mdct_freq , 0 , sizeof(mdct_freq ));
2626 memset(enc_data , 0 , sizeof(enc_data ));
2627 memset(mdct_in , 0 , sizeof(mdct_in ));
2628 memset(sb_sample , 0 , sizeof(sb_sample ));
2629 memset(&CodedData , 0 , sizeof(CodedData ));
2630 memcpy(scalefac, sfBand[cfg.mpg.smprate_index + 3*cfg.mpg.type], sizeof(scalefac));
2631 memcpy(ca_int , ca_int_const , sizeof(ca_int ));
2632 memcpy(cs_int , cs_int_const , sizeof(cs_int ));
2633 memcpy(win_int , win_int_const , sizeof(win_int ));
2634 memcpy(filter_int , filter_int_const , sizeof(filter_int ));
2635 memcpy(enwindow_int, enwindow_int_const, sizeof(enwindow_int));
2636 memcpy(int2idx , int2idx_const , sizeof(int2idx ));
2637 memcpy(ht_count1 , ht_count1_const , sizeof(ht_count1 ));
2638 memcpy( t1HB , t1HB_const , sizeof(t1HB ));
2639 memcpy( t2HB , t2HB_const , sizeof(t2HB ));
2640 memcpy( t3HB , t3HB_const , sizeof(t3HB ));
2641 memcpy( t5HB , t5HB_const , sizeof(t5HB ));
2642 memcpy( t6HB , t6HB_const , sizeof(t6HB ));
2643 memcpy( t7HB , t7HB_const , sizeof(t7HB ));
2644 memcpy( t8HB , t8HB_const , sizeof(t8HB ));
2645 memcpy( t9HB , t9HB_const , sizeof(t9HB ));
2646 memcpy(t10HB , t10HB_const , sizeof(t10HB ));
2647 memcpy(t11HB , t11HB_const , sizeof(t11HB ));
2648 memcpy(t12HB , t12HB_const , sizeof(t12HB ));
2649 memcpy(t13HB , t13HB_const , sizeof(t13HB ));
2650 memcpy(t15HB , t15HB_const , sizeof(t15HB ));
2651 memcpy(t16HB , t16HB_const , sizeof(t16HB ));
2652 memcpy(t24HB , t24HB_const , sizeof(t24HB ));
2653 memcpy( t1l , t1l_const , sizeof(t1l ));
2654 memcpy( t2l , t2l_const , sizeof(t2l ));
2655 memcpy( t3l , t3l_const , sizeof(t3l ));
2656 memcpy( t5l , t5l_const , sizeof(t5l ));
2657 memcpy( t6l , t6l_const , sizeof(t6l ));
2658 memcpy( t7l , t7l_const , sizeof(t7l ));
2659 memcpy( t8l , t8l_const , sizeof(t8l ));
2660 memcpy( t9l , t9l_const , sizeof(t9l ));
2661 memcpy(t10l , t10l_const , sizeof(t10l ));
2662 memcpy(t11l , t11l_const , sizeof(t11l ));
2663 memcpy(t12l , t12l_const , sizeof(t12l ));
2664 memcpy(t13l , t13l_const , sizeof(t13l ));
2665 memcpy(t15l , t15l_const , sizeof(t15l ));
2666 memcpy(t16l , t16l_const , sizeof(t16l ));
2667 memcpy(t24l , t24l_const , sizeof(t24l ));
2668 memcpy(ht , ht_const , sizeof(ht ));
2669
2670 /* I don't know, wether this is really necessary */
2671 ht[ 0].table = NULL; ht[ 0].hlen = NULL;// Apparently not used
2672 ht[ 1].table = t1HB; ht[ 1].hlen = t1l;
2673 ht[ 2].table = t2HB; ht[ 2].hlen = t2l;
2674 ht[ 3].table = t3HB; ht[ 3].hlen = t3l;
2675 ht[ 4].table = NULL; ht[ 4].hlen = NULL;// Apparently not used
2676 ht[ 5].table = t5HB; ht[ 5].hlen = t5l;
2677 ht[ 6].table = t6HB; ht[ 6].hlen = t6l;
2678 ht[ 7].table = t7HB; ht[ 7].hlen = t7l;
2679 ht[ 8].table = t8HB; ht[ 8].hlen = t8l;
2680 ht[ 9].table = t9HB; ht[ 9].hlen = t9l;
2681 ht[10].table = t10HB; ht[10].hlen = t10l;
2682 ht[11].table = t11HB; ht[11].hlen = t11l;
2683 ht[12].table = t12HB; ht[12].hlen = t12l;
2684 ht[13].table = t13HB; ht[13].hlen = t13l;
2685 ht[14].table = NULL; ht[14].hlen = NULL;// Apparently not used
2686 ht[15].table = t15HB; ht[15].hlen = t15l;
2687 ht[16].table = t16HB; ht[16].hlen = t16l;
2688 ht[17].table = t16HB; ht[17].hlen = t16l;
2689 ht[18].table = t16HB; ht[18].hlen = t16l;
2690 ht[19].table = t16HB; ht[19].hlen = t16l;
2691 ht[20].table = t16HB; ht[20].hlen = t16l;
2692 ht[21].table = t16HB; ht[21].hlen = t16l;
2693 ht[22].table = t16HB; ht[22].hlen = t16l;
2694 ht[23].table = t16HB; ht[23].hlen = t16l;
2695 ht[24].table = t24HB; ht[24].hlen = t24l;
2696 ht[25].table = t24HB; ht[25].hlen = t24l;
2697 ht[26].table = t24HB; ht[26].hlen = t24l;
2698 ht[27].table = t24HB; ht[27].hlen = t24l;
2699 ht[28].table = t24HB; ht[28].hlen = t24l;
2700 ht[29].table = t24HB; ht[29].hlen = t24l;
2701 ht[30].table = t24HB; ht[30].hlen = t24l;
2702 ht[31].table = t24HB; ht[31].hlen = t24l;
2703
2704 x_int[0] = x_int0;
2705 x_int[1] = x_int1;
2706
2707#ifndef SIMULATOR
2708 if(((long)x_int0 | (long)x_int1) & 0x7ff)
2709 return; /* both arrays must be aligned to 0x800 boundary */
2710#endif
2711
2712 if(cfg.channels == 1)
2713 cfg.sideinfo_len = 32 + 136;
2714 else
2715 cfg.sideinfo_len = 32 + 256;
2716
2717 /* Set initial step size */
2718 cfg.cod_info[0][0].quantizerStepSize = 0x10;
2719 cfg.cod_info[0][1].quantizerStepSize = 0x10;
2720 cfg.cod_info[1][0].quantizerStepSize = 0x10;
2721 cfg.cod_info[1][1].quantizerStepSize = 0x10;
2722
2723 /* Figure average number of 'byte' per frame. */
2724 avg_byte_per_frame = (uint32)(SAMP_PER_FRAME * 8000 * cfg.mpg.bitrate) / cfg.samplerate;
2725 cfg.byte_per_frame = avg_byte_per_frame / 64;
2726 cfg.frac_per_frame = avg_byte_per_frame % 64;
2727 cfg.slot_lag = 0;
2728}
2729
2730/* this is the codec entry point */
2731enum codec_status codec_start(struct codec_api* api)
2732{
2733 int i, off=0, gr, channel;
2734 long *buffer;
2735 int chunk_size, num_chunks;
2736 int enc_buffer_size;
2737 int enc_quality;
2738 uint32 *mp3_chunk_ptr;
2739 bool cpu_boosted = true; /* start boosted */
2740
2741 /* Generic codec initialisation */
2742 ci = api;
2743
2744 if(ci->enc_get_inputs == NULL ||
2745 ci->enc_set_parameters == NULL ||
2746 ci->enc_alloc_chunk == NULL ||
2747 ci->enc_free_chunk == NULL ||
2748 ci->enc_wavbuf_near_empty == NULL ||
2749 ci->enc_get_wav_data == NULL ||
2750 ci->enc_set_header_callback == NULL )
2751 return CODEC_ERROR;
2752
2753 ci->cpu_boost(true);
2754
2755 *ci->enc_set_header_callback = NULL;
2756 ci->enc_get_inputs(&enc_buffer_size, &enc_channels, &enc_quality);
2757
2758 init_mp3_encoder_engine(enc_channels == 2, enc_quality);
2759
2760 /* must be 4byte aligned */
2761 chunk_size = (sizeof(long) + cfg.byte_per_frame + 1 + 3) & ~3;
2762 num_chunks = enc_buffer_size / chunk_size;
2763
2764 /* inform the main program about the buffer dimensions */
2765 ci->enc_set_parameters(chunk_size, num_chunks, SAMP_PER_FRAME,
2766 NULL, 0, AFMT_MPA_L3);
2767
2768#ifdef CPU_COLDFIRE
2769 asm volatile ("move.l #0, %macsr"); /* integer mode */
2770#endif
2771
2772 /* main application waits for this flag during encoder loading */
2773 ci->enc_codec_loaded = true;
2774
2775 /* main encoding loop */
2776 while(!ci->stop_codec)
2777 {
2778 while((buffer = (long*)ci->enc_get_wav_data(SAMP_PER_FRAME*4)) != NULL)
2779 {
2780 if(ci->stop_codec)
2781 break;
2782
2783 if(ci->enc_wavbuf_near_empty() == 0)
2784 {
2785 if(!cpu_boosted)
2786 {
2787 ci->cpu_boost(true);
2788 cpu_boosted = true;
2789 }
2790 }
2791
2792 /* encode one mp3 frame in this loop */
2793 CodedData.bitpos = 0;
2794 memset(CodedData.bbuf, 0, sizeof(CodedData.bbuf));
2795
2796 if((cfg.slot_lag += cfg.frac_per_frame) >= 64)
2797 { /* Padding for this frame */
2798 cfg.slot_lag -= 64;
2799 cfg.mpg.padding = 1;
2800 }
2801 else
2802 cfg.mpg.padding = 0;
2803
2804 cfg.mpg.bits_per_frame = 8 * (cfg.byte_per_frame + cfg.mpg.padding);
2805 cfg.mean_bits = (cfg.mpg.bits_per_frame - cfg.sideinfo_len) >> 1;
2806
2807 /* polyphase filtering */
2808 for(gr=0; gr<2; gr++)
2809 {
2810 for(i=0; i<18; i++)
2811 {
2812 fill_subband(buffer, off);
2813
2814 for(channel=cfg.channels; channel--; )
2815 filter_subband(&sb_sample[channel][gr+1][i][0], off, channel);
2816
2817 buffer += 32;
2818 off = (off + 480) & (HAN_SIZE-1); /* offset is modulo HAN_SIZE */
2819 }
2820 }
2821
2822 mdct_sub_int(sb_sample, mdct_freq);
2823
2824 /* bit and noise allocation */
2825 iteration_loop(mdct_freq, cfg.cod_info, cfg.mean_bits);
2826
2827 /* write the frame to the bitstream */
2828 format_bitstream(enc_data, cfg.cod_info, mdct_freq);
2829
2830 /* allocate mp3 chunk, set chunk size, copy chunk to enc_buffer */
2831 mp3_chunk_ptr = (uint32*)ci->enc_alloc_chunk();
2832 mp3_chunk_ptr[0] = (CodedData.bitpos + 7) >> 3;
2833 memcpy(&mp3_chunk_ptr[1], CodedData.bbuf, mp3_chunk_ptr[0]);
2834 ci->enc_free_chunk();
2835 ci->yield();
2836 }
2837
2838 if(ci->enc_wavbuf_near_empty())
2839 {
2840 if(cpu_boosted)
2841 {
2842 ci->cpu_boost(false);
2843 cpu_boosted = false;
2844 }
2845 }
2846 ci->yield();
2847 }
2848
2849 if(cpu_boosted) /* set initial boost state */
2850 ci->cpu_boost(false);
2851
2852 /* reset parameters to initial state */
2853 ci->enc_set_parameters(0, 0, 0, 0, 0, 0);
2854
2855 /* main application waits for this flag during encoder removing */
2856 ci->enc_codec_loaded = false;
2857
2858 return CODEC_OK;
2859}
2860#endif