root/platform/ixus980_sd990/sub/101b/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
  4. sub_FF861AA8_my

   1 #include "conf.h"
   2 
   3 // from sx10
   4 void change_video_tables(int a, int b){
   5 }
   6 
   7 // from sx10, not sure if the values are right, seems to work
   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 void __attribute__((naked,noinline)) movie_record_task(){ 
  13  asm volatile(
  14 "                STMFD   SP!, {R2-R8,LR}\n"
  15 "                LDR     R7, =0x2710\n"
  16 "                LDR     R4, =0x53A0\n"
  17 "                MOV     R6, #0\n"
  18 "                MOV     R5, #1\n"
  19 "loc_FF86215C:\n" // main loop
  20 "                LDR     R0, [R4,#0x1C]\n"
  21 "                MOV     R2, #0\n"
  22 "                ADD     R1, SP, #4\n"
  23 "                BL      sub_FF82746C\n" // LOCATION: KerQueue.c:0
  24 "                LDR     R0, [R4,#0x24]\n"
  25 "                CMP     R0, #0\n"
  26 "                BNE     loc_FF86222C\n"
  27 "                LDR     R0, [SP,#4]\n"
  28 "                LDR     R1, [R0]\n"
  29 "                SUB     R1, R1, #2\n"
  30 "                CMP     R1, #9\n"
  31 "                ADDLS   PC, PC, R1,LSL#2\n"
  32 "                B       loc_FF86222C\n"
  33 "                B       loc_FF8621E0\n"
  34 "                B       loc_FF862200\n"
  35 "                B       loc_FF862210\n"
  36 "                B       loc_FF862218\n"
  37 "                B       loc_FF8621E8\n"
  38 "                B       loc_FF862220\n"
  39 "                B       loc_FF8621F0\n"
  40 "                B       loc_FF86222C\n"
  41 "                B       loc_FF862228\n"
  42 "                B       loc_FF8621B8\n"
  43 "loc_FF8621B8:\n"
  44 // jumptable FF862188 entry 9
  45 "                LDR     R0, =0xFF861E30\n" // loc_ret
  46 "                STR     R6, [R4,#0x38]\n"
  47 "                STR     R0, [R4,#0xA0]\n"
  48 "                LDR     R2, =0xFF8613B0\n" // sub_FF8613B0
  49 "                LDR     R1, =0x1AE50\n"
  50 "                LDR     R0, =0xFF861494\n" //loc_FF861494
  51 "                STR     R6, [R4,#0x28]\n"
  52 "                BL      sub_FF83BBFC\n"
  53 "                STR     R5, [R4,#0x3C]\n"
  54 "                B       loc_FF86222C\n" // -> jt 7, loop
  55 "loc_FF8621E0:\n"
  56 // jumptable FF862188 entry 0
  57 "                BL      unlock_optical_zoom\n" //  +
  58 "                BL      sub_FF861F28\n" // __MovieRecorder_c__0
  59 "                B       loc_FF86222C\n"
  60 "loc_FF8621E8:\n"
  61 // jumptable FF862188 entry 4
  62 "                BL      sub_FF861AA8_my\n" // -> _for quality overrides
  63 "                B       loc_FF86222C\n"
  64 "loc_FF8621F0:\n"
  65 // jumptable FF862188 entry 6
  66 "                LDR     R1, [R0,#0x10]\n"
  67 "                LDR     R0, [R0,#4]\n"
  68 "                BL      sub_FF937EF8\n" // LOCATION: MovWriter.c:0
  69 "                B       loc_FF86222C\n" // -> jt 7, loop
  70 "loc_FF862200:\n"
  71 // jumptable FF862188 entry 1
  72 "                LDR     R0, [R4,#0x3C]\n"
  73 "                CMP     R0, #5\n"
  74 "                STRNE   R5, [R4,#0x2C]\n"
  75 "                B       loc_FF86222C\n" // -> jt 7, loop
  76 "loc_FF862210:\n"
  77 // jumptable FF862188 entry 2
  78 "                BL      sub_FF8617F0\n" // __MovieRecorder_c__0
  79 "                B       loc_FF86222C\n" // -> jt 7, loop
  80 "loc_FF862218:\n"
  81 // jumptable FF862188 entry 3
  82 "                BL      sub_FF8614E0\n" // __MovieRecorder_c__0
  83 "                B       loc_FF86222C\n" // -> jt 7, loop
  84 "loc_FF862220:\n"
  85 // jumptable FF862188 entry 5
  86 "                BL      sub_FF86133C\n" //__MovieRecorder_c__100
  87 "                B       loc_FF86222C\n" // -> jt 7, loop
  88 "loc_FF862228:\n"
  89 // jumptable FF862188 entry 8
  90 "                BL      sub_FF862398\n" /// __MovieRecorder_c__100
  91 "loc_FF86222C:\n"
  92 // jumptable FF862188 default entry
  93 // jumptable FF862188 entry 7
  94 "                LDR     R1, [SP,#4]\n"
  95 "                MOV     R3, #0x430\n"
  96 "                STR     R6, [R1]\n"
  97 "                STR     R3, [SP]\n"
  98 "                LDR     R0, [R4,#0x20]\n"
  99 "                LDR     R3, =0xFF86113C\n"// =aMovierecorder_
 100 "                MOV     R2, R7\n"
 101 "                BL      sub_FF827DC0\n"
 102 "                B       loc_FF86215C\n" // -> main loop
 103  );
 104 }
 105 
 106 void __attribute__((naked,noinline)) sub_FF861AA8_my(){ 
 107  asm volatile(
 108 "                STMFD   SP!, {R4-R10,LR}\n"
 109 "                SUB     SP, SP, #0x40\n"
 110 "                MOV     R7, #0\n"
 111 "                LDR     R6, =0x53A0\n"
 112 "                MOV     R4, R0\n"
 113 "                STR     R7, [SP,#0x30]\n"
 114 "                STR     R7, [SP,#0x28]\n"
 115 "                LDR     R0, [R6,#0x3C]\n"
 116 "                MOV     R9, #4\n"
 117 "                CMP     R0, #3\n"
 118 "                STREQ   R9, [R6,#0x3C]\n"
 119 "                LDR     R0, [R6,#0xA0]\n"
 120 "                MOV     R8, #0\n"
 121 "                BLX     R0\n"
 122 "                LDR     R0, [R6,#0x3C]\n"
 123 "                CMP     R0, #4\n"
 124 "                BNE     loc_FF861C2C\n"
 125 "                LDRH    R0, [R6,#2]\n"
 126 "                MOV     R5, #1\n"
 127 "                CMP     R0, #1\n"
 128 "                BNE     loc_FF861B24\n"
 129 "                LDRH    R1, [R6,#4]\n"
 130 "                LDR     R0, [R6,#0x48]\n"
 131 "                MUL     R0, R1, R0\n"
 132 "                MOV     R1, #0x3E8\n"
 133 "                BL      sub_FFAE072C\n"
 134 "                MOV     R1, R0\n"
 135 "                LDR     R0, [R6,#0x50]\n"
 136 "                BL      sub_FFAE072C\n"
 137 "                CMP     R1, #0\n"
 138 "                BNE     loc_FF861B40\n"
 139 "loc_FF861B24:\n"
 140 "                ADD     R3, SP, #0x28\n"
 141 "                ADD     R2, SP, #0x2C\n"
 142 "                ADD     R1, SP, #0x30\n"
 143 "                ADD     R0, SP, #0x34\n"
 144 "                BL      sub_FF937F94\n" //__MovWriter_c__0 ; LOCATION: MovWriter.c:0
 145 "                MOVS    R8, R0\n"
 146 "                BNE     loc_FF861B5C\n"
 147 "loc_FF861B40:\n"
 148 "                LDR     R0, [R6,#0x2C]\n"
 149 "                CMP     R0, #1\n"
 150 "                BNE     loc_FF861C40\n"
 151 "                LDR     R0, [R6,#0x50]\n"
 152 "                LDR     R1, [R6,#0x40]\n"
 153 "                CMP     R0, R1\n"
 154 "                BCC     loc_FF861C40\n"
 155 "loc_FF861B5C:\n"
 156 "                CMP     R8, #0x80000001\n"
 157 "                STREQ   R9, [R6,#0x54]\n"
 158 "                BEQ     loc_FF861B94\n"
 159 "                CMP     R8, #0x80000003\n"
 160 "                STREQ   R5, [R6,#0x54]\n"
 161 "                BEQ     loc_FF861B94\n"
 162 "                CMP     R8, #0x80000005\n"
 163 "                MOVEQ   R0, #2\n"
 164 "                BEQ     loc_FF861B90\n"
 165 "                CMP     R8, #0x80000007\n"
 166 "                STRNE   R7, [R6,#0x54]\n"
 167 "                BNE     loc_FF861B94\n"
 168 "                MOV     R0, #3\n"
 169 "loc_FF861B90:\n"
 170 "                STR     R0, [R6,#0x54]\n"
 171 "loc_FF861B94:\n"
 172 "                LDR     R0, =0x1AE84\n"
 173 "                LDR     R0, [R0,#8]\n"
 174 "                CMP     R0, #0\n"
 175 "                BEQ     loc_FF861BAC\n"
 176 "                BL      sub_FF84BCCC\n"
 177 "                B       loc_FF861BB0\n"
 178 "loc_FF861BAC:\n"
 179 "                BL      sub_FF86133C\n" //__MovieRecorder_c__100
 180 "loc_FF861BB0:\n"
 181 "                LDR     R0, [R4,#0x14]\n"
 182 "                LDR     R1, [R4,#0x18]\n"
 183 "                ADD     R3, SP, #0x38\n"
 184 "                MVN     R2, #1\n"
 185 "                ADD     R7, SP, #0x18\n"
 186 "                STMIA   R7, {R0-R3}\n"
 187 "                MOV     R0, #0\n"
 188 "                ADD     R1, SP, #0x3C\n"
 189 "                ADD     R7, SP, #8\n"
 190 "                LDRD    R2, [R6,#0x68]\n"
 191 "                STMIA   R7, {R0-R3}\n"
 192 "                MOV     R3, #0\n"
 193 "                MOV     R2, #0x40\n"
 194 "                STRD    R2, [SP]\n"
 195 "                LDMIB   R4, {R0,R1}\n"
 196 "                LDR     R3, =0x1AE9C\n"
 197 "                MOV     R2, R10\n"
 198 "                BL      sub_FF8F5C40\n"
 199 "                LDR     R0, [R6,#0x14]\n"
 200 "                MOV     R1, #0x3E8\n"
 201 "                BL      sub_FF827888\n" //eventproc_export_TakeSemaphore ; LOCATION: KerSem.c:0
 202 "                CMP     R0, #9\n"
 203 "                BEQ     loc_FF861CC0\n"
 204 "                LDR     R0, [SP,#0x38]\n"
 205 "                CMP     R0, #0\n"
 206 "                BNE     loc_FF861CDC\n"
 207 "                MOV     R0, #1\n"
 208 "                BL      sub_FF8F5CE8\n"
 209 "                BL      sub_FF8F5D24\n"
 210 "                MOV     R0, #5\n"
 211 "                STR     R0, [R6,#0x3C]\n"
 212 "loc_FF861C2C:\n"
 213 "                ADD     SP, SP, #0x40\n"
 214 "                LDMFD   SP!, {R4-R10,PC}\n"
 215 "loc_FF861C34:\n"
 216 "                BL      sub_FF87DD18\n" // eventproc_export_HardwareDefect
 217 "                MOV     R0, #1\n"
 218 "                B       loc_FF861D78\n"
 219 "loc_FF861C40:\n"
 220 "                LDR     R12, [SP,#0x30]\n"
 221 "                CMP     R12, #0\n"
 222 "                BEQ     loc_FF861DD8\n"
 223 "                STR     R5, [R6,#0x30]\n"
 224 "                LDR     R0, [R6,#0x50]\n"
 225 "                LDR     R8, [R4,#0xC]\n"
 226 "                CMP     R0, #0\n"
 227 "                LDRNE   LR, [SP,#0x34]\n"
 228 "                BNE     loc_FF861D08\n"
 229 "                LDR     R0, [R4,#0x14]\n"
 230 "                LDR     R1, [R4,#0x18]\n"
 231 "                ADD     R3, SP, #0x38\n"
 232 "                MVN     R2, #0\n"
 233 "                ADD     R9, SP, #0x18\n"
 234 "                STMIA   R9, {R0-R3}\n"
 235 "                LDRD    R2, [R6,#0x68]\n"
 236 "                LDR     R0, [SP,#0x28]\n"
 237 "                ADD     R1, SP, #0x3C\n"
 238 "                ADD     R9, SP, #8\n"
 239 "                STMIA   R9, {R0-R3}\n"
 240 "                LDR     R3, [SP,#0x2C]\n"
 241 "                STR     R12, [SP]\n"
 242 "                STR     R3, [SP,#4]\n"
 243 "                LDMIB   R4, {R0,R1}\n"
 244 "                LDR     R3, [SP,#0x34]\n"
 245 "                MOV     R2, R8\n"
 246 "                BL      sub_FF8F5C40\n"
 247 "                LDR     R0, [R6,#0x14]\n"
 248 "                MOV     R1, #0x3E8\n"
 249 "                BL      sub_FF827888\n" // eventproc_export_TakeSemaphore ; LOCATION: KerSem.c:0
 250 "                CMP     R0, #9\n"
 251 "                BNE     loc_FF861CD0\n"
 252 "loc_FF861CC0:\n"
 253 "                BL      sub_FF938460\n"
 254 "                MOV     R0, #0x90000\n"
 255 "                STR     R5, [R6,#0x3C]\n"
 256 "                B       loc_FF861C34\n"
 257 "loc_FF861CD0:\n"
 258 "                LDR     R0, [SP,#0x38]\n"
 259 "                CMP     R0, #0\n"
 260 "                BEQ     loc_FF861CEC\n"
 261 "loc_FF861CDC:\n"
 262 "                BL      sub_FF938460\n"
 263 "                MOV     R0, #0xA0000\n"
 264 "                STR     R5, [R6,#0x3C]\n"
 265 "                B       loc_FF861C34\n"
 266 "loc_FF861CEC:\n"
 267 "                MOV     R0, #1\n"
 268 "                BL      sub_FF8F5CE8\n"
 269 "                LDR     R0, [SP,#0x3C]\n"
 270 "                LDR     R1, [SP,#0x34]\n"
 271 "                ADD     LR, R1, R0\n"
 272 "                LDR     R1, [SP,#0x30]\n"
 273 "                SUB     R12, R1, R0\n"
 274 "loc_FF861D08:\n"
 275 "                LDR     R0, [R4,#0x14]\n"
 276 "                LDR     R2, [R6,#0x4C]\n"
 277 "                LDR     R1, [R4,#0x18]\n"
 278 "                ADD     R3, SP, #0x38\n"
 279 "                ADD     R9, SP, #0x18\n"
 280 "                STMIA   R9, {R0-R3}\n"
 281 "                LDRD    R2, [R6,#0x68]\n"
 282 "                LDR     R0, [SP,#0x28]\n"
 283 "                ADD     R1, SP, #0x3C\n"
 284 "                ADD     R9, SP, #8\n"
 285 "                STMIA   R9, {R0-R3}\n"
 286 "                LDR     R3, [SP,#0x2C]\n"
 287 "                STR     R12, [SP]\n"
 288 "                STR     R3, [SP,#4]\n"
 289 "                LDMIB   R4, {R0,R1}\n"
 290 "                MOV     R3, LR\n"
 291 "                MOV     R2, R8\n"
 292 "                BL      sub_FF8F5C40\n"
 293 "                LDR     R0, [R6,#0x14]\n"
 294 "                MOV     R1, #0x3E8\n"
 295 "                BL      sub_FF827888\n" // eventproc_export_TakeSemaphore ; LOCATION: KerSem.c:0
 296 "                CMP     R0, #9\n"
 297 "                BNE     loc_FF861D80\n"
 298 "                BL      sub_FF938460\n"
 299 "                MOV     R0, #0x90000\n"
 300 "                STR     R5, [R6,#0x3C]\n"
 301 "                BL      sub_FF87DD18\n" // eventproc_export_HardwareDefect
 302 "                MOV     R0, #0\n"
 303 "loc_FF861D78:\n"
 304 "                BL      sub_FF8F5CE8\n"
 305 "                B       loc_FF861C2C\n"
 306 "loc_FF861D80:\n"
 307 "                LDR     R0, [SP,#0x38]\n"
 308 "                CMP     R0, #0\n"
 309 "                BEQ     loc_FF861DA0\n"
 310 "                BL      sub_FF938460\n"
 311 "                MOV     R0, #0xA0000\n"
 312 "                STR     R5, [R6,#0x3C]\n"
 313 "                BL      sub_FF87DD18\n" // eventproc_export_HardwareDefect
 314 "                B       loc_FF861C2C\n"
 315 "loc_FF861DA0:\n"
 316 "                MOV     R0, #0\n"
 317 "                BL      sub_FF8F5CE8\n"
 318 "                LDR     R0, [SP,#0x34]\n"
 319 "                LDR     R1, [SP,#0x3C]\n"
 320 "                BL      sub_FF9381BC\n" // __MovWriter_c__0 ; LOCATION: MovWriter.c:0
 321 "                LDR     R0, [R6,#0x4C]\n"
 322 "                LDR     R3, =0x540C\n"
 323 "                ADD     R1, R0, #1\n"
 324 "                STR     R1, [R6,#0x4C]\n"
 325 "                STR     R3, [SP]\n"
 326 "                LDR     R0, [SP,#0x3C]\n"
 327 "                SUB     R3, R3, #4\n"
 328 "                MOV     R2, #0xF\n"
 329 "                BL      sub_FF9364B8\n"
 330 "                LDR     R0, =0x540C-4\n" // +
 331 "                BL      set_quality\n" // +
 332 "loc_FF861DD8:\n"
 333 "                LDR     R0, [R6,#0x50]\n"
 334 "                ADD     R0, R0, #1\n"
 335 "                STR     R0, [R6,#0x50]\n"
 336 "                LDR     R1, [R6,#0x78]\n"
 337 "                MUL     R0, R1, R0\n"
 338 "                LDR     R1, [R6,#0x74]\n"
 339 "                BL      sub_FFAE072C\n"
 340 "                MOV     R4, R0\n"
 341 "                BL      sub_FF938498\n"
 342 "                LDR     R1, [R6,#0x70]\n"
 343 "                CMP     R1, R4\n"
 344 "                BNE     loc_FF861E14\n"
 345 "                LDR     R0, [R6,#0x34]\n"
 346 "                CMP     R0, #1\n"
 347 "                BNE     loc_FF861E28\n"
 348 "loc_FF861E14:\n"
 349 "                LDR     R1, [R6,#0x84]\n"
 350 "                MOV     R0, R4\n"
 351 "                BLX     R1\n"
 352 "                STR     R4, [R6,#0x70]\n"
 353 "                STR     R7, [R6,#0x34]\n"
 354 "loc_FF861E28:\n"
 355 "                STR     R7, [R6,#0x30]\n"
 356 "                B       loc_FF861C2C\n"
 357  );
 358 }
 359 

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