annotate tremor/lsp_lookup.h @ 33307:552f1f7731c8

Set GUI initialization flag earlier. So far, the flag is set after the call of guiInit(), but there are calls to GUI functions (like reading the GUI config) before that. As MPlayer (when exiting) only calls GUI's cleanup function guiDone() if the flag is set, it neglects calling guiDone() on any error between the first GUI function call and execution of guiInit(). Now the flag is set before the first GUI function call. As a result, GUI's own exit function (also used for fatal GUI errors, and thus also for errors occurring before guiInit() properly finishes) doesn't have to handle cleanup any longer. The code can be moved to guiDone().
author ib
date Sat, 07 May 2011 15:30:14 +0000
parents cd6b211be811
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14280
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
1 /********************************************************************
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
2 * *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
3 * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
4 * *
19251
cd6b211be811 Replace tremor files that had old headers saying "ALL REDISTRIBUTION
uau
parents: 14280
diff changeset
5 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
cd6b211be811 Replace tremor files that had old headers saying "ALL REDISTRIBUTION
uau
parents: 14280
diff changeset
6 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
cd6b211be811 Replace tremor files that had old headers saying "ALL REDISTRIBUTION
uau
parents: 14280
diff changeset
7 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
cd6b211be811 Replace tremor files that had old headers saying "ALL REDISTRIBUTION
uau
parents: 14280
diff changeset
8 * *
14280
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
9 * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
10 * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
11 * *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
12 ********************************************************************
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
13
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
14 function: lookup data
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
15
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
16 ********************************************************************/
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
17
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
18 #ifndef _V_LOOKUP_DATA_H_
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
19 #define _V_LOOKUP_DATA_H_
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
20
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
21 #include "os_types.h"
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
22
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
23 #define FROMdB_LOOKUP_SZ 35
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
24 #define FROMdB2_LOOKUP_SZ 32
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
25 #define FROMdB_SHIFT 5
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
26 #define FROMdB2_SHIFT 3
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
27 #define FROMdB2_MASK 31
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
28
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
29 static ogg_int32_t FROMdB_LOOKUP[FROMdB_LOOKUP_SZ]={
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
30 0x003fffff, 0x0028619b, 0x00197a96, 0x0010137a,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
31 0x000a24b0, 0x00066666, 0x000409c3, 0x00028c42,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
32 0x00019b8c, 0x000103ab, 0x0000a3d7, 0x00006760,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
33 0x0000413a, 0x00002928, 0x000019f8, 0x00001062,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
34 0x00000a56, 0x00000686, 0x0000041e, 0x00000299,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
35 0x000001a3, 0x00000109, 0x000000a7, 0x00000069,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
36 0x00000042, 0x0000002a, 0x0000001a, 0x00000011,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
37 0x0000000b, 0x00000007, 0x00000004, 0x00000003,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
38 0x00000002, 0x00000001, 0x00000001};
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
39
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
40 static ogg_int32_t FROMdB2_LOOKUP[FROMdB2_LOOKUP_SZ]={
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
41 0x000001fc, 0x000001f5, 0x000001ee, 0x000001e7,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
42 0x000001e0, 0x000001d9, 0x000001d2, 0x000001cc,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
43 0x000001c5, 0x000001bf, 0x000001b8, 0x000001b2,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
44 0x000001ac, 0x000001a6, 0x000001a0, 0x0000019a,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
45 0x00000194, 0x0000018e, 0x00000188, 0x00000183,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
46 0x0000017d, 0x00000178, 0x00000172, 0x0000016d,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
47 0x00000168, 0x00000163, 0x0000015e, 0x00000159,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
48 0x00000154, 0x0000014f, 0x0000014a, 0x00000145,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
49 };
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
50
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
51 #define INVSQ_LOOKUP_I_SHIFT 10
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
52 #define INVSQ_LOOKUP_I_MASK 1023
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
53 static long INVSQ_LOOKUP_I[64+1]={
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
54 92682, 91966, 91267, 90583,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
55 89915, 89261, 88621, 87995,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
56 87381, 86781, 86192, 85616,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
57 85051, 84497, 83953, 83420,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
58 82897, 82384, 81880, 81385,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
59 80899, 80422, 79953, 79492,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
60 79039, 78594, 78156, 77726,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
61 77302, 76885, 76475, 76072,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
62 75674, 75283, 74898, 74519,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
63 74146, 73778, 73415, 73058,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
64 72706, 72359, 72016, 71679,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
65 71347, 71019, 70695, 70376,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
66 70061, 69750, 69444, 69141,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
67 68842, 68548, 68256, 67969,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
68 67685, 67405, 67128, 66855,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
69 66585, 66318, 66054, 65794,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
70 65536,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
71 };
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
72
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
73 static long INVSQ_LOOKUP_IDel[64]={
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
74 716, 699, 684, 668,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
75 654, 640, 626, 614,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
76 600, 589, 576, 565,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
77 554, 544, 533, 523,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
78 513, 504, 495, 486,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
79 477, 469, 461, 453,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
80 445, 438, 430, 424,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
81 417, 410, 403, 398,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
82 391, 385, 379, 373,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
83 368, 363, 357, 352,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
84 347, 343, 337, 332,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
85 328, 324, 319, 315,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
86 311, 306, 303, 299,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
87 294, 292, 287, 284,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
88 280, 277, 273, 270,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
89 267, 264, 260, 258,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
90 };
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
91
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
92 #define COS_LOOKUP_I_SHIFT 9
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
93 #define COS_LOOKUP_I_MASK 511
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
94 #define COS_LOOKUP_I_SZ 128
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
95 static ogg_int32_t COS_LOOKUP_I[COS_LOOKUP_I_SZ+1]={
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
96 16384, 16379, 16364, 16340,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
97 16305, 16261, 16207, 16143,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
98 16069, 15986, 15893, 15791,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
99 15679, 15557, 15426, 15286,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
100 15137, 14978, 14811, 14635,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
101 14449, 14256, 14053, 13842,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
102 13623, 13395, 13160, 12916,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
103 12665, 12406, 12140, 11866,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
104 11585, 11297, 11003, 10702,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
105 10394, 10080, 9760, 9434,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
106 9102, 8765, 8423, 8076,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
107 7723, 7366, 7005, 6639,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
108 6270, 5897, 5520, 5139,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
109 4756, 4370, 3981, 3590,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
110 3196, 2801, 2404, 2006,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
111 1606, 1205, 804, 402,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
112 0, -401, -803, -1204,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
113 -1605, -2005, -2403, -2800,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
114 -3195, -3589, -3980, -4369,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
115 -4755, -5138, -5519, -5896,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
116 -6269, -6638, -7004, -7365,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
117 -7722, -8075, -8422, -8764,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
118 -9101, -9433, -9759, -10079,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
119 -10393, -10701, -11002, -11296,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
120 -11584, -11865, -12139, -12405,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
121 -12664, -12915, -13159, -13394,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
122 -13622, -13841, -14052, -14255,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
123 -14448, -14634, -14810, -14977,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
124 -15136, -15285, -15425, -15556,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
125 -15678, -15790, -15892, -15985,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
126 -16068, -16142, -16206, -16260,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
127 -16304, -16339, -16363, -16378,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
128 -16383,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
129 };
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
130
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
131 #endif
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
132
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
133
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
134
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
135
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
136