722 } 723 } 724 725 /***************************************************************/ 726 void mlib_c_ImageLookUp_S16_U8(const mlib_s16 *src, 727 mlib_s32 slb, 728 mlib_u8 *dst, 729 mlib_s32 dlb, 730 mlib_s32 xsize, 731 mlib_s32 ysize, 732 mlib_s32 csize, 733 const mlib_u8 **table) 734 { 735 const mlib_u8 *table_base[4]; 736 mlib_s32 c; 737 738 for (c = 0; c < csize; c++) { 739 table_base[c] = &table[c][32768]; 740 } 741 742 MLIB_C_IMAGELOOKUP(mlib_u8, mlib_s16, table_base); 743 } 744 745 /***************************************************************/ 746 void mlib_c_ImageLookUp_U16_U8(const mlib_u16 *src, 747 mlib_s32 slb, 748 mlib_u8 *dst, 749 mlib_s32 dlb, 750 mlib_s32 xsize, 751 mlib_s32 ysize, 752 mlib_s32 csize, 753 const mlib_u8 **table) 754 { 755 const mlib_u8 *table_base[4]; 756 mlib_s32 c; 757 758 for (c = 0; c < csize; c++) { 759 table_base[c] = &table[c][0]; 760 } 761 762 MLIB_C_IMAGELOOKUP(mlib_u8, mlib_u16, table_base); 763 } 764 765 /***************************************************************/ 766 void mlib_c_ImageLookUp_S32_U8(const mlib_s32 *src, 767 mlib_s32 slb, 768 mlib_u8 *dst, 769 mlib_s32 dlb, 770 mlib_s32 xsize, 771 mlib_s32 ysize, 772 mlib_s32 csize, 773 const mlib_u8 **table) 774 { 775 const mlib_u8 *table_base[4]; 776 mlib_s32 c; 777 778 for (c = 0; c < csize; c++) { 779 table_base[c] = &table[c][TABLE_SHIFT_S32]; 780 } 781 782 MLIB_C_IMAGELOOKUP(mlib_u8, mlib_s32, table_base); 783 } 784 785 /***************************************************************/ 786 void mlib_c_ImageLookUp_U8_S16(const mlib_u8 *src, 787 mlib_s32 slb, 788 mlib_s16 *dst, 789 mlib_s32 dlb, 790 mlib_s32 xsize, 791 mlib_s32 ysize, 792 mlib_s32 csize, 793 const mlib_s16 **table) 794 { 795 796 if (xsize * csize < 12) { 797 MLIB_C_IMAGELOOKUP(mlib_s16, mlib_u8, table); 798 } 799 else if (csize == 1) { 800 mlib_s32 i, j; 801 802 for (j = 0; j < ysize; j++, dst += dlb, src += slb) { 1328 } 1329 } 1330 1331 /***************************************************************/ 1332 void mlib_c_ImageLookUp_S16_S16(const mlib_s16 *src, 1333 mlib_s32 slb, 1334 mlib_s16 *dst, 1335 mlib_s32 dlb, 1336 mlib_s32 xsize, 1337 mlib_s32 ysize, 1338 mlib_s32 csize, 1339 const mlib_s16 **table) 1340 { 1341 const mlib_s16 *table_base[4]; 1342 mlib_s32 c; 1343 1344 for (c = 0; c < csize; c++) { 1345 table_base[c] = &table[c][32768]; 1346 } 1347 1348 MLIB_C_IMAGELOOKUP(mlib_s16, mlib_s16, table_base); 1349 } 1350 1351 /***************************************************************/ 1352 void mlib_c_ImageLookUp_U16_S16(const mlib_u16 *src, 1353 mlib_s32 slb, 1354 mlib_s16 *dst, 1355 mlib_s32 dlb, 1356 mlib_s32 xsize, 1357 mlib_s32 ysize, 1358 mlib_s32 csize, 1359 const mlib_s16 **table) 1360 { 1361 const mlib_s16 *table_base[4]; 1362 mlib_s32 c; 1363 1364 for (c = 0; c < csize; c++) { 1365 table_base[c] = &table[c][0]; 1366 } 1367 1368 MLIB_C_IMAGELOOKUP(mlib_s16, mlib_u16, table_base); 1369 } 1370 1371 /***************************************************************/ 1372 void mlib_c_ImageLookUp_S32_S16(const mlib_s32 *src, 1373 mlib_s32 slb, 1374 mlib_s16 *dst, 1375 mlib_s32 dlb, 1376 mlib_s32 xsize, 1377 mlib_s32 ysize, 1378 mlib_s32 csize, 1379 const mlib_s16 **table) 1380 { 1381 const mlib_s16 *table_base[4]; 1382 mlib_s32 c; 1383 1384 for (c = 0; c < csize; c++) { 1385 table_base[c] = &table[c][TABLE_SHIFT_S32]; 1386 } 1387 1388 MLIB_C_IMAGELOOKUP(mlib_s16, mlib_s32, table_base); 1389 } 1390 1391 /***************************************************************/ 1392 void mlib_c_ImageLookUp_S16_U16(const mlib_s16 *src, 1393 mlib_s32 slb, 1394 mlib_u16 *dst, 1395 mlib_s32 dlb, 1396 mlib_s32 xsize, 1397 mlib_s32 ysize, 1398 mlib_s32 csize, 1399 const mlib_s16 **table) 1400 { 1401 const mlib_s16 *table_base[4]; 1402 mlib_s32 c; 1403 1404 for (c = 0; c < csize; c++) { 1405 table_base[c] = &table[c][32768]; 1406 } 1407 1408 MLIB_C_IMAGELOOKUP(mlib_u16, mlib_s16, table_base); 1409 } 1410 1411 /***************************************************************/ 1412 void mlib_c_ImageLookUp_U16_U16(const mlib_u16 *src, 1413 mlib_s32 slb, 1414 mlib_u16 *dst, 1415 mlib_s32 dlb, 1416 mlib_s32 xsize, 1417 mlib_s32 ysize, 1418 mlib_s32 csize, 1419 const mlib_s16 **table) 1420 { 1421 const mlib_s16 *table_base[4]; 1422 mlib_s32 c; 1423 1424 for (c = 0; c < csize; c++) { 1425 table_base[c] = &table[c][0]; 1426 } 1427 1428 MLIB_C_IMAGELOOKUP(mlib_u16, mlib_u16, table_base); 1429 } 1430 1431 /***************************************************************/ 1432 void mlib_c_ImageLookUp_S32_U16(const mlib_s32 *src, 1433 mlib_s32 slb, 1434 mlib_u16 *dst, 1435 mlib_s32 dlb, 1436 mlib_s32 xsize, 1437 mlib_s32 ysize, 1438 mlib_s32 csize, 1439 const mlib_s16 **table) 1440 { 1441 const mlib_s16 *table_base[4]; 1442 mlib_s32 c; 1443 1444 for (c = 0; c < csize; c++) { 1445 table_base[c] = &table[c][TABLE_SHIFT_S32]; 1446 } 1447 1448 MLIB_C_IMAGELOOKUP(mlib_u16, mlib_s32, table_base); 1449 } 1450 1451 /***************************************************************/ 1452 void mlib_c_ImageLookUp_U8_S32(const mlib_u8 *src, 1453 mlib_s32 slb, 1454 mlib_s32 *dst, 1455 mlib_s32 dlb, 1456 mlib_s32 xsize, 1457 mlib_s32 ysize, 1458 mlib_s32 csize, 1459 const mlib_s32 **table) 1460 { 1461 1462 if (xsize * csize < 7) { 1463 MLIB_C_IMAGELOOKUP(mlib_s32, mlib_u8, table); 1464 } 1465 else if (csize == 1) { 1466 mlib_s32 i, j; 1467 1468 for (j = 0; j < ysize; j++, dst += dlb, src += slb) { 1768 } 1769 } 1770 1771 /***************************************************************/ 1772 void mlib_c_ImageLookUp_S16_S32(const mlib_s16 *src, 1773 mlib_s32 slb, 1774 mlib_s32 *dst, 1775 mlib_s32 dlb, 1776 mlib_s32 xsize, 1777 mlib_s32 ysize, 1778 mlib_s32 csize, 1779 const mlib_s32 **table) 1780 { 1781 const mlib_s32 *table_base[4]; 1782 mlib_s32 c; 1783 1784 for (c = 0; c < csize; c++) { 1785 table_base[c] = &table[c][32768]; 1786 } 1787 1788 MLIB_C_IMAGELOOKUP(mlib_s32, mlib_s16, table_base); 1789 } 1790 1791 /***************************************************************/ 1792 void mlib_c_ImageLookUp_U16_S32(const mlib_u16 *src, 1793 mlib_s32 slb, 1794 mlib_s32 *dst, 1795 mlib_s32 dlb, 1796 mlib_s32 xsize, 1797 mlib_s32 ysize, 1798 mlib_s32 csize, 1799 const mlib_s32 **table) 1800 { 1801 const mlib_s32 *table_base[4]; 1802 mlib_s32 c; 1803 1804 for (c = 0; c < csize; c++) { 1805 table_base[c] = &table[c][0]; 1806 } 1807 1808 MLIB_C_IMAGELOOKUP(mlib_s32, mlib_u16, table_base); 1809 } 1810 1811 /***************************************************************/ 1812 void mlib_c_ImageLookUp_S32_S32(const mlib_s32 *src, 1813 mlib_s32 slb, 1814 mlib_s32 *dst, 1815 mlib_s32 dlb, 1816 mlib_s32 xsize, 1817 mlib_s32 ysize, 1818 mlib_s32 csize, 1819 const mlib_s32 **table) 1820 { 1821 const mlib_s32 *table_base[4]; 1822 mlib_s32 c; 1823 1824 for (c = 0; c < csize; c++) { 1825 table_base[c] = &table[c][TABLE_SHIFT_S32]; 1826 } 1827 1828 MLIB_C_IMAGELOOKUP(mlib_s32, mlib_s32, table_base); 1829 } 1830 1831 /***************************************************************/ 1832 void mlib_c_ImageLookUpSI_U8_U8(const mlib_u8 *src, 1833 mlib_s32 slb, 1834 mlib_u8 *dst, 1835 mlib_s32 dlb, 1836 mlib_s32 xsize, 1837 mlib_s32 ysize, 1838 mlib_s32 csize, 1839 const mlib_u8 **table) 1840 { 1841 1842 if ((xsize < 8) || ((xsize * ysize) < 250)) { 1843 MLIB_C_IMAGELOOKUPSI(mlib_u8, mlib_u8, table); 1844 } 1845 else if (csize == 2) { 1846 1847 mlib_u16 tab[256]; 1848 const mlib_u8 *tab0 = table[0]; 2818 } 2819 } 2820 2821 /***************************************************************/ 2822 void mlib_c_ImageLookUpSI_S32_U8(const mlib_s32 *src, 2823 mlib_s32 slb, 2824 mlib_u8 *dst, 2825 mlib_s32 dlb, 2826 mlib_s32 xsize, 2827 mlib_s32 ysize, 2828 mlib_s32 csize, 2829 const mlib_u8 **table) 2830 { 2831 const mlib_u8 *table_base[4]; 2832 mlib_s32 c; 2833 2834 for (c = 0; c < csize; c++) { 2835 table_base[c] = &table[c][TABLE_SHIFT_S32]; 2836 } 2837 2838 MLIB_C_IMAGELOOKUPSI(mlib_u8, mlib_s32, table_base); 2839 } 2840 2841 /***************************************************************/ 2842 void mlib_c_ImageLookUpSI_U8_S16(const mlib_u8 *src, 2843 mlib_s32 slb, 2844 mlib_s16 *dst, 2845 mlib_s32 dlb, 2846 mlib_s32 xsize, 2847 mlib_s32 ysize, 2848 mlib_s32 csize, 2849 const mlib_s16 **table) 2850 { 2851 2852 if ((xsize < 4) || ((xsize * ysize) < 250)) { 2853 MLIB_C_IMAGELOOKUPSI(mlib_s16, mlib_u8, table); 2854 2855 } 2856 else if (csize == 2) { 2857 mlib_u32 tab[256]; 2858 mlib_u16 *tab0 = (mlib_u16 *) table[0]; 3275 } 3276 } 3277 3278 /***************************************************************/ 3279 void mlib_c_ImageLookUpSI_S16_S16(const mlib_s16 *src, 3280 mlib_s32 slb, 3281 mlib_s16 *dst, 3282 mlib_s32 dlb, 3283 mlib_s32 xsize, 3284 mlib_s32 ysize, 3285 mlib_s32 csize, 3286 const mlib_s16 **table) 3287 { 3288 const mlib_s16 *table_base[4]; 3289 mlib_s32 c; 3290 3291 for (c = 0; c < csize; c++) { 3292 table_base[c] = &table[c][32768]; 3293 } 3294 3295 MLIB_C_IMAGELOOKUPSI(mlib_s16, mlib_s16, table_base); 3296 } 3297 3298 /***************************************************************/ 3299 void mlib_c_ImageLookUpSI_U16_S16(const mlib_u16 *src, 3300 mlib_s32 slb, 3301 mlib_s16 *dst, 3302 mlib_s32 dlb, 3303 mlib_s32 xsize, 3304 mlib_s32 ysize, 3305 mlib_s32 csize, 3306 const mlib_s16 **table) 3307 { 3308 const mlib_s16 *table_base[4]; 3309 mlib_s32 c; 3310 3311 for (c = 0; c < csize; c++) { 3312 table_base[c] = &table[c][0]; 3313 } 3314 3315 MLIB_C_IMAGELOOKUPSI(mlib_s16, mlib_u16, table_base); 3316 } 3317 3318 /***************************************************************/ 3319 void mlib_c_ImageLookUpSI_S32_S16(const mlib_s32 *src, 3320 mlib_s32 slb, 3321 mlib_s16 *dst, 3322 mlib_s32 dlb, 3323 mlib_s32 xsize, 3324 mlib_s32 ysize, 3325 mlib_s32 csize, 3326 const mlib_s16 **table) 3327 { 3328 const mlib_s16 *table_base[4]; 3329 mlib_s32 c; 3330 3331 for (c = 0; c < csize; c++) { 3332 table_base[c] = &table[c][TABLE_SHIFT_S32]; 3333 } 3334 3335 MLIB_C_IMAGELOOKUPSI(mlib_s16, mlib_s32, table_base); 3336 } 3337 3338 /***************************************************************/ 3339 void mlib_c_ImageLookUpSI_S16_U16(const mlib_s16 *src, 3340 mlib_s32 slb, 3341 mlib_u16 *dst, 3342 mlib_s32 dlb, 3343 mlib_s32 xsize, 3344 mlib_s32 ysize, 3345 mlib_s32 csize, 3346 const mlib_u16 **table) 3347 { 3348 const mlib_u16 *table_base[4]; 3349 mlib_s32 c; 3350 3351 for (c = 0; c < csize; c++) { 3352 table_base[c] = &table[c][32768]; 3353 } 3354 3355 MLIB_C_IMAGELOOKUPSI(mlib_u16, mlib_s16, table_base); 3356 } 3357 3358 /***************************************************************/ 3359 void mlib_c_ImageLookUpSI_U16_U16(const mlib_u16 *src, 3360 mlib_s32 slb, 3361 mlib_u16 *dst, 3362 mlib_s32 dlb, 3363 mlib_s32 xsize, 3364 mlib_s32 ysize, 3365 mlib_s32 csize, 3366 const mlib_u16 **table) 3367 { 3368 const mlib_u16 *table_base[4]; 3369 mlib_s32 c; 3370 3371 for (c = 0; c < csize; c++) { 3372 table_base[c] = &table[c][0]; 3373 } 3374 3375 MLIB_C_IMAGELOOKUPSI(mlib_u16, mlib_u16, table_base); 3376 } 3377 3378 /***************************************************************/ 3379 void mlib_c_ImageLookUpSI_S32_U16(const mlib_s32 *src, 3380 mlib_s32 slb, 3381 mlib_u16 *dst, 3382 mlib_s32 dlb, 3383 mlib_s32 xsize, 3384 mlib_s32 ysize, 3385 mlib_s32 csize, 3386 const mlib_u16 **table) 3387 { 3388 const mlib_u16 *table_base[4]; 3389 mlib_s32 c; 3390 3391 for (c = 0; c < csize; c++) { 3392 table_base[c] = &table[c][TABLE_SHIFT_S32]; 3393 } 3394 3395 MLIB_C_IMAGELOOKUPSI(mlib_u16, mlib_s32, table_base); 3396 } 3397 3398 /***************************************************************/ 3399 void mlib_c_ImageLookUpSI_U8_S32(const mlib_u8 *src, 3400 mlib_s32 slb, 3401 mlib_s32 *dst, 3402 mlib_s32 dlb, 3403 mlib_s32 xsize, 3404 mlib_s32 ysize, 3405 mlib_s32 csize, 3406 const mlib_s32 **table) 3407 { 3408 3409 if (xsize < 7) { 3410 MLIB_C_IMAGELOOKUPSI(mlib_s32, mlib_u8, table); 3411 } 3412 else if (csize == 2) { 3413 mlib_s32 i, j; 3414 3415 for (j = 0; j < ysize; j++, dst += dlb, src += slb) { 3815 } 3816 } 3817 3818 /***************************************************************/ 3819 void mlib_c_ImageLookUpSI_S16_S32(const mlib_s16 *src, 3820 mlib_s32 slb, 3821 mlib_s32 *dst, 3822 mlib_s32 dlb, 3823 mlib_s32 xsize, 3824 mlib_s32 ysize, 3825 mlib_s32 csize, 3826 const mlib_s32 **table) 3827 { 3828 const mlib_s32 *table_base[4]; 3829 mlib_s32 c; 3830 3831 for (c = 0; c < csize; c++) { 3832 table_base[c] = &table[c][32768]; 3833 } 3834 3835 MLIB_C_IMAGELOOKUPSI(mlib_s32, mlib_s16, table_base); 3836 } 3837 3838 /***************************************************************/ 3839 void mlib_c_ImageLookUpSI_U16_S32(const mlib_u16 *src, 3840 mlib_s32 slb, 3841 mlib_s32 *dst, 3842 mlib_s32 dlb, 3843 mlib_s32 xsize, 3844 mlib_s32 ysize, 3845 mlib_s32 csize, 3846 const mlib_s32 **table) 3847 { 3848 const mlib_s32 *table_base[4]; 3849 mlib_s32 c; 3850 3851 for (c = 0; c < csize; c++) { 3852 table_base[c] = &table[c][0]; 3853 } 3854 3855 MLIB_C_IMAGELOOKUPSI(mlib_s32, mlib_u16, table_base); 3856 } 3857 3858 /***************************************************************/ 3859 void mlib_c_ImageLookUpSI_S32_S32(const mlib_s32 *src, 3860 mlib_s32 slb, 3861 mlib_s32 *dst, 3862 mlib_s32 dlb, 3863 mlib_s32 xsize, 3864 mlib_s32 ysize, 3865 mlib_s32 csize, 3866 const mlib_s32 **table) 3867 { 3868 const mlib_s32 *table_base[4]; 3869 mlib_s32 c; 3870 3871 for (c = 0; c < csize; c++) { 3872 table_base[c] = &table[c][TABLE_SHIFT_S32]; 3873 } 3874 3875 MLIB_C_IMAGELOOKUPSI(mlib_s32, mlib_s32, table_base); | 722 } 723 } 724 725 /***************************************************************/ 726 void mlib_c_ImageLookUp_S16_U8(const mlib_s16 *src, 727 mlib_s32 slb, 728 mlib_u8 *dst, 729 mlib_s32 dlb, 730 mlib_s32 xsize, 731 mlib_s32 ysize, 732 mlib_s32 csize, 733 const mlib_u8 **table) 734 { 735 const mlib_u8 *table_base[4]; 736 mlib_s32 c; 737 738 for (c = 0; c < csize; c++) { 739 table_base[c] = &table[c][32768]; 740 } 741 742 #ifdef __GNUC__ 743 #pragma GCC diagnostic push 744 #pragma GCC diagnostic ignored "-Warray-bounds" 745 #endif 746 MLIB_C_IMAGELOOKUP(mlib_u8, mlib_s16, table_base); 747 #ifdef __GNUC__ 748 #pragma GCC diagnostic pop 749 #endif 750 } 751 752 /***************************************************************/ 753 void mlib_c_ImageLookUp_U16_U8(const mlib_u16 *src, 754 mlib_s32 slb, 755 mlib_u8 *dst, 756 mlib_s32 dlb, 757 mlib_s32 xsize, 758 mlib_s32 ysize, 759 mlib_s32 csize, 760 const mlib_u8 **table) 761 { 762 const mlib_u8 *table_base[4]; 763 mlib_s32 c; 764 765 for (c = 0; c < csize; c++) { 766 table_base[c] = &table[c][0]; 767 } 768 769 #ifdef __GNUC__ 770 #pragma GCC diagnostic push 771 #pragma GCC diagnostic ignored "-Warray-bounds" 772 #endif 773 MLIB_C_IMAGELOOKUP(mlib_u8, mlib_u16, table_base); 774 #ifdef __GNUC__ 775 #pragma GCC diagnostic pop 776 #endif 777 } 778 779 /***************************************************************/ 780 void mlib_c_ImageLookUp_S32_U8(const mlib_s32 *src, 781 mlib_s32 slb, 782 mlib_u8 *dst, 783 mlib_s32 dlb, 784 mlib_s32 xsize, 785 mlib_s32 ysize, 786 mlib_s32 csize, 787 const mlib_u8 **table) 788 { 789 const mlib_u8 *table_base[4]; 790 mlib_s32 c; 791 792 for (c = 0; c < csize; c++) { 793 table_base[c] = &table[c][TABLE_SHIFT_S32]; 794 } 795 796 #ifdef __GNUC__ 797 #pragma GCC diagnostic push 798 #pragma GCC diagnostic ignored "-Warray-bounds" 799 #endif 800 MLIB_C_IMAGELOOKUP(mlib_u8, mlib_s32, table_base); 801 #ifdef __GNUC__ 802 #pragma GCC diagnostic pop 803 #endif 804 } 805 806 /***************************************************************/ 807 void mlib_c_ImageLookUp_U8_S16(const mlib_u8 *src, 808 mlib_s32 slb, 809 mlib_s16 *dst, 810 mlib_s32 dlb, 811 mlib_s32 xsize, 812 mlib_s32 ysize, 813 mlib_s32 csize, 814 const mlib_s16 **table) 815 { 816 817 if (xsize * csize < 12) { 818 MLIB_C_IMAGELOOKUP(mlib_s16, mlib_u8, table); 819 } 820 else if (csize == 1) { 821 mlib_s32 i, j; 822 823 for (j = 0; j < ysize; j++, dst += dlb, src += slb) { 1349 } 1350 } 1351 1352 /***************************************************************/ 1353 void mlib_c_ImageLookUp_S16_S16(const mlib_s16 *src, 1354 mlib_s32 slb, 1355 mlib_s16 *dst, 1356 mlib_s32 dlb, 1357 mlib_s32 xsize, 1358 mlib_s32 ysize, 1359 mlib_s32 csize, 1360 const mlib_s16 **table) 1361 { 1362 const mlib_s16 *table_base[4]; 1363 mlib_s32 c; 1364 1365 for (c = 0; c < csize; c++) { 1366 table_base[c] = &table[c][32768]; 1367 } 1368 1369 #ifdef __GNUC__ 1370 #pragma GCC diagnostic push 1371 #pragma GCC diagnostic ignored "-Warray-bounds" 1372 #endif 1373 MLIB_C_IMAGELOOKUP(mlib_s16, mlib_s16, table_base); 1374 #ifdef __GNUC__ 1375 #pragma GCC diagnostic pop 1376 #endif 1377 } 1378 1379 /***************************************************************/ 1380 void mlib_c_ImageLookUp_U16_S16(const mlib_u16 *src, 1381 mlib_s32 slb, 1382 mlib_s16 *dst, 1383 mlib_s32 dlb, 1384 mlib_s32 xsize, 1385 mlib_s32 ysize, 1386 mlib_s32 csize, 1387 const mlib_s16 **table) 1388 { 1389 const mlib_s16 *table_base[4]; 1390 mlib_s32 c; 1391 1392 for (c = 0; c < csize; c++) { 1393 table_base[c] = &table[c][0]; 1394 } 1395 1396 #ifdef __GNUC__ 1397 #pragma GCC diagnostic push 1398 #pragma GCC diagnostic ignored "-Warray-bounds" 1399 #endif 1400 MLIB_C_IMAGELOOKUP(mlib_s16, mlib_u16, table_base); 1401 #ifdef __GNUC__ 1402 #pragma GCC diagnostic pop 1403 #endif 1404 } 1405 1406 /***************************************************************/ 1407 void mlib_c_ImageLookUp_S32_S16(const mlib_s32 *src, 1408 mlib_s32 slb, 1409 mlib_s16 *dst, 1410 mlib_s32 dlb, 1411 mlib_s32 xsize, 1412 mlib_s32 ysize, 1413 mlib_s32 csize, 1414 const mlib_s16 **table) 1415 { 1416 const mlib_s16 *table_base[4]; 1417 mlib_s32 c; 1418 1419 for (c = 0; c < csize; c++) { 1420 table_base[c] = &table[c][TABLE_SHIFT_S32]; 1421 } 1422 1423 #ifdef __GNUC__ 1424 #pragma GCC diagnostic push 1425 #pragma GCC diagnostic ignored "-Warray-bounds" 1426 #endif 1427 MLIB_C_IMAGELOOKUP(mlib_s16, mlib_s32, table_base); 1428 #ifdef __GNUC__ 1429 #pragma GCC diagnostic pop 1430 #endif 1431 } 1432 1433 /***************************************************************/ 1434 void mlib_c_ImageLookUp_S16_U16(const mlib_s16 *src, 1435 mlib_s32 slb, 1436 mlib_u16 *dst, 1437 mlib_s32 dlb, 1438 mlib_s32 xsize, 1439 mlib_s32 ysize, 1440 mlib_s32 csize, 1441 const mlib_s16 **table) 1442 { 1443 const mlib_s16 *table_base[4]; 1444 mlib_s32 c; 1445 1446 for (c = 0; c < csize; c++) { 1447 table_base[c] = &table[c][32768]; 1448 } 1449 1450 #ifdef __GNUC__ 1451 #pragma GCC diagnostic push 1452 #pragma GCC diagnostic ignored "-Warray-bounds" 1453 #endif 1454 MLIB_C_IMAGELOOKUP(mlib_u16, mlib_s16, table_base); 1455 #ifdef __GNUC__ 1456 #pragma GCC diagnostic pop 1457 #endif 1458 } 1459 1460 /***************************************************************/ 1461 void mlib_c_ImageLookUp_U16_U16(const mlib_u16 *src, 1462 mlib_s32 slb, 1463 mlib_u16 *dst, 1464 mlib_s32 dlb, 1465 mlib_s32 xsize, 1466 mlib_s32 ysize, 1467 mlib_s32 csize, 1468 const mlib_s16 **table) 1469 { 1470 const mlib_s16 *table_base[4]; 1471 mlib_s32 c; 1472 1473 for (c = 0; c < csize; c++) { 1474 table_base[c] = &table[c][0]; 1475 } 1476 1477 #ifdef __GNUC__ 1478 #pragma GCC diagnostic push 1479 #pragma GCC diagnostic ignored "-Warray-bounds" 1480 #endif 1481 MLIB_C_IMAGELOOKUP(mlib_u16, mlib_u16, table_base); 1482 #ifdef __GNUC__ 1483 #pragma GCC diagnostic pop 1484 #endif 1485 } 1486 1487 /***************************************************************/ 1488 void mlib_c_ImageLookUp_S32_U16(const mlib_s32 *src, 1489 mlib_s32 slb, 1490 mlib_u16 *dst, 1491 mlib_s32 dlb, 1492 mlib_s32 xsize, 1493 mlib_s32 ysize, 1494 mlib_s32 csize, 1495 const mlib_s16 **table) 1496 { 1497 const mlib_s16 *table_base[4]; 1498 mlib_s32 c; 1499 1500 for (c = 0; c < csize; c++) { 1501 table_base[c] = &table[c][TABLE_SHIFT_S32]; 1502 } 1503 1504 #ifdef __GNUC__ 1505 #pragma GCC diagnostic push 1506 #pragma GCC diagnostic ignored "-Warray-bounds" 1507 #endif 1508 MLIB_C_IMAGELOOKUP(mlib_u16, mlib_s32, table_base); 1509 #ifdef __GNUC__ 1510 #pragma GCC diagnostic pop 1511 #endif 1512 } 1513 1514 /***************************************************************/ 1515 void mlib_c_ImageLookUp_U8_S32(const mlib_u8 *src, 1516 mlib_s32 slb, 1517 mlib_s32 *dst, 1518 mlib_s32 dlb, 1519 mlib_s32 xsize, 1520 mlib_s32 ysize, 1521 mlib_s32 csize, 1522 const mlib_s32 **table) 1523 { 1524 1525 if (xsize * csize < 7) { 1526 MLIB_C_IMAGELOOKUP(mlib_s32, mlib_u8, table); 1527 } 1528 else if (csize == 1) { 1529 mlib_s32 i, j; 1530 1531 for (j = 0; j < ysize; j++, dst += dlb, src += slb) { 1831 } 1832 } 1833 1834 /***************************************************************/ 1835 void mlib_c_ImageLookUp_S16_S32(const mlib_s16 *src, 1836 mlib_s32 slb, 1837 mlib_s32 *dst, 1838 mlib_s32 dlb, 1839 mlib_s32 xsize, 1840 mlib_s32 ysize, 1841 mlib_s32 csize, 1842 const mlib_s32 **table) 1843 { 1844 const mlib_s32 *table_base[4]; 1845 mlib_s32 c; 1846 1847 for (c = 0; c < csize; c++) { 1848 table_base[c] = &table[c][32768]; 1849 } 1850 1851 #ifdef __GNUC__ 1852 #pragma GCC diagnostic push 1853 #pragma GCC diagnostic ignored "-Warray-bounds" 1854 #endif 1855 MLIB_C_IMAGELOOKUP(mlib_s32, mlib_s16, table_base); 1856 #ifdef __GNUC__ 1857 #pragma GCC diagnostic pop 1858 #endif 1859 } 1860 1861 /***************************************************************/ 1862 void mlib_c_ImageLookUp_U16_S32(const mlib_u16 *src, 1863 mlib_s32 slb, 1864 mlib_s32 *dst, 1865 mlib_s32 dlb, 1866 mlib_s32 xsize, 1867 mlib_s32 ysize, 1868 mlib_s32 csize, 1869 const mlib_s32 **table) 1870 { 1871 const mlib_s32 *table_base[4]; 1872 mlib_s32 c; 1873 1874 for (c = 0; c < csize; c++) { 1875 table_base[c] = &table[c][0]; 1876 } 1877 1878 #ifdef __GNUC__ 1879 #pragma GCC diagnostic push 1880 #pragma GCC diagnostic ignored "-Warray-bounds" 1881 #endif 1882 MLIB_C_IMAGELOOKUP(mlib_s32, mlib_u16, table_base); 1883 #ifdef __GNUC__ 1884 #pragma GCC diagnostic pop 1885 #endif 1886 } 1887 1888 /***************************************************************/ 1889 void mlib_c_ImageLookUp_S32_S32(const mlib_s32 *src, 1890 mlib_s32 slb, 1891 mlib_s32 *dst, 1892 mlib_s32 dlb, 1893 mlib_s32 xsize, 1894 mlib_s32 ysize, 1895 mlib_s32 csize, 1896 const mlib_s32 **table) 1897 { 1898 const mlib_s32 *table_base[4]; 1899 mlib_s32 c; 1900 1901 for (c = 0; c < csize; c++) { 1902 table_base[c] = &table[c][TABLE_SHIFT_S32]; 1903 } 1904 1905 #ifdef __GNUC__ 1906 #pragma GCC diagnostic push 1907 #pragma GCC diagnostic ignored "-Warray-bounds" 1908 #endif 1909 MLIB_C_IMAGELOOKUP(mlib_s32, mlib_s32, table_base); 1910 #ifdef __GNUC__ 1911 #pragma GCC diagnostic pop 1912 #endif 1913 } 1914 1915 /***************************************************************/ 1916 void mlib_c_ImageLookUpSI_U8_U8(const mlib_u8 *src, 1917 mlib_s32 slb, 1918 mlib_u8 *dst, 1919 mlib_s32 dlb, 1920 mlib_s32 xsize, 1921 mlib_s32 ysize, 1922 mlib_s32 csize, 1923 const mlib_u8 **table) 1924 { 1925 1926 if ((xsize < 8) || ((xsize * ysize) < 250)) { 1927 MLIB_C_IMAGELOOKUPSI(mlib_u8, mlib_u8, table); 1928 } 1929 else if (csize == 2) { 1930 1931 mlib_u16 tab[256]; 1932 const mlib_u8 *tab0 = table[0]; 2902 } 2903 } 2904 2905 /***************************************************************/ 2906 void mlib_c_ImageLookUpSI_S32_U8(const mlib_s32 *src, 2907 mlib_s32 slb, 2908 mlib_u8 *dst, 2909 mlib_s32 dlb, 2910 mlib_s32 xsize, 2911 mlib_s32 ysize, 2912 mlib_s32 csize, 2913 const mlib_u8 **table) 2914 { 2915 const mlib_u8 *table_base[4]; 2916 mlib_s32 c; 2917 2918 for (c = 0; c < csize; c++) { 2919 table_base[c] = &table[c][TABLE_SHIFT_S32]; 2920 } 2921 2922 #ifdef __GNUC__ 2923 #pragma GCC diagnostic push 2924 #pragma GCC diagnostic ignored "-Warray-bounds" 2925 #endif 2926 MLIB_C_IMAGELOOKUPSI(mlib_u8, mlib_s32, table_base); 2927 #ifdef __GNUC__ 2928 #pragma GCC diagnostic pop 2929 #endif 2930 } 2931 2932 /***************************************************************/ 2933 void mlib_c_ImageLookUpSI_U8_S16(const mlib_u8 *src, 2934 mlib_s32 slb, 2935 mlib_s16 *dst, 2936 mlib_s32 dlb, 2937 mlib_s32 xsize, 2938 mlib_s32 ysize, 2939 mlib_s32 csize, 2940 const mlib_s16 **table) 2941 { 2942 2943 if ((xsize < 4) || ((xsize * ysize) < 250)) { 2944 MLIB_C_IMAGELOOKUPSI(mlib_s16, mlib_u8, table); 2945 2946 } 2947 else if (csize == 2) { 2948 mlib_u32 tab[256]; 2949 mlib_u16 *tab0 = (mlib_u16 *) table[0]; 3366 } 3367 } 3368 3369 /***************************************************************/ 3370 void mlib_c_ImageLookUpSI_S16_S16(const mlib_s16 *src, 3371 mlib_s32 slb, 3372 mlib_s16 *dst, 3373 mlib_s32 dlb, 3374 mlib_s32 xsize, 3375 mlib_s32 ysize, 3376 mlib_s32 csize, 3377 const mlib_s16 **table) 3378 { 3379 const mlib_s16 *table_base[4]; 3380 mlib_s32 c; 3381 3382 for (c = 0; c < csize; c++) { 3383 table_base[c] = &table[c][32768]; 3384 } 3385 3386 #ifdef __GNUC__ 3387 #pragma GCC diagnostic push 3388 #pragma GCC diagnostic ignored "-Warray-bounds" 3389 #endif 3390 MLIB_C_IMAGELOOKUPSI(mlib_s16, mlib_s16, table_base); 3391 #ifdef __GNUC__ 3392 #pragma GCC diagnostic pop 3393 #endif 3394 } 3395 3396 /***************************************************************/ 3397 void mlib_c_ImageLookUpSI_U16_S16(const mlib_u16 *src, 3398 mlib_s32 slb, 3399 mlib_s16 *dst, 3400 mlib_s32 dlb, 3401 mlib_s32 xsize, 3402 mlib_s32 ysize, 3403 mlib_s32 csize, 3404 const mlib_s16 **table) 3405 { 3406 const mlib_s16 *table_base[4]; 3407 mlib_s32 c; 3408 3409 for (c = 0; c < csize; c++) { 3410 table_base[c] = &table[c][0]; 3411 } 3412 3413 MLIB_C_IMAGELOOKUPSI(mlib_s16, mlib_u16, table_base); 3414 } 3415 3416 /***************************************************************/ 3417 void mlib_c_ImageLookUpSI_S32_S16(const mlib_s32 *src, 3418 mlib_s32 slb, 3419 mlib_s16 *dst, 3420 mlib_s32 dlb, 3421 mlib_s32 xsize, 3422 mlib_s32 ysize, 3423 mlib_s32 csize, 3424 const mlib_s16 **table) 3425 { 3426 const mlib_s16 *table_base[4]; 3427 mlib_s32 c; 3428 3429 for (c = 0; c < csize; c++) { 3430 table_base[c] = &table[c][TABLE_SHIFT_S32]; 3431 } 3432 3433 #ifdef __GNUC__ 3434 #pragma GCC diagnostic push 3435 #pragma GCC diagnostic ignored "-Warray-bounds" 3436 #endif 3437 MLIB_C_IMAGELOOKUPSI(mlib_s16, mlib_s32, table_base); 3438 #ifdef __GNUC__ 3439 #pragma GCC diagnostic pop 3440 #endif 3441 } 3442 3443 /***************************************************************/ 3444 void mlib_c_ImageLookUpSI_S16_U16(const mlib_s16 *src, 3445 mlib_s32 slb, 3446 mlib_u16 *dst, 3447 mlib_s32 dlb, 3448 mlib_s32 xsize, 3449 mlib_s32 ysize, 3450 mlib_s32 csize, 3451 const mlib_u16 **table) 3452 { 3453 const mlib_u16 *table_base[4]; 3454 mlib_s32 c; 3455 3456 for (c = 0; c < csize; c++) { 3457 table_base[c] = &table[c][32768]; 3458 } 3459 3460 MLIB_C_IMAGELOOKUPSI(mlib_u16, mlib_s16, table_base); 3461 } 3462 3463 /***************************************************************/ 3464 void mlib_c_ImageLookUpSI_U16_U16(const mlib_u16 *src, 3465 mlib_s32 slb, 3466 mlib_u16 *dst, 3467 mlib_s32 dlb, 3468 mlib_s32 xsize, 3469 mlib_s32 ysize, 3470 mlib_s32 csize, 3471 const mlib_u16 **table) 3472 { 3473 const mlib_u16 *table_base[4]; 3474 mlib_s32 c; 3475 3476 for (c = 0; c < csize; c++) { 3477 table_base[c] = &table[c][0]; 3478 } 3479 3480 #ifdef __GNUC__ 3481 #pragma GCC diagnostic push 3482 #pragma GCC diagnostic ignored "-Warray-bounds" 3483 #endif 3484 MLIB_C_IMAGELOOKUPSI(mlib_u16, mlib_u16, table_base); 3485 #ifdef __GNUC__ 3486 #pragma GCC diagnostic pop 3487 #endif 3488 } 3489 3490 /***************************************************************/ 3491 void mlib_c_ImageLookUpSI_S32_U16(const mlib_s32 *src, 3492 mlib_s32 slb, 3493 mlib_u16 *dst, 3494 mlib_s32 dlb, 3495 mlib_s32 xsize, 3496 mlib_s32 ysize, 3497 mlib_s32 csize, 3498 const mlib_u16 **table) 3499 { 3500 const mlib_u16 *table_base[4]; 3501 mlib_s32 c; 3502 3503 for (c = 0; c < csize; c++) { 3504 table_base[c] = &table[c][TABLE_SHIFT_S32]; 3505 } 3506 3507 #ifdef __GNUC__ 3508 #pragma GCC diagnostic push 3509 #pragma GCC diagnostic ignored "-Warray-bounds" 3510 #endif 3511 MLIB_C_IMAGELOOKUPSI(mlib_u16, mlib_s32, table_base); 3512 #ifdef __GNUC__ 3513 #pragma GCC diagnostic pop 3514 #endif 3515 } 3516 3517 /***************************************************************/ 3518 void mlib_c_ImageLookUpSI_U8_S32(const mlib_u8 *src, 3519 mlib_s32 slb, 3520 mlib_s32 *dst, 3521 mlib_s32 dlb, 3522 mlib_s32 xsize, 3523 mlib_s32 ysize, 3524 mlib_s32 csize, 3525 const mlib_s32 **table) 3526 { 3527 3528 if (xsize < 7) { 3529 MLIB_C_IMAGELOOKUPSI(mlib_s32, mlib_u8, table); 3530 } 3531 else if (csize == 2) { 3532 mlib_s32 i, j; 3533 3534 for (j = 0; j < ysize; j++, dst += dlb, src += slb) { 3934 } 3935 } 3936 3937 /***************************************************************/ 3938 void mlib_c_ImageLookUpSI_S16_S32(const mlib_s16 *src, 3939 mlib_s32 slb, 3940 mlib_s32 *dst, 3941 mlib_s32 dlb, 3942 mlib_s32 xsize, 3943 mlib_s32 ysize, 3944 mlib_s32 csize, 3945 const mlib_s32 **table) 3946 { 3947 const mlib_s32 *table_base[4]; 3948 mlib_s32 c; 3949 3950 for (c = 0; c < csize; c++) { 3951 table_base[c] = &table[c][32768]; 3952 } 3953 3954 #ifdef __GNUC__ 3955 #pragma GCC diagnostic push 3956 #pragma GCC diagnostic ignored "-Warray-bounds" 3957 #endif 3958 MLIB_C_IMAGELOOKUPSI(mlib_s32, mlib_s16, table_base); 3959 #ifdef __GNUC__ 3960 #pragma GCC diagnostic pop 3961 #endif 3962 } 3963 3964 /***************************************************************/ 3965 void mlib_c_ImageLookUpSI_U16_S32(const mlib_u16 *src, 3966 mlib_s32 slb, 3967 mlib_s32 *dst, 3968 mlib_s32 dlb, 3969 mlib_s32 xsize, 3970 mlib_s32 ysize, 3971 mlib_s32 csize, 3972 const mlib_s32 **table) 3973 { 3974 const mlib_s32 *table_base[4]; 3975 mlib_s32 c; 3976 3977 for (c = 0; c < csize; c++) { 3978 table_base[c] = &table[c][0]; 3979 } 3980 3981 #ifdef __GNUC__ 3982 #pragma GCC diagnostic push 3983 #pragma GCC diagnostic ignored "-Warray-bounds" 3984 #endif 3985 MLIB_C_IMAGELOOKUPSI(mlib_s32, mlib_u16, table_base); 3986 #ifdef __GNUC__ 3987 #pragma GCC diagnostic pop 3988 #endif 3989 } 3990 3991 /***************************************************************/ 3992 void mlib_c_ImageLookUpSI_S32_S32(const mlib_s32 *src, 3993 mlib_s32 slb, 3994 mlib_s32 *dst, 3995 mlib_s32 dlb, 3996 mlib_s32 xsize, 3997 mlib_s32 ysize, 3998 mlib_s32 csize, 3999 const mlib_s32 **table) 4000 { 4001 const mlib_s32 *table_base[4]; 4002 mlib_s32 c; 4003 4004 for (c = 0; c < csize; c++) { 4005 table_base[c] = &table[c][TABLE_SHIFT_S32]; 4006 } 4007 4008 MLIB_C_IMAGELOOKUPSI(mlib_s32, mlib_s32, table_base); |