1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00

liblzma: Adjust default depth calculation for HC3 and HC4.

It was 8 + nice_len / 4, now it is 4 + nice_len / 4.
This allows faster settings at lower nice_len values,
even though it seems that I won't use automatic depth
calcuation with HC3 and HC4 in the presets.
This commit is contained in:
Lasse Collin 2010-09-03 12:28:41 +03:00
parent fce69059cf
commit 77fe5954cd

View file

@ -349,9 +349,10 @@ lz_encoder_prepare(lzma_mf *mf, lzma_allocator *allocator,
// Maximum number of match finder cycles // Maximum number of match finder cycles
mf->depth = lz_options->depth; mf->depth = lz_options->depth;
if (mf->depth == 0) { if (mf->depth == 0) {
mf->depth = 16 + (mf->nice_len / 2); if (is_bt)
if (!is_bt) mf->depth = 16 + mf->nice_len / 2;
mf->depth /= 2; else
mf->depth = 4 + mf->nice_len / 4;
} }
return false; return false;