root/platform/ixus750_sd550/sub/100g/movie_rec.c

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

DEFINITIONS

This source file includes following definitions.
  1. change_video_tables
  2. movie_record_task
  3. sub_FF944274_my
  4. sub_FF944DFC_my

   1 #include "conf.h"
   2 
   3 int *video_quality = &conf.video_quality;
   4 int *video_mode    = &conf.video_mode;
   5 
   6 long def_table1[56]={
   7 0x10000,0xC000,0x5800, 0x2000, 0x1C6A, 0x1550,0x9C5,  0x38D,  0x3C45, 0x2D34, 0x14B8, 0x788,  0x5F60, 0x4788,
   8 0x20C9, 0xBE1, 0x8661, 0x64C9, 0x2E31, 0x10CB,0xB21A, 0x8594, 0x3D39, 0x1642, 0xE249, 0xA9B8, 0x4DC9, 0x1C48,
   9 0x117D2,0xD1DF,0x6030, 0x22F9, 0x153D5,0xFEE1,0x74D1, 0x2A79, 0x195F8,0x1307C,0x8B8D, 0x32AA, 0x1E01C,0x16817,
  10 0xA509, 0x3C01,0x2328E,0x1A5ED,0xC160, 0x4637,0x28C99,0x1E975,0xE054, 0x5190, 0x2F08B,0x2346B,0x102AF,0x5E0E
  11 };
  12 
  13 long def_table2[12]={0xE666,0xACCD,0x4F33,0x1CCD,-0x170A,-0x1148,-0x7EB,-0x2E1,-0x2BC6,-0x20D5,-0xF0C,-0x579};
  14 
  15 long table1[56], table2[12];
  16 
  17 void change_video_tables(int a, int b){
  18  int i;
  19  for (i=0;i<56;i++) table1[i]=(def_table1[i]*a)/b;
  20  for (i=0;i<12;i++) table2[i]=(def_table2[i]*a)/b;
  21 }
  22 
  23 long CompressionRateTable[]={0x60, 0x5D, 0x5A, 0x57, 0x54, 0x51, 0x4D, 0x48, 0x42, 0x3B, 0x32, 0x29, 0x22, 0x1D, 0x17, 0x14, 0x10, 0xE, 0xB, 9, 7, 6, 5, 4, 3, 2, 1};
  24 
  25 
  26 void __attribute__((naked,noinline)) movie_record_task(){
  27  asm volatile(
  28                  "STMFD   SP!, {R4,LR}\n"
  29                  "SUB     SP, SP, #4\n"
  30                  "MOV     R4, SP\n"
  31                  "B       loc_FF943B30\n"
  32 "loc_FF943A80:\n"
  33                  "LDR     R3, =0x73850\n"
  34                  "LDR     R2, [R3]\n"
  35                  "CMP     R2, #0\n"
  36                  "BNE     loc_FF943B1C\n"                                       
  37                  "SUB     R3, R12, #1\n"
  38                  "CMP     R3, #0xA\n"
  39                  "LDRLS   PC, [PC,R3,LSL#2]\n"
  40                  "B       loc_FF943B1C\n"                                   
  41                  ".long loc_FF943ACC\n"
  42                  ".long loc_FF943AD4\n"
  43                  ".long loc_FF943AEC\n"
  44                  ".long loc_FF943AF4\n"
  45                  ".long loc_FF943AFC\n"
  46                  ".long loc_FF943ADC\n"
  47                  ".long loc_FF943B04\n"
  48                  ".long loc_FF943AE4\n"
  49                  ".long loc_FF943B1C\n"
  50                  ".long loc_FF943B14\n"
  51                  ".long loc_FF943B0C\n"
  52 "loc_FF943ACC:\n"                                       
  53                  "BL      sub_FF943BB0\n"
  54                  "B       loc_FF943B18\n"
  55  "loc_FF943AD4:\n"                                        
  56                  "BL     unlock_optical_zoom\n"
  57                  "BL      sub_FF943DE4\n"
  58                  "B       loc_FF943B18\n"
  59  "loc_FF943ADC:\n"                                         
  60                 "BL      sub_FF944274_my\n"    //--------------------->
  61                  "B       loc_FF943B18\n"
  62  "loc_FF943AE4:\n"                                       
  63                  "BL      sub_FF9446C8\n"
  64                  "B       loc_FF943B18\n"
  65  "loc_FF943AEC:\n"                                         
  66                  "BL      sub_FF9444EC\n"
  67                  "B       loc_FF943B18\n"
  68  "loc_FF943AF4:\n"                                         
  69                  "BL      sub_FF9448D4\n"
  70                  "B       loc_FF943B18\n"
  71  "loc_FF943AFC:\n"                                        
  72                  "BL      sub_FF944A98\n"
  73                  "B       loc_FF943B18\n"
  74 "loc_FF943B04:\n"                                        
  75                  "BL      sub_FF944788\n"
  76                  "B       loc_FF943B18\n"
  77  "loc_FF943B0C:\n"                                         
  78                  "BL      sub_FF944868\n"
  79                  "B       loc_FF943B18\n"
  80  "loc_FF943B14:\n"                                         
  81                  "BL      sub_FF94453C\n"
  82 "loc_FF943B18:\n"                                       
  83                  "LDR     R1, [SP]\n"
  84 "loc_FF943B1C:\n"                                       
  85                  "LDR     R3, =0x73780\n"                                        
  86                  "MOV     R2, #0\n"
  87                  "STR     R2, [R1]\n"
  88                  "LDR     R0, [R3]\n"
  89                  "BL      sub_FF8212BC\n" //PostMessageQueue\n"
  90 "loc_FF943B30:\n"
  91                  "LDR     R3, =0x7377C\n"
  92                  "MOV     R1, R4\n"
  93                  "LDR     R0, [R3]\n"
  94                  "MOV     R2, #0\n"
  95                  "BL      sub_FF820EA4\n"//ReceiveMessageQueue\n"
  96                  "LDR     R0, [SP]\n"
  97                  "LDR     R12, [R0]\n"
  98                  "CMP     R12, #0xC\n"
  99                  "MOV     R1, R0\n"
 100                  "BNE     loc_FF943A80\n"
 101                  "LDR     R3, =0x73774\n"
 102                  "LDR     R0, [R3]\n"
 103                  "BL      sub_FF821C78\n" //GiveSemaphore
 104                  "BL      sub_FF822634\n" //ExitTask\n"
 105                  "ADD     SP, SP, #4\n"
 106                  "LDMFD   SP!, {R4,PC}\n"
 107  );
 108 }
 109 
 110 
 111 void __attribute__((naked,noinline)) sub_FF944274_my(){
 112  asm volatile(
 113                  "STMFD   SP!, {R4-R11,LR}\n"
 114                  "LDR     R5, =0x7386C\n"
 115                  "SUB     SP, SP, #0x34\n"
 116                  "LDR     R3, [R5]\n"
 117                  "CMP     R3, #3\n"
 118                  "MOV     R4, R0\n"
 119                  "MOVEQ   R3, #4\n"
 120                  "STREQ   R3, [R5]\n"
 121                  "LDR     R3, =0x73914\n"
 122                  "MOV     LR, PC\n"
 123                  "LDR     PC, [R3]\n"
 124                  "LDR     R2, [R5]\n"
 125                  "CMP     R2, #4\n"
 126                  "BNE     loc_FF944420\n"
 127                  "ADD     R0, SP, #0x30\n"
 128                  "ADD     R1, SP, #0x2C\n"
 129                  "ADD     R2, SP, #0x28\n"
 130                  "ADD     R3, SP, #0x24\n"
 131                  "BL      sub_FF945A34\n"
 132                  "CMP     R0, #0\n"
 133                  "BNE     loc_FF9442F0\n"
 134                  "LDR     R3, =0x73858\n"
 135                  "LDR     R2, [R3]\n"
 136                  "CMP     R2, #1\n"
 137                  "BNE     loc_FF944304\n"
 138                  "LDR     R2, =0x738A8\n"
 139                  "LDR     R1, =0x73880\n"
 140                  "LDR     R12, [R2]\n"
 141                  "LDR     R3, [R1]\n"
 142                  "CMP     R12, R3\n"
 143                  "BCC     loc_FF944304\n"
 144 "loc_FF9442F0:                            \n"
 145                  "BL      sub_FF944464\n"
 146                  "BL      sub_FF944698\n"
 147                  "MOV     R3, #5\n"
 148                  "STR     R3, [R5]\n"
 149                  "B       loc_FF944420\n"
 150 "loc_FF944304:                            \n"                                        
 151                  "LDR     R12, =0x738B0\n"
 152                  "LDR     R11, =0x738BC\n"
 153                  "LDMIB   R4, {R0-R2}\n"
 154                  "LDR     R10, [R12]\n"
 155                  "LDR     R7, [R11]\n"
 156                  "LDR     R4, [SP,#0x2C]\n"
 157                  "LDR     R5, [SP,#0x28]\n"
 158                  "LDR     R6, [SP,#0x24]\n"
 159                  "LDR     R8, =0x7385C\n"
 160                  "LDR     R3, [SP,#0x30]\n"
 161                  "ADD     R12, SP, #0x20\n"
 162                  "ADD     LR, SP, #0x1C\n"
 163                  "MOV     R9, #1\n"
 164                  "STMEA   SP, {R4-R6,R12}\n"
 165                  "STR     R10, [SP,#0x10]\n"
 166                  "STR     R7, [SP,#0x14]\n"
 167                  "STR     LR, [SP,#0x18]\n"
 168                  "STR     R9, [R8]\n"
 169                  "BL      sub_FF897550\n"
 170                  "LDR     R3, =0x73774\n"
 171                  "MOV     R1, #0x3E8\n"
 172                  "LDR     R0, [R3]\n"
 173                  "BL      sub_FF821A90\n"        //takesemaphore
 174                  "CMP     R0, #9\n"
 175                  "BNE     loc_FF944378\n"
 176                  "BL      sub_FF9461F4\n"
 177                  "LDR     R3, =0x7386C\n"
 178                  "LDR     R0, =0xff94425c\n" //aJpegtimeout_2\n"
 179                  "B       loc_FF944390\n"
 180 "loc_FF944378:                            \n"
 181                  "LDR     R5, [SP,#0x1C]\n"
 182                  "CMP     R5, #0\n"
 183                  "BEQ     loc_FF94439C\n"
 184                  "BL      sub_FF9461F4\n"
 185                  "LDR     R3, =0x7386C\n"
 186                  "LDR     R0, =0xff944268\n"//aJpegicerror_3\n"
 187 "loc_FF944390:                            \n"
 188                  "STR     R9, [R3]\n"
 189                  "BL      sub_FF9580CC\n"//eventproc_export_HardwareDefect\n"
 190                  "B       loc_FF944420\n"
 191 "loc_FF94439C:                            \n"
 192                  "BL      sub_FF8976C4\n"
 193                  "LDR     R0, [SP,#0x30]\n"
 194                  "LDR     R1, [SP,#0x20]\n"
 195                  "BL      sub_FF945F18\n"
 196                  "LDR     R4, =0x738A8\n"
 197                  "LDR     R3, [R4]\n"
 198                  "ADD     R3, R3, #1\n"
 199                  "LDR     R0, [SP,#0x20]\n"
 200                  "MOV     R1, R11\n"
 201                  "STR     R3, [R4]\n"
 202                  "MOV     R2, R5\n"
 203                  "BL      sub_FF944DFC_my\n"
 204                  "LDR     R3, =0x73894\n"
 205                  "LDR     R4, [R4]\n"
 206                  "LDR     R1, [R3]\n"
 207                  "MOV     R0, R4\n"
 208                  "BL      sub_FFAC9388\n" //__umodsi3\n"
 209                  "CMP     R0, #0\n"
 210                  "BEQ     loc_FF9443FC\n"
 211                  "LDR     R6, =0x73860\n"
 212                  "LDR     R3, [R6]\n"
 213                  "CMP     R3, #1\n"
 214                  "BNE     loc_FF944414\n"
 215                  "B       loc_FF944400\n"
 216 "loc_FF9443FC:                            \n"
 217                  "LDR     R6, =0x73860\n"
 218 "loc_FF944400:                            \n"
 219                  "MOV     R0, R4\n"
 220                  "LDR     R3, =0x738F0\n"
 221                  "MOV     LR, PC\n"
 222                  "LDR     PC, [R3]\n"
 223                  "STR     R5, [R6]\n"
 224 "loc_FF944414:                            \n"
 225                  "LDR     R2, =0x7385C\n"
 226                  "MOV     R3, #0\n"
 227                  "STR     R3, [R2]\n"
 228 "loc_FF944420:                            \n"                                         
 229                  "ADD     SP, SP, #0x34\n"
 230                  "LDMFD   SP!, {R4-R11,PC}\n"
 231  );
 232 }
 233 
 234 
 235 void __attribute__((naked,noinline)) sub_FF944DFC_my(){
 236  asm volatile(                 
 237                                  "CMP     R2, #1\n"
 238                  "STMFD   SP!, {R4-R7,LR}\n"
 239                  "MOV     R7, R0\n"
 240                  "MOV     R6, R1\n"
 241 
 242 //                 "MOVEQ   R3, #0x79\n"
 243 //                 "STREQ   R3, [R6]\n"
 244                 "LDREQ   R3, =CompressionRateTable\n" // +
 245                 "LDREQ   R2, [R3,#0x18]\n"            // +
 246                 "STREQ   R2, [R6]\n"                              // +
 247 
 248                                 "LDMEQFD SP!, {R4-R7,PC}\n"
 249                  "LDR     R12, =0x73920\n"
 250                  "LDR     R0, [R12]\n"
 251                  "LDR     R3, =0x73928\n"
 252                  "CMP     R0, #0\n"
 253                  "LDR     R1, [R3]\n"
 254                  "BEQ     loc_FF944E44\n"
 255                  "LDR     R2, =0x7392C\n"
 256                  "LDR     R3, [R2]\n"
 257                  "CMP     R3, #1\n"
 258                  "BNE     loc_FF944E58\n"
 259                  "B       loc_FF944E48\n"
 260  "loc_FF944E44:                            \n"
 261                  "LDR     R2, =0x7392C\n"
 262 "loc_FF944E48:                            \n"
 263                  "MOV     R3, #0\n"
 264                  "STR     R3, [R2]\n"
 265                  "STR     R7, [R12]\n"
 266                  "B       loc_FF944F0C\n"
 267 "loc_FF944E58:                            \n"
 268                  "LDR     R3, =0x73924\n"
 269                  "LDR     R2, [R3]\n"
 270                  "LDR     R5, =table1\n" //unk_FF944C64\n"
 271                  "MOV     LR, R2,LSL#2\n"
 272                  "LDR     R3, [R5,LR]\n"
 273                  "LDR     R4, =table2\n" //unk_FF944CA0\n"
 274                  "RSB     R12, R3, R0\n"
 275                  "LDR     R2, [R4,LR]\n"
 276                  "CMP     R12, #0\n"
 277                  "RSB     R0, R2, R0\n"
 278                  "BLE     loc_FF944EB8\n"
 279                  "ADD     R3, R5, #0x14\n"
 280                  "LDR     R2, [R3,LR]\n"
 281                  "CMP     R2, R12\n"
 282                  "ADDGE   R1, R1, #1\n"
 283                  "BGE     loc_FF944EAC\n"
 284                  "ADD     R3, R5, #0x28\n"
 285                  "LDR     R2, [R3,LR]\n"
 286                  "CMP     R2, R12\n"
 287                  "ADDGE   R1, R1, #2\n"
 288                  "ADDLT   R1, R1, #3\n"
 289 "loc_FF944EAC:                            \n"
 290                         //     "CMP     R1, #0xE\n"    // -
 291            //     "MOVGE   R1, #0xE\n"    // -
 292                                 "CMP     R1, #0x1A\n"    // +
 293                 "MOVGE   R1, #0x1A\n"    // +
 294 
 295                                 "B       loc_FF944EF0\n"
 296 "loc_FF944EB8:                            \n"
 297                  "CMP     R0, #0\n"
 298                  "BGE     loc_FF944EF0\n"
 299                  "ADD     R3, R4, #0x14\n"
 300                  "LDR     R2, [R3,LR]\n"
 301                  "CMP     R2, R0\n"
 302                  "SUBLE   R1, R1, #1\n"
 303                  "BLE     loc_FF944EE8\n"
 304                  "ADD     R3, R4, #0x28\n"
 305                  "LDR     R2, [R3,LR]\n"
 306                  "CMP     R2, R0\n"
 307                  "SUBLE   R1, R1, #2\n"
 308                  "SUBGT   R1, R1, #3\n"
 309 "loc_FF944EE8:                            \n"
 310                  "CMP     R1, #0\n"
 311                  "MOVLT   R1, #0\n"
 312 "loc_FF944EF0:                            \n"                                     
 313                  "LDR     R0, =0x73928\n"
 314                  "LDR     R3, [R0]\n"
 315                  "CMP     R1, R3\n"
 316                  "LDRNE   R2, =0x7392C\n"
 317                  "MOVNE   R3, #1\n"
 318                  "STRNE   R1, [R0]\n"
 319                  "STRNE   R3, [R2]\n"
 320 "loc_FF944F0C:                            \n"
 321                  "LDR     R3, =0x73928\n"
 322            //     "LDR     R1, =0x6CF8\n"  // -
 323                         "LDR     R1, =video_mode\n"  // +
 324                  "LDR     R0, [R3]\n"
 325                  "LDR     R2, =CompressionRateTable\n" //unk_FF944C28\n"
 326                  "LDR     R12, [R1]\n"
 327                  "LDR     LR, [R2,R0,LSL#2]\n"
 328                  "LDR     R3, =0x73920\n"
 329                  "CMP     R12, #1\n"
 330                  "STR     R7, [R3]\n"
 331                  "STR     LR, [R6]\n"
 332             //    "MOVEQ   R3, #0xB\n"   // -
 333 
 334                 "LDREQ   R3, =video_quality\n"          // +
 335                 "LDREQ   R3, [R3]\n"                    // +
 336                 "LDREQ   R3, [R3]\n"                    // +    
 337 
 338                  "STREQ   R3, [R6]\n"
 339                  "LDMFD   SP!, {R4-R7,PC}\n"
 340 
 341 
 342          );
 343 }
 344 

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