📄 jquant1.txt
字号:
000096 1c64 ADDS r4,r4,#1 ;442
000098 f8c90034 STR r0,[r9,#0x34] ;442
|L6.156|
00009c f8d80078 LDR r0,[r8,#0x78] ;442
0000a0 42a0 CMP r0,r4 ;442
0000a2 dcb5 BGT |L6.16|
;;;452 odither = make_odither_array(cinfo, nci);
;;;453 cquantize->odither[i] = odither;
;;;454 }
;;;455 }
0000a4 e8bd87f0 POP {r4-r10,pc}
;;;456
ENDP
|L6.168|
DCD ||.constdata||
AREA ||i.finish_pass_1_quant||, CODE, READONLY, ALIGN=1
finish_pass_1_quant PROC
;;;802 METHODDEF(void)
;;;803 finish_pass_1_quant (j_decompress_ptr cinfo)
000000 4770 BX lr
;;;804 {
;;;805 GUI_USE_PARA(cinfo);
;;;806 /* no work in 1-pass case */
;;;807 }
;;;808
ENDP
AREA ||i.jinit_1pass_quantizer||, CODE, READONLY, ALIGN=2
jinit_1pass_quantizer PROC
;;;826 GLOBAL(void)
;;;827 jinit_1pass_quantizer (j_decompress_ptr cinfo)
000000 b510 PUSH {r4,lr}
;;;828 {
000002 4604 MOV r4,r0
;;;829 my_cquantize_ptr cquantize;
;;;830
;;;831 cquantize = (my_cquantize_ptr)
000004 6840 LDR r0,[r0,#4]
000006 2258 MOVS r2,#0x58
000008 6803 LDR r3,[r0,#0]
00000a 2101 MOVS r1,#1
00000c 4620 MOV r0,r4
00000e 4798 BLX r3
;;;832 (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
;;;833 SIZEOF(my_cquantizer));
;;;834 cinfo->cquantize = (struct jpeg_color_quantizer *) cquantize;
;;;835 cquantize->pub.start_pass = start_pass_1_quant;
000010 491a LDR r1,|L8.124|
000012 f8c401cc STR r0,[r4,#0x1cc]
;;;836 cquantize->pub.finish_pass = finish_pass_1_quant;
000016 6001 STR r1,[r0,#0]
000018 4919 LDR r1,|L8.128|
;;;837 cquantize->pub.new_color_map = new_color_map_1_quant;
00001a 6081 STR r1,[r0,#8]
00001c 4919 LDR r1,|L8.132|
;;;838 cquantize->fserrors[0] = NULL; /* Flag FS workspace not allocated */
00001e 60c1 STR r1,[r0,#0xc]
000020 2100 MOVS r1,#0
;;;839 cquantize->odither[0] = NULL; /* Also flag odither arrays not allocated */
000022 6441 STR r1,[r0,#0x44]
;;;840
;;;841 /* Make sure my internal arrays won't overflow */
;;;842 if (cinfo->out_color_components > MAX_Q_COMPS)
000024 6341 STR r1,[r0,#0x34]
000026 6fa0 LDR r0,[r4,#0x78]
000028 2804 CMP r0,#4
00002a dd09 BLE |L8.64|
;;;843 ERREXIT1(cinfo, JERR_QUANT_COMPONENTS, MAX_Q_COMPS);
00002c 6821 LDR r1,[r4,#0]
00002e 2037 MOVS r0,#0x37
000030 6148 STR r0,[r1,#0x14]
000032 6821 LDR r1,[r4,#0]
000034 2004 MOVS r0,#4
000036 6188 STR r0,[r1,#0x18]
000038 6820 LDR r0,[r4,#0]
00003a 6801 LDR r1,[r0,#0]
00003c 4620 MOV r0,r4
00003e 4788 BLX r1
|L8.64|
;;;844 /* Make sure colormap indexes can be represented by JSAMPLEs */
;;;845 if (cinfo->desired_number_of_colors > (MAXJSAMPLE+1))
000040 6e21 LDR r1,[r4,#0x60]
000042 f44f7080 MOV r0,#0x100
000046 4281 CMP r1,r0
000048 dd08 BLE |L8.92|
;;;846 ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXJSAMPLE+1);
00004a 6822 LDR r2,[r4,#0]
00004c 2139 MOVS r1,#0x39
00004e 6151 STR r1,[r2,#0x14]
000050 6821 LDR r1,[r4,#0]
000052 6188 STR r0,[r1,#0x18]
000054 6820 LDR r0,[r4,#0]
000056 6801 LDR r1,[r0,#0]
000058 4620 MOV r0,r4
00005a 4788 BLX r1
|L8.92|
;;;847
;;;848 /* Create the colormap and color index table. */
;;;849 create_colormap(cinfo);
00005c 4620 MOV r0,r4
00005e f7fffffe BL create_colormap
;;;850 create_colorindex(cinfo);
000062 4620 MOV r0,r4
000064 f7fffffe BL create_colorindex
;;;851
;;;852 /* Allocate Floyd-Steinberg workspace now if requested.
;;;853 * We do this now since it is FAR storage and may affect the memory
;;;854 * manager's space calculations. If the user changes to FS dither
;;;855 * mode in a later pass, we will allocate the space then, and will
;;;856 * possibly overrun the max_memory_to_use setting.
;;;857 */
;;;858 if (cinfo->dither_mode == JDITHER_FS)
000068 f8940058 LDRB r0,[r4,#0x58]
00006c 2802 CMP r0,#2
00006e d104 BNE |L8.122|
;;;859 alloc_fs_workspace(cinfo);
000070 4620 MOV r0,r4
000072 e8bd4010 POP {r4,lr}
000076 f7ffbffe B.W alloc_fs_workspace
|L8.122|
;;;860 }
00007a bd10 POP {r4,pc}
;;;861
ENDP
|L8.124|
DCD start_pass_1_quant
|L8.128|
DCD finish_pass_1_quant
|L8.132|
DCD new_color_map_1_quant
AREA ||i.largest_input_value||, CODE, READONLY, ALIGN=1
largest_input_value PROC
;;;260 LOCAL(int)
;;;261 largest_input_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
000000 2001 MOVS r0,#1
;;;262 /* Return largest input value that should map to j'th output value */
;;;263 /* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */
;;;264 {
;;;265 GUI_USE_PARA(cinfo);
;;;266 GUI_USE_PARA(ci);
;;;267 /* Breakpoints are halfway between values returned by output_value */
;;;268 return (int) (((INT32) (2*j + 1) * MAXJSAMPLE + maxj) / (2*maxj));
000002 eb000042 ADD r0,r0,r2,LSL #1
000006 ebc02000 RSB r0,r0,r0,LSL #8
00000a 4418 ADD r0,r0,r3
00000c 0059 LSLS r1,r3,#1
00000e fb90f0f1 SDIV r0,r0,r1
;;;269 }
000012 4770 BX lr
;;;270
ENDP
AREA ||i.new_color_map_1_quant||, CODE, READONLY, ALIGN=1
new_color_map_1_quant PROC
;;;815 METHODDEF(void)
;;;816 new_color_map_1_quant (j_decompress_ptr cinfo)
000000 6802 LDR r2,[r0,#0]
;;;817 {
;;;818 ERREXIT(cinfo, JERR_MODE_CHANGE);
000002 212e MOVS r1,#0x2e
000004 6151 STR r1,[r2,#0x14]
000006 6801 LDR r1,[r0,#0]
000008 6809 LDR r1,[r1,#0]
00000a 4708 BX r1
;;;819 }
;;;820
ENDP
AREA ||i.quantize3_ord_dither||, CODE, READONLY, ALIGN=2
quantize3_ord_dither PROC
;;;568 METHODDEF(void)
;;;569 quantize3_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
000000 e92d4fff PUSH {r0-r11,lr}
;;;570 JSAMPARRAY output_buf, int num_rows)
;;;571 /* Fast path for out_color_components==3, with ordered dithering */
;;;572 {
;;;573 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
;;;574 register int pixcode;
;;;575 register JSAMPROW input_ptr;
;;;576 register JSAMPROW output_ptr;
;;;577 JSAMPROW colorindex0 = cquantize->colorindex[0];
000004 f8d021cc LDR r2,[r0,#0x1cc]
000008 b084 SUB sp,sp,#0x10 ;572
;;;578 JSAMPROW colorindex1 = cquantize->colorindex[1];
00000a 6991 LDR r1,[r2,#0x18]
00000c 6f05 LDR r5,[r0,#0x70]
;;;579 JSAMPROW colorindex2 = cquantize->colorindex[2];
;;;580 int * dither0; /* points to active row of dither matrix */
;;;581 int * dither1;
;;;582 int * dither2;
;;;583 int row_index, col_index; /* current indexes into dither matrix */
;;;584 int row;
;;;585 JDIMENSION col;
;;;586 JDIMENSION width = cinfo->output_width;
00000e e9d13401 LDRD r3,r4,[r1,#4]
000012 9302 STR r3,[sp,#8] ;577
000014 6808 LDR r0,[r1,#0] ;577
;;;587
;;;588 for (row = 0; row < num_rows; row++) {
000016 e9cd5400 STRD r5,r4,[sp,#0]
00001a f04f0e00 MOV lr,#0
00001e 9003 STR r0,[sp,#0xc]
000020 e039 B |L11.150|
;;;589 row_index = cquantize->row_index;
;;;590 input_ptr = input_buf[row];
000022 bf00 NOP
|L11.36|
000024 9805 LDR r0,[sp,#0x14]
000026 f8d28030 LDR r8,[r2,#0x30]
00002a f850402e LDR r4,[r0,lr,LSL #2]
;;;591 output_ptr = output_buf[row];
00002e 9806 LDR r0,[sp,#0x18]
;;;592 dither0 = cquantize->odither[0][row_index];
;;;593 dither1 = cquantize->odither[1][row_index];
;;;594 dither2 = cquantize->odither[2][row_index];
000030 6bd5 LDR r5,[r2,#0x3c]
000032 f850302e LDR r3,[r0,lr,LSL #2] ;591
000036 e9d2060d LDRD r0,r6,[r2,#0x34]
00003a eb001b88 ADD r11,r0,r8,LSL #6 ;592
;;;595 col_index = 0;
;;;596
;;;597 for (col = width; col > 0; col--) {
00003e 9900 LDR r1,[sp,#0]
000040 eb061a88 ADD r10,r6,r8,LSL #6 ;593
000044 2000 MOVS r0,#0 ;595
000046 eb051988 ADD r9,r5,r8,LSL #6 ;594
00004a b1e9 CBZ r1,|L11.136|
|L11.76|
;;;598 pixcode = GETJSAMPLE(colorindex0[GETJSAMPLE(*input_ptr++) +
00004c 7825 LDRB r5,[r4,#0]
00004e f85b6020 LDR r6,[r11,r0,LSL #2]
000052 9f03 LDR r7,[sp,#0xc]
000054 4435 ADD r5,r5,r6
000056 f817c005 LDRB r12,[r7,r5]
;;;599 dither0[col_index]]);
;;;600 pixcode += GETJSAMPLE(colorindex1[GETJSAMPLE(*input_ptr++) +
00005a 7865 LDRB r5,[r4,#1]
00005c f85a6020 LDR r6,[r10,r0,LSL #2]
000060 9f02 LDR r7,[sp,#8]
000062 4435 ADD r5,r5,r6
000064 5d7d LDRB r5,[r7,r5]
;;;601 dither1[col_index]]);
;;;602 pixcode += GETJSAMPLE(colorindex2[GETJSAMPLE(*input_ptr++) +
000066 f8596020 LDR r6,[r9,r0,LSL #2]
00006a 44ac ADD r12,r12,r5 ;600
00006c f8145f02 LDRB r5,[r4,#2]!
000070 9f01 LDR r7,[sp,#4]
000072 4435 ADD r5,r5,r6
000074 5d7d LDRB r5,[r7,r5]
;;;603 dither2[col_index]]);
;;;604 *output_ptr++ = (JSAMPLE) pixcode;
;;;605 col_index = (col_index + 1) & ODITHER_MASK;
000076 1c40 ADDS r0,r0,#1
000078 4465 ADD r5,r5,r12 ;602
00007a 1c64 ADDS r4,r4,#1 ;602
00007c f8035b01 STRB r5,[r3],#1 ;604
000080 f000000f AND r0,r0,#0xf
000084 1e49 SUBS r1,r1,#1 ;597
000086 d1e1 BNE |L11.76|
|L11.136|
;;;606 }
;;;607 row_index = (row_index + 1) & ODITHER_MASK;
000088 f1080001 ADD r0,r8,#1
00008c f000000f AND r0,r0,#0xf
000090 f10e0e01 ADD lr,lr,#1 ;588
000094 6310 STR r0,[r2,#0x30] ;588
|L11.150|
000096 9807 LDR r0,[sp,#0x1c] ;588
000098 4586 CMP lr,r0 ;588
00009a dbc3 BLT |L11.36|
;;;608 cquantize->row_index = row_index;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -