Experiments

The following builds are works in progress, known to have rough edges.
Please test thoroughly before considering them for serious work.
The functionality from this page will be integrated in the main builds as soon as all major issues will be ironed out.
However, we need your help. If you use any of these builds, please report your experience.
Still confused? Each experimental build has a link to the relevant forum thread, where you can discuss the new features.
You may also check this page for ideas on how to help, and this page for how to suggest changes with a pull request, from your web browser.

Latest Lua updates + fixes (please review)

Latest Lua updates (details).

Includes many other backend changes, e.g. focus, menu, Q button handling, fonts etc.

Therefore, it's important to give it a good try on all functions, not just Lua, so we can include it in the nightly builds.

Also includes lens.focus_pos and dynamic-my-menu.

Forum discussion

Branch: lua_fix

Latest Build (2018-03-31 16:07)

magiclantern-lua_fix.2018Mar31.100D101.zip

magiclantern-lua_fix.2018Mar31.1100D105.zip

magiclantern-lua_fix.2018Mar31.500D111.zip

magiclantern-lua_fix.2018Mar31.50D109.zip

magiclantern-lua_fix.2018Mar31.550D109.zip

magiclantern-lua_fix.2018Mar31.5D2212.zip

magiclantern-lua_fix.2018Mar31.5D3113.zip

magiclantern-lua_fix.2018Mar31.5D3123.zip

magiclantern-lua_fix.2018Mar31.600D102.zip

magiclantern-lua_fix.2018Mar31.60D111.zip

magiclantern-lua_fix.2018Mar31.650D104.zip

magiclantern-lua_fix.2018Mar31.6D116.zip

magiclantern-lua_fix.2018Mar31.700D115.zip

magiclantern-lua_fix.2018Mar31.70D112.zip

magiclantern-lua_fix.2018Mar31.7D203.zip

magiclantern-lua_fix.2018Mar31.EOSM202.zip

4918aef: lua_task: task name must be allocated by caller (it's not copied, so we must not modify it afterwards)
Easiest way: use the same name for all tasks started by Lua scripts.

d8f2726: Lua: added sleep() with floating-point argument
(similar to msleep)

8c2dab6: Lua: option to disable powersave while running tasks created from scripts
Example: task.create(func, nil, nil, true)

18a131e: Powersave: experimental option to disable the 30-minute timer in LiveView

446e2eb: Powersave: simplified the option to enable while recording;
updated help; aligned menu definition

e2310ef: menu: experimental fix for issue #1974 (timeout in LiveView, 6D/M/100D/70D)
Hypothesis: https://bitbucket.org/hudson/magic-lantern/issues/1974/6df#comment-44206798
Tested on 5D3 with GUI mode 41.
Tested in QEMU on 6D (it keeps poking the MPU while ML menu is open).

c0dad01: property.h: fix declaration of prop_deliver
(first argument is a pointer to the property, unlike prop_request_change)

609d604: boot-hack: no real reason to use short for magic_off
(

53cf435: boot-hack: make sure our relocation buffer is 32-bit aligned
(it usually is, unless compiler decides otherwise)

39156e3: Lua: experimental camera.flash (get/set)
shoot.h: added set_flash_firing

8b6b858: boot-hack: fade-out LED feedback when bypassing ML at startup
(by pressing or not pressing SET, depending on how it's configured)
Should also fix https://www.magiclantern.fm/forum/index.php?topic=21765.msg198829#msg198829

All changes on BitBucket

Build Log


4K raw video recording; lossless compression

crop_rec module with higher resolutions (4K, 1080p48 etc):

5D3:

  • 1920x960 @ 50p (both 1:1 crop and full-frame - 3x3 pixel binning)
  • 1920x800 @ 60p (same as above)
  • 1920x1080 @ 45p and 48p (3x3 binning)
  • 1920x1920 @ 24p (1:1 square crop)
  • 3072x1920 @ 24p (1:1 crop)
  • 3840x1600 @ 24p (1:1 crop)
  • 4096x2560 @ 12.5p (1:1 crop)
  • 4096x1440 @ 25p (1:1 crop)
  • Full-resolution LiveView: 5796x3870 at 7.4 fps (128ms rolling shutter).
  • Continuous: 3072x1308 @ 24p, 1920x1080 @ 45p, 1920x960 @ 50p, 1920x800 @ 60p, 4096x2560 @ 8p, 5796x3870 @ 5p.

EOSM, 650D, 700D, 100D:

  • 1736x696 @ 50/60p with 3x3 pixel binning (actually column binning / line skipping)
  • Lossless compression: 1736x976 @ 24p continuous (this is the maximum 16:9 resolution with 3x3 sampling)

6D:

  • 1824x634 @ 50/60p with 3x3 pixel binning (actually column binning / line skipping)
  • Lossless compression: 1824x1026 @ 24p [continuous?] (this is the maximum 16:9 resolution with 3x3 sampling)

Notes:

  • It's quite bleeding edge (expect bugs)
  • Includes lossless compression for MLV (mlv_lite/mlv_play) and DNG (silent/pic_view)
  • Includes lua_fix and dynamic-my-menu
  • You will generally need to use the (non-realtime) preview from the raw recording module.
  • Setting the preview to Frozen LV will give sligthly better recording times.
  • Modes with higher vertical resolution will have real-time preview only for the top of the frame.
  • Modes with higher horizontal resolution will have the preview completely broken.
  • Centered x5 zoom will show either a cropped real-time preview, or a slow preview with correct framing (half-shutter to toggle).
  • mlv_lite has lossless compression, H.264 proxy and experimental sound recording via mlv_snd
  • mlv_rec works too, but without lossless compression

This is also the "de facto" bleeding edge branch, with other experimental stuff being tested here.

Forum discussion

Branch: crop_rec_4k

Latest Build (2018-03-10 22:20)

mlv_dump.exe

mlv_dump.linux

mlv_dump.osx

magiclantern-crop_rec_4k.2018Mar10.100D101.zip

magiclantern-crop_rec_4k.2018Mar10.5D3113.zip

magiclantern-crop_rec_4k.2018Mar10.5D3123.zip

magiclantern-crop_rec_4k.2018Mar10.650D104.zip

magiclantern-crop_rec_4k.2018Mar10.6D116.zip

magiclantern-crop_rec_4k.2018Mar10.700D115.zip

magiclantern-crop_rec_4k.2018Mar10.EOSM202.zip

57614b3: Raw backend: use (*height)-- adjustment on all DIGIC 5 models
700D, 650D, 100D, M: fine-tuned skip offsets
Allow odd values for skip_bottom
650D/M x5 zoom: skip_top is the same as with regular 1080p or 720p or mv1080crop
700D/650D/M 720p
before: H=727, skip_bottom = 4 => active area y2=723 (real 724)
after: H=725, skip_bottom = 1 => active area y2=724
100D 720p:
before: H=726, skip_bottom = 4 => active area y2=722 (real 724)
after: H=726, skip_bottom = 2 => active area y2=724
650D/M 1080p:
before: H=1190, skip_bottom = 4 => active area y2=1186 (2 white lines at bottom)
after: H=1188, skip_bottom = 0 => active area y2=1188 (no bad lines at bottom)
EOSM movie crop: H=1060, top=28, active area y2=1060, no bad lines at bottom
(unsure about skip_bottom on 100D - to be tested with a silent DNG in movie crop mode)
See also:
https://www.magiclantern.fm/forum/index.php?topic=18443.msg198140#msg198140
https://www.magiclantern.fm/forum/index.php?topic=16054.msg195213#msg195213

997c440: mlv_lite: size restrictions (W*H mod 16) are not applicable to lossless compression

390b7d7: 100D DEFAULT_RAW_BUFFER_SIZE
https://www.magiclantern.fm/forum/index.php?topic=5601.msg196632#msg196632

ac2b517: 650D DEFAULT_RAW_BUFFER_SIZE is the same as on the 700D
https://www.magiclantern.fm/forum/index.php?topic=5601.msg196632#msg196632

495121c: 6D DEFAULT_RAW_BUFFER_SIZE
https://www.magiclantern.fm/forum/index.php?topic=5601.msg196632#msg196632

0b15488: lossless: tidied up formatting of comments

9e04631: lossless: support for 70D.112 from nikfreak and esas (from pull request #889)
Not working yet (black level issues)

138f362: lossless: support for 6D.116 (from pull request #875)

4ece0b0: lossless: register 0xC0F13068 (RABBIT?) is required for full-res silent pictures
http://www.magiclantern.fm/forum/index.php?topic=18443.msg198091#msg198091

90a58a5: lossless: experimental resolution overriding that should cover all DIGIC 5 models
(to be tested)

0e150ec: Merged lua_fix into crop_rec_4k
(memset32 fix, DIGIC identification, minor fixes)

eb5a09a: VRAM: enabled workaround from 03c5f43 on all models
(fixes Arkanoid, benchmarks and others on fresh startup in photo mode, without any images on the card)

e411085: Makefile: fix "make clean" for modules not enabled by default

69ee2a5: Merged memory-backend into lua_fix
(memset32 fix)

a5b1848: selftest: tests for model ID functions (is_camera etc)

49568a6: is_camera: extended to allow checking DIGIC version
e.g. if (is_camera("DIGIC", "5")) { ... }

7c04c75: memset64/memcpy64: use versions from b831cb1; fix calls from Magic Zoom to ensure proper alignment

375fa4e: Backout b831cb1 (breaks Magic Zoom and CONFIG_MARK_UNUSED_MEMORY_AT_STARTUP, as memset64 is not the same as memset)

e40caa9: menu: fix typo regarding short unpress events
(side effect: short joystick press also moved the menu selection up on 5D3)

86accb6: Memory backend: drop timestamps from history; show last 1024 events

d016ccf: Memory backend: show total allocations (number and amount), including untracked ones

0e56fe7: Memory backend: allow using shoot_malloc as a last resort, even for small blocks;
allow small blocks (smaller than minimum_free_space / 64) to break the minimum_free_space limit (until minimum_free_space / 4)
fine-tuned until the old set of Lua scripts were able to run on 1100D without umm_malloc

All changes on BitBucket

Build Log


10/12-bit RAW video

Experimental raw video recording at lower bit depths. Only models with CONFIG_EDMAC_RAW_SLURP are compiled.

Forum discussion

Branch: raw_video_10bit_12bit

Latest Build (2018-01-31 00:50)

magiclantern-raw_video_10bit_12bit.2018Jan31.100D101.zip

magiclantern-raw_video_10bit_12bit.2018Jan31.1100D105.zip

magiclantern-raw_video_10bit_12bit.2018Jan31.5D3113.zip

magiclantern-raw_video_10bit_12bit.2018Jan31.5D3123.zip

magiclantern-raw_video_10bit_12bit.2018Jan31.600D102.zip

magiclantern-raw_video_10bit_12bit.2018Jan31.60D111.zip

magiclantern-raw_video_10bit_12bit.2018Jan31.650D104.zip

magiclantern-raw_video_10bit_12bit.2018Jan31.6D116.zip

magiclantern-raw_video_10bit_12bit.2017Aug21.700D114.zip

magiclantern-raw_video_10bit_12bit.2018Jan31.700D115.zip

magiclantern-raw_video_10bit_12bit.2018Jan31.70D112.zip

magiclantern-raw_video_10bit_12bit.2018Jan31.EOSM202.zip

2103c8a: Merged allocate-raw-lv-buffer into raw_video_10bit_12bit
(1100D raw video, updated memory management)

9234364: 60D: use channel #1 for edmac_memcpy
(channel #6 appears used; figure out why it seems to work)

a6d941d: Raw backend: 1100D needs CONFIG_ALLOCATE_RAW_LV_BUFFER after refactoring

de5a794: Raw backend: use dummy DEFAULT_RAW_BUFFER_SIZE until the real size is found
without this, most builds would be broken
fixme: old models without CONFIG_EDMAC_RAW_SLURP are still broken

f0a25a6: Raw backend: sync memory allocation routines with crop_rec_4k
(squashed 8287b4f, 0ff9f1f, 3948408, d55423f, ebf206a, 3bc3637, cad72ea and 2bc5c3a, keeping only changes to raw.c)

3b69c5b: mlv_lite, mlv_rec: dialog_refresh_timer_addr for 1100D
(to be tested)

b34fa35: Merged unified into allocate-raw-lv-buffer

6e08bee: selftest: reduced memory requirements to allow 1100D to pass the memory tests

eb98ed4: 1100D: raw skip offsets for LiveView

5d168ad: 1100D: enabled CONFIG_EDMAC_MEMCPY

5647189: Raw backend: small fixes related to ALLOCATE_RAW_LV_BUFFER
- thread safety
- alocate uncacheable large buffer
- compiler error on missing DEFAULT_RAW_BUFFER or RAW_LV_BUFFER_ALLOC_SIZE

97284f1: Merged raw_fixes into allocate-raw-lv-buffer

b814744: Merged unified into allocate-raw-lv-buffer

4ca02bb: Fix 1100D RAW_LV_BUFFER_ALLOC_SIZE

1a2a91e: Update CONFIG_EDMAC_RAW_SLURP documentation with porting tips

21fae78: EXPERIMENTAL: 1100D raw LV support using CONFIG_EDMAC_RAW_SLURP and ML-allocated buffer

26d12c6: Fix typo in macro names

6348f69: raw.c : Allow the backend to allocate a buffer for RAW lv if CONFIG_EDMAC_RAW_SLURP and CONFIG_BROKEN_RAW_LV_BUFFER are defined
Also try to detect possible misconfigurations at compile-time

All changes on BitBucket

Build Log


Pre-recording with half-shutter triggers

Pre-recording with half-shutter triggers (details).

Should work on top of latest nightly build.

Forum discussion

Branch: rec-trigger

Latest Build (2017-08-17 22:29)

mlv_lite.mo

7441ed4: mlv_lite: fix compilation

9e60bc5: mlv_lite: prevent recording in x10 zoom
(to be used for focusing)

All changes on BitBucket

Build Log


Non-CPU lens info

Set lens name, focal length and aperture for manual lenses. Lua script.

Forum discussion

Branch: manual_lens_info

Latest Build (2018-02-18 23:13)

magiclantern-manual_lens_info.2018Feb19.100D101.zip

magiclantern-manual_lens_info.2018Feb19.1100D105.zip

magiclantern-manual_lens_info.2018Feb19.500D111.zip

magiclantern-manual_lens_info.2018Feb19.50D109.zip

magiclantern-manual_lens_info.2018Feb19.550D109.zip

magiclantern-manual_lens_info.2018Feb19.5D2212.zip

magiclantern-manual_lens_info.2018Feb19.5D3113.zip

magiclantern-manual_lens_info.2018Feb19.5D3123.zip

magiclantern-manual_lens_info.2018Feb19.600D102.zip

magiclantern-manual_lens_info.2018Feb19.60D111.zip

magiclantern-manual_lens_info.2018Feb19.650D104.zip

magiclantern-manual_lens_info.2018Feb19.6D116.zip

magiclantern-manual_lens_info.2017Apr04.700D114.zip

magiclantern-manual_lens_info.2018Feb19.700D115.zip

magiclantern-manual_lens_info-crop_rec_4k.2018Feb02.70D112.zip

magiclantern-manual_lens_info.2018Feb19.7D203.zip

magiclantern-manual_lens_info.2018Feb19.7D_MASTER203.zip

magiclantern-manual_lens_info.2018Feb19.EOSM202.zip

29f7f5a: mlv_rec.c: Fix duplicate ELNS block processing

9c26cfb: config.lua: changed config file extension to lcf -- Lua Config
(backwards incompatible changes)

c1c1786: Memory backend: figured out why AllocateContinuousMemoryResource may crash with many small blocks

065ceae: Memory backend: attempt to provide a fast malloc for various handlers called from Canon tasks
examples: PROP_HANDLERs (PropMgr), key handlers (GuiMainTask), vsync hooks (Evf on recent models) etc
todo: unified method to check whether we are running in such a handler; check thread safety

11b83d2: Merged in aprofiti/magic-lantern/manual_lens_info_64byte (pull request #904)
Manual lens info pt.2

bd680cd: Merged lua_fix into manual_lens_info
(timer functions refactor)

c274347: mlv_dump.c: Fix duplicate ELNS Block processing

bb3f455: config.lua, lens.lua: Fix Typos

127423c: Experimental: 64Byte Extended Lens Name

a77718e: lua_menu.c: Fix possible memory leak when adding newIndex to "Choices"

d25df8b: xmp.lua: Fix wrong prefix for sidecar filename. Credit goes to a1ex

1926733: lua_lens.c: Add support for aperture_min and aperture_max to Lua

ed0b4e2: config.lua: Major rework of lib. Added support for multiple menus and recursively saving of submenu

d288685: Intervalometer: attempt to get sligthly better timing accuracy, to be tested
http://www.magiclantern.fm/forum/index.php?topic=21617.msg197314#msg197314

bcbabb3: Moved timer functions to timer.h (always included from dryos.h)
Renamed get_ms_clock_value / get_us_clock_value to get_ms_clock / get_us_clock
Replaced all hardcoded references to 0xC0242014 with GET_DIGIC_TIMER()
```
find . -not -path '*/\.*' -type f -name '*.c' -o -name '*.h' -exec sed -i 's/get_ms_clock_value/get_ms_clock/g' {} +
find . -not -path '*/\.*' -type f -name '*.c' -o -name '*.h' -exec sed -i 's/get_us_clock_value/get_us_clock/g' {} +
sed -i 's/\*(volatile uint32_t \*)0xC0242014/GET_DIGIC_TIMER()/' */*.c
...
```

7cdf315: Reworked get_ms_clock_value / get_us_clock_value / get_seconds_clock
- only update the 64-bit us_clock on each call (overhead from ~ 4us reduced to less than 1us)
- lower-resolution clocks are always derived from the microsecond clock and computed only on request
- dropped get_ms_clock_value_fast

420833b: imath.h: fix comments for FMT_FIXEDPOINT*; added FMT_FIXEDPOINT6

b632855: Fix compiling with CONFIG_DIGIC_POKE

20a52d5: Modules: fix enabling "long" modules when using config presets (issue #2789)
to reproduce: arkanoid.mo -> ML/SETTINGS/MENU.KEY/arkanoid. -> file create error on exfat
modules with shorter name: adv_int.mo -> ML/SETTINGS/MENU.KEY/adv_int.e -> it appears to work fine, but it's incorrect
worst case: arkanoid.mo -> ML/SETTINGS/MYPRESET.NAM/adv_i -> it appears to work fine, possible name clash with other modules

cb083db: shoot: attempt to make public photo capture functions thread safe, to some extent
a bit of a hack; some serious rework needed to fix this properly
at least it appears to fix http://www.magiclantern.fm/forum/index.php?topic=21590.0

b8626f4: Bracketing: debug messages for troubleshooting http://www.magiclantern.fm/forum/index.php?topic=21590.0

379b1af: shoot: make the so-called remote_shoot always take pictures, not movies
(moved movie functionality in lcdsensor/lightsensor - anything else broken?)

All changes on BitBucket

Build Log


Warning!
Magic Lantern is not approved nor endorsed by Canon in any way, and using it will probably void your warranty.
We are not responsible for any damages to your camera.

Copyright (C) 2009-2017 Magic Lantern Development Team

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.