Lines Matching defs:state
47 void ff_jpegls_init_state(JLSState *state);
84 static inline void ff_jpegls_downscale_state(JLSState *state, int Q)
86 if (state->N[Q] == state->reset) {
87 state->A[Q] >>= 1;
88 state->B[Q] >>= 1;
89 state->N[Q] >>= 1;
91 state->N[Q]++;
94 static inline int ff_jpegls_update_state_regular(JLSState *state,
97 if(FFABS(err) > 0xFFFF || FFABS(err) > INT_MAX - state->A[Q])
99 state->A[Q] += FFABS(err);
100 err *= state->twonear;
101 state->B[Q] += err;
103 ff_jpegls_downscale_state(state, Q);
105 if (state->B[Q] <= -state->N[Q]) {
106 state->B[Q] = FFMAX(state->B[Q] + state->N[Q], 1 - state->N[Q]);
107 if (state->C[Q] > -128)
108 state->C[Q]--;
109 } else if (state->B[Q] > 0) {
110 state->B[Q] = FFMIN(state->B[Q] - state->N[Q], 0);
111 if (state->C[Q] < 127)
112 state->C[Q]++;