diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 14:00:28 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 14:00:28 +0000 |
commit | 01c49d142d098985fd0951397e6dfe032b19e265 (patch) | |
tree | ea1574894741dd5fa797703f3bcc4580ba530063 /encoder.c | |
parent | Adding upstream version 1.5. (diff) | |
download | lzlib-01c49d142d098985fd0951397e6dfe032b19e265.tar.xz lzlib-01c49d142d098985fd0951397e6dfe032b19e265.zip |
Adding upstream version 1.6~pre1.upstream/1.6_pre1
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r-- | encoder.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -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 ); |