root/platform/a1400/sub/100b/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 @ 0xFF9715C8 - 0xFF971750, length=99
  15 void __attribute__((naked,noinline)) movie_record_task() {
  16 asm volatile (
  17 "    STMFD   SP!, {R2-R10,LR} \n"
  18 "    LDR     R8, =0xFF971244 \n"
  19 "    LDR     R4, =0x69A0 \n"
  20 "    LDR     R10, =0x2710 \n"
  21 "    MVN     R7, #0 \n"
  22 "    MOV     R5, #1 \n"
  23 "    MOV     R6, #0 \n"
  24 "    ADD     R9, R7, #0x670 \n"
  25 
  26 "loc_FF9715E8:\n"
  27 "    LDR     R0, [R4, #0x28] \n"
  28 "    MOV     R2, #0 \n"
  29 "    ADD     R1, SP, #4 \n"
  30 "    BL      sub_003F7418 /*_ReceiveMessageQueue*/ \n"
  31 "    LDR     R0, [R4, #0x30] \n"
  32 "    CMP     R0, #0 \n"
  33 "    LDRNE   R0, [R4, #0x10] \n"
  34 "    CMPNE   R0, #2 \n"
  35 "    LDRNE   R0, [R4, #0x44] \n"
  36 "    CMPNE   R0, #6 \n"
  37 "    BNE     loc_FF971734 \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_FF971734 \n"
  44 "    B       loc_FF9716B0 \n"
  45 "    B       loc_FF9716D4 \n"
  46 "    B       loc_FF9716E4 \n"
  47 "    B       loc_FF9716EC \n"
  48 "    B       loc_FF9716B8 \n"
  49 "    B       loc_FF9716F4 \n"
  50 "    B       loc_FF971720 \n"
  51 "    B       loc_FF971728 \n"
  52 "    B       loc_FF9716C4 \n"
  53 "    B       loc_FF971734 \n"
  54 "    B       loc_FF971730 \n"
  55 "    B       loc_FF97168C \n"
  56 "    B       loc_FF971660 \n"
  57 
  58 "loc_FF971660:\n"
  59 "    STR     R6, [R4, #0x40] \n"
  60 "    STR     R6, [R4, #0x34] \n"
  61 "    STR     R7, [R4, #0xC4] \n"
  62 "    STRH    R6, [R4, #6] \n"
  63 "    STR     R8, [R4, #0xAC] \n"
  64 "    LDR     R0, [R4, #0x10] \n"
  65 "    ADD     R0, R0, #1 \n"
  66 "    STR     R0, [R4, #0x10] \n"
  67 "    MOV     R0, #6 \n"
  68 "    STR     R0, [R4, #0x44] \n"
  69 "    B       loc_FF9716A8 \n"
  70 
  71 "loc_FF97168C:\n"
  72 "    STR     R6, [R4, #0x40] \n"
  73 "    STR     R7, [R4, #0xC4] \n"
  74 "    STR     R8, [R4, #0xAC] \n"
  75 "    LDR     R0, [R4, #0x10] \n"
  76 "    ADD     R0, R0, #1 \n"
  77 "    STR     R0, [R4, #0x10] \n"
  78 "    STR     R5, [R4, #0x44] \n"
  79 
  80 "loc_FF9716A8:\n"
  81 "    STR     R5, [R4, #8] \n"
  82 "    B       loc_FF971734 \n"
  83 
  84 "loc_FF9716B0:\n"
  85 "    BL      unlock_optical_zoom\n" // added
  86 "    BL      sub_FF970F94 \n"
  87 "    B       loc_FF971734 \n"
  88 
  89 "loc_FF9716B8:\n"
  90 "    LDR     R1, [R4, #0xAC] \n"
  91 "    BLX     R1 \n"
  92 "    LDR     R0, =video_compression_rate \n" // added
  93 "    BL      set_quality \n"                 // added
  94 "    BL      mute_on_zoom \n"                // added
  95 "    B       loc_FF971734 \n"
  96 
  97 "loc_FF9716C4:\n"
  98 "    LDR     R1, [R0, #0x18] \n"
  99 "    LDR     R0, [R0, #4] \n"
 100 "    BL      sub_FFA90F1C \n"
 101 "    B       loc_FF971734 \n"
 102 
 103 "loc_FF9716D4:\n"
 104 "    LDR     R0, [R4, #0x44] \n"
 105 "    CMP     R0, #5 \n"
 106 "    STRNE   R5, [R4, #0x34] \n"
 107 "    B       loc_FF971734 \n"
 108 
 109 "loc_FF9716E4:\n"
 110 "    BL      sub_FF970C10 \n"
 111 "    B       loc_FF971734 \n"
 112 
 113 "loc_FF9716EC:\n"
 114 "    BL      sub_FF970AE0 \n"
 115 "    B       loc_FF971734 \n"
 116 
 117 "loc_FF9716F4:\n"
 118 "    LDR     R0, =0xC1C40 \n"
 119 "    LDR     R0, [R0, #8] \n"
 120 "    CMP     R0, #0 \n"
 121 "    LDRNE   R2, =0xFF970A34 \n"
 122 "    LDRNE   R0, =0xFF970A88 \n"
 123 "    MOVNE   R3, #0 \n"
 124 "    MOVNE   R1, R3 \n"
 125 "    BLNE    sub_FF86264C \n"
 126 "    MOV     R0, #3 \n"
 127 "    STR     R0, [R4, #0x44] \n"
 128 "    B       loc_FF971734 \n"
 129 
 130 "loc_FF971720:\n"
 131 "    BL      sub_FF9709C0 \n"
 132 "    B       loc_FF971734 \n"
 133 
 134 "loc_FF971728:\n"
 135 "    BL      sub_FF97203C \n"
 136 "    B       loc_FF971734 \n"
 137 
 138 "loc_FF971730:\n"
 139 "    BL      sub_FF971F64 \n"
 140 
 141 "loc_FF971734:\n"
 142 "    LDR     R1, [SP, #4] \n"
 143 "    LDR     R3, =0xFF97073C /*'MovieRecorder.c'*/ \n"
 144 "    STR     R6, [R1] \n"
 145 "    STR     R9, [SP] \n"
 146 "    LDR     R0, [R4, #0x2C] \n"
 147 "    MOV     R2, R10 \n"
 148 "    BL      sub_003F7D90 /*_PostMessageQueueStrictly*/ \n"
 149 "    B       loc_FF9715E8 \n"
 150 );
 151 }

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