Lines Matching defs:offset

3038   /* ADF offset compensation
3054 overscan = fmax(0, fmax(dev->hw->offset.duplex.front.top,
3055 dev->hw->offset.duplex.rear.top));
3057 offsets.front.top += overscan - dev->hw->offset.duplex.front.top;
3058 offsets.rear.top += overscan - dev->hw->offset.duplex.rear.top;
3062 overscan = fmax(0, fmax(dev->hw->offset.duplex.front.bottom,
3063 dev->hw->offset.duplex.rear.bottom));
3065 offsets.front.bottom += overscan - dev->hw->offset.duplex.front.bottom;
3066 offsets.rear.bottom += overscan - dev->hw->offset.duplex.rear.bottom;
3069 /* first page offset */
3073 if (dev->hw->offset.first > 0) {
3080 offsets.front.bottom += dev->hw->offset.first;
3081 offsets.rear.bottom += dev->hw->offset.first;
3083 offsets.front.top += dev->hw->offset.first;
3084 offsets.rear.top += dev->hw->offset.first;
3087 } else if (dev->hw->offset.first < 0) {
3094 offsets.front.top += fabs(dev->hw->offset.first);
3095 offsets.rear.top += fabs(dev->hw->offset.first);
3097 offsets.front.bottom += fabs(dev->hw->offset.first);
3098 offsets.rear.bottom += fabs(dev->hw->offset.first);
3102 bry_offset += fabs(dev->hw->offset.first);
3106 s->avdimen.offset.front.top = (int) ( offsets.front.top * s->avdimen.yres / MM_PER_INCH );
3107 s->avdimen.offset.front.bottom = (int) ( offsets.front.bottom * s->avdimen.yres / MM_PER_INCH );
3108 s->avdimen.offset.rear.top = (int) ( offsets.rear.top * s->avdimen.yres / MM_PER_INCH );
3109 s->avdimen.offset.rear.bottom = (int) ( offsets.rear.bottom * s->avdimen.yres / MM_PER_INCH );
3114 DBG (1, "sane_compute_parameters: front offset: top: %d!\n",
3115 s->avdimen.offset.front.top);
3116 DBG (1, "sane_compute_parameters: front offset: bottom: %d!\n",
3117 s->avdimen.offset.front.bottom);
3118 DBG (1, "sane_compute_parameters: rear offset: top: %d!\n",
3119 s->avdimen.offset.rear.top);
3120 DBG (1, "sane_compute_parameters: rear offset: bottom: %d!\n",
3121 s->avdimen.offset.rear.bottom);
3130 if (dev->hw->offset.front.top < 0)
3131 offsets.top += fabs(dev->hw->offset.front.top);
3133 bry_offset += dev->hw->offset.front.top;
3136 if (dev->hw->offset.front.bottom < 0)
3137 offsets.bottom += fabs(dev->hw->offset.front.bottom);
3139 bry_offset += dev->hw->offset.front.bottom;
3141 /* first page offset */
3145 if (dev->hw->offset.first > 0) {
3152 offsets.bottom += dev->hw->offset.first;
3154 offsets.top += dev->hw->offset.first;
3156 } else if (dev->hw->offset.first < 0) {
3163 offsets.top += fabs(dev->hw->offset.first);
3165 offsets.bottom += fabs(dev->hw->offset.first);
3168 bry_offset += fabs(dev->hw->offset.first);
3172 s->avdimen.offset.front.top = (int) ( offsets.top * s->avdimen.yres / MM_PER_INCH );
3173 s->avdimen.offset.front.bottom = (int) ( offsets.bottom * s->avdimen.yres / MM_PER_INCH );
3178 DBG (1, "sane_compute_parameters: front offset: top: %d!\n",
3179 s->avdimen.offset.front.top);
3180 DBG (1, "sane_compute_parameters: front offset: bottom: %d!\n",
3181 s->avdimen.offset.front.bottom);
3184 s->avdimen.offset.front.top = 0;
3185 s->avdimen.offset.front.bottom = 0;
3186 s->avdimen.offset.rear.top = 0;
3187 s->avdimen.offset.rear.bottom = 0;
4970 double offset = 0;
5000 /* top offset compensation */
5003 offset += fmax(0, fmax(dev->hw->offset.duplex.front.top,
5004 dev->hw->offset.duplex.rear.top) );
5006 offset += fmax(0, dev->hw->offset.front.top);
5008 /* first page offset */
5009 if (dev->hw->offset.first > 0)
5010 offset += dev->hw->offset.first;
5013 int top_offset = (int) (dpi * offset / MM_PER_INCH);
5015 DBG (3, "send_tune_scan_length: top offset: %d\n", top_offset);
5037 /* bottom offset compensation */
5038 offset = 0;
5041 offset += fmax(0, fmax(dev->hw->offset.duplex.front.bottom,
5042 dev->hw->offset.duplex.rear.bottom) );
5044 offset += fmax(0, dev->hw->offset.front.bottom);
5046 /* first page offset */
5047 if (dev->hw->offset.first < 0)
5048 offset += fabs(dev->hw->offset.first);
5051 int bottom_offset = (int) (dpi * offset / MM_PER_INCH);
5053 DBG (3, "send_tune_scan_length: bottom offset: %d\n", bottom_offset);
7417 FILE* fp_fd = 0; /* for ADF bottom offset truncating */
7506 DBG (1, "reader_process: failed to generate temporary fname for ADF offset compensation temp file\n");
7509 DBG (1, "reader_process: temporary fname for ADF offset compensation temp file: %s\n",
7517 DBG (3, "reader_process: redirecting output data to temp file for ADF offset compensation.\n");
8034 /* convert to offset in current stripe */
8184 /* ADF offset compensation */
8197 if ( (!s->duplex_rear_valid && (line < s->avdimen.offset.front.top)) ||
8198 (s->duplex_rear_valid && (line < s->avdimen.offset.rear.top)) ) {
8199 DBG (7, "reader_process: skip due read offset line: %ld\n", line);
8203 if ( (!s->duplex_rear_valid && (line > (lines - s->avdimen.offset.front.bottom))) ||
8204 (s->duplex_rear_valid && (line > (lines - s->avdimen.offset.rear.bottom))) ) {
8205 DBG (7, "reader_process: skip due read offset line: %ld to %ld\n", line, lines);
8674 (dev->hw->offset.first != 0 ||
8675 dev->hw->offset.front.top != 0 ||
8676 dev->hw->offset.front.bottom != 0 ||
8677 dev->hw->offset.duplex.front.top != 0 ||
8678 dev->hw->offset.duplex.front.bottom != 0 ||
8679 dev->hw->offset.duplex.rear.top != 0 ||
8680 dev->hw->offset.duplex.rear.bottom != 0) )