Author Topic: 550D/T2i raw video recording port official thread  (Read 749654 times)

xaint

  • New to the forum
  • *
  • Posts: 46
Re: 550D raw video recording port official thread
« Reply #325 on: June 01, 2013, 06:30:35 PM »
I recommend keeping the classic boot method (I prefer to avoid cache hacks if possible); in theory, all you have to do is to adjust this:

BTW, my plan is to keep ML slim and load things on demand, rather than just making it bigger and bigger.

Oh a1ex, just in time with the simpler solution! :D

Loading things on demand is a good idea.

As i understand, you mean that almost every in-camera functions is just a module?  Like: RAW video feature will always be in the Movie menu, and when the user enabe it, then ML loads the raw_rec module in the background automatically. Right?
(Sorry for my english :| )

changing back to the classical mode btw..

mk11174

  • Contributor
  • Hero Member
  • *****
  • Posts: 809
Re: 550D raw video recording port official thread
« Reply #326 on: June 01, 2013, 06:36:52 PM »
I recommend keeping the classic boot method (I prefer to avoid cache hacks if possible); in theory, all you have to do is to adjust this:
Interesting! I went back to original source with no cache hack and just adjusted the restart and it all loads and works fine, just 1 stupid address in one file all this time is all we needed, geeez 8[

note, available bin memory only say 512, not 640 with cache hack, but it still boots and loads everything.

where was our hero Alex all this time?
500D/T1i  550D/T2i  600D/T3i  700D/T5i

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12241
  • Maintenance mode
Re: 550D raw video recording port official thread
« Reply #327 on: June 01, 2013, 06:49:00 PM »
What I'm imagining is something like this: modules should be only a backend thingie (for better code organization and memory management), and they should be loaded on demand when you enable stuff in menu. When you no longer need say raw video, you disable raw video from menu, and the module gets unloaded automatically.

Also for backend functionality, not just for menus: say you want to record wav files - whenever you call WAV_Record, it loads the module if it's not already loaded, then records. After recording finishes, the module gets unloaded.

This will be required for TCC scripts. TCC engine is quite big, and now it's included in autoexec because it's used for module loading. We have to strip the compiler (which is big) and keep the elf loader part (small). Then, we'll load the compiler on demand whenever you would want to run a script.

If you never run scripts, the compiler will never get loaded and you have the resources free for whatever you are doing.

Also, for a stripped-down ML, you will just disable certain modules or delete them, and this will also declutter the menu.

Once we have a slim module loading engine (ppluciennik is working on it) and a working unload mechanism, we can enable these in main nightly builds.

In the long run: this will allow us to add big stuff to ML (think about OpenCV image processing or whatever) without worrying about memory being almost full. Also, modules are a bit like executables, so third parties will be able to add functionality without requiring us to include it in the official builds.

hammermina

  • New to the forum
  • *
  • Posts: 46
Re: 550D raw video recording port official thread
« Reply #328 on: June 01, 2013, 06:50:10 PM »
tried exfat no speedimprovment on this...

deleted.account

  • Member
  • ***
  • Posts: 154
Re: 550D raw video recording port official thread
« Reply #329 on: June 01, 2013, 07:02:33 PM »
speed improvement?? What's that? Greater than 24fps? :-)

exfat is about greater than 4GB files for ML anyways, also other features, although I maybe wrong. :-)

V1t0

  • New to the forum
  • *
  • Posts: 2
Re: 550D raw video recording port official thread
« Reply #330 on: June 01, 2013, 07:03:36 PM »
One of 40 Frame shooted in RAW with  Magic Lantern in 550D at 1600x602 with a transcend SDHC 16GB class 10, to have a continuous video stream I had to use 960 x 360.
i need to find a faster SD to test the maximum continuos quality  :D
Just one crash when out of habit I used extended zoom to focus in RAW recording mode  ;)


mk11174

  • Contributor
  • Hero Member
  • *****
  • Posts: 809
Re: 550D raw video recording port official thread
« Reply #331 on: June 01, 2013, 07:08:23 PM »
Not sure if it just me, but I am having best luck with this version of just changing the restartstart address and not using cache_hack, everything is from updated main repo source except raw_rec module and the address in the makefile for restartstart.

http://www.mediafire.com/download/plw6zywq4zr5wq4/ML_Mem_All_Fix.zip

960x480 seems to record without skip 1st try everytime.

When I use cache hack version, it skips first try.
500D/T1i  550D/T2i  600D/T3i  700D/T5i

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12241
  • Maintenance mode
Re: 550D raw video recording port official thread
« Reply #332 on: June 01, 2013, 07:10:25 PM »
You must update *addr_AllocMem_end and ml_reserved_mem; otherwise, Canon code will overwrite ML sooner or later and you'll wonder what's going on.

xaint

  • New to the forum
  • *
  • Posts: 46
Re: 550D raw video recording port official thread
« Reply #333 on: June 01, 2013, 07:19:40 PM »
You must update *addr_AllocMem_end and ml_reserved_mem; otherwise, Canon code will overwrite ML sooner or later and you'll wonder what's going on.

Ok, i did it, i updated  *addr_AllocMem_end and ml_reserved_mem, but it shows ~2500 K free mem for AllocateMemory.

I think this is not good :)



What should I do?

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12241
  • Maintenance mode
Re: 550D raw video recording port official thread
« Reply #334 on: June 01, 2013, 07:37:01 PM »
Code: [Select]
// mov r1, #13631488  ; 0xd00000  <-- end address
// mov r0, #3997696   ; 0x3d0000  <-- start address
// hex(0xd00000 - 640*1024) => new end address is 0xc60000

#define MOV_R1_0xC60000_INSTR 0xE3A018C6 // mov r1, 0xc60000

// change end limit to 0xc60000 => reserve 640K for ML
*addr_AllocMem_end = MOV_R1_0xC60000_INSTR;
ml_reserved_mem = 640 * 1024;

RESTARTSTART    = 0xC60100

Works for me, all checks OK.

mk11174

  • Contributor
  • Hero Member
  • *****
  • Posts: 809
Re: 550D raw video recording port official thread
« Reply #335 on: June 01, 2013, 07:57:38 PM »
Code: [Select]
// mov r1, #13631488  ; 0xd00000  <-- end address
// mov r0, #3997696   ; 0x3d0000  <-- start address
// hex(0xd00000 - 640*1024) => new end address is 0xc60000

#define MOV_R1_0xC60000_INSTR 0xE3A018C6 // mov r1, 0xc60000

// change end limit to 0xc60000 => reserve 640K for ML
*addr_AllocMem_end = MOV_R1_0xC60000_INSTR;
ml_reserved_mem = 640 * 1024;

RESTARTSTART    = 0xC60100

Works for me, all checks OK.
Gotcha, thanks
500D/T1i  550D/T2i  600D/T3i  700D/T5i

mk11174

  • Contributor
  • Hero Member
  • *****
  • Posts: 809
Re: 550D raw video recording port official thread
« Reply #336 on: June 01, 2013, 08:09:59 PM »
After Alex's final note, here is the updated version that gives us 640K

http://www.mediafire.com/download/bmxuj7uobt7fudi/ML_Mem_All_Fix2.zip
500D/T1i  550D/T2i  600D/T3i  700D/T5i

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12241
  • Maintenance mode
Re: 550D raw video recording port official thread
« Reply #337 on: June 01, 2013, 08:25:07 PM »
Memory map (first 512MB):



If we find out how to recover the blue segments, it should work a lot better. Right now it's only using the green ones.

mk11174

  • Contributor
  • Hero Member
  • *****
  • Posts: 809
Re: 550D raw video recording port official thread
« Reply #338 on: June 01, 2013, 08:45:04 PM »
Guess I did it right, mine matches yours  :D



500D/T1i  550D/T2i  600D/T3i  700D/T5i

deleted.account

  • Member
  • ***
  • Posts: 154
Re: 550D raw video recording port official thread
« Reply #339 on: June 01, 2013, 09:30:07 PM »
With this latest build, not noticed it before, maybe it was there but resolution and aspect ratio don't seem to work correctly, if you set resolution and then aspect ratio, resolution changes but it doesn't change to suit dialed in aspect ratio but instead gives in brackets (almost whatever:1) which is different to aspect ratio chosen.??

So default is 1024x576 aspect ratio 16:9 both aspect ratio chosen and AR in brackets match, but then change AR to 2.39:1 in the raw menu, resolution changes to 1024x432 and in brackets 1024x432 (2.37:1), change AR in menu to 2.35:1, resolution changes to 1024x448 in brackets below 1024x448 (almost 2.29:1)

Confused.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12241
  • Maintenance mode
Re: 550D raw video recording port official thread
« Reply #340 on: June 01, 2013, 09:39:45 PM »
You can only choose resolutions multiple of 64x32 or 128x16, for speed reasons. See http://www.magiclantern.fm/forum/index.php?topic=5839.msg42968#msg42968

I can remove this restriction and keep the write speeds, but this requires changing the file format and the converter.

xaint

  • New to the forum
  • *
  • Posts: 46
Re: 550D raw video recording port official thread
« Reply #341 on: June 01, 2013, 10:00:28 PM »
Quick test shot (1200x400 23.976)
SanDisk Extreme Pro 16GB 95Mb/s


1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: 550D raw video recording port official thread
« Reply #342 on: June 01, 2013, 10:02:12 PM »
Don't. The restriction is good, write speeds have improved.  I have a card writing 32MB now.

Good that copy and restart method can use 640K too...

For cache hacks you needed to patch boot-hack.c to patch the start also. When properly done allocate mem goes down in the memory menu (600D/EOSM/6D). 6D had broken wifi/tethering till this was discovered

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12241
  • Maintenance mode
Re: 550D raw video recording port official thread
« Reply #343 on: June 01, 2013, 10:29:49 PM »
Quote
Don't. The restriction is good, write speeds have improved.  I have a card writing 32MB now.

I mean, remove the multiple restriction, but keep the improved write speed. You gain smaller frame sizes, no wasted pixels. For this I need to add some padding for each FIO_WriteFile to round it to 512K, but the converter must know about this somehow, so it will be done on next major file format change.

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: 550D raw video recording port official thread
« Reply #344 on: June 01, 2013, 10:50:14 PM »
Heh, you just made me thing of something... probably no point in patching start address if there is no dword or subtraction.. 'doh. Have to investigate this as I have some initial record issues on 600D. Either way I'm subtracting right now from the start address, shouldn't be.

Yup... hahah it was wrong, only need to modify it if its sub r0, r1, total.. not patch start address to start earlier.... the more you know. Wheaties for breakfast  :-[

deleted.account

  • Member
  • ***
  • Posts: 154
Re: 550D raw video recording port official thread
« Reply #345 on: June 02, 2013, 12:57:37 AM »
You can only choose resolutions multiple of 64x32 or 128x16, for speed reasons. See http://www.magiclantern.fm/forum/index.php?topic=5839.msg42968#msg42968

I can remove this restriction and keep the write speeds, but this requires changing the file format and the converter.

Thanks, I thought there must be a technical reason, hadn't considered it was a mod16 thing, even though well aware of it and that the 550D is 1920x1088.  :-[

deleted.account

  • Member
  • ***
  • Posts: 154
Re: 550D raw video recording port official thread
« Reply #346 on: June 02, 2013, 01:10:39 AM »
Quick test shot (1200x400 23.976)
SanDisk Extreme Pro 16GB 95Mb/s

xaint, looks good but was that shot in Photo mode? The metadata for the .mp4 says 1920x640 at 30fps? mediainfo and VLC concurr.

Regarding photo mode, I seem to get more resolution, without failing, but guess something else is going on. I have fps override on at 24.000 exact and manual lens.

shawnwytch

  • New to the forum
  • *
  • Posts: 28
Re: 550D raw video recording port official thread
« Reply #347 on: June 02, 2013, 03:05:52 AM »
Great work with all new improvements

Chagalj

  • New to the forum
  • *
  • Posts: 9
Re: 550D raw video recording port official thread
« Reply #348 on: June 02, 2013, 09:16:35 AM »
Just wanted to support all the developers on this 550D port. Not everyone is capable of buying RED camera or 5DMk3, the possibility to record in such quality on our 550d is real inspiration. Thank you all!

xaint

  • New to the forum
  • *
  • Posts: 46
Re: 550D raw video recording port official thread
« Reply #349 on: June 02, 2013, 10:19:12 AM »
xaint, looks good but was that shot in Photo mode? The metadata for the .mp4 says 1920x640 at 30fps? mediainfo and VLC concurr.

Regarding photo mode, I seem to get more resolution, without failing, but guess something else is going on. I have fps override on at 24.000 exact and manual lens.

Nope, i think it was in movie mode (1920 24fps), fps override on at 24.000. I think it is just wrong comp settings in After Effects. I hurried..
(so actually you see the things a little bit faster than it was :D)