diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 09:56:54 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 09:56:54 +0000 |
commit | 0aff25f0baaa9ebac7ca3711513fcf855fc017ab (patch) | |
tree | ddf52de5d8bd7bb8e95f5881942a1ac919e7f4e5 /encoder.cc | |
parent | Adding debian version 1.14-2. (diff) | |
download | lzip-0aff25f0baaa9ebac7ca3711513fcf855fc017ab.tar.xz lzip-0aff25f0baaa9ebac7ca3711513fcf855fc017ab.zip |
Merging upstream version 1.15~pre1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r-- | encoder.cc | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -416,7 +416,7 @@ int LZ_encoder::sequence_optimizer( const int reps[num_rep_distances], if( replens[rep] < min_match_len ) continue; const int price = rep_match_price + price_rep( rep, state, pos_state ); for( int len = min_match_len; len <= replens[rep]; ++len ) - trials[len].update( price + rep_match_len_encoder.price( len, pos_state ), + trials[len].update( price + rep_len_encoder.price( len, pos_state ), rep, 0 ); } @@ -586,8 +586,7 @@ int LZ_encoder::sequence_optimizer( const int reps[num_rep_distances], trials[++num_trials].price = infinite_price; int price = rep_match_price + price_rep( rep, cur_state, pos_state ); for( int i = min_match_len; i <= len; ++i ) - trials[cur+i].update( price + - rep_match_len_encoder.price( i, pos_state ), + trials[cur+i].update( price + rep_len_encoder.price( i, pos_state ), rep, cur ); if( rep == 0 ) start_len = len + 1; // discard shorter matches @@ -602,7 +601,7 @@ int LZ_encoder::sequence_optimizer( const int reps[num_rep_distances], int pos_state2 = ( pos_state + len ) & pos_state_mask; State state2 = cur_state; state2.set_rep(); - price += rep_match_len_encoder.price( len, pos_state ) + + price += rep_len_encoder.price( len, pos_state ) + price0( bm_match[state2()][pos_state2] ) + price_matched( data[len-1], data[len], data[len-dis] ); pos_state2 = ( pos_state2 + 1 ) & pos_state_mask; @@ -750,7 +749,7 @@ bool LZ_encoder::encode_member( const unsigned long long member_size ) if( len == 1 ) state.set_short_rep(); else { - rep_match_len_encoder.encode( range_encoder, len, pos_state ); + rep_len_encoder.encode( range_encoder, len, pos_state ); state.set_rep(); } } |