ProcessTwoInTwoOutLosslessPath

Started by a1ex, December 18, 2016, 09:06:41 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

theBilalFakhouri

On 700D there are 16 used resources for TTL_ResLock, I did some experiments and seems using only 5 of them is enough to get valid lossless compression in both RAW video and Silent picture:

    if (is_camera("700D", "*") || is_camera("650D", "*") || is_camera("EOSM", "*") || is_camera("100D", "*"))
    {
        uint32_t resources[] = {
            0x00000 | edmac_channel_to_index(edmac_write_chan),
            0x10000 | edmac_channel_to_index(edmac_read_chan),
            //0x20005,//no effect
            //0x20016,//no effect
            //0x30002,//no effect
            //0x50034,//no effect
            //0x5002d,//no effect
            0x50010,//affect silent pic
            0x90001,//affect silent pic + raw video
            //0x90000,//no effect
            0xa0000,//camera lock up without it
            //0x160000,//no effect
            //0x260000,//no effect
            //0x260001,//no effect
            //0x260002,//no effect
            //0x260003,//no effect
        };


Also, if we want to throw out Silent picture, only using 4 resources would work fine for RAW video which are:
0x00000 | edmac_channel_to_index(edmac_write_chan),
0x10000 | edmac_channel_to_index(edmac_read_chan),
0x90001,
0xa0000,


if we want to make Silent picture works it become:
0x00000 | edmac_channel_to_index(edmac_write_chan),
0x10000 | edmac_channel_to_index(edmac_read_chan),
0x50010, ---> Added this
0x90001,
0xa0000,


-Why I am mentioning this?

I have hope that DIGIC 4 models would have similar thing, by looking back at DIGIC 4 experiments, we can see notes about there are conflicts among some TTL_ResLock resources and LiveView:
Greg's experiment on 500D, a1ex's experiment on 60D

-TTL_ResLock resources from logs:

-500D from Greg
-7D from nikfreak
-5D2 from reddeercity
-550D from reddeercity
-50D from aprofiti

So the shared resources among DIGIC 4:

1)    10002 (read channel 0xa)
2)        3 (write channel 0x3)
3)        4 (write channel 0x4)
4)    30000 (read connection 0x0)
5)    20005 (write connection 0x5)
6)    20016 (write connection 0x16)
7)    50003 (?)
8)    5000d (?)
9)    5000f (?)
10)    5001a (?)
11)    80000 (?)
12)    90000 (?)
13)    a0000 (?)
14)   160000 (?)
15)   130003 (?)
16)   130004 (?)
17)   130005 (?)


+ These which presented only on 500D and 50D:
18)   130006 (?)
19)   130007 (?)
20)   130008 (?)
21)   13000c (?)
22)   130010 (?)
23)   130011 (?)
24)   130012 (?)
25)   130013 (?)
26)   130014 (?)
27)   130015 (?)
28)   130018 (?)
29)   13001a (?)
30)   13001b (?)
31)   13001c (?)



-Comparing DIGIC 4 resources to 700D:

For first two, resources are for read and write EDMAC channels, we shouldn't worry about them.
For 0xa0000, it's shared among all models DIGIC 4 and DIGIC 5, this seems the most important one, camera locks up without it on 700D
Last one for 700D it's 0x90001, I don't know which one is equivalent on DIGIC 4, could be 0x80000 or 0x90000? , but 0x80000 was conflicting with LiveView.

For silent pic, 0x50010 was required on 700D, could be 0x5001a on DIGIC 4, or 0x5000X ? but 0x5001a was conflicting with LiveView, Greg's notes

-Of course I could be wrong, maybe other resources are required too on DIGIC 4, well, maybe not all of them are required, knowing this thing may make things easier.

-I can't test these, no DIGIC 4 models around me, but might provide some tests (not in near future).
-I read that the newer DIGIC 4 models like 60D, 600D and 1100D are the easiest D4 models to start digging into it because of their similarities to DIGIC 5.
-Probably I need to check what the minimum required resources on 100D (could be same as 700D) and 5D3 and see if the theory applies there.

reddeercity

8221A> ShootCaptu:ff87fcc8:93:03: CreateJob end.
8226D> ShootCaptu:ff87ffa8:93:03: iso:0x50,tv:0x60,av:0x28,tp:159,po:100
822AC> ShootCaptu:ff87ffec:93:03: GetCaptureResources start.
822D4> ShootCaptu:000965bc:00:00: *** LockEngineResources(680404) x38 from ffa384f8:
8230D> ShootCaptu:00096678:00:00:      1)    50001 (?)
82332> ShootCaptu:00096678:00:00:      2)    50005 (?)
82353> ShootCaptu:00096678:00:00:      3)    50007 (?)
82374> ShootCaptu:00096678:00:00:      4)    50009 (?)
82397> ShootCaptu:00096678:00:00:      5)    5000e (?)
823B7> ShootCaptu:00096678:00:00:      6)    50011 (?)
823D7> ShootCaptu:00096678:00:00:      7)    50019 (?)
823F7> ShootCaptu:00096678:00:00:      8)    5001b (?)
82419> ShootCaptu:00096678:00:00:      9)    5001e (?)
8243B> ShootCaptu:00096678:00:00:     10)    50013 (?)
8245C> ShootCaptu:00096678:00:00:     11)    50020 (?)
8247D> ShootCaptu:00096678:00:00:     12)    50021 (?)
8249F> ShootCaptu:00096678:00:00:     13)    70000 (?)
824C1> ShootCaptu:00096678:00:00:     14)    f0000 (?)
824E2> ShootCaptu:00096678:00:00:     15)    b0000 (?)
82505> ShootCaptu:00096678:00:00:     16)   200002 (?)
82528> ShootCaptu:00096678:00:00:     17)   140000 (?)
8254C> ShootCaptu:00096678:00:00:     18)   120000 (?)
82570> ShootCaptu:00096678:00:00:     19)   130009 (?)
82593> ShootCaptu:00096678:00:00:     20)   13000a (?)
825B9> ShootCaptu:00096678:00:00:     21)   13000b (?)
825DB> ShootCaptu:00096678:00:00:     22)   13000d (?)
825FE> ShootCaptu:00096678:00:00:     23)   13000e (?)
82621> ShootCaptu:00096678:00:00:     24)   13000f (?)
82645> ShootCaptu:00096678:00:00:     25)   130016 (?)
82669> ShootCaptu:00096678:00:00:     26)   22001b (?)
82695> ShootCaptu:00096678:00:00:     27)        0 (write channel 0x0)
826BC> ShootCaptu:00096678:00:00:     28)        1 (write channel 0x1)
826E0> ShootCaptu:00096678:00:00:     29)        2 (write channel 0x2)
82704> ShootCaptu:00096678:00:00:     30)        6 (write channel 0x6)
82728> ShootCaptu:00096678:00:00:     31)    10000 (read channel 0x8)
82750> ShootCaptu:00096678:00:00:     32)    10001 (read channel 0x9)
82779> ShootCaptu:00096678:00:00:     33)    20000 (write connection 0x0)
827A4> ShootCaptu:00096678:00:00:     34)    20002 (write connection 0x2)
827CD> ShootCaptu:00096678:00:00:     35)    20012 (write connection 0x12)
827F9> ShootCaptu:00096678:00:00:     36)    2001c (write connection 0x1c)
82822> ShootCaptu:00096678:00:00:     37)    30008 (read connection 0x8)
8284B> ShootCaptu:00096678:00:00:     38)    3000f (read connection 0xf)

D9805> ShootCaptu:000965bc:00:00: *** UnLockEngineResources(680a68) x1 from ffa384cc:
D9846> ShootCaptu:00096678:00:00:      1)    40000 (?)
D989B> ShootCaptu:ff9a77d0:00:01: [CLKSAVER] ��ClockSave Out��
D98DA> ShootCaptu:000965bc:00:00: *** UnLockEngineResources(680404) x38 from ffa38524:
D9911> ShootCaptu:00096678:00:00:      1)    50001 (?)
D993B> ShootCaptu:00096678:00:00:      2)    50005 (?)
D995B> ShootCaptu:00096678:00:00:      3)    50007 (?)
D997C> ShootCaptu:00096678:00:00:      4)    50009 (?)
D99A0> ShootCaptu:00096678:00:00:      5)    5000e (?)
D99C1> ShootCaptu:00096678:00:00:      6)    50011 (?)
D99E2> ShootCaptu:00096678:00:00:      7)    50019 (?)
D9A02> ShootCaptu:00096678:00:00:      8)    5001b (?)
D9A25> ShootCaptu:00096678:00:00:      9)    5001e (?)
D9A45> ShootCaptu:00096678:00:00:     10)    50013 (?)
D9A65> ShootCaptu:00096678:00:00:     11)    50020 (?)
D9A87> ShootCaptu:00096678:00:00:     12)    50021 (?)
D9AA8> ShootCaptu:00096678:00:00:     13)    70000 (?)
D9ACA> ShootCaptu:00096678:00:00:     14)    f0000 (?)
D9AEC> ShootCaptu:00096678:00:00:     15)    b0000 (?)
D9B0F> ShootCaptu:00096678:00:00:     16)   200002 (?)
D9B36> ShootCaptu:00096678:00:00:     17)   140000 (?)
D9B57> ShootCaptu:00096678:00:00:     18)   120000 (?)
D9B7D> ShootCaptu:00096678:00:00:     19)   130009 (?)
D9B9F> ShootCaptu:00096678:00:00:     20)   13000a (?)
D9BC1> ShootCaptu:00096678:00:00:     21)   13000b (?)
D9BE4> ShootCaptu:00096678:00:00:     22)   13000d (?)
D9C06> ShootCaptu:00096678:00:00:     23)   13000e (?)
D9C2A> ShootCaptu:00096678:00:00:     24)   13000f (?)
D9C4D> ShootCaptu:00096678:00:00:     25)   130016 (?)
D9C71> ShootCaptu:00096678:00:00:     26)   22001b (?)
D9C9D> ShootCaptu:00096678:00:00:     27)        0 (write channel 0x0)
D9CC5> ShootCaptu:00096678:00:00:     28)        1 (write channel 0x1)
D9CED> ShootCaptu:00096678:00:00:     29)        2 (write channel 0x2)
D9D15> ShootCaptu:00096678:00:00:     30)        6 (write channel 0x6)
D9D3B> ShootCaptu:00096678:00:00:     31)    10000 (read channel 0x8)
D9D65> ShootCaptu:00096678:00:00:     32)    10001 (read channel 0x9)
D9D8E> ShootCaptu:00096678:00:00:     33)    20000 (write connection 0x0)
D9DB9> ShootCaptu:00096678:00:00:     34)    20002 (write connection 0x2)
D9DE2> ShootCaptu:00096678:00:00:     35)    20012 (write connection 0x12)
D9E0E> ShootCaptu:00096678:00:00:     36)    2001c (write connection 0x1c)
D9E36> ShootCaptu:00096678:00:00:     37)    30008 (read connection 0x8)
D9E5E> ShootCaptu:00096678:00:00:     38)    3000f (read connection 0xf)

The above 2 pieces or log file , i think is needed to get lossless compression working on 5D2
the below piece of log file is related to all D4 cams but i suspect somthing is needed from the above
log file , as previous lossless compression test (silent picture) always lockup during the saving routines. Like the its not unlocking or locking the (ProcessTwoInTwoOutJpegPath) that the D4 version
of lossless , plus I think D5 cam use 4 in & 4 out streams maybe just the 5D3 , the D4 use 2 in & 2 out . In the end there some missing resources or the code structure is wrong for d4 (wouldn't be the first time i had to change so D5 code to work in D4 cams  :) 
1B0BF> FrontShtDe:ffa590d4:16:03: [TTJ] STOP WR1:0x3615254 WR2:0x1ad28248
1B10A> FrontShtDe:ffa59100:16:03: [TTJ] STOP RD1:0x124cf564 RD2:0x124d1864
1B185> FrontShtDe:000965bc:00:00: *** UnLockEngineResources(72bed4) x17 from ffa5905c:
1B1D6> FrontShtDe:00096678:00:00:      1)    10002 (read channel 0xa)
1B205> FrontShtDe:00096678:00:00:      2)        3 (write channel 0x3)
1B22C> FrontShtDe:00096678:00:00:      3)        4 (write channel 0x4)
1B252> FrontShtDe:00096678:00:00:      4)    30000 (read connection 0x0)
1B27D> FrontShtDe:00096678:00:00:      5)    20005 (write connection 0x5)
1B2A6> FrontShtDe:00096678:00:00:      6)    20016 (write connection 0x16)
1B2C9> FrontShtDe:00096678:00:00:      7)    50003 (?)
1B2EA> FrontShtDe:00096678:00:00:      8)    5000d (?)
1B30B> FrontShtDe:00096678:00:00:      9)    5000f (?)
1B32D> FrontShtDe:00096678:00:00:     10)    5001a (?)
1B350> FrontShtDe:00096678:00:00:     11)    80000 (?)
1B39E> FrontShtDe:00096678:00:00:     12)    90000 (?)
1B3CC> FrontShtDe:00096678:00:00:     13)    a0000 (?)
1B3F3> FrontShtDe:00096678:00:00:     14)   160000 (?)
1B419> FrontShtDe:00096678:00:00:     15)   130003 (?)
1B43C> FrontShtDe:00096678:00:00:     16)   130004 (?)
1B460> FrontShtDe:00096678:00:00:     17)   130005 (?)
1B4B9> FrontShtDe:ff9a77d0:00:01: [CLKSAVER] ��ClockSave Out��
1B503> FrontShtDe:ff9a77d0:00:01: [CLKSAVER] ��ClockSave Out��
1B588> FrontShtDe:ff9a77d0:00:01: [CLKSAVER] ��ClockSave Out��
1B5CA> FrontShtDe:ff9a77d0:00:01: [CLKSAVER] ��ClockSave Out��
1B5FE> FrontShtDe:ff9a77d0:00:01: [CLKSAVER] ��ClockSave Out��
1B62E> FrontShtDe:ff9a77d0:00:01: [CLKSAVER] ��ClockSave Out��
1B65F> FrontShtDe:ff9a77d0:00:01: [CLKSAVER] ��ClockSave Out��
1B68F> FrontShtDe:ff9a77d0:00:01: [CLKSAVER] ��ClockSave Out��
1B6BE> FrontShtDe:ff9a77d0:00:01: [CLKSAVER] ��ClockSave Out��
1B6F0> FrontShtDe:ff9a77d0:00:01: [CLKSAVER] ��ClockSave Out��
1B71E> FrontShtDe:ff9a77d0:00:01: [CLKSAVER] ��ClockSave Out��
1B74A> FrontShtDe:ff9a77d0:00:01: [CLKSAVER] ��ClockSave Out��
1B777> FrontShtDe:ff9a77d0:00:01: [CLKSAVER] ��ClockSave Out��
1B7CA> FrontShtDe:ff888f10:96:05: ProcessTwoInTwoOutJpegPath(R) End(5742)
This part of the resources i have used in my lossless compression test a few years ago , It did compress the image
and that's it , so that kind of telling me its not unlocking after locking resources.