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