comparison apedec.c @ 6482:258f569d30ca libavcodec

smaller tables
author michael
date Mon, 10 Mar 2008 00:27:40 +0000
parents 3572cc5bc8ff
children 48759bfbd073
comparison
equal deleted inserted replaced
6481:493dc59d469a 6482:258f569d30ca
77 { 32, 256, 0 }, 77 { 32, 256, 0 },
78 { 16, 256, 1280 } 78 { 16, 256, 1280 }
79 }; 79 };
80 80
81 /** Filter fraction bits depending on compression level */ 81 /** Filter fraction bits depending on compression level */
82 static const uint16_t ape_filter_fracbits[5][APE_FILTER_LEVELS] = { 82 static const uint8_t ape_filter_fracbits[5][APE_FILTER_LEVELS] = {
83 { 0, 0, 0 }, 83 { 0, 0, 0 },
84 { 11, 0, 0 }, 84 { 11, 0, 0 },
85 { 11, 0, 0 }, 85 { 11, 0, 0 },
86 { 10, 13, 0 }, 86 { 10, 13, 0 },
87 { 11, 13, 15 } 87 { 11, 13, 15 }
314 #define MODEL_ELEMENTS 64 314 #define MODEL_ELEMENTS 64
315 315
316 /** 316 /**
317 * Fixed probabilities for symbols in Monkey Audio version 3.97 317 * Fixed probabilities for symbols in Monkey Audio version 3.97
318 */ 318 */
319 static const uint32_t counts_3970[22] = { 319 static const uint16_t counts_3970[22] = {
320 0, 14824, 28224, 39348, 47855, 53994, 58171, 60926, 320 0, 14824, 28224, 39348, 47855, 53994, 58171, 60926,
321 62682, 63786, 64463, 64878, 65126, 65276, 65365, 65419, 321 62682, 63786, 64463, 64878, 65126, 65276, 65365, 65419,
322 65450, 65469, 65480, 65487, 65491, 65493, 322 65450, 65469, 65480, 65487, 65491, 65493,
323 }; 323 };
324 324
332 }; 332 };
333 333
334 /** 334 /**
335 * Fixed probabilities for symbols in Monkey Audio version 3.98 335 * Fixed probabilities for symbols in Monkey Audio version 3.98
336 */ 336 */
337 static const uint32_t counts_3980[22] = { 337 static const uint16_t counts_3980[22] = {
338 0, 19578, 36160, 48417, 56323, 60899, 63265, 64435, 338 0, 19578, 36160, 48417, 56323, 60899, 63265, 64435,
339 64971, 65232, 65351, 65416, 65447, 65466, 65476, 65482, 339 64971, 65232, 65351, 65416, 65447, 65466, 65476, 65482,
340 65485, 65488, 65490, 65491, 65492, 65493, 340 65485, 65488, 65490, 65491, 65492, 65493,
341 }; 341 };
342 342
353 * Decode symbol 353 * Decode symbol
354 * @param counts probability range start position 354 * @param counts probability range start position
355 * @param count_diffs probability range widths 355 * @param count_diffs probability range widths
356 */ 356 */
357 static inline int range_get_symbol(APEContext * ctx, 357 static inline int range_get_symbol(APEContext * ctx,
358 const uint32_t counts[], 358 const uint16_t counts[],
359 const uint16_t counts_diff[]) 359 const uint16_t counts_diff[])
360 { 360 {
361 int symbol, cf; 361 int symbol, cf;
362 362
363 cf = range_decode_culshift(ctx, 16); 363 cf = range_decode_culshift(ctx, 16);