root/platform/a2200/sub/100b/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 /*
   2  * movie_rec.c - auto-generated by CHDK code_gen.
   3  */
   4 #include "conf.h"
   5 
   6 void change_video_tables(int a, int b){
   7 }
   8 
   9 void  set_quality(int *x){ // -17 highest; +12 lowest
  10  if (conf.video_mode) *x=12-((conf.video_quality-1)*(12+17)/(99-1));
  11 }
  12 
  13 /*************************************************************/
  14 //** movie_record_task @ 0xFF964148 - 0xFF9642A8, length=89
  15 void __attribute__((naked,noinline)) movie_record_task() {
  16 asm volatile (
  17 "    STMFD   SP!, {R2-R10,LR} \n"
  18 "    LDR     R6, =0xFF963678 \n"
  19 "    LDR     R7, =0xFF963B70 \n"
  20 "    LDR     R4, =0x65A8 \n"
  21 "    LDR     R9, =0x67F \n"
  22 "    LDR     R10, =0x2710 \n"
  23 "    MOV     R8, #1 \n"
  24 "    MOV     R5, #0 \n"
  25 
  26 "loc_FF964168:\n"
  27 "    LDR     R0, [R4, #0x24] \n"
  28 "    MOV     R2, #0 \n"
  29 "    ADD     R1, SP, #4 \n"
  30 "    BL      sub_FF839B6C /*_ReceiveMessageQueue*/ \n"
  31 "    LDR     R0, [R4, #0x2C] \n"
  32 "    CMP     R0, #0 \n"
  33 "    LDRNE   R0, [R4, #0xC] \n"
  34 "    CMPNE   R0, #2 \n"
  35 "    LDRNE   R0, [R4, #0x44] \n"
  36 "    CMPNE   R0, #6 \n"
  37 "    BNE     loc_FF96428C \n"
  38 "    LDR     R0, [SP, #4] \n"
  39 "    LDR     R1, [R0] \n"
  40 "    SUB     R1, R1, #2 \n"
  41 "    CMP     R1, #0xB \n"
  42 "    ADDCC   PC, PC, R1, LSL#2 \n"
  43 "    B       loc_FF96428C \n"
  44 "    B       loc_FF96423C \n"
  45 "    B       loc_FF964260 \n"
  46 "    B       loc_FF964270 \n"
  47 "    B       loc_FF964278 \n"
  48 "    B       loc_FF964244 \n"
  49 "    B       loc_FF964280 \n"
  50 "    B       loc_FF964250 \n"
  51 "    B       loc_FF96428C \n"
  52 "    B       loc_FF964288 \n"
  53 "    B       loc_FF964208 \n"
  54 "    B       loc_FF9641D8 \n"
  55 
  56 "loc_FF9641D8:\n"
  57 "    STR     R5, [R4, #0x40] \n"
  58 "    STR     R5, [R4, #0x30] \n"
  59 "    STR     R5, [R4, #0x34] \n"
  60 "    STRH    R5, [R4, #6] \n"
  61 "    STR     R6, [R4, #0xB4] \n"
  62 "    STR     R7, [R4, #0xCC] \n"
  63 "    LDR     R0, [R4, #0xC] \n"
  64 "    ADD     R0, R0, #1 \n"
  65 "    STR     R0, [R4, #0xC] \n"
  66 "    MOV     R0, #6 \n"
  67 "    STR     R0, [R4, #0x44] \n"
  68 "    B       loc_FF964228 \n"
  69 
  70 "loc_FF964208:\n"
  71 "    STR     R5, [R4, #0x40] \n"
  72 "    STR     R5, [R4, #0x30] \n"
  73 "    STR     R6, [R4, #0xB4] \n"
  74 "    STR     R7, [R4, #0xCC] \n"
  75 "    LDR     R0, [R4, #0xC] \n"
  76 "    ADD     R0, R0, #1 \n"
  77 "    STR     R0, [R4, #0xC] \n"
  78 "    STR     R8, [R4, #0x44] \n"
  79 
  80 "loc_FF964228:\n"
  81 "    LDR     R2, =0xFF962E94 \n"
  82 "    LDR     R1, =0xAC448 \n"
  83 "    LDR     R0, =0xFF962FA8 \n"
  84 "    BL      sub_FF852C0C \n"
  85 "    B       loc_FF96428C \n"
  86 
  87 "loc_FF96423C:\n"
  88 
  89 "    BL      unlock_optical_zoom\n"     // added to unlock the zoom
  90 
  91 "    BL      sub_FF9637D0 \n"
  92 "    B       loc_FF96428C \n"
  93 
  94 "loc_FF964244:\n"
  95 "    LDR     R1, [R4, #0xCC] \n"
  96 "    BLX     R1 \n"
  97 
  98 "    LDR     R0, =video_compression_rate\n" //added
  99 "    BL      set_quality\n"                 //added
 100 "    BL      mute_on_zoom\n"                //added
 101 
 102 "    B       loc_FF96428C \n"
 103 
 104 "loc_FF964250:\n"
 105 "    LDR     R1, [R0, #0x18] \n"
 106 "    LDR     R0, [R0, #4] \n"
 107 "    BL      sub_FFAA6D10 \n"
 108 "    B       loc_FF96428C \n"
 109 
 110 "loc_FF964260:\n"
 111 "    LDR     R0, [R4, #0x44] \n"
 112 "    CMP     R0, #5 \n"
 113 "    STRNE   R8, [R4, #0x34] \n"
 114 "    B       loc_FF96428C \n"
 115 
 116 "loc_FF964270:\n"
 117 "    BL      sub_FF963338 \n"
 118 "    B       loc_FF96428C \n"
 119 
 120 "loc_FF964278:\n"
 121 "    BL      sub_FF962FF4 \n"
 122 "    B       loc_FF96428C \n"
 123 
 124 "loc_FF964280:\n"
 125 "    BL      sub_FF962E20 \n"
 126 "    B       loc_FF96428C \n"
 127 
 128 "loc_FF964288:\n"
 129 "    BL      sub_FF9646CC \n"
 130 
 131 "loc_FF96428C:\n"
 132 "    LDR     R1, [SP, #4] \n"
 133 "    LDR     R3, =0xFF962C68 /*'MovieRecorder.c'*/ \n"
 134 "    STR     R5, [R1] \n"
 135 "    STR     R9, [SP] \n"
 136 "    LDR     R0, [R4, #0x28] \n"
 137 "    MOV     R2, R10 \n"
 138 "    BL      sub_FF83A4E4 /*_PostMessageQueueStrictly*/ \n"
 139 "    B       loc_FF964168 \n"
 140 );
 141 }

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