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

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