diff options
Diffstat (limited to 'fast_encoder.c')
-rw-r--r-- | fast_encoder.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fast_encoder.c b/fast_encoder.c index 6172b1a..9afc70e 100644 --- a/fast_encoder.c +++ b/fast_encoder.c @@ -167,16 +167,15 @@ bool FLZe_encode_member( struct FLZ_encoder * const fe ) if( match_byte == cur_byte ) { + const int short_rep_price = price1( fe->eb.bm_match[*state][pos_state] ) + + price1( fe->eb.bm_rep[*state] ) + + price0( fe->eb.bm_rep0[*state] ) + + price0( fe->eb.bm_len[*state][pos_state] ); int price = price0( fe->eb.bm_match[*state][pos_state] ); - int short_rep_price; if( St_is_char( *state ) ) price += LZeb_price_literal( &fe->eb, prev_byte, cur_byte ); else price += LZeb_price_matched( &fe->eb, prev_byte, cur_byte, match_byte ); - short_rep_price = price1( fe->eb.bm_match[*state][pos_state] ) + - price1( fe->eb.bm_rep[*state] ) + - price0( fe->eb.bm_rep0[*state] ) + - price0( fe->eb.bm_len[*state][pos_state] ); if( short_rep_price < price ) { Re_encode_bit( &fe->eb.renc, &fe->eb.bm_match[*state][pos_state], 1 ); |