root/platform/g1x/sub/100f/movie_rec.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. change_video_tables
  2. set_quality
  3. movie_record_task

   1 /*
   2  * movie_rec.c - auto-generated by CHDK code_gen.
   3  */
   4 #include "conf.h"
   5 
   6 void change_video_tables(int a, int b){
   7 }
   8 
   9 void  set_quality(int *x){ // -17 highest; +12 lowest
  10  if (conf.video_mode) *x=12-((conf.video_quality-1)*(12+17)/(99-1));
  11 }
  12 
  13 /*************************************************************/
  14 //** movie_record_task @ 0xFF1CA86C - 0xFF1CA9E4, length=95
  15 void __attribute__((naked,noinline)) movie_record_task() {
  16 asm volatile (
  17 "    STMFD   SP!, {R2-R10,LR} \n"
  18 "    LDR     R6, =0xFF1C98BC \n"
  19 "    LDR     R7, =0xFF1CA2D8 \n"
  20 "    LDR     R4, =0x9D98 \n"
  21 "    LDR     R9, =0x6D6 \n"
  22 "    LDR     R10, =0x2710 \n"
  23 "    MOV     R8, #1 \n"
  24 "    MOV     R5, #0 \n"
  25 
  26 "loc_FF1CA88C:\n"
  27 "    LDR     R0, [R4, #0x24] \n"
  28 "    MOV     R2, #0 \n"
  29 "    ADD     R1, SP, #4 \n"
  30 "    BL      sub_FF029EA8 /*_ReceiveMessageQueue*/ \n"
  31 "    LDR     R0, [R4, #0x2C] \n"
  32 "    CMP     R0, #0 \n"
  33 "    LDRNE   R0, [R4, #0xC] \n"
  34 "    CMPNE   R0, #2 \n"
  35 "    LDRNE   R0, [R4, #0x44] \n"
  36 "    CMPNE   R0, #6 \n"
  37 "    BNE     loc_FF1CA9C8 \n"
  38 "    LDR     R0, [SP, #4] \n"
  39 "    LDR     R1, [R0] \n"
  40 "    SUB     R1, R1, #2 \n"
  41 "    CMP     R1, #0xD \n"
  42 "    ADDCC   PC, PC, R1, LSL#2 \n"
  43 "    B       loc_FF1CA9C8 \n"
  44 "    B       loc_FF1CA968 \n"
  45 "    B       loc_FF1CA98C \n"
  46 "    B       loc_FF1CA99C \n"
  47 "    B       loc_FF1CA9A4 \n"
  48 "    B       loc_FF1CA9AC \n"
  49 "    B       loc_FF1CA9B4 \n"
  50 "    B       loc_FF1CA970 \n"
  51 "    B       loc_FF1CA9BC \n"
  52 "    B       loc_FF1CA97C \n"
  53 "    B       loc_FF1CA9C8 \n"
  54 "    B       loc_FF1CA9C4 \n"
  55 "    B       loc_FF1CA934 \n"
  56 "    B       loc_FF1CA904 \n"
  57 
  58 "loc_FF1CA904:\n"
  59 "    STR     R5, [R4, #0x40] \n"
  60 "    STR     R5, [R4, #0x30] \n"
  61 "    STR     R5, [R4, #0x34] \n"
  62 "    STRH    R5, [R4, #6] \n"
  63 "    STR     R6, [R4, #0xD8] \n"
  64 "    STR     R7, [R4, #0xF4] \n"
  65 "    LDR     R0, [R4, #0xC] \n"
  66 "    ADD     R0, R0, #1 \n"
  67 "    STR     R0, [R4, #0xC] \n"
  68 "    MOV     R0, #6 \n"
  69 "    STR     R0, [R4, #0x44] \n"
  70 "    B       loc_FF1CA954 \n"
  71 
  72 "loc_FF1CA934:\n"
  73 "    STR     R5, [R4, #0x40] \n"
  74 "    STR     R5, [R4, #0x30] \n"
  75 "    STR     R6, [R4, #0xD8] \n"
  76 "    STR     R7, [R4, #0xF4] \n"
  77 "    LDR     R0, [R4, #0xC] \n"
  78 "    ADD     R0, R0, #1 \n"
  79 "    STR     R0, [R4, #0xC] \n"
  80 "    STR     R8, [R4, #0x44] \n"
  81 
  82 "loc_FF1CA954:\n"
  83 "    LDR     R2, =0xFF1C8E50 \n"
  84 "    LDR     R1, =0xC4620 \n"
  85 "    LDR     R0, =0xFF1C8F64 \n"
  86 "    BL      sub_FF046660 \n"
  87 "    B       loc_FF1CA9C8 \n"
  88 
  89 "loc_FF1CA968:\n"
  90 "    BL      sub_FF1C9DE8 \n"
  91 "    B       loc_FF1CA9C8 \n"
  92 
  93 "loc_FF1CA970:\n"
  94 "    LDR     R1, [R4, #0xF4] \n"
  95 "    BLX     R1 \n"
  96 
  97 "    LDR     R0, =video_compression_rate\n" //added
  98 "    BL      set_quality\n"                 //added
  99 
 100 "    B       loc_FF1CA9C8 \n"
 101 
 102 "loc_FF1CA97C:\n"
 103 "    LDR     R1, [R0, #0x18] \n"
 104 "    LDR     R0, [R0, #4] \n"
 105 "    BL      sub_FF369B10 \n"
 106 "    B       loc_FF1CA9C8 \n"
 107 
 108 "loc_FF1CA98C:\n"
 109 "    LDR     R0, [R4, #0x44] \n"
 110 "    CMP     R0, #5 \n"
 111 "    STRNE   R8, [R4, #0x34] \n"
 112 "    B       loc_FF1CA9C8 \n"
 113 
 114 "loc_FF1CA99C:\n"
 115 "    BL      sub_FF1C9520 \n"
 116 "    B       loc_FF1CA9C8 \n"
 117 
 118 "loc_FF1CA9A4:\n"
 119 "    BL      sub_FF1C9218 \n"
 120 "    B       loc_FF1CA9C8 \n"
 121 
 122 "loc_FF1CA9AC:\n"
 123 "    BL      sub_FF1C8FBC \n"
 124 "    B       loc_FF1CA9C8 \n"
 125 
 126 "loc_FF1CA9B4:\n"
 127 "    BL      sub_FF1C8BE4 \n"
 128 "    B       loc_FF1CA9C8 \n"
 129 
 130 "loc_FF1CA9BC:\n"
 131 "    BL      sub_FF1C8B64 \n"
 132 "    B       loc_FF1CA9C8 \n"
 133 
 134 "loc_FF1CA9C4:\n"
 135 "    BL      sub_FF1CAF04 \n"
 136 
 137 "loc_FF1CA9C8:\n"
 138 "    LDR     R1, [SP, #4] \n"
 139 "    LDR     R3, =0xFF1C8900 /*'MovieRecorder.c'*/ \n"
 140 "    STR     R5, [R1] \n"
 141 "    STR     R9, [SP] \n"
 142 "    LDR     R0, [R4, #0x28] \n"
 143 "    MOV     R2, R10 \n"
 144 "    BL      sub_FF02A820 /*_PostMessageQueueStrictly*/ \n"
 145 "    B       loc_FF1CA88C \n"
 146 );
 147 }

/* [<][>][^][v][top][bottom][index][help] */