Lines Matching defs:state
50 void ff_jpegls_init_state(JLSState *state);
87 static inline void ff_jpegls_downscale_state(JLSState *state, int Q)
89 if (state->N[Q] == state->reset) {
90 state->A[Q] >>= 1;
91 state->B[Q] >>= 1;
92 state->N[Q] >>= 1;
94 state->N[Q]++;
97 static inline int ff_jpegls_update_state_regular(JLSState *state,
102 state->A[Q] += FFABS(err);
103 err *= state->twonear;
104 state->B[Q] += err;
106 ff_jpegls_downscale_state(state, Q);
108 if (state->B[Q] <= -state->N[Q]) {
109 state->B[Q] = FFMAX(state->B[Q] + state->N[Q], 1 - state->N[Q]);
110 if (state->C[Q] > -128)
111 state->C[Q]--;
112 } else if (state->B[Q] > 0) {
113 state->B[Q] = FFMIN(state->B[Q] - state->N[Q], 0);
114 if (state->C[Q] < 127)
115 state->C[Q]++;