root/platform/ixus160_elph160/sub/100a/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 /*************************************************************/
  15 //** movie_record_task @ 0xFF995D5C - 0xFF995EEC, length=101
  16 void __attribute__((naked,noinline)) movie_record_task() {
  17 asm volatile (
  18 "    STMFD   SP!, {R2-R10,LR} \n"
  19 "    LDR     R8, =0xFF99595C \n"
  20 "    LDR     R4, =0x7080 \n"
  21 "    LDR     R9, =0x709 \n"
  22 "    LDR     R10, =0x2710 \n"
  23 "    MVN     R7, #0 \n"
  24 "    MOV     R5, #1 \n"
  25 "    MOV     R6, #0 \n"
  26 
  27 "loc_FF995D7C:\n"
  28 "    LDR     R0, [R4, #0x30] \n"
  29 "    MOV     R2, #0 \n"
  30 "    ADD     R1, SP, #4 \n"
  31 "    BL      sub_FF829E30 /*_ReceiveMessageQueue*/ \n"
  32 "    LDR     R0, [R4, #0x38] \n"
  33 "    CMP     R0, #0 \n"
  34 "    LDRNE   R0, [R4, #0x14] \n"
  35 "    CMPNE   R0, #2 \n"
  36 "    LDRNE   R0, [R4, #0x4C] \n"
  37 "    CMPNE   R0, #6 \n"
  38 "    BNE     loc_FF995ED0 \n"
  39 "    LDR     R0, [SP, #4] \n"
  40 "    LDR     R1, [R0] \n"
  41 "    SUB     R1, R1, #2 \n"
  42 "    CMP     R1, #0xD \n"
  43 "    ADDCC   PC, PC, R1, LSL#2 \n"
  44 "    B       loc_FF995ED0 \n"
  45 "    B       loc_FF995E44 \n"
  46 "    B       loc_FF995E70 \n"
  47 "    B       loc_FF995E80 \n"
  48 "    B       loc_FF995E88 \n"
  49 "    B       loc_FF995E4C \n"
  50 "    B       loc_FF995E90 \n"
  51 "    B       loc_FF995EBC \n"
  52 "    B       loc_FF995EC4 \n"
  53 "    B       loc_FF995E58 \n"
  54 "    B       loc_FF995ED0 \n"
  55 "    B       loc_FF995ECC \n"
  56 "    B       loc_FF995E20 \n"
  57 "    B       loc_FF995DF4 \n"
  58 
  59 "loc_FF995DF4:\n"
  60 "    STR     R6, [R4, #0x48] \n"
  61 "    STR     R6, [R4, #0x3C] \n"
  62 "    STR     R7, [R4, #0xD4] \n"
  63 "    STRH    R6, [R4, #8] \n"
  64 "    STR     R8, [R4, #0xB4] \n"
  65 "    LDR     R0, [R4, #0x14] \n"
  66 "    ADD     R0, R0, #1 \n"
  67 "    STR     R0, [R4, #0x14] \n"
  68 "    MOV     R0, #6 \n"
  69 "    STR     R0, [R4, #0x4C] \n"
  70 "    B       loc_FF995E3C \n"
  71 
  72 "loc_FF995E20:\n"
  73 "    STR     R6, [R4, #0x48] \n"
  74 "    STR     R7, [R4, #0xD4] \n"
  75 "    STR     R8, [R4, #0xB4] \n"
  76 "    LDR     R0, [R4, #0x14] \n"
  77 "    ADD     R0, R0, #1 \n"
  78 "    STR     R0, [R4, #0x14] \n"
  79 "    STR     R5, [R4, #0x4C] \n"
  80 
  81 "loc_FF995E3C:\n"
  82 "    STR     R5, [R4, #0xC] \n"
  83 "    B       loc_FF995ED0 \n"
  84 
  85 "loc_FF995E44:\n"
  86 "    BL      sub_FF995644 \n"
  87 "    B       loc_FF995ED0 \n"
  88 
  89 "loc_FF995E4C:\n"
  90 "    LDR     R1, [R4, #0xB4] \n"
  91 "    BLX     R1 \n"
  92 //begin patch
  93 "    LDR     R0, =video_compression_rate \n" // added
  94 "    BL      set_quality \n"                 // added
  95 //end patch
  96 "    B       loc_FF995ED0 \n"
  97 
  98 "loc_FF995E58:\n"
  99 "    LDR     R1, [R0, #0x18] \n"
 100 "    LDR     R2, [R0, #0x28] \n"
 101 "    LDR     R3, [R0, #0x24] \n"
 102 "    LDR     R0, [R0, #4] \n"
 103 "    BL      sub_FFAD3350 \n"
 104 "    B       loc_FF995ED0 \n"
 105 
 106 "loc_FF995E70:\n"
 107 "    LDR     R0, [R4, #0x4C] \n"
 108 "    CMP     R0, #5 \n"
 109 "    STRNE   R5, [R4, #0x3C] \n"
 110 "    B       loc_FF995ED0 \n"
 111 
 112 "loc_FF995E80:\n"
 113 "    BL      sub_FF9952A4 \n"
 114 "    B       loc_FF995ED0 \n"
 115 
 116 "loc_FF995E88:\n"
 117 "    BL      sub_FF995164 \n"
 118 "    B       loc_FF995ED0 \n"
 119 
 120 "loc_FF995E90:\n"
 121 "    LDR     R0, =0xD08C8 \n"
 122 "    LDR     R0, [R0, #8] \n"
 123 "    CMP     R0, #0 \n"
 124 "    LDRNE   R2, =0xFF995084 \n"
 125 "    LDRNE   R0, =0xFF99510C \n"
 126 "    MOVNE   R3, #0 \n"
 127 "    MOVNE   R1, R3 \n"
 128 "    BLNE    sub_FF86EA38 \n"
 129 "    MOV     R0, #3 \n"
 130 "    STR     R0, [R4, #0x4C] \n"
 131 "    B       loc_FF995ED0 \n"
 132 
 133 "loc_FF995EBC:\n"
 134 "    BL      sub_FF994FF8 \n"
 135 "    B       loc_FF995ED0 \n"
 136 
 137 "loc_FF995EC4:\n"
 138 "    BL      sub_FF9966D4 \n"
 139 "    B       loc_FF995ED0 \n"
 140 
 141 "loc_FF995ECC:\n"
 142 "    BL      sub_FF994ED4 \n"
 143 
 144 "loc_FF995ED0:\n"
 145 "    LDR     R1, [SP, #4] \n"
 146 "    LDR     R3, =0xFF994BB0 /*'MovieRecorder.c'*/ \n"
 147 "    STR     R6, [R1] \n"
 148 "    STR     R9, [SP] \n"
 149 "    LDR     R0, [R4, #0x34] \n"
 150 "    MOV     R2, R10 \n"
 151 "    BL      sub_FF826774 /*_PostMessageQueueStrictly*/ \n"
 152 "    B       loc_FF995D7C \n"
 153 );
 154 }

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