Andrew Coutts
unread,Aug 17, 2011, 8:36:50 AM8/17/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Magic Lantern firmware development
ROM:FF1787A8 @ =============== S U B R O U T I N E
=======================================
ROM:FF1787A8
ROM:FF1787A8
ROM:FF1787A8 sub_FF1787A8: @ CODE XREF:
sub_FF0EC270+9C p
ROM:FF1787A8 @
sub_FF0EC270+B4 p ...
ROM:FF1787A8 STMFD SP!, {R4,LR}
ROM:FF1787AC MOV R4, R0
ROM:FF1787B0 MOV R3, R0
ROM:FF1787B4 MOV R0, #0x1A
ROM:FF1787B8 ADR R2, aH264eSetparame @ "H264E
SetParameterH264Encode PassNo:%d"
ROM:FF1787BC MOV R1, #1
ROM:FF1787C0 BL DryosDebugMsg
ROM:FF1787C4 LDR R0, =0x83DC
ROM:FF1787C8 STR R4, [R0,#0x24]
ROM:FF1787CC LDR R1, [R0,#8]
ROM:FF1787D0 CMP R1, #1
ROM:FF1787D4 CMPEQ R4, #0xA @ 1080p recording
profile
ROM:FF1787D8 BNE loc_FF178824
ROM:FF1787DC LDR R1, [R0,#0x68]
ROM:FF1787E0 STR R1, [R0,#0x64]
ROM:FF1787E4 LDR R1, [R0,#0x78]
ROM:FF1787E8 STR R1, [R0,#0x74]
ROM:FF1787EC LDR R1, [R0,#0x88]
ROM:FF1787F0 STR R1, [R0,#0x84]
ROM:FF1787F4 LDR R1, [R0,#0x98]
ROM:FF1787F8 STR R1, [R0,#0x94]
ROM:FF1787FC LDR R1, [R0,#0xA8]
ROM:FF178800 STR R1, [R0,#0xA4]
ROM:FF178804 LDR R1, [R0,#0xBC]
ROM:FF178808 STR R1, [R0,#0xB4]
ROM:FF17880C LDR R1, [R0,#0xC0]
ROM:FF178810 STR R1, [R0,#0xB8]
ROM:FF178814 LDR R1, [R0,#0xDC]
ROM:FF178818 STR R1, [R0,#0xD4]
ROM:FF17881C LDR R1, [R0,#0xE0]
ROM:FF178820 B loc_FF1788E4
ROM:FF178824 @
---------------------------------------------------------------------------
ROM:FF178824
ROM:FF178824 loc_FF178824: @ CODE XREF:
sub_FF1787A8+30 j
ROM:FF178824 LDR R1, [R0,#0xC]
ROM:FF178828 CMP R1, #1
ROM:FF17882C CMPEQ R4, #7 @ 720p recording
profile
ROM:FF178830 BNE loc_FF17887C
ROM:FF178834 LDR R1, [R0,#0x6C]
ROM:FF178838 STR R1, [R0,#0x64]
ROM:FF17883C LDR R1, [R0,#0x7C]
ROM:FF178840 STR R1, [R0,#0x74]
ROM:FF178844 LDR R1, [R0,#0x8C]
ROM:FF178848 STR R1, [R0,#0x84]
ROM:FF17884C LDR R1, [R0,#0x9C]
ROM:FF178850 STR R1, [R0,#0x94]
ROM:FF178854 LDR R1, [R0,#0xAC]
ROM:FF178858 STR R1, [R0,#0xA4]
ROM:FF17885C LDR R1, [R0,#0xC4]
ROM:FF178860 STR R1, [R0,#0xB4]
ROM:FF178864 LDR R1, [R0,#0xC8]
ROM:FF178868 STR R1, [R0,#0xB8]
ROM:FF17886C LDR R1, [R0,#0xE4]
ROM:FF178870 STR R1, [R0,#0xD4]
ROM:FF178874 LDR R1, [R0,#0xE8]
ROM:FF178878 B loc_FF1788E4
ROM:FF17887C @
---------------------------------------------------------------------------
ROM:FF17887C
ROM:FF17887C loc_FF17887C: @ CODE XREF:
sub_FF1787A8+88 j
ROM:FF17887C LDR R1, [R0,#0x10]
ROM:FF178880 CMP R1, #1
ROM:FF178884 CMPEQ R4, #5 @ 480p recording
profile
ROM:FF178888 MOVNE R3, R4
ROM:FF17888C LDMFDNE SP!, {R4,LR}
ROM:FF178890 ADRNE R2, aH264eInvalidPa @ "H264E
Invalid PassNo:%d"
ROM:FF178894 MOVNE R1, #6
ROM:FF178898 MOVNE R0, #0x1A
ROM:FF17889C BNE DryosDebugMsg
ROM:FF1788A0 LDR R1, [R0,#0x70]
ROM:FF1788A4 STR R1, [R0,#0x64]
ROM:FF1788A8 LDR R1, [R0,#0x80]
ROM:FF1788AC STR R1, [R0,#0x74]
ROM:FF1788B0 LDR R1, [R0,#0x90]
ROM:FF1788B4 STR R1, [R0,#0x84]
ROM:FF1788B8 LDR R1, [R0,#0xA0]
ROM:FF1788BC STR R1, [R0,#0x94]
ROM:FF1788C0 LDR R1, [R0,#0xB0]
ROM:FF1788C4 STR R1, [R0,#0xA4]
ROM:FF1788C8 LDR R1, [R0,#0xCC]
ROM:FF1788CC STR R1, [R0,#0xB4]
ROM:FF1788D0 LDR R1, [R0,#0xD0]
ROM:FF1788D4 STR R1, [R0,#0xB8]
ROM:FF1788D8 LDR R1, [R0,#0xEC]
ROM:FF1788DC STR R1, [R0,#0xD4]
ROM:FF1788E0 LDR R1, [R0,#0xF0]
ROM:FF1788E4
ROM:FF1788E4 loc_FF1788E4: @ CODE XREF:
sub_FF1787A8+78 j
ROM:FF1788E4 @
sub_FF1787A8+D0 j
ROM:FF1788E4 STR R1, [R0,#0xD8]
ROM:FF1788E8 ADR R1, sub_FF178540
ROM:FF1788EC STR R1, [R0,#0x50]
ROM:FF1788F0 LDR R1, =sub_FF17814C
ROM:FF1788F4 STR R1, [R0,#0x4C]
ROM:FF1788F8 LDMFD SP!, {R4,PC}
ROM:FF1788F8 @ End of function sub_FF1787A8
this seems to setup the encoding parameters for each recording
profile. It's called by sub_FF0EC638:
ROM:FF0EC638 @ =============== S U B R O U T I N E
=======================================
ROM:FF0EC638
ROM:FF0EC638
ROM:FF0EC638 sub_FF0EC638:
ROM:FF0EC638
ROM:FF0EC638 var_40 = -0x40
ROM:FF0EC638 var_34 = -0x34
ROM:FF0EC638 var_24 = -0x24
ROM:FF0EC638 var_14 = -0x14
ROM:FF0EC638 var_10 = -0x10
ROM:FF0EC638
ROM:FF0EC638 STMFD SP!, {R4,R5,LR}
ROM:FF0EC63C LDR R0, [R1,#0x18]
ROM:FF0EC640 LDR R5, =0x49D0
ROM:FF0EC644 SUB SP, SP, #0x34
ROM:FF0EC648 STR R0, [R5,#0xC]
ROM:FF0EC64C LDR R3, [R1,#0x14]
ROM:FF0EC650 MOV R4, R1
ROM:FF0EC654 MOV R1, #1
ROM:FF0EC658 MOV R0, #0x3D
ROM:FF0EC65C ADR R2, aLvcdevstarth264D @
"lvcdevStartH264(%d)"
ROM:FF0EC660 BL DryosDebugMsg
ROM:FF0EC664 LDR R3, [R4]
ROM:FF0EC668 ADR R2, aPinputaddressL @
"pInputAddress(%#lx)"
ROM:FF0EC66C MOV R1, #1
ROM:FF0EC670 MOV R0, #0x3D
ROM:FF0EC674 BL DryosDebugMsg
ROM:FF0EC678 LDR R3, [R4,#8]
ROM:FF0EC67C ADR R2, aPstreamaddress @
"pStreamAddress1(%#lx) Size1(%#lx)"
ROM:FF0EC680 STR R3, [SP]
ROM:FF0EC684 LDR R3, [R4,#4]
ROM:FF0EC688 MOV R1, #1
ROM:FF0EC68C MOV R0, #0x3D
ROM:FF0EC690 BL DryosDebugMsg
ROM:FF0EC694 LDR R3, [R4,#0x10]
ROM:FF0EC698 ADR R2, aPstreamaddre_0 @
"pStreamAddress2(%#lx) Size2(%#lx)"
ROM:FF0EC69C STR R3, [SP]
ROM:FF0EC6A0 LDR R3, [R4,#0xC]
ROM:FF0EC6A4 MOV R1, #1
ROM:FF0EC6A8 MOV R0, #0x3D
ROM:FF0EC6AC BL DryosDebugMsg
ROM:FF0EC6B0 LDR R3, [R5,#0xC]
ROM:FF0EC6B4 CMP R3, #0
ROM:FF0EC6B8 MOVEQ R0, #0xA
ROM:FF0EC6BC BEQ loc_FF0EC6D8
ROM:FF0EC6C0 CMP R3, #1
ROM:FF0EC6C4 MOVEQ R0, #7
ROM:FF0EC6C8 BEQ loc_FF0EC6D8
ROM:FF0EC6CC CMP R3, #2
ROM:FF0EC6D0 BNE loc_FF0EC760
ROM:FF0EC6D4 MOV R0, #5
ROM:FF0EC6D8
ROM:FF0EC6D8 loc_FF0EC6D8: @ CODE XREF:
sub_FF0EC638+84 j
ROM:FF0EC6D8 @
sub_FF0EC638+90 j
ROM:FF0EC6D8 BL sub_FF1787A8
ROM:FF0EC6DC LDR R1, [R4,#0x14]
ROM:FF0EC6E0 LDR R2, [R4,#0x1C]
ROM:FF0EC6E4 ADD R3, SP, #0x2C
ROM:FF0EC6E8 MOV R0, #0x780
ROM:FF0EC6EC ADD R12, SP, #0x1C
ROM:FF0EC6F0 STMIA R12, {R0-R3}
ROM:FF0EC6F4 MOV R3, #1
ROM:FF0EC6F8 MOV R2, #0
ROM:FF0EC6FC MOV R1, #0
ROM:FF0EC700 ADD R0, SP, #0x30
ROM:FF0EC704 ADD R12, SP, #0xC
ROM:FF0EC708 STMIA R12, {R0-R3}
ROM:FF0EC70C ADD R3, R4, #8
ROM:FF0EC710 LDMIA R3, {R1-R3}
ROM:FF0EC714 STMEA SP, {R1-R3}
ROM:FF0EC718 LDMIA R4, {R0,R3}
ROM:FF0EC71C LDR R2, =0x438
ROM:FF0EC720 MOV R1, #0x780
ROM:FF0EC724 BL H264E_RequestH264Encode
ROM:FF0EC728 LDR R0, [R5,#4]
ROM:FF0EC72C MOV R1, #0
ROM:FF0EC730 BL take_semaphore
ROM:FF0EC734 LDR R0, [SP,#0x2C]
ROM:FF0EC738 TST R0, #1
ROM:FF0EC73C BEQ loc_FF0EC778
ROM:FF0EC740 LDR R3, [R4,#0x14]
ROM:FF0EC744 ADR R2, aDFrame @ "[%d] Frame"
ROM:FF0EC748 MOV R1, #6
ROM:FF0EC74C MOV R0, #0x3D
ROM:FF0EC750 BL DryosDebugMsg
ROM:FF0EC754 LDR R0, [SP,#0x2C]
ROM:FF0EC758
ROM:FF0EC758 loc_FF0EC758: @ CODE XREF:
sub_FF0EC638+13C j
ROM:FF0EC758 @
sub_FF0EC638+16C j
ROM:FF0EC758 ADD SP, SP, #0x34
ROM:FF0EC75C LDMFD SP!, {R4,R5,PC}
ROM:FF0EC760 @
---------------------------------------------------------------------------
ROM:FF0EC760
ROM:FF0EC760 loc_FF0EC760: @ CODE XREF:
sub_FF0EC638+98 j
ROM:FF0EC760 ADR R2, aIllegal_parame @
"ILLEGAL_PARAMETER MovieSize:%d"
ROM:FF0EC764 MOV R1, #6
ROM:FF0EC768 MOV R0, #0x3D
ROM:FF0EC76C BL DryosDebugMsg
ROM:FF0EC770 MOV R0, #0
ROM:FF0EC774 B loc_FF0EC758
ROM:FF0EC778 @
---------------------------------------------------------------------------
ROM:FF0EC778
ROM:FF0EC778 loc_FF0EC778: @ CODE XREF:
sub_FF0EC638+104 j
ROM:FF0EC778 MOV R0, #1
ROM:FF0EC77C BL H264E_CancelH264Encode
ROM:FF0EC780 LDR R0, [R4,#0x14]
ROM:FF0EC784 CMN R0, #2
ROM:FF0EC788 BLEQ H264E_FinishH264EncPass
ROM:FF0EC78C LDR R2, [R5,#0x48]
ROM:FF0EC790 CMP R2, #0
ROM:FF0EC794 LDRNE R1, [SP,#0x30]
ROM:FF0EC798 LDRNE R0, [R5,#8]
ROM:FF0EC79C BLXNE R2
ROM:FF0EC7A0 LDR R0, [R5,#0x3C]
ROM:FF0EC7A4 B loc_FF0EC758
ROM:FF0EC7A4 @ End of function sub_FF0EC638
ROM:FF0EC7A4
ROM:FF0EC7A4 @
---------------------------------------------------------------------------
I'm going to bmp_printf the structs at 0x49D0 and 0x83DC and see
what's there. I think this all happens when recording starts so maybe
I can change these settings and the camera will encode whatever I
change things to??
We'll see :) I think I'm getting closer.