root/platform/g1x/sub/100f/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 @ 0xFF1CA86C - 0xFF1CA9E4, length=95
  14 void __attribute__((naked,noinline)) movie_record_task() {
  15 asm volatile (
  16 "    STMFD   SP!, {R2-R10,LR} \n"
  17 "    LDR     R6, =0xFF1C98BC \n"
  18 "    LDR     R7, =0xFF1CA2D8 \n"
  19 "    LDR     R4, =0x9D98 \n"
  20 "    LDR     R9, =0x6D6 \n"
  21 "    LDR     R10, =0x2710 \n"
  22 "    MOV     R8, #1 \n"
  23 "    MOV     R5, #0 \n"
  24 
  25 "loc_FF1CA88C:\n"
  26 "    LDR     R0, [R4, #0x24] \n"
  27 "    MOV     R2, #0 \n"
  28 "    ADD     R1, SP, #4 \n"
  29 "    BL      sub_FF029EA8 /*_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_FF1CA9C8 \n"
  37 "    LDR     R0, [SP, #4] \n"
  38 "    LDR     R1, [R0] \n"
  39 "    SUB     R1, R1, #2 \n"
  40 "    CMP     R1, #0xD \n"
  41 "    ADDCC   PC, PC, R1, LSL#2 \n"
  42 "    B       loc_FF1CA9C8 \n"
  43 "    B       loc_FF1CA968 \n"
  44 "    B       loc_FF1CA98C \n"
  45 "    B       loc_FF1CA99C \n"
  46 "    B       loc_FF1CA9A4 \n"
  47 "    B       loc_FF1CA9AC \n"
  48 "    B       loc_FF1CA9B4 \n"
  49 "    B       loc_FF1CA970 \n"
  50 "    B       loc_FF1CA9BC \n"
  51 "    B       loc_FF1CA97C \n"
  52 "    B       loc_FF1CA9C8 \n"
  53 "    B       loc_FF1CA9C4 \n"
  54 "    B       loc_FF1CA934 \n"
  55 "    B       loc_FF1CA904 \n"
  56 
  57 "loc_FF1CA904:\n"
  58 "    STR     R5, [R4, #0x40] \n"
  59 "    STR     R5, [R4, #0x30] \n"
  60 "    STR     R5, [R4, #0x34] \n"
  61 "    STRH    R5, [R4, #6] \n"
  62 "    STR     R6, [R4, #0xD8] \n"
  63 "    STR     R7, [R4, #0xF4] \n"
  64 "    LDR     R0, [R4, #0xC] \n"
  65 "    ADD     R0, R0, #1 \n"
  66 "    STR     R0, [R4, #0xC] \n"
  67 "    MOV     R0, #6 \n"
  68 "    STR     R0, [R4, #0x44] \n"
  69 "    B       loc_FF1CA954 \n"
  70 
  71 "loc_FF1CA934:\n"
  72 "    STR     R5, [R4, #0x40] \n"
  73 "    STR     R5, [R4, #0x30] \n"
  74 "    STR     R6, [R4, #0xD8] \n"
  75 "    STR     R7, [R4, #0xF4] \n"
  76 "    LDR     R0, [R4, #0xC] \n"
  77 "    ADD     R0, R0, #1 \n"
  78 "    STR     R0, [R4, #0xC] \n"
  79 "    STR     R8, [R4, #0x44] \n"
  80 
  81 "loc_FF1CA954:\n"
  82 "    LDR     R2, =0xFF1C8E50 \n"
  83 "    LDR     R1, =0xC4620 \n"
  84 "    LDR     R0, =0xFF1C8F64 \n"
  85 "    BL      sub_FF046660 \n"
  86 "    B       loc_FF1CA9C8 \n"
  87 
  88 "loc_FF1CA968:\n"
  89 "    BL      sub_FF1C9DE8 \n"
  90 "    B       loc_FF1CA9C8 \n"
  91 
  92 "loc_FF1CA970:\n"
  93 "    LDR     R1, [R4, #0xF4] \n"
  94 "    BLX     R1 \n"
  95 
  96 "    LDR     R0, =video_compression_rate\n" //added
  97 "    BL      set_quality\n"                 //added
  98 
  99 "    B       loc_FF1CA9C8 \n"
 100 
 101 "loc_FF1CA97C:\n"
 102 "    LDR     R1, [R0, #0x18] \n"
 103 "    LDR     R0, [R0, #4] \n"
 104 "    BL      sub_FF369B10 \n"
 105 "    B       loc_FF1CA9C8 \n"
 106 
 107 "loc_FF1CA98C:\n"
 108 "    LDR     R0, [R4, #0x44] \n"
 109 "    CMP     R0, #5 \n"
 110 "    STRNE   R8, [R4, #0x34] \n"
 111 "    B       loc_FF1CA9C8 \n"
 112 
 113 "loc_FF1CA99C:\n"
 114 "    BL      sub_FF1C9520 \n"
 115 "    B       loc_FF1CA9C8 \n"
 116 
 117 "loc_FF1CA9A4:\n"
 118 "    BL      sub_FF1C9218 \n"
 119 "    B       loc_FF1CA9C8 \n"
 120 
 121 "loc_FF1CA9AC:\n"
 122 "    BL      sub_FF1C8FBC \n"
 123 "    B       loc_FF1CA9C8 \n"
 124 
 125 "loc_FF1CA9B4:\n"
 126 "    BL      sub_FF1C8BE4 \n"
 127 "    B       loc_FF1CA9C8 \n"
 128 
 129 "loc_FF1CA9BC:\n"
 130 "    BL      sub_FF1C8B64 \n"
 131 "    B       loc_FF1CA9C8 \n"
 132 
 133 "loc_FF1CA9C4:\n"
 134 "    BL      sub_FF1CAF04 \n"
 135 
 136 "loc_FF1CA9C8:\n"
 137 "    LDR     R1, [SP, #4] \n"
 138 "    LDR     R3, =0xFF1C8900 /*'MovieRecorder.c'*/ \n"
 139 "    STR     R5, [R1] \n"
 140 "    STR     R9, [SP] \n"
 141 "    LDR     R0, [R4, #0x28] \n"
 142 "    MOV     R2, R10 \n"
 143 "    BL      sub_FF02A820 /*_PostMessageQueueStrictly*/ \n"
 144 "    B       loc_FF1CA88C \n"
 145 );
 146 }

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