0x1c
0x2c
0x3c
0x4c
0x5c
0x6c
0x7c
0x8c
0x9c
0xac
0xbc
0xcc
0xec
0xfc
0x10c
0x11c
0x12c
0x13c
0x14c
0x15c
0x16c
0x17c
0x18c
0x19c
0x1ac
0x1bc
0x1cc
0x1dc
0x1ec
0x1fc
0x20c
0x21c
0x22c
0x23c
0x24c
0x25c
0x26c
0x27c
0x28c
0x29c
0x2ac
0x2bc
0x2cc
0x2dc
0x2ec
The goal is to find the right values of those registers for the other cameras(5D2) to increase resolution in the same way?more or less , but first 5d2 then others .
I bet getting rid of that pink corruption will be the hardest part.
CMOS[0]: 0x203 at ISO 100
---- ------xx default 11, setting to 00 results in dark image with very low stdev
---- ---xxx-- ISO, values from 000 to 100, ascending (ISO 100-1600)
---- xxx----- second ISO field (as in dual ISO), disabled by default (see next bit)
---x -------- enables second ISO field (default 0)
--x- -------- enables vertical OB clamping maybe (setting it to 0 results in severe horizontal banding that looks like random walk)
-x-- -------- compresses the image horizontally (left side squashed, right side black)
CMOS[4]: 0x242 at iso 100...800 and 0x244 at iso 1600
---x -------- looks like some vertical dual ISO
-x-- -------- seems to cleanup 0.2 or 0.25 stops of shadow noise
No effect observed on the other bits.
@reddeercity Can't wait, but what is the atdg_gui build file for?For developing
Some of the values are actually bit fields. My old notes on 5D2 registers:Thanks :) , interesting that's on cmos[2] 0x404 reproduces this .Code: [Select]CMOS[0]: 0x203 at ISO 100
-x-- -------- compresses the image horizontally (left side squashed, right side black)
LiveViewMg:000929e0:00:00: *** ConnectWriteEDmac(0x10, 0x0), from ff1f7134
LiveViewMg:000929e0:00:00: *** SetEDmac(0x10, 0x463390a4, 0xff44e5c8, 0x20000000), from ff1f7164
/* autodetect raw size from EDMAC */
uint32_t lv_raw_height = shamem_read(RAW_LV_EDMAC+4);
uint32_t lv_raw_size = shamem_read(RAW_LV_EDMAC+8);
if (!lv_raw_size) return 0;
int pitch = lv_raw_size & 0xFFFF;
*width = pitch * 8 / 14;
/* 5D2 uses lv_raw_size >> 16, 5D3 uses lv_raw_height, so this hopefully covers both cases */
*height = MAX((lv_raw_height & 0xFFFF) + 1, ((lv_raw_size >> 16) & 0xFFFF) + 1);
return 1;
#endif
int a1 = 0x1D78 + 0x2600;
*(a1 + 208) = 1664;
*(a1 + 210) = 660;
#ifdef CONFIG_5D2
#define RAW_LV_BUFFER_ALLOC_SIZE (2040*1267)
#endif
#if defined(CONFIG_5D2) || defined(CONFIG_50D)
#define RAW_LV_EDMAC 0xC0F04500
#endif
#if defined(CONFIG_5D2) || defined(CONFIG_50D)
uint32_t edmac_read_chan = 0xff;
uint32_t edmac_write_chan = 0x0;
SetEDmac(0x10, *(0x16604 + 808), 0xFF44F0B0, 0x20000000);
ROM:FF44F0B0
ROM:FF44F0C8 DCD 0xE1C, 0 //3612
ROM:FF44F0D0 DCD 0x35D, 0, 0 //861
SetEDmac(0x5, *(0x13ECC + 804), 0xFFCAA1D4, 0x20000000);
ROM:FFCAA1D4
ROM:FFCAA1EC DCD 0xFCE, 0 //4046
ROM:FFCAA1F4 DCD 0x467, 0, 0 //1127
static void run_test()
{
static uint32_t craw_5x_edmac_h = 0xFF44F0D0;
patch_memory(craw_5x_edmac_h, 861, 861 + YRES_DELTA, "lv_edmac_h"); // add height
}
CMOS[5] //vertical offset
ADTG[2]1172 -> old_val + YRES_DELTA (nrzi)
ADTG[2]1173 -> old_val + YRES_DELTA (nrzi)
ADTG[2]1178 -> old_val + YRES_DELTA (nrzi)
ADTG[2]1179 -> old_val + YRES_DELTA (nrzi)
ADTG[2]1214 -> old_val + YRES_DELTA (nrzi)
ADTG[2]120A -> old_val + YRES_DELTA (nrzi)
C0F0713C -> 0x370 + YRES_DELTA
C0F07150 -> 0x388 + YRES_DELTA
C0F06088 //RAW last line|column
C0F06008 -> 0xaf90af9 //photo mode value
C0F0600C -> 0xaf90af9 //photo mode value
C0F06010 -> 0xaf9 //photo mode value
C0F06014 -> 0xc83 //photo mode value
patch EDMAC size
patch buffer
void* buf = malloc(2064 * 2000 / 8 * 14);
MEM(0x16604 + 808) = buf;
/* Reprogram the raw EDMAC to output the data in our buffer (ptr) */
raw_lv_redirect_edmac(sp_frames[next_slot % sp_buffer_count]);
sp_num_frames++;
/* to be called from vsync hooks */
void FAST raw_lv_redirect_edmac(void* ptr)
{
#ifdef CONFIG_EDMAC_RAW_SLURP
redirected_raw_buffer = (void*) CACHEABLE(ptr);
#else
MEM(RAW_LV_EDMAC) = (intptr_t) CACHEABLE(ptr);
#endif
}
If you do not solve this problem, we will announce the end of digic IV support. :D
The custom buffer is required, as ML redirects it only while recording.So when I use the custom RAW_LV_BUFFER_ALLOC_SIZE (2040*1267) , RAW_LV_EDMAC 0xC0F04508 & r/w channel to 0xff & 0x0 and got 3584x1068 (got all this from the "show edmac" in the debug menu in 1:1)
....... but I'm doing progress on a tool that should help understanding the LiveView internals a lot better.Yes :) That great to hear @a1ex
EDMAC Address 103e28a4 (3578x1267 1:1)(4046x1127 3xcrop) raw(5616x3744) (Movie mode)
EDMAC Address 103e28a4 (3578x1267 1:1)(4046x1127 3xcrop) small raw1(3861x2574)(Movie mode)
EDMAC Address 43e28a4 (3578x1267 1:1)(4046x1127 3xcrop) small raw2(2784x1856)(Movie mode)
EDMAC Address 103e28a4 (3578x1267 1:1)(No buffer change) (5x zoom) (3xcrop) raw (5616x3744) (Photo mode)
EDMAC Address 103e28a4 (3578x1267 1:1)(No buffer change) (5x zoom) (3xcrop) small raw1(3861x2574)(Photo mode)
EDMAC Address 43e28a4 (3578x1267 1:1)(No buffer change) (5x zoom) (3xcrop) small raw2(2784x1856)(Photo mode)
..... you will have to use some memory allocation API to get a memory buffer.Maybe this will help ? did a search for "memory allocation API "and got this , go figure developer ARMS api , could be a wealth of information , assuming I can understand it ::)
32-bit input capture register : 4 channelshttps://photo-parts.com.ua/parts/Datasheets/TMP19A43FDXBGTMP19A43FDXBG.pdf
Table 3-1. System Module Register Memory Map
Hex address Register Acronym DESCRIPTION(1)
0x01C4 0000 PINMUX0 Pin Mux 0 (Video In) Pin Mux Register
0x01C4 0004 PINMUX1 Pin Mux 1 (Video Out) Pin Mux Register
0x01C4 0008 PINMUX2 Pin Mux 2 (AEMIF) Pin Mux Register
0x01C4 000C PINMUX3 Pin Mux 3 (GIO/Misc) Pin Mux Register
0x01C4 0010 PINMUX4 Pin Mux 4 (Misc) Pin Mux Register
0x01C4 0014 BOOTCFG Boot Configuration
0x01C4 0018 ARM_INTMUX Multiplexing Control for Interrupts
0x01C4 001C EDMA_EVTMUX Multiplexing Control for EDMA Events
0x01C4 0020 DDR_SLEW DDR Slew Rate
0x01C4 0024 UHPICTL UHPI Control
0x01C4 0028 DEVICE_ID Device ID
0x01C4 002C VDAC_CONFIG Video DAC Configuration
0x01C4 0030 TIMER64_CTL Timer64 Input Control
0x01C4 0034 USB_PHY_CTL USB PHY Control
0x01C4 0038 MISC Miscellaneous Control
0x01C4 003C MSTPRI0 Master Priorities Register 0
0x01C4 0040 MSTPRI1 Master Priorities Register 1
0x01C4 0044 VPSS_CLK_CTL VPSS Clock Mux Control
0x01C4 0048 PERI_CLKCTL Peripheral Clock Control
0x01C4 004C DEEPSLEEP DEEPSLEEP Control
0x01C4 0050 - Reserved
0x01C4 0054 DEBOUNCE0 Debounce for GIO0 Input
0x01C4 0058 DEBOUNCE1 Debounce for GIO1 Input
0x01C4 005C DEBOUNCE2 Debounce for GIO2 Input
0x01C4 0060 DEBOUNCE3 Debounce for GIO3 Input
0x01C4 0064 DEBOUNCE4 Debounce for GIO4 Input
0x01C4 0068 DEBOUNCE5 Debounce for GIO5 Input
0x01C4 006C DEBOUNCE6 Debounce for GIO6 Input
0x01C4 0070 DEBOUNCE7 Debounce for GIO7 Input
0x01C4 0074 VTPIOCR VTP IO Control
0x01C4 0078 PUPDCTL0 IO cell pullup/down on/off control #0
0x01C4 007C PUPDCTL1 IO cell pullup/down on/off control #1
0x01C4 0080 HDVICPBT HDVICP Boot Register
0x01C4 0084 PLL1_CONFIG PLL1 Configuration Register
0x01C4 0088 PLL2_CONFIG PLL2 Configuration Register
Some interesting info from the datasheet https://photo-parts.com.ua/parts/Datasheets/TMP19A43FDXBGTMP19A43FDXBG.pdf
http://www.ti.com/lit/ds/symlink/tms320dm368.pdf
[Pass] strlen("abc") => 0x3
[Pass] strlen("qwertyuiop") => 0xa
[Pass] strlen("") => 0x0
[Pass] strcpy(msg, "hi there") => 0x17b068
[Pass] msg => 'hi there'
[Pass] snprintf(a, sizeof(a), "foo") => 0x3
[Pass] snprintf(b, sizeof(b), "foo") => 0x3
[Pass] strcmp(a, b) => 0x0
[Pass] snprintf(a, sizeof(a), "bar") => 0x3
[Pass] snprintf(b, sizeof(b), "baz") => 0x3
[Pass] strcmp(a, b) => 0xfffffff8
[Pass] snprintf(a, sizeof(a), "Display") => 0x7
[Pass] snprintf(b, sizeof(b), "Defishing") => 0x9
[Pass] strcmp(a, b) => 0x4
[Pass] snprintf(buf, 3, "%d", 1234) => 0x2
[Pass] buf => '12'
[Pass] memcpy(foo, bar, 6) => 0x17b000
[Pass] foo => 'asdfghuiop'
[Pass] memset(bar, '*', 5) => 0x17afe0
[Pass] bar => '*****hjkl;'
bzero32(bar + 5, 5)
[Pass] bar => '****'
t0 = *(uint32_t*)0xC0242014 => 0xccf82
msleep(250)
t1 = *(uint32_t*)0xC0242014 => 0x61e8c
[FAIL] ABS(mod(t1-t0, 1048576)/1000 - 250) => 0x168
LoadCalendarFromRTC( &now )
s0 = now.tm_sec => 0x5
Date/time: 2017/04/23 00:05:0ü&‚¸]&,½ l‚CK<&²Ã
–(¹`UrV‹x&’°ËX'¢½”k":‹%RJD&ÿ½´j"‘K'¿Ëu%}©<L¢¨'²Ãw$Hªô^ÂÓì'‚½Ìv(mÇh‡BþŒP)¸J7%E¸u’‹ÌØ(ÇKv& ½€wbÒ¤&ÂØÒÓ2yßBÍÑ3ó8 m0 = MALLOC_FREE_MEMORY => 0x203c8
[Pass] p = _malloc(50*1024) => 0x104930
[Pass] CACHEABLE(p) => 0x104930
m1 = MALLOC_FREE_MEMORY => 0x13bd8
_free(p)
m2 = MALLOC_FREE_MEMORY => 0x203d8
[Pass] ABS((m0-m1) - 50*1024) => 0x10
[Pass] ABS(m0-m2) => 0x10
m0 = GetFreeMemForAllocateMemory() => 0x3e55e8
[Pass] p = _AllocateMemory(256*1024) => 0x972f94
[Pass] CACHEABLE(p) => 0x972f94
m1 = GetFreeMemForAllocateMemory() => 0x3a5574
-_FreeMemory(p)
m2 = GetFreeMemForAllocateMemory() => 0x3e5580
[Pass] ABS((m0-m1) - 256*1024) => 0x74
[Pass] ABS(m0-m2) => 0x68
m01 = MALLOC_FREE_MEMORY => 0x203d8
m02 = GetFreeMemForAllocateMemory() => 0x3e5520
[Pass] p = _alloc_dma_memory(256*1024) => 0x409d0270
[Pass] UNCACHEABLE(p) => 0x409d0270
[Pass] CACHEABLE(p) => 0x9d0270
[Pass] UNCACHEABLE(CACHEABLE(p)) => 0x409d0270
_free_dma_memory(p)
[Pass] p = (void*)_shoot_malloc(24*1024*1024) => 0x4e5d00e8
[Pass] UNCACHEABLE(p) => 0x4e5d00e8
_shoot_free(p)
m11 = MALLOC_FREE_MEMORY => 0x203d8
m12 = GetFreeMemForAllocateMemory() => 0x3e6634
[Pass] ABS(m01-m11) => 0x0
[FAIL] ABS(m02-m12) => 0x1114
[FAIL] p = (void*)_shoot_malloc(24*1024*1024) => 0x0
[FAIL] UNCACHEABLE(p) => 0x40000000
[FAIL] ABS(m02-m12) => 0x101fc
4ÐD-òûÏÅ+fðØ¹¤ŽØ*"åN¡)ׄŽâÍ@(ÒËz'vÂ<gμ%¢·KT$4üE"¸Jô#B§Ê;#J <1"߉˜"Rœ‰'"©—by‰ ¡oÇÂo(À¡ýF!pÀp ¿ÇpÇÁpÃÑDApÅoLÄ¡ÇáoGÃp<ÅaGLq‡Äpʇ`ÁqGÇq¬Ë‡ QqÌp¤Ì¡ÇÀqÏq¸Ì±GŒQq‡Ì q´ÉAÇhqpÇÈq”ɱX1qGÆqdɇ|ÁpÉpÀÈ¡G˜1p‡ÊqÈËA‡¼QqÏqÏGqrÇÐ)r@Õ¡(‡xtÛ9rœÛñ[Pass] suite = shoot_malloc_suite_contig(0) => 0x86b91c
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x1
[Pass] suite->size => 0x1cf8000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0x86b940
[Pass] chunk->signature => 'MemChunk'
[Pass] chunk->size => 0x1cf8000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42004070
[Pass] UNCACHEABLE(p) => 0x42004070
shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite(64*1024*1024) => 0x9b8758
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x3
[Pass] suite->size => 0x4000000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0x9b877c
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x1cf8000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42004070
[Pass] UNCACHEABLE(p) => 0x42004070
chunk = GetNextMemoryChunk(suite, chunk) => 0x9b87f4
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x3724000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x565d00e4
[Pass] UNCACHEABLE(p) => 0x565d00e4
chunk = GetNextMemoryChunk(suite, chunk) => 0x9b886c
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x4000000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x525d00e4
[Pass] UNCACHEABLE(p) => 0x525d00e4
chunk = GetNextMemoryChunk(suite, chunk) => 0x0
[Pass] total => 0x4000000
shoot_free_suite(suite); suite = 0; chunk = 0;
[FAIL] suite = shoot_malloc_suite(0) => 0x0
[FAIL] suite->signature => '‡'
[FAIL] suite->num_chunks => 0xe59ff014
t*†H½.½°ü"¶ˆ+²…H-†ŒXþÒÍH0,BˆÞ-ֈظ’– -ŽHú,ǃ¨•ÒX˜,"‰ˆÛ1÷‘hüÊH˜/ãŽH+´ŒÔ$ÉÄ/‹Èâ/ÓLgŠ”A¤ÁbB#¾¼É”VL€@³¦In.ˆÔu’ÔØ#"z‡-"œx wÀ quÇöHu¼’[GœuÇúEu˜ùEpAtGúTtöQ=ÇÑsí:v¨þLÇä!u‡þ Zu<õ1IÇ8¡tÇî6sÌîaF‡Ôs‡ì4s íá2‡ ±rGè;tðAFÇh¢t‡ UuûA[X "w$#¤}ìVú‡L'ƒH™)@‡àÌ‚Hð-‚‡H¡(8‚X`
HÔ&²ƒÈ,‘¸
3 $6£Ê¬@¿µF$„‹àE¶Ê9<Ò ¬QC}É`3”/ðŽýRáH,0C‰ /‹„ê±HÈ-"ŠÖ.¼Œæ2Í0òŒï1è’#ÃÉ|1ˆî,•‰³k€)r‚ÇW!³uDöÑF‡1sÇç@s0äAE‡$ Rv&¹…üÆB–ˆ-âˆHÑ.ÈŒðòÊÈì/cˆ
0ûŽ ÃíȨ/R‹ÈÓ.¸‹¸ãÒ刔0ãI$9œ«˜+ô„F¤»KfD³·T44{Ë@D”ºpG÷ÀTsì°D3´
Þ6t˜,úBÈHˆ("GC Žuðïá6Œs‡ïRvÜâžG#R{Ç*"¯yBfÇÈÑu‡õSu
ò‡Ü#r€Hƒ.£˜có’Ê\?”ºÌ€MžÓx %YÍ|OäÎ̯DQ¶ÅCpÊ63š ,$Š ›wˆ(‚†‡)ŒìÏ@I\2ƒ¡Š˜AÜ¿‡”ãPÕÜNfY{ìˆìÕCÏÔ`¦ö4c×ûœXö8Ég¦¢i–é‡ÖF hFЋgI éb†ûfæÿyg'Ù‚Ö=ñgŠg'AtV#ÐagcfþxoF+ÐqgÆqfþ$CæÐˆcÆõ
^0ë˜Ë5¾ÎX\ÅìNÈ\·ì€Íµ¸h\•êµZ…å(•>ÎÌWâNrVßl`µë¼UÅávUÜÌ@žlSÕÙÍ*S•Ùu…
°QµÖÍQlÕP …;ͰNôÎLÊJËÇx‘4B,F´¾KBB±·´/K\>Ó°Ëò@E¸|ŠôÈÍa— “†‹TR1wÉný‰cÔ‰ƒä……7L >Ã©Š¥;¥8ÚÓ ?”²?9³°õC!`>±ÊÚ=ê¬4Å“»Š<3«Š¼;¯«|¶¤Êt;cªŠ¹;¬«È¸3¤Š€;“§J¶: ªô³cªÊ$;é
¨9¦ä—ãrÊÐ8“¥Êˆ8h¥Ìa
:Ó¥
¡9s¦<›ƒhJD9S¥Ê‡8W¥ “3e
9ó¥
™9l§À ³zJ:㨊¬9—¨ø£C›ŠL:3¨Š¤:†¨€ “Šü9“§Šš9h§l“CgJ9¦
‹8h¥èŠã]
8¦
8p¥À‰cŠÌ8c¦Š’8f¦¼‰SLЏ7s£Š}60 ¬bcŠT5£‰N6ô£,гœ
´<ä²
DÕÇôŠÔûŒ°L4×ÍãN”Ù$Ýd¤ÌM”×MÝMƒ×Tٌ̈́M”ØMÐLØÌÓ¤˜ÍÄMtØ
ØM˜×Ñ”c¼L”ÙÍÓLy×tÏ´ƒÈLtÖMÇLƒÖlÁTnÍxKÕ¿KEÔä¯4/ͬJdÔ§J+Ïp´üŒxHÄÍ~HàÌ}ÄÃŒ4G„ËÌnF±Êäe”Ì(FÆLTC6ÁÐ'4ó‹°Aƒ½‹ý>ž¶¸×#@`<3°J¤9½¨sãVŠ(6s¢IJ3ô›`£’ H0•Ií.>Í"ßHˆ+R‹ª)§ˆÀ‹‚l (…È{&E‚üf’pGÀpÔÀ¡û† !p‡Á
o¾¡
±pGÁpì¾AG$1pÇÄpøÄ¡Ç$1qǽpÁÑG$qqÃr8Á‡8±rÃ(rd‘%h1sÃ/r,ÅÑ)‡PÑq‡Ã'rhÁÑ)‡8‘rGÄ-r4Ʊ*‡ParÇÄ&rLÃ%‡`¡qÂq@Ç$!r‡À#rHÂ1‡tsÅ*rDÅÁ;ÇxasGÉBsTÃ!<„QtGÌRuÇñe‡œáuÇÌav¸È1\G|ñuÈUu È1EÇœtÅ/rhÇÑ(G°‘tËVyÓa¹ÇÌá~Hå6‰¼öÁÐHÄrI X™äÒËÉ !¢œ !á€ÌIŒ!B‰!âœ|"·‰!ÒšI m“Œ
úHL RH áp rú!’” $#½¡lEB…Š8%R®Ka&±pb20‹Ô&²l&B³¸nâC‹'bµu'Iµq"j0'²¶z'o¸|zbË”'·K~'²·Ü~ò›‹ü'2¹(¼»ˆ¸Kh(òº‹†(Á»D…R¼‹€(R½‹Š(î¾ÀŠ’æ‹,)r¿L‘(Áä–âh)RÁÌ–))ÂX“’3ŒŒ)RÄL)\Äl ’XŒä)bÅÌŸ*iÇ £’‚˜*rÈŒ§*œÉD¨R£Ìh*‚É̪*ÀÌ„®bÃÌä*r̳+ÛÍ ³‚èL8+bÍ̵+éвRç̼+²ÎŒÂ+ÿÑ„·R0,ÂÑͼ+3ÔôÄ\
D,BÕMÇ,\ÖtËUÍ-R×ÍË,’ØìÏR¥M(-òÙÐ-¼Ü4ÙÒ×
”-òÛÓ-àݔׂëÍø-Þ
Ü-üàüáBøÍ(.’àÎç.'Ý ÌM¨+2Ð̤(¼<jRúJˆ$ò¢I* `Š„ô±Jˆ€ñ‚Èé:ŠìÿPIX!B¡J*"ž®ø7rVK0%ÒÅ SetGUIRequestMode(0); msleep(1000);
[FAIL] CURRENT_DIALOG_MAYBE => 0x26
[FAIL] display_idle() => 0x0
There some memory address stuff but not LV , so I should re-run the stub test and see if there any LV stuff ?[Pass] strlen("abc") => 0x3
[Pass] strlen("qwertyuiop") => 0xa
[Pass] strlen("") => 0x0
[Pass] strcpy(msg, "hi there") => 0x177048
[Pass] msg => 'hi there'
[Pass] snprintf(a, sizeof(a), "foo") => 0x3
[Pass] snprintf(b, sizeof(b), "foo") => 0x3
[Pass] strcmp(a, b) => 0x0
[Pass] snprintf(a, sizeof(a), "bar") => 0x3
[Pass] snprintf(b, sizeof(b), "baz") => 0x3
[Pass] strcmp(a, b) => 0xfffffff8
[Pass] snprintf(a, sizeof(a), "Display") => 0x7
[Pass] snprintf(b, sizeof(b), "Defishing") => 0x9
[Pass] strcmp(a, b) => 0x4
[Pass] snprintf(buf, 3, "%d", 1234) => 0x2
[Pass] buf => '12'
[Pass] memcpy(foo, bar, 6) => 0x176fe0
[Pass] foo => 'asdfghuiop'
[Pass] memset(bar, '*', 5) => 0x176fc0
[Pass] bar => '*****hjkl;'
bzero32(bar + 5, 5)
[Pass] bar => '****'
t0 = *(uint32_t*)0xC0242014 => 0x63161
msleep(250)
t1 = *(uint32_t*)0xC0242014 => 0xa1441
[Pass] ABS(mod(t1-t0, 1048576)/1000 - 250) => 0x4
LoadCalendarFromRTC( &now )
s0 = now.tm_sec => 0x15
Date/time: 2017/04/23 18:34:21
msleep(1500)
LoadCalendarFromRTC( &now )
s1 = now.tm_sec => 0x17
[Pass] mod(s1-s0, 60) => 0x2
[Pass] mod(s1-s0, 60) => 0x2
m0 = MALLOC_FREE_MEMORY => 0x203d8
[Pass] p = _malloc(50*1024) => 0x104930
[Pass] CACHEABLE(p) => 0x104930
m1 = MALLOC_FREE_MEMORY => 0x13bd8
_free(p)
m2 = MALLOC_FREE_MEMORY => 0x203d8
[Pass] ABS((m0-m1) - 50*1024) => 0x0
[Pass] ABS(m0-m2) => 0x0
m0 = GetFreeMemForAllocateMemory() => 0x3eb7fc
[Pass] p = _AllocateMemory(256*1024) => 0x9670fc
[Pass] CACHEABLE(p) => 0x9670fc
m1 = GetFreeMemForAllocateMemory() => 0x3abaa0
-_FreeMemory(p)
m2 = GetFreeMemForAllocateMemory() => 0x3ebaac
[Pass] ABS((m0-m1) - 256*1024) => 0x2a4
[Pass] ABS(m0-m2) => 0x2b0
m01 = MALLOC_FREE_MEMORY => 0x203d8
m02 = GetFreeMemForAllocateMemory() => 0x3eba4c
[Pass] p = _alloc_dma_memory(256*1024) => 0x4096713c
[Pass] UNCACHEABLE(p) => 0x4096713c
[Pass] CACHEABLE(p) => 0x96713c
[Pass] UNCACHEABLE(CACHEABLE(p)) => 0x4096713c
_free_dma_memory(p)
[Pass] p = (void*)_shoot_malloc(24*1024*1024) => 0x42004074
[Pass] UNCACHEABLE(p) => 0x42004074
_shoot_free(p)
m11 = MALLOC_FREE_MEMORY => 0x203d8
m12 = GetFreeMemForAllocateMemory() => 0x3ebaac
[Pass] ABS(m01-m11) => 0x0
[Pass] ABS(m02-m12) => 0x60
[Pass] suite = shoot_malloc_suite_contig(24*1024*1024) => 0xa6e5e4
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x1
[Pass] suite->size => 0x1800000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0xa6e608
[Pass] chunk->signature => 'MemChunk'
[Pass] chunk->size => 0x1800000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42004070
[Pass] UNCACHEABLE(p) => 0x42004070
shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite_contig(0) => 0xa7a038
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x1
[Pass] suite->size => 0x1cf8000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0xa7a05c
[Pass] chunk->signature => 'MemChunk'
[Pass] chunk->size => 0x1cf8000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42004070
[Pass] UNCACHEABLE(p) => 0x42004070
shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite(64*1024*1024) => 0xa7a69c
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x3
[Pass] suite->size => 0x4000000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0xa7a6c0
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x1cf8000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42004070
[Pass] UNCACHEABLE(p) => 0x42004070
chunk = GetNextMemoryChunk(suite, chunk) => 0xa7a738
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x3724000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x5a5d00e4
[Pass] UNCACHEABLE(p) => 0x5a5d00e4
chunk = GetNextMemoryChunk(suite, chunk) => 0xa7a7b0
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x4000000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x565d00e4
[Pass] UNCACHEABLE(p) => 0x565d00e4
chunk = GetNextMemoryChunk(suite, chunk) => 0x0
[Pass] total => 0x4000000
shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite(0) => 0xa89580
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x7
[Pass] suite->size => 0xb700000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0xa895a4
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x1cf8000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42004070
[Pass] UNCACHEABLE(p) => 0x42004070
chunk = GetNextMemoryChunk(suite, chunk) => 0xa8961c
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x3724000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x5a5d00e4
[Pass] UNCACHEABLE(p) => 0x5a5d00e4
chunk = GetNextMemoryChunk(suite, chunk) => 0xa89694
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x5150000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x565d00e4
[Pass] UNCACHEABLE(p) => 0x565d00e4
chunk = GetNextMemoryChunk(suite, chunk) => 0xa8970c
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x6b7c000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x525d00e4
[Pass] UNCACHEABLE(p) => 0x525d00e4
chunk = GetNextMemoryChunk(suite, chunk) => 0xa89784
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x85a8000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4e5d00e4
[Pass] UNCACHEABLE(p) => 0x4e5d00e4
chunk = GetNextMemoryChunk(suite, chunk) => 0xa897fc
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x9fd4000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4a5d00e4
[Pass] UNCACHEABLE(p) => 0x4a5d00e4
chunk = GetNextMemoryChunk(suite, chunk) => 0xa89874
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0xb700000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x465d00e4
[Pass] UNCACHEABLE(p) => 0x465d00e4
chunk = GetNextMemoryChunk(suite, chunk) => 0x0
[Pass] total => 0xb700000
shoot_free_suite(suite); suite = 0; chunk = 0;
EngDrvOut(LCD_Palette[0], 0x1234)
[Pass] shamem_read(LCD_Palette[0]) => 0x1234
call("TurnOnDisplay")
[Pass] DISPLAY_IS_ON => 0x1
call("TurnOffDisplay")
[Pass] DISPLAY_IS_ON => 0x0
call("TurnOnDisplay")
[Pass] DISPLAY_IS_ON => 0x1
SetGUIRequestMode(1); msleep(1000);
[Pass] CURRENT_DIALOG_MAYBE => 0x1
SetGUIRequestMode(2); msleep(1000);
[Pass] CURRENT_DIALOG_MAYBE => 0x2
SetGUIRequestMode(0); msleep(1000);
[Pass] CURRENT_DIALOG_MAYBE => 0x0
[Pass] display_idle() => 0x1
GUI_Control(BGMT_PLAY, 0, 0, 0); msleep(500);
[Pass] PLAY_MODE => 0x1
[Pass] MENU_MODE => 0x0
GUI_Control(BGMT_MENU, 0, 0, 0); msleep(500);
[Pass] MENU_MODE => 0x1
[Pass] PLAY_MODE => 0x0
[Pass] MEM(dialog->type) => 0x414944
GUI_Control(BGMT_MENU, 0, 0, 0); msleep(500);
[Pass] MENU_MODE => 0x0
[Pass] PLAY_MODE => 0x0
task_create("test", 0x1c, 0x1000, test_task, 0) => 0x818400b4
[Pass] test_task_created => 0x1
[Pass] get_task_name_from_id(get_current_task()) => 'run_test'
[Pass] mq = mq ? mq : (void*)msg_queue_create("test", 5) => 0x81940086
[Pass] msg_queue_post(mq, 0x1234567) => 0x0
[Pass] msg_queue_receive(mq, (struct event **) &m, 500) => 0x0
[Pass] m => 0x1234567
[Pass] msg_queue_receive(mq, (struct event **) &m, 500) => 0x9
[Pass] sem = sem ? sem : create_named_semaphore("test", 1) => 0x81e6015a
[Pass] take_semaphore(sem, 500) => 0x0
[Pass] take_semaphore(sem, 500) => 0x9
[Pass] give_semaphore(sem) => 0x0
[Pass] take_semaphore(sem, 500) => 0x0
[Pass] give_semaphore(sem) => 0x0
[Pass] rlock = rlock ? rlock : CreateRecursiveLock(0) => 0x82360098
[Pass] AcquireRecursiveLock(rlock, 500) => 0x0
[Pass] AcquireRecursiveLock(rlock, 500) => 0x0
[Pass] ReleaseRecursiveLock(rlock) => 0x0
[Pass] ReleaseRecursiveLock(rlock) => 0x0
[Pass] ReleaseRecursiveLock(rlock) => 0xf
[Pass] f = FIO_CreateFileEx("test.dat") => 0x4
[Pass] FIO_WriteFile(f, (void*)ROMBASEADDR, 0x10000) => 0x10000
[Pass] FIO_WriteFile(f, (void*)ROMBASEADDR, 0x10000) => 0x10000
FIO_CloseFile(f)
[Pass] FIO_GetFileSize("test.dat", &size) => 0x0
[Pass] size => 0x20000
[Pass] p = alloc_dma_memory(0x20000) => 0x409648dc
[Pass] f = FIO_Open("test.dat", O_RDONLY | O_SYNC) => 0x4
[Pass] FIO_ReadFile(f, p, 0x20000) => 0x20000
FIO_CloseFile(f)
free_dma_memory(p)
[Pass] count => 0x3a98
[Pass] FIO_RemoveFile("test.dat") => 0x0
SW1(1,100)
[Pass] HALFSHUTTER_PRESSED => 0x1
SW1(0,100)
[Pass] HALFSHUTTER_PRESSED => 0x0
# Magic Lantern v2.3.NEXT.2017Apr23.5D2212 (09dcd0475cb3+ (new-lv-buffer-detection))
# Built on 2017-04-23 05:47:00 UTC by ml@ml-pc
# Configuration saved on 2017/04/23 18:44:11
beta.warn = 23
# Magic Lantern Nightly.2017Apr24.5D2212 (5d168ad4e8c9+ (allocate-raw-lv-buffer))
# Built on 2017-04-24 01:16:11 UTC by ml@ml-pc
# Configuration saved on 2017/04/23 19:47:45
beta.warn = 23
In 1:1 a surprising 2040x1268 and in 3x crop (5x Zoom) 2312x1128 , Really !
I was under the impression that full Liveview was only 1880x1250 and 3x crop was 2152x1078.
#ifdef CONFIG_5D2
skip_top = zoom ? 52 : 18;
skip_left = 160;
#endif
ff036750 lv_rshd_raw
ff0365f4 lv_raw_dump
ff036704 lv_save_raw
ff036724 lv_continous_frame
ff036760 lv_rec
ff03676c lv_output_device
ff036604 lv_continous_frame_save
ff036784 lv_hd
some lv raw stuff from my decompiled rom dump , I think the ff036750 lv_rshd_raw is what I'm after FF036520: e59f1224 ldr r1, [pc, #548] ; 0xff03674c: pointer to 0xff8347f8 ⬁
FF036524: e28f0f89 add r0, pc, #548 ; *'lv_rshd_raw'
@PressureFM thanks , the more the merrier .Forgive me for my ignorance but what do I do with the downloads to us this build?
Currently the issue is the customs Raw LV buffer , I've been trying to spy the memory to find the LV raw buffer
and looking thought my 5d2 decompiled rom dump for addresses , a1ex gave me some clues at the links
http://www.magiclantern.fm/forum/index.php?topic=19336.msg183374#msg183374
http://www.magiclantern.fm/forum/index.php?topic=19336.msg183382#msg183382
I found the registers needed to modify frame size with adtg_gui but the problem is the LV buffer
I did have some success with my RAW_LV_BUFFER_ALLOC_SIZE (2040*1267) as per post #27
The reason I used that was it was the largest buffer on the edmac & it didn't change when switch to Photo Liveveiw see post #49
Edmac#5 buffer size is what I used , now I think there's I little dilemma here , when I updated to "new-lv-buffer-detections" branch and complied
I ended up with the older core "Magic Lantern v2.3.NEXT" , reason I mention this edmac#5 is Green (active) where in the nightly builds compiles
on newer code edmac Channel #5 is Yellow , which I think is a error or all this could mean nothing , just thought I would mention it .
So Yea LV raw buffer needs to be solved & I thing that will also help to get 10 & 12bit problem in 1:1 solved also
Link to my bitbucket downloads for those memspy builds I talked about .
magiclantern-Nightly.memspy.lv.raw.buffer.extended.resoultion.2017Apr24.5D2212.zip (https://bitbucket.org/reddeercity/magic-lantern_10-12bit/downloads/magiclantern-Nightly.memspy.lv.raw.buffer.extended.resoultion.2017Apr24.5D2212.zip)
magiclantern-v2.3.NEXT.Memspy.2017Apr23.5D2212.zip (https://bitbucket.org/reddeercity/magic-lantern_10-12bit/downloads/magiclantern-v2.3.NEXT.Memspy.2017Apr23.5D2212.zip)
You may just want to compile your own copy of adtg_gui from the ISO-research branch or you can download a copy from my bitbucket download.
So any suggestion are very welcome :D
line 1760 --- 51BF1> TOMgr:ffa21790:41:05: tomSetRawJpgMode (Type = 0x4)
line 2163 --- 6A4E4> Startup:ff8e5f88:98:03: GetImageTrimming X(2976)=0(2414, 2416), Y(1928)=0(1552, 1548)
line 2293 --- 72089> LiveViewMg:ff8e6108:98:02: Origin2 X=911, Y=518 W:1122 C:2976
line 2294 --- 721BA> LiveViewMg:ff8de8e0:9b:03: PROP_MOVIE_PARAM 0 1
line 2295 --- 722B0> LiveViewMg:ff8dd52c:9b:16: PROP_LIVE_VIEW_VIEWTYPE_SELECT 0->2
line 2296 --- 722F3> LiveViewMg:ff8dcdb0:9b:03: ViewType:2
line 4927 --- 38AAA> Startup:ff867658:82:03: InitializeDisplayDeviceController (PUB)
start at line 49753BA12> GuiMainTas:ff892834:85:03: AllocateVramCBR pAddress=43f80000
3BA90> GuiMainTas:ff86503c:00:03: [BmpDDev] CreatePhysicalVram (PUB)
3C401> GuiMainTas:ff864db0:00:03: [BmpDDev] DisplayPhysicalScreen (PUB) 0x43F00008
3C49C> GuiMainTas:ff9a77d0:00:01: [CLKSAVER] ��ClockSave In��
3C4D9> GuiMainTas:ff864be8:82:02: SelectParameterToBmp (PRI)
3C502> GuiMainTas:ff864a40:82:02: SetParameterToBitmapDisplayDevice (PRI)
3C526> GuiMainTas:ff864d3c:82:02: EnableBitmapVBufferForPlayBackAndWaiting (PUB)
3D012> GuiMainTas:ff83f068:36:05: RegisterAdapterStatusCallback
3DB69> GuiMainTas:ffa84814:04:02: Partial memcpy start (x,y,w,h)=( 0, 0, 960, 540 )
4039D> GuiMainTas:ffa84844:04:02: Partial memcpy end
403D0> GuiMainTas:ff9c17ac:83:03: GuiStartGraphics (PUB)
404CE> GuiMainTas:ff82ebd4:80:03: SRM_AllocateMemoryResourceForImgVram 131 3
40582> RscMgr:ff8b6ea8:80:03: srmAllocateImgVram 131 3
405BD> RscMgr:ff8b6ec8:80:03: ImgVram Before -1 -1 -1
405F8> RscMgr:ff8b6fa4:80:03: ImgVram After 131 131 131
4067A> GuiMainTas:ffa41e6c:18:03: (PUB) StartImagePlayer(mode=0) 1203
406BE> GuiMainTas:ffa42000:18:01: mode:0 dec:0x0 rot:0x0 2nd:0x0
406E6> GuiMainTas:ffa4532c:18:03: (PUB) SetVisibleImageVramOffset 4064
40712> GuiMainTas:ffa42304:18:03: (PUB) SetCopyVramMode(mode=0) 1411
4073B> GuiMainTas:ff9c15b0:83:03: GuiGraphicsNormalMode (PUB)
40760> GuiMainTas:ffa4522c:18:03: (PUB) SetImageWorkMemory 1:0x40d00000, 2:0x41700000
40799> GuiMainTas:ffa45274:18:03: (PUB) SetImageWorkMaxPixel W:2200,H:1872,0x5e4340
407CD> GuiMainTas:ffa44db8:18:03: (PUB) SetEffectiveSizeOfJpeg(w:7488 h:4992) 2995
407F8> GuiMainTas:ffa44dd0:18:01: SetEffectiveSizeOfJpeg w:7488 h:4992
40824> GuiMainTas:ffa423f8:18:03: (PUB) SetYuvColorParameter 1447
4089A> GuiMainTas:ff9dc868:83:03: IDLEHandler INITIALIZE_CONTROLLER
408CD> GuiMainTas:ff9dd028:83:03: IDLEHandler GOT_TOP_OF_CONTROL
408F1> GuiMainTas:ff9c3ffc:83:03: GuiClearImage
40914> GuiMainTas:ffa420fc:18:03: (PUB) SetVramInformation(w:1920 h:1080)
4094C> GuiMainTas:ffa421cc:18:03: 1920x1080 BaseVram:1920, VramYuv:1
40977> GuiMainTas:ffa421cc:18:03: 1920x1080 BaseVram:1920, VramYuv:1
409A0> GuiMainTas:ffa42210:18:01: fLcd 0
409C8> GuiMainTas:ffa423b8:18:03: SetImageVramParameter x:0 y:0 w:1920 h:1080/* Aspect:0*/
409FE> GuiMainTas:ffa44c3c:18:03: (PUB) SyncroAllClearImagePlayWorkVramWithoutEngine 2953
40A27> GuiMainTas:ffa4161c:18:03: GetVramNumber 619
40A4B> GuiMainTas:ffa4161c:18:03: GetVramNumber 619
416A5> **INT-0Ah*:00095c38:00:00: >>> INT-Ah Timer ff81027c(0)
416E5> **INT-0Ah*:0000057c:00:00: <<< INT-Ah done
43DB3> **INT-0Ah*:00095c38:00:00: >>> INT-Ah Timer ff81027c(0)
43DDC> **INT-0Ah*:0000057c:00:00: <<< INT-Ah done
45389> GuiMainTas:ffa420fc:18:03: (PUB) SetVramInformation(w:720 h:480)
453B5> GuiMainTas:ffa421cc:18:03: 720x480 BaseVram:720, VramYuv:1
453DD> GuiMainTas:ffa421cc:18:03: 720x480 BaseVram:720, VramYuv:1
45406> GuiMainTas:ffa42210:18:01: fLcd 0
4542B> GuiMainTas:ffa423b8:18:03: SetImageVramParameter x:0 y:0 w:720 h:480/* Aspect:0*/
45459> GuiMainTas:ffa4161c:18:03: GetVramNumber 619
45483> GuiMainTas:ff863840:82:02: GetVramSize (PUB)
454BD> GuiMainTas:ff86413c:82:03: EnableImagePhysicalScreenParameter
4556B> GuiMainTas:ff9a77d0:00:01: [CLKSAVER] ��ClockSave In��
455AC> GuiMainTas:ff8638c4:82:01: ImgDDev SelectParameter DispType=0
455D1> GuiMainTas:ff863840:82:02: GetVramSize (PUB)
455FC> GuiMainTas:ff8640d4:82:02: EnableImageVBufferForPlayBackAndWait (PUB)
45688> GuiMainTas:ffa4161c:18:03: GetVramNumber 619
456BD> GuiMainTas:ffa4161c:18:03: GetVramNumber 619
Can somebody explain in laymans terms what needs to happen to get this to 550D.
The custom buffer is required, as ML redirects it only while recording.
In the crop_rec_4k branch I've used a SRM buffer (which can accommodate a full-res 14-bit picture).
This needs to be passed to SetEDmac as the first argument (instead of Canon's default buffer).
The buffer redirection without CONFIG_EDMAC_RAW_SLURP is fragile:
it relies on lucky timing. It's best refactored somehow, but cache patching is also ugly...
.... is it compressed raw being referred to as "lossless".Yes
What needed now is someone with advanced knowledge of digic4 Liveview buffers
use the dm-spy-experiments branch (or the startup-log builds (https://builds.magiclantern.fm/jenkins/view/Experiments/job/startup-log/)), enter LiveView while the LED is blinking (that is, while debug messages are recorded) and then run the extract_init_spells.py (https://bitbucket.org/hudson/magic-lantern/src/qemu/contrib/qemu/eos/mpu_spells/) script on the log file.Does this still need to be done for 5D2?
cam_dir = [d for d in os.listdir(ml_dir)
if d.split(".")[0] == camera_model
and os.path.isfile(os.path.join(ml_dir, d, "gui.h"))
][0]
just manually set it to "5D2.212", also default ML directory was wrong in my case. This alone is enough for some LiveView bitmap overlays on 500D (Greg's screenshot (http://www.magiclantern.fm/forum/index.php?topic=2864.msg179867#msg179867) - didn't try on other models).I would be interested in at least looking at the code .
Progressing from there is much harder. I can share the current patch if there is interest
Any progress on this? Seems to have stopped still for a month.No.
Has the way to crop record been discovered yet?It's very close (http://www.magiclantern.fm/forum/index.php?topic=19336.msg183098#msg183098) , the only issue is having a custom image buffer with the right address .
(I was also hoping in mv1080 on EOS M, but all my questions in appropriate threads have been ignored, so i kinda gave up)
What do you mean? EOS M can do mv1080 if you turn on H.264 proxy. It is rather buggy and experimental but hey.
http://www.magiclantern.fm/forum/index.php?topic=16608.msg179969#msg179969
Ok --So I decided to forge ahead after urging from some forum members and help from a1ex.
So to get up to speed read the posts below to those members who are following the development , should help explain where I am in all this.
http://www.magiclantern.fm/forum/index.php?topic=19386.msg186209#msg186209
http://www.magiclantern.fm/forum/index.php?topic=19386.msg186213#msg186213
Basically I trying to get back to the 3584x1068 raw buffer I had working here (http://www.magiclantern.fm/forum/index.php?topic=19336.msg183098#msg183098)
Stay tuned :)
Ok --So I decided to forge ahead after urging from some forum members and help from a1ex.
So to get up to speed read the posts below to those members who are following the development , should help explain where I am in all this.
http://www.magiclantern.fm/forum/index.php?topic=19386.msg186209#msg186209
http://www.magiclantern.fm/forum/index.php?topic=19386.msg186213#msg186213
Basically I trying to get back to the 3584x1068 raw buffer I had working here (http://www.magiclantern.fm/forum/index.php?topic=19336.msg183098#msg183098)
Stay tuned :)
Great to hear. As I said, I will be helping as much as I can from September onward.Sounds good , In the mean time I would suggest familiarize yourself with this thread , 10-12bit thread and of course the iso-research (https://bitbucket.org/hudson/magic-lantern/src/bd8e89d9dccf2d1541bb449efd06bb450cdce153/?at=iso-research) source code. (That's where I started from)
Hello, I just want to thank all the developers for the work done, I wish this will one day be ported to 7D, old camera but still doing an amazing job when used with ML.
Sounds good , In the mean time I would suggest familiarize yourself with this thread , 10-12bit thread and of course the iso-research (https://bitbucket.org/hudson/magic-lantern/src/bd8e89d9dccf2d1541bb449efd06bb450cdce153/?at=iso-research) source code. (That's where I started from)
You will need a developing environment -- I use a VM (VirtualBox) on Window7 Pro with a preconfigured magic lantern clone of Ubuntu (http://www.magiclantern.fm/forum/index.php?topic=18259.msg174934#msg174934) ready to compile ML . Download links for clone of Ubuntu here (http://www.magiclantern.fm/forum/index.php?topic=7579.msg134989#msg134989)
You can run the VM under Mac or Windows just get the correct version for your OS , if you feel adventurous you can setup your own environment @dfort has make some tutorial here (http://www.magiclantern.fm/forum/index.php?topic=16012.msg155422#msg155422) and here (http://www.magiclantern.fm/forum/index.php?topic=15894.msg154435#msg154435)
You need to be very comfortable with compiling , merging , update source with "HG" etc. ..... I work with a VM because it's faster & easier to get up and running in less then 30 mins .
for the 5d2 users could you do 2 screenshot , 1 with the latest nightly and the other with the adtg_gui
#ifdef CONFIG_5D2
#define RAW_LV_BUFFER_ALLOC_SIZE (2040*1267)
#endif
also in raw.c changed to 0xC0F04500 from 0xC0F04508#if defined(CONFIG_5D2) || defined(CONFIG_50D)
#define RAW_LV_EDMAC 0xC0F04500
#endif
in edmac-memcpy.c change the r/w channel to 0xff & 0x0 from read 0x19 & write 0x03#if defined(CONFIG_5D2) || defined(CONFIG_50D)
uint32_t edmac_read_chan = 0xff;
uint32_t edmac_write_chan = 0x0;
Hello, I just want to thank all the developers for the work done, I wish this will one day be ported to 7D, old camera but still doing an amazing job when used with ML.
If you could keep your development current in bitbucket maybe some of us could offer suggestions.+1
#ifdef CONFIG_5D2
#define RAW_LV_BUFFER_ALLOC_SIZE (2040*1267)
#endif
With out the buffer it will not work The custom buffer is required, as ML redirects it only while recording.Also in RAW.C I change the memory addressed for Liveveiw default was 0xC0f04508 to 0xC0f04500
In the crop_rec_4k branch I've used a SRM buffer (which can accommodate a full-res 14-bit picture).
This needs to be passed to SetEDmac as the first argument (instead of Canon's default buffer).
The buffer redirection without CONFIG_EDMAC_RAW_SLURP is fragile: it relies on lucky timing. It's best refactored somehow, but cache patching is also ugly...
#if defined(CONFIG_5D2) || defined(CONFIG_50D)
#define RAW_LV_EDMAC 0xC0F04500
#endif
In edmac-memcpy.c I also changed the default R/W channels , default Read 0x19 & Write 0x03#if defined(CONFIG_5D2) || defined(CONFIG_50D)
uint32_t edmac_read_chan = 0xff;
uint32_t edmac_write_chan = 0x0;
Sorry guys I haven't had time to responded to the posts , had one of my main servers crashed (lost the raid & the backup :( ) so I had to rebuild from scratch which took some time.Oh no :( Hope you didn't lose any important footage.
I know how thing work , I read code and understand perfectly just don't know the proper syntax when writing c codeExact opposite here, know C, but have no idea how Magic Lantern or Canon works :D
I really don't know how share my code on bitbucketOk, well even in that case, you can still just upload a zip file with your modified code.
Exact opposite here, know C, but have no idea how Magic Lantern or Canon works :DThat good to know , that will help a lot :D
When you have the ~3500x1000px buffer showing in the menu, is the camera in a state where it can record a small test clip at that resolution?Can't save a dng yet , tried a image dump I can save the liveview422 see post #90 (http://www.magiclantern.fm/forum/index.php?topic=19336.msg187766#msg187766) here is the original LV dump 422 image LV-002.422 (https://bitbucket.org/reddeercity/magic-lantern_10-12bit/downloads/LV-002.422) in Black & White ML perview I guess I should correct my self it did save a DNG file but it was "0" bytes and there was a HD Liveview dump image HD-002.422 (https://bitbucket.org/reddeercity/magic-lantern_10-12bit/downloads/HD-002.422) which was normal looking .
Or would it just be noise and garbage? If so, what would the steps to getting a clean image be from that point onwards?
Also what do developers like a1ex think of reddeercity's work?http://www.magiclantern.fm/forum/index.php?topic=19336.msg187776#msg187776
@ Ilia3101 here you go Source Code with modification magic-lantern-adtg-gui-4k-test_source_code.zip (https://bitbucket.org/reddeercity/magic-lantern_10-12bit/downloads/magic-lantern-adtg-gui-4k-test_source_code.zip)Thanks a lot, I'll see if I can come up with any useful changes.
Can't save a dng yet , tried a image dump I can save the liveview422 see post #90 (http://www.magiclantern.fm/forum/index.php?topic=19336.msg187766#msg187766) here is the original LV dump 422 image LV-002.422 (https://bitbucket.org/reddeercity/magic-lantern_10-12bit/downloads/LV-002.422) in Black & White ML perview I guess I should correct my self it did save a DNG file but it was "0" bytes and there was a HD Liveview dump image HD-002.422 (https://bitbucket.org/reddeercity/magic-lantern_10-12bit/downloads/HD-002.422) which was normal looking .I have an idea why the preview is all noise: The 3K preset adjusts the preview parameters as well as raw parameters, so image framing is correct on 5D3 at the 3K res(is this true?), so maybe it ruins the preview on 5D2.
I think to clean it up it could be as easy as fps A & B timing or even the Cmos register , once there a clean LV image with ML B/W preview I think it may save a dng dump , there a raw record error when I try to save .raw file (Yes I'm still using raw 1st version not mlv lite , it's very basic just record raw once I have something stable I'll move to MLV Lite)
@ Ilia3101 I will also PM you with the test 3.5k build I was using to do my test that I posted in #90 , I don't what to post it publicly so it get out in the wild.Thx
#define RAW_LV_BUFFER_ALLOC_SIZE (2040*1267)
it's the 1:1 buffer , just look at post#90 in the Edmac screen shot on EDM#5 , address "43e28a4" 3570x1267 (3570/14*8 = 2040) . You could try the 3x crop buffer which is 4046 x 1127 so (4046/14*8 = 2312) I have an idea why the preview is all noise: The 3K preset adjusts the preview parameters as well as raw parameters, so image framing is correct on 5D3 at the 3K res(is this true?), so maybe it ruins the preview on 5D2.Look at this for help adtg_gui.c-1127 (https://bitbucket.org/hudson/magic-lantern/src/bd8e89d9dccf2d1541bb449efd06bb450cdce153/modules/adtg_gui/adtg_gui.c?at=iso-research&fileviewer=file-view-default#adtg_gui.c-1127) and also this adtg_gui.c-1343 (https://bitbucket.org/hudson/magic-lantern/src/bd8e89d9dccf2d1541bb449efd06bb450cdce153/modules/adtg_gui/adtg_gui.c?at=iso-research&fileviewer=file-view-default#adtg_gui.c-1343)
I'll try and find where the presets are in the code and comment out the changes in it that are irrelevant, maybe the image will be clear then.
408 * How to find buffer dimensions for CONFIG_EDMAC_RAW_SLURP:
409 * - Go to LV and use lv_save_raw
410 * - Check the RAW_LV_EDMAC debug info
411 * - Suppose it reports W: 0xA3A H: 0x3C7 (taken from 1100D in LV mode)
412 * - EDMAC W is the number of bytes per line
413 * - The W resolutions is computed as: W * 8 / 14 (raw buffer is 14 bits per pixel)
414 * - Thus 0xA3A 8 / 14 -> 1496 pixels
415 * - EDMAC H is the number of "jumps"
416 * - The H resolutions is H + 1 -> 0x3C8 -> 968 pixels
/** this method bypasses Canon's lv_save_raw and slurps the raw data directly from connection #0 */
#define CONFIG_EDMAC_RAW_SLURP
not to sure about "connection #0" thou -- this maybe a wild goose chase
not to sure about "connection #0" thou -- this maybe a wild goose chase
if (get_halfshutter_pressed())
{
EngDrvOut(SHAD_GAIN_REGISTER, rand());
}
408 * How to find buffer dimensions for CONFIG_EDMAC_RAW_SLURP:
409 * - Go to LV and use lv_save_raw
410 * - Check the RAW_LV_EDMAC debug info
411 * - Suppose it reports W: 0xA3A H: 0x3C7 (taken from 1100D in LV mode)
412 * - EDMAC W is the number of bytes per line
413 * - The W resolutions is computed as: W * 8 / 14 (raw buffer is 14 bits per pixel)
414 * - Thus 0xA3A 8 / 14 -> 1496 pixels
415 * - EDMAC H is the number of "jumps"
416 * - The H resolutions is H + 1 -> 0x3C8 -> 968 pixels
@dfort didn't you go though this with the eosm ? I can't seem to find it , if not I have to do more searching .
/* this causes the function to hang!? */
if(data.options.rawMode)
{
//~ bmp_printf( FONT(FONT_MED, COLOR_WHITE, COLOR_BLACK), 30, 20 * yPos++, "Make sure you ran call('lv_save_raw')");
call("lv_save_raw", 1);
msleep(200);
raw_update_params();
}
I can't find it either. This is the closest that I could come up with: http://www.magiclantern.fm/forum/index.php?topic=5601.msg179673#msg179673@dfort thanks , that will help a lot
Maybe write something in dubug.c calling lv_save_raw and print it on the screen or console? There's a hint in lv_rec.c:Code: [Select]/* this causes the function to hang!? */
if(data.options.rawMode)
{
//~ bmp_printf( FONT(FONT_MED, COLOR_WHITE, COLOR_BLACK), 30, 20 * yPos++, "Make sure you ran call('lv_save_raw')");
call("lv_save_raw", 1);
msleep(200);
raw_update_params();
}
:-[ I never thought hex , I light bulb just came on as soon as I that.
The rest of it makes sense to me:
0xA3A (hex) = 2618 (decimal)
2618 * 8 / 14 -> 1496 pixels
To get the entire raw buffer from a DNG, including OB area: dcraw -4 -E
To get the active area only: dcraw -4 -D
#ifdef CONFIG_5D2
#define RAW_LV_BUFFER_ALLOC_SIZE (2040*1267)
#endif
Plus the other changes I made to the code here (http://www.magiclantern.fm/forum/index.php?topic=19336.msg189550#msg189550)# Config file for module crop_rec (CROP_REC.MO)crop.preset = 1
magic.cfg# Magic Lantern Nightly.2017Apr14.5D2212 (bd8e89d9dccf+ (iso-research))
# Built on 2017-04-14 03:42:23 UTC by ml@ml-pc
# Configuration saved on 2017/10/29 19:17:40
beta.warn = 29
menu.first = -3
movie.log = 1
rec.notify = 0
enable-liveview = 2
fps.override.idx = 11
battery.drain.rate.rev = 69
hist.log = 0
spotmeter.draw = 0
zebra.draw = 0
disp.mode.x = 149
# Config file for module raw_rec (RAW_REC.MO)
raw.video.enabled = 1
raw.res.x = 20
raw.dolly = 1
raw.preview = 2
raw.warm.up = 2
....These include for example register offset ranges 0x44-0x1CC and 0x1F0-0x228.will that seem to be dslr stuff :o , need to dig deeper .
According to the code these address ranges contain registers for OTF Defect Pixel Correction, Lens Shading Correction, Noise Filtering and CFA interpolation. ....
I have nothing valuable to add I just wanted you to know I get so excited when there's a new reply in this thread.
I have nothing valuable to add I just wanted you to know I get so excited when there's a new reply in this thread.
#define RAW_LV_BUFFER_ALLOC_SIZE (2040*1267)
I would suspect 550d would be the same but for 7D it may not because of the dual cpu there are more difficultyI am coming from a 550d thread , To help with further development with 550d
...... ported with Canon 7D to get the most consistent and solid 10bit 1080p recording I need!
Digic IV cams work with RAW_LV_BUFFER_ALLOC_SIZE as long as you find the right buffer e.g. 5D2Code: [Select]#define RAW_LV_BUFFER_ALLOC_SIZE (2040*1267)
static void srm_malloc_cbr(void** dst_ptr, void* raw_buffer, uint32_t raw_buffer_size)
{
if (!srm_buffer_size)
{
/* we can't tell how much to allocate; the allocator tells us */
srm_buffer_size = raw_buffer_size;
}
else
{
/* it should tell us the same thing every time */
ASSERT(srm_buffer_size == raw_buffer_size);
}
/* return the newly allocated buffer in the output variable */
*dst_ptr = raw_buffer;
/* announce it's done */
give_semaphore(srm_alloc_sem);
bmp_printf(FONT_LARGE, 50, 300, "SRM_BUFFER_SIZE 0x%x", srm_buffer_size);
}
#define SRM_BUFFER_SIZE 0x1F80000 /* print it from srm_malloc_cbr */
0x25d0000
static int res3k_reg(int reg)
{
if (regs[reg].dst == 0xC0F0)
{
switch (regs[reg].reg)
{
case 0x6804: /* C0F06804 - raw resolution */
return 0x52801AB; /* from 0x528011B -> 3072px in raw_rec */
with buffer #ifdef CONFIG_5D2
#define RAW_LV_BUFFER_ALLOC_SIZE (2040*1267)
#endif
that end up to be 3584x1068 . * 5D2 photo:
* 0xC0F06088.hi - 0xC0F06084.hi is the vertical resolution (3804)
* 0xC0F06084.hi shifts the image in one-line increments, so it must be the first scanned line
* (0xC0F06088.lo - 0xC0F06084.lo) * 2 is the horizontal resolution (5792)
#elif defined(CONFIG_7D)
uint32_t edmac_read_chan = 0x0A; /*Read 0x19 0x0D 0x0B 0x0A(82MB/S)*/
uint32_t edmac_write_chan = 0x06; /* Write 0x5 0x6 0x4 (LV) */
#if defined(CONFIG_500D) || defined(CONFIG_550D) || defined(CONFIG_7D)
#define RAW_LV_EDMAC 0xC0F26008
#endif
That's why I changed define RAW_LV_EDMAC 0xC0F04508
to define RAW_LV_EDMAC 0xC0F04500
Something interesting -- if you take Edmac#16 (on 7D) buffer "4410x1225" ....... at least some of the answers we found cataloged in some way. David (a.k.a. reddeercity) how about modifying your first post and adding the SRM_BUFFER_SIZE for the various cameras that we have this resolved?
switch (crop_preset)
{
/* 1:1 (3x) */
case CROP_PRESET_3X:
/* start/stop scanning line, very large increments */
/* note: these are two values, 6 bit each, trial and error */
cmos_new[1] = (is_720p())
? PACK12(14,10) /* 720p, almost centered */
: PACK12(11,11); /* 1080p, almost centered */
cmos_new[2] = 0x10E; /* read every column, centered crop */
cmos_new[6] = 0x170; /* pink highlights without this */
break;
Checking it twice a day? Really?
Of course it would be much easier if we all upgraded our older cameras for something not so old but not too new either.
Something interesting -- if you take Edmac#16 (on 7D) buffer "4410x1225"
4410/14*8 = 2520
So this could be your custom buffer 2520 x 1127 -- this is how I came up with my buffer.
#ifdef CONFIG_1100D
#define RAW_LV_BUFFER_ALLOC_SIZE (3906*968)
#endif
#define RAW_LV_BUFFER_ALLOC_SIZE (3906*766)
408 * How to find buffer dimensions for CONFIG_EDMAC_RAW_SLURP:
409 * - Go to LV and use lv_save_raw
410 * - Check the RAW_LV_EDMAC debug info
411 * - Suppose it reports W: 0xA3A H: 0x3C7 (taken from 1100D in LV mode)
412 * - EDMAC W is the number of bytes per line
413 * - The W resolutions is computed as: W * 8 / 14 (raw buffer is 14 bits per pixel)
414 * - Thus 0xA3A 8 / 14 -> 1496 pixels
415 * - EDMAC H is the number of "jumps"
416 * - The H resolutions is H + 1 -> 0x3C8 -> 968 pixels
#ifdef CONFIG_7D
#define RAW_LV_BUFFER_ALLOC_SIZE (4410*1226)
#endif
mv640
Default Crop Size : 1736 694
Active Area : 26 256 720 1992
mv720
Default Crop Size : 1736 694
Active Area : 26 256 720 1992
mv1080
Default Crop Size : 1736 1156
Active Area : 26 256 1182 1992
zoom
Default Crop Size : 2520 1200
Active Area : 26 0 1226 2520
FRSP
Default Crop Size : 5202 3466
Active Area : 50 158 3516 5360
1100D *has* CONFIG_EDMAC_RAW_SLURP (check the build log from the Experiments page). Don't remember anyone reporting back for this model, so I don't know whether the 10/12-bit build works or not (or whether to commit the allocate-raw-lv-buffer merge, for that matter).
RAW_LV_BUFFER_ALLOC_SIZE is how much we need for a full-res image (max W * max H * 14/8).
#define SRM_BUFFER_SIZE 0x1F80000 /* print it from srm_malloc_cbr */
#ifdef LV_STATE
#define RAW_LV_BUFFER_ALLOC_SIZE (SRM_BUFFER_SIZE)
#endif
How did you get 1127 from 1225?Sorry , mistake I meant 2520x1225 . But it seems I may be wrong after reading a1ex posts need to investigate more
416 * - The H resolutions is H + 1
SRM_BUFFER_SIZE... just reduce the size by 0x100 bytes or so.
#ifdef CONFIG_7D
#define RAW_LV_BUFFER_ALLOC_SIZE (SRM_BUFFER_SIZE - 0x1000)
#endif
#ifdef CONFIG_5D2
#define RAW_LV_BUFFER_ALLOC_SIZE (SRM_BUFFER_SIZE - 0x1000)
#endif
At least no ill effects , complied it on the iso_research branch I'm using , but did not load adtg_gui yet to see if it changes anything.E05D3> GuiMainTas:ffa4522c:18:03: (PUB) SetImageWorkMemory 1:0x40d00000, 2:0x41700000
E060A> GuiMainTas:ffa45274:18:03: (PUB) SetImageWorkMaxPixel W:2200,H:1872,0x5e4340
E0640> GuiMainTas:ffa44db8:18:03: (PUB) SetEffectiveSizeOfJpeg(w:7488 h:4992) 2995
E066D> GuiMainTas:ffa44dd0:18:01: SetEffectiveSizeOfJpeg w:7488 h:4992
#ifdef CONFIG_5D2
#define DEFAULT_RAW_BUFFER MEM(MEM(0x5e4340))
#endif
#define CONFIG_EDMAC_RAW_SLURP
in to platform/5D2.212/internals.hOk can we please stay on topic here , any 10-12bit 7d should be discuss
either on the 7d or 10-12bit thread no here . This is for UHD/3.5k development.
I would rather welcome the guy(dfort) who potentially could hold the key to the raw_slurp code snippet for the 5D mark II. But hey, that´s just me.title says it all: "..and other digic IV cams" and I bet the 7D will fit 3K continuous recording too :P
As far as I understand the LCD doesn't freeze now any more while recording 10/12bit @danne??
This is for UHD/3.5k development.
There are lots of parts to this.
And I can't find the main threads on compressed raw anymore
static int res3k_reg(int reg)
{
if (regs[reg].dst == 0xC0F0)
{
switch (regs[reg].reg)
{
case 0x6804: /* C0F06804 - raw resolution */
return 0x52801AB; /* from 0x528011B -> 3072px in raw_rec */
}
}
In my code I chanced "0x60804"(digic v) to "0x6084"(digic iv) before I test it l was hopping to find the right size for the 3k preset as you have "0x52801AB" ff0322b4 > LimitRawSize [%d]
ff034b80 Enable AE Sequence = %1d
ff034b9c Enable AF Sequence = %1d
ff034bb8 Output AF RAW Data = %1d
ff034bd4 Output AE RAW Data = %1d
ff034bf0 Output DEFM Raw = %1d
ff034c0c Output RSHD Raw = %1d
so when the af & ae sequence are enabled there are output to more then one regs
ff186ee4: e51f0064 ldr r0, [pc, #-100] ; ff186e88: (00007d9c)
ff186ee8: e59f11c8 ldr r1, [pc, #456] ; ff1870b8: (c0f0713c)
..................
ff986ee4: e51f0064 ldr r0, [pc, #-100] ; ff986e88: (00007d9c)
ff986ee8: e59f11c8 ldr r1, [pc, #456] ; ff9870b8: (c0f0713c)
EOSTimerGen is a tool for Magic Lantern users that want to
a) over/undercrank the camera (to get higher or lower frame rates)
b) fine tune their frame rate to overcome production tolerances
c) synchronize two or more cameras to have nearly the same rate
reddeercity, Thanks for that but it seems timer B don't increase height like with other models.try maybe ADTG1 [105f]N , or the ADTG2 -- one is for 3xcrop mode & the other is for 1:1 FHD
I tried a lot of things but nothing works.
Perhaps ADTG [8xxx] but unfortunately I don't succeed to see it with adtg-gui module in 5D2.
reddeercity, Thanks for that but it seems timer B don't increase height like with other models.Being trying to reproduce this from @waza57 but no go , I clone crop_rec_4k_5d2 branch and update to comment f73a13b (https://bitbucket.org/waza57/magic-lantern/commits/09dfad1ad108fbe480077aab0bf39f418cc2cda2) -- I can load crop_crop.mo but it's disable , the mlv_lite and adtg_gui.mo didn't make .
I tried a lot of things but nothing works.
Perhaps ADTG [8xxx] but unfortunately I don't succeed to see it with adtg-gui module in 5D2.
An example :
(https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fthumb.ibb.co%2Fb79O2S%2FM17_0638_00000.png&hash=9d1f291f5b3e1d309ce33815cae2d807) (https://ibb.co/b79O2S)
effective width: 2840
effective height: 1082
../../src/raw.c: In function 'raw_lv_get_resolution':
../../src/raw.c:682:5: error: invalid storage class for function 'raw_update_params_work'
int raw_update_params_work()
int raw_update_params_work()
anything to do with "invalid storage class for function 'raw_update" etc. ..... #ifdef CONFIG_5D2
#define RAW_LV_BUFFER_ALLOC_SIZE (SRM_BUFFER_SIZE - 0xF000)
#end
In adtg_gui.c I changed 0x6800 -->0x6084/8static int res3k_reg(int reg)
{
if (regs[reg].dst == 0xC0F0)
{
switch (regs[reg].reg)
{
case 0x6084/8: /* C0F06084/8 - raw resolution */
return 0x52801AB; /* from 0x528011B -> 3072px in raw_rec */
}
}
and added in mlv_lite.c the extended resolutions 3840, 4096
# Magic Lantern Nightly.2018May03.5D2212 (f683753bc4e3+ (iso-research))
# Built on 2018-05-03 03:54:46 UTC by ml@ml-pc
# Configuration saved on 2018/05/02 22:40:24
beta.warn = 2
menu.first = -4
movie.log = 1
rec.notify = 0
enable-liveview = 2
fps.preset = 1
fps.override.idx = 32
fps.override = 1
battery.drain.rate.rev = 59
hist.log = 0
spotmeter.draw = 0
clear.preview = 4
zebra.draw = 0
disp.mode.x = 149
0 3F77F0FE 3D41FF14 Overlay\Zebras
0 3F783078 3D556563 Overlay\Spotmeter
0 409A2D5E 3E935DBF Movie\FPS override
0 3FF3E2C6 3CA1335E Movie\Crop mode
0 409BA922 3F3448D6 Movie\RAW video
0 3F711935 3B573CCE Movie\Movie Tweaks
0 3FFA4E97 3E70270A Display\Clear overlays
0 407B0F0F 3F208C48 Display\Anamorphic
0 3FFB325A 3EF96A01 Debug\Memory patches
0 3FF8BDA4 3EF33695 Debug\Show console
0 409C1067 3F4B1C91 Debug\ADTG Registers
0 3F7308B9 3BE6B0C1 Debug\Lens info
0 40BC1075 40007E74 Debug\Screenshot - 10s
0 3FFA92E5 3EDB7170 Debug\Dump image buffers
0 3F7346F1 3BFDC26F Debug\Don't click me!
0 3F7E7825 3F10815C Debug\Free Memory
0 3F7156EE 3B6CC2E3 Movie Tweaks\Movie Logging
0 3F7194B7 3B8237FD Movie Tweaks\REC/STBY notify
0 3F71D290 3B8F3D97 Movie Tweaks\Force LiveView
0 3F72CA91 3BD1B7F5 FPS override\Desired FPS
0 3F728C79 3BBEA73B FPS override\Optimize for
0 3F787002 3D6ABC54 Histogram\Scaling
0 3F75B891 3CA48BF9 Advanced\DIGIC Registers
0 3F78EF46 3D8E03DC Advanced\Log Registers Now
0 3FF9750E 3EAE7395 Advanced\1:1 3K crop mode (5D3)
0 4079DAD8 3FA5BBBF RAW video\Resolution
0 3FF5D867 3D364505 RAW video\Aspect ratio
0 3FFF9DD2 3FDE2613 RAW video\Preview
0 3F747EF9 3C4C5756 RAW video\Advanced...
0 3F7EB94A 3F1EF4B2 Free Memory\Allocated RAM
RAW_LV_BUFFER_ALLOC_SIZE (SRM_BUFFER_SIZE - 0xF000)
I thing this what keeping me from saving a DNG on dumps , it does export a DNG but it's empty cmos[1] 0xc00 --> 0xbc0 (height)
cmos[2] 0x40e --> 0x10e (width)
With that I choose up to 4096x1250 , I got that by just switching in to 3x crop_mode and reading what the reg's at cmos 1&2 are.c0f0 0x6084 --> 0x10036 (1:1 FHD)
c0f0 0x6084 --> 0x30036 (3x crop_mode)
c0f0 0x6088 --> 0x4f40432 (1:1 FHD)
c0f0 0x6088 --> 0x46a04ba (3x crop_mode)
../../src/raw.c:161:0: warning: "RAW_LV_BUFFER_ALLOC_SIZE" redefined [enabled by default]
#define RAW_LV_BUFFER_ALLOC_SIZE (SRM_BUFFER_SIZE - 0x1000)
^
../../src/raw.c:147:0: note: this is the location of the previous definition
#define RAW_LV_BUFFER_ALLOC_SIZE (SRM_BUFFER_SIZE - 0xF000)
^
../../src/raw.c: In function 'raw_lv_realloc_buffer':
../../src/raw.c:578:39: error: 'DEFAULT_RAW_BUFFER' undeclared (first use in this function)
if (raw_lv_buffer != (void *) DEFAULT_RAW_BUFFER)
^
../../src/raw.c:578:39: note: each undeclared identifier is reported only once for each function it appears in
make: *** [raw.o] Error 1
if you have trouble following what posted from the raw.c I uploaded the whole file to my bitbucket downloads folder71- /*********************** Camera-specific constants ****************************/
72-
73- #ifdef CONFIG_EDMAC_RAW_SLURP
74- /* undefine so we don't use it by mistake */
75- #undef RAW_LV_EDMAC
76-
77- /* hardcode Canon's raw buffer directly */
78- /* you can find it from lv_raw_dump, arg1 passed to dump_file:
79- *
80- * raw_buffer = get_raw_buffer()
81- * sprintf_maybe(filename, '%08lx.mm1', raw_buffer)
82- * ...
83- * dump_file(filename, raw_buffer, 7*something...)
84- */
..................
146- #ifdef CONFIG_5D2
147- #define RAW_LV_BUFFER_ALLOC_SIZE (SRM_BUFFER_SIZE - 0xF000)
148- #define DEFAULT_RAW_BUFFER_SIZE (9*1024*1024) (I added this as I thought it be big enough , not too sure thou -- is this my problem not sure how to find it out )
149- #endif
150-
151- #ifndef DEFAULT_RAW_BUFFER_SIZE
152- /* todo: figure out how much Canon code allocates for their LV RAW buffer - how? */
153- #warning FIXME: using dummy DEFAULT_RAW_BUFFER_SIZE
154- #define DEFAULT_RAW_BUFFER_SIZE (9*1024*1024)
155- #endif
156-
157- /* for higher resolutions we'll allocate a new buffer, as needed */
158- /* all cameras using CONFIG_EDMAC_RAW_SLURP should be able to handle this */
159- /* SRM_BUFFER_SIZE matches the full-res image size, as 14-bit uncompressed (actually a bit larger, but not much) */
160- #define CONFIG_ALLOCATE_RAW_LV_BUFFER
161- #define RAW_LV_BUFFER_ALLOC_SIZE (SRM_BUFFER_SIZE - 0x1000)
..........................
549- #ifdef CONFIG_EDMAC_RAW_SLURP
550-
551- /* requires raw_sem */
552- static void raw_lv_free_buffer()
553- {
554- printf("Freeing LV raw buffer %x.\n", raw_lv_buffer);
555- if(raw_allocated_lv_buffer) {
556- free(raw_allocated_lv_buffer);
557- raw_allocated_lv_buffer = 0;
558- }
559- raw_lv_buffer = 0;
560- raw_lv_buffer_size = 0;
561- }
562-
563- /* requires raw_sem */
564- static void raw_lv_realloc_buffer()
565- {
566- int width, height;
567- int ok = raw_lv_get_resolution(&width, &height);
568- if (!ok)
569- {
570- ASSERT(0);
571- return;
572- }
573-
574- int required_size = width * height * 14/8;
575- if (DEFAULT_RAW_BUFFER_SIZE >= required_size)
576- {
577- /* no need for a larger buffer */
578- if (raw_lv_buffer != (void *) DEFAULT_RAW_BUFFER) ----- (this where the error is not sure to resolve it )
579- {
580- printf("Default raw buffer OK for %dx%d (%s)", width, height, format_memory_size(required_size));
581-
582- if (raw_lv_buffer && raw_lv_buffer == raw_allocated_lv_buffer)
583- {
584- printf(" - back to default.\n");
585- raw_lv_free_buffer();
586- }
587- else if (raw_lv_buffer)
588- {
589- printf(": %x -> %x\n", raw_lv_buffer, DEFAULT_RAW_BUFFER);
590- }
591- else
592- {
593- printf(".\n");
594- }
595- }
596-
597- raw_lv_buffer = (void *) DEFAULT_RAW_BUFFER;
598- raw_lv_buffer_size = DEFAULT_RAW_BUFFER_SIZE;
599- return;
600- }
601-
602- if (raw_lv_buffer_size >= required_size)
603- {
604- /* no need for a larger buffer */
605- return;
606- }
607-
608- printf("Default raw buffer too small (%s", format_memory_size(raw_lv_buffer_size));
609- printf(", need %dx%d %s) - reallocating.\n", width, height, format_memory_size(required_size));
610-
611- if (raw_lv_buffer && raw_lv_buffer != (void *) DEFAULT_RAW_BUFFER)
612- {
613- ASSERT(0);
614- return;
615- }
616-
617- #ifdef CONFIG_ALLOCATE_RAW_LV_BUFFER
618- raw_allocated_lv_buffer = fio_malloc(RAW_LV_BUFFER_ALLOC_SIZE);
619- raw_lv_buffer = raw_allocated_lv_buffer;
620- raw_lv_buffer_size = RAW_LV_BUFFER_ALLOC_SIZE;
621- return;
622- #endif /* CONFIG_ALLOCATE_RAW_LV_BUFFER */
623-
624- /* you should enable CONFIG_ALLOCATE_RAW_LV_BUFFER
625- * or find some other way to reserve memory for the RAW LV buffer */
626- ASSERT(0);
627- }
628-
629- #endif /* CONFIG_EDMAC_RAW_SLURP */
630- #endif /* CONFIG_RAW_LIVEVIEW */
631-
if (raw_lv_buffer != (void *) DEFAULT_RAW_BUFFER)
I added #ifdef CONFIG_5D2
#define RAW_LV_BUFFER_ALLOC_SIZE (SRM_BUFFER_SIZE - 0x1000)
#define DEFAULT_RAW_BUFFER_SIZE (9*1024*1024).
#endif
Is there a way to find the "DEFAULT_RAW_BUFFER_SIZE" ?#define DEFAULT_RAW_BUFFER_SIZE (9*1024*1024)
#endif
but if I'm using "SRM_Buffer" do I really need the "Default_Raw_Buffer_Size"1726C> GuiMainTas:ffa4522c:18:03: (PUB) SetImageWorkMemory 1:0x40d00000, 2:0x41700000
172A7> GuiMainTas:ffa45274:18:03: (PUB) SetImageWorkMaxPixel W:2200,H:1872,0x5e4340
#ifdef CONFIG_5D2
#define RAW_LV_BUFFER_ALLOC_SIZE (2040*1267)
#endif
that's equal to the full image buffer full image buffer (https://www.magiclantern.fm/forum/index.php?topic=19336.msg196437#msg196437) on 5d2 .#ifdef CONFIG_5D2
/* for higher resolutions we'll allocate a new buffer, as needed */
#define RAW_LV_BUFFER_ALLOC_SIZE (SRM_BUFFER_SIZE - 0x1000)
#define DEFAULT_RAW_BUFFER (4096*4096)
#endif
/* requires raw_sem */
static void raw_lv_realloc_buffer()
{
int width, height;
int ok = raw_lv_get_resolution(&width, &height);
if (!ok)
{
ASSERT(0);
return;
}
int required_size = width * height * 14/8;
if (DEFAULT_RAW_BUFFER_SIZE >= required_size)
{
/* no need for a larger buffer */
if (raw_lv_buffer != (void *) DEFAULT_RAW_BUFFER)
{
printf("Default raw buffer OK for %dx%d (%s)", width, height, format_memory_size(required_size));
if (raw_lv_buffer && raw_lv_buffer == raw_allocated_lv_buffer)
{
printf(" - back to default.\n");
raw_lv_free_buffer();
}
else if (raw_lv_buffer)
{
printf(": %x -> %x\n", raw_lv_buffer, DEFAULT_RAW_BUFFER);
}
else
{
printf(".\n");
}
}
raw_lv_buffer = (void *) DEFAULT_RAW_BUFFER;
raw_lv_buffer_size = DEFAULT_RAW_BUFFER_SIZE;
return;
}
if (raw_lv_buffer_size >= required_size)
{
/* no need for a larger buffer */
return;
}
printf("Default raw buffer too small (%s", format_memory_size(raw_lv_buffer_size));
printf(", need %dx%d %s) - reallocating.\n", width, height, format_memory_size(required_size));
if (raw_lv_buffer && raw_lv_buffer != (void *) DEFAULT_RAW_BUFFER)
{
ASSERT(0);
return;
}
#ifdef CONFIG_ALLOCATE_RAW_LV_BUFFER
raw_allocated_lv_buffer = fio_malloc(RAW_LV_BUFFER_ALLOC_SIZE);
raw_lv_buffer = raw_allocated_lv_buffer;
raw_lv_buffer_size = RAW_LV_BUFFER_ALLOC_SIZE;
return;
#endif /* CONFIG_ALLOCATE_RAW_LV_BUFFER */
/* you should enable CONFIG_ALLOCATE_RAW_LV_BUFFER
* or find some other way to reserve memory for the RAW LV buffer */
ASSERT(0);
}
/** this method bypasses Canon's lv_save_raw and slurps the raw data directly from connection #0 */
#ifdef CONFIG_EDMAC_RAW_SLURP
......
#elif defined(EVF_STATE)
uint32_t raw_write_chan = 0x12; /* 60D and newer, including all DIGIC V */
#elif defined(CONFIG_5D2)
uint32_t raw_write_chan = 0x02; /* testing 0x01 and 0x02 */
#endif
platform/5D2.212/consts.h
#define SRM_BUFFER_SIZE 0x25D0000 /* print it from srm_malloc_cbr */
platform/5D2.212/internals.h
/** this method bypasses Canon's lv_save_raw and slurps the raw data directly from connection #0 */
#define CONFIG_EDMAC_RAW_SLURP
#define CONFIG_ALLOCATE_RAW_LV_BUFFER
adtg_gui.c I changed c0f0 0x6804 to 6084/8static int res3k_reg(int reg)
{
if (regs[reg].dst == 0xC0F0)
{
switch (regs[reg].reg)
{
case 0x6084/8: /* C0F06084/8 - raw resolution */
return 0x52801AB; /* from 0x528011B -> 3072px in raw_rec */
}
}
return 0;
}
/* for higher resolutions we'll allocate a new buffer, as needed */
/* all cameras using CONFIG_EDMAC_RAW_SLURP should be able to handle this */
/* SRM_BUFFER_SIZE matches the full-res image size, as 14-bit uncompressed (actually a bit larger, but not much) */
#define CONFIG_ALLOCATE_RAW_LV_BUFFER
#define RAW_LV_BUFFER_ALLOC_SIZE (SRM_BUFFER_SIZE - 0x1000)
I updated the raw.c and it's on my bitbucket downloads I renamed it to adtg_gui_redirect_4k_buffer_raw.c (https://bitbucket.org/reddeercity/magic-lantern_10-12bit/downloads/adtg_gui_redirect_4k_buffer_raw.c) for those who are following my progress . Raw backend -- attempt to autodetect Canon's raw buffer size
Usage:
- compile with CONFIG_MARK_UNUSED_MEMORY_AT_STARTUP (config-defines.h)
- open the console (Debug menu) and enable something that uses LiveView RAW features (raw video, raw histogram etc)
- test by starting the camera in all video modes (photo, 1080p, 720p, crop, x5 etc)
- take a screenshot or write down the console messages
Just a strange bug in the broken3x-12bit build - I've seen it twice with different cards. It destroys the \ML\modules\ folder (or does something wrong to the filesystem). Finally it fails with "Can't find 5D2_212.sym"Thanks for the feed back on the bleeding edge build (not for the light hearted)
In fact 10-12bit is a fascinating feature for 5d2 and I’m watching every reddeercity’s post with great attention.
[REG] @@@@@@@@@@@@ Start ADTG[1]
[REG] ADTG:[0x105f0301]
[REG] ADTG:[0x10610301]
[REG] ############ Start CMOS
[REG] CMOS:[0x20b]
[REG] CMOS:[0x1e6a]
[REG] CMOS:[0x210e]
[REG] CMOS:[0x3005]
[REG] CMOS:[0x4242]
[REG] CMOS:[0x5c01]
[REG] @@@@@@@@@@@@ Start ADTG[2]
[REG] ADTG:[0x14e00a]
[REG] ADTG:[0x150609]
[REG] @@@@@@@@@@@@ Start ADTG[3]
[REG] ADTG:[0x9011c]
[REG] ADTG:[0xb811c]
Start ADTG[1]
[REG] ADTG:[0x105f0301]
[REG] CMOS:[0x20b]
[REG] CMOS:[0x1e6a]
[REG] CMOS:[0x210e]
[REG] CMOS:[0x3005]
[REG] CMOS:[0x4242]
[REG] CMOS:[0x5c01]
Start ADTG[2]
[REG] ADTG:[0x14e00a]
[REG] ADTG:[0x150609]
Start ADTG[3]
[REG] ADTG:[0x93d1a]
[REG] ADTG:[0xbbd1a]
63A82> LiveViewMg:ffa09310:99:02: StartImagePass_x10
63AFC> LiveViewMg:00096224:00:00: *** StartEDmac(0x12, 0x2), from ffa093e8
63B2E> LiveViewMg:00096790:00:00: addr 1b07800, ptr 1b07800, size
63B9F> LiveViewMg:00096224:00:00: *** ConnectWriteEDmac(0x5, 0x0), from ffa09418
63BFB> LiveViewMg:00096224:00:00: *** RegisterEDmacCompleteCBR(0x5, 0xffa08fa0 "WriteEDmacCrawCompleteCBR_x10", 0x0), from ffa09428
63C56> LiveViewMg:00096224:00:00: *** StartEDmac(0x5, 0x1), from ffa0944c
63C81> LiveViewMg:00096790:00:00: addr 43e28a4, ptr 43e28a4, size
63CBE> LiveViewMg:ffa0946c:99:02: StartImagePass_x10 CrawAddr : 443e28a4 / KindOfCraw : 0
63D65> LiveViewMg:00096224:00:00: *** StartEDmac(0x8, 0x1), from ffa096b4
63D97> LiveViewMg:00096790:00:00: addr 44afb4, ptr 44afb4, size
63DD9> LiveViewMg:ffa09df4:99:02: StartIntermediatePassMagnify Addr : 0x50000080
63E3E> LiveViewMg:00096224:00:00: *** StartEDmac(0x0, 0x0), from ffa09e18
63E66> LiveViewMg:00096790:00:00: addr 10000080, ptr 10000080, size
63ED1> LiveViewMg:00096224:00:00: *** ConnectWriteEDmac(0x11, 0x19), from ffa0b5f4
63F04> LiveViewMg:ffa0b63c:99:02: StartQuarkYuvPass 0x5C578400
63F5C> LiveViewMg:00096224:00:00: *** StartEDmac(0x11, 0x2), from ffa0b660
63F82> LiveViewMg:00096790:00:00: addr 1c578400, ptr 1c578400, size
6422E> LightMeasu:00096224:00:00: *** SetHPTimerAfter(0x61a8, 0xff86727c, 0xff86727c, 0x0), from ff867310
65BF4> **INT-6Ah*:00096840:00:00: *** TryPostEvent(LiveViewMgr, 0x2, 0x0, 0x0), from ff8d8828
65CBA> **INT-6Dh*:ff9a407c:00:02: [ENG] WriteDMACInterrupt(5)(0x2)(0)
65D01> **INT-6Dh*:00000558:99:02: WriteEDmacCrawCompleteCBR_x10
65D30> LiveViewMg:00096098:00:00: *** LVState: (2) --2--> (3) ff8e17a8 (x=6bac4c z=0 t=0)
65D73> LiveViewMg:ff8e17c4:98:02: lvVDInterrupt
65DE1> LiveViewMg:00096224:00:00: *** register_interrupt("HEAD3", 0xd9, 0xff986e2c, 0x0), from ff986ee0
65E59> LiveViewMg:00096224:00:00: *** register_interrupt("HEAD4", 0xe0, 0xff986f4c, 0x0), from ff986f98
65EA9> LiveViewMg:ff8da96c:98:02: GetWbIntegFrameForWb 0
65EDD> LiveViewMg:ff8e8fb4:08:01: lvcaeGetWbIntegFrame(sync)
65F02> LiveViewMg:ff8e8fcc:08:01: WBIntegFrame(WB:0x152a40,FST:0x1529dc)
65F79> LiveViewMg:ffa0adfc:99:02: SetWbFstPasParameter
65FAA> LiveViewMg:ffa0b00c:99:02: SetWbIntegParameter
66012> LiveViewMg:ffa06df8:98:02: ReleaseEngineResource Res:4, Free:fffffffc Count:0
66065> LiveViewMg:ff8e1b48:98:02: DispGain:1024, ISO:89
66091> LiveViewMg:ff8e1b70:98:02: WB 1982 1024 1024 2016(4037)
66110> LiveViewMg:ff8e1718:98:02: setHorizontalIrcutData(po0=100)
66198> LiveViewMg:ff863840:82:02: GetVramSize (PUB)
661E8> LiveViewMg:ff867ea8:82:03: SetPBForLV ZoomMode=2, LVType::Info=0, LVType::DispType=0
6621D> LiveViewMg:ff867ed4:82:02: SetPBForLV (3066)
662D1> LiveViewMg:ff9a77d0:00:01: [CLKSAVER] ��ClockSave Out��
6631E> LiveViewMg:ff8638c4:82:01: ImgDDev SelectParameter DispType=0
66349> LiveViewMg:ff863840:82:02: GetVramSize (PUB)
6637C> LiveViewMg:ff8637e4:82:01: ImgDDev Reg c0f140e0 01b07800
663AE> LiveViewMg:ff8637e4:82:01: ImgDDev Reg c0f140e4 01b07da0
663E1> LiveViewMg:ff86449c:82:02: AsyncEnableImageVBufferForPlayBackAndWait (PUB)
66409> LiveViewMg:ff863fb4:82:01: RequestNotifyBlank (PRI)
661E8> LiveViewMg:ff867ea8:82:03: SetPBForLV ZoomMode=2, LVType::Info=0, LVType::DispType=0
6621D> LiveViewMg:ff867ed4:82:02: SetPBForLV (3066)
ZoomMode=2 so can I assume this is still 14bit raw but out a different channel .Desired FPS -------23.976(from30)
Optimize for --------- Low Light
Shutter range --------1/24-1/109
FPS timer A -----------610(FT-28)
FPS timer B -----------1630(FT-10)
Main Clock ------------24.00MHz
Actual FPS ------------24.137
A-timer 610(-22)
B-timer 1640 (x1.28)
A-timer 610(FT-2018)
B-timer 1715 (FT+75)
Here the LV-005.422 (https://bitbucket.org/reddeercity/magic-lantern_10-12bit/downloads/LV-005.422) for those timer , getting full res Liveveiw just like the above post .@a1ex , the math for "B"timer works 1640(base) +75 = 1715 , but for "A" timer 610 seem to be unchanged even though I have (-2018)
I think at 10x zoom is really 1:1 pixel
For the UI, I prefer to leave the x10 mode untouched, for focusing.Ok , just looking to see if there is any usable information that can be used
adtg_gui.mo
crop_rec.mo
edmac.mo **(only for info)**
mlv_lite.mo
enabled "crop_rec.mo" , set to 1:1ADTG[0x1061] 0x249 -->3ca **(1:1 frame Blanking)**
CMOS[0] 0x20b -->0xe1b
CMOS[1] 0xc00 -->0x10
CMOS[2] 0x40e -->0x10c
ADTG[0x1061] 0x249 -->3ca **(1:1 frame Blanking)**
CMOS[1] 0xc00 -->0x10
CMOS[2] 0x40e -->0x10c
Active Area : 52 160 1127 2416
ExifTool Version Number : 10.45
File Name : RAW-000.DNG
Directory : C:/dcraw
File Size : 4.6 MB
File Modification Date/Time : 2018:08:24 22:18:22-06:00
File Access Date/Time : 2018:08:11 23:06:24-06:00
File Creation Date/Time : 2018:08:11 23:06:24-06:00
File Permissions : rw-rw-rw-
File Type : DNG
File Type Extension : dng
MIME Type : image/x-adobe-dng
Exif Byte Order : Little-endian (Intel, II)
Image Description :
Make : Canon
Camera Model Name : Canon EOS 5D Mark II
Orientation : Horizontal (normal)
Software : Magic Lantern
Modify Date :
Artist :
Subfile Type : Full-resolution Image
Image Width : 2416
Image Height : 1127
Bits Per Sample : 14
Compression : Uncompressed
Photometric Interpretation : Color Filter Array
Strip Offsets : 33792
Samples Per Pixel : 1
Rows Per Strip : 1127
Strip Byte Counts : 4764956
X Resolution : 180
Y Resolution : 180
Planar Configuration : Chunky
Resolution Unit : inches
CFA Repeat Pattern Dim : 2 2
CFA Pattern 2 : 0 1 1 2
Black Level : 1278
White Level : 16200
Default Crop Origin : 0 0
Default Crop Size : 2256 1075
Active Area : 52 160 1127 2416
Opcode List 1 : (Binary data 28 bytes, use -b option to extrac
t)
Copyright :
Exposure Time : 0
F Number : 0
Exposure Program : Not Defined
ISO : 0
Exif Version : 0221
Date/Time Original :
Exposure Compensation : 0
Max Aperture Value : 1.0
Metering Mode : Unknown
Flash : No Flash
Focal Length : 0.0 mm
Sub Sec Time :
Sub Sec Time Original :
Focal Length In 35mm Format : 0 mm
TIFF-EP Standard ID : 1 0 0 0
Serial Number :
Lens Model :
DNG Version : 1.3.0.0
DNG Backward Version : 1.3.0.0
Unique Camera Model : Canon EOS 5D Mark II
Color Matrix 1 : 0.4716 0.0603 -0.083 -0.7798 1.5474 0.248 -0.1
496 0.1937 0.6651
Analog Balance : 1 1 1
As Shot Neutral : 0.473635 1 0.624
Baseline Exposure : undef
Baseline Noise : 1
Baseline Sharpness : 1.333333333
Linear Response Limit : 1
Calibration Illuminant 1 : D65
Frame Rate : 25
CFA Pattern : [Red,Green][Green,Blue]
Image Size : 2416x1127
Megapixels : 2.7
Shutter Speed : 0
c0f06084 - 0x30002
c0f06088 - 0x469ff77
Default raw buffer too small (38MB , need 2148x16377 59MB - reallocating
[BKT] giving up
black 2/5 stdev too large (47077/100 ref 15535/100
cmos[2] 40E --> 10E
c0f06088
4f40432 ->6f40432
Low Jello , 180d
A timers --> 792
B timer --> 1750 (around there)
static void raw_lv_setedmac_patch(uint32_t* regs, uint32_t* stack, uint32_t pc)
{
/* R0: EDMAC channel */
/* R1: output buffer */
/* R2: EDMAC info (geometry) */
/* R3: flags */
int width, height;
int ok = raw_lv_get_resolution(&width, &height);
if (ok)
{
if (redirected_raw_buffer)
{
/* optionally update output buffer */
regs[1] = redirected_raw_buffer;
}
/* update EDMAC image size */
int pitch = width * raw_info.bits_per_pixel / 8;
static struct edmac_info dst_edmac_info;
dst_edmac_info.xb = pitch;
dst_edmac_info.yb = height - 1;
regs[2] = (uint32_t) &dst_edmac_info;
/* we can override this here */
EngDrvOut(RAW_TYPE_REGISTER, lv_raw_type);
}
}
static void raw_init()
{
...
/* SetEDmac from StartImagePass_x1/x5 CrawAddr / KindOfCraw */
/* FIXME: why it fails when the hook is placed on the BL instruction?! */
patch_hook_function(0xFFA08B20, MEM(0xFFA08B20), raw_lv_setedmac_patch, "RAW LV x5");
patch_hook_function(0xFFA08008, MEM(0xFFA08008), raw_lv_setedmac_patch, "RAW LV x1");
}
x1 x5 centered photo description
C0F06084: 0x10036 0x30036 0x10037 start row/column
C0F06088: 0x4F40432 0x46A04BA 0xEDD0B87 stop row/column (column: 1 unit = 2 pixels)
C0F06008: 0x23B023B 0x2770277 0x5DB05DB FPS timer A (1 unit = 4 pixels horizontally)
C0F06014: 0x6D5 0x4FF 0xEDC FPS timer B (1 unit = 1 pixel vertically)
CMOS[1] : 0xC00 0xE6A 0xC00 vertical start/stop
CMOS[2] : 0x40E 0x10E 0x8 horizontal pos & binning mode
CMOS[3] : 0x5 0x5 0x7 ???
CMOS[4] : 0x244 0x244 0x244 ???
CMOS[5] : 0x1 0x1 0xC05 ???
CMOS[2]:
xx-- -------- binning mode (00: read every column, 01: bin every 3 columns, 10 and 11: bin even more columns?!)
--xx xxxx---- horizontal position (0: start from left, 0x2a: thin stripe of valid data, 0x2b: no more valid data)
---- ----xxxx ??? (0x8 in photo mode, 0xE in LiveView, double highlights with 0x8 in LV)
C0F07150:
C0F0713C
"CONFIG_EDMAC_RAW_SLURP" sound very encouraging easiest experimentOk I can reproduce , got even an dng to export thought the image dump -- thou it's all distorted
Default Crop Size : 3176 1075
Active Area : 52 160 1127 3336
ExifTool Version Number : 10.45
File Name : RAW-001.DNG
Directory : C:/dcraw
File Size : 6.3 MB
File Modification Date/Time : 2018:08:31 21:37:14-06:00
File Access Date/Time : 2018:08:31 21:52:05-06:00
File Creation Date/Time : 2018:08:31 21:52:05-06:00
File Permissions : rw-rw-rw-
File Type : DNG
File Type Extension : dng
MIME Type : image/x-adobe-dng
Exif Byte Order : Little-endian (Intel, II)
Make : Canon
Camera Model Name : Canon EOS 5D Mark II
Orientation : Horizontal (normal)
Software : Magic Lantern
Subfile Type : Full-resolution Image
Image Width : 3336
Image Height : 1127
Bits Per Sample : 14
Compression : Uncompressed
Photometric Interpretation : Color Filter Array
Strip Offsets : 33792
Samples Per Pixel : 1
Rows Per Strip : 1127
Strip Byte Counts : 6579426
X Resolution : 180
Y Resolution : 180
Planar Configuration : Chunky
Resolution Unit : inches
CFA Repeat Pattern Dim : 2 2
CFA Pattern 2 : 0 1 1 2
Black Level : 8833
Default Crop Size : 3176 1075
Active Area : 52 160 1127 3336
White Level : 16200
Default Crop Origin : 0 0
DNG Version : 1.3.0.0
DNG Backward Version : 1.3.0.0
Unique Camera Model : Canon EOS 5D Mark II
Color Matrix 1 : 0.4716 0.0603 -0.083 -0.7798 1.5474 0.248 -0.1
496 0.1937 0.6651
Analog Balance : 1 1 1
As Shot Neutral : 0.473635 1 0.624
Baseline Exposure : undef
Baseline Noise : 1
Baseline Sharpness : 1.333333333
Linear Response Limit : 1
Calibration Illuminant 1 : D65
Frame Rate : 25
CFA Pattern : [Red,Green][Green,Blue]
Image Size : 3336x1127
Megapixels : 3.8
Default Crop Size : 2152 3600
Active Area : 52 160 3652 2312
Default Crop Size : 5632 3752
Active Area : 52 160 3804 5792
1080p20 720p30 x5 zoom photo
C0F06008 50F050F 5630563 58F058F AF90AF9
C0F06014 4D1 304 3FF C83
C0F06084 20040 20040 2004A 1004C
C0F06088 43D06C0 29506C0 360085A C84132C
C0F0713C 440 294 370 unused
C0F07150 46E 2A1 388 unused
- enable ADTG registers and (in the advanced tab) ENGIO registers
- go to x5 zoom, enable mlv_rec's grayscale preview
- override FPS timer A (C0F06008) from 0x2770277 to 0x2770377 (increase X by 0x100)
- this change lets you increase raw resolution register (C0F06088) by 0x200, i.e. from 0x46A04BA to 0x46A06BA
- this gives 3168 pixels horizontally in mlv_rec: (0x6BA - 0x36)*2 = 3336, minus 160px black bar = 3176, then 3168 is multiple of 32.
Default Crop Size : 2884 1080
Active Area : 54 264 1134 3148
Black Level : 1792
White Level : 16200
File Size : 6.4 MB
File Modification Date/Time : 2018:09:01 23:34:10-06:00
File Access Date/Time : 2018:09:01 23:58:53-06:00
File Creation Date/Time : 2018:09:01 23:58:53-06:00
File Permissions : rw-rw-rw-
File Type : DNG
File Type Extension : dng
MIME Type : image/x-adobe-dng
Exif Byte Order : Little-endian (Intel, II)
Make : Canon
Camera Model Name : Canon EOS 5D Mark II
Orientation : Horizontal (normal)
Software : Magic Lantern
Subfile Type : Full-resolution Image
Image Width : 3192
Image Height : 1200
Bits Per Sample : 14
Compression : Uncompressed
Photometric Interpretation : Color Filter Array
Strip Offsets : 33792
Samples Per Pixel : 1
Rows Per Strip : 1200
Strip Byte Counts : 6703200
X Resolution : 180
Y Resolution : 180
Planar Configuration : Chunky
Resolution Unit : inches
CFA Repeat Pattern Dim : 2 2
CFA Pattern 2 : 0 1 1 2
Black Level : 1792
White Level : 16200
Default Crop Origin : 0 0
Default Crop Size : 2884 1080
Active Area : 54 264 1134 3148
DNG Version : 1.3.0.0
DNG Backward Version : 1.3.0.0
Unique Camera Model : Canon EOS 5D Mark II
Color Matrix 1 : 0.4716 0.0603 -0.083 -0.7798 1.5474 0.248 -0.1
496 0.1937 0.6651
Analog Balance : 1 1 1
As Shot Neutral : 0.473635 1 0.624
Baseline Exposure : undef
Baseline Noise : 1
Baseline Sharpness : 1.333333333
Linear Response Limit : 1
Calibration Illuminant 1 : D65
Frame Rate : 25
CFA Pattern : [Red,Green][Green,Blue]
Image Size : 3192x1200
Megapixels : 3.8
If anyone missed it 5D2 10 bit 3K raw video is a reality !
Another Pipe Dream comes true 8)
@ a1ex
Do you see a ADTG[100C] with adtg_ gui ? i'don't see it with 5D2.
the problem occurs while FPS override is enabledYes I have not alerted about this because I think it is the case for all cameras model with crop_rec module . if someone can confirm ?
freezed display while recordingthe preview is bad when recording but the recording is good , no ? same thing , if someone can confirm wit other cameras model ?
the preview is bad when recording but the recording is good , no ? same thing , if someone can confirm wit other cameras model ?
825FE> CSMgrTask:00095f98:00:00: *** register_interrupt("CFDriver", 0x82, 0xffb8b8cc, 0x0), from ffb8bb58
.............
834A0> CSMgrTask:ffb8a92c:22:05: [ID:Model Number] = LEXAR ATA FLASH CARD
834C8> CSMgrTask:ffb8aabc:22:05: IDE = 4, PCMCIA = 80, UDMA = 6
.............
83572> CSMgrTask:ffbdb8a0:22:01: cfDecideTiming: UDMA Mode 6 (CFA4.0)
.............
83592> CSMgrTask:ffbdbb3c:22:03: CF_GetAccessTiming : DatTim = 3, DatMod = 6
Quote from a1ex here (https://www.magiclantern.fm/forum/index.php?topic=12862.msg199697#msg199697)@reddeercity: more details after I'll get a new card (it *is* possible to overclock the 5D2 CF interface).
You can send ATA commands to the CF card (QEMU emulates them), so if the only difference between UDMA 6 and 7 is timing, it might even be possible to put the card in UDMA7.If this could work , then we would have some write speed as the 5d3 or close to it (120MB/s) anything we could gain is better then 79MB/s
if you can fix the compiling problem/error in mlv_liteyes , I'm working on it.
Now next we need compression , that's lossless compressed rawyes, I saw your work with A1ex but but it's not my speciality yet.
increase the CF card write speedyes , good idea . but compressed raw wouldn't be good enough ?
crop factor when down from almost 3 (2.8 ) to 1.95 , which mean it's more usableyes, so, don't you think that it remains also and above a problem with frame height?
@reddeercity
thanks for this detailed feedback!
yes , good idea . but compressed raw wouldn't be good enough ?
Resolution:2880x1080 10bit
Data rate:88.9MiB/s
Frame size:3.7MiB
Crop factor:1.96x crop
Field of view:20.8°
RECORD TIME: 5 minutes 43 seconds per 32GB card.
14bit compressed raw at .5 compressionData rate:62.2MiB/s
Resolution:3200x1080
Data rate:69.1MiB/s
Frame size:2.9MiB
Crop factor:1.76x crop
Field of view:23.1°
Resolution:2880x1556
Data rate:89.7MiB/s
Frame size:3.7MiB
Crop factor:1.96x crop
Field of view:20.8°
Max rez with compressed raw with increased height at the current cf bandwidth (75MB/s)Resolution:2880x1200
Data rate:69.1MiB/s
Frame size:2.9MiB
Crop factor:1.96x crop
Field of view:20.8°
Resolution:3840x1556
Data rate:119.5MiB/s
Frame size:5MiB
Crop factor:1.47x crop
Field of view:27.5°
yes , good idea . but compressed raw wouldn't be good enough ?Idea. What are the analog gain registers for 5D mark II? Dialing them down will darken output but also reduce bitrate in a lossless manner. For the 100D:
switch (crop_preset)
{
case CROP_PRESET_2K_100D:
case CROP_PRESET_3K_100D:
case CROP_PRESET_4K_100D:
{
/* assuming FPS timer B was overridden before this */
int fps_timer_b = (shamem_read(0xC0F06014) & 0xFFFF) + 1;
int readout_end = shamem_read(0xC0F06804) >> 16; /* fixme: D5 only */
/* PowerSaveTiming registers */
/* after readout is finished, we can turn off the sensor until the next frame */
/* we could also set these to 0; it will work, but the sensor will run a bit hotter */
/* to be tested to find out exactly how much */
/* will add 10bit through analog gain */
adtg_new[0] = (struct adtg_new) {2, 0x8882, 0x46};
adtg_new[1] = (struct adtg_new) {2, 0x8884, 0x47};
adtg_new[2] = (struct adtg_new) {2, 0x8886, 0x46};
adtg_new[3] = (struct adtg_new) {2, 0x8888, 0x45};
/* even lower bits */
/* adtg_new[0] = (struct adtg_new) {2, 0x8882, 0x14};
adtg_new[1] = (struct adtg_new) {2, 0x8884, 0x15};
adtg_new[2] = (struct adtg_new) {2, 0x8886, 0x14};
adtg_new[3] = (struct adtg_new) {2, 0x8888, 0x13}; */
adtg_new[4] = (struct adtg_new) {6, 0x8172, nrzi_encode(readout_end + 1) }; /* PowerSaveTiming ON (6D/700D) */
adtg_new[5] = (struct adtg_new) {6, 0x8178, nrzi_encode(readout_end + 1) }; /* PowerSaveTiming ON (5D3/6D/700D) */
adtg_new[6] = (struct adtg_new) {6, 0x8196, nrzi_encode(readout_end + 1) }; /* PowerSaveTiming ON (5D3) */
adtg_new[7] = (struct adtg_new) {6, 0x8173, nrzi_encode(fps_timer_b - 1) }; /* PowerSaveTiming OFF (6D/700D) */
adtg_new[8] = (struct adtg_new) {6, 0x8179, nrzi_encode(fps_timer_b - 1) }; /* PowerSaveTiming OFF (5D3/6D/700D) */
adtg_new[9] = (struct adtg_new) {6, 0x8197, nrzi_encode(fps_timer_b - 1) }; /* PowerSaveTiming OFF (5D3) */
adtg_new[10] = (struct adtg_new) {6, 0x82B6, nrzi_encode(readout_end - 1) }; /* PowerSaveTiming ON? (700D); 2 units below the "ON" timing from above */
/* ReadOutTiming registers */
/* these shouldn't be 0, as they affect the image */
adtg_new[11] = (struct adtg_new) {6, 0x82F8, nrzi_encode(readout_end + 1) }; /* ReadOutTiming */
adtg_new[12] = (struct adtg_new) {6, 0x82F9, nrzi_encode(fps_timer_b - 1) }; /* ReadOutTiming end? */
}
break;
}
}
/* will add 10bit through analog gain */
adtg_new[0] = (struct adtg_new) {2, 0x8882, 0x46};
adtg_new[1] = (struct adtg_new) {2, 0x8884, 0x47};
adtg_new[2] = (struct adtg_new) {2, 0x8886, 0x46};
adtg_new[3] = (struct adtg_new) {2, 0x8888, 0x45};
/* even lower bits */
/* adtg_new[0] = (struct adtg_new) {2, 0x8882, 0x14};
adtg_new[1] = (struct adtg_new) {2, 0x8884, 0x15};
adtg_new[2] = (struct adtg_new) {2, 0x8886, 0x14};
adtg_new[3] = (struct adtg_new) {2, 0x8888, 0x13}; */
/* these should work on all presets, on all DIGIC 5 models and also on recent DIGIC 4 */
if (1) //waza57 here, I don't think this have an effect on 5D2 until we find proper regs
{
/* assuming FPS timer B was overridden before this */
int fps_timer_b = (shamem_read(0xC0F06014) & 0xFFFF) + 1;
int readout_end = shamem_read(is_digic4 ? 0xC0F06088 : 0xC0F06804) >> 16;
/* PowerSaveTiming registers */
/* after readout is finished, we can turn off the sensor until the next frame */
/* we could also set these to 0; it will work, but the sensor will run a bit hotter */
/* to be tested to find out exactly how much */
adtg_new[4] = (struct adtg_new) {6, 0x8172, nrzi_encode(readout_end + 1) }; /* PowerSaveTiming ON (6D/700D) */
adtg_new[5] = (struct adtg_new) {6, 0x8178, nrzi_encode(readout_end + 1) }; /* PowerSaveTiming ON (5D3/6D/700D) */
adtg_new[6] = (struct adtg_new) {6, 0x8196, nrzi_encode(readout_end + 1) }; /* PowerSaveTiming ON (5D3) */
adtg_new[7] = (struct adtg_new) {6, 0x8173, nrzi_encode(fps_timer_b - 1) }; /* PowerSaveTiming OFF (6D/700D) */
adtg_new[8] = (struct adtg_new) {6, 0x8179, nrzi_encode(fps_timer_b - 1) }; /* PowerSaveTiming OFF (5D3/6D/700D) */
adtg_new[9] = (struct adtg_new) {6, 0x8197, nrzi_encode(fps_timer_b - 1) }; /* PowerSaveTiming OFF (5D3) */
adtg_new[10] = (struct adtg_new) {6, 0x82B6, nrzi_encode(readout_end - 1) }; /* PowerSaveTiming ON? (700D); 2 units below the "ON" timing from above */
/* ReadOutTiming registers */
/* these shouldn't be 0, as they affect the image */
adtg_new[11] = (struct adtg_new) {6, 0x82F8, nrzi_encode(readout_end + 1) }; /* ReadOutTiming */
adtg_new[12] = (struct adtg_new) {6, 0x82F9, nrzi_encode(fps_timer_b - 1) }; /* ReadOutTiming end? */
}
Looking up now , :)
I'm taken baby steps , able to increase the height now with
c0f06088 , A & B timers , target height is 2160 -- I'm at 1760
Yes, I see it after getting out of LiveView and back. Works as expected.
Looking for a 720p mode on 5D2? Now we need to figure out how to reduce the resolution in order to increase the frame rate :)
...................
edit: reducing resolution seems to work, to some extent, LiveView is frozen, camera didn't crash after ~
1 minute (didn't try more), there are some black level issues, mlv_rec shows 1856x704 at 50.004 FPS.
I'm a big fan of the work you've been doing for the 5D2! When I check back into the ML forum it's basically just to see what progress you're making.No not yet , test out the 2880x1080 24p preset from waza57 the least few days , I posted video links to prores files & test results here (https://www.magiclantern.fm/forum/index.php?topic=11205.msg205674#msg205674)
Big thank you for the recent achievements! How's the working coming along with increasing the height? Have you been able to save any footage at 1760px?
@ReddeercityYes that right , ISO can only be adjusted outside of 3x crop_rec like 10x zoom and is applied correctly .
with crop_rec , you can't change ISO settings and you have a black screen when you connect HDMi object?
4096x4096
which I thing is 32MB , that good7200x1896
One thing I haven't tried yet was to "force hdmi to low rez."For one project, I needed a monitor HDMI + raw rec on 7D and had a black screen. Force to VGA low rez solved the problem for liveview
There a option to force hdmi to 720x480 the same size as liveview , I'll try tomorrow .
Congtartiulations waza57 and reddeercity!!! ....
The PNG samples on 5D2 thread have really jagged edges, could you upload some dngs?
0xC0F383D4 Preview area (y1 << 16) | (x1/4), similar to raw_info.active_area (5D3)
0xC0F383DC Preview area (y2 << 16) | (x2/4)
useful ? needs investigation
ff0316b4 FramTable == NULL
ff031b47 @DP_SetCroppingFrameLocation(X:%d Y:%d W:%d H:%d)
ff031b7c BaseW:%d BaseH:%d Angle:%d
ff031b9f @DP_SetCroppingFrameLocation FrameSize Exchange To HDMI
ff031bd8 Angle == 3600
Would be nice to know what the in the "framtable"
Can you not move it like in normal crop recording?No , I think because the crop windows has increased from default .
with the value of 1000102, I have get a big improvement of around 30% speed write.
Sadly , this corrupt the card filesystem . ( i can't read mlv file in card and i must format the card if i try to delete it)
........hey , reddeercity, do you hear this? ;)
83592> CSMgrTask:ffbdbb3c:22:03: CF_GetAccessTiming : DatTim = 3, DatMod = 6
So I would expect to see DatMod = 7
assuming this is UMDA but not too sure what to see for DatTim = 3
maybe ?DatTim = 4
A LOG file would confirm this 825FE> CSMgrTask:00095f98:00:00: *** register_interrupt("CFDriver", 0x82, 0xffb8b8cc, 0x0), from ffb8bb58
834A0> CSMgrTask:ffb8a92c:22:05: [ID:Model Number] = LEXAR ATA FLASH CARD
834C8> CSMgrTask:ffb8aabc:22:05: IDE = 4, PCMCIA = 80, UDMA = 6
83572> CSMgrTask:ffbdb8a0:22:01: cfDecideTiming: UDMA Mode 6 (CFA4.0)
83592> CSMgrTask:ffbdbb3c:22:03: CF_GetAccessTiming : DatTim = 3, DatMod = 6
specially after I thought I made my self clear in the second thread I start with the same topic heading , and that turn in to a shit show as you know .
Much of what looks like rudeness in hacker circles is not intended to give offense. Rather, it's the product of the direct, cut-through-the-bullshit communications style that is natural to people who are more concerned about solving problems than making others feel warm and fuzzy................it may help you cope with our eccentricities if you think of us as being brain-damaged....
Sorry my reply wasn't useful.
Regards,
Audionut.
Exaggeratedly “friendly” (in that fashion) or useful: Pick one.
I still think a separate thread for CF card development is needed , but that my own opinion .
83572> CSMgrTask:ffbdb8a0:22:01: cfDecideTiming: UDMA Mode 6 (CFA4.0)
So there the limit on the 5D2 , the card connects at udma6 @ CF4.0 = about 90MB/sDoes the 5D3 @ udma7 run at CF6.0 ?
83592> CSMgrTask:ffbdbb3c:22:03: CF_GetAccessTiming : DatTim = 3, DatMod = 6
From this it looks like "DatTim3" = 100 ns , So does that mean 5d3 run in Mode 4 @ 80ns ?
C0F08518: 0x045109D7
C0F0851C: 0x00D601E6
C0F08520: 0x038A05FE
ff3db894: e28f2f55 add r2, pc, #340 ; ff3db9f0: (65446663) *"cfDecideTiming: UDMA Mode %d (CFA4.0)"
ff3db8b8: e28f2f56 add r2, pc, #344 ; ff3dba18: (65476663) *"cfGetRegisterTiming: I/O %dnS (CFA3.0)"
ff3db8d8: 328f2e16 addcc r2, pc, #352 ; ff3dba40: (65476663) *"cfGetRegisterTiming: I/O 250nS"
ff3db9a4: e28f20ec add r2, pc, #236 ; ff3dba98: (65476663) *"cfGetRegisterTiming: I/O 120nS"
ff3db9bc: e28f20f4 add r2, pc, #244 ; ff3dbab8: (65476663) *"cfGetRegisterTiming: I/O 250nS (PIO Mode4)"
ff727f18: e28f2f56 add r2, pc, #344 ; ff728078: (65446663) *"cfDecideTiming: UDMA Mode %d (CFA4.0)"
ff727f3c: e28f2f57 add r2, pc, #348 ; ff7280a0: (65476663) *"cfGetRegisterTiming: I/O %dnS (CFA3.0)"
ff727f5c: 328f2f59 addcc r2, pc, #356 ; ff7280c8: (65476663) *"cfGetRegisterTiming: I/O 250nS"
ff72802c: e28f20ec add r2, pc, #236 ; ff728120: (65476663) *"cfGetRegisterTiming: I/O 120nS"
ff728044: e28f20f4 add r2, pc, #244 ; ff728140: (65476663) *"cfGetRegisterTiming: I/O 250nS (PIO Mode4)"
Interesting 5d2 nearly Identical to 5d3 113 . There's no reference to any mode higher then "cfa4.0" on 5D3.ff38affc: e28f2f7d add r2, pc, #500 ; ff38b1f8: (64496663) *"cfIdentifyDrive: Set UDMA( Mode=%d )"
ff6aa9dc: e28f2f77 add r2, pc, #476 ; ff6aabc0: (64496663) *"cfIdentifyDrive: Set UDMA( Mode=%d )"
RequestConfiguration: pLStorage=0x884e5c
81F67> CSMgrTask:ffb8bcc8:22:01: ConfigBase=0x200, StatusReg=0x0
81F90> CSMgrTask:ffb8bce0:22:01: PinRepReg=0x0, CopyReg=0x0
81FB6> CSMgrTask:ffb8bcf8:22:01: ConfigIndex=0x1, Present=0xf
81FE2> CSMgrTask:ffb8bd80:22:01: RequestConfiguration: Base = 200, Data = 41
8200E> CSMgrTask:ffb8bde0:22:01: RequestConfiguration: SUCCESS
82031> CSMgrTask:ffb8c688:22:01: CF_RequestConfiguration: err=0x0
82058> CSMgrTask:ffb8c6a4:22:01: ConfigIndex = 1 Match
0xC062850C --> 0x1213 and I obtain UDMA 0 speed (around 15MB/s)
--> ...........
--> ...........
-->0x0202 and I obtain UDMA 6 speed (around 80MB/s) i suppose original value
So could 0x200 be the same as 0x0202 or close , if so them maybe 0x100 will work instead 0x1000102 ? Just a thought :D
There's no reference to any mode higher then "cfa4.0" on 5D3.
Found a very complete CF Card specifications pdf from 2005 , a little old (CF+ & CF SPECIFICATION REV. 3.0)Also revision 4.0 (2006) can be found just by googling, but apparently no rev.4.1a neither 6.0
Capacity points beyond current limitation of 137GB (up to 144PB) (1,024 TB = 1 PeteByte)
& more efficient data transfer (32MB per transfer versus 128K per transfer)
Data Set Management Command/Trim (Mandatory)
More efficient cleanup of unused space on memory card (LBA’s)
Update ATA References to ATA-6 & ATA-8/ACS-2
Mr. Shigeto Kanda of Canon and the CFA chairman of the board said
“The higher capacity and higher performance of CF cards enabled by the 48-bit addressing feature in the CF5.0 specification
will further increase the value of DSLR cameras. The Video Performance Guarantee feature of the CF5.0 specification
will help CF cards to expand into new markets such as high-speed movie equipment like professional video camcorders”.
CompactFlash cards are capable of 600x or 90MB/second throughput performance using the current Ultra DMA Mode 6.@waza57 This looks very close to your 30% (https://www.magiclantern.fm/forum/index.php?topic=12862.msg206061#msg206061) increase in write speed
CF 6.0 Ultra DMA Mode 7 along with 48-bit addressing defined in the CF 5.0 specification enables the development of
CompactFlash cards with up to 25% more throughput performance.
The CF 6.0 specification includes a new Sanitize Command, Trim Usage Guidelines and an Operating Temperature Range function
along with adding Ultra DMA Mode 7 which supports 167 MB/second speed.
Benefits: Ultra DMA Mode 7
Key Feature Enhancement:
Provides an interface speed of 167MB/s.
This speed enhancement enables a new generation of higher performance cards while providing complete backward compatibility.
Benefits: Sanitize Command
Key Feature Enhancement: Provides an efficient NAND Block Erase of
the entire user data area to return the CF card to “fresh” state before reuse or repurposing.
Leverages a command defined in INCITS T13 ACS-2.
Benefits: Trim Usage Guidelines
Key Feature Enhancement: Provides improved write performance consistency.
Benefits: Operating Temperature Range
Key Feature Enhancement: An optional card capability to report the
operating temperature range of the card.
This allows card/camera combinations to enable use in extreme temperatures.code]
So from this
For full width LiveView:everything else work out , not sure why I can't , the best I could get is 0xe , So left it at default "0x10e" (will try later again on "cmos[2]" )
CMOS[2] = 0x00E
C0F06008: 0x27705DB (only the lowest half appears to matter on this camera)
C0F06084: 0x30037 (copied lowest half from photo mode)
C0F06088: 0x46A0B87 (copied lowest half from photo mode)
=> 5632x1074 in mlv_rec, 12.5 FPS.
File Name : RAW-004 (2).DNG
File Size : 11 MB
File Modification Date/Time : 2018:10:02 00:01:54-06:00
File Access Date/Time : 2018:10:02 00:51:47-06:00
File Creation Date/Time : 2018:10:02 00:51:47-06:00
Camera Model Name : Canon EOS 5D Mark II
Orientation : Horizontal (normal)
Software : Magic Lantern
Subfile Type : Full-resolution Image
Image Width : 5792
Image Height : 1127
Bits Per Sample : 14
Compression : Uncompressed
Photometric Interpretation : Color Filter Array
Strip Offsets : 33792
Samples Per Pixel : 1
Rows Per Strip : 1127
Strip Byte Counts : 11423272
X Resolution : 180
Y Resolution : 180
Planar Configuration : Chunky
Resolution Unit : inches
CFA Repeat Pattern Dim : 2 2
CFA Pattern 2 : 0 1 1 2
Black Level : 1277
White Level : 16200
Default Crop Origin : 0 0
Default Crop Size : 5632 1075
Active Area : 52 160 1127 5792
Unique Camera Model : Canon EOS 5D Mark II
Color Matrix 1 : 0.4716 0.0603 -0.083 -0.7798 1.5474 0.248 -0.1
496 0.1937 0.6651
Analog Balance : 1 1 1
As Shot Neutral : 0.473635 1 0.624
Calibration Illuminant 1 : D65
Frame Rate : 25
CFA Pattern : [Red,Green][Green,Blue]
Image Size : 5792x1127
Megapixels : 6.5
# Config file for module mlv_rec (MLV_REC.MO)
mlv.video.enabled = 1
mlv.res.x = 9
mlv.bpp = 0
mlv.aspect_ratio = 16
mlv.write_speed = 8527
mlv.preview = 2
mlv.display_rec_info = 2
So 85.27MB/s :o , not sure why maybe 12.5 fps ? can't see it Yes, it's normal.
If capture speed is greater than writing speed (i.e. recording is not continuous): memory bus is the main limit. If you capture at a higher data rate (e.g. higher resolution and/or FPS), there won't be enough bandwidth left for file I/O at full speed. I'm not sure how DMA priorities are working, or whether there's any way to adjust them. This is why the hacks that freeze LiveView are able to achive slightly better speed - they turn off some "useless" image streams, freeing some memory bandwidth.
Otherwise... the buffer will be mostly empty and the speed will be limited by image capture speed. In this case, mlv_lite will try to "benchmark" only when the card is actively writing, and may print the "idle" time as well. However, this method is just an approximation: there will be some overhead caused by small buffer sizes (as the raw recording task starts writing to card as soon as it has completed frames in the buffer, rather than waiting for a huge contiguous chunk to be completed). No big deal, as in this case, recording will be continuous anyway. It may affect the estimated time for the next recording.
CMOS[1]
c0f06088
c0f06008
ADTG12[100c]
c0f0713c
c0f07150
c0f06014
Got not too bad of a image , needs work yet to clean up totally , did a image dump , got DNG, 422 .c0f06008 0x23b023b -> 0x23b011d **this alone gave me 59.94** (looks familiar , never try just that alone)
c0f06014 0x577 -> 0x348
Image Width : 1856
Image Height : 704
Camera Model Name : Canon EOS 5D Mark II
Strip Offsets : 65536
Rows Per Strip : 704
Strip Byte Counts : 2613248
Planar Configuration : Chunky
Software : MLVFS
Exposure Time : 1/250
F Number : 4.0
ISO : 800
Black Level : 1792
White Level : 16200
Default Crop Origin : 0 0
Default Crop Size : 1856 704
Calibration Illuminant 1 : D65
Active Area : 0 0 704 1856
Frame Rate : 99.781
Showing the right frame rate & black level (1792)Incredible progress!Thanks , a1ex figured it out originally now I'm hooked on the hi-frame rate :)
Also what are the next steps to getting 3k centered?
c0f06088 0x4f40432 ->0x2e40432 =>720p
https://bitbucket.org/hudson/magic-lantern/branch/hdparm
Might be useful for overclocking, too.
Might be useful for overclocking, too.It going to take little time to get my head around "hdparm" branch for overclocking , a lot of stuff there .
Default Crop Size : 2152 1331
Active Area : 52 160 1383 2312
Image Size : 2312x1383
(https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fimage.ibb.co%2FfbEGg9%2FRAW-002-2152x1330-small.png&hash=f8d355ee6e7eb27d7e0e2a9e3c4d6404) (https://imgbb.com/)0xC062850C --->1000102
As waza57 said -- corrupt the file system , the file are hidden ."EOS_S_GIGIL"
@ reddeercityThanks , a1ex did all the heavy lifting I'm trying get to fine tune it.
Great job with fps !
C0F08034 0x1c00 (default)
C0F08034 0x1c00 ->1b00 (green cast)
C0F08034 0x1c00 ->1d00 (red cast)
ëX.CanonEOS..@ ......ø..?...?...±9t.Ÿ;..........................€.)
....EOS_DEVELOPFAT32 ..BOOTDISK.FA.........................................
ëX.CanonEOS..@ ......ø..?...?...±9t.Ÿ;..........................€.)....EOS_DIGITALFAT32 ......
I'm thinking by setting 0xC062850C --->1000102
We may have accessed a canon service mode or canon development mode for maybe internal testing .ml@ml-pc:~/CF_Card-Over-Clocking_magic-lantern/modules/cf_acc$ make
Updated HGVERSION
[ README ] module_strings.h
[ CC ] cf_acc.o
[ CC ] hdparm/identify.o
hdparm//identify.c:7:25: fatal error: linux/types.h: No such file or directory
#include <linux/types.h>
^
compilation terminated.
make: *** [hdparm/identify.o] Error 1
ml@ml-pc:~/CF_Card-Over-Clocking_magic-lantern/modules/cf_acc$
"********** FACTORY ADJUSTMENT MENU VER 0.01 **********":
"0. Exit from Factory Adjustment":
"1. Leak Check":
"2. SDRAM Check":
"3. ROM Check":
"4. SDIO Implementation Check":
"5. Video Adjustment":
"6. A Adjustment":
"7. USB Check":
"8. Adjustment Data Display and Change":
"9. Check Flag Display and Initialization":
"A. ALL Check":
"D. Debug Command":
"R. Data Receive":
"Y. Input Unique":
"Z. Input_Device_Unique":
"invalid input":
"CheckPro> ":
"--- LeakCheck ---":
"--- Finish ---":
"K218 System & Display Check & Adjustment program has started.":
............. Everything was ok but froze grayscale preview.right now that one of the limitation , press half shutter before recording will give a full color preview in liveview
Do you plan to bring some options to choose between 2.64:1, 2.35:1, 2:1 or maybe 16:9?Yes , but the choices will be limited to CF card write speed . 3k to maybe 3.5k (currently at 3168x1330 @ 21 fps)
I can implement full width @ 12.5 fps (5632x1074) and full height @ 4 fps (5632x3752)
I'm really focused right now on CF card overclocking (increasing write speed beyond 80MB's)
Do you have your code uploaded? Would like to check it out.Here's the source code Crop_Rec-4k-5d2-magic-lantern_redercit_buffer_a1ex-code-10-22-2018.zip (https://bitbucket.org/reddeercity/magic-lantern_10-12bit/downloads/Crop_Rec-4k-5d2-magic-lantern_redercit_buffer_a1ex-code-10-22-2018.zip)
platform/5D2.212/internals.h
platform/5D2.212/stubs.S
src/raw.c
For full width LiveView:
CMOS[2] = 0x00E
C0F06008: 0x27705DB (only the lowest half appears to matter on this camera)
C0F06084: 0x30037 (copied lowest half from photo mode)
C0F06088: 0x46A0B87 (copied lowest half from photo mode)
=> 5632x1074 in mlv_rec, 12.5 FPS.
ADTG2[8882]
ADTG2[8884]
ADTG2[8886]
ADTG2[8888]
on the 5D2 , those reg's are for Digic 5 cams only
C0F06014: 0xEDC
C0F06088: 0x0x56A04BA
CMOS[1] => F6A
C0F0713C from 0x476 -> 0x576
C0F07150 from 0x49C -> 0x59C
9.98fps
C0F06014: 0xEDC
C0F06088: 0x0x66A04BA
C0F0713C from 0x476 -> 0x676
C0F07150 from 0x49C -> 0x69C
C0F06014: 0xEDC
C0F06088: 0x0x76A04BA
C0F0713C from 0x476 -> 0x776
C0F07150 from 0x49C -> 0x79C
I tested a 10bits 2752x1080 file and it is ok but liveview is frozen during recording.Japp same here. But somewhere I read "liveview is for wimps", so I thought this is state of the art... 8)
1:For best results start with 30 fps ntsc in the canon Liveview menu
2:Load crop_rec & mlv_rec , mlv_snd can be load but reduces the amount of frames recorded .
3:Next setup Liveview preview , This is the most important part without this set correctly it will not work !
-Liveveiw needs to be set to ML Gray Scale-
4:Next go in to the crop_rec menu select 3.5k preset .
-Note ! this only work when you enter 5x zoom/3x crop_mode as per the hi-lighted texts says-
Did you do this exactly ? Default Crop Size : 3176 1331
Active Area : 52 160 1383 3336
These are the overridden reg's ** Note** the times (6008 & 6014) are for 7fps I didn't save the timers for 12 fpsc0f06088 - 46a088a =>4096x1074
c0f06008 - 2770477 => 16.389 fps
Clean dng from image_dump plus clean dng's in .mlv'sSubfile Type : Full-resolution Image
Image Width : 4264
Image Height : 1127
Bits Per Sample : 14
..........
Default Crop Size : 4104 1075
Active Area : 52 160 1127 4264
Black Level : 1001
White Level : 16200
This is also interesting , can the black level really be 1001 ?...... do you think you can include standard preset 24p with 16/9 ratio and vertical resolution like 1080, 1160, 1320, 1450, 1586 ?All presets will be dependent on Card write speed and whether or not lossless compression can be implemented .
c0f11314: 4d70653 .... LiveViewMgr pc=ffa07c28 addr=ffca88e0 LV resolution (raw.j.height | lv.width) before upsampling?
If you convert this to decimal you get 4d7=1239 & 653=1619 so 1619x1267 , look very closec0f0713c: 4f5 ...... LiveViewMgr pc=ff8e1830 addr=8328 HEAD3 timer (ticks?)
c0f07150: 681 ..... LiveViewMgr pc=ff8e1844 addr=8370 HEAD4 timer (ticks?)
convert this to decimal 4f5=1269 & 681=1665 so 1665x1269Default Crop Size : 5632 1845
Active Area : 52 160 1897 5792
5632x1845_dump_RAW-026.DNG (https://bitbucket.org/reddeercity/magic-lantern_10-12bit/downloads/5632x1845_dump_RAW-026.DNG)10.501 fps
C0f06008 ->0x2770462
c0f06014 ->0x7f2
Default Crop Size : 4104 1843
Active Area : 52 160 1895 4264
CMOS[1] 0x6ea->0xc0a
c0f0713c 0x476->0x576
c0f07150 0x49c->0x59c
c0f06008 0x2770277->0x2770346 ** A-Timer **
c0f06014 0x4ff->5cd ** B-Timer **
c0f06088 0x46a04ba->0x4e7068a **raw resolution **
reddeercis,Yes , the crop rec is only active in 5x zoom mode . So you can shoot 10bit raw in 1:1 FHD also .
is it possible, in your build, to shoot 2880x1080, and shoot normal, almost 1080p in full sensor 1:1, too
i just try it! 2880p is so great>))Yes , That's one of the limitation at the moment , until liveview preview is more understood more , that's the way it is .
........
I dont have preview while recording. Preview is frozen and black and white, once i press record button.
Is that normal?
Great reddeercity !Thanks ,
Perhaps with a continuous bit rate, the same vertical 1200 pixels, the same liveview not frozen, we can find horizontal resolution for 1.85, 2 and 2.35 aspect ratio ? like 2220, 2400 and 2820. I'm afraid the last one won't be continuous. Who knows ?
c0f08518 0x4670907 ---------->0x4e20a07
c0f08188 0x907 -------------->0xa07
c0f08184 0x467 -------------->0x4e2
0xa07=>2567 -- horizontal
0x4e2=>1250 -- vertical
Raw Resolution 1253*2568 (2568x1253)
c0f06088 0x46a04ba ---> 0x4e8053a
Default Crop Size : 2408 1201
Active Area : 52 160 1253 2568
Here's a simple task for you guys: find out how far you can push FPS timer A.
Steps:
- download raw_diag.mo and adtg_gui.mo (https://builds.magiclantern.fm/modules.html#iso-research) and load them on top of the build from first post
- enable RAW Diagnostics (Debug menu)
- enable OB zones, disable other types of analysis
- in LiveView, press shutter halfway for 1-2 seconds to run the analysis
- enable ADTG Registers, enable Advanced -> ENGIO Registers, override FPS timer A (C0F06008) and decrease its value
- notice only odd raw values (i.e. same parity as with Canon firmware) are going to give clean image on this camera
- find the lowest value of timer A that still gives clean image (pay attention to the right border in the raw_diag screenshot)
- upload the raw_diag screenshot with the optimal value (clean image) and with the first bad value (that is, optimal value minus 2)
Run this in 1080p24/25/30 (during standby) and also in x5 zoom mode.
c0f06008 23b021c =>25.349 fps **good**
c0f06008 23021a=>25.443 fps **bad**
Now it's your turn to do the same with x5.Ok , Weekend project .
You can still request higher resolutions and get a "4K" frame good for April 1st announcements, if you want :DYes , I like that idea ! :))
You can still request higher resolutions and get a "4K" frame good for April 1st announcements, if you want :D
Default Crop Size : 4104 1249
Active Area : 18 160 1267 4264
COMS[2] 0x40e ->0xe
c0f06008 0x23b023b ->0x23b080b **not too sure but very close to this**
c0f06088 0x4f40432 -> 0x4f4088a
So when I set CMOS[2] from 0x40e to 0xe that changed the image form the Full HD (pixel binding & line skipping) to center crop at 1856x1249Yeah, binning factors on X and Y are pretty much*) independent. With the notation from crop_rec, this is the 3x1 binning mode (read 1 line, skip 2, read every column). You probably want to experiment with the opposite, i.e. 1x3.
Binning factor is controlled like this:
- horizontally: from CMOS registers (model-specific, CMOS[2] on 5D2); apparently doing proper binning on all models;
- vertically: from ADTG[1000/100C] or [8000/800C]; one register switches between 5 = read out every line and 6 = enable line skipping/binning, the other selects the number of lines skipped/binned.
*) On 5D3, in this mode (3x1) there are some artifacts I don't know how to fix; register ADTG[8806] appears to control these.
I'm starting to finalize the crop_rec preset's , I'll keep 2880x1080 as is but it will not have the broken preview
as I found a fix with a1ex's help (as always :) ) here (https://www.magiclantern.fm/forum/index.php?topic=19336.msg208497#msg208497) is the post with proof.
2400x1200 @23.976 is next , It's 90% , just getting some image ghosting a little , but clean black levels .
5x frame blanking & CMOS[1] reg's were needed
CMOS[1] was changed to 0xe6a ->0xa28 (I think , I forgot to write it down)
(https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fi.ibb.co%2Fxh6Z3yc%2FVRAM2-23-9762-4kx1-2k-almost-clean-small.png&hash=bdd75b323f2acbfad4cd821331085697) (https://imgbb.com/)
2144x1200 @ 23.976 fps is stable and ready to go , post is here (https://www.magiclantern.fm/forum/index.php?topic=19336.msg208478#msg208478) with samples
4096x1074 @ 18fps is working , and I will include it in the presets , I may be able to squeeze a few more frames/sec to 20fps
full res 5632x3750 @4 fps
I do plan on including a squeezed 48/50fps 1856x704 but there's still a black level issue , so that need to be fix before I can include it
This is not the final list of crop_rec preset's , but these are the ones I can get to work right now
Ok got it ! :)) 24 fps !! 3.6k Squeezed !!!Could you explain me the reel pro of a high horizontal resolution squeezed at 24fps ? I can understand at 62fps to minimize the data rate per picture and getting better fps.
Could you explain me the reel pro of a high horizontal resolution squeezed at 24fps ? I can understand at 62fps to minimize the data rate per picture and getting better fps.
In this test image the aliasing is awful once unsqueezed, so I'm thinking I'm miss something.
David
CMOS[1] 0xc00->0xbe0
ADTG12[100c] 0x2->0x100
c0f06084 0x10036 ->0x36 **I think , have to check again**
ADTG12[100c] 0x2 ->100
Compresses the image vertical 3x - maximum raw height 402=>1206ADTG12[100c] 0x2 ->107
Compresses the image vertical 6x - maximum raw height 210=>1260ADTG12[100c] 0x2->0x0
Ok looks like I found 3x1 I think , As I thought ADTG12[100c] does a lot of the pinning/line skippingIf it's vertical, you found the 1x3 binning ? ;) The same as theBilalFahkouri in "Magic Lantern Cinema Camera - Dual ISO without aliasing & without quality loss!" thread ?
Default Crop Size : 2568 1200
Active Area : 52 160 1252 2728
Black Level : 1027
White Level : 16200
10bit dng report correct level Black Level : 112
White Level : 1013
if (is_5D2)
{
int timerA = 727;
int timerB = 1374;
int a = reg_override_fps_nocheck(reg, timerA, timerB, old_val);
if (a) return a;
switch (reg)
for (uint32_t * buf = (uint32_t *) regs[0]; *buf != 0xFFFFFFFF; buf += 2)
{
uint32_t reg = *buf;
uint32_t old = *(buf+1);
if (is_5D2)
{
if (reg == 0xC0F06088)
{
engio_vidmode_ok = (crop_preset == CROP_PRESET_CENTER_Z)
? (old == 0x46A04BA) /* x5 zoom */
: (old == 0x4E7058A); /* 1080p or 720p */
}
}
else
c0f0713c
c0f07150
c0fo8184
c0f08188
c0f08518
Do I add them after the raw resolution like this case 0xC0F0713c:
return (old_val & 0xFFFF0000) + 0x500
orif (reg == 0xC0F0713c)
{
? (old == 0x476)
: (old == 0x500)
}
c0f11314
2eb045f->2eb0dof
In Canon Previewjust a update , fix 2560x1200 @ 23.976 preset , got rid of the corruption on the right side of the 14bit raw_dump image
Pushing this preset , and the max I can get is 2712x1200 @ 23.976 , this close to the limits for vertical resolution @ 23.976
Unless I can get more resolution @ 23.976 playing around with the Head Timer 3 & 4 . The problem isn't getting higher resolution
it's getting higher frame rate (23.976) instead of 12 or 18 fps @ 4k ( I could use a vertical compression height trick to get 4k)
Almost got 3008x1080 @ 23.976 working , still have some frame corruption , (frames are moving sideway & out of order)
need to find a better CMOS[1] reg.
Hoping to have a crop_rec module for Xmas or by the New Year for tester's
case 0xC0F06804: return 0x5490331; // 3072x1320 x5 Mode;
case 0xC0F06824: return 0x3ca;
case 0xC0F06828: return 0x3ca;
case 0xC0F0682C: return 0x3ca;
case 0xC0F06830: return 0x3ca;
case 0xC0F06010: return 0x34b;
case 0xC0F06008: return 0x34b034b;
case 0xC0F0600C: return 0x34b034b;
case 0xC0F06014: return 0x5f7;
case 0xC0F07150: return 0x428;
case 0xC0F0713c: return 0x555;
Cool. Got 3096x1320 24 fps on my 100D now.
That's a Digic V camera. Somewhat off topic but good to know this stuff applies to all ML enabled cameras.
What would be sweet is taking reddeercity's findings on the 5D2 and applying it to other Digic IV cameras. IDA_ML has been pushing to get this on the 7D but I keep getting lost trying to figure it out. The 50D might be easier to port -- @aprofiti are you following this?
Vertical compression height trick? How?Look here (https://www.magiclantern.fm/forum/index.php?topic=19336.msg208930#msg208930) & also here (https://www.magiclantern.fm/forum/index.php?topic=19336.msg208931#msg208931)
Oh yeah, can you imagine having these insane resolutions on the 7D with its 90 MB/s write speed?Just to be clear 7D dose not have focus pixels (https://www.magiclantern.fm/forum/index.php?topic=16054.msg155923#msg155923) if you see any that's would be hot pixels.
3k continuous recording at 24 fps and 10-bit lossless, no aliasing, no VAF filter,
no focus pixels, small crop factor, wonderful colors, unique filmic look - that would be a dream come true for all 7D shooters!
Truth be known I've been shooting mostly with a Canon C300 lately, mostly with EF-S lenses that work nicely with the dual pixel autofocus. No pipeline or playback issues with these files.Nice , the close one to me is 200 mile away , a real pain -- thou they will ship it to me
It seems that one of the most important tools, adtg_gui module, doesn't work on the 7D.adtg_gui module was broken for d4 cam up until a few mouths ago , I discovery this when I could made changes with digic poke (https://www.magiclantern.fm/forum/index.php?topic=19336.msg205062#msg205062) and not adtg_gui module .
I've got a love/hate relationship with this camera.Sure I'll sent you 2 , It like water up here :P
One day I'm thinking about getting back into the Portable ROM dumper (https://www.magiclantern.fm/forum/index.php?topic=16534.msg192336#msg192336) to figure out how to pry into the master processor so I can properly finish the firmware update to 2.0.6 and the next day
I'm looking for someone who will take it off my hands so I can regain my sanity.
Depending on my mood I might let you have it for a bottle of Canadian maple syrup.
Magic Lantern crop_rec-4k-5D2-eXperimental.2018Oct22.5D2212
Camera : 5D2
Firmware : 212
Changeset: 8bfbb0ca228e+ (crop_rec_4k_5D2) tip
Built on : 2018-10-23 05:49:51 by david@reddeercity
Then again I am maybe only opening up a can of worms...
I could of course start erasing error codes but it would be the better starting point to get a branch and a blessed :P adtg_gui module like the one for 5D2.
I can confirm for 5d2 , the adtg_gui.mo on the
module download page (https://builds.magiclantern.fm/modules.html) is the one I have been using of late . So it should work on 7d.
else if (is_camera("7D", "2.0.3"))
{
ADTG_WRITE_FUNC = 0xFF2C0944; //"[REG] @@@@@@@@@@@@ Start ADTG[CS:%lx]"
CMOS_WRITE_FUNC = 0xFF2C0B3C; //"[REG] ############ Start CMOS"
ENGIO_WRITE_FUNC = 0xFF1F6B20; // from stubs
ENG_DRV_OUT_FUNC = 0xFF1F675C;
SEND_DATA_TO_DFE_FUNC = 0xFF32B800; //"[REG] DFE:[%#lx]"
}
What branch are you using for compiling for the 5D2? Checking your autoexec.bin it says:I was explaining to another user , the source link is here with all the bits to work with 10-12bit FHDCode: [Select]Magic Lantern crop_rec-4k-5D2-eXperimental.2018Oct22.5D2212
Tried downloading a 7D version from Branch: lua_fix but it from will not work with adt_gui.mo from iso-research branch.
Camera : 5D2
Firmware : 212
Changeset: 8bfbb0ca228e+ (crop_rec_4k_5D2) tip
Built on : 2018-10-23 05:49:51 by david@reddeercity
The 50D might be easier to port -- @aprofiti are you following this?Yes, I kept reading what reddeercity is posting and maybe I can jump doing some tests in the next weeks, but I need some help from you guys.
CMOS[1] = Sensor Vertical (vertical start/stop)
CMOS[2] = Sensor Horizontal (horizontal pos & binning mode)
C0f06008 = FPS timer A (1 unit = 4 pixels horizontally)
C0f06014 = FPS timer B (1 unit = 1 pixel vertically)
C0F06084 = start row/column
C0F06088 = stop row/column (column: 1 unit = 2 pixels)
c0f06088
adjusts the raw image size , here a hex to decimal converter is real handy .5d2 FHD default raw size
4f40432
first 3 number "4f4"= vertical resolution@aprofiti , Have try it this yet ? I'm courous to see it this work with the 10-12bit build from experimental download page .No, not exactly... I tried only to load your linked adtg_gui on top of 10-12bit build, but wasn't working due to linker unable to reference function; probably it's because wasn't compiled for that branch, so I have to retry when I have some spare time.
If not let me know and I can build it on my 4k 5d2 d4 branch , you may need some of the code from there.
(https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fi.ibb.co%2F6ZzCgby%2F1880x1174-48fps.png&hash=0f6b35031438c6194ee0f5351175c0ae) (https://imgbb.com/)
Frame grab from the h264 from MLV App 1.3v win.
Short h264 clip from mlv app 1.3v win
1888x1174_48fps-M23-2150.mp4 (https://bitbucket.org/reddeercity/magic-lantern_10-12bit/downloads/1888x1174_48fps-M23-2150.mp4)
1880x704_48fps-M23-2150_000000.dng (https://bitbucket.org/reddeercity/magic-lantern_10-12bit/downloads/1880x704_48fps-M23-2150_000000.dng)
Wow that's a lot of pink moire!!!Yea thought so , but remember it's vertically compressed & 5d2 as you know have pixel binding & line skipping
What happens if you choose a debayer algorithm other than AMaZE?It's worse , AMaZE give the best image
do you get less with MLVProducer??I did a test to see , there a Alias Filter & False Color Filter .
No, not exactly...Sorry I may have forgot to mention that
Edit: Downloaded your source code and applied CONFIG_EDMAC_RAW_PATCH support for 50D.
Put in 5x mode and trying to understand what regs are related to resolution.
If I change timer A, image will be altered as expected,
but if check resolution from movie tab it doesn't change, even by modifing CMOS regs
c0f06088
Is the number 1 reg you need to be concern about mostly , it's what set the Raw Resolutionc0f06088
values , let start there .c0f06088
c0f06008
c0f06014
First let understand what going on here I saw you modified also other regs (ADTG12[100c], c0f07XXX...) from the one you listed a couple of post above.That was found or discovered by a1ex from what I understand
How did you find they were necessary?
Yea thought so , but remember it's vertically compressed & 5d2 as you know have pixel binding & line skipping
and by compressing it I bet is making the pixel binding worse , I good case for you guys over on the MLVApp1.4 thread
to analyzes and make better algorithm .It's worse , AMaZE give the best imageI did a test to see , there a Alias Filter & False Color Filter .
I let the false color filter enabled and toggled off and on the alias filter , ...
I think the it better , what do you guy think ?
Maybe mlvapp 1.4v is better with this , didn't try it yet .
...I again played a bit around with some freestyle code and your 48fps MLV. The pink in on the chart looks like the green channel is clipped from the low side, not from the high side. So I implemented just for testing a stupid algorithm which reconstructs this part of the green channel. Then I switched to IGV debayer and this is what you'll get then (+ Sharpen=50 to see even more detail):
So I would really be happy with either MLVApp 1.4v Or MLVProducer with a small lean towards mlvProducer .
As far as A.E. is concerned , It was the least desirable image with aliasing & moiré patterns .
...
/* Check if its the highest green value possible */
if (tmp1 == processing->highest_green)
{
pix[1] = (pix[0] + pix[2]) / 2;
}
/* reconstruct low green */
if (tmp1 < 15000)
{
if( pix[1] < 1.1*pix[0] && pix[1] < pix[2] )
{
pix[1] = (pix[0] + pix[2]) / 2;
}
}
...
So how about 10-12bit 4096x1770 @ 23.976 fps (A.R. 2.31) in 1:1 FHD sound ?Great! 8) Wanna have! ;)
CMOS[1] 0x40=>0xe
if you do the math 5632/3=1877.333 so round it off the same I can do 3x3 with hi-frame rate 72+ @ 1280x720 (raw size) not vertical squeezed.
Unless the timer over head can be reduced (remember a1ex did some test) (https://www.magiclantern.fm/forum/index.php?topic=23040.msg208479#msg208479) he was able to reduce more rolling shutter and here (https://www.magiclantern.fm/forum/index.php?topic=19300.msg207723#msg207723) too
I think on the 5d3 the rolling shutter is around 18 I think .
So I hope to have less rolling shutter , but that work in process .
the minimum timer A value in 1080p is 554
720p25: A = 1000, B = 1280, readout size 1496 x 967 (this includes black borders)
720p30: A = 960, B = 1112, same readout size
Timer A can be pushed to 872 in both modes.
You should see the same list of reg's I posted not just cmos reg's , that tells me eitherSorry, forgot to say that 50D doesn't have movie playback.
didn't enabled the "ENGIO Reg's" in the advanced tab of adtg_gui.mo or you didn't refresh liveview
e.g. load a h264 of review a photo , this a must or nothing will work and you will not get access to the hidden reg's
0xc0f06008 : 0x27b04f5 (from 0x27b27b)
0xc0f06084 : 0x1004b (from 0x1004a)
0xc0f06088 : 0x45209bb (from 0x450452)
0xc0f06008 : 0x4f504f5
0xc0f06014 : 0xc9c
0xc0f06084 : 0x1004b (from default 1004a)
0xc0f06088 : 0xc9d09bb
They were retrived first time taking FRSP and watch previus values of regs in adtg_gui and then after taking a regular picture while not in LV.static unsigned int raw_info_update_cbr(unsigned int unused)
binning-modes.html (https://a1ex.magiclantern.fm/bleeding-edge/lv-binning/binning-modes.html) (18.5 MB)
CMOS[2] should center it , check photo mode and see what it is.Found CMOS[4] is responsible for horizontal position on 50D, that's why i wasn't noticing any change in value while checking cmos[2]
I check to see by refreshing liveview with the half shutter button
Seems the image is always right justified , and it can only be moved to the left from what I seen on 5d2 .
Previuous automatic value:
CMOS[4] = 484
Centered Full Wide:
CMOS[4] = 404
Another Value fond early while logging photo mode, but not sure about
CMOS[4] = 40c
That expected , did you try and rec a .mlv file ? Looks like a image dumpFirst attempt result in a standard 2000x1079 mlv video....
more then likely the pink lower bar with not be in the raw video
It was the same for the 5D2
Hi Reddeercity,Interesting idea ,
The squeezed mode is interesting. I'm thinking about use it in fullhd+ like (1920 x 360 up to 2400 x 432) at a high frame rate like 72 to optimise aliasing.
With an offset of 1 line in height every 1/72 second, we can reconstruct with dual-iso a good fullhd+ (1920x1080 up to 2400x1296 fps24 ) ?
I know we need to adapt mlv_dump or mlv_app to take in account the height shift but do you think it's doable in crop.c ?
Here is a schema to explain my thoughts :
Found CMOS[4] is responsible for horizontal position on 50D ......
Strange thing: .... now I get automatic centered image while entering liveview and setting full width:
Previuous automatic value:
CMOS[4] = 484
Centered Full Wide:
CMOS[4] = 404
Another Value fond early while logging photo mode, but not sure about
CMOS[4] = 40c
Great , good to know it may help other d4 camsFirst attempt .... mlv video....No, I forgot to add the extended resolutions to the source (3008, 3840,4096 & 5632) -- sorry
Discovered that to increase image size ...... increase resolution in movie Tab -> raw video
Max available is 3520 which give a almost good video of 3520x1078 (a couple of vertical dark lines as wrote defore) from a dump of 4768x1078
Is this how is suppose to do or I'm missing something?
static uint32_t resolution_presets_x[] = { 640, 960, 1280, 1600, 1920, 2240, 2560, 2880, 3008, 3200, 3520, 3840, 4096, 5632 };
#define RESOLUTION_CHOICES_X CHOICES( "640","960","1280","1600","1920","2240","2560","2880","3008","3200","3520",3840","4096","5632")
Even though your 50d can't do 5632 it will go to the next max. available size to you@reddeercity Mlv_lite and crop_rec doesn't compile for 50D in Crop_Rec-4k-5d2-magic-lantern_redercit_buffer_a1ex-code-10-22-2018 (https://bitbucket.org/reddeercity/magic-lantern_10-12bit/downloads/Crop_Rec-4k-5d2-magic-lantern_redercit_buffer_a1ex-code-10-22-2018.zip)I know mlv_lite didn't but wasn't sure about crop_rec , I meaning to look in to it .
1888x704 (https://www.magiclantern.fm/forum/index.php?topic=19336.msg209658#msg209658) @ 48fpsVery nice!!! (edit: before I somehow missed that you got that resolution despite looking at the images 🤦)
Is it possible to disable the squeeze and have that same resolution without it?No, at 48fps the max vertical is 704 , maybe 750
...... but is it possible to get higher vertical than the 2880x1080 preset if you lower the fps? Something like 2880x1200 at 21fpsIn crop_mode I'm planning on 3008x1200 @ 24fps , it's almost there got sidetrack by the 4k vertical compressed height dev.
No, at 48fps the max vertical is 704 , maybe 750
The nice think about the 5D2 with 3x5 , there no more aliasing and moire then you see in 3x3
I'm planning on 3008x1200 @ 24fps , it's almost there got sidetrack by the 4k vertical compressed height dev.
currently I have 2712x1200 @ 23.976fps & 2560x1200 @ 23.976fps (https://www.magiclantern.fm/forum/index.php?topic=19336.msg209086#msg209086)
I'm also thinking of adding some square presets , 2144x1330 (https://www.magiclantern.fm/forum/index.php?topic=19336.msg207515#msg207515) , 2144x1586 (https://www.magiclantern.fm/forum/index.php?topic=19336.msg207553#msg207553) & 2144x1842(maybe) currently there are at 9.9fps but hope to get 24
I got (compressed vertical) 4416x1608 @ 23.98 working (A.R. 2.74:1) , would this resolution be useful ?That all sounds so promising! The release date for all this will be a perfect day! 8)
Or I can go to 4250x1722 @ 23.976 (A.R. 2.46:1) , I'm still keeping 3840x1872 (A.R. 2.05:1) & 4096x1776 (A.R. 2.30:1) @ 24fps
I just don't want too many presets or I can have both . **Note these are un-compressed vertical resolution**
I'm trying to get full heigth from vanilla 5x just like a1ex (https://www.magiclantern.fm/forum/index.php?topic=19336.msg205622#msg205622) and reddeercity already did,
but doesen't appears to extend image stright off like previous full width experiment.
I'm getting that pink bottom like this (https://www.magiclantern.fm/forum/index.php?topic=19336.msg207127#msg207127) and can't get clean image like this (https://www.magiclantern.fm/forum/index.php?topic=19336.msg207553#msg207553) by just increasing Timer B and Head timers.
Figured out 2400x1330 @ 23.976fps real time color preview (same as canon preview) while recording raw video
That's a CMOS[1] adjustment (Vertical Offset) & Head Timers c0f0713c & c0f07150 (vertical window size for liveview)Not quite sure abut CMOS[1] on 50D... his default value is 0x1 and doesn't seems to change from photo mode.
not sure if these are the same in 50d
Here a procedure I use to get extended height in 5x zoom(2144x1586) on 5d2 (default 2144x1074)Yes, basically it's what I'm doing, except for CMOS. From photo mode 0xc0f06088 = c9d09bb, 0xc0f06014 = c9c and 0xc0f06008 = 4f504f5
1-Slow Timer'B" down to 9.98 fps (C0F06014: 0xEDC)
2-Adjust Raw Height C0F06088: 0x66A04BA (1586x2144) we read it as 2144x1586
3-Adjust the Vertical Liveview window (head timers) C0F0713C from 0x476 -> 0x676 & C0F07150 from 0x49C -> 0x69C
Need to do so math for the C0F07150 head timers e.g. 0x49c=1180 vertical default for 5d2 (1074) we need 1586+52(OB offset)=1638
0x69c=1692 , C0F0713C 0x476=1142 (default) need 1586+52(OB offset)=1638 0x676=1654 more then we need but I think you get I the idea .
4-CMOS[1] Vertical Offset adjustment , 0xE6A (default) change to 0xBOD (just need to play around cmos[1] trial & error)
5-Increase frame rate , c0f06014 0xEDC to 0x4something etc...
That's the basics , adjust slowly -- if you flip thought the adjustments too fast you can either lockup the cam or loose the image (liveview turns black)Cycling through video mode will usually help to get LV working when gets completely dark.
At best most or this is just trial & error plus a few lucky breaks :D
Edit: Are you using the 50d 10-12bit build from the experimental download pageI'm using your source files with the addittion of 50D's stubs (https://bitbucket.org/hudson/magic-lantern/commits/db4ee396f4a261d33688b528c39447682f871a07?at=raw_video_10bit_12bit_LVState) for CONFIG_EDMAC_RAW_PATCH support.
or did you use a build compiled from my source file with the add parts (redirect buffer for extended res.) for 50d ?
static inline uint32_t reg_override_zoom_fps(uint32_t reg, uint32_t old_val)
{
/* attempt to reconfigure the x5 zoom at the FPS selected in Canon menu */
if (is_5D2)
{
int timerA = 679 ; //waza57 good values for 23.976: 804- 1245 and 807 - 1237
int timerB = 1471 ;
int a = reg_override_fps_nocheck(reg, timerA, timerB, old_val);
if (a) return a;
switch (reg)
{
/* raw resolution (end line/column) */
/* X: (3072+140)/8 + 0x17, adjusted for 3072 in raw_rec */
case cmos_new[1]:
return (old_val & 0x0000000) + 0xb0d ;
case 0xC0F06084:
return (old_val & 0x0000000) ;
case 0xC0F06088:
//return (old_val & 0xFFFF0000) + 0x630 ;
return (old_val & 0x00000000) + 0x56a053a; //0x4b00648 or origin value chang nothing
/* HEAD3 timer */
case 0xC0F0713c:
return 0x566 + YRES_DELTA + delta_head3;
/* HEAD4 timer */
case 0xC0F07150:
return 0x58c + YRES_DELTA + delta_head4;
case 0xC0F08184:
return (old_val & 0x0000000) + 0x56a ;
case 0xC0F08188:
return (old_val & 0x0000000) + 0xa07 ;
case 0xC0F08518:
return (old_val & 0x0000000) + 0x56a0a07 ;
}
if (is_5D2)
{
cmos_new[1] = PACK12(42,57);//0xB0D; /* pink highlights without this */
cmos_new[2] = 0x10E; /* read every column, centered crop */ //waza57 cmos 6
break;
Figured out 2400x1330 @ 23.976fps real time color preview (same as canon preview) while recording raw video
You may wonder what the last three reg's are for , they are for the liveview preview while recording instead of a frozen liveview
c0f08184 = preview height, I set this to the raw height +52 (the OB area) 0x467(1127)=>0x56a(1386)
c0f08188 = preview width , I set this to the total raw width+(OB Area 160) 0x907(2311)=>0xa07(2567)
c0f08518 = both preview height & width 0x4670907->0x56a0a07 ( 1127x2311)->(1386x2567) and of course we read this as 2567x1386 ;)
This is great! Do you mean also the real-time preview now is uncropped ?Yes , until recording raw , then just like the default crop_mode it center crops
Still adjust different presets , trying to get more height in the 2k range
Figured out 2400x1330 @ 23.976fps real time color preview (same as canon preview) while recording raw video
record times are short , about 20 seconds at the moment (I haven't starting on Over Clocking the CF card Bus yet that's next)
(https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fi.ibb.co%2F3Mq5zKz%2FVRAM28-crop-small.png&hash=3a2b9f0869a0820976116dc0ff78c0f3) (https://imgbb.com/)
(https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fi.ibb.co%2F54W99qD%2FVRAM29-small-2400x1330-24fps.png&hash=50170171b138f4e43c1ecb0bf0878f68) (https://imgbb.com/)
You may wonder what the last three reg's are for , they are for the liveview preview while recording instead of a frozen liveview
c0f08184 = preview height, I set this to the raw height +52 (the OB area) 0x467(1127)=>0x56a(1386)
c0f08188 = preview width , I set this to the total raw width+(OB Area 160) 0x907(2311)=>0xa07(2567)
c0f08518 = both preview height & width 0x4670907->0x56a0a07 ( 1127x2311)->(1386x2567) and of course we read this as 2567x1386 ;)
preset_struct presets[ ] =
{
{
.name = "preset1",
.num_registers = 2,
.registers = {register1, value1, register2, value2}
},
{
.name = "preset2",
...
@reddeercity Is it techninally possible to get slow motion 48+ fps in crop mode? If I were to copy your slow motion registers while in 5x would it be effective?Yes needs something different, 48fps is dependent on line skipping & vertical compressed (3x5) which only work will in 3x3
Or does that need something completely different
No it not difficult , I got it figured out just been too busy to finish coding it .
..... discussing with Danne about making presets for crop_rec out of the sets of registers that reddeercity has been finding.
It seems really difficult, .....
Yes needs something different, 48fps is dependent on line skipping & vertical compressed (3x5) which only work will in 3x3
you can force line skipping in 3x crop but can't produce a useable image (being trying for 2 weeks now)
The best to hope for in crop mode would be a very small crop window e.g. 1280x430 (crop factor of about 4.5 which I have no interest in)
The simple fact that the sensor is very slow (96MP/s) kept it from any meaning full resolutions & or hi-frame rate .
Aspect | Max resolution |
2.67:1 | 2064x774 |
2.35:1 | 1936x824 |
16:9 | 1680x945 |
But you can certainly explore the possible , All my note are here on my thread .
No it not difficult , I got it figured out just been too busy to finish coding it .
D4 cams work a little different then d5 cams in crop_rec . (this is no small thing , it took @waza57 some time to get it to work , more then a mirror hack)
I'm looking at this from a video production side (that why I won't have anything that doesn't record @ 24fps - besides Full Res (5632x3755@4.5fps)
I'm re-evaluating all my presets , sorry for the delay but life come first :)
After I finish the crop_rec for the 5d2 , I'll spend my time now on overclocking CF card bus & Lossless compression .
I know the limitations of the sensor now , I pushed it as far as it can go (I can see a cam upgrade for me in the future maybe 5d3 or 5d4)
I pushed it as far as it can go (I can see a cam upgrade for me in the future maybe 5d3 or 5d4)
96 isn't possible on any camera https://docs.google.com/spreadsheets/d/16cgnRivbUv7nA9PUlCLmLdir3gXdIN3pqzCNAAybepc/edit#gid=5
in digic IV. Unless anybody's tried overclocking the SD card speed.
Probably wonldn't need to if RAW compressed (or lossless whatever stupid name people were calling it) could work.
So do the other 5D2 users think I should keep 4K preset in compressed vertical ?Any of your posted presets would be nice to try out for me. But unfortunately I don't get one single preset to work over here...
So do the other 5D2 users think I should keep 4K preset in compressed vertical ?
As presets need to be frequently updated, I like the Ilia idea of creating a struct to store different presets.
If it's possible to do it, it's more suitable, it's open, it's simple (no need to compile every time).
Indeed, we can exchange an xml file (or whatever file format) that store 5D2 presets between users.
IMHO, I think 3K/UHD raw developpement and registers discover will be more easy and quickly spread over users.
David
Yes when I post Reg's screen shots it all the reg's needed for the what ever preset I was working on.
No sure why you can't reproduce , 5D2 is really touchy , if you adjust reg's out order the cam will lock up or will not respond .
You have to enable (in the advanced tab) ENGIO registers , then refresh , view or play a h264 or cr2 file to update the reg's
Rule of thumb : First thing Slow down Timer"A" first then Timer"B" , I usually do all my work around 10fps then after I set raw rez.
and head timers I increase timers "B" to the correct frame rate (23.976) (but slowly) .
Yes "C" code can be hard to understand sometimes , but there is a reason for everything ;D
If you read the crop_rec code you will see that it needs calls from adtg to apply the modified regs.
Active Area : 0 0 1266 2368
Frame Rate : 24.028
line_592-598
if (is_5D2)
{
cmos_new[1] = 0xB0D; /* pink highlights without this */
cmos_new[2] = 0x10E; /* read every column, centered crop */ //waza57 cmos 6
break;
}
break;
****Line_685-693****
/* raw buffer centered in zoom mode */
case CROP_PRESET_CENTER_Z:
cmos_new[1] = (!is_5D2)
? 0xB0D /* vertical (first|last) */
: -1;
cmos_new[2] = (!is_5D2)
? 0x10E /* horizontal offset (mask 0xFF0) */
: -1;
break;
****Line_1508-1544***
static inline uint32_t reg_override_zoom_fps(uint32_t reg, uint32_t old_val)
{
/* attempt to reconfigure the x5 zoom at the FPS selected in Canon menu */
if (is_5D2)
{
int timerA = 680 ;
int timerB = 1472 ;
int a = reg_override_fps_nocheck(reg, timerA, timerB, old_val);
if (a) return a;
switch (reg)
{
/* raw resolution (end line/column) */
/* X: (3072+140)/8 + 0x17, adjusted for 3072 in raw_rec */
case 0xC0F06084:
return (old_val & 0x0000000) ;
case 0xC0F06088:
//return (old_val & 0xFFFF0000) + 0x630 ;
return (old_val & 0x00000000) + 0x56A053A; //0x4b00648 or origin value chang nothing
case 0xC0F0713C:
return (old_val & 0x0000000) + 0x566;
case 0xC0F07150:
return (old_val & 0x0000000) + 0x58C;
case 0xC0F08184:
return (old_val & 0x0000000) + 0x56A;
case 0xC0F08188:
return (old_val & 0x0000000) + 0xA07;
case 0xC0F08518:
return (old_val & 0x0000000) + 0x56A053A;
}
edmac-memcpy.c , fio-ml.c
I need to disable call to function "clean_d_cache()" otherwise i can't patch ROM addresses
Boy this ROM hack from waza57 for height is really hard to disable , more I think I'm close the more error's I get & can't compile :(I was wondering if isn't better to make Digic 4 camera build on top of official crop_rec_4k branch? This is something should be done before or after.
On the Bright side :D My preset code structure works , after I found where to add the code.
if (!patch_active) waza57 changes to effective update for 5d2
^
crop_rec.c:1660:71: error: invalid suffix "d2" on integer constant
if (!patch_active) waza57 changes to effective update for 5d2
^
crop_rec.c: In function 'crop_rec_init':
crop_rec.c:2313:9: error: 'RAWROMHEIGHT_WRITE' undeclared (first use in this function)
RAWROMHEIGHT_WRITE = 0xFFCAA1F4;
^
crop_rec.c:2314:9: error: 'MEM_RAWROMHEIGHT' undeclared (first use in this function)
MEM_RAWROMHEIGHT = 0x00000467;
^
crop_rec.c:2316:9: error: 'RAWROMWIDTH_WRITE' undeclared (first use in this function)
RAWROMWIDTH_WRITE = 0xFFCAA1EC; // waza57 patch ROM for more height
^
crop_rec.c:2317:9: error: 'MEM_RAWROMWIDTH' undeclared (first use in this function)
MEM_RAWROMWIDTH = 0x00000FCE;
// RAWROMHEIGHT_WRITE = 0xFFCAA1F4;
// MEM_RAWROMHEIGHT = 0x00000467;
// RAWROMWIDTH_WRITE = 0xFFCAA1EC; // waza57 patch ROM for more height
// MEM_RAWROMWIDTH = 0x00000FCE;
5D2_212.sym
crop_rec.mo
mlv_rec.mo
I was surprised at how long I could record with my Lexar 1066x. ........ got to 2 minutes before eventually stopping it myself.
//#ifdef CONFIG_DIGIC_IV - fixme
return version[0] == '4';
//#endif
/** This camera has a DIGIC V chip */
#define CONFIG_DIGIC_V
#if defined(CONFIG_5D2) || defined(CONFIG_50D) || defined(CONFIG_60D) || defined(CONFIG_550D) || defined(CONFIG_500D) || defined(CONFIG_600D) || defined(CONFIG_1100D) || defined(CONFIG_7D)
#define RAW_PHOTO_EDMAC 0xc0f04208
#endif
#if defined(CONFIG_5D3) || defined(CONFIG_700D) || defined(CONFIG_6D) || defined(CONFIG_EOSM2) || defined(CONFIG_EOSM) || defined(CONFIG_650D) || defined(CONFIG_70D) || defined(CONFIG_100D)
#define RAW_PHOTO_EDMAC 0xc0f04008
#endif
#ifdef CONFIG_DIGIC_IV
#define RAW_PHOTO_EDMAC 0xc0f04208
#endif
#ifdef CONFIG_DIGIC_V
#define RAW_PHOTO_EDMAC 0xc0f04008
#endif
@reddeercity - Could you please commit your local changes and push to the remote?
Magic Lantern crop_rec-4k-5D2-eXperimental.2019Feb01.5D2212
Camera : 5D2
Firmware : 212
Changeset: 8bfbb0ca228e+ (crop_rec_4k_5D2) tip
Built on : 2019-02-02 04:40:34 by david@***
diff -r 8bfbb0ca228e src/raw.c
--- a/src/raw.c Sat Sep 08 11:26:34 2018 +0200
+++ b/src/raw.c Fri Feb 01 21:40:35 2019 -0700
@@ -32,6 +32,11 @@
#include "fps.h"
#include "platform/state-object.h"
+#ifdef CONFIG_EDMAC_RAW_PATCH
+#include "patch.h"
+#include "edmac.h"
+#endif
+
#undef RAW_DEBUG /* define it to help with porting */
#undef RAW_DEBUG_DUMP /* if you want to save the raw image buffer and the DNG from here */
#undef RAW_DEBUG_BLACK /* for checking black level calibration */
@@ -221,7 +226,7 @@
#define SHAD_GAIN_REGISTER 0xC0F08030
-static int lv_raw_type = PREFERRED_RAW_TYPE;
+//static int lv_raw_type = PREFERRED_RAW_TYPE;//
static int lv_raw_gain = 0;
/**
@@ -1831,6 +1836,10 @@
#endif
}
+#if defined(CONFIG_EDMAC_RAW_SLURP) || defined(CONFIG_EDMAC_RAW_PATCH)
+static int lv_raw_type = PREFERRED_RAW_TYPE;
+#endif
+
#ifdef CONFIG_EDMAC_RAW_SLURP
void FAST raw_lv_vsync()
@@ -1867,7 +1876,31 @@
/* overriding the buffer is only valid for one frame */
redirected_raw_buffer = 0;
}
+#endif
+#ifdef CONFIG_EDMAC_RAW_PATCH
+static void raw_lv_setedmac_patch(uint32_t* regs, uint32_t* stack, uint32_t pc)
+{
+ /* R0: EDMAC channel */
+ /* R1: output buffer */
+ /* R2: EDMAC info (geometry) */
+ /* R3: flags */
+
+ int width, height;
+ int ok = raw_lv_get_resolution(&width, &height);
+ if (ok)
+ {
+ /* update EDMAC image size */
+ int pitch = width * raw_info.bits_per_pixel / 8;
+ static struct edmac_info dst_edmac_info;
+ dst_edmac_info.xb = pitch;
+ dst_edmac_info.yb = height - 1;
+ regs[2] = (uint32_t) &dst_edmac_info;
+
+ /* we can override this here */
+ EngDrvOut(RAW_TYPE_REGISTER, lv_raw_type);
+ }
+}
/* integer gain used to fix the image darkening caused by lv_raw_gain */
/* this gain must not (!) change the raw data */
int _raw_lv_get_iso_post_gain()
@@ -2158,6 +2191,12 @@
}
#ifdef CONFIG_RAW_LIVEVIEW
+
+#ifdef CONFIG_EDMAC_RAW_PATCH
+extern thunk StartImagePass_x1_SetEDmac;
+extern thunk StartImagePass_x5_SetEDmac;
+#endif
+
static void raw_lv_enable()
{
/* make sure LiveView is fully started before enabling the raw flag */
@@ -2168,6 +2207,10 @@
#ifndef CONFIG_EDMAC_RAW_SLURP
call("lv_save_raw", 1);
+#ifdef CONFIG_EDMAC_RAW_PATCH
+ patch_hook_function((uint32_t) &StartImagePass_x1_SetEDmac, 0xE3A03202, raw_lv_setedmac_patch, "RAW LV x1");
+ patch_hook_function((uint32_t) &StartImagePass_x5_SetEDmac, 0xE3A03202, raw_lv_setedmac_patch, "RAW LV x5");
+#endif
#endif
#ifdef DEFAULT_RAW_BUFFER
@@ -2210,6 +2253,10 @@
#ifndef CONFIG_EDMAC_RAW_SLURP
call("lv_save_raw", 0);
+#ifdef CONFIG_EDMAC_RAW_PATCH
+ unpatch_memory((uint32_t) &StartImagePass_x1_SetEDmac);
+ unpatch_memory((uint32_t) &StartImagePass_x5_SetEDmac);
+#endif
#endif
#ifdef CONFIG_ALLOCATE_RAW_LV_BUFFER
diff -r 8bfbb0ca228e platform/5D2.212/internals.h
--- a/platform/5D2.212/internals.h Sat Sep 08 11:26:34 2018 +0200
+++ b/platform/5D2.212/internals.h Fri Feb 01 21:40:35 2019 -0700
@@ -131,6 +131,9 @@
#define CONFIG_RAW_DISABLE_IN_10X_ZOOM
#define CONFIG_RAW_DISABLE_IN_10X_ZOOM_WEAK
+/** experimental - patch raw buffer parameters in Canon code */
+#define CONFIG_EDMAC_RAW_PATCH
+
/** Use joystick for one-finger menu navigation */
#define CONFIG_LONG_PRESS_JOYSTICK_MENU
diff -r 8bfbb0ca228e platform/5D2.212/stubs.S
--- a/platform/5D2.212/stubs.S Sat Sep 08 11:26:34 2018 +0200
+++ b/platform/5D2.212/stubs.S Fri Feb 01 21:40:35 2019 -0700
@@ -222,6 +222,10 @@
NSTUB(0xFF9D8250, DispSensorStart)
NSTUB(0xFF9B1BE0, LightMeasure_n_Callback_r0)
+/** LiveView RAW patches **/
+NSTUB(0xFFA08008, StartImagePass_x1_SetEDmac) /* right before the SetEDmac call from StartImagePass_x1/x5 CrawAddr / KindOfCraw */
+NSTUB(0xFFA08B24, StartImagePass_x5_SetEDmac) /* FIXME: why it fails when the hook is placed on the BL instruction?! */
+
/** Making the card bootable **/
NSTUB( 0x20890, cf_device)
NSTUB( 0x208D8, sd_device)
./module_hginfo_dump.sh /Users/rosiefort/Downloads/magiclantern-crop_rec-3k-1080p-5D2-eXperimental.2019Feb01.5D2212/ML/modules/crop_rec.mo
Name : Crop mode recording
Author : a1ex
License : GPL
Summary : Turn the 1080p and 720p video modes into 1:1 sensor crop modes
Description : This alters the 1080p and 720p video modes, transforming them
into 3x (1:1) crop modes, by tweaking the sensor registers.
[...]
Last update : 8bfbb0c on 2018-09-08 09:26:34 UTC by waza57:
now we can change the ISO settings in crop x5
Build date : 2019-01-27 21:31:15 UTC
Build user : david@***
modules/crop_rec/Makefile
modules/crop_rec/README.rst
modules/crop_rec/crop_rec.c
diff -r 8bfbb0ca228e modules/crop_rec/crop_rec.c
--- a/modules/crop_rec/crop_rec.c
+++ b/modules/crop_rec/crop_rec.c
@@ -187,10 +187,10 @@
static uint32_t MEM_ADTG_WRITE = 0;
static uint32_t ENGIO_WRITE = 0;
static uint32_t MEM_ENGIO_WRITE = 0;
-static uint32_t RAWROMHEIGHT_WRITE = 0;
-static uint32_t RAWROMWIDTH_WRITE = 0;
-static uint32_t MEM_RAWROMHEIGHT = 0;
-static uint32_t MEM_RAWROMWIDTH = 0;
+//static uint32_t RAWROMHEIGHT_WRITE = 0;
+//static uint32_t RAWROMWIDTH_WRITE = 0;
+//static uint32_t MEM_RAWROMHEIGHT = 0;
+//static uint32_t MEM_RAWROMWIDTH = 0;
/* from SENSOR_TIMING_TABLE (fps-engio.c) or FPS override submenu */
static int fps_main_clock = 0;
@@ -343,10 +343,10 @@
case CROP_PRESET_CENTER_Z:
if (is_5D2)
{
- skip_left = 264; //265 269bad value create "black meean too..." and bug in hack suite
- skip_right = 44;
- skip_top = 54; // waza57 pourquoi 54 pour avoir une image correcte alors que dmspy que 2
- skip_bottom = 66; //52
+ skip_left = 160; //265 269bad value create "black meean too..." and bug in hack suite
+ skip_right = 0;
+ skip_top = 52; // waza57 pourquoi 54 pour avoir une image correcte alors que dmspy que 2
+ skip_bottom = 0; //52
}
break;
@@ -591,7 +591,7 @@
}
if (is_5D2)
{
- cmos_new[1] = PACK12(42,57);//0xBB3; /* pink highlights without this */
+ cmos_new[1] = PACK12(42,57); //0xBB3; /* pink highlights without this */
cmos_new[2] = 0x10E; /* read every column, centered crop */ //waza57 cmos 6
break;
}
@@ -685,10 +685,10 @@
/* raw buffer centered in zoom mode */
case CROP_PRESET_CENTER_Z:
cmos_new[1] = (!is_5D2)
- ? PACK12(9+2,42+1) /* vertical (first|last) */
+ ? PACK12(9+2,42+1) /* vertical (first|last) */
: -1;
cmos_new[2] = (!is_5D2)
- ? 0x09E /* horizontal offset (mask 0xFF0) */
+ ? 0x9E /* horizontal offset (mask 0xFF0) */
: -1;
break;
}
@@ -1510,8 +1510,8 @@
/* attempt to reconfigure the x5 zoom at the FPS selected in Canon menu */
if (is_5D2)
{
- int timerA = 804 ; //waza57 good values for 23.976: 804- 1245 and 807 - 1237
- int timerB = 1245 ;
+ int timerA = 834 ; //waza57 good values for 23.976: 804- 1245 and 807 - 1237
+ int timerB = 1200 ;
int a = reg_override_fps_nocheck(reg, timerA, timerB, old_val);
if (a) return a;
switch (reg)
@@ -1520,11 +1520,32 @@
/* X: (3072+140)/8 + 0x17, adjusted for 3072 in raw_rec */
case 0xC0F06084:
- return (old_val & 0x0000000) ;
+ return (old_val & 0x0000000) + 0x30036 ;
case 0xC0F06088:
//return (old_val & 0xFFFF0000) + 0x630 ;
- return (old_val & 0x00000000) + 0x4b0063c; //0x4b00648 or origin value chang nothing
+ return (old_val & 0x00000000) + 0x46F066A; //0x4b00648 or origin value chang nothing
+
+ /* HEAD3 timer */
+ /* 467 in 30p */
+ case 0xc0f0713c:
+ return 0x46C ;
+
+ /* HEAD4 timer */
+ /* 49C in 30p */
+ case 0xC0F07150:
+ return 0x46C ;
+
+ case 0xC0F08184:
+ return 0x46C ;
+
+ case 0xC0F08188:
+ return 0xC67 ;
+
+ case 0xC0F08518:
+ return 0x46C0C67 ;
+
+
}
}
else
@@ -1640,25 +1661,25 @@
static int patch_active = 0;
static int lv_dirty = 1; //waza57 changes to effective update for 5d2
-static void update_patch(int ROMhack)
+static void update_patch()
{
if (CROP_PRESET_MENU && !patch_active)
{
/* update preset */
crop_preset = CROP_PRESET_MENU;
- if (is_5D2 && crop_preset == CROP_PRESET_CENTER_Z ) // need to patch ROM for increase height for 5D2
- {
- patch_memory(RAWROMWIDTH_WRITE, MEM_RAWROMWIDTH, 0x00001C70, "crop_rec: rawromwidth hook");
- patch_memory(RAWROMHEIGHT_WRITE, MEM_RAWROMHEIGHT, 0x00000767, "crop_rec: rawromwidth hook");
- if (ROMhack)
- {
- patch_active = 1;
- return;
- }
- }
+ //if (is_5D2 && crop_preset == CROP_PRESET_CENTER_Z ) // need to patch ROM for increase height for 5D2
+ // {
+ //patch_memory(RAWROMWIDTH_WRITE, MEM_RAWROMWIDTH, 0x00001C70, "crop_rec: rawromwidth hook");
+ //patch_memory(RAWROMHEIGHT_WRITE, MEM_RAWROMHEIGHT, 0x00000767, "crop_rec: rawromwidth hook");
+ //if (ROMhack)
+ //{
+ //patch_active = 1;
+ //return;
+ //}
+ //}
/* install our hooks, if we haven't already do so */
- // if (!patch_active) waza57 changes to effective update for 5d2
- // {
+ if (!patch_active) //waza57 changes to effective update for 5d2
+ {
patch_hook_function(CMOS_WRITE, MEM_CMOS_WRITE, &cmos_hook, "crop_rec: CMOS[1,2,6] parameters hook");
patch_hook_function(ADTG_WRITE, MEM_ADTG_WRITE, &adtg_hook, "crop_rec: ADTG[8000,8806] parameters hook");
if (ENGIO_WRITE)
@@ -1666,8 +1687,8 @@
patch_hook_function(ENGIO_WRITE, MEM_ENGIO_WRITE, engio_write_hook, "crop_rec: video timers hook");
}
patch_active = 1;
- //return ; //waza57 present in my version not in standard
- // }
+ return ; //waza57 present in my version not in standard
+ }
}
else
@@ -1675,16 +1696,16 @@
/* undo active patches, if any */
if (patch_active)
{
- if (is_5D2 && crop_preset == CROP_PRESET_CENTER_Z)
- {
- unpatch_memory(RAWROMHEIGHT_WRITE);
- unpatch_memory (RAWROMWIDTH_WRITE);
- if (ROMhack)
- {
- patch_active = 0;
- return;
- }
- }
+ //if (is_5D2 && crop_preset == CROP_PRESET_CENTER_Z)
+ //{
+ //unpatch_memory(RAWROMHEIGHT_WRITE);
+ //unpatch_memory (RAWROMWIDTH_WRITE);
+ //if (ROMhack)
+ //{
+ //patch_active = 0;
+ //return;
+ //}
+ //}
unpatch_memory(CMOS_WRITE);
unpatch_memory(ADTG_WRITE);
if (ENGIO_WRITE)
@@ -2310,11 +2331,11 @@
ENGIO_WRITE = 0xFF9A5618;
MEM_ENGIO_WRITE = 0xE92D407C;
- RAWROMHEIGHT_WRITE = 0xFFCAA1F4;
- MEM_RAWROMHEIGHT = 0x00000467;
+ // RAWROMHEIGHT_WRITE = 0xFFCAA1F4;
+ //MEM_RAWROMHEIGHT = 0x00000467;
- RAWROMWIDTH_WRITE = 0xFFCAA1EC; // waza57 patch ROM for more height
- MEM_RAWROMWIDTH = 0x00000FCE;
+ //RAWROMWIDTH_WRITE = 0xFFCAA1EC; // waza57 patch ROM for more height
+ //MEM_RAWROMWIDTH = 0x00000FCE;
is_5D2 = 1;
crop_presets = crop_presets_5d2;
Open source projects like these are never "done."Well for me I'm almost "done" , after cf card over clocking & lossless I have no more goals .
...time to grab a 5d4!!!
So if it makes people feel better , I won't post code until I'm done all the presets in a working crop_rec module Well for me I'm almost "done" , after cf card over clocking & lossless I have no more goals .
diff --git a/Makefile.user.default b/Makefile.user.default
--- a/Makefile.user.default
+++ b/Makefile.user.default
@@ -202,7 +202,7 @@
# magiclantern-0.2.0.rc1.550d.fw109.zip
#~ VERSION=0.2.0.rc1.550d.fw109
BUILDVER=$(shell whoami).$(shell hg id -i -r .)
-VERSION = $(call eval_once,VERSION,Nightly.$(shell LC_TIME=EN date +'%Y%b%d').$(MODEL)$(FW_VERSION))
+VERSION = $(call eval_once,VERSION,crop_rec-4k-5D2-eXperimental.$(shell LC_TIME=EN date +'%Y%b%d').$(MODEL)$(FW_VERSION))
# Build configuration - untested and debug stuff handy for devs
# these can be specified either in Makefile.user, or in the command line:
diff --git a/modules/Makefile.modules.default b/modules/Makefile.modules.default
--- a/modules/Makefile.modules.default
+++ b/modules/Makefile.modules.default
@@ -19,4 +19,6 @@
adv_int \
crop_rec \
edmac \
-
\ No newline at end of file
+ adtg_gui \
+ cf_acc \
+
diff --git a/modules/mlv_rec/mlv_rec.c b/modules/mlv_rec/mlv_rec.c
--- a/modules/mlv_rec/mlv_rec.c
+++ b/modules/mlv_rec/mlv_rec.c
@@ -133,8 +133,8 @@
* => if my math is not broken, this traslates to resolution being multiple of 32 pixels horizontally
* use roughly 10% increments
**/
-static uint32_t resolution_presets_x[] = { 640, 960, 1280, 1600, 1920, 2240, 2560, 2880, 3200, 3520 };
-#define RESOLUTION_CHOICES_X CHOICES( "640","960","1280","1600","1920","2240","2560","2880","3200","3520")
+static uint32_t resolution_presets_x[] = { 640, 960, 1280, 1600, 1920, 2240, 2560, 2880, 3008, 3200, 3520, 3840, 4096, 5632 };
+#define RESOLUTION_CHOICES_X CHOICES( "640","960","1280","1600","1920","2240","2560","2880","3008","3200","3520","3840","4096","5632")
static uint32_t aspect_ratio_presets_num[] = { 5, 4, 3, 8, 25, 239, 235, 22, 2, 185, 16, 5, 3, 4, 12, 1175, 1, 1 };
static uint32_t aspect_ratio_presets_den[] = { 1, 1, 1, 3, 10, 100, 100, 10, 1, 100, 9, 3, 2, 3, 10, 1000, 1, 2 };
diff --git a/platform/50D.109/internals.h b/platform/50D.109/internals.h
--- a/platform/50D.109/internals.h
+++ b/platform/50D.109/internals.h
@@ -138,6 +138,9 @@
#define CONFIG_RAW_DISABLE_IN_10X_ZOOM
#define CONFIG_RAW_DISABLE_IN_10X_ZOOM_WEAK
+/** experimental - patch raw buffer parameters in Canon code */
+#define CONFIG_EDMAC_RAW_PATCH
+
/** Use joystick for one-finger menu navigation */
#define CONFIG_LONG_PRESS_JOYSTICK_MENU
diff --git a/platform/50D.109/stubs.S b/platform/50D.109/stubs.S
--- a/platform/50D.109/stubs.S
+++ b/platform/50D.109/stubs.S
@@ -231,6 +231,10 @@
NSTUB(0xFF9ADD28, DispSensorStart) // d
// NSTUB( ???, LightMeasure_n_Callback_r0) /* present on 7D.203, 5D2.212 */
+/** LiveView RAW patches **/
+NSTUB(0xff9db254, StartImagePass_x1_SetEDmac) /* right before the SetEDmac call from StartImagePass_x1/x5 CrawAddr / KindOfCraw */
+NSTUB(0xff9dbce8, StartImagePass_x5_SetEDmac) /* FIXME: why it fails when the hook is placed on the BL instruction?! */
+
/** Making the card bootable **/
NSTUB( 0x1D6FC, cf_device) // in cfReadBlk
NSTUB( 0x1D744, sd_device) // in sdReadBlk
diff --git a/platform/5D2.212/internals.h b/platform/5D2.212/internals.h
--- a/platform/5D2.212/internals.h
+++ b/platform/5D2.212/internals.h
@@ -131,6 +131,9 @@
#define CONFIG_RAW_DISABLE_IN_10X_ZOOM
#define CONFIG_RAW_DISABLE_IN_10X_ZOOM_WEAK
+/** experimental - patch raw buffer parameters in Canon code */
+#define CONFIG_EDMAC_RAW_PATCH
+
/** Use joystick for one-finger menu navigation */
#define CONFIG_LONG_PRESS_JOYSTICK_MENU
diff --git a/platform/5D2.212/stubs.S b/platform/5D2.212/stubs.S
--- a/platform/5D2.212/stubs.S
+++ b/platform/5D2.212/stubs.S
@@ -222,6 +222,10 @@
NSTUB(0xFF9D8250, DispSensorStart)
NSTUB(0xFF9B1BE0, LightMeasure_n_Callback_r0)
+/** LiveView RAW patches **/
+NSTUB(0xFFA08008, StartImagePass_x1_SetEDmac) /* right before the SetEDmac call from StartImagePass_x1/x5 CrawAddr / KindOfCraw */
+NSTUB(0xFFA08B24, StartImagePass_x5_SetEDmac) /* FIXME: why it fails when the hook is placed on the BL instruction?! */
+
/** Making the card bootable **/
NSTUB( 0x20890, cf_device)
NSTUB( 0x208D8, sd_device)
diff --git a/src/backtrace.c b/src/backtrace.c
--- a/src/backtrace.c
+++ b/src/backtrace.c
@@ -12,7 +12,7 @@
#include "tasks.h"
#include "backtrace.h"
-#define qemu_log_mask(...)
+#define qemu_log_mask(level, fmt, ...) { qprintf(fmt, ## __VA_ARGS__); }
#define qemu_loglevel_mask(x) 0
#define EOSState void
diff --git a/src/raw.c b/src/raw.c
--- a/src/raw.c
+++ b/src/raw.c
@@ -32,6 +32,11 @@
#include "fps.h"
#include "platform/state-object.h"
+#ifdef CONFIG_EDMAC_RAW_PATCH
+#include "patch.h"
+#include "edmac.h"
+#endif
+
#undef RAW_DEBUG /* define it to help with porting */
#undef RAW_DEBUG_DUMP /* if you want to save the raw image buffer and the DNG from here */
#undef RAW_DEBUG_BLACK /* for checking black level calibration */
@@ -221,7 +226,7 @@
#define SHAD_GAIN_REGISTER 0xC0F08030
-static int lv_raw_type = PREFERRED_RAW_TYPE;
+//static int lv_raw_type = PREFERRED_RAW_TYPE;//
static int lv_raw_gain = 0;
/**
@@ -1831,6 +1836,10 @@
#endif
}
+#if defined(CONFIG_EDMAC_RAW_SLURP) || defined(CONFIG_EDMAC_RAW_PATCH)
+static int lv_raw_type = PREFERRED_RAW_TYPE;
+#endif
+
#ifdef CONFIG_EDMAC_RAW_SLURP
void FAST raw_lv_vsync()
@@ -1867,7 +1876,31 @@
/* overriding the buffer is only valid for one frame */
redirected_raw_buffer = 0;
}
+#endif
+#ifdef CONFIG_EDMAC_RAW_PATCH
+static void raw_lv_setedmac_patch(uint32_t* regs, uint32_t* stack, uint32_t pc)
+{
+ /* R0: EDMAC channel */
+ /* R1: output buffer */
+ /* R2: EDMAC info (geometry) */
+ /* R3: flags */
+
+ int width, height;
+ int ok = raw_lv_get_resolution(&width, &height);
+ if (ok)
+ {
+ /* update EDMAC image size */
+ int pitch = width * raw_info.bits_per_pixel / 8;
+ static struct edmac_info dst_edmac_info;
+ dst_edmac_info.xb = pitch;
+ dst_edmac_info.yb = height - 1;
+ regs[2] = (uint32_t) &dst_edmac_info;
+
+ /* we can override this here */
+ EngDrvOut(RAW_TYPE_REGISTER, lv_raw_type);
+ }
+}
/* integer gain used to fix the image darkening caused by lv_raw_gain */
/* this gain must not (!) change the raw data */
int _raw_lv_get_iso_post_gain()
@@ -2158,6 +2191,12 @@
}
#ifdef CONFIG_RAW_LIVEVIEW
+
+#ifdef CONFIG_EDMAC_RAW_PATCH
+extern thunk StartImagePass_x1_SetEDmac;
+extern thunk StartImagePass_x5_SetEDmac;
+#endif
+
static void raw_lv_enable()
{
/* make sure LiveView is fully started before enabling the raw flag */
@@ -2168,6 +2207,10 @@
#ifndef CONFIG_EDMAC_RAW_SLURP
call("lv_save_raw", 1);
+#ifdef CONFIG_EDMAC_RAW_PATCH
+ patch_hook_function((uint32_t) &StartImagePass_x1_SetEDmac, 0xE3A03202, raw_lv_setedmac_patch, "RAW LV x1");
+ patch_hook_function((uint32_t) &StartImagePass_x5_SetEDmac, 0xE3A03202, raw_lv_setedmac_patch, "RAW LV x5");
+#endif
#endif
#ifdef DEFAULT_RAW_BUFFER
@@ -2210,6 +2253,10 @@
#ifndef CONFIG_EDMAC_RAW_SLURP
call("lv_save_raw", 0);
+#ifdef CONFIG_EDMAC_RAW_PATCH
+ unpatch_memory((uint32_t) &StartImagePass_x1_SetEDmac);
+ unpatch_memory((uint32_t) &StartImagePass_x5_SetEDmac);
+#endif
#endif
#ifdef CONFIG_ALLOCATE_RAW_LV_BUFFER
If any of you would look at my downloads page you will see the source code I use , It been there from the start !
https://bitbucket.org/reddeercity/magic-lantern_10-12bit/downloads/Crop_Rec-4k-5d2-50d-magic-lantern_1-9-2019.zip
I use waza57 source (and in my posts I state this , if anyone would have cared to read a few)
I have stated many times I work locally and don't work online as I don't know anything about bitbucket , of which I stated
many times also , sorry my work method are unconventional but that's the way I work & is the most comfortable for me .
So if it makes people feel better , I won't post code until I'm done all the presets in a working crop_rec module Well for me I'm almost "done" , after cf card over clocking & lossless I have no more goals .
Ok , can you post your code please
I need to look at the code first before I try it ,
Don't what to brick my camera .
Is it possible to switch the live view on and offNo , that's how video works thought liveview . No liveview no video
No , that's the way it's in crop_rec.mo
... is it possible to change the area of the live view before recording? ......
left middle position is not perfect sometimes.
Thank you so much, we are so waiting for it... Stupid question, but how to adjust that final framerate?
0xc0f00000 Register family
+ 0x00008000 Register base
+ 0x00000008 Register offset
--------------
0xc0f08008 Value
Could you please give us a simple example of how to use this tool using something that you have already tested on the 5D2?
I have a feeling that much of your work on that camera will translate to other Digic 4 cameras.
.......Sure , have to dig it up & refresh my memory .
Could you please give us a simple example of how to use this tool using something that you have already tested on the 5D2? I have a feeling that much of your work on that camera will translate to other Digic 4 cameras.
Thanks!
Reddeercity, I understand you, but how sad it is...Yes , don't worry ;) all that plus a surprise or two
Do you still plan to finish your work with turning 5d2 into a UHD cinema camera and finalize your presets
(including your awesome vertical squeezed preset) and lifeview?
....Oh , something farrrrr better ,
(including your awesome vertical squeezed preset) and lifeview?
Can we see some samples maybe?
The only way to process this is in Adobe After Effect , non of the app on the form do 3x horizontal resolution I've only seen 2x , I did make a request on the mlv app thread
but got no response .
But now back to your request: 3.0x horizontal stretch is there since v1.5. If the file has the right metadata the setup works automatically. If not, you have to setup height stretch factor to 0.33x. MLVApp always upsamples since v1.5, so a height stretch factor of 0.33x is realized as width stretch factor of 3.0x. In older versions you can do this manually for ffmpeg export by entering your desired output resolution (frame is stretched once only on export, so no quality loss). Maybe we should add a information label somewhere, which shows the resolution after stretching.
I will admit that is confusing. @masc could we make it nicer and have it as horizontal 3.0x? Or even allow the user to enter custom value?
Also an shortened MLV would be nice if you could? to test out in MLV App :)
You did get a response...Correct. (Works officially since december 2017 in MLVApp (v0.12), when entering resolution manually.)
I will admit that is confusing. @masc could we make it nicer and have it as horizontal 3.0x? Or even allow the user to enter custom value?I already explained that somewhere else: this is close to impossible because we automate correct stretching in dependency to metadata. Now we set one UI element in dependency to this metadata. Doing it to horizontal stretching would make it far more difficult without advantage. Quite the contrary: when using 1x3 with horizontal stretching + anamorphic lens, it becomes impossible to stretch.
Edit:
I now implemented a label which shows what you'll get.
(https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fi.ibb.co%2FNYtJ5t3%2FBildschirmfoto-2019-03-10-um-11-39-30.png&hash=17bda293e7cd28847d1c38a716ea9ae7)
Tip: if you set metadata in camera correctly, MLVApp shows the right AR automatically, and you also can fast export to DNG with correct AR. Adobe programs show correct AR out of the box then.
How large is the crop factor? I love the high resolution 5x stuff but the closer we can get to full frame with higher rez is obviously desirable.
Tip: if you set metadata in camera correctly, MLVApp shows the right AR automatically, and you also can fast export to DNG with correct AR. Adobe programs show correct AR out of the box then.
@reddeercity:No bug. metadata has to be set in code, so where´s the code?
How did you test? Would be interesting - maybe somewhere are still bugs (I am sure there are).
If you like to see the new resolution label from my screenshot you should compile the latest commit - just pushed the code to the repos for now. But all the resizing should work in v1.5 as described.
No bug. metadata has to be set in code, so where´s the code?+1
There's no new code yet , I'm doing everything though adtg_gui_.mo
Now that should clear up things about code etc. ....
and the 1x3 files display correctly in mlv app when exported to compressed format
Then could we just have the code for the build that can do 3008x1080 resolution?Have you tried this one from first post? https://www.magiclantern.fm/forum/index.php?topic=19336.msg182476#msg182476
i'll PM you the file...Thank you. The metadata is definitively wrong in your file - so it is not set correct in camera. This is how your file looks inside (look at the very right, I marked metadata blue):
Hi reddeercity and guys,
I've made some quick test with experimental release. Followed the steps from p1. I'm facing these issues.
- 5x mode is magenta, when recording turns grayscale, yet crop factor is irrelevant to what it records
- when pressing to 10x mode camera freezes
What preview mode are you using ?
remember this is bleeding edge stuff , sometimes things that
normally work on the nightly builds don't always work on bleeding edge stuff .
crop_rec is only meant to record extended resolutions in 3x crop_mode (5x zoom)
and not to be used with the regular nightly build feature set .
Meaning 10x zoom freezes the camera .
I expect to have normal canon previews in future releases of the crop_rec in 3x crop_mode (5x Zoom)
@reddeercity -- I could use some tips from you on how to get started with Digic Poke to change the resolution.Sorry , I been busy with getting a few projects up and running ( it spring time and warm weather finally has come to the great white north :D)
I don't really see why you merged in to "crop_rec_4k_mlv_snd branch"
I think it's better to work on a clean fork of crop_rec_4k_mlv_snd.
Regarding code from Waza, is it still necessary or a better way to allow digic4 to work on this branch was found?
Edit: just read though the crop_rec code and there's no code for waza57 crop_rec branch
There no reference to 5D2 in the code at all , so I would say it didn't merger any think for waza57 source "crop_rec_4k_5D2 " branch
It works partially but in fact, worse than your March 2-nd build which works very well with all 3 bit depths with sound.
1) I found only the mlv_rec.mo (RAW video (MLV)) in the modules directory. MLV_Lite.mo is missing.
2) Crop preview at all preview modes provides 5x and not 3x magnification.
3) Once started, recording at all 3 bit depths does not stop upon pressing the rec button. You get a red dot and a "stopping" message in the RAW video (MLV) menu and camera freezes. Turning camera off and pulling battery out resolves the issue.
4) In-camera playback does not work any more, not even after adding the raw_twk module.
5) Every mlv file gets recorded with 7 additional M00 through M07 files of 1 kB size each. MLVApp does open and play the files though. Sound works also.
Hoping that some of the other developers may be able to help you with useful hints, I keep my thumbs pressed for further progress on your part.
The 7D has many issues. If I leave the battery in it overnight it wakes up dead--what I mean is that the battery drains even when the camera is turned off. I think this was reported before.
Not sure what you mean by that. Maybe some pictures or video will help show the issue? I do have an issue when going into zoom mode I can't get out of it. Hey, this is highly experimental but I was able to record 233 frames of 2496x1198 10-bit at 24fps on the 7D.
Again--can't reproduce that issue over here.
I never played around much with in-camera playback. @reddeercity's - do you have that working on the 5D2?
Strange, I'm not seeing that either. What happens with mlv_rec is that it often leaves an MLV_REC.TMP file on the card but it doesn't seem to have any negative consequences.
That's why I'm posting on this topic. I'd like to get the crop_rec module working on the 7D (probably hard) and the 50D (probably easier) and maybe other Digic IV cameras.
Now on the 5D2 I'm interested if the crop_rec module is working, it is from waza57's crop_rec_4k_5D2 branch. If it does work it would be interesting to see if reddeercity's crop_rec module works in this build.
If it does work it would be interesting to see if reddeercity's crop_rec module works in this build.
static void raw_lv_disable()
{
// ASSERT(!lv_raw_gain); // dfort - 7D cannot stop recording if this is enabled
lv_raw_enabled = 0;
raw_info.buffer = 0;
Can you make a "fake PR" to your bitbucket to evidence the difference with the main repository?
Is the new branch cleaner compared to what you posted yesterday?
I mean only strictly necessaries (apart lua_fix which is easy to see) to understand difference between crop_rec_4k and 10-12 branch.
This time my camera did reproduce the issue where it wouldn't stop. Found a temporary fix for that.
src/raw.cCode: [Select]static void raw_lv_disable()
{
// ASSERT(!lv_raw_gain); // dfort - 7D cannot stop recording if this is enabled
lv_raw_enabled = 0;
raw_info.buffer = 0;
This issue was still occurring for me on your latest test build - I'm assuming this code was included? This issue does not occur on reddeercity's Feb01 build.
Well it looks like I'm being pushed off my thread.
I have no intention of supporting crop_rec_4k_mlv_snd branch on 5d2
Every good work of software starts by scratching a developer's personal itch (https://opensource.com/article/17/4/itch-to-scratch-model-user-problems).
-- Eric Raymond
I'll be finishing of the crop_rec in "crop_rec_4k_5D2" branch , Sorry it others disagree .
If there too many branches nothing will get done , so I will only help with development on that branch.
As for as other d4 go e.g. 7d, go ahead and use "crop_rec_4k_mlv_snd branch" as I have no interest
in that camera or other d4's any more .
After I have finished code for 5d2 crop_rec then I may consider "crop_rec_4k_mlv_snd branch" but not before .
and that's a big maybe .
Modifying digital dolly to cover the full sensor is possible, but non-trivial (Canon recalibrates the vertical noise correction factors with each video mode reconfiguration, including when shifting the scanned area in x5 zoom mode). By default, Canon code scans a non-centered wide area in x5 zoom mode (3584x1320 usable area on 5D3) and moves it around as you move the focus box - notice a slight pause at certain positions on the screen, when it reconfigures the sensor.
You can, however, try something with the crop_rec_4k experimental build (caveat: requires fiddling)
- load crop_rec and mlv_lite
- set crop_rec preset to full-res LiveView
- reduce the vertical resolution in crop_rec submenu until you get the desired FPS (Target YRES = 1039 will give 23.973 FPS)
- recalibrate the CMOS[1] register to get good and centered image (trial and error)
- enable raw video and digital dolly - now it should cover the full width of the sensor.
If useful, I'll consider adding a full-width 1080p preset to crop_rec (maybe it can be pushed to about 5784x1080 at 23.976 FPS, or it might require slightly lower horizontal resolution).
Side note: the MLV spec also has metadata for 1-pixel increments for digital dolly, but would require special support from the MLV converter.
Let me know of any problems .
Timer"A" (C0F06008)
Timer"B" (C0F06014)
raw resolution (C0F06088)
A1ex gave me great explanation here (https://www.magiclantern.fm/forum/index.php?topic=19336.msg205614#msg205614) after that I understood how it worked :) x1 x5 centered photo description
C0F06084: 0x10036 0x30036 0x10037 start row/column
C0F06088: 0x4F40432 0x46A04BA 0xEDD0B87 stop row/column (column: 1 unit = 2 pixels)
C0F06008: 0x23B023B 0x2770277 0x5DB05DB FPS timer A (1 unit = 4 pixels horizontally)
C0F06014: 0x6D5 0x4FF 0xEDC FPS timer B (1 unit = 1 pixel vertically)
CMOS[1] : 0xC00 0xE6A 0xC00 vertical start/stop
CMOS[2] : 0x40E 0x10E 0x8 horizontal pos & binning mode
CMOS[3] : 0x5 0x5 0x7 ???
CMOS[4] : 0x244 0x244 0x244 ???
CMOS[5] : 0x1 0x1 0xC05 ???
Not sure if you know how to read the raw resolution reg (c0f06088)c0f0713c
c0f07150
There Two ways to explore the poke , manually setting valves in the Valve box and see the results .
Second , set valve in valve box then with half shutter press in liveview...
...you can see the "x++" this increase the valve and you can change that to "x--"
to decrease , still with me ?
It works !!!! Thanks a lot ^^?
is it normal if I can't go to 2880 ? (I am stuck to 2560)
Oh I love this resolution and the quality you get out of the old 5D2. Went out and did some test shots. Most of them look awesome. But some other shots are a bit strange and I don't know why yet. Some colums seems to have right blacklevel, others haven't. After around 50 to 200 frames all strips disappear.
First frame looks like that:
(https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fi.ibb.co%2FdtfvZ35%2FM30-1246-frame-1.png&hash=d28c28c650fa5c33f4a6cd78ddfec4f8)
Frame 90 with same settings:
(https://www.magiclantern.fm/forum/proxy.php?request=https%3A%2F%2Fi.ibb.co%2Fp4XrmKr%2FM30-1246-frame-90.png&hash=88189a3fcf59a54b900b249f6f3acdce)
The black bar on the right should be easily cut somehow?!
And it seems that the frame is not exactly centered on the sensor - it is a bit more on the right, so the left part of the picture is a bit sharper than the right (right is a bit more to the lens corner).
Let me know if you need a shortend MLV for analysis.
...... Is it possible to increase the 1200 pixels in the future or is this really the limit? It's just out of curiosity.Yes (1330) , at the cost of the reduced horizontal resolution -- manly because the sensor is too slow , main clock is 24 MHz
...... what is the best way, according to you, to import those .mlv files into Premiere Pro ?Will it all depends on the computer hardware you have .
(to not loose the raw advantage too much, I don't really know what to do, there are lots of different technics on youtube but I don't know which one to pick :)
Thanks !!!
Thanks @masc & @Igor_Braun for feed back , interesting never happen doing testing
but that what you guys are for :P I think know the issue . I'll post a fixed test build a little tonight .
By the way what was the camera setting?
e.g. ISO , Liveview preview setting, SR memory setting (e.g. 0-4) etc. ...
did you use any Auto setting? e.g. auto ISO or auto WB ?
Where can I see "SR memory settings?"Near the bottom of MLV Raw Video Tab or in the "mlv_rec.cfg" file
# Config file for module mlv_rec (MLV_REC.MO)
mlv.video.enabled = 1
mlv.res.x = 7
mlv.bpp = 0
mlv.aspect_ratio = 17
mlv.write_speed = 6969
mlv.display_rec_info = 2
mlv.buffer_fill_method = 0 *** this is the SRM***
I remember ISO was 1600 (I've tried with 800 also, and in my case the lower I go, the less likely this glitch happens)Ok that's what I'll looking for , High ISO seems to have problem with these experimental builds even the