diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-06 11:40:17 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-06 11:40:17 +0000 |
commit | 0829c594034dcf5187694d00e6b0702eea5c28f7 (patch) | |
tree | 286b7db2e3f37d342181bdb3ffa13c973830a51b /encoder.c | |
parent | Adding upstream version 1.5~rc1. (diff) | |
download | clzip-0829c594034dcf5187694d00e6b0702eea5c28f7.tar.xz clzip-0829c594034dcf5187694d00e6b0702eea5c28f7.zip |
Adding upstream version 1.5.upstream/1.5
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'encoder.c')
-rw-r--r-- | encoder.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -317,7 +317,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]; @@ -326,15 +326,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 < max_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 < max_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 ); @@ -365,7 +365,7 @@ 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], max_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 ); |