IXUS 130 (SD1400 IS) Porting Thread - page 11 - DryOS Development - CHDK Forum

IXUS 130 (SD1400 IS) Porting Thread

  • 288 Replies
  • 148772 Views
*

Offline reyalp

  • ******
  • 14138
Re: IXUS 130 (SD1400 IS) Porting Thread
« Reply #100 on: 24 / November / 2010, 16:24:22 »
Advertisements
Bitmap buffer layout is wrong.  You might want to look at the aspect correction stuff on other recent cameras.
Don't forget what the H stands for.

*

Offline emlyn

  • **
  • 88
Re: IXUS 130 (SD1400 IS) Porting Thread
« Reply #101 on: 24 / November / 2010, 18:02:49 »
This is the what I get with the edge overlay. You see that it's not noise...

Thanks, that shows quite clearly what you mean. I hadn't looked in detail, and what I had looked at was too complex to notice the repeating pattern.

Bitmap buffer layout is wrong.  You might want to look at the aspect correction stuff on other recent cameras.

Hmmm, but the menu and other OSD things look OK, I already implemented the aspect correction to get them looking right (although I wasn't sure what ASPECT_VIEWPORT_XCORRECTION does, and just left it as it was, just calling ASPECT_GRID_XCORRECTION).
Could it be instead the buffer from which the edge overlay is calculated?

EDIT: found it! it was the get_viewport_width value that was wrong, corrected value has been pushed to my github repository.
« Last Edit: 24 / November / 2010, 18:38:17 by emlyn »

*

Offline emlyn

  • **
  • 88
Re: IXUS 130 (SD1400 IS) Porting Thread
« Reply #102 on: 25 / November / 2010, 06:39:45 »
RAW is now working!

I used mainly asm1989's sx210 port as reference.
The call to capt_seq_hook_raw_here in the jumptable entry 0 that confused me before, was in fact never called, but there is another call to it in sub_ff87a714_my, which is called at the end of entry 1.

The PARAM_FILE_COUNTER was also wrong, which is strange as I'm pretty sure I verified this after pixeldoc2000 suggested it...

I found a preliminary colour matrix by playing around with dng4ps2 that seems to work, but it probably needs optimising. The DNG looks slightly darker and more saturated than the camera-generated JPG, and it has a quite a bit wider field of view.

Saving the RAW file takes around 10 seconds, which seems a bit slow to me, but it might be due to my very old and slow SD card I am using for testing.

EDIT: If anyone wants to try it, the binaries for both firmware 100c and 100a are on my downloads page.
« Last Edit: 25 / November / 2010, 15:49:42 by emlyn »

*

Offline emlyn

  • **
  • 88
Re: IXUS 130 (SD1400 IS) Porting Thread
« Reply #103 on: 25 / November / 2010, 06:44:45 »
EDIT: found it! it was the get_viewport_width value that was wrong, corrected value has been pushed to my github repository.

Still not quite there, it works after powering on, then when a photo is taken it stops updating, until a second photo is taken. Maybe there are two buffers that are switched whenever a photo is taken?
« Last Edit: 25 / November / 2010, 08:35:40 by emlyn »

*

Offline psc

  • *
  • 14
Re: IXUS 130 (SD1400 IS) Porting Thread
« Reply #104 on: 25 / November / 2010, 12:19:08 »
RAW is now working!

On my camera, I get some crw files (21 832 704 bytes), but I can't open them (I'm using Canon DPP 3.7.2, and UFRaw). ON the contrary I can open the DNG file (21 871 104 bytes).
Moreover, even if I'm using a quite old 512Mb SD card, it takes "only" 4-5 seconds to save the RAW image.
Anyway, I think that it's time to change to magenta the color of our camera!

Re: IXUS 130 (SD1400 IS) Porting Thread
« Reply #105 on: 25 / November / 2010, 13:34:55 »
Maybe there are two buffers that are switched whenever a photo is taken?

draw_pixel_std() in gui_draw.c is the low level routine that the various screen write functions use. It write to two screen buffers each time:

Code: [Select]
static void draw_pixel_std(unsigned int offset, color cl) {
    frame_buffer[0][offset] = frame_buffer[1][offset] = cl & 0xff;
}
Does that help ?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline emlyn

  • **
  • 88
Re: IXUS 130 (SD1400 IS) Porting Thread
« Reply #106 on: 25 / November / 2010, 15:44:51 »
On my camera, I get some crw files (21 832 704 bytes), but I can't open them (I'm using Canon DPP 3.7.2, and UFRaw).
As I understand it, the CRW files are just a raw dump of the sensor buffer, with no header or extra information, so the only way to identify them is with a database mapping file sizes to settings, and that database has not yet been updated with the IXUS 130 info.
I was able to convert them to DNG using DNG4PS2, by manually setting the info. If anyone else wants to play with this, the settings I used were:
Code: [Select]
Camera Name: Canon IXUS 130 / Canon PowerShot SD1400 IS
Short name: IXUS 130 / PowerShot SD1400 IS
Sensor size: 4416 x 3296
Jpeg size: 4320 x 3240
Active zone x1, y1: 48, 28
Active zone x2, y2: 4368, 3268
Black-white levels: 127, 4095
Mosaic type: Red,Green,Green,Blue
Bits per unit: 12
Illuminant: Daylight
Matrix: 0.510370 -0.068998 -0.086859 -0.279980 0.766686 0.067944 -0.014382 0.113688 0.239853
Multiplicator: 1.0 1.0 1.0

Quote
ON the contrary I can open the DNG file (21 871 104 bytes).
Moreover, even if I'm using a quite old 512Mb SD card, it takes "only" 4-5 seconds to save the RAW image.
My SD card is only 256Mb, and I've taken and deleted a few pictures, so maybe it's likely quite fragmented (although thinking about it that probably doesn't affect flash storage too much), I'll try it on a newer card soon.

Quote
Anyway, I think that it's time to change to magenta the color of our camera!
Good idea, I've made the change :)

*

Offline emlyn

  • **
  • 88
Re: IXUS 130 (SD1400 IS) Porting Thread
« Reply #107 on: 25 / November / 2010, 17:04:35 »
Maybe there are two buffers that are switched whenever a photo is taken?

draw_pixel_std() in gui_draw.c is the low level routine that the various screen write functions use. It write to two screen buffers each time:
...
Does that help ?

I actually meant two buffers with picture data (used to calculate the edge overlay). If the camera has two, but CHDK only knows about one of them, then half the time the edge overlay will be wrong.

*

Offline reyalp

  • ******
  • 14138
Re: IXUS 130 (SD1400 IS) Porting Thread
« Reply #108 on: 25 / November / 2010, 17:13:50 »
I actually meant two buffers with picture data (used to calculate the edge overlay).
FWIW, we call this the viewport. There are several functions in lib.c used to get the frame buffer address in various situations.
Don't forget what the H stands for.

*

Offline emlyn

  • **
  • 88
Re: IXUS 130 (SD1400 IS) Porting Thread
« Reply #109 on: 25 / November / 2010, 17:23:45 »
I've noticed an issue with the raw images: the bad pixels are not being properly interpolated. See a small section of an image here:
They are still black, and are also surrounded by a cyan, magenta or yellow region (presumably depending on whether the dead pixel is a red, green or blue one).
I might try and regenerate the bad pixel file, maybe that is not right. Is there anything else that could cause this?

 

Related Topics


SimplePortal © 2008-2014, SimplePortal