Lines Matching defs:distance
653 int prefix_code, length, distance, ref_x, ref_y;
655 /* parse length and distance */
667 "distance prefix code too large: %d\n", prefix_code);
671 distance = prefix_code + 1;
675 distance = offset + get_bits(&s->gb, extra_bits) + 1;
679 if (distance <= NUM_SHORT_DISTANCES) {
680 int xi = lz77_distance_offsets[distance - 1][0];
681 int yi = lz77_distance_offsets[distance - 1][1];
682 distance = FFMAX(1, xi + yi * width);
684 distance -= NUM_SHORT_DISTANCES;
688 if (distance <= x) {
689 ref_x -= distance;
690 distance = 0;
693 distance -= x;
695 while (distance >= width) {
697 distance -= width;
699 if (distance > 0) {
700 ref_x = width - distance;