45 for (
i = 0;
i < 367;
i++) {
54 static inline int iso_clip(
int v,
int vmin,
int vmax)
56 if (v > vmax || v < vmin)
64 const int basic_t1 = 3;
65 const int basic_t2 = 7;
66 const int basic_t3 = 21;
69 if (
s->maxval == 0 || reset_all)
70 s->maxval = (1 <<
s->bpp) - 1;
72 if (
s->maxval >= 128) {
75 if (
s->T1 == 0 || reset_all)
77 s->near + 1,
s->maxval);
78 if (
s->T2 == 0 || reset_all)
81 if (
s->T3 == 0 || reset_all)
87 if (
s->T1 == 0 || reset_all)
89 s->near + 1,
s->maxval);
90 if (
s->T2 == 0 || reset_all)
93 if (
s->T3 == 0 || reset_all)
98 if (
s->reset == 0 || reset_all)
100 ff_dlog(
NULL,
"[JPEG-LS RESET] T=%i,%i,%i\n",
s->T1,
s->T2,
s->T3);
static int iso_clip(int v, int vmin, int vmax)
Custom value clipping function used in T1, T2, T3 calculation.
void ff_jpegls_init_state(JLSState *state)
Calculate initial JPEG-LS parameters.
void ff_jpegls_reset_coding_parameters(JLSState *s, int reset_all)
Calculate JPEG-LS codec values.
common internal API header
static const int factor[16]