[DONE] 550D raw zebras, histogram, spotmeter & C. port official thread

Started by dlrpgmsvc, May 22, 2013, 12:33:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dlrpgmsvc

Lets concentrate here all our efforts to port raw zebras & C. to 550d !

Current state-of-the-art : all the menus are enabled for raw visualizations of zebras & C., and now they all works correctly, thanks to "xaint" and his invaluable work !
If you think it's impossible, you have lost beforehand

Greg


dlrpgmsvc

On 550d, RAW canon mode, M mode on main dial, luma histogram, ETTR hints ON, use RAW histogram off :




On 550d, RAW canon mode, M mode on main dial, luma histogram, ETTR hints ON, use RAW histogram ON :



Like you can see... no differences and no ETTR hints displayed...

Same scene, same camera parameters, same illumination, same lens

For Greg: make a comparison like mine... and report, please ! Thanks !
If you think it's impossible, you have lost beforehand

xaint

dlrpgmsvc: I think it only works in RGB mode. Am I right?

1%

Raw histo and all that jazz works on 600D and EOS-M too.

Check states in photo mode.

dlrpgmsvc

Quote from: xaint on May 22, 2013, 02:41:14 PM
dlrpgmsvc: I think it only works in RGB mode. Am I right?

I don't know, so I made a test, and it's the same: no difference ! Look here :

NO RAW :


YES RAW:


So, what is the clue here ? Am I not able to use this function correctly or am I not in the correct conditions to run this test (photo mode M and RAW from canon menu and main dial) ?

And where should the ETTR hints appear ? I see none...
If you think it's impossible, you have lost beforehand

dlrpgmsvc

Quote from: 1% on May 22, 2013, 02:50:40 PM
Raw histo and all that jazz works on 600D and EOS-M too.

Check states in photo mode.

Many thanks 1% ! I updated the first status message of this thread including these models !
What means "check states in photo mode" ? Sorry for my question, but if you can explain I can do this check, many thanks 1%  !!!!
If you think it's impossible, you have lost beforehand

dlrpgmsvc

Following the porting hints stated in the beginning of this thread, I can see that all the modifications needed are already there for the 550d, and the #ifdef's about 550d are all there with their parameters. So I think someone putted them with knowledge. Or not ? My dubts are: do it should work for 550d also ? Or they are guess values yet to be fine-tuned ? Or do am I doing something wrong into using raw histogram and the other raw visualizations aids (you can see my tests above to check) ? By dissipating these doubts, you will help me into pointing in the right direction in order to solve this problem, many thanks !  ;)
If you think it's impossible, you have lost beforehand

dlrpgmsvc

Quote from: 1% on May 22, 2013, 02:50:40 PM
Check states in photo mode.

Do you mean the file "state-object.c" inside "src" directory ?
If you think it's impossible, you have lost beforehand

dlrpgmsvc

Whoa ! A little step for a programmer... a giant leap for 550D Magic Lantern !

I managed to enable the RAW HISTOGRAM on 550D !  ;D

The pull request is yet sent and sitting, waiting to be merged in the next nightly build !  :P

If you think it's impossible, you have lost beforehand

1%

QuoteDo you mean the file "state-object.c" inside "src" directory ?
Yep.

zenlenz

Quote from: dlrpgmsvc on May 23, 2013, 05:08:44 PM
I managed to enable the RAW HISTOGRAM on 550D !  ;D

The pull request is yet sent and sitting, waiting to be merged in the next nightly build !  :P


Excellent stuff, dlrpgmsvc  ;D

I look forward to seeing this implemented on the 550D. Many thanks!

Alas, I'm no coder myself. But I have been looking at the DNG bursts, with some sample shots today and the results are amazing, thanks for your work on that too. I hope I'm not sounding too greedy, to wonder how/if you have progressed on the RAW video capabilities as yet? It's kinda ironic that the poll reveals sooo many users of the 550D, yet it seems to be the last to get code ported!

dlrpgmsvc

One question: why, if raw histogram enabled, the live view shows raw histo and then the quick review show the normal histo ? Do this is normal ? Do we must enable some option to have raw histo ALSO on the quick review ? Many thanks in advance for your replies !
If you think it's impossible, you have lost beforehand

dlrpgmsvc

Quote from: zenlenz on May 23, 2013, 05:49:07 PM
I hope I'm not sounding too greedy, to wonder how/if you have progressed on the RAW video capabilities as yet? It's kinda ironic that the poll reveals sooo many users of the 550D, yet it seems to be the last to get code ported!

Unfortunately not, I have not progressed for raw video  :'(
I'm "making my bones" on more simple things like this, just to get aquainted with the system. Then, if no one will port the raw video, I will pass to it... even if I hope someone will port it before waiting for me  ;)

Yes, you are right: it's so ironic and sad your consideration about how many people have a 550D and it's Always the last to be ported... but perhaps all the users in the poll are simply users and not programmers... so ... I'm trying to be their "Robin Hood" coder ! I have surely more followers than for 5DMK3 and company ! This is for sure !  ::)
If you think it's impossible, you have lost beforehand

a1ex

For photo histograms, you need to enable CONFIG_RAW_PHOTO in internals.h (look at 5D2/5D3). Then, you need to intercept the raw image buffer from Canon's state object (this is the task that develops the image). The state machine is just like 5D2 one.

You will also have to guess the photo EDMAC. They are only 32 of them (maybe less). It's likely to be the same as on 5D2.

Then, find the offsets until you get raw zebras aligned correctly (1% knows a program that autodetects those, I did them by trial and error). Be careful with bayer grid alignment (top-left pixel should be red, otherwise you have to skip one line and/or column).

dlrpgmsvc

Quote from: a1ex on May 23, 2013, 06:14:27 PM
Then, you need to intercept the raw image buffer from Canon's state object (this is the task that develops the image). The state machine is just like 5D2 one.

SDS_FRONT3_STATE ? It seems it is this ! I tried to duplicate the 5D2 codes snippets, but nothing... the review histogram is still not raw, but normal... I used 52D as reference like you said
And where I have to put the raw photo EDMAC ? In which file ? Raw.c ? It is already there the 550d edmac for raw photo...
If you think it's impossible, you have lost beforehand

dlrpgmsvc

If you think it's impossible, you have lost beforehand

sutobe

Great work with this!

I only have a question (what the ETTL hints do should be obvious), but I can't really figure out how to read / interpret the RAW histogramm.

So as far as I can think of, it shows the actual exposure values of the RAW, not of what the camera thinks it would be in a JPEG, right?

And what does the brownish-red and grey area in the left quarter of the histogramm mean?

Thanks,
Tobi


Quote from: dlrpgmsvc on May 23, 2013, 05:08:44 PM
Whoa ! A little step for a programmer... a giant leap for 550D Magic Lantern !

I managed to enable the RAW HISTOGRAM on 550D !  ;D

The pull request is yet sent and sitting, waiting to be merged in the next nightly build !  :P


Canon EOS 550D / Canon EF-S 10-22mm 1:3,5-4,5 USM / Canon EF-S 18-55 mm 3.5-5.6 IS / Canon EF-S 55-250mm 4,0-5,6 IS II / Canon EF 50mm 1:1.8 II / Canon Speedlite 430EX II

dlrpgmsvc

Quote from: sutobe on May 25, 2013, 12:51:38 AM
So as far as I can think of, it shows the actual exposure values of the RAW, not of what the camera thinks it would be in a JPEG, right?

And what does the brownish-red and grey area in the left quarter of the histogramm mean?

Thanks,
Tobi

Yes, your first thinking is correct.

For the red area, I think it means: higly underexposed area, and the grey means: warning, this area is moderately underexposed. However i dunno for sure, so I wait for the programmer that implemented  this to confirm my toughts... anyone that knows this, is welcome to knock here ! Many thanks !

What I know for sure is that each vertical line correspond to a 1 Ev value, and this is from the sources comments, so it should be sure !  ;)
If you think it's impossible, you have lost beforehand

sutobe

I forgot to ask about the vertical lines haha. thanks for clarifying this.

@anyone who knows

Still'd like to know what the colored areas on the left mean, thanks ;-)
Canon EOS 550D / Canon EF-S 10-22mm 1:3,5-4,5 USM / Canon EF-S 18-55 mm 3.5-5.6 IS / Canon EF-S 55-250mm 4,0-5,6 IS II / Canon EF 50mm 1:1.8 II / Canon Speedlite 430EX II

xaint

Quote from: dlrpgmsvc on May 23, 2013, 05:51:26 PM
One question: why, if raw histogram enabled, the live view shows raw histo and then the quick review show the normal histo ? Do this is normal ? Do we must enable some option to have raw histo ALSO on the quick review ? Many thanks in advance for your replies !

First thing: sorry for my horrible english :)

I think,i have successfully enabled raw histogram in quick review mode.
Here are the changes i've made: (dlrpgmsvc please check! :D)

in raw.c i've add:


#if defined(CONFIG_550D)
#define RAW_PHOTO_EDMAC  0xc0f04208
#endif


same as 60D.


Then inside the raw_update_params() function
inside the else if (QR_MODE) branch... (for me it's ~309th lines)
right below this:
raw_info.buffer = (void*) raw_buffer_photo;

added:

#ifdef CONFIG_550D
raw_info.buffer = (void*) shamem_read(RAW_PHOTO_EDMAC);
#endif
 

again: same as 60D

Then below these, where we need to define the Raw buffer size for photos ( below the long commented thing :) )
i've added:


#if defined(CONFIG_550D)
width = 5344;
height = 3516;
skip_left = 142;
skip_right = 0;
skip_top = 50;
#endif


same as 60D i guess, but i'm not sure, I'll look into it now...


Thats it, dlrpgmsvc please check if it's working to you or not...
If so, then you can change the "Current state-of-the-art:" :)

With these modifications i can see the raw histogram in Quick Review mode:

LiveView:


Quick Review:


It's working without LiveView too.

dlrpgmsvc

@Xaint : Great ! Now I put on your modifications and I will check it throughly ! Then I will report here my confirmations ! Many thanks Xaint !  :D
If you think it's impossible, you have lost beforehand

dlrpgmsvc

@Xaint: You went so close to the solution but... we have only a little problem when we reach some overexposures in some channels: the liveview raw histogram, in this case, differ from the quick review histogram, but not on the graph, but on the indications, and here are the differences:

[1] The ETTR hint is different
[2] The background red area extension is different
[3] The overexposure circles are different (well... in the quickreview there aren't at all)

See this for reference :

LIVEVIEW


QUICKREVIEW


We are so close ! Compliments anyway ! Do you have an idea on where to make modifications for this little problem ? I'm searching also... the first who arrive at a solution, knocks here !  ;)  Many thanks again !!  ;)
If you think it's impossible, you have lost beforehand

xaint

First we need to find even more correct values for this:


#if defined(CONFIG_550D)
width = 5344;
height = 3516;
skip_left = 142;
skip_right = 0;
skip_top = 50;
#endif


because as i said it was just a guess :)
btw i'm on it :)

dlrpgmsvc

I found that this code you added :

#ifdef CONFIG_550D
raw_info.buffer = (void*) shamem_read(RAW_PHOTO_EDMAC);
#endif

Is not needed at all... it don't solve our problem, however we clean out the code a bit...
If you think it's impossible, you have lost beforehand