Lines Matching defs:state
51 void ff_jpegls_init_state(JLSState *state);
79 static inline void ff_jpegls_downscale_state(JLSState *state, int Q){
80 if(state->N[Q] == state->reset){
81 state->A[Q] >>=1;
82 state->B[Q] >>=1;
83 state->N[Q] >>=1;
85 state->N[Q]++;
88 static inline int ff_jpegls_update_state_regular(JLSState *state, int Q, int err){
89 state->A[Q] += FFABS(err);
90 err *= state->twonear;
91 state->B[Q] += err;
93 ff_jpegls_downscale_state(state, Q);
95 if(state->B[Q] <= -state->N[Q]) {
96 state->B[Q]= FFMAX(state->B[Q] + state->N[Q], 1-state->N[Q]);
97 if(state->C[Q] > -128)
98 state->C[Q]--;
99 }else if(state->B[Q] > 0){
100 state->B[Q]= FFMIN(state->B[Q] - state->N[Q], 0);
101 if(state->C[Q] < 127)
102 state->C[Q]++;