SX520HS Porting thread. - page 17 - DryOS Development - CHDK Forum

SX520HS Porting thread.

  • 209 Replies
  • 91686 Views
Re: SX520HS Porting thread.
« Reply #160 on: 27 / May / 2016, 04:32:07 »
Advertisements
Using a badpixel generated at 400 is actually fine, as long as your camera has enough free RAM. CHDK only actually patches the pixel if it is marked bad by the Canon firmware for the current ISO. The whole badpixel.bin is just a speed optimization, because scanning the whole raw buffer is very slow. So in general, you should generate your badpixel list at the highest ISO you plan to shoot.
Thank you, this sounds promising but at the same time I have some doubts. I always thought that CHDK allows to map out all bad pixels it can detect itself, regardless of the Canon map. This helps when the sensor gets older and new ones appear. My experience confirms this. My older Canon shows many hotpixels on JPEGs but CHDK gets rid of them. SX520 had one hotpixel in JPEG from very beginning but CHDK makes all clean.

My RawTherapee cannot work with 1.3 fully for bad pixels, but I think I know how can I solve my problem even without permanently using a map generated with high ISO. I think that for the photos made with higher ISOs I can have an additional map generated with dcraw and use it for conversions in exceptional situations. I use ISO 100 99% of the time as higher ones do not make much sense on the tiny sensor, so it does not happen frequently. Yesterday the problem was that I was having fun with JPEGs set to black and white, and later, for one picture I wanted to get a color version, which was all dusty.

Another possibility is probably scripting to swap badpixel files of CHDK, but can it work dynamically, or the file is only loaded once at startup?

Edit: interestingly, ISO 200 makes exactly the same badpixel.bin as ISO 100. Jump to 400 - four times as much.

(I'm sorry we are now deviated from the "porting" here).
« Last Edit: 27 / May / 2016, 04:36:05 by ilya345 »

*

Offline reyalp

  • ******
  • 14128
Re: SX520HS Porting thread.
« Reply #161 on: 27 / May / 2016, 13:14:27 »
Thank you, this sounds promising but at the same time I have some doubts. I always thought that CHDK allows to map out all bad pixels it can detect itself, regardless of the Canon map. This helps when the sensor gets older and new ones appear. My experience confirms this. My older Canon shows many hotpixels on JPEGs but CHDK gets rid of them. SX520 had one hotpixel in JPEG from very beginning but CHDK makes all clean.
I'm not sure what you are seeing, but this isn't how the code actually works.

CHDK badpixel.bin only handles pixels the Canon firmware sets to 0. As far as we know, this list is set in the factory, with different maps depending on ISO, temperature etc. badpixel.bin is generated by scanning the entire buffer for 0 valued pixels, and making a list of them (see modules/dng.c raw_init_badpixel_bin). As I mentioned before, this is only done as a speed optimization, because scanning the entire buffer takes a few seconds.

CHDK DNG badpixel.bin does not affect Canon jpeg at all: The Canon jpeg process recognizes 0 value pixels and fixes them automatically.

You can separately generate a text file called badpixel with the coordinates of hot (or otherwise bad) pixels the canon firmware doesn't know about. This can be used to fix hot pixels in both the DNG and Canon jpeg.

If you are processing a DNG, the 0 valued pixels can look "hot" because only one color component is 0 value, giving a pixel that looks saturated with the other colors (e.g. blue is dead, so red+green=yellow pixel)

Quote
My RawTherapee cannot work with 1.3 fully for bad pixels, but I think I know how can I solve my problem even without permanently using a map generated with high ISO.
The "hot / dead pixel" option on the raw tab should help quite a bit, but in my experience doesn't totally fix it, especially where there are multiple adjacent bad pixels.

Quote
I think that for the photos made with higher ISOs I can have an additional map generated with dcraw and use it for conversions in exceptional situations.
As I mentioned, you can also use chdkptp to fix the bad pixels in the dng file itself, or generate a of pixels for use with raw thereapee.

Quote
Another possibility is probably scripting to swap badpixel files of CHDK, but can it work dynamically, or the file is only loaded once at startup?
It's loaded when the DNG 1.1 is enabled, at startup if you have the setting set. It is unloaded when the module is unloaded, which should happen if you turn of DNG completely. You might be able to switch in script with set_config_value, but it wouldn't be very convenient.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: SX520HS Porting thread.
« Reply #162 on: 27 / May / 2016, 13:15:08 »
@srsa_4c

Crash because ISO override is gone.
That's good news.
Quote
The screen itself is showing the ISO to 3200. Even increasing ISO upto 10000 is possible in CHDK menu. but is limited to 3200.. But now for Tv=1s, ISO was previously going to 10000, now it is limited there also to 3200.
The limit is only enforced in places where it is crucial. That does not include the CHDK user interface, which can be somewhat confusing.

Quote
But only once I crashed now. After crash, again some photos are taken at same settings and No crash is observed. Attaching ROMLOG file. please have a look on that.
This is not good news, however.
Crash happened at the same location as one of your earlier crashes:
ASSERT!! CaptureAKBAD.c Line 537
That code path only exists in recent CMOS models, so I won't be able to debug it myself.

If you (or someone else) could come up with a way to reproduce, that would be helpful.

Re: SX520HS Porting thread.
« Reply #163 on: 27 / May / 2016, 13:23:26 »
What is to be reproduced?? crash??

*

Offline srsa_4c

  • ******
  • 4451
Re: SX520HS Porting thread.
« Reply #164 on: 27 / May / 2016, 13:35:40 »
What is to be reproduced?? crash??
Yes.
It would maybe help us come up with a workaround, or, it would then be possible to make a special CHDK build to save helpful debug information about the crash conditions.

edit:
To be more clear.
By "reproduce" I mean finding a set of camera and/or CHDK settings and perhaps shooting conditions that ends up crashing the camera with a good probability.
« Last Edit: 27 / May / 2016, 13:40:45 by srsa_4c »

Re: SX520HS Porting thread.
« Reply #165 on: 27 / May / 2016, 13:38:10 »
Ok then.. I will try crashing it and will upload the ROMLOG file...  :)

*

Offline srsa_4c

  • ******
  • 4451
Re: SX520HS Porting thread.
« Reply #166 on: 27 / May / 2016, 13:42:33 »
Ok then.. I will try crashing it and will upload the ROMLOG file...  :)
Please read my edited post. I'm interested in a step-by-step guide on how to crash the camera.

Re: SX520HS Porting thread.
« Reply #167 on: 27 / May / 2016, 13:52:58 »
@ srsa_4c,

Anyways I was trying such permutations.. I tried with these.. Attaching romlog file. Only once, I again crashed the camera. I am attaching a photo of the settings.. But now at these settings even everything is working normally...

Re: SX520HS Porting thread.
« Reply #168 on: 27 / May / 2016, 13:55:10 »
See this photo of settings..'


Re: SX520HS Porting thread.
« Reply #169 on: 27 / May / 2016, 14:41:08 »
reyalp, thank you so much for your explanations! Maybe it's a combination of many factors that you mentioned that makes the difference (that CHDK seems to map out hotpixels that appeared in the last couple of years, while Canon itself skips them).

Whatever way it works, I know how to handle those things now (apart from RT - maybe I have an outdated version that does not do well with 1.3). And I really appreciate your efforts and those of srsa_4c and blackhole!

 

Related Topics


SimplePortal © 2008-2014, SimplePortal