I hope this will answer your question. I had already been confused with bad_pixel processing.
There are 3 bad pixel processes :
First, the Canon bad pixel removal process, integrated to your camera, to remove bad pixels known at the Canon plant. It is applied during jpeg process, without learning capability.
The second process, use a CHDK's user created file "badpixel.txt" (or "badpixel") in CHDK folder, to create a list of bad pixels at CHDK boot up. The structure of the text file, per line, is [ col , line ] (ex: "123,456"). This The bad pixel's removal process will be execute just before CHDK raw and dng "check-to-save" (see raw.c) during CHDK raw process (and therefore CHDK dng process since raw process is preliminary).
The third process, use "badpixel.bin" in CHDK folder and is created by CHDK's raw/dng menu "create bad pixel bin", to remove bad pixels learned from black exposure. This bad pixel's removal process is executed only when DNG file is saved to SD card.
Briefly,
- Canon bad pixel process remove "JPEG plant known bad pixels";
- CHDK "badpixel.txt" file is used to remove "JPG/RAW/DNG CHDK's user known bad pixels";
........ raw.c, rev 1414, line 190, if (conf.bad_pixel_removal) patch_bad_pixels();
- CHDK "badpixel.bin" file is used to remove "DNG CHDK learned bad pixels".
........ raw.c, rev 1414, line 254, patch_bad_pixels_b();
P.S.: To complete waterwingz's comms, from what I know, jpeg file is created from raw data space and therefore applying bad pixel removal processes to raw data space will remove bad pixels but the second process is executed only during raw process and the third process is executed only during dng process.