Lines Matching refs:diff
225 int32_t prev, count, diff; member
234 packDiff(int32_t diff);
286 packDiff(int32_t diff) { in packDiff() argument
289 if(diff>=BOCU1_REACH_NEG_1) { in packDiff()
291 if(diff<=BOCU1_REACH_POS_1) { in packDiff()
293 return 0x01000000|(BOCU1_MIDDLE+diff); in packDiff()
294 } else if(diff<=BOCU1_REACH_POS_2) { in packDiff()
296 diff-=BOCU1_REACH_POS_1+1; in packDiff()
299 } else if(diff<=BOCU1_REACH_POS_3) { in packDiff()
301 diff-=BOCU1_REACH_POS_2+1; in packDiff()
306 diff-=BOCU1_REACH_POS_3+1; in packDiff()
312 if(diff>=BOCU1_REACH_NEG_2) { in packDiff()
314 diff-=BOCU1_REACH_NEG_1; in packDiff()
317 } else if(diff>=BOCU1_REACH_NEG_3) { in packDiff()
319 diff-=BOCU1_REACH_NEG_2; in packDiff()
324 diff-=BOCU1_REACH_NEG_3; in packDiff()
340 NEGDIVMOD(diff, BOCU1_TRAIL_COUNT, m); in packDiff()
346 result|=(lead+diff)<<shift; in packDiff()
451 pRx->diff=c; in decodeBocu1LeadByte()
487 c=pRx->diff; in decodeBocu1TrailByte()
508 pRx->diff=c+t*BOCU1_TRAIL_COUNT; in decodeBocu1TrailByte()
510 pRx->diff=c+t*BOCU1_TRAIL_COUNT*BOCU1_TRAIL_COUNT; in decodeBocu1TrailByte()
677 writeDiff(int32_t diff, uint8_t *p) { in writeDiff() argument
681 packed=packDiff(diff); in writeDiff()
687 if(diff<=0) { in writeDiff()
693 if(diff!=unpackDiff(initialPrev, packed)) { in writeDiff()
695 diff, packed, unpackDiff(initialPrev, packed)); in writeDiff()