root/platform/g1x/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(__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 @ 0xFF1CA8A4 - 0xFF1CAA1C, length=95
  14 void __attribute__((naked,noinline)) movie_record_task() {
  15 asm volatile (
  16 "    STMFD   SP!, {R2-R10,LR} \n"
  17 "    LDR     R6, =0xFF1C98F4 \n"
  18 "    LDR     R7, =0xFF1CA310 \n"
  19 "    LDR     R4, =0x9DA0 \n"
  20 "    LDR     R9, =0x6D6 \n"
  21 "    LDR     R10, =0x2710 \n"
  22 "    MOV     R8, #1 \n"
  23 "    MOV     R5, #0 \n"
  24 
  25 "loc_FF1CA8C4:\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_FF1CAA00 \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_FF1CAA00 \n"
  43 "    B       loc_FF1CA9A0 \n"
  44 "    B       loc_FF1CA9C4 \n"
  45 "    B       loc_FF1CA9D4 \n"
  46 "    B       loc_FF1CA9DC \n"
  47 "    B       loc_FF1CA9E4 \n"
  48 "    B       loc_FF1CA9EC \n"
  49 "    B       loc_FF1CA9A8 \n"
  50 "    B       loc_FF1CA9F4 \n"
  51 "    B       loc_FF1CA9B4 \n"
  52 "    B       loc_FF1CAA00 \n"
  53 "    B       loc_FF1CA9FC \n"
  54 "    B       loc_FF1CA96C \n"
  55 "    B       loc_FF1CA93C \n"
  56 
  57 "loc_FF1CA93C:\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_FF1CA98C \n"
  70 
  71 "loc_FF1CA96C:\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_FF1CA98C:\n"
  82 "    LDR     R2, =0xFF1C8E88 \n"
  83 "    LDR     R1, =0xC4620 \n"
  84 "    LDR     R0, =0xFF1C8F9C \n"
  85 "    BL      sub_FF046660 \n"
  86 "    B       loc_FF1CAA00 \n"
  87 
  88 "loc_FF1CA9A0:\n"
  89 "    BL      sub_FF1C9E20 \n"
  90 "    B       loc_FF1CAA00 \n"
  91 
  92 "loc_FF1CA9A8:\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_FF1CAA00 \n"
 100 
 101 "loc_FF1CA9B4:\n"
 102 "    LDR     R1, [R0, #0x18] \n"
 103 "    LDR     R0, [R0, #4] \n"
 104 "    BL      sub_FF36A0D4 \n"
 105 "    B       loc_FF1CAA00 \n"
 106 
 107 "loc_FF1CA9C4:\n"
 108 "    LDR     R0, [R4, #0x44] \n"
 109 "    CMP     R0, #5 \n"
 110 "    STRNE   R8, [R4, #0x34] \n"
 111 "    B       loc_FF1CAA00 \n"
 112 
 113 "loc_FF1CA9D4:\n"
 114 "    BL      sub_FF1C9558 \n"
 115 "    B       loc_FF1CAA00 \n"
 116 
 117 "loc_FF1CA9DC:\n"
 118 "    BL      sub_FF1C9250 \n"
 119 "    B       loc_FF1CAA00 \n"
 120 
 121 "loc_FF1CA9E4:\n"
 122 "    BL      sub_FF1C8FF4 \n"
 123 "    B       loc_FF1CAA00 \n"
 124 
 125 "loc_FF1CA9EC:\n"
 126 "    BL      sub_FF1C8C1C \n"
 127 "    B       loc_FF1CAA00 \n"
 128 
 129 "loc_FF1CA9F4:\n"
 130 "    BL      sub_FF1C8B9C \n"
 131 "    B       loc_FF1CAA00 \n"
 132 
 133 "loc_FF1CA9FC:\n"
 134 "    BL      sub_FF1CAF3C \n"
 135 
 136 "loc_FF1CAA00:\n"
 137 "    LDR     R1, [SP, #4] \n"
 138 "    LDR     R3, =0xFF1C8938 /*'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_FF1CA8C4 \n"
 145 );
 146 }

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