Author Topic: SRM job memory buffers  (Read 85650 times)

dmk

  • Member
  • ***
  • Posts: 132
Re: SRM job memory buffers
« Reply #25 on: July 06, 2014, 09:24:46 AM »
Very cool, thanks for taking the time to discover this!

Just to fuel excitement, what sorts of features will probably be able to happen with the extra memory that weren't possible before? Just looking forward to the future, not pushing, totally appreciating what you've done so far and curious about what's in store :D

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1474
  • 6d - Nightly build user
Re: SRM job memory buffers
« Reply #26 on: July 06, 2014, 08:09:27 PM »
If I read Alex post from juli 03, it makes no difference for things that use live view, so no memory gain here...(except 30MB extra for the 550d)
If I get it right it seems that live view uses the same amount of memory that is discovered.

Quote from Alex post:
For example, for 550D, in LiveView, you get 75 + 1x31 MB in normal mode, and 43 + 3x31 in factory mode. 30MB extra is not bad, no?
On 5D2, in LiveView, you get 183 + 4x37 in normal mode, and 259 + 2x37 in factory mode (same with jpeg-small). No difference.
On 5D3, you get 163 + 3x39 in normal mode, and 127 + 4x39 in factory mode. No difference.

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: SRM job memory buffers
« Reply #27 on: July 06, 2014, 09:03:00 PM »
If I get it right it seems that live view uses the same amount of memory that is discovered.
nope, some of it used by LV but not all of it, in fact it's not even the majority of it is used by LV, on 60D only 1/4 of SRM is used by LV (we get 186MB extra even in LV)
a1ex is talking about factory mode vs. not factory mode when he says "no difference", he's not talking about LV vs. not LV

I made some quick and dirty changes to mlv_rec to use the new memory interface and I was able to get 30-70% longer recording times (link).

One thing I'll note: when using SRM memory with mlv_rec, "BUSY PLEASE WAIT" is displayed at the top of the screen, however recording works without a hitch. I assume this is because Canon h246 recording wants to use this memory.

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1474
  • 6d - Nightly build user
Re: SRM job memory buffers
« Reply #28 on: July 06, 2014, 09:42:09 PM »
 :o So there's more memory gained with MLV-recording!

Woohoo  :D


g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3147
Re: SRM job memory buffers
« Reply #29 on: July 06, 2014, 11:54:24 PM »
I made some quick and dirty changes to mlv_rec to use the new memory interface and I was able to get 30-70% longer recording times (link).

there are my changes: link (made before alex' updates to mem.c were made)
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

dubarry

  • New to the forum
  • *
  • Posts: 32
Re: SRM job memory buffers
« Reply #30 on: July 07, 2014, 05:56:46 AM »
Hey dmilligan, if you ever get the opportunity I would be very interested to know how many frames you are getting at

1728x736 p24 2.35

This of course is not a priority just if you get the opportunity...let us know.

Rewind

  • Senior
  • ****
  • Posts: 356
Re: SRM job memory buffers
« Reply #31 on: July 07, 2014, 08:00:01 AM »
I want to find these stubs for 650D.
Is there sort of “easy way” to try that?

I mean point me please to some reading about that?

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3565
  • Blunt and to the point

mk11174

  • Contributor
  • Hero Member
  • *****
  • Posts: 809
Re: SRM job memory buffers
« Reply #33 on: July 07, 2014, 10:20:31 AM »
On the 700D now it shows 154MB allocated when I choose to reserve space and before the mem patch it only said 92MB.

And I gain 1 second on 1920x1080@24p, so instead of 1 second it record 2 seconds.

This was the only test I did just to see if it did anything.

I made sure I formated card before each test as well.
500D/T1i  550D/T2i  600D/T3i  700D/T5i

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1474
  • 6d - Nightly build user
Re: SRM job memory buffers
« Reply #34 on: July 07, 2014, 10:25:18 AM »
Hey dmilligan, if you ever get the opportunity I would be very interested to know how many frames you are getting at

1728x736 p24 2.35

This of course is not a priority just if you get the opportunity...let us know.

If you know how much memory is available, you can calculate it yourself, the 60d can write 21MB/s to the SD card, the rest is buffered into the available memory.
Now the resolution you ask for,  takes up, 1728 x 736 x 24(frames/second) x 14(14bit canon raw) / 8 (conversion bits to bytes) /1000000(conversion bytes to MegaBytes) = 53,4 MB/second
1728*736*p24 resolution takes up 53,4 MB/second

I'm not sure how much free memory the 60d has, my guess is about 350MB now ?

That would make 53,4MB/second - 21MB/second(SD card writing speed in canon 60d) = 32,4MB/second that needs to be buffered every second.
350MB / 32,4MB = 11 Seconds of raw video

And after you filled up this memory, it takes up to 350MB/21MB = 17 seconds time to clear/write the complete filled up buffer to the SD card.


mk11174

  • Contributor
  • Hero Member
  • *****
  • Posts: 809
Re: SRM job memory buffers
« Reply #35 on: July 07, 2014, 01:31:46 PM »
I want to find these stubs for 650D.
Is there sort of “easy way” to try that?

I mean point me please to some reading about that?
These are for my 700D
/** SRM JobMem **/
NSTUB(0xFF0E6C78,  SRM_AllocateMemoryResourceFor1stJob)
NSTUB(0xFF0EA848,  SRM_FreeMemoryResourceFor1stJob)

So these should be for your 650D
/** SRM JobMem **/
NSTUB(0xFF0E6AE4,  SRM_AllocateMemoryResourceFor1stJob)
NSTUB(0xFF0EA5B8,  SRM_FreeMemoryResourceFor1stJob)

Don't know the others yet, but all you need to try mlv_rec patch
500D/T1i  550D/T2i  600D/T3i  700D/T5i

Rewind

  • Senior
  • ****
  • Posts: 356
Re: SRM job memory buffers
« Reply #36 on: July 07, 2014, 03:08:55 PM »
Ok, i've added these stubs to stubs.S, applied this patch to the mlv_rec.c and compiled.
Everything went fine, ML loaded ok, module working. But no difference at all with regular mlv_rec.mo.

Am i missing something, additional steps needed? Or may be stubs addresses wrong?

mk11174

  • Contributor
  • Hero Member
  • *****
  • Posts: 809
Re: SRM job memory buffers
« Reply #37 on: July 07, 2014, 03:38:56 PM »
Ok, i've added these stubs to stubs.S, applied this patch to the mlv_rec.c and compiled.
Everything went fine, ML loaded ok, module working. But no difference at all with regular mlv_rec.mo.

Am i missing something, additional steps needed? Or may be stubs addresses wrong?
You have to define it as far as I know, look in the patch for the define, its long, or to test just comment out. Then try.

Also reformat card from camera for both test and see if mlv_rec allocates the 154MB before first recording. If you dont reformat you wont see it because it is already created.
500D/T1i  550D/T2i  600D/T3i  700D/T5i

Rewind

  • Senior
  • ****
  • Posts: 356
Re: SRM job memory buffers
« Reply #38 on: July 07, 2014, 05:35:25 PM »
You have to define it as far as I know, look in the patch for the define, its long, or to test just comment out.

Got it. 154 MiB allocating instead of 92 on 650D.

Oh, by the way, when i enable trace write, i can't find it anywhere on the card. Nothing shows up in console either (when mlv_rec is working). How can i see the debug trace?

dubarry

  • New to the forum
  • *
  • Posts: 32
Re: SRM job memory buffers
« Reply #39 on: July 07, 2014, 05:52:12 PM »
If you know how much memory is available, you can calculate it yourself, the 60d can write 21MB/s to the SD card, the rest is buffered into the available memory.
Now the resolution you ask for,  takes up, 1728 x 736 x 24(frames/second) x 14(14bit canon raw) / 8 (conversion bits to bytes) /1000000(conversion bytes to MegaBytes) = 53,4 MB/second
1728*736*p24 resolution takes up 53,4 MB/second

I'm not sure how much free memory the 60d has, my guess is about 350MB now ?

That would make 53,4MB/second - 21MB/second(SD card writing speed in canon 60d) = 32,4MB/second that needs to be buffered every second.
350MB / 32,4MB = 11 Seconds of raw video

And after you filled up this memory, it takes up to 350MB/21MB = 17 seconds time to clear/write the complete filled up buffer to the SD card.

Thanks for that Levas.  I have found that the numbers often don't translate as black and white as that (considering unknown factors at this stage) but at least it gives me something to dream about.

mk11174

  • Contributor
  • Hero Member
  • *****
  • Posts: 809
Re: SRM job memory buffers
« Reply #40 on: July 07, 2014, 06:38:27 PM »
Got it. 154 MiB allocating instead of 92 on 650D.

Oh, by the way, when i enable trace write, i can't find it anywhere on the card. Nothing shows up in console either (when mlv_rec is working). How can i see the debug trace?
Not sure, I never messed with any of that but gg3g0 would be the best one to ask.
500D/T1i  550D/T2i  600D/T3i  700D/T5i

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3147
Re: SRM job memory buffers
« Reply #41 on: July 07, 2014, 07:48:20 PM »
Oh, by the way, when i enable trace write, i can't find it anywhere on the card. Nothing shows up in console either (when mlv_rec is working). How can i see the debug trace?

you need trace.mo
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

Rewind

  • Senior
  • ****
  • Posts: 356
Re: SRM job memory buffers
« Reply #42 on: July 07, 2014, 07:57:52 PM »
Thank you.
One more impatience question:

May I ask you to give me some help to adopt your mlv_rec patch to raw_rec.mo?
Is it possible to use SRM job memory buffers in raw_rec at all?
This module treats memory differently, and I can't figure that out by myself.


dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: SRM job memory buffers
« Reply #43 on: July 08, 2014, 12:08:18 AM »
With the latest changes that a1ex made to get a mem_suite from SRM, you can actually use SRM the same way both raw_rec and mlv_rec allocate memory using mem_suite. Basically you just need call srm_malloc_suite(0) to get a mem_suite for SRM, and then you can use it the same way as shoot_malloc_suite(0); This is how I did it for mlv_rec it should be basically the same for raw_rec.

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: SRM job memory buffers
« Reply #44 on: July 08, 2014, 12:20:19 AM »
Hey dmilligan, if you ever get the opportunity I would be very interested to know how many frames you are getting at

1728x736 p24 2.35
269 (~11s)

also I managed to get 505 frames (~21s) of 720p (better than the 460 I was getting yesterday)

dubarry

  • New to the forum
  • *
  • Posts: 32
Re: SRM job memory buffers
« Reply #45 on: July 08, 2014, 01:22:48 AM »
wow. I've always thought 10 secs would do for most cases but that 21 secs at 720p is sooo appealing.

And this is exactly what I meant .. why on earth would you be getting more frames (505) fine tuning things I suppose? This is great news.

Thank you for keeping us posted

N/A

  • Hero Member
  • *****
  • Posts: 576
  • Dreaming in 14 bit
Re: SRM job memory buffers
« Reply #46 on: July 08, 2014, 01:30:35 AM »
Who wants to compile this for 7d so I can do some beta testing?  :D
7D. 600D. Rokinon 35 cine. Sigma 30 1.4
Audio and video recording/production, Random Photography
Want to help with the latest development but don't know how to compile?

Rewind

  • Senior
  • ****
  • Posts: 356
Re: SRM job memory buffers
« Reply #47 on: July 08, 2014, 06:27:31 AM »
Need some clues on how to find the CreateMemoryChunk and AddMemoryChunk stubs.
(for 650d rom)

We have this:


It says NSTUB ( 0x8B7C, CreateMemorySuite) in stubs.S, but ROM disassemble starts with ff000000, so how does that make sense? I suspect RAM_OFFSET has to be take into account. A1ex says in tutorial, that it is declared in stubs.S, but it's not the case for 650d. So how do I know my ram offset for particular camera?

for the AddMemoryChunk, i can find many strings like 32(Src,bytes,Unit... , and before them i usually got this:

Does that mean, 8E58 has some relation to AddMemoryChunk start address?

mk11174

  • Contributor
  • Hero Member
  • *****
  • Posts: 809
Re: SRM job memory buffers
« Reply #48 on: July 08, 2014, 02:39:14 PM »


Does this mean it works and the stubs are correct???

Strange that mlv_rec only reports 123MB now and not 154MB after compiling the srm_memory source

When I use the mlv_rec with patch from gg3g0 which he posted a few threads back, I get 154MB in mlv_rec again.

But my SRM Memory still only shows 1x31 does this sound ok?
500D/T1i  550D/T2i  600D/T3i  700D/T5i

mk11174

  • Contributor
  • Hero Member
  • *****
  • Posts: 809
Re: SRM job memory buffers
« Reply #49 on: July 08, 2014, 03:16:04 PM »
Need some clues on how to find the CreateMemoryChunk and AddMemoryChunk stubs.
(for 650d rom)

We have this:


It says NSTUB ( 0x8B7C, CreateMemorySuite) in stubs.S, but ROM disassemble starts with ff000000, so how does that make sense? I suspect RAM_OFFSET has to be take into account. A1ex says in tutorial, that it is declared in stubs.S, but it's not the case for 650d. So how do I know my ram offset for particular camera?

for the AddMemoryChunk, i can find many strings like 32(Src,bytes,Unit... , and before them i usually got this:

Does that mean, 8E58 has some relation to AddMemoryChunk start address?

These are what I have for 700D now and I get working results and 1x31MB
NSTUB(0xFFA651FC - RAM_OFFSET,  CreateMemoryChunk)   //835C      // called from CreateMemorySuite
NSTUB(0xFFA65B88 - RAM_OFFSET,  AddMemoryChunk)        //8CE8      // called before " 32(Src,bytes,Unit)=(%#lx,%#lx,%#lx)" in many places; see also hAddSuite

So this is what you would put for 650D since your RAM-OFFSET is not defined
NSTUB(    0x835C,  CreateMemoryChunk)                      // called from CreateMemorySuite
NSTUB(    0x8CE8,  AddMemoryChunk)                           // called before " 32(Src,bytes,Unit)=(%#lx,%#lx,%#lx)" in many places; see also hAddSuite

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