Magic Lantern Firmware Wiki
Advertisement

Parent: http://magiclantern.wikia.com/wiki/2.0.4_AJ


MovieRecorderPtr_Struct[]

This is and 8 byte struct that is populated with details of where the MovieRecord_struct is located.

Location = 0x1EEC. Size = 8 bytes


[0x00] aAJ_0x1EEC_MovieRecorderPtr_struct_0x00_0x04
[0x04] aAJ_0x1EEC_MovieRecorderPtr_struct_0x04_MovieRecorder_struct_ptr Points to MovieRecorder_struct
malloced in AJ_MVR_Initialize() at 0xFF852DE0

.



MovieRecorder_struct (also called MVR)[]

This has the Movie Recorder details inside it.

Location = aAJ_0x1EEC_MovieRecorderPtr_struct_0x04_MovieRecorder_struct_ptr . Size = 0x204 bytes

{Note: this structure is in a different location and size to the one listed in dryos.h http://bitbucket.org/hudson/magic-lantern/src/tip/dryos.h }


[0x00] type [TH]

=0 {Off}


="MovieRecorder" {On}

Set in AJ_MovieRecorder.c()
[0x04]

State

[AJ] guess = State
[0x08] task [TH] [AJ] Class_ptr_related. This is a guess
[0x0C]

mvrResultCBR


also used in Debug msg

Debug_msg refs this field in AJ_MovieRecorder.c_pf_subs()
[0xF8]

if ( [0x14C] = 0 ) = 14 if ( [0x14C] != 0 ) = 13

Set in AJ_MovieRecorder.c_pf_subs()
[0xFC] =4 Set in AJ_MovieRecorder.c_pf_subs()
[0x148] {copied to another Field}
[0x14C] is_vga

=0 {YES = HD = 1920 x 1080 required}


= 0 {NO = 640 x 480 required}

{copied to another Field if HD}

[0x150] fps = 20,24,25,30,50 or 60
[0x158] {copied to another Field}
[0x15C] {copied to another Field}
[0x160] =[0x158] Set in AJ_MovieRecorder.c_pf_subs()
[0x164] =[0x15C] Set in AJ_MovieRecorder.c_pf_subs()
[0x168] =[0x148] Set in AJ_MovieRecorder.c_pf_subs()
[0x16C] is_vga_copy =[0x14C] Set in AJ_MovieRecorder.c_pf_subs()
[0x170] fps_copy

if ( [0x14C] = 0 ) = [0x150] {HD}


= 20,24,25,30,50 or 60

Set in AJ_MovieRecorder.c_pf_subs()
[0x174]

if ( [0x14C] = 0 ) = 4 {HD}


if ( [0x14C] != 0 ) = 2 {VGA}

Set in AJ_MovieRecorder.c_pf_subs()
[0x178] FrameRateExact

if (20fps) = 19980 {999 x 20}

if (24fps) = 23976 {999 x 24}

if (25fps) = 25,000 {1000 x 25}

if (30fps) = 29970 {999 x 30}

if (50fps) = 50000 (1000 x 50)

if (60fps) = 59940 {999 x 60}

Used in AJ_mvrSetBitRate() for calculation of 'BitRate' in [0x1D8] of this struct

[0x17C] x_resolution

if ( [0x14C] = 0 ) = 1920 {HD}

if ( [0x14C] != 0 ) = 640 {VGA}

[0x180] y_resolution

if ( [0x14C] = 0 ) = 1080 {HD}

if ( [0x14C] != 0 ) = 480 {VGA}

Set in AJ_MovieRecorder.c_pf_subs()
[0x184] if ( [0x14C] = 0 ) = [0x154] {HD} Set in AJ_MovieRecorder.c_pf_subs()
[0x188] RateRelated

if (20fps) = 2 x [0x154]

if (24fps) = 2 x [0x154]

if (25fps) = 2 x [0x154]

if (30fps) = 2 x [0x154]

if (50fps) = 4 x [0x154]

if (60fps) = 4 x [0x154]

Set in AJ_MovieRecorder.c_pf_subs()
[0x190] = 1 Ref in AJ_MovieRecorder.c_pf_subs()
[0x194] {used in calculation)
[0x19C] {used in calculation)
[0x1A0]

=0


if ([0x190] = 1) = [0x194] x [0x1A4] x [0x19C] x 8

Set in AJ_MovieRecorder.c_pf_subs()
[0x1A4] BiteRate2

R0 = [0x178] x [0x198]

if ( 20,24,30,60fps ) {R1 = 1000)

if ( 25fps ) {R1 = 25)

if ( 50fps ) {R1 = 50)

= PEL_DivideR0byR1


if (20fps) = 19980 x [0x198] DIV 1000

if (24fps) = 23976 x [0x198] DIV 1000

if (25fps) = 25,000 x [0x198] DIV 25

if (30fps) = 29970 x [0x198] DIV 1000

if (50fps) = 50000 x [0x198] DIV 50

if (60fps) = 59940 x [0x198] DIV 1000

Set in AJ_MovieRecorder.c_pf_subs()
[0x1D8] BitRate = ( (*AJ_mvrSetBitRate(R0)) << 20 ) DIV ( [0x178] * 8)

Set in AJ_mvrSetBitRate(). Uses [0x178] of this struct

[0x200]


Advertisement