summaryrefslogtreecommitdiffstats
path: root/encoder.c
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 14:00:38 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 14:00:38 +0000
commitc14d1693bdd22c33c4cf48acb77cf51b1769dc77 (patch)
treec6fd25510d2ff466252686512f69d8ca9ba155c8 /encoder.c
parentAdding debian version 1.5-1. (diff)
downloadlzlib-c14d1693bdd22c33c4cf48acb77cf51b1769dc77.tar.xz
lzlib-c14d1693bdd22c33c4cf48acb77cf51b1769dc77.zip
Merging upstream version 1.6~pre1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'encoder.c')
-rw-r--r--encoder.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/encoder.c b/encoder.c
index f4b75d8..84cf760 100644
--- a/encoder.c
+++ b/encoder.c
@@ -311,7 +311,7 @@ static void LZe_fill_align_prices( struct LZ_encoder * const encoder )
static void LZe_fill_distance_prices( struct LZ_encoder * const encoder )
{
- int dis, dis_state;
+ int dis, len_state;
for( dis = start_dis_model; dis < modeled_distances; ++dis )
{
const int dis_slot = dis_slots[dis];
@@ -320,15 +320,15 @@ static void LZe_fill_distance_prices( struct LZ_encoder * const encoder )
const int price =
price_symbol_reversed( encoder->bm_dis + base - dis_slot - 1,
dis - base, direct_bits );
- for( dis_state = 0; dis_state < dis_states; ++dis_state )
- encoder->dis_prices[dis_state][dis] = price;
+ for( len_state = 0; len_state < len_states; ++len_state )
+ encoder->dis_prices[len_state][dis] = price;
}
- for( dis_state = 0; dis_state < dis_states; ++dis_state )
+ for( len_state = 0; len_state < len_states; ++len_state )
{
- int * const dsp = encoder->dis_slot_prices[dis_state];
- int * const dp = encoder->dis_prices[dis_state];
- const Bit_model * const bmds = encoder->bm_dis_slot[dis_state];
+ int * const dsp = encoder->dis_slot_prices[len_state];
+ int * const dp = encoder->dis_prices[len_state];
+ const Bit_model * const bmds = encoder->bm_dis_slot[len_state];
int slot = 0;
for( ; slot < end_dis_model && slot < encoder->num_dis_slots; ++slot )
dsp[slot] = price_symbol( bmds, slot, dis_slot_bits );
@@ -361,7 +361,7 @@ static bool LZe_init( struct LZ_encoder * const encoder,
Bm_array_init( encoder->bm_rep1, states );
Bm_array_init( encoder->bm_rep2, states );
Bm_array_init( encoder->bm_len[0], states * pos_states );
- Bm_array_init( encoder->bm_dis_slot[0], dis_states * (1 << dis_slot_bits) );
+ Bm_array_init( encoder->bm_dis_slot[0], len_states * (1 << dis_slot_bits) );
Bm_array_init( encoder->bm_dis, modeled_distances - end_dis_model );
Bm_array_init( encoder->bm_align, dis_align_size );