root/platform/sx30/sub/100e/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 @ 0xFF883348 - 0xFF8834D4, length=100
  14 void __attribute__((naked,noinline)) movie_record_task() {
  15 asm volatile (
  16 "    STMFD   SP!, {R2-R10,LR} \n"
  17 "    LDR     R9, =0x5AA \n"
  18 "    LDR     R8, =0x2710 \n"
  19 "    LDR     R4, =0x34E0 \n"
  20 "    LDR     R7, =0xFF882FC4 \n"
  21 "    MOV     R6, #0 \n"
  22 "    MOV     R5, #1 \n"
  23 "    ADD     R10, R9, #0x44 \n"
  24 
  25 "loc_FF883368:\n"
  26 "    LDR     R0, [R4, #0x24] \n"
  27 "    MOV     R2, #0 \n"
  28 "    ADD     R1, SP, #4 \n"
  29 "    BL      sub_FF83A4C8 /*_ReceiveMessageQueue*/ \n"
  30 "    LDR     R2, =0xFF881594 /*'MovieRecorder.c'*/ \n"
  31 "    LDR     R0, [R4, #0xD0] \n"
  32 "    MOV     R3, R9 \n"
  33 "    MOV     R1, R8 \n"
  34 "    BL      sub_FF83ADC4 /*_TakeSemaphoreStrictly*/ \n"
  35 "    LDR     R0, [R4, #0x2C] \n"
  36 "    CMP     R0, #0 \n"
  37 "    LDRNE   R0, [R4, #0xC] \n"
  38 "    CMPNE   R0, #2 \n"
  39 "    LDRNE   R0, [R4, #0x44] \n"
  40 "    CMPNE   R0, #6 \n"
  41 "    BNE     loc_FF8834B0 \n"
  42 "    LDR     R0, [SP, #4] \n"
  43 "    LDR     R1, [R0] \n"
  44 "    SUB     R1, R1, #2 \n"
  45 "    CMP     R1, #0xC \n"
  46 "    ADDLS   PC, PC, R1, LSL#2 \n"
  47 "    B       loc_FF8834B0 \n"
  48 "    B       loc_FF883458 \n"
  49 "    B       loc_FF883470 \n"
  50 "    B       loc_FF883480 \n"
  51 "    B       loc_FF883488 \n"
  52 "    B       loc_FF883460 \n"
  53 "    B       loc_FF883490 \n"
  54 "    B       loc_FF883468 \n"
  55 "    B       loc_FF8834B0 \n"
  56 "    B       loc_FF8834A0 \n"
  57 "    B       loc_FF8834A8 \n"
  58 "    B       loc_FF883498 \n"
  59 "    B       loc_FF883420 \n"
  60 "    B       loc_FF8833F4 \n"
  61 
  62 "loc_FF8833F4:\n"
  63 "    STR     R6, [R4, #0x40] \n"
  64 "    STR     R6, [R4, #0x30] \n"
  65 "    STR     R6, [R4, #0x34] \n"
  66 "    STRH    R6, [R4, #6] \n"
  67 "    STR     R7, [R4, #0xB4] \n"
  68 "    LDR     R0, [R4, #0xC] \n"
  69 "    ADD     R0, R0, #1 \n"
  70 "    STR     R0, [R4, #0xC] \n"
  71 "    MOV     R0, #6 \n"
  72 "    STR     R0, [R4, #0x44] \n"
  73 "    B       loc_FF883444 \n"
  74 
  75 "loc_FF883420:\n"
  76 "    LDR     R0, =0xFF881AD8 \n"
  77 "    STR     R6, [R4, #0x40] \n"
  78 "    STR     R0, [R4, #0xBC] \n"
  79 "    STR     R6, [R4, #0x30] \n"
  80 "    STR     R7, [R4, #0xB4] \n"
  81 "    LDR     R0, [R4, #0xC] \n"
  82 "    ADD     R0, R0, #1 \n"
  83 "    STR     R0, [R4, #0xC] \n"
  84 "    STR     R5, [R4, #0x44] \n"
  85 
  86 "loc_FF883444:\n"
  87 "    LDR     R2, =0xFF881ADC \n"
  88 "    LDR     R1, =0x3B7E8 \n"
  89 "    LDR     R0, =0xFF881C04 \n"
  90 "    BL      sub_FF852E4C \n"
  91 "    B       loc_FF8834B0 \n"
  92 
  93 "loc_FF883458:\n"
  94 "    BL      sub_FF883104 \n"
  95 "    B       loc_FF8834B0 \n"
  96 
  97 "loc_FF883460:\n"
  98 "    BL      sub_FF8829D4 \n"
  99 
 100 "    LDR     R0, =video_compression_rate\n" //added
 101 "    BL      set_quality\n"                 //added
 102 
 103 "    B       loc_FF8834B0 \n"
 104 
 105 "loc_FF883468:\n"
 106 "    BL      sub_FF8839C0 \n"
 107 "    B       loc_FF8834B0 \n"
 108 
 109 "loc_FF883470:\n"
 110 "    LDR     R0, [R4, #0x44] \n"
 111 "    CMP     R0, #5 \n"
 112 "    STRNE   R5, [R4, #0x34] \n"
 113 "    B       loc_FF8834B0 \n"
 114 
 115 "loc_FF883480:\n"
 116 "    BL      sub_FF882670 \n"
 117 "    B       loc_FF8834B0 \n"
 118 
 119 "loc_FF883488:\n"
 120 "    BL      sub_FF8822E4 \n"
 121 "    B       loc_FF8834B0 \n"
 122 
 123 "loc_FF883490:\n"
 124 "    BL      sub_FF881A64 \n"
 125 "    B       loc_FF8834B0 \n"
 126 
 127 "loc_FF883498:\n"
 128 "    BL      sub_FF883914 \n"
 129 "    B       loc_FF8834B0 \n"
 130 
 131 "loc_FF8834A0:\n"
 132 "    BL      sub_FF8821A8 \n"
 133 "    B       loc_FF8834B0 \n"
 134 
 135 "loc_FF8834A8:\n"
 136 "    BL      sub_FF88208C \n"
 137 "    STR     R5, [R4, #0xF8] \n"
 138 
 139 "loc_FF8834B0:\n"
 140 "    LDR     R1, [SP, #4] \n"
 141 "    LDR     R3, =0xFF881594 /*'MovieRecorder.c'*/ \n"
 142 "    STR     R6, [R1] \n"
 143 "    STR     R10, [SP] \n"
 144 "    LDR     R0, [R4, #0x28] \n"
 145 "    MOV     R2, R8 \n"
 146 "    BL      sub_FF83AE1C /*_PostMessageQueueStrictly*/ \n"
 147 "    LDR     R0, [R4, #0xD0] \n"
 148 "    BL      _GiveSemaphore \n"
 149 "    B       loc_FF883368 \n"
 150 );
 151 }

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