Compress a little faster

This commit is contained in:
Emmanuel Marty 2020-05-24 15:19:59 +02:00 committed by GitHub
parent 07104538b7
commit dc413164ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -426,7 +426,7 @@ static void lzsa_optimize_forward_v2(lzsa_compressor *pCompressor, const unsigne
if (!nFavorRatio && !arrival[(i << MATCHES_PER_ARRIVAL_SHIFT) + j].num_literals) if (!nFavorRatio && !arrival[(i << MATCHES_PER_ARRIVAL_SHIFT) + j].num_literals)
nCodingChoiceCost += MODESWITCH_PENALTY; nCodingChoiceCost += MODESWITCH_PENALTY;
if (nCodingChoiceCost <= pDestSlots[nMatchesPerArrival - 1].cost) { if (nCodingChoiceCost <= pDestSlots[nMatchesPerArrival - 2].cost) {
int exists = 0; int exists = 0;
int nScore = arrival[(i << MATCHES_PER_ARRIVAL_SHIFT) + j].score + 3 + nScorePenalty; int nScore = arrival[(i << MATCHES_PER_ARRIVAL_SHIFT) + j].score + 3 + nScorePenalty;