bzip2: code shrink

function                                             old     new   delta
sendMTFValues                                       2111    2100     -11

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2018-02-03 02:03:42 +01:00
parent e594fb2171
commit 359230da8e

View File

@ -289,11 +289,16 @@ void sendMTFValues(EState* s)
/*--- Decide how many coding tables to use ---*/ /*--- Decide how many coding tables to use ---*/
AssertH(s->nMTF > 0, 3001); AssertH(s->nMTF > 0, 3001);
if (s->nMTF < 200) nGroups = 2; else // 1..199 = 2
if (s->nMTF < 600) nGroups = 3; else // 200..599 = 3
if (s->nMTF < 1200) nGroups = 4; else // 600..1199 = 4
if (s->nMTF < 2400) nGroups = 5; else // 1200..2399 = 5
nGroups = 6; // else 6
nGroups = 2;
nGroups += (s->nMTF >= 200);
nGroups += (s->nMTF >= 600);
nGroups += (s->nMTF >= 1200);
nGroups += (s->nMTF >= 2400);
/*--- Generate an initial set of coding tables ---*/ /*--- Generate an initial set of coding tables ---*/
{ {