root/platform/sx500is/sub/100c/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 @ 0xFF1896E8 - 0xFF189870, length=99
  15 void __attribute__((naked,noinline)) movie_record_task() {
  16 asm volatile (
  17 "    STMFD   SP!, {R2-R10,LR} \n"
  18 "    LDR     R8, =0xFF189318 \n"
  19 "    LDR     R4, =0x77A0 \n"
  20 "    LDR     R9, =0x65B \n"
  21 "    LDR     R10, =0x2710 \n"
  22 "    MVN     R7, #0 \n"
  23 "    MOV     R5, #1 \n"
  24 "    MOV     R6, #0 \n"
  25 
  26 "loc_FF189708:\n"
  27 "    LDR     R0, [R4, #0x28] \n"
  28 "    MOV     R2, #0 \n"
  29 "    ADD     R1, SP, #4 \n"
  30 "    BL      sub_004372A4 /*_ReceiveMessageQueue*/ \n"
  31 "    LDR     R0, [R4, #0x30] \n"
  32 "    CMP     R0, #0 \n"
  33 "    LDRNE   R0, [R4, #0x10] \n"
  34 "    CMPNE   R0, #2 \n"
  35 "    LDRNE   R0, [R4, #0x44] \n"
  36 "    CMPNE   R0, #6 \n"
  37 "    BNE     loc_FF189854 \n"
  38 "    LDR     R0, [SP, #4] \n"
  39 "    LDR     R1, [R0] \n"
  40 "    SUB     R1, R1, #2 \n"
  41 "    CMP     R1, #0xD \n"
  42 "    ADDCC   PC, PC, R1, LSL#2 \n"
  43 "    B       loc_FF189854 \n"
  44 "    B       loc_FF1897D0 \n"
  45 "    B       loc_FF1897F4 \n"
  46 "    B       loc_FF189804 \n"
  47 "    B       loc_FF18980C \n"
  48 "    B       loc_FF1897D8 \n"
  49 "    B       loc_FF189814 \n"
  50 "    B       loc_FF189840 \n"
  51 "    B       loc_FF189848 \n"
  52 "    B       loc_FF1897E4 \n"
  53 "    B       loc_FF189854 \n"
  54 "    B       loc_FF189850 \n"
  55 "    B       loc_FF1897AC \n"
  56 "    B       loc_FF189780 \n"
  57 
  58 "loc_FF189780:\n"
  59 "    STR     R6, [R4, #0x40] \n"
  60 "    STR     R6, [R4, #0x34] \n"
  61 "    STR     R7, [R4, #0xC4] \n"
  62 "    STRH    R6, [R4, #6] \n"
  63 "    STR     R8, [R4, #0xAC] \n"
  64 "    LDR     R0, [R4, #0x10] \n"
  65 "    ADD     R0, R0, #1 \n"
  66 "    STR     R0, [R4, #0x10] \n"
  67 "    MOV     R0, #6 \n"
  68 "    STR     R0, [R4, #0x44] \n"
  69 "    B       loc_FF1897C8 \n"
  70 
  71 "loc_FF1897AC:\n"
  72 "    STR     R6, [R4, #0x40] \n"
  73 "    STR     R7, [R4, #0xC4] \n"
  74 "    STR     R8, [R4, #0xAC] \n"
  75 "    LDR     R0, [R4, #0x10] \n"
  76 "    ADD     R0, R0, #1 \n"
  77 "    STR     R0, [R4, #0x10] \n"
  78 "    STR     R5, [R4, #0x44] \n"
  79 
  80 "loc_FF1897C8:\n"
  81 "    STR     R5, [R4, #8] \n"
  82 "    B       loc_FF189854 \n"
  83 
  84 "loc_FF1897D0:\n"
  85 "    BL      sub_FF189050 \n"
  86 "    B       loc_FF189854 \n"
  87 
  88 "loc_FF1897D8:\n"
  89 "    LDR     R1, [R4, #0xAC] \n"
  90 "    BLX     R1 \n"
  91 //begin patch
  92 "    LDR     R0, =video_compression_rate \n" // added
  93 "    BL      set_quality \n"                 // added
  94 //end patch
  95 "    B       loc_FF189854 \n"
  96 
  97 "loc_FF1897E4:\n"
  98 "    LDR     R1, [R0, #0x18] \n"
  99 "    LDR     R0, [R0, #4] \n"
 100 "    BL      sub_FF2D38D8 \n"
 101 "    B       loc_FF189854 \n"
 102 
 103 "loc_FF1897F4:\n"
 104 "    LDR     R0, [R4, #0x44] \n"
 105 "    CMP     R0, #5 \n"
 106 "    STRNE   R5, [R4, #0x34] \n"
 107 "    B       loc_FF189854 \n"
 108 
 109 "loc_FF189804:\n"
 110 "    BL      sub_FF188CD0 \n"
 111 "    B       loc_FF189854 \n"
 112 
 113 "loc_FF18980C:\n"
 114 "    BL      sub_FF188BA0 \n"
 115 "    B       loc_FF189854 \n"
 116 
 117 "loc_FF189814:\n"
 118 "    LDR     R0, =0xDB8CC \n"
 119 "    LDR     R0, [R0, #8] \n"
 120 "    CMP     R0, #0 \n"
 121 "    LDRNE   R2, =0xFF188AF4 \n"
 122 "    LDRNE   R0, =0xFF188B48 \n"
 123 "    MOVNE   R3, #0 \n"
 124 "    MOVNE   R1, R3 \n"
 125 "    BLNE    sub_FF0597B8 \n"
 126 "    MOV     R0, #3 \n"
 127 "    STR     R0, [R4, #0x44] \n"
 128 "    B       loc_FF189854 \n"
 129 
 130 "loc_FF189840:\n"
 131 "    BL      sub_FF188A80 \n"
 132 "    B       loc_FF189854 \n"
 133 
 134 "loc_FF189848:\n"
 135 "    BL      sub_FF18A1C8 \n"
 136 "    B       loc_FF189854 \n"
 137 
 138 "loc_FF189850:\n"
 139 "    BL      sub_FF18A0F0 \n"
 140 
 141 "loc_FF189854:\n"
 142 "    LDR     R1, [SP, #4] \n"
 143 "    LDR     R3, =0xFF1887E0 /*'MovieRecorder.c'*/ \n"
 144 "    STR     R6, [R1] \n"
 145 "    STR     R9, [SP] \n"
 146 "    LDR     R0, [R4, #0x2C] \n"
 147 "    MOV     R2, R10 \n"
 148 "    BL      sub_00437C1C /*_PostMessageQueueStrictly*/ \n"
 149 "    B       loc_FF189708 \n"
 150 );
 151 }

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