Defines | |
#define | CODE_BITS 32 |
#define | TOP_VALUE ((unsigned int)1 << (CODE_BITS-1)) |
#define | SHIFT_BITS (CODE_BITS - 9) |
#define | EXTRA_BITS ((CODE_BITS-2) % 8 + 1) |
#define | BOTTOM_VALUE (TOP_VALUE >> 8) |
#define | MODEL_ELEMENTS 64 |
Functions | |
static void | range_start_decoding (APEContext *ctx) |
Start the decoder. | |
static void | range_dec_normalize (APEContext *ctx) |
Perform normalization. | |
static int | range_decode_culfreq (APEContext *ctx, int tot_f) |
Calculate culmulative frequency for next symbol. | |
static int | range_decode_culshift (APEContext *ctx, int shift) |
Decode value with given size in bits. | |
static void | range_decode_update (APEContext *ctx, int sy_f, int lt_f) |
Update decoding state. | |
static int | range_decode_bits (APEContext *ctx, int n) |
Decode n bits (n <= 16) without modelling. | |
static int | range_get_symbol (APEContext *ctx, const uint16_t counts[], const uint16_t counts_diff[]) |
Decode symbol. | |
Variables | |
static const uint16_t | counts_3970 [22] |
Fixed probabilities for symbols in Monkey Audio version 3.97. | |
static const uint16_t | counts_diff_3970 [21] |
Probability ranges for symbols in Monkey Audio version 3.97. | |
static const uint16_t | counts_3980 [22] |
Fixed probabilities for symbols in Monkey Audio version 3.98. | |
static const uint16_t | counts_diff_3980 [21] |
Probability ranges for symbols in Monkey Audio version 3.98. |
#define BOTTOM_VALUE (TOP_VALUE >> 8) |
#define EXTRA_BITS ((CODE_BITS-2) % 8 + 1) |
#define MODEL_ELEMENTS 64 |
static void range_dec_normalize | ( | APEContext * | ctx | ) | [inline, static] |
Perform normalization.
Definition at line 237 of file apedec.c.
Referenced by entropy_decode(), range_decode_culfreq(), and range_decode_culshift().
static int range_decode_bits | ( | APEContext * | ctx, | |
int | n | |||
) | [inline, static] |
Decode n bits (n <= 16) without modelling.
Definition at line 288 of file apedec.c.
Referenced by ape_decode_value().
static int range_decode_culfreq | ( | APEContext * | ctx, | |
int | tot_f | |||
) | [inline, static] |
Calculate culmulative frequency for next symbol.
Does NO update!
ctx | decoder context | |
tot_f | is the total frequency or (code_value)1<<shift |
Definition at line 255 of file apedec.c.
Referenced by ape_decode_value().
static int range_decode_culshift | ( | APEContext * | ctx, | |
int | shift | |||
) | [inline, static] |
Decode value with given size in bits.
ctx | decoder context | |
shift | number of bits to decode |
Definition at line 267 of file apedec.c.
Referenced by range_decode_bits(), and range_get_symbol().
static void range_decode_update | ( | APEContext * | ctx, | |
int | sy_f, | |||
int | lt_f | |||
) | [inline, static] |
Update decoding state.
ctx | decoder context | |
sy_f | the interval length (frequency of the symbol) | |
lt_f | the lower end (frequency sum of < symbols) |
Definition at line 281 of file apedec.c.
Referenced by ape_decode_value(), range_decode_bits(), and range_get_symbol().
static int range_get_symbol | ( | APEContext * | ctx, | |
const uint16_t | counts[], | |||
const uint16_t | counts_diff[] | |||
) | [inline, static] |
Decode symbol.
ctx | decoder context | |
counts | probability range start position | |
counts_diff | probability range widths |
Definition at line 340 of file apedec.c.
Referenced by ape_decode_value().
static void range_start_decoding | ( | APEContext * | ctx | ) | [inline, static] |
const uint16_t counts_3970[22] [static] |
Initial value:
{ 0, 14824, 28224, 39348, 47855, 53994, 58171, 60926, 62682, 63786, 64463, 64878, 65126, 65276, 65365, 65419, 65450, 65469, 65480, 65487, 65491, 65493, }
Definition at line 301 of file apedec.c.
Referenced by ape_decode_value().
const uint16_t counts_3980[22] [static] |
Initial value:
{ 0, 19578, 36160, 48417, 56323, 60899, 63265, 64435, 64971, 65232, 65351, 65416, 65447, 65466, 65476, 65482, 65485, 65488, 65490, 65491, 65492, 65493, }
Definition at line 319 of file apedec.c.
Referenced by ape_decode_value().
const uint16_t counts_diff_3970[21] [static] |
Initial value:
{ 14824, 13400, 11124, 8507, 6139, 4177, 2755, 1756, 1104, 677, 415, 248, 150, 89, 54, 31, 19, 11, 7, 4, 2, }
Definition at line 310 of file apedec.c.
Referenced by ape_decode_value().
const uint16_t counts_diff_3980[21] [static] |
Initial value:
{ 19578, 16582, 12257, 7906, 4576, 2366, 1170, 536, 261, 119, 65, 31, 19, 10, 6, 3, 3, 2, 1, 1, 1, }
Definition at line 328 of file apedec.c.
Referenced by ape_decode_value().