Hi,
I believe I found a bug in the getpixel/setpixel functions.
In core/raw.c: functions set_raw_pixel and get_raw_pixel
#if 0
/* original code */
unsigned char* addr=(unsigned char*)get_raw_image_addr()+y*RAW_ROWLEN+(x/8)*CAM_SENSOR_BITS_PER_PIXEL;
#else
/* Put division second to avoid skipped pixels from order of precidence */
unsigned char* addr=(unsigned char*)get_raw_image_addr()+y*RAW_ROWLEN+(x*CAM_SENSOR_BITS_PER_PIXEL)/8;
#endif
Currently, the code does division first -- truncating bits. Then it multiplies.
It should multiply first, then divide.
The change needs to be done in 4 places: 10-bit and 12-bit access for both set and get.
Doing this change increased my badpixel.bin file from 8K to 25K.