root/platform/d10/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 #include "conf.h"
   2 
   3 // from sx10
   4 void change_video_tables(__attribute__ ((unused))int a, __attribute__ ((unused))int b) {}
   5 
   6 // from sx10, not sure if the values are right, seems to work
   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 void __attribute__((naked,noinline)) movie_record_task(){ 
  12  asm volatile(
  13 "                STMFD   SP!, {R2-R8,LR}\n"
  14 "                LDR     R8, =0x442\n"
  15 "                LDR     R7, =0x2710\n"
  16 "                LDR     R4, =0x5FA8\n"
  17 "                MOV     R6, #0\n"
  18 "                MOV     R5, #1\n"
  19 "loc_FF92F5E0:\n"
  20 "                LDR     R0, [R4,#0x18]\n"
  21 "                MOV     R2, #0\n"
  22 "                ADD     R1, SP, #4\n"
  23 "                BL      sub_FF826C30\n" // KerQueue.c 0
  24 "                LDR     R0, [R4,#0x20]\n"
  25 "                CMP     R0, #0\n"
  26 "                BNE     loc_FF92F6B0\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_FF92F6B0\n"
  33 "                B       loc_FF92F664\n"
  34 "                B       loc_FF92F684\n"
  35 "                B       loc_FF92F694\n"
  36 "                B       loc_FF92F69C\n"
  37 "                B       loc_FF92F66C\n"
  38 "                B       loc_FF92F6A4\n"
  39 "                B       loc_FF92F674\n"
  40 "                B       loc_FF92F6B0\n"
  41 "                B       loc_FF92F6AC\n"
  42 "                B       loc_FF92F63C\n"
  43 "loc_FF92F63C:\n"
  44 // jumptable FF92F60C entry 9
  45 "                LDR     R0, =0xFF92F2F0\n" // locret
  46 "                STR     R6, [R4,#0x34]\n"
  47 "                STR     R0, [R4,#0x9C]\n"
  48 "                LDR     R0, =0xFF92E96C\n"
  49 "                LDR     R2, =0xFF92E888\n"
  50 "                LDR     R1, =0x4B268\n"
  51 "                STR     R6, [R4,#0x24]\n"
  52 "                BL      sub_FF839668\n"
  53 "                STR     R5, [R4,#0x38]\n"
  54 "                B       loc_FF92F6B0\n"
  55 "loc_FF92F664:\n"
  56 // jumptable FF92F60C entry 0
  57 "                BL      unlock_optical_zoom\n" // +
  58 "                BL      sub_FF92F3E8\n" // MovieRecorder.c 0
  59 "                B       loc_FF92F6B0\n"
  60 "loc_FF92F66C:\n"
  61 // jumptable FF92F60C entry 4
  62 "                BL      sub_FF92EF94\n"
  63 "                LDR     R0, =video_compression_rate \n" // added
  64 "                BL      set_quality \n"                 // added
  65 "                B       loc_FF92F6B0\n"
  66 "loc_FF92F674:\n"
  67 // jumptable FF92F60C entry 6
  68 "                LDR     R1, [R0,#0x18]\n"
  69 "                LDR     R0, [R0,#4]\n"
  70 "                BL      sub_FFA42458\n" // MovWriter.c 0
  71 "                B       loc_FF92F6B0\n"
  72 "loc_FF92F684:\n"
  73 // jumptable FF92F60C entry 1
  74 "                LDR     R0, [R4,#0x38]\n"
  75 "                CMP     R0, #5\n"
  76 "                STRNE   R5, [R4,#0x28]\n"
  77 "                B       loc_FF92F6B0\n"
  78 "loc_FF92F694:\n"
  79 // jumptable FF92F60C entry 2
  80 "                BL      sub_FF92ECCC\n" // MovieRecorder.c 0
  81 "                B       loc_FF92F6B0\n"
  82 "loc_FF92F69C:\n"
  83 // jumptable FF92F60C entry 3
  84 "                BL      sub_FF92E9B8\n" // MovieRecorder.c 0
  85 "                B       loc_FF92F6B0\n"
  86 "loc_FF92F6A4:\n"
  87 // jumptable FF92F60C entry 5
  88 "                BL      sub_FF92E814\n" // MovieRecorder.c 100
  89 "                B       loc_FF92F6B0\n"
  90 "loc_FF92F6AC:\n"
  91 // jumptable FF92F60C entry 8
  92 "                BL      sub_FF92F818\n" // MovieRecorder.c 100
  93 "loc_FF92F6B0:\n"
  94 // jumptable FF92F60C default entry
  95 // jumptable FF92F60C entry 7
  96 "                LDR     R1, [SP,#4]\n"
  97 "                LDR     R3, =0xFF92E678\n" // "MovieRecorder.c"
  98 "                STR     R6, [R1]\n"
  99 "                STR     R8, [SP]\n"
 100 "                LDR     R0, [R4,#0x1C]\n"
 101 "                MOV     R2, R7\n"
 102 "                BL      sub_FF827584\n"
 103 "                B       loc_FF92F5E0\n"
 104  );
 105 }

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