genesys: Rename Genesys_Sensor::{CCD -> ccd}_start_xoffset

merge-requests/203/head
Povilas Kanapickas 2019-09-30 13:51:58 +03:00
rodzic 591309a29e
commit 6971301590
8 zmienionych plików z 47 dodań i 47 usunięć

Wyświetl plik

@ -1158,8 +1158,8 @@ void sanei_genesys_search_reference_point(Genesys_Device* dev, Genesys_Sensor& s
sanei_genesys_write_pnm_file("gl_detected-xsobel.pnm", image.data(), 8, 1, width, height);
left = left / count;
/* turn it in CCD pixel at full sensor optical resolution */
sensor.CCD_start_xoffset = start_pixel + (left * sensor.optical_res) / dpi;
// turn it in CCD pixel at full sensor optical resolution
sensor.ccd_start_xoffset = start_pixel + (left * sensor.optical_res) / dpi;
/* find top edge by detecting black strip */
/* apply Y direction sobel filter
@ -1242,7 +1242,7 @@ void sanei_genesys_search_reference_point(Genesys_Device* dev, Genesys_Sensor& s
}
DBG(DBG_proc, "%s: CCD_start_xoffset = %d, left = %d, top = %d\n", __func__,
sensor.CCD_start_xoffset, left, top);
sensor.ccd_start_xoffset, left, top);
}
void sanei_genesys_calculate_zmod(SANE_Bool two_table,

Wyświetl plik

@ -4303,7 +4303,7 @@ void CommandSetGl841::send_shading_data(Genesys_Device* dev, const Genesys_Senso
/* shading pixel begin is start pixel minus start pixel during shading
* calibration. Currently only cases handled are full and half ccd resolution.
*/
beginpixel = sensor.CCD_start_xoffset / ccd_size_divisor;
beginpixel = sensor.ccd_start_xoffset / ccd_size_divisor;
beginpixel += sensor.dummy_pixel + 1;
DBG(DBG_io2, "%s: ORIGIN PIXEL=%d\n", __func__, beginpixel);
beginpixel = (strpixel-beginpixel*2*2)/factor;

Wyświetl plik

@ -1594,7 +1594,7 @@ void CommandSetGl846::send_shading_data(Genesys_Device* dev, const Genesys_Senso
pixels=endpixel-strpixel;
/* since we're using SHDAREA, substract startx coordinate from shading */
strpixel-=((sensor.CCD_start_xoffset*600)/sensor.optical_res);
strpixel -= (sensor.ccd_start_xoffset * 600) / sensor.optical_res;
/* turn pixel value into bytes 2x16 bits words */
strpixel*=2*2;

Wyświetl plik

@ -1641,7 +1641,7 @@ void CommandSetGl847::send_shading_data(Genesys_Device* dev, const Genesys_Senso
pixels=endpixel-strpixel;
/* since we're using SHDAREA, substract startx coordinate from shading */
strpixel-=((sensor.CCD_start_xoffset*600)/sensor.optical_res);
strpixel -= (sensor.ccd_start_xoffset * 600) / sensor.optical_res;
/* turn pixel value into bytes 2x16 bits words */
strpixel*=2*2;

Wyświetl plik

@ -1327,8 +1327,8 @@ void compute_session_pixel_offsets(const Genesys_Device* dev, ScanSession& s,
// startx cannot be below dummy pixel value
s.pixel_startx = sensor.dummy_pixel;
if ((s.params.flags & SCAN_FLAG_USE_XCORRECTION) && sensor.CCD_start_xoffset > 0) {
s.pixel_startx = sensor.CCD_start_xoffset;
if ((s.params.flags & SCAN_FLAG_USE_XCORRECTION) && sensor.ccd_start_xoffset > 0) {
s.pixel_startx = sensor.ccd_start_xoffset;
}
s.pixel_startx += s.params.startx;
@ -1342,7 +1342,7 @@ void compute_session_pixel_offsets(const Genesys_Device* dev, ScanSession& s,
s.pixel_endx /= sensor.ccd_pixels_per_system_pixel() * s.ccd_size_divisor;
} else if (dev->model->asic_type == AsicType::GL841) {
s.pixel_startx = ((sensor.CCD_start_xoffset + s.params.startx) * s.optical_resolution)
s.pixel_startx = ((sensor.ccd_start_xoffset + s.params.startx) * s.optical_resolution)
/ sensor.optical_res;
s.pixel_startx += sensor.dummy_pixel + 1;
@ -1390,7 +1390,7 @@ void compute_session_pixel_offsets(const Genesys_Device* dev, ScanSession& s,
s.pixel_startx |= 1;
}
s.pixel_startx += sensor.CCD_start_xoffset * ccd_pixels_per_system_pixel;
s.pixel_startx += sensor.ccd_start_xoffset * ccd_pixels_per_system_pixel;
s.pixel_endx = s.pixel_startx + s.optical_pixels_raw;
s.pixel_startx /= s.hwdpi_divisor * s.segment_count * ccd_pixels_per_system_pixel;
@ -2607,7 +2607,7 @@ void debug_dump(unsigned level, const Genesys_Sensor& sensor)
DBG(level, " ccd_size_divisor : %d\n", sensor.ccd_size_divisor);
DBG(level, " black_pixels : %d\n", sensor.black_pixels);
DBG(level, " dummy_pixel : %d\n", sensor.dummy_pixel);
DBG(level, " CCD_start_xoffset : %d\n", sensor.CCD_start_xoffset);
DBG(level, " ccd_start_xoffset : %d\n", sensor.ccd_start_xoffset);
DBG(level, " sensor_pixels : %d\n", sensor.sensor_pixels);
DBG(level, " fau_gain_white_ref : %d\n", sensor.fau_gain_white_ref);
DBG(level, " gain_white_ref : %d\n", sensor.gain_white_ref);

Wyświetl plik

@ -297,7 +297,7 @@ struct Genesys_Sensor {
// value of the dummy register
int dummy_pixel = 0;
// last pixel of CCD margin at optical resolution
int CCD_start_xoffset = 0;
int ccd_start_xoffset = 0;
// total pixels used by the sensor
int sensor_pixels = 0;
// TA CCD target code (reference gain)
@ -373,7 +373,7 @@ struct Genesys_Sensor {
ccd_size_divisor == other.ccd_size_divisor &&
black_pixels == other.black_pixels &&
dummy_pixel == other.dummy_pixel &&
CCD_start_xoffset == other.CCD_start_xoffset &&
ccd_start_xoffset == other.ccd_start_xoffset &&
sensor_pixels == other.sensor_pixels &&
fau_gain_white_ref == other.fau_gain_white_ref &&
gain_white_ref == other.gain_white_ref &&
@ -399,7 +399,7 @@ void serialize(Stream& str, Genesys_Sensor& x)
serialize(str, x.ccd_size_divisor);
serialize(str, x.black_pixels);
serialize(str, x.dummy_pixel);
serialize(str, x.CCD_start_xoffset);
serialize(str, x.ccd_start_xoffset);
serialize(str, x.sensor_pixels);
serialize(str, x.fau_gain_white_ref);
serialize(str, x.gain_white_ref);

Wyświetl plik

@ -133,7 +133,7 @@ void genesys_init_sensor_tables()
sensor.optical_res = 1200;
sensor.black_pixels = 48;
sensor.dummy_pixel = 64;
sensor.CCD_start_xoffset = 0;
sensor.ccd_start_xoffset = 0;
sensor.sensor_pixels = 10800;
sensor.fau_gain_white_ref = 210;
sensor.gain_white_ref = 230;
@ -178,7 +178,7 @@ void genesys_init_sensor_tables()
sensor.optical_res = 600;
sensor.black_pixels = 48;
sensor.dummy_pixel = 85;
sensor.CCD_start_xoffset = 152;
sensor.ccd_start_xoffset = 152;
sensor.sensor_pixels = 5416;
sensor.fau_gain_white_ref = 210;
sensor.gain_white_ref = 230;
@ -223,7 +223,7 @@ void genesys_init_sensor_tables()
sensor.optical_res = 1200;
sensor.black_pixels = 48;
sensor.dummy_pixel = 64;
sensor.CCD_start_xoffset = 0;
sensor.ccd_start_xoffset = 0;
sensor.sensor_pixels = 10800;
sensor.fau_gain_white_ref = 210;
sensor.gain_white_ref = 230;
@ -269,7 +269,7 @@ void genesys_init_sensor_tables()
sensor.ccd_size_divisor = 2;
sensor.black_pixels = 48;
sensor.dummy_pixel = 16;
sensor.CCD_start_xoffset = 0;
sensor.ccd_start_xoffset = 0;
sensor.sensor_pixels = 10872;
sensor.fau_gain_white_ref = 190;
sensor.gain_white_ref = 190;
@ -586,7 +586,7 @@ void genesys_init_sensor_tables()
sensor.optical_res = 1200,
sensor.black_pixels = 48;
sensor.dummy_pixel = 15;
sensor.CCD_start_xoffset = 0;
sensor.ccd_start_xoffset = 0;
sensor.sensor_pixels = 10872;
sensor.fau_gain_white_ref = 210;
sensor.gain_white_ref = 200;
@ -818,7 +818,7 @@ void genesys_init_sensor_tables()
sensor.ccd_size_divisor = 2;
sensor.black_pixels = 48;
sensor.dummy_pixel = 20;
sensor.CCD_start_xoffset = 0;
sensor.ccd_start_xoffset = 0;
sensor.sensor_pixels = 5368;
sensor.fau_gain_white_ref = 180;
sensor.gain_white_ref = 180;
@ -996,7 +996,7 @@ void genesys_init_sensor_tables()
sensor.ccd_size_divisor = 2;
sensor.black_pixels = 87;
sensor.dummy_pixel = 87;
sensor.CCD_start_xoffset = 0;
sensor.ccd_start_xoffset = 0;
sensor.sensor_pixels = 10400;
sensor.fau_gain_white_ref = 0;
sensor.gain_white_ref = 0;
@ -1041,7 +1041,7 @@ void genesys_init_sensor_tables()
sensor.optical_res = 600;
sensor.black_pixels = 5;
sensor.dummy_pixel = 38;
sensor.CCD_start_xoffset = 0;
sensor.ccd_start_xoffset = 0;
sensor.sensor_pixels = 5200;
sensor.fau_gain_white_ref = 200;
sensor.gain_white_ref = 200;
@ -1143,7 +1143,7 @@ void genesys_init_sensor_tables()
sensor.optical_res = 1200;
sensor.black_pixels = 48;
sensor.dummy_pixel = 16;
sensor.CCD_start_xoffset = 0;
sensor.ccd_start_xoffset = 0;
sensor.sensor_pixels = 10872;
sensor.fau_gain_white_ref = 210;
sensor.gain_white_ref = 200;
@ -1374,7 +1374,7 @@ void genesys_init_sensor_tables()
sensor.optical_res = 600;
sensor.black_pixels = 27;
sensor.dummy_pixel = 27;
sensor.CCD_start_xoffset = 0;
sensor.ccd_start_xoffset = 0;
sensor.sensor_pixels = 2496;
sensor.fau_gain_white_ref = 210;
sensor.gain_white_ref = 200;
@ -1419,7 +1419,7 @@ void genesys_init_sensor_tables()
sensor.optical_res = 600;
sensor.black_pixels = 27;
sensor.dummy_pixel = 27;
sensor.CCD_start_xoffset = 0;
sensor.ccd_start_xoffset = 0;
sensor.sensor_pixels = 5200;
sensor.fau_gain_white_ref = 210;
sensor.gain_white_ref = 200;
@ -1464,7 +1464,7 @@ void genesys_init_sensor_tables()
sensor.optical_res = 600;
sensor.black_pixels = 28;
sensor.dummy_pixel = 28;
sensor.CCD_start_xoffset = 0;
sensor.ccd_start_xoffset = 0;
sensor.sensor_pixels = 5200;
sensor.fau_gain_white_ref = 210;
sensor.gain_white_ref = 200;
@ -1509,7 +1509,7 @@ void genesys_init_sensor_tables()
sensor.optical_res = 600;
sensor.black_pixels = 27;
sensor.dummy_pixel = 27;
sensor.CCD_start_xoffset = 0;
sensor.ccd_start_xoffset = 0;
sensor.sensor_pixels = 10240;
sensor.fau_gain_white_ref = 210;
sensor.gain_white_ref = 200;
@ -1554,7 +1554,7 @@ void genesys_init_sensor_tables()
sensor.optical_res = 600;
sensor.black_pixels = 27;
sensor.dummy_pixel = 27;
sensor.CCD_start_xoffset = 0;
sensor.ccd_start_xoffset = 0;
sensor.sensor_pixels = 5020;
sensor.fau_gain_white_ref = 210;
sensor.gain_white_ref = 200;
@ -1599,7 +1599,7 @@ void genesys_init_sensor_tables()
sensor.optical_res = 4800;
sensor.black_pixels = 87*4;
sensor.dummy_pixel = 16*4;
sensor.CCD_start_xoffset = 320*8;
sensor.ccd_start_xoffset = 320*8;
sensor.sensor_pixels = 5136*8;
sensor.fau_gain_white_ref = 210;
sensor.gain_white_ref = 200;
@ -1736,7 +1736,7 @@ void genesys_init_sensor_tables()
sensor.black_pixels = 73*8; // black pixels 73 at 600 dpi
sensor.dummy_pixel = 16*8;
// 384 at 600 dpi
sensor.CCD_start_xoffset = 384*8;
sensor.ccd_start_xoffset = 384*8;
// 8x5570 segments, 5187+1 for rounding
sensor.sensor_pixels = 5188*8;
sensor.fau_gain_white_ref = 210;
@ -1873,7 +1873,7 @@ void genesys_init_sensor_tables()
sensor.optical_res = 2400;
sensor.black_pixels = 87*4, /* black pixels */
sensor.dummy_pixel = 16*4;
sensor.CCD_start_xoffset = 320*4;
sensor.ccd_start_xoffset = 320*4;
sensor.sensor_pixels = 5136*4;
sensor.fau_gain_white_ref = 210;
sensor.gain_white_ref = 200;
@ -1995,7 +1995,7 @@ void genesys_init_sensor_tables()
sensor.optical_res = 600;
sensor.black_pixels = 38;
sensor.dummy_pixel = 38;
sensor.CCD_start_xoffset = 152;
sensor.ccd_start_xoffset = 152;
sensor.sensor_pixels = 5376;
sensor.fau_gain_white_ref = 160;
sensor.gain_white_ref = 160;
@ -2042,7 +2042,7 @@ void genesys_init_sensor_tables()
sensor.black_pixels = 50*8;
// 31 at 600 dpi dummy_pixels 58 at 1200
sensor.dummy_pixel = 58;
sensor.CCD_start_xoffset = 152;
sensor.ccd_start_xoffset = 152;
sensor.sensor_pixels = 5360*8;
sensor.fau_gain_white_ref = 160;
sensor.gain_white_ref = 160;
@ -2224,7 +2224,7 @@ void genesys_init_sensor_tables()
sensor.black_pixels = 50*8;
// 31 at 600 dpi, 58 at 1200 dpi
sensor.dummy_pixel = 20;
sensor.CCD_start_xoffset = 152;
sensor.ccd_start_xoffset = 152;
// 5360 max at 600 dpi
sensor.sensor_pixels = 5360*8;
sensor.fau_gain_white_ref = 160;
@ -2273,7 +2273,7 @@ void genesys_init_sensor_tables()
sensor.black_pixels = 50*8;
// 31 at 600 dpi, 58 at 1200 dpi
sensor.dummy_pixel = 20;
sensor.CCD_start_xoffset = 152;
sensor.ccd_start_xoffset = 152;
// 5360 max at 600 dpi
sensor.sensor_pixels = 13600*4;
sensor.fau_gain_white_ref = 160;
@ -2486,7 +2486,7 @@ void genesys_init_sensor_tables()
sensor.ccd_size_divisor = 4;
sensor.black_pixels = 31;
sensor.dummy_pixel = 20;
sensor.CCD_start_xoffset = 0; // not used at the moment
sensor.ccd_start_xoffset = 0; // not used at the moment
// 11372 pixels at 1200 dpi
sensor.sensor_pixels = 11372*4;
sensor.fau_gain_white_ref = 160;
@ -2683,7 +2683,7 @@ void genesys_init_sensor_tables()
// sensor.ccd_size_divisor = 2; Possibly half CCD, needs checking
sensor.black_pixels = 96;
sensor.dummy_pixel = 26;
sensor.CCD_start_xoffset = 128;
sensor.ccd_start_xoffset = 128;
sensor.sensor_pixels = 42720;
sensor.fau_gain_white_ref = 210;
sensor.gain_white_ref = 230;
@ -2729,7 +2729,7 @@ void genesys_init_sensor_tables()
sensor.ccd_size_divisor = 2;
sensor.black_pixels = 87;
sensor.dummy_pixel = 16;
sensor.CCD_start_xoffset = 303;
sensor.ccd_start_xoffset = 303;
sensor.sensor_pixels = 5168*4;
sensor.fau_gain_white_ref = 210;
sensor.gain_white_ref = 200;
@ -2864,7 +2864,7 @@ void genesys_init_sensor_tables()
sensor.ccd_size_divisor = 2;
sensor.black_pixels = 87;
sensor.dummy_pixel = 16;
sensor.CCD_start_xoffset = 303;
sensor.ccd_start_xoffset = 303;
// SEGCNT at 600 DPI by number of segments
sensor.sensor_pixels = 5104*4;
sensor.fau_gain_white_ref = 210;
@ -3000,7 +3000,7 @@ void genesys_init_sensor_tables()
sensor.ccd_size_divisor = 2;
sensor.black_pixels = 87;
sensor.dummy_pixel = 16;
sensor.CCD_start_xoffset = 303;
sensor.ccd_start_xoffset = 303;
sensor.sensor_pixels = 5168*4;
sensor.fau_gain_white_ref = 210;
sensor.gain_white_ref = 200;
@ -3135,7 +3135,7 @@ void genesys_init_sensor_tables()
sensor.ccd_size_divisor = 2;
sensor.black_pixels = 87;
sensor.dummy_pixel = 16;
sensor.CCD_start_xoffset = 303;
sensor.ccd_start_xoffset = 303;
sensor.sensor_pixels = 5168*4;
sensor.fau_gain_white_ref = 210;
sensor.gain_white_ref = 200;
@ -3270,7 +3270,7 @@ void genesys_init_sensor_tables()
sensor.ccd_size_divisor = 2;
sensor.black_pixels = 87;
sensor.dummy_pixel = 87;
sensor.CCD_start_xoffset = 0;
sensor.ccd_start_xoffset = 0;
sensor.sensor_pixels = 10100;
sensor.fau_gain_white_ref = 210;
sensor.gain_white_ref = 230;
@ -3316,7 +3316,7 @@ void genesys_init_sensor_tables()
sensor.register_dpihw_override = 1200;
sensor.black_pixels = 88; // TODO
sensor.dummy_pixel = 20;
sensor.CCD_start_xoffset = 0;
sensor.ccd_start_xoffset = 0;
sensor.sensor_pixels = 10200; // TODO
sensor.fau_gain_white_ref = 210;
sensor.gain_white_ref = 230;
@ -3403,7 +3403,7 @@ void genesys_init_sensor_tables()
sensor.optical_res = 1200;
sensor.black_pixels = 31;
sensor.dummy_pixel = 31;
sensor.CCD_start_xoffset = 0;
sensor.ccd_start_xoffset = 0;
sensor.sensor_pixels = 10800;
sensor.fau_gain_white_ref = 210;
sensor.gain_white_ref = 200;
@ -3465,7 +3465,7 @@ void genesys_init_sensor_tables()
sensor.optical_res = 1200;
sensor.black_pixels = 31;
sensor.dummy_pixel = 31;
sensor.CCD_start_xoffset = 0;
sensor.ccd_start_xoffset = 0;
sensor.sensor_pixels = 10200;
sensor.fau_gain_white_ref = 210;
sensor.gain_white_ref = 200;
@ -3528,7 +3528,7 @@ void genesys_init_sensor_tables()
sensor.black_pixels = 20;
sensor.dummy_pixel = 6;
// tuned to give 3*8 multiple startx coordinate during shading calibration
sensor.CCD_start_xoffset = 34; // 14=>3, 20=>2
sensor.ccd_start_xoffset = 34; // 14=>3, 20=>2
// 10400, too wide=>10288 in shading data 10240~
// 10208 too short for shading, max shading data = 10240 pixels, endpix-startpix=10208
sensor.sensor_pixels = 10240;

Wyświetl plik

@ -71,7 +71,7 @@ Genesys_Calibration_Cache create_fake_calibration_entry()
sensor.optical_res = 1200;
sensor.black_pixels = 48;
sensor.dummy_pixel = 64;
sensor.CCD_start_xoffset = 0;
sensor.ccd_start_xoffset = 0;
sensor.sensor_pixels = 10800;
sensor.fau_gain_white_ref = 210;
sensor.gain_white_ref = 230;