root/platform/ixus870_sd880/sub/102b/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_FF85D98C_my

   1 #include "conf.h"
   2 
   3 void change_video_tables(__attribute__ ((unused))int a, __attribute__ ((unused))int b) {}
   4 
   5 
   6 void  set_quality(int *x){ // -17 highest; +12 lowest
   7  if (conf.video_mode) *x=12-((conf.video_quality-1)*(12+17)/(99-1));
   8 }
   9 
  10 
  11 void __attribute__((naked,noinline)) movie_record_task(){ 
  12  // from 0xFF85E03C (found via call to taskcreate_AviWrite)
  13  asm volatile(
  14 
  15                  "STMFD   SP!, {R2-R8,LR}\n"
  16                  "LDR     R7, =0x2710\n"
  17                  "LDR     R4, =0x51A8\n"
  18                  "MOV     R6, #0\n"
  19                  "MOV     R5, #1\n"
  20  "loc_FF85E050:\n"
  21                  "LDR     R0, [R4,#0x1C]\n"
  22                  "MOV     R2, #0\n"
  23                  "ADD     R1, SP, #0xC\n"
  24                  "BL      sub_FF827098\n"
  25                  "LDR     R0, [R4,#0x24]\n"
  26                  "CMP     R0, #0\n"
  27                  "BNE     loc_FF85E120\n"
  28                  "LDR     R0, [SP,#0xC]\n"
  29                  "LDR     R1, [R0]\n"
  30                  "SUB     R1, R1, #2\n"
  31                  "CMP     R1, #9\n"
  32                  "ADDLS   PC, PC, R1,LSL#2\n"
  33                  "B       loc_FF85E120\n"
  34  "loc_FF85E084:\n"
  35                  "B       loc_FF85E0D4\n"
  36  "loc_FF85E088:\n"
  37                  "B       loc_FF85E0F4\n"
  38  "loc_FF85E08C:\n"
  39                  "B       loc_FF85E104\n"
  40  "loc_FF85E090:\n"
  41                  "B       loc_FF85E10C\n"
  42  "loc_FF85E094:\n"
  43                  "B       loc_FF85E0DC\n"
  44  "loc_FF85E098:\n"
  45                  "B       loc_FF85E114\n"
  46  "loc_FF85E09C:\n"
  47                  "B       loc_FF85E0E4\n"
  48  "loc_FF85E0A0:\n"
  49                  "B       loc_FF85E120\n"
  50  "loc_FF85E0A4:\n"
  51                  "B       loc_FF85E11C\n"
  52  "loc_FF85E0A8:\n"
  53                  "B       loc_FF85E0AC\n"
  54  "loc_FF85E0AC:\n"
  55                  "STR     R6, [R4,#0x38]\n"
  56                  "LDR     R0, =0xFF85DD14\n"
  57                  "LDR     R2, =0xFF85D28C\n"
  58                  "LDR     R1, =0x1AB94\n"
  59                  "STR     R0, [R4,#0xA0]\n"
  60                  "LDR     R0, =0xFF85D370\n"
  61                  "STR     R6, [R4,#0x28]\n"
  62                  "BL      sub_FF8C3BFC\n"
  63                  "STR     R5, [R4,#0x3C]\n"
  64                  "B       loc_FF85E120\n"
  65  "loc_FF85E0D4:\n"
  66                  "BL      unlock_optical_zoom\n" // + (used ixus980)
  67                  "BL      sub_FF85DE1C\n"
  68                  "B       loc_FF85E120\n"
  69  "loc_FF85E0DC:\n"
  70                  "BL      sub_FF85D98C_my\n"  //--------------->
  71                  "B       loc_FF85E120\n"
  72  "loc_FF85E0E4:\n"
  73                  "LDR     R1, [R0,#0x10]\n"
  74                  "LDR     R0, [R0,#4]\n"
  75                  "BL      sub_FF92FDF0\n"
  76                  "B       loc_FF85E120\n"
  77  "loc_FF85E0F4:\n"
  78                  "LDR     R0, [R4,#0x3C]\n"
  79                  "CMP     R0, #5\n"
  80                  "STRNE   R5, [R4,#0x2C]\n"
  81                  "B       loc_FF85E120\n"
  82  "loc_FF85E104:\n"
  83                  "BL      sub_FF85D6CC\n"
  84                  "B       loc_FF85E120\n"
  85  "loc_FF85E10C:\n"
  86                  "BL      sub_FF85D3BC\n"
  87                  "B       loc_FF85E120\n"
  88  "loc_FF85E114:\n"
  89                  "BL      sub_FF85D218\n"
  90                  "B       loc_FF85E120\n"
  91  "loc_FF85E11C:\n"
  92                  "BL      sub_FF85E28C\n"
  93  "loc_FF85E120:\n"
  94                  "LDR     R1, [SP,#0xC]\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, =0xFF85D018\n"
 100                  "MOV     R2, R7\n"
 101                  "BL      sub_FF8279EC\n"
 102                  "B       loc_FF85E050\n"
 103  );
 104 }
 105 
 106 
 107 void __attribute__((naked,noinline)) sub_FF85D98C_my(){ 
 108  asm volatile(
 109 
 110                  "STMFD   SP!, {R4-R10,LR}\n"
 111                  "SUB     SP, SP, #0x40\n"
 112                  "MOV     R7, #0\n"
 113                  "LDR     R6, =0x51A8\n"
 114                  "MOV     R4, R0\n"
 115                  "STR     R7, [SP,#0x30]\n"
 116                  "STR     R7, [SP,#0x28]\n"
 117                  "LDR     R0, [R6,#0x3C]\n"
 118                  "MOV     R9, #4\n"
 119                  "CMP     R0, #3\n"
 120                  "STREQ   R9, [R6,#0x3C]\n"
 121                  "LDR     R0, [R6,#0xA0]\n"
 122                  "MOV     R8, #0\n"
 123                  "BLX     R0\n"
 124                  "LDR     R0, [R6,#0x3C]\n"
 125                  "CMP     R0, #4\n"
 126                  "BNE     loc_FF85DB10\n"
 127                  "LDRH    R0, [R6,#2]\n"
 128                  "MOV     R5, #1\n"
 129                  "CMP     R0, #1\n"
 130                  "BNE     loc_FF85DA08\n"
 131                  "LDRH    R1, [R6,#4]\n"
 132                  "LDR     R0, [R6,#0x48]\n"
 133                  "MUL     R0, R1, R0\n"
 134                  "MOV     R1, #0x3E8\n"
 135                  "BL      sub_FFAD3DC8\n"
 136                  "MOV     R1, R0\n"
 137                  "LDR     R0, [R6,#0x50]\n"
 138                  "BL      sub_FFAD3DC8\n"
 139                  "CMP     R1, #0\n"
 140                  "BNE     loc_FF85DA24\n"
 141  "loc_FF85DA08:\n"
 142                  "ADD     R3, SP, #0x28\n"
 143                  "ADD     R2, SP, #0x2C\n"
 144                  "ADD     R1, SP, #0x30\n"
 145                  "ADD     R0, SP, #0x34\n"
 146                  "BL      sub_FF92FE8C\n"
 147                  "MOVS    R8, R0\n"
 148                  "BNE     loc_FF85DA40\n"
 149  "loc_FF85DA24:\n"
 150                  "LDR     R0, [R6,#0x2C]\n"
 151                  "CMP     R0, #1\n"
 152                  "BNE     loc_FF85DB24\n"
 153                  "LDR     R0, [R6,#0x50]\n"
 154                  "LDR     R1, [R6,#0x40]\n"
 155                  "CMP     R0, R1\n"
 156                  "BCC     loc_FF85DB24\n"
 157  "loc_FF85DA40:\n"
 158                  "CMP     R8, #0x80000001\n"
 159                  "STREQ   R9, [R6,#0x54]\n"
 160                  "BEQ     loc_FF85DA78\n"
 161                  "CMP     R8, #0x80000003\n"
 162                  "STREQ   R5, [R6,#0x54]\n"
 163                  "BEQ     loc_FF85DA78\n"
 164                  "CMP     R8, #0x80000005\n"
 165                  "MOVEQ   R0, #2\n"
 166                  "BEQ     loc_FF85DA74\n"
 167                  "CMP     R8, #0x80000007\n"
 168                  "STRNE   R7, [R6,#0x54]\n"
 169                  "BNE     loc_FF85DA78\n"
 170                  "MOV     R0, #3\n"
 171  "loc_FF85DA74:\n"
 172                  "STR     R0, [R6,#0x54]\n"
 173  "loc_FF85DA78:\n"
 174                  "LDR     R0, =0x1ABC8\n"
 175                  "LDR     R0, [R0,#8]\n"
 176                  "CMP     R0, #0\n"
 177                  "BEQ     loc_FF85DA90\n"
 178                  "BL      sub_FF847B84\n"
 179                  "B       loc_FF85DA94\n"
 180  "loc_FF85DA90:\n"
 181                  "BL      sub_FF85D218\n"
 182  "loc_FF85DA94:\n"
 183                  "LDR     R0, [R4,#0x14]\n"
 184                  "LDR     R1, [R4,#0x18]\n"
 185                  "ADD     R3, SP, #0x38\n"
 186                  "MVN     R2, #1\n"
 187                  "ADD     R7, SP, #0x18\n"
 188                  "STMIA   R7, {R0-R3}\n"
 189                  "MOV     R0, #0\n"
 190                  "ADD     R1, SP, #0x3C\n"
 191                  "ADD     R7, SP, #0x8\n"
 192                  "LDRD    R2, [R6,#0x68]\n"
 193                  "STMIA   R7, {R0-R3}\n"
 194                  "MOV     R3, #0\n"
 195                  "MOV     R2, #0x40\n"
 196                  "STRD    R2, [SP]\n"
 197                  "LDMIB   R4, {R0,R1}\n"
 198                  "LDR     R3, =0x1ABE0\n"
 199                  "MOV     R2, R10\n"
 200                  "BL      sub_FF8EDBE0\n"
 201                  "LDR     R0, [R6,#0x14]\n"
 202                  "MOV     R1, #0x3E8\n"
 203                  "BL      sub_FF8274B4\n"
 204                  "CMP     R0, #9\n"
 205                  "BEQ     loc_FF85DBA4\n"
 206                  "LDR     R0, [SP,#0x38]\n"
 207                  "CMP     R0, #0\n"
 208                  "BNE     loc_FF85DBC0\n"
 209                  "MOV     R0, #1\n"
 210                  "BL      sub_FF8EDC88\n"
 211                  "BL      sub_FF8EDCC4\n"
 212                  "MOV     R0, #5\n"
 213                  "STR     R0, [R6,#0x3C]\n"
 214  "loc_FF85DB10:\n"
 215                  "ADD     SP, SP, #0x40\n"
 216                  "LDMFD   SP!, {R4-R10,PC}\n"
 217  "loc_FF85DB18:\n"
 218                  "BL      sub_FF879164\n"
 219                  "MOV     R0, #1\n"
 220                  "B       loc_FF85DC5C\n"
 221  "loc_FF85DB24:\n"
 222                  "LDR     R12, [SP,#0x30]\n"
 223                  "CMP     R12, #0\n"
 224                  "BEQ     loc_FF85DCBC\n"
 225                  "STR     R5, [R6,#0x30]\n"
 226                  "LDR     R0, [R6,#0x50]\n"
 227                  "LDR     R8, [R4,#0xC]\n"
 228                  "CMP     R0, #0\n"
 229                  "LDRNE   LR, [SP,#0x34]\n"
 230                  "BNE     loc_FF85DBEC\n"
 231                  "LDR     R0, [R4,#0x14]\n"
 232                  "LDR     R1, [R4,#0x18]\n"
 233                  "ADD     R3, SP, #0x38\n"
 234                  "MVN     R2, #0\n"
 235                  "ADD     R9, SP, #0x18\n"
 236                  "STMIA   R9, {R0-R3}\n"
 237                  "LDRD    R2, [R6,#0x68]\n"
 238                  "LDR     R0, [SP,#0x28]\n"
 239                  "ADD     R1, SP, #0x3C\n"
 240                  "ADD     R9, SP, #0x8\n"
 241                  "STMIA   R9, {R0-R3}\n"
 242                  "LDR     R3, [SP,#0x2C]\n"
 243                  "STR     R12, [SP]\n"
 244                  "STR     R3, [SP,#4]\n"
 245                  "LDMIB   R4, {R0,R1}\n"
 246                  "LDR     R3, [SP,#0x34]\n"
 247                  "MOV     R2, R8\n"
 248                  "BL      sub_FF8EDBE0\n"
 249                  "LDR     R0, [R6,#0x14]\n"
 250                  "MOV     R1, #0x3E8\n"
 251                  "BL      sub_FF8274B4\n"
 252                  "CMP     R0, #9\n"
 253                  "BNE     loc_FF85DBB4\n"
 254  "loc_FF85DBA4:\n"
 255                  "BL      sub_FF930358\n"
 256                  "MOV     R0, #0x90000\n"
 257                  "STR     R5, [R6,#0x3C]\n"
 258                  "B       loc_FF85DB18\n"
 259  "loc_FF85DBB4:\n"
 260                  "LDR     R0, [SP,#0x38]\n"
 261                  "CMP     R0, #0\n"
 262                  "BEQ     loc_FF85DBD0\n"
 263  "loc_FF85DBC0:\n"
 264                  "BL      sub_FF930358\n"
 265                  "MOV     R0, #0xA0000\n"
 266                  "STR     R5, [R6,#0x3C]\n"
 267                  "B       loc_FF85DB18\n"
 268  "loc_FF85DBD0:\n"
 269                  "MOV     R0, #1\n"
 270                  "BL      sub_FF8EDC88\n"
 271                  "LDR     R0, [SP,#0x3C]\n"
 272                  "LDR     R1, [SP,#0x34]\n"
 273                  "ADD     LR, R1, R0\n"
 274                  "LDR     R1, [SP,#0x30]\n"
 275                  "SUB     R12, R1, R0\n"
 276  "loc_FF85DBEC:\n"
 277                  "LDR     R0, [R4,#0x14]\n"
 278                  "LDR     R2, [R6,#0x4C]\n"
 279                  "LDR     R1, [R4,#0x18]\n"
 280                  "ADD     R3, SP, #0x38\n"
 281                  "ADD     R9, SP, #0x18\n"
 282                  "STMIA   R9, {R0-R3}\n"
 283                  "LDRD    R2, [R6,#0x68]\n"
 284                  "LDR     R0, [SP,#0x28]\n"
 285                  "ADD     R1, SP, #0x3C\n"
 286                  "ADD     R9, SP, #0x8\n"
 287                  "STMIA   R9, {R0-R3}\n"
 288                  "LDR     R3, [SP,#0x2C]\n"
 289                  "STR     R12, [SP]\n"
 290                  "STR     R3, [SP,#4]\n"
 291                  "LDMIB   R4, {R0,R1}\n"
 292                  "MOV     R3, LR\n"
 293                  "MOV     R2, R8\n"
 294                  "BL      sub_FF8EDBE0\n"
 295                  "LDR     R0, [R6,#0x14]\n"
 296                  "MOV     R1, #0x3E8\n"
 297                  "BL      sub_FF8274B4\n"
 298                  "CMP     R0, #9\n"
 299                  "BNE     loc_FF85DC64\n"
 300                  "BL      sub_FF930358\n"
 301                  "MOV     R0, #0x90000\n"
 302                  "STR     R5, [R6,#0x3C]\n"
 303                  "BL      sub_FF879164\n"
 304                  "MOV     R0, #0\n"
 305  "loc_FF85DC5C:\n"
 306                  "BL      sub_FF8EDC88\n"
 307                  "B       loc_FF85DB10\n"
 308  "loc_FF85DC64:\n"
 309                  "LDR     R0, [SP,#0x38]\n"
 310                  "CMP     R0, #0\n"
 311                  "BEQ     loc_FF85DC84\n"
 312                  "BL      sub_FF930358\n"
 313                  "MOV     R0, #0xA0000\n"
 314                  "STR     R5, [R6,#0x3C]\n"
 315                  "BL      sub_FF879164\n"
 316                  "B       loc_FF85DB10\n"
 317  "loc_FF85DC84:\n"
 318                  "MOV     R0, #0\n"
 319                  "BL      sub_FF8EDC88\n"
 320                  "LDR     R0, [SP,#0x34]\n"
 321                  "LDR     R1, [SP,#0x3C]\n"
 322                  "BL      sub_FF9300B4\n"
 323                  "LDR     R0, [R6,#0x4C]\n"
 324                  "LDR     R3, =0x5214\n"    // ->----
 325                  "ADD     R1, R0, #1\n"     //       |
 326                  "STR     R1, [R6,#0x4C]\n" //       |
 327                  "STR     R3, [SP]\n"       //       |
 328                  "LDR     R0, [SP,#0x3C]\n" //       |
 329                  "SUB     R3, R3, #4\n"     // ->----|
 330                  "MOV     R2, #0xF\n"       //       |
 331                  "BL      sub_FF92E3B0\n"   //       |
 332                  "LDR     R0, =0x5214-4\n"  // -<----     // +
 333                  "BL      set_quality\n"                  // +
 334  "loc_FF85DCBC:\n"
 335                  "LDR     R0, [R6,#0x50]\n"
 336                  "ADD     R0, R0, #1\n"
 337                  "STR     R0, [R6,#0x50]\n"
 338                  "LDR     R1, [R6,#0x78]\n"
 339                  "MUL     R0, R1, R0\n"
 340                  "LDR     R1, [R6,#0x74]\n"
 341                  "BL      sub_FFAD3DC8\n"
 342                  "MOV     R4, R0\n"
 343                  "BL      sub_FF930390\n"
 344                  "LDR     R1, [R6,#0x70]\n"
 345                  "CMP     R1, R4\n"
 346                  "BNE     loc_FF85DCF8\n"
 347                  "LDR     R0, [R6,#0x34]\n"
 348                  "CMP     R0, #1\n"
 349                  "BNE     loc_FF85DD0C\n"
 350  "loc_FF85DCF8:\n"
 351                  "LDR     R1, [R6,#0x84]\n"
 352                  "MOV     R0, R4\n"
 353                  "BLX     R1\n"
 354                  "STR     R4, [R6,#0x70]\n"
 355                  "STR     R7, [R6,#0x34]\n"
 356  "loc_FF85DD0C:\n"
 357                  "STR     R7, [R6,#0x30]\n"
 358                  "B       loc_FF85DB10\n"
 359  );
 360 }
 361 

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