Subversion Repositories Kolibri OS

Rev

Rev 6807 | Rev 8394 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3056 dunkaist 1
;;================================================================================================;;
2
;;//// convert.asm //// (c) dunkaist, 2012 ///////////////////////////////////////////////////////;;
3
;;================================================================================================;;
4
;;                                                                                                ;;
5
;; This file is part of Common development libraries (Libs-Dev).                                  ;;
6
;;                                                                                                ;;
7
;; Libs-Dev is free software: you can redistribute it and/or modify it under the terms of the GNU ;;
8
;; Lesser General Public License as published by the Free Software Foundation, either version 2.1 ;;
9
;; of the License, or (at your option) any later version.                                         ;;
10
;;                                                                                                ;;
11
;; Libs-Dev is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without  ;;
12
;; even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU  ;;
13
;; Lesser General Public License for more details.                                                ;;
14
;;                                                                                                ;;
15
;; You should have received a copy of the GNU Lesser General Public License along with Libs-Dev.  ;;
16
;; If not, see .                                                    ;;
17
;;                                                                                                ;;
18
;;================================================================================================;;
19
 
6807 dunkaist 20
 
21
 
3056 dunkaist 22
;;================================================================================================;;
23
proc img.convert _src, _dst, _dst_type, _flags, _param                                            ;;
24
;;------------------------------------------------------------------------------------------------;;
6807 dunkaist 25
;? convert _image                                                                                 ;;
3056 dunkaist 26
;;------------------------------------------------------------------------------------------------;;
27
;> [_src]      = pointer to source image                                                          ;;
6807 dunkaist 28
;> [_dst]      = pointer to destination image, or 0 to create a new one                           ;;
29
;> [_dst_type] = Image.Type of resulting image                                                    ;;
3056 dunkaist 30
;> [_flags]    = see libimg.inc                                                                   ;;
6807 dunkaist 31
;> [_param]    = depends on _flags fields, see libimg.inc                                         ;;
3056 dunkaist 32
;;------------------------------------------------------------------------------------------------;;
33
;< eax = 0 / pointer to converted image                                                           ;;
34
;< ecx = error code / undefined                                                                   ;;
35
;;================================================================================================;;
7105 dunkaist 36
locals
37
        img     dd ?
38
        prev    dd ?
39
endl
40
        push    ebx esi edi
41
        mov     [img], 0
42
        mov     [prev], 0
6807 dunkaist 43
        mov     ebx, [_src]
44
    @@:
45
        mov     eax, [ebx + Image.Previous]
46
        test    eax, eax
47
        jz      .loop
48
        mov     ebx, eax
49
        jmp     @b
50
  .loop:
51
        stdcall img.convert.layer, ebx, [_dst], [_dst_type], [_flags], [_param]
52
        test    eax, eax
53
        jz      .error
7105 dunkaist 54
        cmp     [img], 0
6807 dunkaist 55
        jnz     @f
7105 dunkaist 56
        mov     [img], eax
6807 dunkaist 57
    @@:
7105 dunkaist 58
        mov     ecx, [prev]
6807 dunkaist 59
        jecxz   @f
60
        mov     [ecx + Image.Next], eax
7105 dunkaist 61
        mov     [eax + Image.Previous], ecx
6807 dunkaist 62
    @@:
7105 dunkaist 63
        mov     [prev], eax
64
        push    [ebx + Image.Flags]
65
        pop     [eax + Image.Flags]
66
        push    [ebx + Image.Delay]
67
        pop     [eax + Image.Delay]
6807 dunkaist 68
        mov     ebx, [ebx + Image.Next]
69
        test    ebx, ebx
70
        jnz     .loop
7105 dunkaist 71
        mov     eax, [img]
6807 dunkaist 72
  .error:
7105 dunkaist 73
        pop     edi esi ebx
6807 dunkaist 74
        ret
75
endp
76
 
77
 
78
;;================================================================================================;;
79
proc img.convert.layer _src, _dst, _dst_type, _flags, _param                                      ;;
80
;;------------------------------------------------------------------------------------------------;;
81
;? convert _image layer                                                                           ;;
82
;;------------------------------------------------------------------------------------------------;;
83
;> [_src]      = pointer to source image                                                          ;;
84
;> [_dst]      = pointer to destination image, or 0 to create a new one                           ;;
85
;> [_dst_type] = Image.Type of resulting image                                                    ;;
86
;> [_flags]    = see libimg.inc                                                                   ;;
87
;> [_param]    = depends on _flags fields, see libimg.inc                                         ;;
88
;;------------------------------------------------------------------------------------------------;;
89
;< eax = 0 / pointer to converted image                                                           ;;
90
;< ecx = error code / undefined                                                                   ;;
91
;;================================================================================================;;
3056 dunkaist 92
locals
7105 dunkaist 93
        fun     rd 1
3056 dunkaist 94
endl
6807 dunkaist 95
        push    ebx esi edi
96
 
7105 dunkaist 97
        mov     ebx, [_src]
98
        mov     eax, [ebx + Image.Type]
99
        mov     esi, [img.convert.table + 4*eax]
100
  .next:
101
        lodsd
102
        test    eax, eax
103
        jnz     @f
104
        mov     ecx, LIBIMG_ERROR_BIT_DEPTH
105
        jmp     .exit
3056 dunkaist 106
    @@:
7105 dunkaist 107
        cmp     eax, [_dst_type]
108
        lodsd
109
        jnz     .next
110
        mov     [fun], eax
111
 
112
        mov     eax, [_dst]
113
        test    eax, eax
114
        jnz     @f
115
        stdcall img.create, [ebx + Image.Width], [ebx + Image.Height], [_dst_type]
116
        test    eax, eax
117
        jz      .exit
118
        mov     [_dst], eax
3056 dunkaist 119
    @@:
7105 dunkaist 120
        mov     edi, [eax + Image.Data]
121
        mov     esi, [ebx + Image.Data]
122
        mov     eax, [ebx + Image.Type]
123
        stdcall [fun], [_src], [_dst]
124
        mov     eax, [_dst]
125
  .exit:
126
        pop     edi esi ebx
127
        ret
128
endp
3056 dunkaist 129
 
7105 dunkaist 130
proc img._.convert.bpp8i_to_bpp24 _src, _dst
131
        mov     ecx, [ebx + Image.Width]
132
        imul    ecx, [ebx + Image.Height]
133
 
134
        mov     ebx, [ebx + Image.Palette]
135
        sub     ecx, 1
136
        jz      .bpp8i.last
3056 dunkaist 137
    @@:
7105 dunkaist 138
        movzx   eax, byte[esi]
139
        add     esi, 1
140
        mov     eax, [ebx + eax*4]
141
        mov     [edi], eax
142
        add     edi, 3
143
        sub     ecx, 1
144
        jnz     @b
145
  .bpp8i.last:
146
        movzx   eax, byte[esi]
147
        mov     eax, [ebx + eax*4]
148
        mov     [edi], ax
149
        shr     eax, 16
150
        mov     [edi + 2], al
151
        ret
152
endp
3056 dunkaist 153
 
154
 
7105 dunkaist 155
proc img._.convert.bpp8i_to_bpp32 _src, _dst
156
        mov     ecx, [ebx + Image.Width]
157
        imul    ecx, [ebx + Image.Height]
3056 dunkaist 158
 
7105 dunkaist 159
        mov     ebx, [ebx + Image.Palette]
3056 dunkaist 160
    @@:
7105 dunkaist 161
        movzx   eax, byte[esi]
162
        add     esi, 1
163
        mov     eax, [ebx + eax*4]
164
        mov     [edi], eax
165
        add     edi, 4
166
        dec     ecx
167
        jnz     @b
168
        ret
169
endp
3056 dunkaist 170
 
171
 
7105 dunkaist 172
proc img._.convert.bpp8g_to_bpp1 _src, _dst
173
        mov     eax, [_dst]
174
        mov     eax, [eax + Image.Palette]
175
        mov     dword[eax], 0x00000000
176
        mov     dword[eax + 4], 0x00ffffff
177
        mov     edx, [ebx + Image.Height]
3056 dunkaist 178
  .bpp8g_to_bpp1.line:
7105 dunkaist 179
        mov     ax, 0x0800
180
        mov     ecx, [ebx + Image.Width]
3056 dunkaist 181
  .bpp8g_to_bpp1.pixel:
7105 dunkaist 182
        shl     al, 1
183
        cmp     byte[esi], 0x7f
184
        cmc
185
        adc     eax, 0
186
        add     esi, 1
187
        dec     ah
188
        jnz     @f
189
        mov     byte[edi], al
190
        add     edi, 1
191
        mov     ax, 0x0800
3056 dunkaist 192
    @@:
7105 dunkaist 193
        dec     ecx
194
        jnz     .bpp8g_to_bpp1.pixel
195
        cmp     ah, 8
196
        je      @f
197
        mov     cl, ah
198
        shl     al, cl
199
        mov     byte[edi], al
200
        add     edi, 1
3056 dunkaist 201
    @@:
7105 dunkaist 202
        dec     edx
203
        jnz     .bpp8g_to_bpp1.line
204
        ret
205
endp
3056 dunkaist 206
 
7105 dunkaist 207
proc img._.convert.bpp8g_to_bpp24 _src, _dst
208
        mov     ecx, [ebx + Image.Width]
209
        imul    ecx, [ebx + Image.Height]
210
    @@:
211
        mov     al, byte[esi]
212
        mov     byte[edi + 0], al
213
        mov     byte[edi + 1], al
214
        mov     byte[edi + 2], al
215
        add     esi, 1
216
        add     edi, 3
217
        sub     ecx, 1
218
        jnz     @b
219
        ret
220
endp
6807 dunkaist 221
 
7105 dunkaist 222
 
223
proc img._.convert.bpp24_to_bpp24 _src, _dst
224
        mov     ecx, [ebx + Image.Width]
225
        imul    ecx, [ebx + Image.Height]
226
        lea     ecx, [ecx*3]
227
        mov     edx, ecx
228
        shr     ecx, 2
229
        rep     movsd
230
        mov     ecx, edx
231
        and     ecx, 3
232
        rep     movsb
233
        ret
234
endp
235
 
236
 
237
proc img._.convert.bpp24_to_bpp8g _src, _dst
238
        mov     ecx, [ebx + Image.Width]
239
        imul    ecx, [ebx + Image.Height]
3056 dunkaist 240
    @@:
7105 dunkaist 241
        movzx   ebx, byte[esi + 0]
242
        movzx   eax, byte[esi + 1]
243
        add     ebx, eax
244
        movzx   eax, byte[esi + 2]
245
        add     eax, ebx
246
        mov     ebx, 3
247
        add     esi, 3
248
        div     bl
249
        mov     byte[edi], al
250
        add     edi, 1
251
        sub     ecx, 1
252
        jnz     @b
253
        ret
254
endp
3056 dunkaist 255
 
7105 dunkaist 256
 
257
proc img._.convert.bpp24_to_bpp32 _src, _dst
258
        mov     ecx, [ebx + Image.Width]
259
        imul    ecx, [ebx + Image.Height]
3056 dunkaist 260
    @@:
6807 dunkaist 261
        lodsw
262
        ror     eax, 16
263
        lodsb
264
        rol     eax, 16
265
        stosd
266
        dec     ecx
267
        jnz     @b
7105 dunkaist 268
        ret
269
endp
3056 dunkaist 270
 
271
 
7105 dunkaist 272
proc img._.convert.bpp32_to_bpp24 _src, _dst
273
        mov     ecx, [ebx + Image.Width]
274
        imul    ecx, [ebx + Image.Height]
3056 dunkaist 275
    @@:
7105 dunkaist 276
        mov     eax, [esi]
277
        mov     [edi], ax
278
        shr     eax, 16
279
        mov     [edi + 2], al
280
        add     esi, 4
281
        add     edi, 3
282
        sub     ecx, 1
283
        jnz     @b
284
        ret
285
endp
3056 dunkaist 286
 
287
 
7105 dunkaist 288
proc img._.convert.bpp32_to_bpp32 _src, _dst
289
        mov     ecx, [ebx + Image.Width]
290
        imul    ecx, [ebx + Image.Height]
291
        rep     movsd
292
        ret
293
endp
3056 dunkaist 294
 
7105 dunkaist 295
 
296
proc img._.convert.bpp15_to_bpp24 _src, _dst
297
        mov     ecx, [ebx + Image.Width]
298
        imul    ecx, [ebx + Image.Height]
299
 
300
  .bpp15.intel: ; copypasted from do_rgb
301
        push    ebx ebp
302
        sub     ecx, 4
303
        jb      .bpp15.tail
3056 dunkaist 304
align 16
305
  .bpp15.intel.loop:
306
repeat 2
7105 dunkaist 307
        mov     ebx, [esi]
308
        mov     al, [esi]
309
        mov     ah, [esi + 1]
310
        add     esi, 4
311
        and     al, 0x1F
312
        and     ah, 0x1F shl 2
313
        mov     ebp, ebx
314
        mov     dl, al
315
        mov     dh, ah
316
        shr     al, 2
317
        shr     ah, 4
318
        shl     dl, 3
319
        shl     dh, 1
320
        and     ebp, 0x1F shl 5
321
        add     al, dl
322
        add     ah, dh
323
        shr     ebp, 2
324
        mov     [edi], al
325
        mov     [edi + 2], ah
326
        mov     eax, ebx
327
        mov     ebx, ebp
328
        shr     eax, 16
329
        shr     ebx, 5
330
        add     ebx, ebp
331
        mov     ebp, eax
332
        mov     [edi + 1], bl
333
        and     eax, (0x1F) or (0x1F shl 10)
334
        and     ebp, 0x1F shl 5
335
        lea     edx, [eax + eax]
336
        shr     al, 2
337
        mov     ebx, ebp
338
        shr     ah, 4
339
        shl     dl, 2
340
        shr     ebx, 2
341
        shr     ebp, 7
342
        add     al, dl
343
        add     ah, dh
344
        mov     [edi + 3], al
345
        add     ebx, ebp
346
        mov     [edi + 5], ah
347
        mov     [edi + 4], bl
348
        add     edi, 6
3056 dunkaist 349
end repeat
7105 dunkaist 350
        sub     ecx, 4
351
        jnb     .bpp15.intel.loop
3056 dunkaist 352
  .bpp15.tail:
7105 dunkaist 353
        add     ecx, 4
354
        jz      .bpp15.done
3056 dunkaist 355
    @@:
7105 dunkaist 356
        movzx   eax, word [esi]
357
        mov     ebx, eax
358
        add     esi, 2
359
        and     eax, (0x1F) or (0x1F shl 10)
360
        and     ebx, 0x1F shl 5
361
        lea     edx, [eax + eax]
362
        shr     al, 2
363
        mov     ebp, ebx
364
        shr     ebx, 2
365
        shr     ah, 4
366
        shl     dl, 2
367
        shr     ebp, 7
368
        add     eax, edx
369
        add     ebx, ebp
370
        mov     [edi], al
371
        mov     [edi + 1], bl
372
        mov     [edi + 2], ah
373
        add     edi, 3
374
        sub     ecx, 1
375
        jnz     @b
3056 dunkaist 376
  .bpp15.done:
7105 dunkaist 377
        pop     ebp ebx
378
        mov     eax, [_dst]
379
        jmp     .quit
3056 dunkaist 380
 
381
  .bpp15.amd:
7105 dunkaist 382
        push    ebx ebp
383
        sub     ecx, 4
384
        jb      .bpp15.tail
3056 dunkaist 385
align 16
386
  .bpp15.amd.loop:
387
repeat 4
388
if (% mod 2) = 1
7105 dunkaist 389
        mov     eax, dword[esi]
390
        mov     ebx, dword[esi]
3056 dunkaist 391
else
7105 dunkaist 392
        movzx   eax, word[esi]
393
        mov     ebx, eax
3056 dunkaist 394
end if
7105 dunkaist 395
        add     esi, 2
396
        and     eax, (0x1F) or (0x1F shl 10)
397
        and     ebx, 0x1F shl 5
398
        lea     edx, [eax + eax]
399
        shr     al, 2
400
        mov     ebp, ebx
401
        shr     ebx, 2
402
        shr     ah, 4
403
        shl     dl, 2
404
        shr     ebp, 7
405
        add     eax, edx
406
        add     ebx, ebp
407
        mov     [edi], al
408
        mov     [edi + 1], bl
409
        mov     [edi + 2], ah
410
        add     edi, 3
3056 dunkaist 411
end repeat
7105 dunkaist 412
        sub     ecx, 4
413
        jnb     .bpp15.amd.loop
414
        jmp     .bpp15.tail
3056 dunkaist 415
 
7105 dunkaist 416
  .quit:
417
        ret
418
endp
3056 dunkaist 419
 
7105 dunkaist 420
 
421
proc img._.convert.bpp16_to_bpp24 _src, _dst
422
        mov     ecx, [ebx + Image.Width]
423
        imul    ecx, [ebx + Image.Height]
3056 dunkaist 424
  .bpp16.intel:
7105 dunkaist 425
        push    ebx ebp
426
        sub     ecx, 4
427
        jb      .bpp16.tail
3056 dunkaist 428
align 16
429
  .bpp16.intel.loop:
430
repeat 2
7105 dunkaist 431
        mov     ebx, [esi]
432
        mov     al, [esi]
433
        mov     ah, [esi + 1]
434
        add     esi, 4
435
        and     al, 0x1F
436
        and     ah, 0x1F shl 3
437
        mov     ebp, ebx
438
        mov     dl, al
439
        mov     dh, ah
440
        shr     al, 2
441
        shr     ah, 5
442
        shl     dl, 3
443
        and     ebp, 0x3F shl 5
444
        add     al, dl
445
        add     ah, dh
446
        shr     ebp, 3
447
        mov     [edi], al
448
        mov     [edi + 2], ah
449
        mov     eax, ebx
450
        mov     ebx, ebp
451
        shr     eax, 16
452
        shr     ebx, 6
453
        add     ebx, ebp
454
        mov     ebp, eax
455
        mov     [edi + 1], bl
456
        and     eax, (0x1F) or (0x1F shl 11)
457
        and     ebp, 0x3F shl 5
458
        mov     edx, eax
459
        shr     al, 2
460
        mov     ebx, ebp
461
        shr     ah, 5
462
        shl     dl, 3
463
        shr     ebx, 3
464
        shr     ebp, 9
465
        add     al, dl
466
        add     ah, dh
467
        mov     [edi + 3], al
468
        add     ebx, ebp
469
        mov     [edi + 5], ah
470
        mov     [edi + 4], bl
471
        add     edi, 6
3056 dunkaist 472
end repeat
7105 dunkaist 473
        sub     ecx, 4
474
        jnb     .bpp16.intel.loop
3056 dunkaist 475
  .bpp16.tail:
7105 dunkaist 476
        add     ecx, 4
477
        jz      .bpp16.done
3056 dunkaist 478
    @@:
7105 dunkaist 479
        movzx   eax, word[esi]
480
        mov     ebx, eax
481
        add     esi, 2
482
        and     eax, (0x1F) or (0x1F shl 11)
483
        and     ebx, 0x3F shl 5
484
        mov     edx, eax
485
        shr     al, 2
486
        mov     ebp, ebx
487
        shr     ebx, 3
488
        shr     ah, 5
489
        shl     dl, 3
490
        shr     ebp, 9
491
        add     eax, edx
492
        add     ebx, ebp
493
        mov     [edi], al
494
        mov     [edi + 1], bl
495
        mov     [edi + 2], ah
496
        add     edi, 3
497
        sub     ecx, 1
498
        jnz     @b
3056 dunkaist 499
  .bpp16.done:
7105 dunkaist 500
        pop     ebp ebx
501
        mov     eax, [_dst]
502
        jmp     .quit
3056 dunkaist 503
 
504
  .bpp16.amd:
7105 dunkaist 505
        push    ebx ebp
506
        sub     ecx, 4
507
        jb      .bpp16.tail
3056 dunkaist 508
align 16
509
  .bpp16.amd.loop:
510
repeat 4
511
if (% mod 2) = 1
7105 dunkaist 512
        mov     eax, dword[esi]
513
        mov     ebx, dword[esi]
3056 dunkaist 514
else
7105 dunkaist 515
        movzx   eax, word[esi]
516
        mov     ebx, eax
3056 dunkaist 517
end if
7105 dunkaist 518
        add     esi, 2
519
        and     eax, (0x1F) or (0x1F shl 11)
520
        and     ebx, 0x3F shl 5
521
        mov     edx, eax
522
        shr     al, 2
523
        mov     ebp, ebx
524
        shr     ebx, 3
525
        shr     ah, 5
526
        shl     dl, 3
527
        shr     ebp, 9
528
        add     eax, edx
529
        add     ebx, ebp
530
        mov     [edi], al
531
        mov     [edi + 1], bl
532
        mov     [edi + 2], ah
533
        add     edi, 3
3056 dunkaist 534
end repeat
7105 dunkaist 535
        sub     ecx, 4
536
        jnb     .bpp16.amd.loop
537
        jmp     .bpp16.tail
3056 dunkaist 538
 
7105 dunkaist 539
  .quit:
540
        ret
541
endp
3056 dunkaist 542
 
7105 dunkaist 543
 
544
proc img._.convert.bpp1_to_bpp24 _src, _dst
545
locals
546
        width   rd 1
547
        height  rd 1
548
endl
549
        push    [ebx + Image.Width]
550
        pop     [width]
551
        push    [ebx + Image.Height]
552
        pop     [height]
553
        mov     edx, [ebx + Image.Palette]
3056 dunkaist 554
  .bpp1_to_bpp24.line:
7105 dunkaist 555
        mov     ebx, [width]
3056 dunkaist 556
  .bpp1_to_bpp24.byte:
7105 dunkaist 557
        mov     ah, 8
558
        mov     al, byte[esi]
559
        add     esi, 1
3056 dunkaist 560
  .bpp1_to_bpp24.bit:
7105 dunkaist 561
        xor     ecx, ecx
562
        shl     al, 1
563
        adc     ecx, 0
564
        mov     ecx, [edx + 4*ecx]
565
        mov     word[edi], cx
566
        shr     ecx, 8
567
        mov     byte[edi + 2], ch
568
        add     edi, 3
569
        sub     ebx, 1
570
        jnz     @f
571
        sub     [height], 1
572
        jnz     .bpp1_to_bpp24.line
573
        jmp     .bpp1.done
3056 dunkaist 574
    @@:
7105 dunkaist 575
        sub     ah, 1
576
        jnz     .bpp1_to_bpp24.bit
577
        jmp     .bpp1_to_bpp24.byte
3056 dunkaist 578
  .bpp1.done:
7105 dunkaist 579
        ret
580
endp
3056 dunkaist 581
 
582
 
7105 dunkaist 583
proc img._.convert.bpp8a_to_bpp1 _src, _dst
584
        mov     eax, [_dst]
585
        mov     eax, [eax + Image.Palette]
586
        mov     dword[eax], 0x00000000
587
        mov     dword[eax + 4], 0x00ffffff
588
        mov     edx, [ebx + Image.Height]
3056 dunkaist 589
  .bpp8a_to_bpp1.line:
7105 dunkaist 590
        mov     ax, 0x0800
591
        mov     ecx, [ebx + Image.Width]
3056 dunkaist 592
  .bpp8a_to_bpp1.pixel:
7105 dunkaist 593
        shl     al, 1
594
        cmp     byte[esi], 0x7f
595
        cmc
596
        adc     eax, 0
597
        add     esi, 2
598
        dec     ah
599
        jnz     @f
600
        mov     byte[edi], al
601
        add     edi, 1
602
        mov     ax, 0x0800
3056 dunkaist 603
    @@:
7105 dunkaist 604
        dec     ecx
605
        jnz     .bpp8a_to_bpp1.pixel
606
        cmp     ah, 8
607
        je      @f
608
        mov     cl, ah
609
        shl     al, cl
610
        mov     byte[edi], al
611
        add     edi, 1
3056 dunkaist 612
    @@:
7105 dunkaist 613
        dec     edx
614
        jnz     .bpp8a_to_bpp1.line
615
        ret
616
endp
3056 dunkaist 617
 
7105 dunkaist 618
 
619
proc img._.convert.bpp8a_to_bpp24 _src, _dst
620
        mov     ecx, [ebx + Image.Width]
621
        imul    ecx, [ebx + Image.Height]
3056 dunkaist 622
    @@:
7105 dunkaist 623
        mov     al, byte[esi]
624
        mov     byte[edi + 0], al
625
        mov     byte[edi + 1], al
626
        mov     byte[edi + 2], al
627
        add     esi, 2
628
        add     edi, 3
629
        sub     ecx, 1
630
        jnz     @b
631
        ret
3056 dunkaist 632
endp
633
 
634
 
635
img.convert.bpp8i.table:
7105 dunkaist 636
        dd Image.bpp24, img._.convert.bpp8i_to_bpp24
637
        dd Image.bpp32, img._.convert.bpp8i_to_bpp32
638
        dd 0
3056 dunkaist 639
img.convert.bpp24.table:
7105 dunkaist 640
        dd Image.bpp24, img._.convert.bpp24_to_bpp24
641
        dd Image.bpp8g, img._.convert.bpp24_to_bpp8g
642
        dd Image.bpp32, img._.convert.bpp24_to_bpp32
643
        dd 0
3056 dunkaist 644
img.convert.bpp32.table:
7105 dunkaist 645
        dd Image.bpp24, img._.convert.bpp32_to_bpp24
646
        dd Image.bpp32, img._.convert.bpp32_to_bpp32
647
        dd 0
3056 dunkaist 648
img.convert.bpp15.table:
7105 dunkaist 649
        dd Image.bpp24, img._.convert.bpp15_to_bpp24
650
        dd 0
3056 dunkaist 651
img.convert.bpp16.table:
7105 dunkaist 652
        dd Image.bpp24, img._.convert.bpp16_to_bpp24
653
        dd 0
3056 dunkaist 654
img.convert.bpp1.table:
7105 dunkaist 655
        dd Image.bpp24, img._.convert.bpp1_to_bpp24
656
        dd 0
657
img.convert.bpp8g.table:
658
        dd Image.bpp24, img._.convert.bpp8g_to_bpp24
659
        dd Image.bpp1,  img._.convert.bpp8g_to_bpp1
660
        dd 0
661
img.convert.bpp2i.table:
662
        dd 0
663
img.convert.bpp4i.table:
664
        dd 0
3056 dunkaist 665
img.convert.bpp8a.table:
7105 dunkaist 666
        dd Image.bpp24, img._.convert.bpp8a_to_bpp24
667
        dd 0
668
 
669
img.convert.table:
670
        dd 0    ; no image type zero
671
        dd img.convert.bpp8i.table
672
        dd img.convert.bpp24.table
673
        dd img.convert.bpp32.table
674
        dd img.convert.bpp15.table
675
        dd img.convert.bpp16.table
676
        dd img.convert.bpp1.table
677
        dd img.convert.bpp8g.table
678
        dd img.convert.bpp2i.table
679
        dd img.convert.bpp4i.table
680
        dd img.convert.bpp8a.table