sx700 porting - page 12 - DryOS Development - CHDK Forum supplierdeeply

sx700 porting

  • 184 Replies
  • 103836 Views
*

Offline srsa_4c

  • ******
  • 4451
Re: sx700 porting
« Reply #110 on: 26 / January / 2018, 15:43:52 »
Advertisements
Here is the file
Thanks. The dump's main part matches the 100e dump I have. The rest of the dump may or may not be ok (we can't evaluate that part as its structure is mostly unknown and camera specific).

However, I spotted a typo in the 100e CHDK source.

@ftm
The following line in boot.c is incorrect:
Code: [Select]
"    ldr     r0, =0x0815\n" //at fc05d340You should copy that instruction from the source, as is.
Code: [Select]
capdis -f=chdk -s=CreateTask -c=12 -stubs PRIMARY.BIN 0xfc000000
// CreateTask_FW 0x010c5075
"    push.w  {r1, r2, r3, r4, r5, r6, r7, r8, sb, lr}\n"
"    mov     r4, r0\n"
"    ldr     r0, =0x0000815c\n"
"    mov     r6, r1\n"
I stopped looking here, try comparing the source to the disassembly for other unintended changes.

If 0x815 is an uninitialized part of memory, that might explain the failure on WalkerOfTheDay's camera.

Re: sx700 porting
« Reply #111 on: 26 / January / 2018, 19:28:17 »
Here is the file
Thanks. The dump's main part matches the 100e dump I have. The rest of the dump may or may not be ok (we can't evaluate that part as its structure is mostly unknown and camera specific).

However, I spotted a typo in the 100e CHDK source.

@ftm
The following line in boot.c is incorrect:
Code: [Select]
"    ldr     r0, =0x0815\n" //at fc05d340You should copy that instruction from the source, as is.
Code: [Select]
capdis -f=chdk -s=CreateTask -c=12 -stubs PRIMARY.BIN 0xfc000000
// CreateTask_FW 0x010c5075
"    push.w  {r1, r2, r3, r4, r5, r6, r7, r8, sb, lr}\n"
"    mov     r4, r0\n"
"    ldr     r0, =0x0000815c\n"
"    mov     r6, r1\n"
I stopped looking here, try comparing the source to the disassembly for other unintended changes.

If 0x815 is an uninitialized part of memory, that might explain the failure on WalkerOfTheDay's camera.

Thank so much for reviewing the dump and spotting the error !
Hopefully the next version fixes it. Can't wait to try.

However, I'm curious to know why this would be an issue in my camera while others don't have the problem ?

*

Offline reyalp

  • ******
  • 14082
Re: sx700 porting
« Reply #112 on: 26 / January / 2018, 23:07:24 »
I fixed the CreateTask typo in r4986. It should be on the autobuild within half an hour. Please report if it fixes the problem.

Normally I'd post a test build before checking in, but this unambiguously needed to be done regardless of whether it was the cause of this specific problem.
Don't forget what the H stands for.

Re: sx700 porting
« Reply #113 on: 27 / January / 2018, 05:28:19 »
I fixed the CreateTask typo in r4986. It should be on the autobuild within half an hour. Please report if it fixes the problem.

Normally I'd post a test build before checking in, but this unambiguously needed to be done regardless of whether it was the cause of this specific problem.

Yes ! That did the trick. No more freezes.

One thing I did notice, when I put the camera in Auto (which I usually never do) I get distorted images, at least jpeg (haven't looked at the DNG yet).

It like halve a picture with a lot of pink.

Like this:


« Last Edit: 27 / January / 2018, 15:04:20 by WalkerOfTheDay »


*

Offline reyalp

  • ******
  • 14082
Re: sx700 porting
« Reply #114 on: 27 / January / 2018, 15:53:11 »
Yes ! That did the trick. No more freezes.
Great :)
Quote
One thing I did notice, when I put the camera in Auto (which I usually never do) I get distorted images, at least jpeg (haven't looked at the DNG yet).
Just to be clear DNG was enabled, but you see the corruption in jpeg?

It would definitely be helpful to know what the DNG looks like in this case.

If it happens without CHDK DNG enabled, that would point to a different kind of problem.

@ftm I would guess this is means the raw buffer is incorrect (sometimes?) in auto mode, and the byte reversing for DNG corrupts it. Auto mode on modern powershots is sort of a meta-mode that tries to identify the specific type of scene, so it could behave quite differently under different conditions.
Don't forget what the H stands for.

Re: sx700 porting
« Reply #115 on: 27 / January / 2018, 16:04:01 »
Yes ! That did the trick. No more freezes.
Great :)
Quote
One thing I did notice, when I put the camera in Auto (which I usually never do) I get distorted images, at least jpeg (haven't looked at the DNG yet).
Just to be clear DNG was enabled, but you see the corruption in jpeg?

It would definitely be helpful to know what the DNG looks like in this case.

If it happens without CHDK DNG enabled, that would point to a different kind of problem.

@ftm I would guess this is means the raw buffer is incorrect (sometimes?) in auto mode, and the byte reversing for DNG corrupts it. Auto mode on modern powershots is sort of a meta-mode that tries to identify the specific type of scene, so it could behave quite differently under different conditions.
Yes it happens with DNG enabled (haven't tested without though).

The DNG looks like attached image in Lightroom.

*

Offline ftm

  • *
  • 43
Re: sx700 porting
« Reply #116 on: 27 / January / 2018, 16:11:48 »
Sorry, I've been out of contact for the last couple days.
@srsa_4c -- thanks for finding this error and @reyalp -- thanks for updating the code.
I don't get any of the raw issues as seen by @walker. My auto mode dngs look fine.

*

Offline reyalp

  • ******
  • 14082
Re: sx700 porting
« Reply #117 on: 27 / January / 2018, 17:05:31 »
I don't get any of the raw issues as seen by @walker. My auto mode dngs look fine.
It is almost certainly scene and/or setting specific.

@WalkerOfTheDay if you upload the original jpeg rather than using imgur, we can see the exif, which might help identify what triggers this. If it's too large for the forum, you can use a file hosting site like dropbox, box.com, google drive etc.
Don't forget what the H stands for.


*

Offline srsa_4c

  • ******
  • 4451
Re: sx700 porting
« Reply #118 on: 28 / January / 2018, 09:04:31 »
My auto mode dngs look fine.
IMHO, if enabling raw in certain modes corrupts pictures, raw in those modes should be disabled.
You may want to add a few CAM_DISABLE_RAW_ defines to platform_camera.h, or, implement reyalp's advanced raw buffer handling code (g7x, sx710).

Re: sx700 porting
« Reply #119 on: 29 / January / 2018, 09:39:47 »
I don't get any of the raw issues as seen by @walker. My auto mode dngs look fine.
Okay, here's the original image taken in Auto mode.

It is almost certainly scene and/or setting specific.

@WalkerOfTheDay if you upload the original jpeg rather than using imgur, we can see the exif, which might help identify what triggers this. If it's too large for the forum, you can use a file hosting site like dropbox, box.com, google drive etc.

https://drive.google.com/open?id=11LGOdnAZxB4PuoLzghlrRLueGqyz-eio

 

Related Topics