📄 gui_jpeg.txt
字号:
000048 4790 BLX r2
;;;117 /* Insert a fake EOI marker */
;;;118 nbytes = 2;
;;;119 pSrc->pub.next_input_byte = _abEnd;
00004a 4904 LDR r1,|L3.92|
00004c 2002 MOVS r0,#2 ;118
00004e 6021 STR r1,[r4,#0]
|L3.80|
;;;120 }
;;;121
;;;122 pSrc->pub.bytes_in_buffer = nbytes;
;;;123 pSrc->start_of_file = FALSE;
000050 6060 STR r0,[r4,#4]
000052 2000 MOVS r0,#0
;;;124 return TRUE;
000054 62a0 STR r0,[r4,#0x28]
000056 2001 MOVS r0,#1
;;;125 }
000058 bd70 POP {r4-r6,pc}
;;;126
ENDP
00005a 0000 DCW 0x0000
|L3.92|
DCD ||.constdata||
AREA ||i._Init||, CODE, READONLY, ALIGN=2
_Init PROC
;;;285 */
;;;286 static void _Init(struct jpeg_error_mgr* pjerr, struct jpeg_decompress_struct *pcinfo, const void * pFileData, int DataSize) {
000000 b570 PUSH {r4-r6,lr}
000002 460c MOV r4,r1
000004 4615 MOV r5,r2
000006 461e MOV r6,r3
;;;287 /* 1. Allocate and initialize a JPEG decompression object. */
;;;288 pcinfo->err = jpeg_std_error(pjerr);
000008 f7fffffe BL jpeg_std_error
;;;289 jpeg_create_decompress(pcinfo);
00000c 6020 STR r0,[r4,#0]
00000e f44f72e8 MOV r2,#0x1d0
000012 213e MOVS r1,#0x3e
000014 4620 MOV r0,r4
000016 f7fffffe BL jpeg_CreateDecompress
00001a 69a0 LDR r0,[r4,#0x18]
00001c b930 CBNZ r0,|L4.44|
00001e 6860 LDR r0,[r4,#4]
000020 222c MOVS r2,#0x2c
000022 6803 LDR r3,[r0,#0]
000024 2100 MOVS r1,#0
000026 4620 MOV r0,r4
000028 4798 BLX r3
00002a 61a0 STR r0,[r4,#0x18]
|L4.44|
00002c 490a LDR r1,|L4.88|
00002e 6081 STR r1,[r0,#8]
000030 490a LDR r1,|L4.92|
000032 60c1 STR r1,[r0,#0xc]
000034 490a LDR r1,|L4.96|
000036 6101 STR r1,[r0,#0x10]
000038 490a LDR r1,|L4.100|
00003a 6141 STR r1,[r0,#0x14]
00003c 490a LDR r1,|L4.104|
00003e 6181 STR r1,[r0,#0x18]
000040 2100 MOVS r1,#0
000042 6041 STR r1,[r0,#4]
000044 6001 STR r1,[r0,#0]
;;;290 /* 2. Init the source manager so the library can retrieve data via methods */
;;;291 _InitSrc(pcinfo, (const U8*)pFileData, DataSize);
;;;292 /* 3. Call jpeg_read_header() to obtain image info. */
;;;293 jpeg_read_header(pcinfo, TRUE);
000046 e9c05607 STRD r5,r6,[r0,#0x1c]
00004a 6241 STR r1,[r0,#0x24]
00004c 4620 MOV r0,r4
00004e e8bd4070 POP {r4-r6,lr}
000052 2101 MOVS r1,#1
000054 f7ffbffe B.W jpeg_read_header
;;;294 }
;;;295
ENDP
|L4.88|
DCD _InitSource
|L4.92|
DCD _FillInputBuffer
|L4.96|
DCD _SkipInputData
|L4.100|
DCD jpeg_resync_to_restart
|L4.104|
DCD _TermSource
AREA ||i._InitSource||, CODE, READONLY, ALIGN=1
_InitSource PROC
;;;61
;;;62 static void _InitSource (j_decompress_ptr cinfo) {
000000 6980 LDR r0,[r0,#0x18]
;;;63 SOURCE_MANAGER* pSrc = (SOURCE_MANAGER*) cinfo->src;
;;;64
;;;65 /* We reset the empty-input-file flag for each image,
;;;66 * but we don't clear the input buffer.
;;;67 * This is correct behavior for reading a series of images from one source.
;;;68 */
;;;69 pSrc->start_of_file = TRUE;
000002 2101 MOVS r1,#1
;;;70 }
000004 6281 STR r1,[r0,#0x28]
000006 4770 BX lr
;;;71
ENDP
AREA ||i._SkipInputData||, CODE, READONLY, ALIGN=1
_SkipInputData PROC
;;;138
;;;139 static void _SkipInputData (j_decompress_ptr cinfo, long num_bytes) {
000000 b570 PUSH {r4-r6,lr}
;;;140 SOURCE_MANAGER* pSrc = (SOURCE_MANAGER*) cinfo->src;
;;;141 /* Just a dumb implementation for now. Could use fseek() except
;;;142 * it doesn't work on pipes. Not clear that being smart is worth
;;;143 * any trouble anyway --- large skips are infrequent.
;;;144 */
;;;145 if (num_bytes > 0) {
000002 6985 LDR r5,[r0,#0x18]
000004 4606 MOV r6,r0 ;139
000006 1e0c SUBS r4,r1,#0 ;139
000008 dd0d BLE |L6.38|
00000a e003 B |L6.20|
|L6.12|
;;;146 while (num_bytes > (long) pSrc->pub.bytes_in_buffer) {
;;;147 num_bytes -= (long) pSrc->pub.bytes_in_buffer;
00000c 1a24 SUBS r4,r4,r0
;;;148 (void) _FillInputBuffer(cinfo);
00000e 4630 MOV r0,r6
000010 f7fffffe BL _FillInputBuffer
|L6.20|
000014 6868 LDR r0,[r5,#4] ;146
000016 42a0 CMP r0,r4 ;146
000018 dbf8 BLT |L6.12|
;;;149 /* note we assume that fill_input_buffer will never return FALSE,
;;;150 * so suspension need not be handled.
;;;151 */
;;;152 }
;;;153 pSrc->pub.next_input_byte += (size_t) num_bytes;
00001a 6828 LDR r0,[r5,#0]
00001c 4420 ADD r0,r0,r4
;;;154 pSrc->pub.bytes_in_buffer -= (size_t) num_bytes;
00001e 6028 STR r0,[r5,#0]
000020 6868 LDR r0,[r5,#4]
000022 1b00 SUBS r0,r0,r4
000024 6068 STR r0,[r5,#4]
|L6.38|
;;;155 }
;;;156 }
000026 bd70 POP {r4-r6,pc}
;;;157 /*
ENDP
AREA ||i._TermSource||, CODE, READONLY, ALIGN=1
_TermSource PROC
;;;174
;;;175 static void _TermSource(j_decompress_ptr cinfo) {
000000 4770 BX lr
;;;176 /* no work necessary here */
;;;177 GUI_USE_PARA(cinfo);
;;;178 }
;;;179
ENDP
AREA ||i.jpeg_free_small||, CODE, READONLY, ALIGN=2
jpeg_free_small PROC
;;;230
;;;231 GLOBAL(void) jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) {
000000 4b04 LDR r3,|L8.20|
000002 4608 MOV r0,r1
;;;232 GUI_USE_PARA(cinfo);
;;;233 GUI_USE_PARA(sizeofobject);
;;;234 if (--AllocCnt) {
000004 681a LDR r2,[r3,#0] ; AllocCnt
000006 1e52 SUBS r2,r2,#1
000008 601a STR r2,[r3,#0] ; AllocCnt
00000a d001 BEQ |L8.16|
;;;235 TotalSize = 0;
00000c 2200 MOVS r2,#0
00000e 605a STR r2,[r3,#4] ; TotalSize
|L8.16|
;;;236 }
;;;237 free(object);
000010 f7ffbffe B.W free
;;;238 }
;;;239
ENDP
|L8.20|
DCD ||.data||
AREA ||i.jpeg_get_small||, CODE, READONLY, ALIGN=2
jpeg_get_small PROC
;;;223
;;;224 GLOBAL(void *) jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) {
000000 4a04 LDR r2,|L9.20|
000002 4608 MOV r0,r1
;;;225 GUI_USE_PARA(cinfo);
;;;226 AllocCnt++;
000004 6811 LDR r1,[r2,#0] ; AllocCnt
000006 1c49 ADDS r1,r1,#1
;;;227 TotalSize += sizeofobject;
000008 6011 STR r1,[r2,#0] ; AllocCnt
00000a 6851 LDR r1,[r2,#4] ; TotalSize
00000c 4401 ADD r1,r1,r0
;;;228 return (void *) malloc(sizeofobject);
00000e 6051 STR r1,[r2,#4] ; TotalSize
000010 f7ffbffe B.W malloc
;;;229 }
;;;230
ENDP
|L9.20|
DCD ||.data||
AREA ||i.jpeg_mem_available||, CODE, READONLY, ALIGN=1
jpeg_mem_available PROC
;;;244
;;;245 GLOBAL(long) jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, long max_bytes_needed, long already_allocated) {
000000 4610 MOV r0,r2
;;;246 GUI_USE_PARA(cinfo);
;;;247 GUI_USE_PARA(min_bytes_needed);
;;;248 GUI_USE_PARA(already_allocated);
;;;249 return max_bytes_needed;
;;;250 }
000002 4770 BX lr
;;;251
ENDP
AREA ||i.jpeg_mem_init||, CODE, READONLY, ALIGN=1
jpeg_mem_init PROC
;;;258
;;;259 GLOBAL(long) jpeg_mem_init (j_common_ptr cinfo) {
000000 2000 MOVS r0,#0
;;;260 GUI_USE_PARA(cinfo);
;;;261 return 0;
;;;262 }
000002 4770 BX lr
;;;263
ENDP
AREA ||i.jpeg_mem_term||, CODE, READONLY, ALIGN=1
jpeg_mem_term PROC
;;;263
;;;264 GLOBAL(void) jpeg_mem_term (j_common_ptr cinfo) {
000000 4770 BX lr
;;;265 GUI_USE_PARA(cinfo);
;;;266 }
;;;267
ENDP
AREA ||.constdata||, DATA, READONLY, ALIGN=0
_abEnd
000000 ffd9 DCB 0xff,0xd9
AREA ||.data||, DATA, ALIGN=2
AllocCnt
DCD 0x00000000
TotalSize
DCD 0x00000000
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -