SX260 HS Porting Thread - page 27 - DryOS Development - CHDK Forum

SX260 HS Porting Thread

  • 642 Replies
  • 231132 Views
*

Online philmoz

  • *****
  • 3450
    • Photos
Re: SX260 HS Porting Thread
« Reply #260 on: 26 / May / 2012, 01:24:47 »
Advertisements
philmoz , why then it work in all the other modes, and fails only in auto ?


Possibly because the code path through 'capt_seq_task' is different in auto mode.
(Note, since this is a new version DryOS it could be a buffer issue - I'm just saying with all my ports this sort of problem is usually in the code.)

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX260 HS Porting Thread
« Reply #261 on: 26 / May / 2012, 01:57:31 »
yes it could be too, if it follows a diferent path then the raw stuff should called in diferent places checking for the mode and then calling "BL     capt_seq_hook_raw_here\n"

yuyu if you want to try other buffers this will be my bet:
0x41D346C0
0x40DADA80

*

Offline yuyu

  • *
  • 11
Re: SX260 HS Porting Thread
« Reply #262 on: 26 / May / 2012, 09:12:30 »
yuyu if you want to try other buffers this will be my bet:
0x41D346C0
0x40DADA80

Both contain garbage.
https://dl.dropbox.com/u/81185573/auto_buffers_DA80_and_46C0.zip

Playing with the cache bit (01D346C0 and 00DADA80) doesn't help either (hey, desperate measures).
« Last Edit: 26 / May / 2012, 09:24:47 by yuyu »

*

Offline yuyu

  • *
  • 11
Re: SX260 HS Porting Thread
« Reply #263 on: 26 / May / 2012, 16:34:55 »
I have dumped the whole 256MB of RAM (0x40000000-0x50000000) to the card on AUTO shoot and visually inspected the contents as pixels. There is no sight of the image in that range. It is my understanding that 0-0x10000000 is the same block but going through cache.

Needless to say, I find the image if i dump the memory when taking a pic on the other modes.

Given the evidence, it's pretty clear that the camera is not filling the buffers at all or at least the couple times I have dumped. I will keep trying things out.


PS: Easy mode is like Auto only without tracking, should be possible to tweak something to generate raws for auto, imho.
« Last Edit: 26 / May / 2012, 17:13:37 by yuyu »

*

Offline srsa_4c

  • ******
  • 4451
Re: SX260 HS Porting Thread
« Reply #264 on: 26 / May / 2012, 17:36:11 »
I have dumped the whole 256MB of RAM (0x40000000-0x50000000) to the card on AUTO shoot and visually inspected the contents as pixels.
What method/utility are you using to visualize the memory contents?

*

Online philmoz

  • *****
  • 3450
    • Photos
Re: SX260 HS Porting Thread
« Reply #265 on: 26 / May / 2012, 18:29:36 »
I have dumped the whole 256MB of RAM (0x40000000-0x50000000) to the card on AUTO shoot and visually inspected the contents as pixels. There is no sight of the image in that range.

The RAW data is destroyed during the JPEG conversion so if you are dumping the memory at the wrong time the image will be gone.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline yuyu

  • *
  • 11
Re: SX260 HS Porting Thread
« Reply #266 on: 26 / May / 2012, 19:27:46 »
I am dumping the data a bit before the call to write_dng() inside raw_savefile() (core/raw.c) so it is not destroyed. The image is there on all modes except auto.

I have used several methods, from a single 256MB file and some overengineeered and cumbersome naive statistical analysis of differences (full white frame overexposed dump vs black underexposed dump) to smaller chunks for visual inspection.

Automating it didn't work, so I finally settled on taking a regular scene pic and doing the following:

Dump the memory into regular  19167840 byte files (sensor widthxheight x 12 / 8 ) with the CRW extension as if it were any other sx260 raw. If you use a size that does not match framebuffer you will get even more distortion instead of a mere horizontal & vertical shift.

The output is a series of files like these:
Code: [Select]
-rw-r--r-- 1 yuyu users 19167840 May 26 20:40 addr_40000000.CRW
-rw-r--r-- 1 yuyu users 19167840 May 26 20:40 addr_41247A60.CRW
-rw-r--r-- 1 yuyu users 19167840 May 26 20:41 addr_4248F4C0.CRW
-rw-r--r-- 1 yuyu users 19167840 May 26 20:41 addr_436D6F20.CRW
-rw-r--r-- 1 yuyu users 19167840 May 26 20:41 addr_4491E980.CRW
-rw-r--r-- 1 yuyu users 19167840 May 26 20:41 addr_45B663E0.CRW
-rw-r--r-- 1 yuyu users 19167840 May 26 20:41 addr_46DADE40.CRW
-rw-r--r-- 1 yuyu users 19167840 May 26 20:41 addr_47FF58A0.CRW
-rw-r--r-- 1 yuyu users 19167840 May 26 20:41 addr_4923D300.CRW
-rw-r--r-- 1 yuyu users 19167840 May 26 20:41 addr_4A484D60.CRW
-rw-r--r-- 1 yuyu users 19167840 May 26 20:41 addr_4B6CC7C0.CRW
-rw-r--r-- 1 yuyu users 19167840 May 26 20:41 addr_4C914220.CRW
-rw-r--r-- 1 yuyu users 19167840 May 26 20:41 addr_4DB5BC80.CRW
-rw-r--r-- 1 yuyu users 19167840 May 26 20:41 addr_4EDA36E0.CRW

Then I created a DNG4PS-2 profile for the sx260 and batch converted them all to DNGs for inspection. Not perfect, but you can sense the image if its there. In fake colours, displaced and sometimes distorted, but easily noticeable.

PS: If you are not careful on what memory ranges and sizes you use you will get a camera crash after last file since you will be accesing non-existant memory addresses.
« Last Edit: 26 / May / 2012, 19:38:32 by yuyu »

*

Online philmoz

  • *****
  • 3450
    • Photos
Re: SX260 HS Porting Thread
« Reply #267 on: 26 / May / 2012, 19:36:02 »
I am dumping the data a bit before the call to write_dng() inside raw_savefile() (core/raw.c) so it is not destroyed.

This is not necessarily the case - if the call to 'capt_seq_hook_raw_here' is being made too late then the RAW data will already have been destroyed (which would also explain you're corrupted DNG images).

The 'capt_seq_task' code is complex and it is normal for different modes to use different paths through the code.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline yuyu

  • *
  • 11
Re: SX260 HS Porting Thread
« Reply #268 on: 26 / May / 2012, 19:39:45 »
I am dumping the data a bit before the call to write_dng() inside raw_savefile() (core/raw.c) so it is not destroyed.

This is not necessarily the case - if the call to 'capt_seq_hook_raw_here' is being made too late then the RAW data will already have been destroyed (which would also explain you're corrupted DNG images).

The 'capt_seq_task' code is complex and it is normal for different modes to use different paths through the code.

Phil.

There is hope then. Where do you suggest I hook?

*

Online philmoz

  • *****
  • 3450
    • Photos
Re: SX260 HS Porting Thread
« Reply #269 on: 27 / May / 2012, 01:43:43 »

There is hope then. Where do you suggest I hook?


Can't really say - the capt_seq_task code in this camera is quite different from any I've worked on.
It will require trial and error experimenting with different locations in the code to see what works best.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

 

Related Topics


SimplePortal © 2008-2014, SimplePortal