root/platform/ixus145_elph135/sub/100c/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 @ 0xFF98F0C4 - 0xFF98F254, length=101
  15 void __attribute__((naked,noinline)) movie_record_task() {
  16 asm volatile (
  17 "    STMFD   SP!, {R2-R10,LR} \n"
  18 "    LDR     R8, =0xFF98ECD8 \n"
  19 "    LDR     R4, =0x6DD0 \n"
  20 "    LDR     R9, =0x6D4 \n"
  21 "    LDR     R10, =0x2710 \n"
  22 "    MVN     R7, #0 \n"
  23 "    MOV     R5, #1 \n"
  24 "    MOV     R6, #0 \n"
  25 
  26 "loc_FF98F0E4:\n"
  27 "    LDR     R0, [R4, #0x2C] \n"
  28 "    MOV     R2, #0 \n"
  29 "    ADD     R1, SP, #4 \n"
  30 "    BL      sub_006B8458 /*_ReceiveMessageQueue*/ \n"
  31 "    LDR     R0, [R4, #0x34] \n"
  32 "    CMP     R0, #0 \n"
  33 "    LDRNE   R0, [R4, #0x14] \n"
  34 "    CMPNE   R0, #2 \n"
  35 "    LDRNE   R0, [R4, #0x48] \n"
  36 "    CMPNE   R0, #6 \n"
  37 "    BNE     loc_FF98F238 \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_FF98F238 \n"
  44 "    B       loc_FF98F1AC \n"
  45 "    B       loc_FF98F1D8 \n"
  46 "    B       loc_FF98F1E8 \n"
  47 "    B       loc_FF98F1F0 \n"
  48 "    B       loc_FF98F1B4 \n"
  49 "    B       loc_FF98F1F8 \n"
  50 "    B       loc_FF98F224 \n"
  51 "    B       loc_FF98F22C \n"
  52 "    B       loc_FF98F1C0 \n"
  53 "    B       loc_FF98F238 \n"
  54 "    B       loc_FF98F234 \n"
  55 "    B       loc_FF98F188 \n"
  56 "    B       loc_FF98F15C \n"
  57 
  58 "loc_FF98F15C:\n"
  59 "    STR     R6, [R4, #0x44] \n"
  60 "    STR     R6, [R4, #0x38] \n"
  61 "    STR     R7, [R4, #0xD0] \n"
  62 "    STRH    R6, [R4, #8] \n"
  63 "    STR     R8, [R4, #0xB0] \n"
  64 "    LDR     R0, [R4, #0x14] \n"
  65 "    ADD     R0, R0, #1 \n"
  66 "    STR     R0, [R4, #0x14] \n"
  67 "    MOV     R0, #6 \n"
  68 "    STR     R0, [R4, #0x48] \n"
  69 "    B       loc_FF98F1A4 \n"
  70 
  71 "loc_FF98F188:\n"
  72 "    STR     R6, [R4, #0x44] \n"
  73 "    STR     R7, [R4, #0xD0] \n"
  74 "    STR     R8, [R4, #0xB0] \n"
  75 "    LDR     R0, [R4, #0x14] \n"
  76 "    ADD     R0, R0, #1 \n"
  77 "    STR     R0, [R4, #0x14] \n"
  78 "    STR     R5, [R4, #0x48] \n"
  79 
  80 "loc_FF98F1A4:\n"
  81 "    STR     R5, [R4, #0xC] \n"
  82 "    B       loc_FF98F238 \n"
  83 
  84 "loc_FF98F1AC:\n"
  85 "    BL      sub_FF98E9C0 \n"
  86 //begin patch
  87 "    LDR     R0, =video_compression_rate\n" //added
  88 "    BL      set_quality \n"                 // added
  89 //end patch
  90 "    B       loc_FF98F238 \n"
  91 
  92 "loc_FF98F1B4:\n"
  93 "    LDR     R1, [R4, #0xB0] \n"
  94 "    BLX     R1 \n"
  95 "    B       loc_FF98F238 \n"
  96 
  97 "loc_FF98F1C0:\n"
  98 "    LDR     R1, [R0, #0x18] \n"
  99 "    LDR     R2, [R0, #0x28] \n"
 100 "    LDR     R3, [R0, #0x24] \n"
 101 "    LDR     R0, [R0, #4] \n"
 102 "    BL      sub_FFAC37E8 \n"
 103 "    B       loc_FF98F238 \n"
 104 
 105 "loc_FF98F1D8:\n"
 106 "    LDR     R0, [R4, #0x48] \n"
 107 "    CMP     R0, #5 \n"
 108 "    STRNE   R5, [R4, #0x38] \n"
 109 "    B       loc_FF98F238 \n"
 110 
 111 "loc_FF98F1E8:\n"
 112 "    BL      sub_FF98E634 \n"
 113 "    B       loc_FF98F238 \n"
 114 
 115 "loc_FF98F1F0:\n"
 116 "    BL      sub_FF98E4F4 \n"
 117 "    B       loc_FF98F238 \n"
 118 
 119 "loc_FF98F1F8:\n"
 120 "    LDR     R0, =0xCEF48 \n"
 121 "    LDR     R0, [R0, #8] \n"
 122 "    CMP     R0, #0 \n"
 123 "    LDRNE   R2, =0xFF98E414 \n"
 124 "    LDRNE   R0, =0xFF98E49C \n"
 125 "    MOVNE   R3, #0 \n"
 126 "    MOVNE   R1, R3 \n"
 127 "    BLNE    sub_FF86B828 \n"
 128 "    MOV     R0, #3 \n"
 129 "    STR     R0, [R4, #0x48] \n"
 130 "    B       loc_FF98F238 \n"
 131 
 132 "loc_FF98F224:\n"
 133 "    BL      sub_FF98E39C \n"
 134 "    B       loc_FF98F238 \n"
 135 
 136 "loc_FF98F22C:\n"
 137 "    BL      sub_FF98FB04 \n"
 138 "    B       loc_FF98F238 \n"
 139 
 140 "loc_FF98F234:\n"
 141 "    BL      sub_FF98FA28 \n"
 142 
 143 "loc_FF98F238:\n"
 144 "    LDR     R1, [SP, #4] \n"
 145 "    LDR     R3, =0xFF98E060 /*'MovieRecorder.c'*/ \n"
 146 "    STR     R6, [R1] \n"
 147 "    STR     R9, [SP] \n"
 148 "    LDR     R0, [R4, #0x30] \n"
 149 "    MOV     R2, R10 \n"
 150 "    BL      sub_006B7CF4 /*_PostMessageQueueStrictly*/ \n"
 151 "    B       loc_FF98F0E4 \n"
 152 );
 153 }

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