Lines Matching refs:diff
33 u_writeDiff(int32_t diff, uint8_t *p) { in u_writeDiff() argument
34 if(diff>=SLOPE_REACH_NEG_1) { in u_writeDiff()
35 if(diff<=SLOPE_REACH_POS_1) { in u_writeDiff()
36 *p++=(uint8_t)(SLOPE_MIDDLE+diff); in u_writeDiff()
37 } else if(diff<=SLOPE_REACH_POS_2) { in u_writeDiff()
38 *p++=(uint8_t)(SLOPE_START_POS_2+(diff/SLOPE_TAIL_COUNT)); in u_writeDiff()
39 *p++=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT); in u_writeDiff()
40 } else if(diff<=SLOPE_REACH_POS_3) { in u_writeDiff()
41 p[2]=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT); in u_writeDiff()
42 diff/=SLOPE_TAIL_COUNT; in u_writeDiff()
43 p[1]=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT); in u_writeDiff()
44 *p=(uint8_t)(SLOPE_START_POS_3+(diff/SLOPE_TAIL_COUNT)); in u_writeDiff()
47 p[3]=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT); in u_writeDiff()
48 diff/=SLOPE_TAIL_COUNT; in u_writeDiff()
49 p[2]=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT); in u_writeDiff()
50 diff/=SLOPE_TAIL_COUNT; in u_writeDiff()
51 p[1]=(uint8_t)(SLOPE_MIN+diff%SLOPE_TAIL_COUNT); in u_writeDiff()
58 if(diff>=SLOPE_REACH_NEG_2) { in u_writeDiff()
59 NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m); in u_writeDiff()
60 *p++=(uint8_t)(SLOPE_START_NEG_2+diff); in u_writeDiff()
62 } else if(diff>=SLOPE_REACH_NEG_3) { in u_writeDiff()
63 NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m); in u_writeDiff()
65 NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m); in u_writeDiff()
67 *p=(uint8_t)(SLOPE_START_NEG_3+diff); in u_writeDiff()
70 NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m); in u_writeDiff()
72 NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m); in u_writeDiff()
74 NEGDIVMOD(diff, SLOPE_TAIL_COUNT, m); in u_writeDiff()