Author Topic: CMOS/ADTG/Digic register investigation on ISO  (Read 786981 times)

ItsMeLenny

  • Hero Member
  • *****
  • Posts: 928
  • 550D
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #375 on: February 15, 2014, 10:36:20 AM »
Open the source code for the modified adtg_gui (not the repo one, but the one from this thread) and look for "engio", you'll find them right away (some cameras have them, others don't).
Ah!

And maybe it's drop box or my internet, but I go to the link for "adtg_gui.c" and the page just hangs loading. So I might have to wait til tomorrow.

(Not an excuse, that actually happens. So I will do it tomorrow, as I would like to see this tstop issue dead.)

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #376 on: February 15, 2014, 10:37:22 AM »
Try right click, save as.

ItsMeLenny

  • Hero Member
  • *****
  • Posts: 928
  • 550D
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #377 on: February 15, 2014, 10:37:58 AM »
The ones that don't, they just need to be found?

The ones missing the stub,

500D, 550D, EOSM, 600D, 650D, 700D

Well I'm on 550D. But it says:
check if adtg_gui.c has engio stubs for your camera (if not, copy them from platform stubs, compile it and post the diff)

ItsMeLenny

  • Hero Member
  • *****
  • Posts: 928
  • 550D
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #378 on: February 15, 2014, 10:39:58 AM »
Try right click, save as.

Oh that worked.

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #379 on: February 15, 2014, 10:41:05 AM »
Here is the stub for 550D.

NSTUB(0xff1c15cc, _engio_write)

I'll sort the other cameras out and submit a patch to a1ex.

ItsMeLenny

  • Hero Member
  • *****
  • Posts: 928
  • 550D
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #380 on: February 15, 2014, 10:44:41 AM »
Here is the stub for 550D.

NSTUB(0xff1c15cc, _engio_write)

I concur.

Thanks for looking it up though.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #381 on: February 15, 2014, 10:45:05 AM »
Just do like ayshih did here:

For adtg_gui.mo, I've tested adding the DIGIC hooks for the 50D by grabbing the addresses from stubs.S, and they appear to work fine.  I can see registers such as SaturateOffset (0xc0f0819c) , and I can still see ADTG registers (which is mentioned in a comment as an issue for the 5D Mark II).

Code: [Select]
    else if (streq(camera_model_short, "50D")) // http://www.magiclantern.fm/forum/index.php?topic=6751.msg63322#msg63322
    {
        ADTG_WRITE_FUNC = 0xFFA11FDC;
        CMOS_WRITE_FUNC = 0xFFA12190;
        ENGIO_WRITE_FUNC = 0xFF97D904;  // from stubs
        ENG_DRV_OUT_FUNC = 0xff97d794;
    }

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #382 on: February 15, 2014, 10:54:09 AM »
Added missing stubs:

https://bitbucket.org/Audionut/zebras/commits/8779a5fa91ed4750268087d104bbf80b646a5a5c


Where do you find the CMOS/ADTG registers?

ItsMeLenny

  • Hero Member
  • *****
  • Posts: 928
  • 550D
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #383 on: February 15, 2014, 11:15:01 AM »
I have compiled ML before with no problems.
And I have just gone to compile it and I get this error.
Code: [Select]
mem.o: In function `GetMaxRegionForAllocateMemory':
mem.c:(.text+0x168): undefined reference to `GetSizeOfMaxRegion'
collect2: error: ld returned 1 exit status
make: *** [magiclantern] Error 1


But also!!!
what is: requires CONFIG_GDB=y

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #384 on: February 15, 2014, 11:20:37 AM »
Need to find the stub for GetSizeOfMaxRegion and add it to stubs.S
I have no idea how to do that.


Enable CONFIG_GDB in the makefile.

ItsMeLenny

  • Hero Member
  • *****
  • Posts: 928
  • 550D
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #385 on: February 15, 2014, 11:23:56 AM »
Oh and, compiling the module, (as I wasn't actually doing that), spits out this:

Code: [Select]
/hudson-magic-lantern-1d65c42c0448/modules/adtg_gui$ makeabort: no repository found in '/hudson-magic-lantern-1d65c42c0448/modules/adtg_gui' (.hg not found)!
REBUILDING
[ README   ]   module_strings.h
Traceback (most recent call last):
  File "../readme2modulestrings.py", line 111, in <module>
    last_change_date, last_changeset, author, commit_msg = last_change_info.split("\n")
ValueError: need more than 2 values to unpack
make: *** [module_strings.h] Error 1

PS. I think I give up

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #386 on: February 15, 2014, 11:40:30 AM »
Can you compile other modules?

The module build system extracts some info from the mercurial repository.

LebedevRI

  • New to the forum
  • *
  • Posts: 20
  • darktable dev
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #387 on: February 15, 2014, 11:52:38 AM »
5D3.113

ISO: https://www.dropbox.com/s/ltxk0117up6eb9h/iso.log
Aperture(f/2.8 ... f/8): https://www.dropbox.com/s/c59d874jibzw7bw/av.log
(Is shutter log needed?)

Will do same for 550D when stub for GetSizeOfMaxRegion is added.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #388 on: February 15, 2014, 12:04:16 PM »
I already have the 5D3 graphs, but being able to cross-check the data never hurts.

Added 550D GetSizeOfMaxRegion from mk11174.

LebedevRI

  • New to the forum
  • *
  • Posts: 20
  • darktable dev

Marsu42

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
  • 66d + flashes
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #390 on: February 17, 2014, 07:07:46 PM »
Dear Mr. Developer Sir, any chance of getting "re-cr2.exe" to change the [edit: white point] in a cr2 (from whatever it was) to a standard acr, or dcraw?

OSS raw converters might be modified to work with mini_iso unorthodox [edit: white point] values, but acr surely won't so not having to decide for one way or another while shooting but being able to convert would lift a huge burden from simply photogs' minds :-o

Next to that, forcing any Canon-changed [edit: white point] to the fixed acr value might be nice anyway, because since I know about this I better understand how acr deals with highlight recovery (or, more to the point, doesn't).

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #391 on: February 17, 2014, 07:10:23 PM »
What are you talking about?

None of these tweaks can be used to change WB.

Marsu42

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
  • 66d + flashes
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #392 on: February 17, 2014, 07:21:41 PM »
What are you talking about? None of these tweaks can be used to change WB.

Sorry, just came back from a day crawling around photographing wildlife :-p ... I'm of course talking of the white level, the thingy you can set to various values by newer versions of your mini_iso module.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #393 on: February 17, 2014, 07:26:03 PM »
Convert them to DNG and use exiftool if needed. There are no white level tags on the CR2.

I believe Canon autodetects it somewhat like raw_diag does.

Marsu42

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
  • 66d + flashes
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #394 on: February 17, 2014, 07:29:24 PM »
Convert them to DNG and use exiftool if needed. There are no white level tags on the CR2.

Well, I was thinking of converting the *data* (that's what you do with mini_iso?) so the cr2 can be used with the new white point.  Is tagging the dng with the acr white point the same thing, what's the exact tag? Thanks for any info.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #395 on: February 17, 2014, 07:31:07 PM »
exiftool foobar.dng -BlackLevel=64 -WhiteLevel=15000

IliasG

  • Member
  • ***
  • Posts: 124
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #396 on: February 19, 2014, 04:35:32 AM »
Convert them to DNG and use exiftool if needed. There are no white level tags on the CR2.

I believe Canon autodetects it somewhat like raw_diag does.

With exitool on CR2s you can try
-Canon:PerChannelBlackLevel  (needs four values)
-Canon:NormalWhiteLevel
-Canon:SpecularWhiteLevel
-Canon:LinearityUpperMargin

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #397 on: February 19, 2014, 06:56:07 AM »
Thanks, but...

exiftool foobar.CR2 -Canon:NormalWhiteLevel=1234
Warning: Tag 'NormalWhiteLevel' does not exist

IliasG

  • Member
  • ***
  • Posts: 124
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #398 on: February 19, 2014, 12:18:56 PM »
Does not exist ? for which model do you take this ?. Any sample available ?.

http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Canon.html#ColorData7

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: CMOS/ADTG/Digic register investigation on ISO
« Reply #399 on: February 19, 2014, 12:27:04 PM »
5D2 and 5D3. There are many samples on the forum (e.g. in the dual ISO thread).