Author Topic: Magic Lantern Cinema Camera - Dual ISO without aliasing & without quality loss!  (Read 22913 times)

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5919
Thanks for info. Initially I used these numbers(check numbers below) in adtg_gui and it will look nice without stripes
Adding the very same numbers in crop_rec.c will give a distorted image with heavy lines:
Here is what comes out with only one set of registers(distortion):
https://bitbucket.org/Dannephoto/magic-lantern/downloads/short_M17-1700.MLV

Both sets of registers as shown below through adtg_gui
MLV file here(proof of concept, still an amplified line in the middle):
Lower white level in post to around 3500 and image comes back.
https://bitbucket.org/Dannephoto/magic-lantern/downloads/short_M17-1723.MLV

adtg2
8882   0x45
8884   0x48
8886   0x49
8888   0x48

adtg4
8882   0x47
8884   0x45
8886   0x45
8888   0x48


Not having my camera with me but will try to add the missing register 21 in there later and see if it behaves the same as when doing changes in adtg_gui. The issue here is that if I only change the adtg2 registers it looks only half done so keeping lowering adtg4 will end up with reduced bitrate behaving the same as you suggest on your 6D. Will try your suggestion of course later Levas.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5919
Wow! Absolutely working now:
1920x2400 23.976fps.
Effectively 1920x799(might have to skip top 60 as before, noticed black bar at the top image)

Test files:
Import them to Mlv App and set white level to 3000 both the dualiso and non dualiso file. Really great looking footage.
https://bitbucket.org/Dannephoto/magic-lantern/downloads/short_M18-1109.MLV
https://bitbucket.org/Dannephoto/magic-lantern/downloads/short_M18-1110.MLV
https://bitbucket.org/Dannephoto/magic-lantern/downloads/short_M18-1111.MLV


This:
Code: [Select]
adtg_new[13] = (struct adtg_new) {6, 0x8882, 45};
                adtg_new[14] = (struct adtg_new) {6, 0x8884, 48};
                adtg_new[15] = (struct adtg_new) {6, 0x8886, 49};
                adtg_new[16] = (struct adtg_new) {6, 0x8888, 48};

adtg_new[17] = (struct adtg_new) {6, 0x8882, 47};
                adtg_new[18] = (struct adtg_new) {6, 0x8884, 45};
                adtg_new[19] = (struct adtg_new) {6, 0x8886, 45};
                adtg_new[20] = (struct adtg_new) {6, 0x8888, 48};

and this:
Code: [Select]
    /* expand this as required */
    struct adtg_new adtg_new[21] = {{0}};

Thanks a lot for feedback!

reduced bitrate files:

non dualiso


dualiso


non dualiso




squig

  • Hero Member
  • *****
  • Posts: 518
  • Crash test dummy MK3
Got a build I can have a play with?

togg

  • Senior
  • ****
  • Posts: 401
Some progress:
Dualiso MLV:
https://bitbucket.org/Dannephoto/magic-lantern/downloads/short_M17-1448.MLV

1920x2368 after 0.33 set in Mlv App we got 1920x789(not bad)



This was achieved after step by step "schooling" from Bilal. Register settled like so after tested in adtg_gui:
 
Code: [Select]
   switch (reg)
    {
        case 0xC0F0713c:
            return 0x97e;
       
        case 0xC0F06804:
            return 0x97e011b;


        case 0xC0F06008:
        case 0xC0F0600C:
            return 0x1800180;

        case 0xC0F06010:
            return 0x180;

        case 0xC0F06014:
            return 0xa27;

    }

Code: [Select]
cmos_new[1] = 0x280;
So this will work with fps 23.976 if I remember correctly and 1920x2368. Now question is if there are more variables/registers to include to go even higher?

Impressive, nice aspect ratio already.

Is this continuous? How many MB/s?

masc

  • Contributor
  • Hero Member
  • *****
  • Posts: 1371
Test files:
Import them to Mlv App and set white level to 3000 both the dualiso and non dualiso file. Really great looking footage.
https://bitbucket.org/Dannephoto/magic-lantern/downloads/short_M18-1109.MLV
https://bitbucket.org/Dannephoto/magic-lantern/downloads/short_M18-1110.MLV
https://bitbucket.org/Dannephoto/magic-lantern/downloads/short_M18-1111.MLV

Thanks a lot for feedback!
Hm... loaded M18_1111.MLV and got a lot of vertical stripes. Correction makes it even worse. Your clips from yesterday were cleaner...
5D2.212 | EOSM.202

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5919
Yes, found them also. Didn't mess with with analog gain numbers yesterday. A1ex points out these registers are to be tweaked for stripes so one idea is that maybe it could be fine tuned with even more passes. Might be talking out of my famous ass here but would be worth a try if no one opposes :).

@togg
With reduced gain I could film a lot longer. Lowering vertical resolution a bit and went continuos.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5919
Stripe free @masc!
Set them uniform as suggested by Bilal and clean now:
https://bitbucket.org/Dannephoto/magic-lantern/downloads/short_M18-1314.MLV
https://bitbucket.org/Dannephoto/magic-lantern/downloads/short_M18-1315.MLV



Code: [Select]
adtg_new[13] = (struct adtg_new) {6, 0x8882, 46};
                adtg_new[14] = (struct adtg_new) {6, 0x8884, 46};
                adtg_new[15] = (struct adtg_new) {6, 0x8886, 46};
                adtg_new[16] = (struct adtg_new) {6, 0x8888, 46};

adtg_new[17] = (struct adtg_new) {6, 0x8882, 46};
                adtg_new[18] = (struct adtg_new) {6, 0x8884, 46};
                adtg_new[19] = (struct adtg_new) {6, 0x8886, 46};
                adtg_new[20] = (struct adtg_new) {6, 0x8888, 46};

theBilalFakhouri

  • Contributor
  • Senior
  • *****
  • Posts: 354
..so if one is going to implement stripe correction directly in the camera, these are the registers that will have to be touched.

Why we want to do that if there are no vertical stripes anymore when using uniformed values  :-\ ?
700D 1.1.5 | no more ISOless LV err 8

masc

  • Contributor
  • Hero Member
  • *****
  • Posts: 1371
5D2.212 | EOSM.202

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5919
Why we want to do that if there are no vertical stripes anymore when using uniformed values  :-\ ?
Could it be that easy  :o

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5919
Here is a version to test:
https://bitbucket.org/Dannephoto/magic-lantern/downloads/magiclantern_crop_rec_4k_mlv_snd_1x3_10bit.zip

Branch here:
https://bitbucket.org/Dannephoto/magic-lantern/branch/crop_rec_4k_mlv_snd_1x3_10bit

1 - Only useful with 1x3_10bit binning mode. You select 1x3_10bit binning in Crop mode menu. Set resolution so you get 1920x2368. Canon fps menu set to 24 frames per second.
Reason. I redefined white level to 3000 in raw.c. This due to not knowing how to create a crop_rec.h header file so raw.c don´t know what´s going on in crop_rec. Can´t make exceptions here yet. The win here is that full res preview will ook ok and mlv files will have correctly white level 3000 coming out of the camera.
Recommened to import the files in Mlv app. Set Transformation Height stretch to 0.33 if not already when imported.

2 - Liveview will look a little distorted. Strange colors and a little stripy but MLV will look beautiful hopefully.
Reason. I compensate darkened liveview with digital gain trick. A1ex idea of course. Bilal handed me the register:
Code: [Select]
/* correct liveview brightness */
case 0xC0F42744: return 0x4040404;

Happy testing. Please report bugs and good stuff too. sound should work too but as this is bleeding edge a lot of stuff could happen. Use and play with this at own free will.
Thanks again to A1ex, Bilal, Levas, Mlv App gang and others for great energy and open sourcery...

Oh yea, very special thanks to Bilal. Without his patience nothing.



Decided to run these analog gain numbers:
Code: [Select]
                adtg_new[14] = (struct adtg_new) {6, 0x8884, 40};
                adtg_new[15] = (struct adtg_new) {6, 0x8886, 40};
                adtg_new[16] = (struct adtg_new) {6, 0x8888, 40};

adtg_new[17] = (struct adtg_new) {6, 0x8882, 40};
                adtg_new[18] = (struct adtg_new) {6, 0x8884, 40};
                adtg_new[19] = (struct adtg_new) {6, 0x8886, 40};
                adtg_new[20] = (struct adtg_new) {6, 0x8888, 40};

Levas

  • Contributor
  • Hero Member
  • *****
  • Posts: 1477
  • 6d - Nightly build user
Noticing one tiny thing:

You're doing this for clean dual-iso...so for dynamic range...
In order to get good recording times, your lowering analog gain registers to mimic 10 bit output.

Do you get the contradiction, dual-iso and 10 bit  ;D

But 10 bit dual-iso is probably still better then normal 14 bit I guess  8)

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5919
Doing it for continuous action and dualiso. Nothing more depressing than early stops ;)
But hey. Maybe nothing or very little gained here. Wouldn't be the first time that happens  :P

theBilalFakhouri

  • Contributor
  • Senior
  • *****
  • Posts: 354
I don't think it's so much difference, the data that you will loss in 10-bit at 100 iso, it can be restored when using 100/800 Dual ISO .. depending on my real world tests also :D

Updated first to post to try 1x3 Binning in 700D, 6D and 5D3 .
700D 1.1.5 | no more ISOless LV err 8

IDA_ML

  • Hero Member
  • *****
  • Posts: 646
Doing it for continuous action and dualiso. Nothing more depressing than early stops ;)
But hey. Maybe nothing or very little gained here. Wouldn't be the first time that happens  :P

Danne,

I disagree. Can't you go even further with vertical resolution at 1x3, to say 1920x3240, so that the final result is Full HD (1920x1080)?  Don't worry about early stops.  These can be eliminated with somewhat lower fps for now and possibly card spanning in the near future.  Why am I asking?  The idea here is to use almost the full sensor area for a crop factor of 1,0 at 16:9 aspect ratio and get the advantage of 14-stops dynamic range (Dual ISO) in aliasing free RAW video.  This will blow the 5D3 out of the water and turn it into one of the best 35mm FHD cameras ever made.  To say nothing of the full-frame vision!  Do you think this might be possible?

I wish, we had this miracle on the 100D at 1736x976 resolution ...

theBilalFakhouri

  • Contributor
  • Senior
  • *****
  • Posts: 354
@IDA_ML

5D3 can already do 3072x1920 in 1x1 @24 FPS so it can do also 1920x3072 in 1x3 resized to 1920x1024 (I have tested it in 700D I can do 2306x1736 in 1x1 and also 1736x2306 in 1x3 so same thing here). Write speed will be very high 1920x3072 @24 10-bit lossless about ~120MB/s in 5D3
700D 1.1.5 | no more ISOless LV err 8

IDA_ML

  • Hero Member
  • *****
  • Posts: 646
In that case, we are very close, Bilal.  With card spanning, the 5D3 should be able to provide continuous recording at 120 MB/s.  I remember A1ex saying that card spanning can be implemented with crop recording on the 5D3.

Danne,

I have just checked the test footage that you linked above.  Gorgeous quality!  Congratulations!  And also MLVApp does a hell of a job with such footage.  The processing latitude is amazing.  I pushed the Exposure slider to the right by 4 stops and did not notice any quality degradation.

squig

  • Hero Member
  • *****
  • Posts: 518
  • Crash test dummy MK3
The other way to get the data rate down is to shoot 1280x2368 with 1.5x anamorphics. Preferably 14 bit lossless 1280x2412 for 2.39:1 output.

Lars Steenhoff

  • Senior
  • ****
  • Posts: 454
Nice idea about the anamorphic, I
happen to have a 1.5x one.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5919
Never used anamorpic lenses. Any recommendations? Links?

squig

  • Hero Member
  • *****
  • Posts: 518
  • Crash test dummy MK3
Check out SLRmagic for new anamorphic lenses. An Isco Star + a front focus element is a good option. Iscorama 36 is the bomb, costs a bomb too.

I've been doing some tests on the build you posted. Nothing conclusive yet. Definitely less noise than 3x3 but there's some vertical fixed pattern noise. Getting pink frames at the end of every recording and had one in the middle of a 100/800 dual ISO recording.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5919
Thanks for tip.
Yes, noticed stripes on the right hand of the image. Not sure why, maybe a1ex knows.
I could upload a build with a little less height to see if that makes it less prone to random pink frames etc. Noticed this too when including audio.
Will post a little later.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5919
Updated to a new version. Seems corruption free but needs testing. New resolution is 1920x2352
https://bitbucket.org/Dannephoto/magic-lantern/downloads/magiclantern_crop_rec_4k_mlv_snd_1x3_10bit.zip

Oh, and canon menu set to 24fps or it will not work I suppose.
Please report any findings.

squig

  • Hero Member
  • *****
  • Posts: 518
  • Crash test dummy MK3
Can you upload one with a little less width and 14bit lossless? 1320x2412 would do nicely. I'm trying to figure out whether there's any increase in dynamic range. So far 10bit 1x3 dual ISO looks about the same DR as 3x3 14bit lossless (no dual ISO).

The vertical stripes are hidden in the shadows up to 1600 ISO, beyond that it's visible on the graded shots.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 5919
You can lower width in Resolution tab. Something like 1312x2352 will work.
Well, more height right now will mean lower fps or corruption. Feel free to play with code and see if you can get more out of this. I am unfortunately out of time atm but will test more when I get the opportunity.

Will upload a 14bit version. Wait a minute...

EDIT:
14bit version. Not tested so needs verifying:
https://bitbucket.org/Dannephoto/magic-lantern/downloads/magiclantern_crop_rec_4k_mlv_snd_1x3_14bit.zip