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

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