int k, ret, temp, map;
int Q = 365 + RItype;
- if(!RItype)
- temp = state->A[Q];
- else
- temp = state->A[Q] + (state->N[Q] >> 1);
+ temp= state->A[Q];
+ if(RItype)
+ temp += state->N[Q] >> 1;
for(k = 0; (state->N[Q] << k) < temp; k++);
else
pred = Rb + err;
}
-
- if(state->near){
- if(pred < -state->near)
- pred += state->range * state->twonear;
- else if(pred > state->maxval + state->near)
- pred -= state->range * state->twonear;
- pred = clip(pred, 0, state->maxval);
- }
-
- W(dst, x, pred);
- x += stride;
} else { /* regular mode */
int context, sign;
/* we have to do something more for near-lossless coding */
pred += err;
- if(state->near) {
- if(pred < -state->near)
- pred += state->range * state->twonear;
- else if(pred > state->maxval + state->near)
- pred -= state->range * state->twonear;
- pred = clip(pred, 0, state->maxval);
- }
-
- W(dst, x, pred);
- x += stride;
}
+ if(state->near){
+ if(pred < -state->near)
+ pred += state->range * state->twonear;
+ else if(pred > state->maxval + state->near)
+ pred -= state->range * state->twonear;
+ pred = clip(pred, 0, state->maxval);
+ }
+
+ W(dst, x, pred);
+ x += stride;
}
}
if(state->run_index[comp] > 0)
state->run_index[comp]--;
- x += stride;
} else { /* regular mode */
int context;
}
ls_encode_regular(state, pb, context, err);
- x += stride;
}
+ x += stride;
}
}