kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Simplify calculation of shading upload parameters on gl847
rodzic
e54f15bcc8
commit
6e3713c87d
|
@ -906,8 +906,7 @@ void CommandSetGl847::send_shading_data(Genesys_Device* dev, const Genesys_Senso
|
|||
uint8_t* data, int size) const
|
||||
{
|
||||
DBG_HELPER_ARGS(dbg, "writing %d bytes of shading data", size);
|
||||
uint32_t addr, length, i, x, factor, pixels;
|
||||
uint32_t dpiset, dpihw;
|
||||
std::uint32_t addr, length, i, pixels;
|
||||
uint8_t val,*ptr,*src;
|
||||
|
||||
/* shading data is plit in 3 (up to 5 with IR) areas
|
||||
|
@ -920,12 +919,6 @@ void CommandSetGl847::send_shading_data(Genesys_Device* dev, const Genesys_Senso
|
|||
std::uint32_t strpixel = dev->session.pixel_startx;
|
||||
std::uint32_t endpixel = dev->session.pixel_endx;
|
||||
|
||||
/* compute deletion factor */
|
||||
dpiset = dev->reg.get16(REG_DPISET);
|
||||
dpihw = sensor.get_register_hwdpi(dpiset);
|
||||
factor=dpihw/dpiset;
|
||||
DBG(DBG_io2, "%s: factor=%d\n", __func__, factor);
|
||||
|
||||
pixels=endpixel-strpixel;
|
||||
|
||||
/* since we're using SHDAREA, substract startx coordinate from shading */
|
||||
|
@ -938,7 +931,7 @@ void CommandSetGl847::send_shading_data(Genesys_Device* dev, const Genesys_Senso
|
|||
dev->interface->record_key_value("shading_offset", std::to_string(strpixel));
|
||||
dev->interface->record_key_value("shading_pixels", std::to_string(pixels));
|
||||
dev->interface->record_key_value("shading_length", std::to_string(length));
|
||||
dev->interface->record_key_value("shading_factor", std::to_string(factor));
|
||||
dev->interface->record_key_value("shading_factor", std::to_string(sensor.shading_factor));
|
||||
|
||||
std::vector<uint8_t> buffer(pixels, 0);
|
||||
|
||||
|
@ -954,9 +947,8 @@ void CommandSetGl847::send_shading_data(Genesys_Device* dev, const Genesys_Senso
|
|||
* to the one corresponding to SHDAREA */
|
||||
ptr = buffer.data();
|
||||
|
||||
/* iterate on both sensor segment */
|
||||
for(x=0;x<pixels;x+=4*factor)
|
||||
{
|
||||
// iterate on both sensor segment
|
||||
for (unsigned x = 0; x < pixels; x += 4 * sensor.shading_factor) {
|
||||
/* coefficient source */
|
||||
src=(data+strpixel+i*length)+x;
|
||||
|
||||
|
|
|
@ -921,6 +921,7 @@ void genesys_init_sensor_tables()
|
|||
int exposure_lperiod;
|
||||
SensorExposure exposure;
|
||||
Ratio pixel_count_ratio;
|
||||
unsigned shading_factor;
|
||||
unsigned segment_size;
|
||||
std::vector<unsigned> segment_order;
|
||||
GenesysRegisterSettingSet custom_regs;
|
||||
|
@ -928,8 +929,40 @@ void genesys_init_sensor_tables()
|
|||
|
||||
CustomSensorSettings custom_settings[] = {
|
||||
// Note: Windows driver uses 1424 lperiod and enables dummy line (0x17)
|
||||
{ { 75, 100, 150, 200 },
|
||||
2848, { 304, 203, 180 }, Ratio{1, 8}, 5136, std::vector<unsigned>{}, {
|
||||
{ { 75 }, 2848, { 304, 203, 180 }, Ratio{1, 8}, 8, 5136, std::vector<unsigned>{}, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
{ 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 },
|
||||
{ 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c },
|
||||
{ 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f },
|
||||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
}
|
||||
},
|
||||
// Note: Windows driver uses 1424 lperiod and enables dummy line (0x17)
|
||||
{ { 100 }, 2848, { 304, 203, 180 }, Ratio{1, 8}, 6, 5136, std::vector<unsigned>{}, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
{ 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 },
|
||||
{ 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c },
|
||||
{ 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f },
|
||||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
}
|
||||
},
|
||||
// Note: Windows driver uses 1424 lperiod and enables dummy line (0x17)
|
||||
{ { 150 }, 2848, { 304, 203, 180 }, Ratio{1, 8}, 4, 5136, std::vector<unsigned>{}, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
{ 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 },
|
||||
{ 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c },
|
||||
{ 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f },
|
||||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
}
|
||||
},
|
||||
// Note: Windows driver uses 1424 lperiod and enables dummy line (0x17)
|
||||
{ { 200 }, 2848, { 304, 203, 180 }, Ratio{1, 8}, 3, 5136, std::vector<unsigned>{}, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
|
@ -940,7 +973,7 @@ void genesys_init_sensor_tables()
|
|||
}
|
||||
},
|
||||
// Note: Windows driver uses 788 lperiod and enables dummy line (0x17)
|
||||
{ { 300, 400 }, 1424, { 304, 203, 180 }, Ratio{1, 8}, 5136, std::vector<unsigned>{}, {
|
||||
{ { 300 }, 1424, { 304, 203, 180 }, Ratio{1, 8}, 2, 5136, std::vector<unsigned>{}, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
|
@ -950,7 +983,8 @@ void genesys_init_sensor_tables()
|
|||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
}
|
||||
},
|
||||
{ { 600 }, 1432, { 492, 326, 296 }, Ratio{1, 8}, 5136, std::vector<unsigned>{}, {
|
||||
// Note: Windows driver uses 788 lperiod and enables dummy line (0x17)
|
||||
{ { 400 }, 1424, { 304, 203, 180 }, Ratio{1, 8}, 1, 5136, std::vector<unsigned>{}, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
|
@ -960,7 +994,17 @@ void genesys_init_sensor_tables()
|
|||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
}
|
||||
},
|
||||
{ { 1200 }, 2712, { 935, 592, 538 }, Ratio{1, 8}, 5136, { 0, 1 }, {
|
||||
{ { 600 }, 1432, { 492, 326, 296 }, Ratio{1, 8}, 1, 5136, std::vector<unsigned>{}, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
{ 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 },
|
||||
{ 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c },
|
||||
{ 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f },
|
||||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
}
|
||||
},
|
||||
{ { 1200 }, 2712, { 935, 592, 538 }, Ratio{1, 8}, 1, 5136, { 0, 1 }, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x08 }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
|
@ -970,7 +1014,7 @@ void genesys_init_sensor_tables()
|
|||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
}
|
||||
},
|
||||
{ { 2400 }, 5280, { 1777, 1125, 979 }, Ratio{1, 8}, 5136, { 0, 2, 1, 3 }, {
|
||||
{ { 2400 }, 5280, { 1777, 1125, 979 }, Ratio{1, 8}, 1, 5136, { 0, 2, 1, 3 }, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x06 }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
|
@ -980,7 +1024,7 @@ void genesys_init_sensor_tables()
|
|||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
}
|
||||
},
|
||||
{ { 4800 }, 10416, { 3377, 2138, 1780 }, Ratio{1, 8}, 5136, { 0, 2, 4, 6, 1, 3, 5, 7 }, {
|
||||
{ { 4800 }, 10416, { 3377, 2138, 1780 }, Ratio{1, 8}, 1, 5136, { 0, 2, 4, 6, 1, 3, 5, 7 }, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x04 }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
|
@ -997,6 +1041,7 @@ void genesys_init_sensor_tables()
|
|||
sensor.exposure_lperiod = setting.exposure_lperiod;
|
||||
sensor.exposure = setting.exposure;
|
||||
sensor.pixel_count_ratio = setting.pixel_count_ratio;
|
||||
sensor.shading_factor = setting.shading_factor;
|
||||
sensor.segment_size = setting.segment_size;
|
||||
sensor.segment_order = setting.segment_order;
|
||||
sensor.custom_regs = setting.custom_regs;
|
||||
|
@ -1024,14 +1069,14 @@ void genesys_init_sensor_tables()
|
|||
int exposure_lperiod;
|
||||
SensorExposure exposure;
|
||||
Ratio pixel_count_ratio;
|
||||
unsigned shading_factor;
|
||||
unsigned segment_size;
|
||||
std::vector<unsigned> segment_order;
|
||||
GenesysRegisterSettingSet custom_regs;
|
||||
};
|
||||
|
||||
CustomSensorSettings custom_settings[] = {
|
||||
{ { 75, 100, 150, 200 },
|
||||
2848, { 465, 310, 239 }, Ratio{1, 8}, 5187, std::vector<unsigned>{}, {
|
||||
{ { 75 }, 2848, { 465, 310, 239 }, Ratio{1, 8}, 8, 5187, std::vector<unsigned>{}, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x0c }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x07 }, { 0x53, 0x03 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
|
@ -1041,7 +1086,7 @@ void genesys_init_sensor_tables()
|
|||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
}
|
||||
},
|
||||
{ { 300 }, 1424, { 465, 310, 239 }, Ratio{1, 8}, 5187, std::vector<unsigned>{}, {
|
||||
{ { 100 }, 2848, { 465, 310, 239 }, Ratio{1, 8}, 6, 5187, std::vector<unsigned>{}, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x0c }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x07 }, { 0x53, 0x03 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
|
@ -1051,7 +1096,7 @@ void genesys_init_sensor_tables()
|
|||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
}
|
||||
},
|
||||
{ { 600 }, 1504, { 465, 310, 239 }, Ratio{1, 8}, 5187, std::vector<unsigned>{}, {
|
||||
{ { 150 }, 2848, { 465, 310, 239 }, Ratio{1, 8}, 4, 5187, std::vector<unsigned>{}, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x0c }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x07 }, { 0x53, 0x03 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
|
@ -1061,7 +1106,37 @@ void genesys_init_sensor_tables()
|
|||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
}
|
||||
},
|
||||
{ { 1200 }, 2696, { 1464, 844, 555 }, Ratio{1, 8}, 5187, { 0, 1 }, {
|
||||
{ { 200 }, 2848, { 465, 310, 239 }, Ratio{1, 8}, 3, 5187, std::vector<unsigned>{}, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x0c }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x07 }, { 0x53, 0x03 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
{ 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 },
|
||||
{ 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x87 },
|
||||
{ 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0xf9 },
|
||||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
}
|
||||
},
|
||||
{ { 300 }, 1424, { 465, 310, 239 }, Ratio{1, 8}, 2, 5187, std::vector<unsigned>{}, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x0c }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x07 }, { 0x53, 0x03 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
{ 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 },
|
||||
{ 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x87 },
|
||||
{ 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0xf9 },
|
||||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
}
|
||||
},
|
||||
{ { 600 }, 1504, { 465, 310, 239 }, Ratio{1, 8}, 1, 5187, std::vector<unsigned>{}, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x0c }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x07 }, { 0x53, 0x03 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
{ 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 },
|
||||
{ 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x87 },
|
||||
{ 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0xf9 },
|
||||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
}
|
||||
},
|
||||
{ { 1200 }, 2696, { 1464, 844, 555 }, Ratio{1, 8}, 1, 5187, { 0, 1 }, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x07 }, { 0x53, 0x03 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
|
@ -1071,7 +1146,7 @@ void genesys_init_sensor_tables()
|
|||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
}
|
||||
},
|
||||
{ { 2400 }, 10576, { 2798, 1558, 972 }, Ratio{1, 8}, 5187, { 0, 1, 2, 3 }, {
|
||||
{ { 2400 }, 10576, { 2798, 1558, 972 }, Ratio{1, 8}, 1, 5187, { 0, 1, 2, 3 }, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x08 }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x07 }, { 0x53, 0x03 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
|
@ -1081,7 +1156,7 @@ void genesys_init_sensor_tables()
|
|||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
}
|
||||
},
|
||||
{ { 4800 }, 10576, { 2798, 1558, 972 }, Ratio{1, 8}, 5187,
|
||||
{ { 4800 }, 10576, { 2798, 1558, 972 }, Ratio{1, 8}, 1, 5187,
|
||||
{ 0, 1, 4, 5, 2, 3, 6, 7 }, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x06 }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
|
@ -1099,6 +1174,7 @@ void genesys_init_sensor_tables()
|
|||
sensor.exposure_lperiod = setting.exposure_lperiod;
|
||||
sensor.exposure = setting.exposure;
|
||||
sensor.pixel_count_ratio = setting.pixel_count_ratio;
|
||||
sensor.shading_factor = setting.shading_factor;
|
||||
sensor.segment_size = setting.segment_size;
|
||||
sensor.segment_order = setting.segment_order;
|
||||
sensor.custom_regs = setting.custom_regs;
|
||||
|
@ -1126,14 +1202,14 @@ void genesys_init_sensor_tables()
|
|||
int exposure_lperiod;
|
||||
SensorExposure exposure;
|
||||
Ratio pixel_count_ratio;
|
||||
unsigned shading_factor;
|
||||
unsigned segment_size;
|
||||
std::vector<unsigned> segment_order;
|
||||
GenesysRegisterSettingSet custom_regs;
|
||||
};
|
||||
|
||||
CustomSensorSettings custom_settings[] = {
|
||||
{ { 75, 100, 150, 200 },
|
||||
2304, { 423, 294, 242 }, Ratio{1, 4}, 5136, std::vector<unsigned>{}, {
|
||||
{ { 75 }, 2304, { 423, 294, 242 }, Ratio{1, 4}, 8, 5136, std::vector<unsigned>{}, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
|
@ -1143,7 +1219,7 @@ void genesys_init_sensor_tables()
|
|||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
}
|
||||
},
|
||||
{ { 300 }, 1728, { 423, 294, 242 }, Ratio{1, 4}, 5136, std::vector<unsigned>{}, {
|
||||
{ { 100 }, 2304, { 423, 294, 242 }, Ratio{1, 4}, 6, 5136, std::vector<unsigned>{}, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
|
@ -1153,7 +1229,37 @@ void genesys_init_sensor_tables()
|
|||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
}
|
||||
},
|
||||
{ { 600 }, 1432, { 423, 294, 242 }, Ratio{1, 4}, 5136, std::vector<unsigned>{}, {
|
||||
{ { 150 }, 2304, { 423, 294, 242 }, Ratio{1, 4}, 4, 5136, std::vector<unsigned>{}, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
{ 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 },
|
||||
{ 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c },
|
||||
{ 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f },
|
||||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
}
|
||||
},
|
||||
{ { 200 }, 2304, { 423, 294, 242 }, Ratio{1, 4}, 3, 5136, std::vector<unsigned>{}, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
{ 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 },
|
||||
{ 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c },
|
||||
{ 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f },
|
||||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
}
|
||||
},
|
||||
{ { 300 }, 1728, { 423, 294, 242 }, Ratio{1, 4}, 2, 5136, std::vector<unsigned>{}, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
{ 0x56, 0x00 }, { 0x57, 0x00 }, { 0x58, 0x2a }, { 0x59, 0xe1 }, { 0x5a, 0x55 },
|
||||
{ 0x74, 0x00 }, { 0x75, 0x00 }, { 0x76, 0x3c },
|
||||
{ 0x77, 0x00 }, { 0x78, 0x00 }, { 0x79, 0x9f },
|
||||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
}
|
||||
},
|
||||
{ { 600 }, 1432, { 423, 294, 242 }, Ratio{1, 4}, 1, 5136, std::vector<unsigned>{}, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x0a }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
|
@ -1163,7 +1269,7 @@ void genesys_init_sensor_tables()
|
|||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
},
|
||||
},
|
||||
{ { 1200 }, 2712, { 791, 542, 403 }, Ratio{1, 4}, 5136, {0, 1}, {
|
||||
{ { 1200 }, 2712, { 791, 542, 403 }, Ratio{1, 4}, 1, 5136, {0, 1}, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x08 }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
|
@ -1173,7 +1279,7 @@ void genesys_init_sensor_tables()
|
|||
{ 0x7a, 0x00 }, { 0x7b, 0x00 }, { 0x7c, 0x55 },
|
||||
}
|
||||
},
|
||||
{ { 2400 }, 5280, { 1504, 1030, 766 }, Ratio{1, 4}, 5136, {0, 2, 1, 3}, {
|
||||
{ { 2400 }, 5280, { 1504, 1030, 766 }, Ratio{1, 4}, 1, 5136, {0, 2, 1, 3}, {
|
||||
{ 0x16, 0x10 }, { 0x17, 0x06 }, { 0x18, 0x00 }, { 0x19, 0xff },
|
||||
{ 0x1a, 0x34 }, { 0x1b, 0x00 }, { 0x1c, 0x02 }, { 0x1d, 0x04 },
|
||||
{ 0x52, 0x03 }, { 0x53, 0x07 }, { 0x54, 0x00 }, { 0x55, 0x00 },
|
||||
|
@ -1190,6 +1296,7 @@ void genesys_init_sensor_tables()
|
|||
sensor.exposure_lperiod = setting.exposure_lperiod;
|
||||
sensor.exposure = setting.exposure;
|
||||
sensor.pixel_count_ratio = setting.pixel_count_ratio;
|
||||
sensor.shading_factor = setting.shading_factor;
|
||||
sensor.segment_size = setting.segment_size;
|
||||
sensor.segment_order = setting.segment_order;
|
||||
sensor.custom_regs = setting.custom_regs;
|
||||
|
|
Ładowanie…
Reference in New Issue