Mercurial > libavcodec.hg
comparison qdm2.c @ 9665:87d4e5e27d9f libavcodec
Indent
author | banan |
---|---|
date | Sun, 17 May 2009 10:31:16 +0000 |
parents | df1875099613 |
children | 899237b1961f |
comparison
equal
deleted
inserted
replaced
9664:df1875099613 | 9665:87d4e5e27d9f |
---|---|
287 static int vlcs_initialized = 0; | 287 static int vlcs_initialized = 0; |
288 static VLC_TYPE qdm2_table[3838][2]; | 288 static VLC_TYPE qdm2_table[3838][2]; |
289 | 289 |
290 if (!vlcs_initialized) { | 290 if (!vlcs_initialized) { |
291 | 291 |
292 vlc_tab_level.table = &qdm2_table[qdm2_vlc_offs[0]]; | 292 vlc_tab_level.table = &qdm2_table[qdm2_vlc_offs[0]]; |
293 vlc_tab_level.table_allocated = qdm2_vlc_offs[1] - qdm2_vlc_offs[0]; | 293 vlc_tab_level.table_allocated = qdm2_vlc_offs[1] - qdm2_vlc_offs[0]; |
294 init_vlc (&vlc_tab_level, 8, 24, | 294 init_vlc (&vlc_tab_level, 8, 24, |
295 vlc_tab_level_huffbits, 1, 1, | 295 vlc_tab_level_huffbits, 1, 1, |
296 vlc_tab_level_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); | 296 vlc_tab_level_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); |
297 | 297 |
298 vlc_tab_diff.table = &qdm2_table[qdm2_vlc_offs[1]]; | 298 vlc_tab_diff.table = &qdm2_table[qdm2_vlc_offs[1]]; |
299 vlc_tab_diff.table_allocated = qdm2_vlc_offs[2] - qdm2_vlc_offs[1]; | 299 vlc_tab_diff.table_allocated = qdm2_vlc_offs[2] - qdm2_vlc_offs[1]; |
300 init_vlc (&vlc_tab_diff, 8, 37, | 300 init_vlc (&vlc_tab_diff, 8, 37, |
301 vlc_tab_diff_huffbits, 1, 1, | 301 vlc_tab_diff_huffbits, 1, 1, |
302 vlc_tab_diff_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); | 302 vlc_tab_diff_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); |
303 | 303 |
304 vlc_tab_run.table = &qdm2_table[qdm2_vlc_offs[2]]; | 304 vlc_tab_run.table = &qdm2_table[qdm2_vlc_offs[2]]; |
305 vlc_tab_run.table_allocated = qdm2_vlc_offs[3] - qdm2_vlc_offs[2]; | 305 vlc_tab_run.table_allocated = qdm2_vlc_offs[3] - qdm2_vlc_offs[2]; |
306 init_vlc (&vlc_tab_run, 5, 6, | 306 init_vlc (&vlc_tab_run, 5, 6, |
307 vlc_tab_run_huffbits, 1, 1, | 307 vlc_tab_run_huffbits, 1, 1, |
308 vlc_tab_run_huffcodes, 1, 1, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); | 308 vlc_tab_run_huffcodes, 1, 1, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); |
309 | 309 |
310 fft_level_exp_alt_vlc.table = &qdm2_table[qdm2_vlc_offs[3]]; | 310 fft_level_exp_alt_vlc.table = &qdm2_table[qdm2_vlc_offs[3]]; |
311 fft_level_exp_alt_vlc.table_allocated = qdm2_vlc_offs[4] - qdm2_vlc_offs[3]; | 311 fft_level_exp_alt_vlc.table_allocated = qdm2_vlc_offs[4] - qdm2_vlc_offs[3]; |
312 init_vlc (&fft_level_exp_alt_vlc, 8, 28, | 312 init_vlc (&fft_level_exp_alt_vlc, 8, 28, |
313 fft_level_exp_alt_huffbits, 1, 1, | 313 fft_level_exp_alt_huffbits, 1, 1, |
314 fft_level_exp_alt_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); | 314 fft_level_exp_alt_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); |
315 | 315 |
316 | 316 |
317 fft_level_exp_vlc.table = &qdm2_table[qdm2_vlc_offs[4]]; | 317 fft_level_exp_vlc.table = &qdm2_table[qdm2_vlc_offs[4]]; |
318 fft_level_exp_vlc.table_allocated = qdm2_vlc_offs[5] - qdm2_vlc_offs[4]; | 318 fft_level_exp_vlc.table_allocated = qdm2_vlc_offs[5] - qdm2_vlc_offs[4]; |
319 init_vlc (&fft_level_exp_vlc, 8, 20, | 319 init_vlc (&fft_level_exp_vlc, 8, 20, |
320 fft_level_exp_huffbits, 1, 1, | 320 fft_level_exp_huffbits, 1, 1, |
321 fft_level_exp_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); | 321 fft_level_exp_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); |
322 | 322 |
323 fft_stereo_exp_vlc.table = &qdm2_table[qdm2_vlc_offs[5]]; | 323 fft_stereo_exp_vlc.table = &qdm2_table[qdm2_vlc_offs[5]]; |
324 fft_stereo_exp_vlc.table_allocated = qdm2_vlc_offs[6] - qdm2_vlc_offs[5]; | 324 fft_stereo_exp_vlc.table_allocated = qdm2_vlc_offs[6] - qdm2_vlc_offs[5]; |
325 init_vlc (&fft_stereo_exp_vlc, 6, 7, | 325 init_vlc (&fft_stereo_exp_vlc, 6, 7, |
326 fft_stereo_exp_huffbits, 1, 1, | 326 fft_stereo_exp_huffbits, 1, 1, |
327 fft_stereo_exp_huffcodes, 1, 1, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); | 327 fft_stereo_exp_huffcodes, 1, 1, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); |
328 | 328 |
329 fft_stereo_phase_vlc.table = &qdm2_table[qdm2_vlc_offs[6]]; | 329 fft_stereo_phase_vlc.table = &qdm2_table[qdm2_vlc_offs[6]]; |
330 fft_stereo_phase_vlc.table_allocated = qdm2_vlc_offs[7] - qdm2_vlc_offs[6]; | 330 fft_stereo_phase_vlc.table_allocated = qdm2_vlc_offs[7] - qdm2_vlc_offs[6]; |
331 init_vlc (&fft_stereo_phase_vlc, 6, 9, | 331 init_vlc (&fft_stereo_phase_vlc, 6, 9, |
332 fft_stereo_phase_huffbits, 1, 1, | 332 fft_stereo_phase_huffbits, 1, 1, |
333 fft_stereo_phase_huffcodes, 1, 1, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); | 333 fft_stereo_phase_huffcodes, 1, 1, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); |
334 | 334 |
335 vlc_tab_tone_level_idx_hi1.table = &qdm2_table[qdm2_vlc_offs[7]]; | 335 vlc_tab_tone_level_idx_hi1.table = &qdm2_table[qdm2_vlc_offs[7]]; |
336 vlc_tab_tone_level_idx_hi1.table_allocated = qdm2_vlc_offs[8] - qdm2_vlc_offs[7]; | 336 vlc_tab_tone_level_idx_hi1.table_allocated = qdm2_vlc_offs[8] - qdm2_vlc_offs[7]; |
337 init_vlc (&vlc_tab_tone_level_idx_hi1, 8, 20, | 337 init_vlc (&vlc_tab_tone_level_idx_hi1, 8, 20, |
338 vlc_tab_tone_level_idx_hi1_huffbits, 1, 1, | 338 vlc_tab_tone_level_idx_hi1_huffbits, 1, 1, |
339 vlc_tab_tone_level_idx_hi1_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); | 339 vlc_tab_tone_level_idx_hi1_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); |
340 | 340 |
341 vlc_tab_tone_level_idx_mid.table = &qdm2_table[qdm2_vlc_offs[8]]; | 341 vlc_tab_tone_level_idx_mid.table = &qdm2_table[qdm2_vlc_offs[8]]; |
342 vlc_tab_tone_level_idx_mid.table_allocated = qdm2_vlc_offs[9] - qdm2_vlc_offs[8]; | 342 vlc_tab_tone_level_idx_mid.table_allocated = qdm2_vlc_offs[9] - qdm2_vlc_offs[8]; |
343 init_vlc (&vlc_tab_tone_level_idx_mid, 8, 24, | 343 init_vlc (&vlc_tab_tone_level_idx_mid, 8, 24, |
344 vlc_tab_tone_level_idx_mid_huffbits, 1, 1, | 344 vlc_tab_tone_level_idx_mid_huffbits, 1, 1, |
345 vlc_tab_tone_level_idx_mid_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); | 345 vlc_tab_tone_level_idx_mid_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); |
346 | 346 |
347 vlc_tab_tone_level_idx_hi2.table = &qdm2_table[qdm2_vlc_offs[9]]; | 347 vlc_tab_tone_level_idx_hi2.table = &qdm2_table[qdm2_vlc_offs[9]]; |
348 vlc_tab_tone_level_idx_hi2.table_allocated = qdm2_vlc_offs[10] - qdm2_vlc_offs[9]; | 348 vlc_tab_tone_level_idx_hi2.table_allocated = qdm2_vlc_offs[10] - qdm2_vlc_offs[9]; |
349 init_vlc (&vlc_tab_tone_level_idx_hi2, 8, 24, | 349 init_vlc (&vlc_tab_tone_level_idx_hi2, 8, 24, |
350 vlc_tab_tone_level_idx_hi2_huffbits, 1, 1, | 350 vlc_tab_tone_level_idx_hi2_huffbits, 1, 1, |
351 vlc_tab_tone_level_idx_hi2_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); | 351 vlc_tab_tone_level_idx_hi2_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); |
352 | 352 |
353 vlc_tab_type30.table = &qdm2_table[qdm2_vlc_offs[10]]; | 353 vlc_tab_type30.table = &qdm2_table[qdm2_vlc_offs[10]]; |
354 vlc_tab_type30.table_allocated = qdm2_vlc_offs[11] - qdm2_vlc_offs[10]; | 354 vlc_tab_type30.table_allocated = qdm2_vlc_offs[11] - qdm2_vlc_offs[10]; |
355 init_vlc (&vlc_tab_type30, 6, 9, | 355 init_vlc (&vlc_tab_type30, 6, 9, |
356 vlc_tab_type30_huffbits, 1, 1, | 356 vlc_tab_type30_huffbits, 1, 1, |
357 vlc_tab_type30_huffcodes, 1, 1, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); | 357 vlc_tab_type30_huffcodes, 1, 1, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); |
358 | 358 |
359 vlc_tab_type34.table = &qdm2_table[qdm2_vlc_offs[11]]; | 359 vlc_tab_type34.table = &qdm2_table[qdm2_vlc_offs[11]]; |
360 vlc_tab_type34.table_allocated = qdm2_vlc_offs[12] - qdm2_vlc_offs[11]; | 360 vlc_tab_type34.table_allocated = qdm2_vlc_offs[12] - qdm2_vlc_offs[11]; |
361 init_vlc (&vlc_tab_type34, 5, 10, | 361 init_vlc (&vlc_tab_type34, 5, 10, |
362 vlc_tab_type34_huffbits, 1, 1, | 362 vlc_tab_type34_huffbits, 1, 1, |
363 vlc_tab_type34_huffcodes, 1, 1, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); | 363 vlc_tab_type34_huffcodes, 1, 1, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); |
364 | 364 |
365 vlc_tab_fft_tone_offset[0].table = &qdm2_table[qdm2_vlc_offs[12]]; | 365 vlc_tab_fft_tone_offset[0].table = &qdm2_table[qdm2_vlc_offs[12]]; |
366 vlc_tab_fft_tone_offset[0].table_allocated = qdm2_vlc_offs[13] - qdm2_vlc_offs[12]; | 366 vlc_tab_fft_tone_offset[0].table_allocated = qdm2_vlc_offs[13] - qdm2_vlc_offs[12]; |
367 init_vlc (&vlc_tab_fft_tone_offset[0], 8, 23, | 367 init_vlc (&vlc_tab_fft_tone_offset[0], 8, 23, |
368 vlc_tab_fft_tone_offset_0_huffbits, 1, 1, | 368 vlc_tab_fft_tone_offset_0_huffbits, 1, 1, |
369 vlc_tab_fft_tone_offset_0_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); | 369 vlc_tab_fft_tone_offset_0_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); |
370 | 370 |
371 vlc_tab_fft_tone_offset[1].table = &qdm2_table[qdm2_vlc_offs[13]]; | 371 vlc_tab_fft_tone_offset[1].table = &qdm2_table[qdm2_vlc_offs[13]]; |
372 vlc_tab_fft_tone_offset[1].table_allocated = qdm2_vlc_offs[14] - qdm2_vlc_offs[13]; | 372 vlc_tab_fft_tone_offset[1].table_allocated = qdm2_vlc_offs[14] - qdm2_vlc_offs[13]; |
373 init_vlc (&vlc_tab_fft_tone_offset[1], 8, 28, | 373 init_vlc (&vlc_tab_fft_tone_offset[1], 8, 28, |
374 vlc_tab_fft_tone_offset_1_huffbits, 1, 1, | 374 vlc_tab_fft_tone_offset_1_huffbits, 1, 1, |
375 vlc_tab_fft_tone_offset_1_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); | 375 vlc_tab_fft_tone_offset_1_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); |
376 | 376 |
377 vlc_tab_fft_tone_offset[2].table = &qdm2_table[qdm2_vlc_offs[14]]; | 377 vlc_tab_fft_tone_offset[2].table = &qdm2_table[qdm2_vlc_offs[14]]; |
378 vlc_tab_fft_tone_offset[2].table_allocated = qdm2_vlc_offs[15] - qdm2_vlc_offs[14]; | 378 vlc_tab_fft_tone_offset[2].table_allocated = qdm2_vlc_offs[15] - qdm2_vlc_offs[14]; |
379 init_vlc (&vlc_tab_fft_tone_offset[2], 8, 32, | 379 init_vlc (&vlc_tab_fft_tone_offset[2], 8, 32, |
380 vlc_tab_fft_tone_offset_2_huffbits, 1, 1, | 380 vlc_tab_fft_tone_offset_2_huffbits, 1, 1, |
381 vlc_tab_fft_tone_offset_2_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); | 381 vlc_tab_fft_tone_offset_2_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); |
382 | 382 |
383 vlc_tab_fft_tone_offset[3].table = &qdm2_table[qdm2_vlc_offs[15]]; | 383 vlc_tab_fft_tone_offset[3].table = &qdm2_table[qdm2_vlc_offs[15]]; |
384 vlc_tab_fft_tone_offset[3].table_allocated = qdm2_vlc_offs[16] - qdm2_vlc_offs[15]; | 384 vlc_tab_fft_tone_offset[3].table_allocated = qdm2_vlc_offs[16] - qdm2_vlc_offs[15]; |
385 init_vlc (&vlc_tab_fft_tone_offset[3], 8, 35, | 385 init_vlc (&vlc_tab_fft_tone_offset[3], 8, 35, |
386 vlc_tab_fft_tone_offset_3_huffbits, 1, 1, | 386 vlc_tab_fft_tone_offset_3_huffbits, 1, 1, |
387 vlc_tab_fft_tone_offset_3_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); | 387 vlc_tab_fft_tone_offset_3_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); |
388 | 388 |
389 vlc_tab_fft_tone_offset[4].table = &qdm2_table[qdm2_vlc_offs[16]]; | 389 vlc_tab_fft_tone_offset[4].table = &qdm2_table[qdm2_vlc_offs[16]]; |
390 vlc_tab_fft_tone_offset[4].table_allocated = qdm2_vlc_offs[17] - qdm2_vlc_offs[16]; | 390 vlc_tab_fft_tone_offset[4].table_allocated = qdm2_vlc_offs[17] - qdm2_vlc_offs[16]; |
391 init_vlc (&vlc_tab_fft_tone_offset[4], 8, 38, | 391 init_vlc (&vlc_tab_fft_tone_offset[4], 8, 38, |
392 vlc_tab_fft_tone_offset_4_huffbits, 1, 1, | 392 vlc_tab_fft_tone_offset_4_huffbits, 1, 1, |
393 vlc_tab_fft_tone_offset_4_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); | 393 vlc_tab_fft_tone_offset_4_huffcodes, 2, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); |
394 | 394 |
395 vlcs_initialized=1; | 395 vlcs_initialized=1; |
396 } | 396 } |
397 } | 397 } |
398 | 398 |