History

aacsbr: constify the only SBR table

Lynne committed 2 years ago

Commit 176c9221 parent 03cf1012 files · +163 −11Browse files

Unified · Split

2 files
  1. libavcodec/aacsbr_template.c +0 −10
  2. libavcodec/aacsbrdata.h +163 −1
libavcodec/aacsbr_template.c+0−10
@@ -49,18 +49,8 @@ static inline SpectralBandReplication *get_sbr(ChannelElement *ch) · 48 unmodified lines
49 return &((ExtChannelElement*)ch)->sbr;49 return &((ExtChannelElement*)ch)->sbr;
50}50}
51 51
52static av_cold void aacsbr_tableinit(void)
53{
54 int n;
55
56 for (n = 0; n < 320; n++)
57 sbr_qmf_window_ds[n] = sbr_qmf_window_us[2*n];
58}
59
60av_cold void AAC_RENAME(ff_aac_sbr_init)(void)52av_cold void AAC_RENAME(ff_aac_sbr_init)(void)
61{53{
62 aacsbr_tableinit();
63
64 AAC_RENAME(ff_ps_init)();54 AAC_RENAME(ff_ps_init)();
65}55}
66 56
libavcodec/aacsbrdata.h+163−1
@@ -42,7 +42,169 @@ static const int8_t sbr_offset[6][16] = { · 41 unmodified lines
42};42};
43 43
44///< window coefficients for analysis/synthesis QMF banks44///< window coefficients for analysis/synthesis QMF banks
45static DECLARE_ALIGNED(32, INTFLOAT, sbr_qmf_window_ds)[320];45static const DECLARE_ALIGNED(32, INTFLOAT, sbr_qmf_window_ds)[320] = {
46 Q31( 0.0000000000f), Q31(-0.0005617692f),
47 Q31(-0.0004875227f), Q31(-0.0005040714f),
48 Q31(-0.0005466565f), Q31(-0.0005870930f),
49 Q31(-0.0006312493f), Q31(-0.0006777690f),
50 Q31(-0.0007157736f), Q31(-0.0007440941f),
51 Q31(-0.0007681371f), Q31(-0.0007834332f),
52 Q31(-0.0007803664f), Q31(-0.0007757977f),
53 Q31(-0.0007530001f), Q31(-0.0007215391f),
54 Q31(-0.0006650415f), Q31(-0.0005946118f),
55 Q31(-0.0005145572f), Q31(-0.0004095121f),
56 Q31(-0.0002896981f), Q31(-0.0001446380f),
57 Q31( 0.0000134949f), Q31( 0.0002043017f),
58 Q31( 0.0004026540f), Q31( 0.0006239376f),
59 Q31( 0.0008608443f), Q31( 0.0011250155f),
60 Q31( 0.0013902494f), Q31( 0.0016868083f),
61 Q31( 0.0019841140f), Q31( 0.0023017254f),
62 Q31( 0.0026201758f), Q31( 0.0029469447f),
63 Q31( 0.0032739613f), Q31( 0.0036008268f),
64 Q31( 0.0039207432f), Q31( 0.0042264269f),
65 Q31( 0.0045209852f), Q31( 0.0047932560f),
66 Q31( 0.0050393022f), Q31( 0.0052461166f),
67 Q31( 0.0054196775f), Q31( 0.0055475714f),
68 Q31( 0.0056220643f), Q31( 0.0056389199f),
69 Q31( 0.0055917128f), Q31( 0.0054753783f),
70 Q31( 0.0052715758f), Q31( 0.0049839687f),
71 Q31( 0.0046039530f), Q31( 0.0041251642f),
72 Q31( 0.0035401246f), Q31( 0.0028446757f),
73 Q31( 0.0020274176f), Q31( 0.0010902329f),
74 Q31( 0.0000276045f), Q31(-0.0011568135f),
75 Q31(-0.0024826723f), Q31(-0.0039401124f),
76 Q31(-0.0055337211f), Q31(-0.0072615816f),
77 Q31(-0.0091325329f), Q31(-0.0111315548f),
78 Q31( 0.0132718220f), Q31( 0.0155405553f),
79 Q31( 0.0179433381f), Q31( 0.0204531793f),
80 Q31( 0.0230680169f), Q31( 0.0257875847f),
81 Q31( 0.0286072173f), Q31( 0.0315017608f),
82 Q31( 0.0344620948f), Q31( 0.0374812850f),
83 Q31( 0.0405349170f), Q31( 0.0436097542f),
84 Q31( 0.0466843027f), Q31( 0.0497385755f),
85 Q31( 0.0527630746f), Q31( 0.0557173648f),
86 Q31( 0.0585915683f), Q31( 0.0613455171f),
87 Q31( 0.0639715898f), Q31( 0.0664367512f),
88 Q31( 0.0687043828f), Q31( 0.0707628710f),
89 Q31( 0.0725682583f), Q31( 0.0741003642f),
90 Q31( 0.0753137336f), Q31( 0.0761992479f),
91 Q31( 0.0767093490f), Q31( 0.0768230011f),
92 Q31( 0.0765050718f), Q31( 0.0757305756f),
93 Q31( 0.0744664394f), Q31( 0.0726774642f),
94 Q31( 0.0703533073f), Q31( 0.0674525021f),
95 Q31( 0.0639444805f), Q31( 0.0598166570f),
96 Q31( 0.0550460034f), Q31( 0.0495978676f),
97 Q31( 0.0434768782f), Q31( 0.0366418116f),
98 Q31( 0.0290824006f), Q31( 0.0207997072f),
99 Q31( 0.0117623832f), Q31( 0.0019765601f),
100 Q31(-0.0085711749f), Q31(-0.0198834129f),
101 Q31(-0.0319531274f), Q31(-0.0447806821f),
102 Q31(-0.0583705326f), Q31(-0.0726943300f),
103 Q31(-0.0877547536f), Q31(-0.1035329531f),
104 Q31(-0.1200077984f), Q31(-0.1371551761f),
105 Q31(-0.1549607071f), Q31(-0.1733808172f),
106 Q31(-0.1923966745f), Q31(-0.2119735853f),
107 Q31(-0.2320690870f), Q31(-0.2526480309f),
108 Q31(-0.2736634040f), Q31(-0.2950716717f),
109 Q31(-0.3168278913f), Q31(-0.3388722693f),
110 Q31( 0.3611589903f), Q31( 0.3836350013f),
111 Q31( 0.4062317676f), Q31( 0.4289119920f),
112 Q31( 0.4515996535f), Q31( 0.4742453214f),
113 Q31( 0.4967708254f), Q31( 0.5191234970f),
114 Q31( 0.5412553448f), Q31( 0.5630789140f),
115 Q31( 0.5845403235f), Q31( 0.6055783538f),
116 Q31( 0.6261242695f), Q31( 0.6461269695f),
117 Q31( 0.6655139880f), Q31( 0.6842353293f),
118 Q31( 0.7022388719f), Q31( 0.7194462634f),
119 Q31( 0.7358211758f), Q31( 0.7513137456f),
120 Q31( 0.7658674865f), Q31( 0.7794287519f),
121 Q31( 0.7919735841f), Q31( 0.8034485751f),
122 Q31( 0.8138191270f), Q31( 0.8230419890f),
123 Q31( 0.8311038457f), Q31( 0.8379717337f),
124 Q31( 0.8436238281f), Q31( 0.8480315777f),
125 Q31( 0.8511971524f), Q31( 0.8531020949f),
126 Q31( 0.8537385600f), Q31( 0.8531020949f),
127 Q31( 0.8511971524f), Q31( 0.8480315777f),
128 Q31( 0.8436238281f), Q31( 0.8379717337f),
129 Q31( 0.8311038457f), Q31( 0.8230419890f),
130 Q31( 0.8138191270f), Q31( 0.8034485751f),
131 Q31( 0.7919735841f), Q31( 0.7794287519f),
132 Q31( 0.7658674865f), Q31( 0.7513137456f),
133 Q31( 0.7358211758f), Q31( 0.7194462634f),
134 Q31( 0.7022388719f), Q31( 0.6842353293f),
135 Q31( 0.6655139880f), Q31( 0.6461269695f),
136 Q31( 0.6261242695f), Q31( 0.6055783538f),
137 Q31( 0.5845403235f), Q31( 0.5630789140f),
138 Q31( 0.5412553448f), Q31( 0.5191234970f),
139 Q31( 0.4967708254f), Q31( 0.4742453214f),
140 Q31( 0.4515996535f), Q31( 0.4289119920f),
141 Q31( 0.4062317676f), Q31( 0.3836350013f),
142 -Q31( 0.3611589903f), Q31(-0.3388722693f),
143 Q31(-0.3168278913f), Q31(-0.2950716717f),
144 Q31(-0.2736634040f), Q31(-0.2526480309f),
145 Q31(-0.2320690870f), Q31(-0.2119735853f),
146 Q31(-0.1923966745f), Q31(-0.1733808172f),
147 Q31(-0.1549607071f), Q31(-0.1371551761f),
148 Q31(-0.1200077984f), Q31(-0.1035329531f),
149 Q31(-0.0877547536f), Q31(-0.0726943300f),
150 Q31(-0.0583705326f), Q31(-0.0447806821f),
151 Q31(-0.0319531274f), Q31(-0.0198834129f),
152 Q31(-0.0085711749f), Q31( 0.0019765601f),
153 Q31( 0.0117623832f), Q31( 0.0207997072f),
154 Q31( 0.0290824006f), Q31( 0.0366418116f),
155 Q31( 0.0434768782f), Q31( 0.0495978676f),
156 Q31( 0.0550460034f), Q31( 0.0598166570f),
157 Q31( 0.0639444805f), Q31( 0.0674525021f),
158 Q31( 0.0703533073f), Q31( 0.0726774642f),
159 Q31( 0.0744664394f), Q31( 0.0757305756f),
160 Q31( 0.0765050718f), Q31( 0.0768230011f),
161 Q31( 0.0767093490f), Q31( 0.0761992479f),
162 Q31( 0.0753137336f), Q31( 0.0741003642f),
163 Q31( 0.0725682583f), Q31( 0.0707628710f),
164 Q31( 0.0687043828f), Q31( 0.0664367512f),
165 Q31( 0.0639715898f), Q31( 0.0613455171f),
166 Q31( 0.0585915683f), Q31( 0.0557173648f),
167 Q31( 0.0527630746f), Q31( 0.0497385755f),
168 Q31( 0.0466843027f), Q31( 0.0436097542f),
169 Q31( 0.0405349170f), Q31( 0.0374812850f),
170 Q31( 0.0344620948f), Q31( 0.0315017608f),
171 Q31( 0.0286072173f), Q31( 0.0257875847f),
172 Q31( 0.0230680169f), Q31( 0.0204531793f),
173 Q31( 0.0179433381f), Q31( 0.0155405553f),
174 -Q31( 0.0132718220f), Q31(-0.0111315548f),
175 Q31(-0.0091325329f), Q31(-0.0072615816f),
176 Q31(-0.0055337211f), Q31(-0.0039401124f),
177 Q31(-0.0024826723f), Q31(-0.0011568135f),
178 Q31( 0.0000276045f), Q31( 0.0010902329f),
179 Q31( 0.0020274176f), Q31( 0.0028446757f),
180 Q31( 0.0035401246f), Q31( 0.0041251642f),
181 Q31( 0.0046039530f), Q31( 0.0049839687f),
182 Q31( 0.0052715758f), Q31( 0.0054753783f),
183 Q31( 0.0055917128f), Q31( 0.0056389199f),
184 Q31( 0.0056220643f), Q31( 0.0055475714f),
185 Q31( 0.0054196775f), Q31( 0.0052461166f),
186 Q31( 0.0050393022f), Q31( 0.0047932560f),
187 Q31( 0.0045209852f), Q31( 0.0042264269f),
188 Q31( 0.0039207432f), Q31( 0.0036008268f),
189 Q31( 0.0032739613f), Q31( 0.0029469447f),
190 Q31( 0.0026201758f), Q31( 0.0023017254f),
191 Q31( 0.0019841140f), Q31( 0.0016868083f),
192 Q31( 0.0013902494f), Q31( 0.0011250155f),
193 Q31( 0.0008608443f), Q31( 0.0006239376f),
194 Q31( 0.0004026540f), Q31( 0.0002043017f),
195 Q31( 0.0000134949f), Q31(-0.0001446380f),
196 Q31(-0.0002896981f), Q31(-0.0004095121f),
197 Q31(-0.0005145572f), Q31(-0.0005946118f),
198 Q31(-0.0006650415f), Q31(-0.0007215391f),
199 Q31(-0.0007530001f), Q31(-0.0007757977f),
200 Q31(-0.0007803664f), Q31(-0.0007834332f),
201 Q31(-0.0007681371f), Q31(-0.0007440941f),
202 Q31(-0.0007157736f), Q31(-0.0006777690f),
203 Q31(-0.0006312493f), Q31(-0.0005870930f),
204 Q31(-0.0005466565f), Q31(-0.0005040714f),
205 Q31(-0.0004875227f), Q31(-0.0005617692f),
206};
207
46/* This table contains redundancy: It is symmetric about the entry #320208/* This table contains redundancy: It is symmetric about the entry #320
47 * with the exception of entries 384 and 512 which are negated. */209 * with the exception of entries 384 and 512 which are negated. */
48static const DECLARE_ALIGNED(32, INTFLOAT, sbr_qmf_window_us)[640] = {210static const DECLARE_ALIGNED(32, INTFLOAT, sbr_qmf_window_us)[640] = {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t