[ANSWERED] How to get measured ec in M mode?

Started by Marsu42, June 16, 2013, 11:45:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Marsu42

I'd like to copy 400plus' EC on M approach (described here: http://www.magiclantern.fm/forum/index.php?topic=4514.msg49214#msg49214) ...

I had a look at the code, and it's completely different than my, thus my question: How do I get the measured ec in M mode when the user engages metering? Based on that, I then could calculate the required iso and apply ec on m on top of that.

Here's the relevant 400plus code, what I want from ml is this "status.measured_ec" value.


// M mode: set ISO to match exposure
ec = - (status.measured_ec - persist.ev_comp);

// Normalize an apply new ISO
if (ec != EC_ZERO) {
if (settings.autoiso_relaxed)
ec = (ec - 1) / 3;

newiso = DPData.iso + ec;
newiso = CLAMP(newiso, settings.autoiso_miniso, settings.autoiso_maxiso);
newiso = EV_ROUND(newiso);

send_to_intercom(IC_SET_ISO, newiso);

eduperez

0xAF is probably the one who can explain this best, but I will try to throw some light here.

In 400plus, we have intercepted one of the intercommunication queues from the camera, thus our routine sees all the messages that some parts of the firmware send to other parts. One of those messages contains the information about the current exposure: shutter speed, aperture, ..., and the measured exposure compensation; the frequency of this message matches the frequency of updates to the viewfinder.

We store that value into status.measured_ec, and later use it in the AutoISO code.

a1ex

Some cameras report it via AE_VALUE (the same memory location that has exposure compensation).

This is not known on all cameras (neither 5D2 nor 5D3 have it). 60D has it and I remember it was working.

I don't know a portable method for this.

Marsu42

Thank you both for the explanations, that helps a lot for ec on m...

Quote from: a1ex on June 18, 2013, 09:11:57 AM
Some cameras report it via AE_VALUE (the same memory location that has exposure compensation).
This is not known on all cameras (neither 5D2 nor 5D3 have it). 60D has it and I remember it was working.
I don't know a portable method for this.

... so I take it the cameras that don't have a working AE_VALUE simply report it as 0 all the time in M mode? It's a bit strange that the new 5d3 lacks this information since it's one of the newest fw, maybe there's another prop that isn't discovered yet.

It'd be nice when you are browsing through your camera shelf sometime you'd (or someone else in a combined effort) could add this to the platform internals.h that are missing, see this commit (60d/5d3/5d2 already filled in):

https://bitbucket.org/Marsu42/ml-mod1/commits/bf59c45bd4da4232268de17e38860c4718e7ddea

pravdomil

I want to implement auto iso feature for years, but there is no ae_value for 5D2 or 3.

There is small picture how auto iso should work
http://bitbucket.org/pravdomil/ml/downloads/autoiso.png

I hope that somebody will the right code for 5Ds.

pravdomil

by dissasabling ROM1 by IDA i found some subroutine, that may be essential, or not?

ADR     R0, aOutputAeRawDat ; "Output AE RAW Data = %1d\n"
BL      sub_10C08

pravdomil

I try get exposure compensation (lens_info.ae) in M mode, that show over/under exposure but lens_info.ae is always zero.
Some suggestons?

Marsu42

Quote from: pravdomil on July 19, 2013, 08:17:43 PM
I try get exposure compensation (lens_info.ae) in M mode, that show over/under exposure but lens_info.ae is always zero.
Some suggestons?

I take it you solved this problem for 5d2/3 & 6d in your autoexpo module? If so, the code should be merged to the core so all modules can use a working ae in m.


Marsu42

Quote from: pravdomil on July 28, 2013, 09:55:11 PM
https://bitbucket.org/hudson/magic-lantern/pull-request/144/autoexpo-module

Yup, I saw it and I'm already experimenting with it - I just answered here because your question was still open & unanswered.

Thanks for your module, I hope I figure out what it does sooner or later :-> respectively there might be some bugs left so on my 60d it doesn't do what I'd expect it to do, I'll keep trying and report back.