📄 jdpostct.txt
字号:
; generated by ARM C/C++ Compiler with , RVCT4.0 [Build 524] for uVision
; commandline ArmCC [--split_sections --debug -c --asm --interleave -o.\Obj\jdpostct.o --depend=.\Obj\jdpostct.d --device=DARMSTM --apcs=interwork -O3 -I..\..\include -I..\..\..\FWLib\library\inc -I..\..\..\USBLib\library\inc -I..\..\Config -I..\..\GUI\Core -I..\..\GUI\Font -I..\..\GUI\ConvertColor -I..\..\GUI\AntiAlias -I..\..\GUI\ConvertMono -I..\..\GUI\JPEG -I..\..\GUI\MemDev -I..\..\GUI\MultiLayer -I..\..\GUI\Widget -I..\..\GUI\WM -IC:\Keil\ARM\INC\ST\STM32F10x ..\..\GUI\JPEG\jdpostct.c]
THUMB
AREA ||i.jinit_d_post_controller||, CODE, READONLY, ALIGN=2
jinit_d_post_controller PROC
;;;254 GLOBAL(void)
;;;255 jinit_d_post_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
000000 b57c PUSH {r2-r6,lr}
;;;256 {
000002 4604 MOV r4,r0
;;;257 my_post_ptr post;
;;;258
;;;259 post = (my_post_ptr)
000004 6840 LDR r0,[r0,#4]
000006 460e MOV r6,r1 ;256
000008 221c MOVS r2,#0x1c
00000a 6803 LDR r3,[r0,#0]
00000c 2101 MOVS r1,#1
00000e 4620 MOV r0,r4
000010 4798 BLX r3
;;;260 (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
;;;261 SIZEOF(my_post_controller));
;;;262 cinfo->post = (struct jpeg_d_post_controller *) post;
;;;263 post->pub.start_pass = start_pass_dpost;
000012 4915 LDR r1,|L1.104|
000014 f8c401b0 STR r0,[r4,#0x1b0]
;;;264 post->whole_image = NULL; /* flag for no virtual arrays */
000018 6001 STR r1,[r0,#0]
00001a 2100 MOVS r1,#0
;;;265 post->buffer = NULL; /* flag for no strip buffer */
00001c 6081 STR r1,[r0,#8]
00001e 4605 MOV r5,r0 ;259
;;;266
;;;267 /* Create the quantization buffer, if needed */
;;;268 if (cinfo->quantize_colors) {
000020 60c1 STR r1,[r0,#0xc]
000022 6d60 LDR r0,[r4,#0x54]
000024 2800 CMP r0,#0
000026 d013 BEQ |L1.80|
;;;269 /* The buffer strip height is max_v_samp_factor, which is typically
;;;270 * an efficient number of rows for upsampling to return.
;;;271 * (In the presence of output rescaling, we might want to be smarter?)
;;;272 */
;;;273 post->strip_height = (JDIMENSION) cinfo->max_v_samp_factor;
000028 f8d41138 LDR r1,[r4,#0x138]
;;;274 if (need_full_buffer) {
00002c 6129 STR r1,[r5,#0x10]
00002e b186 CBZ r6,|L1.82|
;;;275 /* Two-pass color quantization: need full-image storage. */
;;;276 /* We round up the number of rows to a multiple of the strip height. */
;;;277 #ifdef QUANT_2PASS_SUPPORTED
;;;278 post->whole_image = (*cinfo->mem->request_virt_sarray)
000030 6f60 LDR r0,[r4,#0x74]
000032 f7fffffe BL jround_up
000036 692b LDR r3,[r5,#0x10]
000038 2200 MOVS r2,#0
00003a e9cd0300 STRD r0,r3,[sp,#0]
00003e 6f23 LDR r3,[r4,#0x70]
000040 6fa0 LDR r0,[r4,#0x78]
000042 4343 MULS r3,r0,r3
000044 6860 LDR r0,[r4,#4]
000046 2101 MOVS r1,#1
000048 6906 LDR r6,[r0,#0x10]
00004a 4620 MOV r0,r4
00004c 47b0 BLX r6
00004e 60a8 STR r0,[r5,#8]
|L1.80|
;;;279 ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
;;;280 cinfo->output_width * cinfo->out_color_components,
;;;281 (JDIMENSION) jround_up((long) cinfo->output_height,
;;;282 (long) post->strip_height),
;;;283 post->strip_height);
;;;284 #else
;;;285 ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
;;;286 #endif /* QUANT_2PASS_SUPPORTED */
;;;287 } else {
;;;288 /* One-pass color quantization: just make a strip buffer. */
;;;289 post->buffer = (*cinfo->mem->alloc_sarray)
;;;290 ((j_common_ptr) cinfo, JPOOL_IMAGE,
;;;291 cinfo->output_width * cinfo->out_color_components,
;;;292 post->strip_height);
;;;293 }
;;;294 }
;;;295 }
000050 bd7c POP {r2-r6,pc}
|L1.82|
000052 6f22 LDR r2,[r4,#0x70] ;289
000054 6fa0 LDR r0,[r4,#0x78] ;289
000056 460b MOV r3,r1 ;289
000058 4342 MULS r2,r0,r2 ;289
00005a 6860 LDR r0,[r4,#4] ;289
00005c 2101 MOVS r1,#1 ;289
00005e 6886 LDR r6,[r0,#8] ;289
000060 4620 MOV r0,r4 ;289
000062 47b0 BLX r6 ;289
000064 60e8 STR r0,[r5,#0xc] ;289
000066 bd7c POP {r2-r6,pc}
ENDP
|L1.104|
DCD start_pass_dpost
AREA ||i.post_process_1pass||, CODE, READONLY, ALIGN=1
post_process_1pass PROC
;;;125 METHODDEF(void)
;;;126 post_process_1pass (j_decompress_ptr cinfo,
000000 e92d41ff PUSH {r0-r8,lr}
;;;127 JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
;;;128 JDIMENSION in_row_groups_avail,
;;;129 JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
;;;130 JDIMENSION out_rows_avail)
;;;131 {
;;;132 my_post_ptr post = (my_post_ptr) cinfo->post;
000004 e9dd850a LDRD r8,r5,[sp,#0x28]
000008 4604 MOV r4,r0 ;131
00000a 4694 MOV r12,r2 ;131
00000c 469e MOV lr,r3 ;131
;;;133 JDIMENSION num_rows, max_rows;
;;;134
;;;135 /* Fill the buffer, but not more than what we can dump out in one go. */
;;;136 /* Note we rely on the upsampler to detect bottom of image. */
;;;137 max_rows = out_rows_avail - *out_row_ctr;
00000e f8d461b0 LDR r6,[r4,#0x1b0]
000012 4608 MOV r0,r1 ;131
000014 9b0c LDR r3,[sp,#0x30] ;132
;;;138 if (max_rows > post->strip_height)
000016 682a LDR r2,[r5,#0]
000018 6931 LDR r1,[r6,#0x10]
00001a 1a9b SUBS r3,r3,r2 ;137
00001c 4299 CMP r1,r3
00001e d200 BCS |L2.34|
;;;139 max_rows = post->strip_height;
000020 460b MOV r3,r1
|L2.34|
;;;140 num_rows = 0;
000022 2100 MOVS r1,#0
;;;141 (*cinfo->upsample->upsample) (cinfo,
000024 9103 STR r1,[sp,#0xc]
000026 68f1 LDR r1,[r6,#0xc]
000028 aa03 ADD r2,sp,#0xc
00002a e88d000e STM sp,{r1-r3}
00002e f8d411c4 LDR r1,[r4,#0x1c4]
000032 4673 MOV r3,lr
000034 684f LDR r7,[r1,#4]
000036 4601 MOV r1,r0
000038 4662 MOV r2,r12
00003a 4620 MOV r0,r4
00003c 47b8 BLX r7
;;;142 input_buf, in_row_group_ctr, in_row_groups_avail,
;;;143 post->buffer, &num_rows, max_rows);
;;;144 /* Quantize and emit data. */
;;;145 (*cinfo->cquantize->color_quantize) (cinfo,
00003e 6828 LDR r0,[r5,#0]
000040 68f1 LDR r1,[r6,#0xc]
000042 eb080280 ADD r2,r8,r0,LSL #2
000046 f8d401cc LDR r0,[r4,#0x1cc]
00004a 9b03 LDR r3,[sp,#0xc]
00004c 6846 LDR r6,[r0,#4]
00004e 4620 MOV r0,r4
000050 47b0 BLX r6
;;;146 post->buffer, output_buf + *out_row_ctr, (int) num_rows);
;;;147 *out_row_ctr += num_rows;
000052 6828 LDR r0,[r5,#0]
000054 9903 LDR r1,[sp,#0xc]
000056 4408 ADD r0,r0,r1
;;;148 }
000058 6028 STR r0,[r5,#0]
00005a e8bd81ff POP {r0-r8,pc}
;;;149
ENDP
AREA ||i.post_process_2pass||, CODE, READONLY, ALIGN=1
post_process_2pass PROC
;;;203 METHODDEF(void)
;;;204 post_process_2pass (j_decompress_ptr cinfo,
000000 e92d43f8 PUSH {r3-r9,lr}
;;;205 JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
;;;206 JDIMENSION in_row_groups_avail,
;;;207 JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
;;;208 JDIMENSION out_rows_avail)
;;;209 {
;;;210 my_post_ptr post = (my_post_ptr) cinfo->post;
;;;211 JDIMENSION num_rows, max_rows;
;;;212
;;;213 GUI_USE_PARA(in_row_groups_avail);
;;;214 GUI_USE_PARA(in_row_group_ctr);
;;;215 GUI_USE_PARA(input_buf);
;;;216 /* Reposition virtual buffer if at start of strip. */
;;;217 if (post->next_row == 0) {
000004 f8d041b0 LDR r4,[r0,#0x1b0]
000008 4606 MOV r6,r0 ;209
00000a e9dd9708 LDRD r9,r7,[sp,#0x20] ;210
00000e f8dd8028 LDR r8,[sp,#0x28] ;210
000012 69a0 LDR r0,[r4,#0x18]
000014 b948 CBNZ r0,|L3.42|
;;;218 post->buffer = (*cinfo->mem->access_virt_sarray)
000016 2300 MOVS r3,#0
000018 9300 STR r3,[sp,#0]
00001a 6870 LDR r0,[r6,#4]
00001c e9d43204 LDRD r3,r2,[r4,#0x10]
000020 69c5 LDR r5,[r0,#0x1c]
000022 68a1 LDR r1,[r4,#8]
000024 4630 MOV r0,r6
000026 47a8 BLX r5
000028 60e0 STR r0,[r4,#0xc]
|L3.42|
;;;219 ((j_common_ptr) cinfo, post->whole_image,
;;;220 post->starting_row, post->strip_height, FALSE);
;;;221 }
;;;222
;;;223 /* Determine number of rows to emit. */
;;;224 num_rows = post->strip_height - post->next_row; /* available in strip */
;;;225 max_rows = out_rows_avail - *out_row_ctr; /* available in output area */
00002a 6923 LDR r3,[r4,#0x10]
00002c 69a1 LDR r1,[r4,#0x18]
00002e 683a LDR r2,[r7,#0]
000030 1a5d SUBS r5,r3,r1 ;224
000032 eba80002 SUB r0,r8,r2
;;;226 if (num_rows > max_rows)
000036 4285 CMP r5,r0
000038 d900 BLS |L3.60|
;;;227 num_rows = max_rows;
00003a 4605 MOV r5,r0
|L3.60|
;;;228 /* We have to check bottom of image here, can't depend on upsampler. */
;;;229 max_rows = cinfo->output_height - post->starting_row;
00003c 6f70 LDR r0,[r6,#0x74]
00003e 6963 LDR r3,[r4,#0x14]
000040 1ac0 SUBS r0,r0,r3
;;;230 if (num_rows > max_rows)
000042 4285 CMP r5,r0
000044 d900 BLS |L3.72|
;;;231 num_rows = max_rows;
000046 4605 MOV r5,r0
|L3.72|
;;;232
;;;233 /* Quantize and emit data. */
;;;234 (*cinfo->cquantize->color_quantize) (cinfo,
000048 68e0 LDR r0,[r4,#0xc]
00004a eb090282 ADD r2,r9,r2,LSL #2
00004e eb000181 ADD r1,r0,r1,LSL #2
000052 f8d601cc LDR r0,[r6,#0x1cc]
000056 462b MOV r3,r5
000058 f8d0c004 LDR r12,[r0,#4]
00005c 4630 MOV r0,r6
00005e 47e0 BLX r12
;;;235 post->buffer + post->next_row, output_buf + *out_row_ctr,
;;;236 (int) num_rows);
;;;237 *out_row_ctr += num_rows;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -