root/platform/sx40hs/sub/100g/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 @ 0xFF07854C - 0xFF078704, length=111
  15 void __attribute__((naked,noinline)) movie_record_task() {
  16 asm volatile (
  17 "    STMFD   SP!, {R2-R12,LR} \n"
  18 "    LDR     R11, =0x68E \n"
  19 "    LDR     R7, =0xFF0772A4 \n"
  20 "    LDR     R8, =0xFF077F30 \n"
  21 "    LDR     R9, =0xFF075688 \n"
  22 "    LDR     R4, =0x2ED8 \n"
  23 "    LDR     R10, =0x2710 \n"
  24 "    MOV     R5, #1 \n"
  25 "    MOV     R6, #0 \n"
  26 
  27 "loc_FF078570:\n"
  28 "    LDR     R0, [R4, #0x24] \n"
  29 "    MOV     R2, #0 \n"
  30 "    ADD     R1, SP, #4 \n"
  31 "    BL      sub_FF02B0F4 /*_ReceiveMessageQueue*/ \n"
  32 "    LDR     R2, =0xFF074F3C /*'MovieRecorder.c'*/ \n"
  33 "    LDR     R0, [R4, #0x12C] \n"
  34 "    MOV     R3, R11 \n"
  35 "    MOV     R1, R10 \n"
  36 "    BL      sub_FF02BA14 /*_TakeSemaphoreStrictly*/ \n"
  37 "    LDR     R0, [R4, #0x2C] \n"
  38 "    CMP     R0, #0 \n"
  39 "    LDRNE   R0, [R4, #0xC] \n"
  40 "    CMPNE   R0, #2 \n"
  41 "    LDRNE   R0, [R4, #0x44] \n"
  42 "    CMPNE   R0, #6 \n"
  43 "    BNE     loc_FF0786DC \n"
  44 "    LDR     R0, [SP, #4] \n"
  45 "    LDR     R1, [R0] \n"
  46 "    SUB     R1, R1, #2 \n"
  47 "    CMP     R1, #0xF \n"
  48 "    ADDCC   PC, PC, R1, LSL#2 \n"
  49 "    B       loc_FF0786DC \n"
  50 "    B       loc_FF078670 \n"
  51 "    B       loc_FF07868C \n"
  52 "    B       loc_FF07869C \n"
  53 "    B       loc_FF0786A4 \n"
  54 "    B       loc_FF0786AC \n"
  55 "    B       loc_FF0786B4 \n"
  56 "    B       loc_FF078678 \n"
  57 "    B       loc_FF0786BC \n"
  58 "    B       loc_FF078684 \n"
  59 "    B       loc_FF0786DC \n"
  60 "    B       loc_FF0786CC \n"
  61 "    B       loc_FF0786D4 \n"
  62 "    B       loc_FF0786C4 \n"
  63 "    B       loc_FF078638 \n"
  64 "    B       loc_FF078604 \n"
  65 
  66 "loc_FF078604:\n"
  67 "    STR     R6, [R4, #0x40] \n"
  68 "    STR     R6, [R4, #0x30] \n"
  69 "    STR     R6, [R4, #0x34] \n"
  70 "    STRH    R6, [R4, #6] \n"
  71 "    STR     R7, [R4, #0xD8] \n"
  72 "    STR     R8, [R4, #0xF4] \n"
  73 "    STR     R9, [R4, #0xF8] \n"
  74 "    LDR     R0, [R4, #0xC] \n"
  75 "    ADD     R0, R0, #1 \n"
  76 "    STR     R0, [R4, #0xC] \n"
  77 "    MOV     R0, #6 \n"
  78 "    STR     R0, [R4, #0x44] \n"
  79 "    B       loc_FF07865C \n"
  80 
  81 "loc_FF078638:\n"
  82 "    STR     R6, [R4, #0x40] \n"
  83 "    STR     R6, [R4, #0x30] \n"
  84 "    STR     R7, [R4, #0xD8] \n"
  85 "    STR     R8, [R4, #0xF4] \n"
  86 "    STR     R9, [R4, #0xF8] \n"
  87 "    LDR     R0, [R4, #0xC] \n"
  88 "    ADD     R0, R0, #1 \n"
  89 "    STR     R0, [R4, #0xC] \n"
  90 "    STR     R5, [R4, #0x44] \n"
  91 
  92 "loc_FF07865C:\n"
  93 "    LDR     R2, =0xFF07568C \n"
  94 "    LDR     R1, =0x3F118 \n"
  95 "    LDR     R0, =0xFF0757D4 \n"
  96 "    BL      sub_FF0472B8 \n"
  97 "    B       loc_FF0786DC \n"
  98 
  99 "loc_FF078670:\n"
 100 "    BL      sub_FF077AA8 \n"
 101 "    B       loc_FF0786DC \n"
 102 
 103 "loc_FF078678:\n"
 104 "    LDR     R1, [R4, #0xF4] \n"
 105 "    BLX     R1 \n"
 106 
 107 "    LDR     R0, =video_compression_rate\n" //added
 108 "    BL      set_quality\n"                 //added
 109 
 110 "    B       loc_FF0786DC \n"
 111 
 112 "loc_FF078684:\n"
 113 "    BL      sub_FF078D84 \n"
 114 "    B       loc_FF0786DC \n"
 115 
 116 "loc_FF07868C:\n"
 117 "    LDR     R0, [R4, #0x44] \n"
 118 "    CMP     R0, #5 \n"
 119 "    STRNE   R5, [R4, #0x34] \n"
 120 "    B       loc_FF0786DC \n"
 121 
 122 "loc_FF07869C:\n"
 123 "    BL      sub_FF076F3C \n"
 124 "    B       loc_FF0786DC \n"
 125 
 126 "loc_FF0786A4:\n"
 127 "    BL      sub_FF076C50 \n"
 128 "    B       loc_FF0786DC \n"
 129 
 130 "loc_FF0786AC:\n"
 131 "    BL      sub_FF076A0C \n"
 132 "    B       loc_FF0786DC \n"
 133 
 134 "loc_FF0786B4:\n"
 135 "    BL      sub_FF0767A0 \n"
 136 "    B       loc_FF0786DC \n"
 137 
 138 "loc_FF0786BC:\n"
 139 "    BL      sub_FF075848 \n"
 140 "    B       loc_FF0786DC \n"
 141 
 142 "loc_FF0786C4:\n"
 143 "    BL      sub_FF078CAC \n"
 144 "    B       loc_FF0786DC \n"
 145 
 146 "loc_FF0786CC:\n"
 147 "    BL      sub_FF0765B8 \n"
 148 "    B       loc_FF0786DC \n"
 149 
 150 "loc_FF0786D4:\n"
 151 "    BL      sub_FF07642C \n"
 152 "    STR     R5, [R4, #0x158] \n"
 153 
 154 "loc_FF0786DC:\n"
 155 "    LDR     R1, [SP, #4] \n"
 156 "    LDR     R3, =0x6D6 \n"
 157 "    STR     R6, [R1] \n"
 158 "    STR     R3, [SP] \n"
 159 "    LDR     R3, =0xFF074F3C /*'MovieRecorder.c'*/ \n"
 160 "    LDR     R0, [R4, #0x28] \n"
 161 "    MOV     R2, R10 \n"
 162 "    BL      sub_FF02BA6C /*_PostMessageQueueStrictly*/ \n"
 163 "    LDR     R0, [R4, #0x12C] \n"
 164 "    BL      _GiveSemaphore \n"
 165 "    B       loc_FF078570 \n"
 166 );
 167 }

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