Adding new cameras, applying patches into trunk (with source code prepared) - page 41 - General Discussion and Assistance - CHDK Forum

Adding new cameras, applying patches into trunk (with source code prepared)

  • 1685 Replies
  • 863166 Views
*

Offline reyalp

  • ******
  • 14128
Advertisements
Patch to disable raw/dng saving in 'low light' mode on G12 & SX30 (can be enabled for other cameras using '#define CAM_DISABLE_RAW_IN_LOW_LIGHT_MODE 1' in platform_camera.h).
The raw files in this mode are corrupted and not usable.
Added, changeset 1245

This probably applies to all cameras with a "low light" or "high ISO" mode, and also the quick shooting mode on some newer cameras.

On D10, ISO3200 sets PROPCASE_RESOLUTION 3,  which is the same as non low light M3... I have a suspicion the resolution values will vary by model and sensor, not only propset.

A long time ago, I wanted to associated flags with modemap values (so for a given camera, you could say X is a reduced res mode, Y uses the user shutter speed etc.)

It would be interesting to figure out the raw data format in these modes, assuming raw data is available, since it should give you a reduced resolution (~1/2 size), quick saving raw.

Bad pixel removal should also be disabled, since it would poke values outside of the raw buffer, and raw histogram will obviously return bogus results.
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos
This patch is for raw/dng saving on the SX220HS and IXUS 310HS (probably the SX230HS will need it as well).

There are two changes.

1. Add a new function to wrappers.c that checks if a directory exists before calling mkdir on it (mkdir_if_not_exist).

This is needed because repeatedly calling mkdir in raw_savefile in continuous shooting mode locks up the camera.

2. Add a simple run length compression for the badpixel.bin file.

The CMOS sensors appear to have groups of bad pixels in vertical lines up to 4-6 pixels tall. This change detects vertical runs of bad pixels and stores the run length (up to 8 pixels) in the top 3 bits of the y co-ordinate. It saves approx 45% on the file size. This is conditionally compiled code; but should be safe to use until Canon release a 48 megapixel P&S camera :)

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 philmoz

  • *****
  • 3450
    • Photos
This patch is for raw/dng saving on the SX220HS and IXUS 310HS (probably the SX230HS will need it as well).

Added this in changeset 1249.

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 funnel

  • ****
  • 349
Patch for sx220 includes:

-new defs in platform_camera.c to disable raw in lowlight mode and compression of badpixel.bin
-shooting.c: now using the GetImageFolder function to get the target_dir_name.
-cleanup of boot.c. Removed dual partition support. New cameras support booting from fat32 partitions.
-capt_seq.c: moved capt_seq_hook_raw_here and added the short shutter press fix code.
-assigned more exmem memory in makefile.inc because the big badpixel.bin(made at ISO3200 181kb) caused lua scripts to throw a not enough memory error.
-stubs_entry_2.S comments cleanup.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Patch for sx220 includes:

Added in changeset 1251.

Edit: Changeset 1253 also adds support for the MakeSDCardBootable function in make_filesystem_bootable (to support making FAT32 cards bootable from the CHDK menu). Add CAM_DRYOS_2_3_R47 to platform_camera.h to enable this for the SX220.

Phil.

« Last Edit: 29 / July / 2011, 04:54:01 by philmoz »
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)

Addition of philmoz CAM_DETECT_SCREEN_ERASE for the IXUS120_SD940.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Addition of philmoz CAM_DETECT_SCREEN_ERASE for the IXUS120_SD940.

Added in changeset 1255.
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)

Added in changeset 1255.

Wow - that is probably a record from time elapsed from submission of a patch to trunk updata.  Thanks!
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 4451
Hi!

Attached is a patch for the A410. It increases the movie time limit from 3 minutes to 1 hour in 320x240 and 640x480 modes.
The firmware function I changed here can be found in many VXWORKS cameras. There is a possibility that the usual 1 hour time limit could be lifted (but I've never tried that).

*

Offline philmoz

  • *****
  • 3450
    • Photos
Hi!

Attached is a patch for the A410. It increases the movie time limit from 3 minutes to 1 hour in 320x240 and 640x480 modes.
The firmware function I changed here can be found in many VXWORKS cameras. There is a possibility that the usual 1 hour time limit could be lifted (but I've never tried that).


Added in changeset 1256.
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