MCPcopy Create free account
hub / github.com/zhuker/lamejs / init_outer_loop

Method init_outer_loop

src/main/java/mp3/Quantize.java:181–283  ·  view source on GitHub ↗
(final LameInternalFlags gfc,
			final GrInfo cod_info)

Source from the content-addressed store, hash-verified

179 }
180
181 public final void init_outer_loop(final LameInternalFlags gfc,
182 final GrInfo cod_info) {
183 /*
184 * initialize fresh cod_info
185 */
186 cod_info.part2_3_length = 0;
187 cod_info.big_values = 0;
188 cod_info.count1 = 0;
189 cod_info.global_gain = 210;
190 cod_info.scalefac_compress = 0;
191 /* mixed_block_flag, block_type was set in psymodel.c */
192 cod_info.table_select[0] = 0;
193 cod_info.table_select[1] = 0;
194 cod_info.table_select[2] = 0;
195 cod_info.subblock_gain[0] = 0;
196 cod_info.subblock_gain[1] = 0;
197 cod_info.subblock_gain[2] = 0;
198 cod_info.subblock_gain[3] = 0; /* this one is always 0 */
199 cod_info.region0_count = 0;
200 cod_info.region1_count = 0;
201 cod_info.preflag = 0;
202 cod_info.scalefac_scale = 0;
203 cod_info.count1table_select = 0;
204 cod_info.part2_length = 0;
205 cod_info.sfb_lmax = Encoder.SBPSY_l;
206 cod_info.sfb_smin = Encoder.SBPSY_s;
207 cod_info.psy_lmax = gfc.sfb21_extra ? Encoder.SBMAX_l : Encoder.SBPSY_l;
208 cod_info.psymax = cod_info.psy_lmax;
209 cod_info.sfbmax = cod_info.sfb_lmax;
210 cod_info.sfbdivide = 11;
211 for (int sfb = 0; sfb < Encoder.SBMAX_l; sfb++) {
212 cod_info.width[sfb] = gfc.scalefac_band.l[sfb + 1]
213 - gfc.scalefac_band.l[sfb];
214 /* which is always 0. */
215 cod_info.window[sfb] = 3;
216 }
217 if (cod_info.block_type == Encoder.SHORT_TYPE) {
218 float ixwork[] = new float[576];
219
220 cod_info.sfb_smin = 0;
221 cod_info.sfb_lmax = 0;
222 if (cod_info.mixed_block_flag != 0) {
223 /*
224 * MPEG-1: sfbs 0-7 long block, 3-12 short blocks MPEG-2(.5):
225 * sfbs 0-5 long block, 3-12 short blocks
226 */
227 cod_info.sfb_smin = 3;
228 cod_info.sfb_lmax = gfc.mode_gr * 2 + 4;
229 }
230 cod_info.psymax = cod_info.sfb_lmax
231 + 3
232 * ((gfc.sfb21_extra ? Encoder.SBMAX_s : Encoder.SBPSY_s) - cod_info.sfb_smin);
233 cod_info.sfbmax = cod_info.sfb_lmax + 3
234 * (Encoder.SBPSY_s - cod_info.sfb_smin);
235 cod_info.sfbdivide = cod_info.sfbmax - 18;
236 cod_info.psy_lmax = cod_info.sfb_lmax;
237 /* re-order the short blocks, for more efficient encoding below */
238 /* By Takehiro TOMINAGA */

Callers 7

VBR_old_prepareMethod · 0.95
VBR_new_prepareMethod · 0.95
CBRNewIterationLoopFunction · 0.80
BcFunction · 0.80
CBRNewIterationLoopFunction · 0.80
iteration_loopMethod · 0.80
iteration_loopMethod · 0.80

Calls 1

psfb21_analogsilenceMethod · 0.95

Tested by

no test coverage detected