root/platform/n_facebook/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 // Powershot N Facebook
   5 #include "conf.h"
   6 
   7 void change_video_tables(int a, int b){ }
   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 // movie_record_task - based on A1400
  14 //////////////////////////////////////////////////////////////
  15 
  16 /*************************************************************/
  17 //** movie_record_task @ 0xFF23B0E0 - 0xFF23B2A4, length=114
  18 void __attribute__((naked,noinline)) movie_record_task() {
  19 asm volatile (
  20 "    STMFD   SP!, {R2-R10,LR} \n"
  21 "    LDR     R8, =0xFF23AD10 \n"
  22 "    LDR     R4, =0xA5B0 \n"
  23 "    LDR     R9, =0x2710 \n"
  24 "    MVN     R7, #0 \n"
  25 "    MOV     R5, #1 \n"
  26 "    MOV     R6, #0 \n"
  27 
  28 "loc_FF23B0FC:\n"
  29 "    LDR     R0, [R4, #0x28] \n"
  30 "    MOV     R2, #0 \n"
  31 "    ADD     R1, SP, #4 \n"
  32 "    BL      sub_0068BDE4 /*_ReceiveMessageQueue*/ \n"
  33 "    LDR     R0, [R4, #0x30] \n"
  34 "    CMP     R0, #0 \n"
  35 "    LDRNE   R0, [R4, #0x10] \n"
  36 "    CMPNE   R0, #2 \n"
  37 "    LDRNE   R0, [R4, #0x44] \n"
  38 "    CMPNE   R0, #6 \n"
  39 "    BNE     loc_FF23B284 \n"
  40 "    LDR     R0, [SP, #4] \n"
  41 "    LDR     R1, [R0] \n"
  42 "    SUB     R1, R1, #2 \n"
  43 "    CMP     R1, #0xF \n"
  44 "    ADDCC   PC, PC, R1, LSL#2 \n"
  45 "    B       loc_FF23B284 \n"
  46 "    B       loc_FF23B1CC \n"
  47 "    B       loc_FF23B1F0 \n"
  48 "    B       loc_FF23B200 \n"
  49 "    B       loc_FF23B208 \n"
  50 "    B       loc_FF23B210 \n"
  51 "    B       loc_FF23B218 \n"
  52 "    B       loc_FF23B1D4 \n"
  53 "    B       loc_FF23B244 \n"
  54 "    B       loc_FF23B270 \n"
  55 "    B       loc_FF23B278 \n"
  56 "    B       loc_FF23B1E0 \n"
  57 "    B       loc_FF23B284 \n"
  58 "    B       loc_FF23B280 \n"
  59 "    B       loc_FF23B1A8 \n"
  60 "    B       loc_FF23B17C \n"
  61 
  62 "loc_FF23B17C:\n"
  63 "    STR     R6, [R4, #0x40] \n"
  64 "    STR     R6, [R4, #0x34] \n"
  65 "    STR     R7, [R4, #0xE4] \n"
  66 "    STRH    R6, [R4, #6] \n"
  67 "    STR     R8, [R4, #0xCC] \n"
  68 "    LDR     R0, [R4, #0x10] \n"
  69 "    ADD     R0, R0, #1 \n"
  70 "    STR     R0, [R4, #0x10] \n"
  71 "    MOV     R0, #6 \n"
  72 "    STR     R0, [R4, #0x44] \n"
  73 "    B       loc_FF23B1C4 \n"
  74 
  75 "loc_FF23B1A8:\n"
  76 "    STR     R6, [R4, #0x40] \n"
  77 "    STR     R7, [R4, #0xE4] \n"
  78 "    STR     R8, [R4, #0xCC] \n"
  79 "    LDR     R0, [R4, #0x10] \n"
  80 "    ADD     R0, R0, #1 \n"
  81 "    STR     R0, [R4, #0x10] \n"
  82 "    STR     R5, [R4, #0x44] \n"
  83 
  84 "loc_FF23B1C4:\n"
  85 "    STR     R5, [R4, #8] \n"
  86 "    B       loc_FF23B284 \n"
  87 
  88 "loc_FF23B1CC:\n"
  89 "    BL      unlock_optical_zoom\n" // added
  90 "    BL      sub_FF23A974 \n"
  91 "    B       loc_FF23B284 \n"
  92 
  93 "loc_FF23B1D4:\n"
  94 "    LDR     R1, [R4, #0xCC] \n"
  95 "    BLX     R1 \n"
  96 "    LDR     R0, =video_compression_rate \n" // added
  97 "    BL      set_quality \n"                 // added
  98 "    BL      mute_on_zoom \n"                // added
  99 "    B       loc_FF23B284 \n"
 100 
 101 "loc_FF23B1E0:\n"
 102 "    LDR     R1, [R0, #0x18] \n"
 103 "    LDR     R0, [R0, #4] \n"
 104 "    BL      sub_FF3E4BB0 \n"
 105 "    B       loc_FF23B284 \n"
 106 
 107 "loc_FF23B1F0:\n"
 108 "    LDR     R0, [R4, #0x44] \n"
 109 "    CMP     R0, #5 \n"
 110 "    STRNE   R5, [R4, #0x34] \n"
 111 "    B       loc_FF23B284 \n"
 112 
 113 "loc_FF23B200:\n"
 114 "    BL      sub_FF239ECC \n"
 115 "    B       loc_FF23B284 \n"
 116 
 117 "loc_FF23B208:\n"
 118 "    BL      sub_FF239DB4 \n"
 119 "    B       loc_FF23B284 \n"
 120 
 121 "loc_FF23B210:\n"
 122 "    BL      sub_FF239A68 \n"
 123 "    B       loc_FF23B284 \n"
 124 
 125 "loc_FF23B218:\n"
 126 "    LDR     R1, [R4, #0x94] \n"
 127 "    LDR     R0, =0x4840F640 \n"
 128 "    CMP     R1, #0 \n"
 129 "    LDREQ   R1, =0xFF239A2C \n"
 130 "    LDREQ   R0, [R4, #0x98] \n"
 131 "    BEQ     loc_FF23B23C \n"
 132 "    BL      sub_FF3E586C \n"
 133 "    LDR     R1, =0xFF239A2C \n"
 134 "    MOV     R0, #0 \n"
 135 
 136 "loc_FF23B23C:\n"
 137 "    BL      sub_FF3E3E58 \n"
 138 "    B       loc_FF23B284 \n"
 139 
 140 "loc_FF23B244:\n"
 141 "    LDR     R0, =0x213834 \n"
 142 "    LDR     R0, [R0, #8] \n"
 143 "    CMP     R0, #0 \n"
 144 "    LDRNE   R2, =0xFF2399B4 \n"
 145 "    LDRNE   R0, =0xFF239A08 \n"
 146 "    MOVNE   R3, #0 \n"
 147 "    MOVNE   R1, R3 \n"
 148 "    BLNE    sub_FF095224 \n"
 149 "    MOV     R0, #3 \n"
 150 "    STR     R0, [R4, #0x44] \n"
 151 "    B       loc_FF23B284 \n"
 152 
 153 "loc_FF23B270:\n"
 154 "    BL      sub_FF239934 \n"
 155 "    B       loc_FF23B284 \n"
 156 
 157 "loc_FF23B278:\n"
 158 "    BL      sub_FF23BCD0 \n"
 159 "    B       loc_FF23B284 \n"
 160 
 161 "loc_FF23B280:\n"
 162 "    BL      sub_FF23BBF0 \n"
 163 
 164 "loc_FF23B284:\n"
 165 "    LDR     R1, [SP, #4] \n"
 166 "    MOV     R3, #0x680 \n"
 167 "    STR     R6, [R1] \n"
 168 "    STR     R3, [SP] \n"
 169 "    LDR     R3, =0xFF239580 /*'MovieRecorder.c'*/ \n"
 170 "    LDR     R0, [R4, #0x2C] \n"
 171 "    MOV     R2, R9 \n"
 172 "    BL      sub_0068B044 /*_PostMessageQueueStrictly*/ \n"
 173 "    B       loc_FF23B0FC \n"
 174 );
 175 }

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