From 90cd6e9b8b41a5418b87ab3f4832fdcc3cf2c3f5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 6 Nov 2015 12:40:25 +0100 Subject: Merging upstream version 1.5. Signed-off-by: Daniel Baumann --- encoder.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'encoder.h') diff --git a/encoder.h b/encoder.h index 365d602..a1d9478 100644 --- a/encoder.h +++ b/encoder.h @@ -488,7 +488,7 @@ struct LZ_encoder Bit_model bm_rep1[states]; Bit_model bm_rep2[states]; Bit_model bm_len[states][pos_states]; - Bit_model bm_dis_slot[max_dis_states][1<dis_prices[dis_state][dis]; + return encoder->dis_prices[len_state][dis]; else - return encoder->dis_slot_prices[dis_state][get_slot( dis )] + + return encoder->dis_slot_prices[len_state][get_slot( dis )] + encoder->align_prices[dis & (dis_align_size - 1)]; } @@ -582,7 +582,7 @@ static inline int LZe_price_pair( const struct LZ_encoder * const encoder, const int pos_state ) { return Lee_price( &encoder->match_len_encoder, len, pos_state ) + - LZe_price_dis( encoder, dis, get_dis_state( len ) ); + LZe_price_dis( encoder, dis, get_len_state( len ) ); } static inline int LZe_price_literal( const struct LZ_encoder * const encoder, @@ -613,7 +613,7 @@ static inline void LZe_encode_pair( struct LZ_encoder * const encoder, { const int dis_slot = get_slot( dis ); Lee_encode( &encoder->match_len_encoder, &encoder->renc, len, pos_state ); - Re_encode_tree( &encoder->renc, encoder->bm_dis_slot[get_dis_state(len)], + Re_encode_tree( &encoder->renc, encoder->bm_dis_slot[get_len_state(len)], dis_slot, dis_slot_bits ); if( dis_slot >= start_dis_model ) -- cgit v1.2.3