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

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