Mon Mar 4 08:36:42 2019 UTC ()
merge libdrm 2.4.97 and pixman 0.38.0.


(mrg)
diff -r1.1.1.5 -r0 xsrc/external/mit/libdrm/dist/README
diff -r1.11 -r1.12 xsrc/external/mit/libdrm/dist/xf86atomic.h
diff -r1.22 -r1.23 xsrc/external/mit/libdrm/dist/xf86drm.c
diff -r1.2 -r1.3 xsrc/external/mit/libdrm/dist/amdgpu/amdgpu_bo.c
diff -r1.9 -r1.10 xsrc/external/mit/pixman/dist/pixman/pixman-bits-image.c
diff -r1.4 -r1.5 xsrc/external/mit/pixman/dist/pixman/pixman-inlines.h
diff -r1.7 -r1.8 xsrc/external/mit/pixman/dist/pixman/pixman-private.h
diff -r1.21 -r1.22 xsrc/external/mit/pixman/include/config.h

File Deleted: xsrc/external/mit/libdrm/dist/Attic/README

cvs diff -r1.11 -r1.12 xsrc/external/mit/libdrm/dist/xf86atomic.h (expand / switch to unified diff)

--- xsrc/external/mit/libdrm/dist/xf86atomic.h 2019/01/10 08:59:43 1.11
+++ xsrc/external/mit/libdrm/dist/xf86atomic.h 2019/03/04 08:36:42 1.12
@@ -91,23 +91,25 @@ typedef struct { volatile LIBDRM_ATOMIC_ @@ -91,23 +91,25 @@ typedef struct { volatile LIBDRM_ATOMIC_
91# define atomic_inc(x) (atomic_inc_uint (&(x)->atomic)) 91# define atomic_inc(x) (atomic_inc_uint (&(x)->atomic))
92# define atomic_inc_return(x) (atomic_inc_uint_nv(&(x)->atomic)) 92# define atomic_inc_return(x) (atomic_inc_uint_nv(&(x)->atomic))
93# define atomic_dec_and_test(x) (atomic_dec_uint_nv(&(x)->atomic) == 0) 93# define atomic_dec_and_test(x) (atomic_dec_uint_nv(&(x)->atomic) == 0)
94# define atomic_add(x, v) (atomic_add_int(&(x)->atomic, (v))) 94# define atomic_add(x, v) (atomic_add_int(&(x)->atomic, (v)))
95# define atomic_dec(x, v) (atomic_add_int(&(x)->atomic, -(v))) 95# define atomic_dec(x, v) (atomic_add_int(&(x)->atomic, -(v)))
96# define atomic_cmpxchg(x, oldv, newv) atomic_cas_uint (&(x)->atomic, oldv, newv) 96# define atomic_cmpxchg(x, oldv, newv) atomic_cas_uint (&(x)->atomic, oldv, newv)
97 97
98#endif 98#endif
99 99
100#if !defined(HAS_ATOMIC_OPS) 100#if !defined(HAS_ATOMIC_OPS)
101#error libdrm requires atomic operations, please define them for your CPU/compiler. 101#error libdrm requires atomic operations, please define them for your CPU/compiler.
102#endif 102#endif
103 103
 104#undef HAS_ATOMIC_OPS
 105
104static inline int atomic_add_unless(atomic_t *v, int add, int unless) 106static inline int atomic_add_unless(atomic_t *v, int add, int unless)
105{ 107{
106 int c, old; 108 int c, old;
107 c = atomic_read(v); 109 c = atomic_read(v);
108 while (c != unless && (old = atomic_cmpxchg(v, c, c + add)) != c) 110 while (c != unless && (old = atomic_cmpxchg(v, c, c + add)) != c)
109 c = old; 111 c = old;
110 return c == unless; 112 return c == unless;
111} 113}
112 114
113#endif 115#endif

cvs diff -r1.22 -r1.23 xsrc/external/mit/libdrm/dist/xf86drm.c (expand / switch to unified diff)

--- xsrc/external/mit/libdrm/dist/xf86drm.c 2019/01/10 08:59:43 1.22
+++ xsrc/external/mit/libdrm/dist/xf86drm.c 2019/03/04 08:36:42 1.23
@@ -49,26 +49,28 @@ @@ -49,26 +49,28 @@
49#include <sys/stat.h> 49#include <sys/stat.h>
50#define stat_t struct stat 50#define stat_t struct stat
51#include <sys/ioctl.h> 51#include <sys/ioctl.h>
52#include <sys/time.h> 52#include <sys/time.h>
53#include <stdarg.h> 53#include <stdarg.h>
54#ifdef MAJOR_IN_MKDEV 54#ifdef MAJOR_IN_MKDEV
55#include <sys/mkdev.h> 55#include <sys/mkdev.h>
56#endif 56#endif
57#ifdef MAJOR_IN_SYSMACROS 57#ifdef MAJOR_IN_SYSMACROS
58#include <sys/sysmacros.h> 58#include <sys/sysmacros.h>
59#endif 59#endif
60#include <math.h> 60#include <math.h>
61 61
 62#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
 63
62/* Not all systems have MAP_FAILED defined */ 64/* Not all systems have MAP_FAILED defined */
63#ifndef MAP_FAILED 65#ifndef MAP_FAILED
64#define MAP_FAILED ((void *)-1) 66#define MAP_FAILED ((void *)-1)
65#endif 67#endif
66 68
67#include "xf86drm.h" 69#include "xf86drm.h"
68#include "libdrm_macros.h" 70#include "libdrm_macros.h"
69 71
70#include "util_math.h" 72#include "util_math.h"
71 73
72#ifdef __OpenBSD__ 74#ifdef __OpenBSD__
73#define DRM_PRIMARY_MINOR_NAME "drm" 75#define DRM_PRIMARY_MINOR_NAME "drm"
74#define DRM_CONTROL_MINOR_NAME "drmC" 76#define DRM_CONTROL_MINOR_NAME "drmC"
@@ -93,27 +95,27 @@ @@ -93,27 +95,27 @@
93 95
94#ifdef __OpenBSD__ 96#ifdef __OpenBSD__
95#ifdef __i386__ 97#ifdef __i386__
96#define DRM_MAJOR 88 98#define DRM_MAJOR 88
97#else 99#else
98#define DRM_MAJOR 87 100#define DRM_MAJOR 87
99#endif 101#endif
100#endif /* __OpenBSD__ */ 102#endif /* __OpenBSD__ */
101 103
102#ifndef DRM_MAJOR 104#ifndef DRM_MAJOR
103#define DRM_MAJOR 226 /* Linux */ 105#define DRM_MAJOR 226 /* Linux */
104#endif 106#endif
105 107
106#ifdef __OpenBSD__ 108#if defined(__OpenBSD__) || defined(__DragonFly__)
107struct drm_pciinfo { 109struct drm_pciinfo {
108 uint16_t domain; 110 uint16_t domain;
109 uint8_t bus; 111 uint8_t bus;
110 uint8_t dev; 112 uint8_t dev;
111 uint8_t func; 113 uint8_t func;
112 uint16_t vendor_id; 114 uint16_t vendor_id;
113 uint16_t device_id; 115 uint16_t device_id;
114 uint16_t subvendor_id; 116 uint16_t subvendor_id;
115 uint16_t subdevice_id; 117 uint16_t subdevice_id;
116 uint8_t revision_id; 118 uint8_t revision_id;
117}; 119};
118 120
119#define DRM_IOCTL_GET_PCIINFO DRM_IOR(0x15, struct drm_pciinfo) 121#define DRM_IOCTL_GET_PCIINFO DRM_IOR(0x15, struct drm_pciinfo)
@@ -2978,51 +2980,52 @@ sysfs_uevent_get(const char *path, const @@ -2978,51 +2980,52 @@ sysfs_uevent_get(const char *path, const
2978 return value; 2980 return value;
2979} 2981}
2980#endif 2982#endif
2981 2983
2982/* Little white lie to avoid major rework of the existing code */ 2984/* Little white lie to avoid major rework of the existing code */
2983#define DRM_BUS_VIRTIO 0x10 2985#define DRM_BUS_VIRTIO 0x10
2984 2986
2985static int drmParseSubsystemType(int maj, int min) 2987static int drmParseSubsystemType(int maj, int min)
2986{ 2988{
2987#ifdef __linux__ 2989#ifdef __linux__
2988 char path[PATH_MAX + 1]; 2990 char path[PATH_MAX + 1];
2989 char link[PATH_MAX + 1] = ""; 2991 char link[PATH_MAX + 1] = "";
2990 char *name; 2992 char *name;
 2993 struct {
 2994 const char *name;
 2995 int bus_type;
 2996 } bus_types[] = {
 2997 { "/pci", DRM_BUS_PCI },
 2998 { "/usb", DRM_BUS_USB },
 2999 { "/platform", DRM_BUS_PLATFORM },
 3000 { "/spi", DRM_BUS_PLATFORM },
 3001 { "/host1x", DRM_BUS_HOST1X },
 3002 { "/virtio", DRM_BUS_VIRTIO },
 3003 };
2991 3004
2992 snprintf(path, PATH_MAX, "/sys/dev/char/%d:%d/device/subsystem", 3005 snprintf(path, PATH_MAX, "/sys/dev/char/%d:%d/device/subsystem",
2993 maj, min); 3006 maj, min);
2994 3007
2995 if (readlink(path, link, PATH_MAX) < 0) 3008 if (readlink(path, link, PATH_MAX) < 0)
2996 return -errno; 3009 return -errno;
2997 3010
2998 name = strrchr(link, '/'); 3011 name = strrchr(link, '/');
2999 if (!name) 3012 if (!name)
3000 return -EINVAL; 3013 return -EINVAL;
3001 3014
3002 if (strncmp(name, "/pci", 4) == 0) 3015 for (unsigned i = 0; i < ARRAY_SIZE(bus_types); i++) {
3003 return DRM_BUS_PCI; 3016 if (strncmp(name, bus_types[i].name, strlen(bus_types[i].name)) == 0)
3004 3017 return bus_types[i].bus_type;
3005 if (strncmp(name, "/usb", 4) == 0) 3018 }
3006 return DRM_BUS_USB; 
3007 
3008 if (strncmp(name, "/platform", 9) == 0) 
3009 return DRM_BUS_PLATFORM; 
3010 
3011 if (strncmp(name, "/host1x", 7) == 0) 
3012 return DRM_BUS_HOST1X; 
3013 
3014 if (strncmp(name, "/virtio", 7) == 0) 
3015 return DRM_BUS_VIRTIO; 
3016 3019
3017 return -EINVAL; 3020 return -EINVAL;
3018#elif defined(__NetBSD__) 3021#elif defined(__NetBSD__)
3019 int type, fd; 3022 int type, fd;
3020 drmSetVersion sv; 3023 drmSetVersion sv;
3021 char *buf; 3024 char *buf;
3022 unsigned domain, bus, dev; 3025 unsigned domain, bus, dev;
3023 int func; 3026 int func;
3024 int ret; 3027 int ret;
3025 3028
3026 /* Get the type of device we're looking for to pick the right pathname. */ 3029 /* Get the type of device we're looking for to pick the right pathname. */
3027 type = drmGetMinorType(min); 3030 type = drmGetMinorType(min);
3028 if (type == -1) 3031 if (type == -1)
@@ -3064,27 +3067,27 @@ static int drmParseSubsystemType(int maj @@ -3064,27 +3067,27 @@ static int drmParseSubsystemType(int maj
3064 if (buf == NULL) 3067 if (buf == NULL)
3065 return -ENODEV; 3068 return -ENODEV;
3066 3069
3067 /* Find a string we know about; otherwise -EINVAL. */ 3070 /* Find a string we know about; otherwise -EINVAL. */
3068 ret = -EINVAL; 3071 ret = -EINVAL;
3069 if (strncmp(buf, "pci:", 4) == 0) 3072 if (strncmp(buf, "pci:", 4) == 0)
3070 ret = DRM_BUS_PCI; 3073 ret = DRM_BUS_PCI;
3071 3074
3072 /* We're done with the bus id. */ 3075 /* We're done with the bus id. */
3073 free(buf); 3076 free(buf);
3074 3077
3075 /* Success or not, we're done. */ 3078 /* Success or not, we're done. */
3076 return ret; 3079 return ret;
3077#elif defined(__OpenBSD__) 3080#elif defined(__OpenBSD__) || defined(__DragonFly__)
3078 return DRM_BUS_PCI; 3081 return DRM_BUS_PCI;
3079#else 3082#else
3080#warning "Missing implementation of drmParseSubsystemType" 3083#warning "Missing implementation of drmParseSubsystemType"
3081 return -EINVAL; 3084 return -EINVAL;
3082#endif 3085#endif
3083} 3086}
3084 3087
3085static void 3088static void
3086get_pci_path(int maj, int min, char *pci_path) 3089get_pci_path(int maj, int min, char *pci_path)
3087{ 3090{
3088 char path[PATH_MAX + 1], *term; 3091 char path[PATH_MAX + 1], *term;
3089 3092
3090 snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device", maj, min); 3093 snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device", maj, min);
@@ -3180,27 +3183,27 @@ static int drmParsePciBusInfo(int maj, i @@ -3180,27 +3183,27 @@ static int drmParsePciBusInfo(int maj, i
3180 3183
3181 /* If scanf didn't return 4 -- domain, bus, dev, func -- then fail. */ 3184 /* If scanf didn't return 4 -- domain, bus, dev, func -- then fail. */
3182 if (ret != 4) 3185 if (ret != 4)
3183 return -ENODEV; 3186 return -ENODEV;
3184 3187
3185 /* Populate the results. */ 3188 /* Populate the results. */
3186 info->domain = domain; 3189 info->domain = domain;
3187 info->bus = bus; 3190 info->bus = bus;
3188 info->dev = dev; 3191 info->dev = dev;
3189 info->func = func; 3192 info->func = func;
3190 3193
3191 /* Success! */ 3194 /* Success! */
3192 return 0; 3195 return 0;
3193#elif defined(__OpenBSD__) 3196#elif defined(__OpenBSD__) || defined(__DragonFly__)
3194 struct drm_pciinfo pinfo; 3197 struct drm_pciinfo pinfo;
3195 int fd, type; 3198 int fd, type;
3196 3199
3197 type = drmGetMinorType(min); 3200 type = drmGetMinorType(min);
3198 if (type == -1) 3201 if (type == -1)
3199 return -ENODEV; 3202 return -ENODEV;
3200 3203
3201 fd = drmOpenMinor(min, 0, type); 3204 fd = drmOpenMinor(min, 0, type);
3202 if (fd < 0) 3205 if (fd < 0)
3203 return -errno; 3206 return -errno;
3204 3207
3205 if (drmIoctl(fd, DRM_IOCTL_GET_PCIINFO, &pinfo)) { 3208 if (drmIoctl(fd, DRM_IOCTL_GET_PCIINFO, &pinfo)) {
3206 close(fd); 3209 close(fd);
@@ -3269,27 +3272,26 @@ static int drmGetMaxNodeName(void) @@ -3269,27 +3272,26 @@ static int drmGetMaxNodeName(void)
3269{ 3272{
3270 return sizeof(DRM_DIR_NAME) + 3273 return sizeof(DRM_DIR_NAME) +
3271 MAX3(sizeof(DRM_PRIMARY_MINOR_NAME), 3274 MAX3(sizeof(DRM_PRIMARY_MINOR_NAME),
3272 sizeof(DRM_CONTROL_MINOR_NAME), 3275 sizeof(DRM_CONTROL_MINOR_NAME),
3273 sizeof(DRM_RENDER_MINOR_NAME)) + 3276 sizeof(DRM_RENDER_MINOR_NAME)) +
3274 3 /* length of the node number */; 3277 3 /* length of the node number */;
3275} 3278}
3276 3279
3277#ifdef __linux__ 3280#ifdef __linux__
3278static int parse_separate_sysfs_files(int maj, int min, 3281static int parse_separate_sysfs_files(int maj, int min,
3279 drmPciDeviceInfoPtr device, 3282 drmPciDeviceInfoPtr device,
3280 bool ignore_revision) 3283 bool ignore_revision)
3281{ 3284{
3282#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) 
3283 static const char *attrs[] = { 3285 static const char *attrs[] = {
3284 "revision", /* Older kernels are missing the file, so check for it first */ 3286 "revision", /* Older kernels are missing the file, so check for it first */
3285 "vendor", 3287 "vendor",
3286 "device", 3288 "device",
3287 "subsystem_vendor", 3289 "subsystem_vendor",
3288 "subsystem_device", 3290 "subsystem_device",
3289 }; 3291 };
3290 char path[PATH_MAX + 1], pci_path[PATH_MAX + 1]; 3292 char path[PATH_MAX + 1], pci_path[PATH_MAX + 1];
3291 unsigned int data[ARRAY_SIZE(attrs)]; 3293 unsigned int data[ARRAY_SIZE(attrs)];
3292 FILE *fp; 3294 FILE *fp;
3293 int ret; 3295 int ret;
3294 3296
3295 get_pci_path(maj, min, pci_path); 3297 get_pci_path(maj, min, pci_path);
@@ -3389,27 +3391,27 @@ static int drmParsePciDeviceInfo(int maj @@ -3389,27 +3391,27 @@ static int drmParsePciDeviceInfo(int maj
3389 goto out; 3391 goto out;
3390 3392
3391 ret = 0; 3393 ret = 0;
3392 device->vendor_id = PCI_VENDOR(id); 3394 device->vendor_id = PCI_VENDOR(id);
3393 device->device_id = PCI_PRODUCT(id); 3395 device->device_id = PCI_PRODUCT(id);
3394 device->subvendor_id = PCI_SUBSYS_VENDOR(subsys); 3396 device->subvendor_id = PCI_SUBSYS_VENDOR(subsys);
3395 device->subdevice_id = PCI_SUBSYS_ID(subsys); 3397 device->subdevice_id = PCI_SUBSYS_ID(subsys);
3396 device->revision_id = PCI_REVISION(class); 3398 device->revision_id = PCI_REVISION(class);
3397out: 3399out:
3398 if (ret == -1) 3400 if (ret == -1)
3399 ret = -errno; 3401 ret = -errno;
3400 close(pcifd); 3402 close(pcifd);
3401 return ret; 3403 return ret;
3402#elif defined(__OpenBSD__) 3404#elif defined(__OpenBSD__) || defined(__DragonFly__)
3403 struct drm_pciinfo pinfo; 3405 struct drm_pciinfo pinfo;
3404 int fd, type; 3406 int fd, type;
3405 3407
3406 type = drmGetMinorType(min); 3408 type = drmGetMinorType(min);
3407 if (type == -1) 3409 if (type == -1)
3408 return -ENODEV; 3410 return -ENODEV;
3409 3411
3410 fd = drmOpenMinor(min, 0, type); 3412 fd = drmOpenMinor(min, 0, type);
3411 if (fd < 0) 3413 if (fd < 0)
3412 return -errno; 3414 return -errno;
3413 3415
3414 if (drmIoctl(fd, DRM_IOCTL_GET_PCIINFO, &pinfo)) { 3416 if (drmIoctl(fd, DRM_IOCTL_GET_PCIINFO, &pinfo)) {
3415 close(fd); 3417 close(fd);

cvs diff -r1.2 -r1.3 xsrc/external/mit/libdrm/dist/amdgpu/amdgpu_bo.c (expand / switch to unified diff)

--- xsrc/external/mit/libdrm/dist/amdgpu/amdgpu_bo.c 2019/01/11 02:34:53 1.2
+++ xsrc/external/mit/libdrm/dist/amdgpu/amdgpu_bo.c 2019/03/04 08:36:42 1.3
@@ -608,26 +608,60 @@ drm_public int amdgpu_create_bo_from_use @@ -608,26 +608,60 @@ drm_public int amdgpu_create_bo_from_use
608 goto out; 608 goto out;
609 } 609 }
610 610
611 pthread_mutex_lock(&dev->bo_table_mutex); 611 pthread_mutex_lock(&dev->bo_table_mutex);
612 r = handle_table_insert(&dev->bo_handles, (*buf_handle)->handle, 612 r = handle_table_insert(&dev->bo_handles, (*buf_handle)->handle,
613 *buf_handle); 613 *buf_handle);
614 pthread_mutex_unlock(&dev->bo_table_mutex); 614 pthread_mutex_unlock(&dev->bo_table_mutex);
615 if (r) 615 if (r)
616 amdgpu_bo_free(*buf_handle); 616 amdgpu_bo_free(*buf_handle);
617out: 617out:
618 return r; 618 return r;
619} 619}
620 620
 621drm_public int amdgpu_bo_list_create_raw(amdgpu_device_handle dev,
 622 uint32_t number_of_buffers,
 623 struct drm_amdgpu_bo_list_entry *buffers,
 624 uint32_t *result)
 625{
 626 union drm_amdgpu_bo_list args;
 627 int r;
 628
 629 memset(&args, 0, sizeof(args));
 630 args.in.operation = AMDGPU_BO_LIST_OP_CREATE;
 631 args.in.bo_number = number_of_buffers;
 632 args.in.bo_info_size = sizeof(struct drm_amdgpu_bo_list_entry);
 633 args.in.bo_info_ptr = (uint64_t)(uintptr_t)buffers;
 634
 635 r = drmCommandWriteRead(dev->fd, DRM_AMDGPU_BO_LIST,
 636 &args, sizeof(args));
 637 if (!r)
 638 *result = args.out.list_handle;
 639 return r;
 640}
 641
 642drm_public int amdgpu_bo_list_destroy_raw(amdgpu_device_handle dev,
 643 uint32_t bo_list)
 644{
 645 union drm_amdgpu_bo_list args;
 646
 647 memset(&args, 0, sizeof(args));
 648 args.in.operation = AMDGPU_BO_LIST_OP_DESTROY;
 649 args.in.list_handle = bo_list;
 650
 651 return drmCommandWriteRead(dev->fd, DRM_AMDGPU_BO_LIST,
 652 &args, sizeof(args));
 653}
 654
621drm_public int amdgpu_bo_list_create(amdgpu_device_handle dev, 655drm_public int amdgpu_bo_list_create(amdgpu_device_handle dev,
622 uint32_t number_of_resources, 656 uint32_t number_of_resources,
623 amdgpu_bo_handle *resources, 657 amdgpu_bo_handle *resources,
624 uint8_t *resource_prios, 658 uint8_t *resource_prios,
625 amdgpu_bo_list_handle *result) 659 amdgpu_bo_list_handle *result)
626{ 660{
627 struct drm_amdgpu_bo_list_entry *list; 661 struct drm_amdgpu_bo_list_entry *list;
628 union drm_amdgpu_bo_list args; 662 union drm_amdgpu_bo_list args;
629 unsigned i; 663 unsigned i;
630 int r; 664 int r;
631 665
632 if (!number_of_resources) 666 if (!number_of_resources)
633 return -EINVAL; 667 return -EINVAL;

cvs diff -r1.9 -r1.10 xsrc/external/mit/pixman/dist/pixman/pixman-bits-image.c (expand / switch to unified diff)

--- xsrc/external/mit/pixman/dist/pixman/pixman-bits-image.c 2018/12/30 08:59:39 1.9
+++ xsrc/external/mit/pixman/dist/pixman/pixman-bits-image.c 2019/03/04 08:36:42 1.10
@@ -26,132 +26,249 @@ @@ -26,132 +26,249 @@
26 * SOFTWARE. 26 * SOFTWARE.
27 */ 27 */
28 28
29#ifdef HAVE_CONFIG_H 29#ifdef HAVE_CONFIG_H
30#include <config.h> 30#include <config.h>
31#endif 31#endif
32#include <stdio.h> 32#include <stdio.h>
33#include <stdlib.h> 33#include <stdlib.h>
34#include <string.h> 34#include <string.h>
35#include "pixman-private.h" 35#include "pixman-private.h"
36#include "pixman-combine32.h" 36#include "pixman-combine32.h"
37#include "pixman-inlines.h" 37#include "pixman-inlines.h"
38 38
39static uint32_t * 39/* Fetch functions */
40_pixman_image_get_scanline_generic_float (pixman_iter_t * iter, 
41 const uint32_t *mask) 
42{ 
43 pixman_iter_get_scanline_t fetch_32 = iter->data; 
44 uint32_t *buffer = iter->buffer; 
45 
46 fetch_32 (iter, NULL); 
47 40
48 pixman_expand_to_float ((argb_t *)buffer, buffer, PIXMAN_a8r8g8b8, iter->width); 41static force_inline void
 42fetch_pixel_no_alpha_32 (bits_image_t *image,
 43 int x, int y, pixman_bool_t check_bounds,
 44 void *out)
 45{
 46 uint32_t *ret = out;
49 47
50 return iter->buffer; 48 if (check_bounds &&
 49 (x < 0 || x >= image->width || y < 0 || y >= image->height))
 50 *ret = 0;
 51 else
 52 *ret = image->fetch_pixel_32 (image, x, y);
51} 53}
52 54
53/* Fetch functions */ 55static force_inline void
54 56fetch_pixel_no_alpha_float (bits_image_t *image,
55static force_inline uint32_t 57 int x, int y, pixman_bool_t check_bounds,
56fetch_pixel_no_alpha (bits_image_t *image, 58 void *out)
57 int x, int y, pixman_bool_t check_bounds) 
58{ 59{
 60 argb_t *ret = out;
 61
59 if (check_bounds && 62 if (check_bounds &&
60 (x < 0 || x >= image->width || y < 0 || y >= image->height)) 63 (x < 0 || x >= image->width || y < 0 || y >= image->height))
61 { 64 ret->a = ret->r = ret->g = ret->b = 0.f;
62 return 0; 65 else
63 } 66 *ret = image->fetch_pixel_float (image, x, y);
64 
65 return image->fetch_pixel_32 (image, x, y); 
66} 67}
67 68
68typedef uint32_t (* get_pixel_t) (bits_image_t *image, 69typedef void (* get_pixel_t) (bits_image_t *image,
69 int x, int y, pixman_bool_t check_bounds); 70 int x, int y, pixman_bool_t check_bounds, void *out);
70 71
71static force_inline uint32_t 72static force_inline void
72bits_image_fetch_pixel_nearest (bits_image_t *image, 73bits_image_fetch_pixel_nearest (bits_image_t *image,
73 pixman_fixed_t x, 74 pixman_fixed_t x,
74 pixman_fixed_t y, 75 pixman_fixed_t y,
75 get_pixel_t get_pixel) 76 get_pixel_t get_pixel,
 77 void *out)
76{ 78{
77 int x0 = pixman_fixed_to_int (x - pixman_fixed_e); 79 int x0 = pixman_fixed_to_int (x - pixman_fixed_e);
78 int y0 = pixman_fixed_to_int (y - pixman_fixed_e); 80 int y0 = pixman_fixed_to_int (y - pixman_fixed_e);
79 81
80 if (image->common.repeat != PIXMAN_REPEAT_NONE) 82 if (image->common.repeat != PIXMAN_REPEAT_NONE)
81 { 83 {
82 repeat (image->common.repeat, &x0, image->width); 84 repeat (image->common.repeat, &x0, image->width);
83 repeat (image->common.repeat, &y0, image->height); 85 repeat (image->common.repeat, &y0, image->height);
84 86
85 return get_pixel (image, x0, y0, FALSE); 87 get_pixel (image, x0, y0, FALSE, out);
86 } 88 }
87 else 89 else
88 { 90 {
89 return get_pixel (image, x0, y0, TRUE); 91 get_pixel (image, x0, y0, TRUE, out);
90 } 92 }
91} 93}
92 94
93static force_inline uint32_t 95static force_inline void
94bits_image_fetch_pixel_bilinear (bits_image_t *image, 96bits_image_fetch_pixel_bilinear_32 (bits_image_t *image,
95 pixman_fixed_t x, 97 pixman_fixed_t x,
96 pixman_fixed_t y, 98 pixman_fixed_t y,
97 get_pixel_t get_pixel) 99 get_pixel_t get_pixel,
 100 void *out)
98{ 101{
99 pixman_repeat_t repeat_mode = image->common.repeat; 102 pixman_repeat_t repeat_mode = image->common.repeat;
100 int width = image->width; 103 int width = image->width;
101 int height = image->height; 104 int height = image->height;
102 int x1, y1, x2, y2; 105 int x1, y1, x2, y2;
103 uint32_t tl, tr, bl, br; 106 uint32_t tl, tr, bl, br;
104 int32_t distx, disty; 107 int32_t distx, disty;
 108 uint32_t *ret = out;
105 109
106 x1 = x - pixman_fixed_1 / 2; 110 x1 = x - pixman_fixed_1 / 2;
107 y1 = y - pixman_fixed_1 / 2; 111 y1 = y - pixman_fixed_1 / 2;
108 112
109 distx = pixman_fixed_to_bilinear_weight (x1); 113 distx = pixman_fixed_to_bilinear_weight (x1);
110 disty = pixman_fixed_to_bilinear_weight (y1); 114 disty = pixman_fixed_to_bilinear_weight (y1);
111 115
112 x1 = pixman_fixed_to_int (x1); 116 x1 = pixman_fixed_to_int (x1);
113 y1 = pixman_fixed_to_int (y1); 117 y1 = pixman_fixed_to_int (y1);
114 x2 = x1 + 1; 118 x2 = x1 + 1;
115 y2 = y1 + 1; 119 y2 = y1 + 1;
116 120
117 if (repeat_mode != PIXMAN_REPEAT_NONE) 121 if (repeat_mode != PIXMAN_REPEAT_NONE)
118 { 122 {
119 repeat (repeat_mode, &x1, width); 123 repeat (repeat_mode, &x1, width);
120 repeat (repeat_mode, &y1, height); 124 repeat (repeat_mode, &y1, height);
121 repeat (repeat_mode, &x2, width); 125 repeat (repeat_mode, &x2, width);
122 repeat (repeat_mode, &y2, height); 126 repeat (repeat_mode, &y2, height);
123 127
124 tl = get_pixel (image, x1, y1, FALSE); 128 get_pixel (image, x1, y1, FALSE, &tl);
125 bl = get_pixel (image, x1, y2, FALSE); 129 get_pixel (image, x2, y1, FALSE, &tr);
126 tr = get_pixel (image, x2, y1, FALSE); 130 get_pixel (image, x1, y2, FALSE, &bl);
127 br = get_pixel (image, x2, y2, FALSE); 131 get_pixel (image, x2, y2, FALSE, &br);
128 } 132 }
129 else 133 else
130 { 134 {
131 tl = get_pixel (image, x1, y1, TRUE); 135 get_pixel (image, x1, y1, TRUE, &tl);
132 tr = get_pixel (image, x2, y1, TRUE); 136 get_pixel (image, x2, y1, TRUE, &tr);
133 bl = get_pixel (image, x1, y2, TRUE); 137 get_pixel (image, x1, y2, TRUE, &bl);
134 br = get_pixel (image, x2, y2, TRUE); 138 get_pixel (image, x2, y2, TRUE, &br);
135 } 139 }
136 140
137 return bilinear_interpolation (tl, tr, bl, br, distx, disty); 141 *ret = bilinear_interpolation (tl, tr, bl, br, distx, disty);
138} 142}
139 143
140static force_inline uint32_t 144static force_inline void
 145bits_image_fetch_pixel_bilinear_float (bits_image_t *image,
 146 pixman_fixed_t x,
 147 pixman_fixed_t y,
 148 get_pixel_t get_pixel,
 149 void *out)
 150{
 151 pixman_repeat_t repeat_mode = image->common.repeat;
 152 int width = image->width;
 153 int height = image->height;
 154 int x1, y1, x2, y2;
 155 argb_t tl, tr, bl, br;
 156 float distx, disty;
 157 argb_t *ret = out;
 158
 159 x1 = x - pixman_fixed_1 / 2;
 160 y1 = y - pixman_fixed_1 / 2;
 161
 162 distx = ((float)pixman_fixed_fraction(x1)) / 65536.f;
 163 disty = ((float)pixman_fixed_fraction(y1)) / 65536.f;
 164
 165 x1 = pixman_fixed_to_int (x1);
 166 y1 = pixman_fixed_to_int (y1);
 167 x2 = x1 + 1;
 168 y2 = y1 + 1;
 169
 170 if (repeat_mode != PIXMAN_REPEAT_NONE)
 171 {
 172 repeat (repeat_mode, &x1, width);
 173 repeat (repeat_mode, &y1, height);
 174 repeat (repeat_mode, &x2, width);
 175 repeat (repeat_mode, &y2, height);
 176
 177 get_pixel (image, x1, y1, FALSE, &tl);
 178 get_pixel (image, x2, y1, FALSE, &tr);
 179 get_pixel (image, x1, y2, FALSE, &bl);
 180 get_pixel (image, x2, y2, FALSE, &br);
 181 }
 182 else
 183 {
 184 get_pixel (image, x1, y1, TRUE, &tl);
 185 get_pixel (image, x2, y1, TRUE, &tr);
 186 get_pixel (image, x1, y2, TRUE, &bl);
 187 get_pixel (image, x2, y2, TRUE, &br);
 188 }
 189
 190 *ret = bilinear_interpolation_float (tl, tr, bl, br, distx, disty);
 191}
 192
 193static force_inline void accum_32(int *satot, int *srtot,
 194 int *sgtot, int *sbtot,
 195 const void *p, pixman_fixed_t f)
 196{
 197 uint32_t pixel = *(uint32_t *)p;
 198
 199 *srtot += (int)RED_8 (pixel) * f;
 200 *sgtot += (int)GREEN_8 (pixel) * f;
 201 *sbtot += (int)BLUE_8 (pixel) * f;
 202 *satot += (int)ALPHA_8 (pixel) * f;
 203}
 204
 205static force_inline void reduce_32(int satot, int srtot,
 206 int sgtot, int sbtot, void *p)
 207{
 208 uint32_t *ret = p;
 209
 210 satot = (satot + 0x8000) >> 16;
 211 srtot = (srtot + 0x8000) >> 16;
 212 sgtot = (sgtot + 0x8000) >> 16;
 213 sbtot = (sbtot + 0x8000) >> 16;
 214
 215 satot = CLIP (satot, 0, 0xff);
 216 srtot = CLIP (srtot, 0, 0xff);
 217 sgtot = CLIP (sgtot, 0, 0xff);
 218 sbtot = CLIP (sbtot, 0, 0xff);
 219
 220 *ret = ((satot << 24) | (srtot << 16) | (sgtot << 8) | (sbtot));
 221}
 222
 223static force_inline void accum_float(int *satot, int *srtot,
 224 int *sgtot, int *sbtot,
 225 const void *p, pixman_fixed_t f)
 226{
 227 const argb_t *pixel = p;
 228
 229 *satot += pixel->a * f;
 230 *srtot += pixel->r * f;
 231 *sgtot += pixel->g * f;
 232 *sbtot += pixel->b * f;
 233}
 234
 235static force_inline void reduce_float(int satot, int srtot,
 236 int sgtot, int sbtot,
 237 void *p)
 238{
 239 argb_t *ret = p;
 240
 241 ret->a = CLIP (satot / 65536.f, 0.f, 1.f);
 242 ret->r = CLIP (srtot / 65536.f, 0.f, 1.f);
 243 ret->g = CLIP (sgtot / 65536.f, 0.f, 1.f);
 244 ret->b = CLIP (sbtot / 65536.f, 0.f, 1.f);
 245}
 246
 247typedef void (* accumulate_pixel_t) (int *satot, int *srtot,
 248 int *sgtot, int *sbtot,
 249 const void *pixel, pixman_fixed_t f);
 250
 251typedef void (* reduce_pixel_t) (int satot, int srtot,
 252 int sgtot, int sbtot, void *out);
 253
 254static force_inline void
141bits_image_fetch_pixel_convolution (bits_image_t *image, 255bits_image_fetch_pixel_convolution (bits_image_t *image,
142 pixman_fixed_t x, 256 pixman_fixed_t x,
143 pixman_fixed_t y, 257 pixman_fixed_t y,
144 get_pixel_t get_pixel) 258 get_pixel_t get_pixel,
 259 void *out,
 260 accumulate_pixel_t accum,
 261 reduce_pixel_t reduce)
145{ 262{
146 pixman_fixed_t *params = image->common.filter_params; 263 pixman_fixed_t *params = image->common.filter_params;
147 int x_off = (params[0] - pixman_fixed_1) >> 1; 264 int x_off = (params[0] - pixman_fixed_1) >> 1;
148 int y_off = (params[1] - pixman_fixed_1) >> 1; 265 int y_off = (params[1] - pixman_fixed_1) >> 1;
149 int32_t cwidth = pixman_fixed_to_int (params[0]); 266 int32_t cwidth = pixman_fixed_to_int (params[0]);
150 int32_t cheight = pixman_fixed_to_int (params[1]); 267 int32_t cheight = pixman_fixed_to_int (params[1]);
151 int32_t i, j, x1, x2, y1, y2; 268 int32_t i, j, x1, x2, y1, y2;
152 pixman_repeat_t repeat_mode = image->common.repeat; 269 pixman_repeat_t repeat_mode = image->common.repeat;
153 int width = image->width; 270 int width = image->width;
154 int height = image->height; 271 int height = image->height;
155 int srtot, sgtot, sbtot, satot; 272 int srtot, sgtot, sbtot, satot;
156 273
157 params += 2; 274 params += 2;
@@ -164,68 +281,59 @@ bits_image_fetch_pixel_convolution (bits @@ -164,68 +281,59 @@ bits_image_fetch_pixel_convolution (bits
164 srtot = sgtot = sbtot = satot = 0; 281 srtot = sgtot = sbtot = satot = 0;
165 282
166 for (i = y1; i < y2; ++i) 283 for (i = y1; i < y2; ++i)
167 { 284 {
168 for (j = x1; j < x2; ++j) 285 for (j = x1; j < x2; ++j)
169 { 286 {
170 int rx = j; 287 int rx = j;
171 int ry = i; 288 int ry = i;
172 289
173 pixman_fixed_t f = *params; 290 pixman_fixed_t f = *params;
174 291
175 if (f) 292 if (f)
176 { 293 {
177 uint32_t pixel; 294 /* Must be big enough to hold a argb_t */
 295 argb_t pixel;
178 296
179 if (repeat_mode != PIXMAN_REPEAT_NONE) 297 if (repeat_mode != PIXMAN_REPEAT_NONE)
180 { 298 {
181 repeat (repeat_mode, &rx, width); 299 repeat (repeat_mode, &rx, width);
182 repeat (repeat_mode, &ry, height); 300 repeat (repeat_mode, &ry, height);
183 301
184 pixel = get_pixel (image, rx, ry, FALSE); 302 get_pixel (image, rx, ry, FALSE, &pixel);
185 } 303 }
186 else 304 else
187 { 305 {
188 pixel = get_pixel (image, rx, ry, TRUE); 306 get_pixel (image, rx, ry, TRUE, &pixel);
189 } 307 }
190 308
191 srtot += (int)RED_8 (pixel) * f; 309 accum (&satot, &srtot, &sgtot, &sbtot, &pixel, f);
192 sgtot += (int)GREEN_8 (pixel) * f; 
193 sbtot += (int)BLUE_8 (pixel) * f; 
194 satot += (int)ALPHA_8 (pixel) * f; 
195 } 310 }
196 311
197 params++; 312 params++;
198 } 313 }
199 } 314 }
200 315
201 satot = (satot + 0x8000) >> 16; 316 reduce (satot, srtot, sgtot, sbtot, out);
202 srtot = (srtot + 0x8000) >> 16; 
203 sgtot = (sgtot + 0x8000) >> 16; 
204 sbtot = (sbtot + 0x8000) >> 16; 
205 
206 satot = CLIP (satot, 0, 0xff); 
207 srtot = CLIP (srtot, 0, 0xff); 
208 sgtot = CLIP (sgtot, 0, 0xff); 
209 sbtot = CLIP (sbtot, 0, 0xff); 
210 
211 return ((satot << 24) | (srtot << 16) | (sgtot << 8) | (sbtot)); 
212} 317}
213 318
214static uint32_t 319static void
215bits_image_fetch_pixel_separable_convolution (bits_image_t *image, 320bits_image_fetch_pixel_separable_convolution (bits_image_t *image,
216 pixman_fixed_t x, 321 pixman_fixed_t x,
217 pixman_fixed_t y, 322 pixman_fixed_t y,
218 get_pixel_t get_pixel) 323 get_pixel_t get_pixel,
 324 void *out,
 325 accumulate_pixel_t accum,
 326 reduce_pixel_t reduce)
219{ 327{
220 pixman_fixed_t *params = image->common.filter_params; 328 pixman_fixed_t *params = image->common.filter_params;
221 pixman_repeat_t repeat_mode = image->common.repeat; 329 pixman_repeat_t repeat_mode = image->common.repeat;
222 int width = image->width; 330 int width = image->width;
223 int height = image->height; 331 int height = image->height;
224 int cwidth = pixman_fixed_to_int (params[0]); 332 int cwidth = pixman_fixed_to_int (params[0]);
225 int cheight = pixman_fixed_to_int (params[1]); 333 int cheight = pixman_fixed_to_int (params[1]);
226 int x_phase_bits = pixman_fixed_to_int (params[2]); 334 int x_phase_bits = pixman_fixed_to_int (params[2]);
227 int y_phase_bits = pixman_fixed_to_int (params[3]); 335 int y_phase_bits = pixman_fixed_to_int (params[3]);
228 int x_phase_shift = 16 - x_phase_bits; 336 int x_phase_shift = 16 - x_phase_bits;
229 int y_phase_shift = 16 - y_phase_bits; 337 int y_phase_shift = 16 - y_phase_bits;
230 int x_off = ((cwidth << 16) - pixman_fixed_1) >> 1; 338 int x_off = ((cwidth << 16) - pixman_fixed_1) >> 1;
231 int y_off = ((cheight << 16) - pixman_fixed_1) >> 1; 339 int y_off = ((cheight << 16) - pixman_fixed_1) >> 1;
@@ -260,113 +368,124 @@ bits_image_fetch_pixel_separable_convolu @@ -260,113 +368,124 @@ bits_image_fetch_pixel_separable_convolu
260 pixman_fixed_48_16_t fy = *y_params++; 368 pixman_fixed_48_16_t fy = *y_params++;
261 pixman_fixed_t *x_params = params + 4 + px * cwidth; 369 pixman_fixed_t *x_params = params + 4 + px * cwidth;
262 370
263 if (fy) 371 if (fy)
264 { 372 {
265 for (j = x1; j < x2; ++j) 373 for (j = x1; j < x2; ++j)
266 { 374 {
267 pixman_fixed_t fx = *x_params++; 375 pixman_fixed_t fx = *x_params++;
268 int rx = j; 376 int rx = j;
269 int ry = i; 377 int ry = i;
270 378
271 if (fx) 379 if (fx)
272 { 380 {
 381 /* Must be big enough to hold a argb_t */
 382 argb_t pixel;
273 pixman_fixed_t f; 383 pixman_fixed_t f;
274 uint32_t pixel; 
275 384
276 if (repeat_mode != PIXMAN_REPEAT_NONE) 385 if (repeat_mode != PIXMAN_REPEAT_NONE)
277 { 386 {
278 repeat (repeat_mode, &rx, width); 387 repeat (repeat_mode, &rx, width);
279 repeat (repeat_mode, &ry, height); 388 repeat (repeat_mode, &ry, height);
280 389
281 pixel = get_pixel (image, rx, ry, FALSE); 390 get_pixel (image, rx, ry, FALSE, &pixel);
282 } 391 }
283 else 392 else
284 { 393 {
285 pixel = get_pixel (image, rx, ry, TRUE); 394 get_pixel (image, rx, ry, TRUE, &pixel);
286 } 395 }
287 396
288 f = (fy * fx + 0x8000) >> 16; 397 f = (fy * fx + 0x8000) >> 16;
289 398
290 srtot += (int)RED_8 (pixel) * f; 399 accum(&satot, &srtot, &sgtot, &sbtot, &pixel, f);
291 sgtot += (int)GREEN_8 (pixel) * f; 
292 sbtot += (int)BLUE_8 (pixel) * f; 
293 satot += (int)ALPHA_8 (pixel) * f; 
294 } 400 }
295 } 401 }
296 } 402 }
297 } 403 }
298 404
299 satot = (satot + 0x8000) >> 16; 
300 srtot = (srtot + 0x8000) >> 16; 
301 sgtot = (sgtot + 0x8000) >> 16; 
302 sbtot = (sbtot + 0x8000) >> 16; 
303 405
304 satot = CLIP (satot, 0, 0xff); 406 reduce(satot, srtot, sgtot, sbtot, out);
305 srtot = CLIP (srtot, 0, 0xff); 
306 sgtot = CLIP (sgtot, 0, 0xff); 
307 sbtot = CLIP (sbtot, 0, 0xff); 
308 
309 return ((satot << 24) | (srtot << 16) | (sgtot << 8) | (sbtot)); 
310} 407}
311 408
312static force_inline uint32_t 409static force_inline void
313bits_image_fetch_pixel_filtered (bits_image_t *image, 410bits_image_fetch_pixel_filtered (bits_image_t *image,
 411 pixman_bool_t wide,
314 pixman_fixed_t x, 412 pixman_fixed_t x,
315 pixman_fixed_t y, 413 pixman_fixed_t y,
316 get_pixel_t get_pixel) 414 get_pixel_t get_pixel,
 415 void *out)
317{ 416{
318 switch (image->common.filter) 417 switch (image->common.filter)
319 { 418 {
320 case PIXMAN_FILTER_NEAREST: 419 case PIXMAN_FILTER_NEAREST:
321 case PIXMAN_FILTER_FAST: 420 case PIXMAN_FILTER_FAST:
322 return bits_image_fetch_pixel_nearest (image, x, y, get_pixel); 421 bits_image_fetch_pixel_nearest (image, x, y, get_pixel, out);
323 break; 422 break;
324 423
325 case PIXMAN_FILTER_BILINEAR: 424 case PIXMAN_FILTER_BILINEAR:
326 case PIXMAN_FILTER_GOOD: 425 case PIXMAN_FILTER_GOOD:
327 case PIXMAN_FILTER_BEST: 426 case PIXMAN_FILTER_BEST:
328 return bits_image_fetch_pixel_bilinear (image, x, y, get_pixel); 427 if (wide)
 428 bits_image_fetch_pixel_bilinear_float (image, x, y, get_pixel, out);
 429 else
 430 bits_image_fetch_pixel_bilinear_32 (image, x, y, get_pixel, out);
329 break; 431 break;
330 432
331 case PIXMAN_FILTER_CONVOLUTION: 433 case PIXMAN_FILTER_CONVOLUTION:
332 return bits_image_fetch_pixel_convolution (image, x, y, get_pixel); 434 if (wide)
 435 bits_image_fetch_pixel_convolution (image, x, y,
 436 get_pixel, out,
 437 accum_float,
 438 reduce_float);
 439 else
 440 bits_image_fetch_pixel_convolution (image, x, y,
 441 get_pixel, out,
 442 accum_32, reduce_32);
333 break; 443 break;
334 444
335 case PIXMAN_FILTER_SEPARABLE_CONVOLUTION: 445 case PIXMAN_FILTER_SEPARABLE_CONVOLUTION:
336 return bits_image_fetch_pixel_separable_convolution (image, x, y, get_pixel); 446 if (wide)
 447 bits_image_fetch_pixel_separable_convolution (image, x, y,
 448 get_pixel, out,
 449 accum_float,
 450 reduce_float);
 451 else
 452 bits_image_fetch_pixel_separable_convolution (image, x, y,
 453 get_pixel, out,
 454 accum_32, reduce_32);
337 break; 455 break;
338 456
339 default: 457 default:
340 break; 458 break;
341 } 459 }
342 
343 return 0; 
344} 460}
345 461
346static uint32_t * 462static uint32_t *
347bits_image_fetch_affine_no_alpha (pixman_iter_t * iter, 463__bits_image_fetch_affine_no_alpha (pixman_iter_t * iter,
348 const uint32_t * mask) 464 pixman_bool_t wide,
 465 const uint32_t * mask)
349{ 466{
350 pixman_image_t *image = iter->image; 467 pixman_image_t *image = iter->image;
351 int offset = iter->x; 468 int offset = iter->x;
352 int line = iter->y++; 469 int line = iter->y++;
353 int width = iter->width; 470 int width = iter->width;
354 uint32_t * buffer = iter->buffer; 471 uint32_t * buffer = iter->buffer;
355 472
356 pixman_fixed_t x, y; 473 pixman_fixed_t x, y;
357 pixman_fixed_t ux, uy; 474 pixman_fixed_t ux, uy;
358 pixman_vector_t v; 475 pixman_vector_t v;
359 int i; 476 int i;
 477 get_pixel_t get_pixel =
 478 wide ? fetch_pixel_no_alpha_float : fetch_pixel_no_alpha_32;
360 479
361 /* reference point is the center of the pixel */ 480 /* reference point is the center of the pixel */
362 v.vector[0] = pixman_int_to_fixed (offset) + pixman_fixed_1 / 2; 481 v.vector[0] = pixman_int_to_fixed (offset) + pixman_fixed_1 / 2;
363 v.vector[1] = pixman_int_to_fixed (line) + pixman_fixed_1 / 2; 482 v.vector[1] = pixman_int_to_fixed (line) + pixman_fixed_1 / 2;
364 v.vector[2] = pixman_fixed_1; 483 v.vector[2] = pixman_fixed_1;
365 484
366 if (image->common.transform) 485 if (image->common.transform)
367 { 486 {
368 if (!pixman_transform_point_3d (image->common.transform, &v)) 487 if (!pixman_transform_point_3d (image->common.transform, &v))
369 return iter->buffer; 488 return iter->buffer;
370 489
371 ux = image->common.transform->matrix[0][0]; 490 ux = image->common.transform->matrix[0][0];
372 uy = image->common.transform->matrix[1][0]; 491 uy = image->common.transform->matrix[1][0];
@@ -374,47 +493,65 @@ bits_image_fetch_affine_no_alpha (pixman @@ -374,47 +493,65 @@ bits_image_fetch_affine_no_alpha (pixman
374 else 493 else
375 { 494 {
376 ux = pixman_fixed_1; 495 ux = pixman_fixed_1;
377 uy = 0; 496 uy = 0;
378 } 497 }
379 498
380 x = v.vector[0]; 499 x = v.vector[0];
381 y = v.vector[1]; 500 y = v.vector[1];
382 501
383 for (i = 0; i < width; ++i) 502 for (i = 0; i < width; ++i)
384 { 503 {
385 if (!mask || mask[i]) 504 if (!mask || mask[i])
386 { 505 {
387 buffer[i] = bits_image_fetch_pixel_filtered ( 506 bits_image_fetch_pixel_filtered (
388 &image->bits, x, y, fetch_pixel_no_alpha); 507 &image->bits, wide, x, y, get_pixel, buffer);
389 } 508 }
390 509
391 x += ux; 510 x += ux;
392 y += uy; 511 y += uy;
 512 buffer += wide ? 4 : 1;
393 } 513 }
394 514
395 return buffer; 515 return iter->buffer;
 516}
 517
 518static uint32_t *
 519bits_image_fetch_affine_no_alpha_32 (pixman_iter_t *iter,
 520 const uint32_t *mask)
 521{
 522 return __bits_image_fetch_affine_no_alpha(iter, FALSE, mask);
 523}
 524
 525static uint32_t *
 526bits_image_fetch_affine_no_alpha_float (pixman_iter_t *iter,
 527 const uint32_t *mask)
 528{
 529 return __bits_image_fetch_affine_no_alpha(iter, TRUE, mask);
396} 530}
397 531
398/* General fetcher */ 532/* General fetcher */
399static force_inline uint32_t 533static force_inline void
400fetch_pixel_general (bits_image_t *image, int x, int y, pixman_bool_t check_bounds) 534fetch_pixel_general_32 (bits_image_t *image,
 535 int x, int y, pixman_bool_t check_bounds,
 536 void *out)
401{ 537{
402 uint32_t pixel; 538 uint32_t pixel, *ret = out;
403 539
404 if (check_bounds && 540 if (check_bounds &&
405 (x < 0 || x >= image->width || y < 0 || y >= image->height)) 541 (x < 0 || x >= image->width || y < 0 || y >= image->height))
406 { 542 {
407 return 0; 543 *ret = 0;
 544 return;
408 } 545 }
409 546
410 pixel = image->fetch_pixel_32 (image, x, y); 547 pixel = image->fetch_pixel_32 (image, x, y);
411 548
412 if (image->common.alpha_map) 549 if (image->common.alpha_map)
413 { 550 {
414 uint32_t pixel_a; 551 uint32_t pixel_a;
415 552
416 x -= image->common.alpha_origin_x; 553 x -= image->common.alpha_origin_x;
417 y -= image->common.alpha_origin_y; 554 y -= image->common.alpha_origin_y;
418 555
419 if (x < 0 || x >= image->common.alpha_map->width || 556 if (x < 0 || x >= image->common.alpha_map->width ||
420 y < 0 || y >= image->common.alpha_map->height) 557 y < 0 || y >= image->common.alpha_map->height)
@@ -423,38 +560,79 @@ fetch_pixel_general (bits_image_t *image @@ -423,38 +560,79 @@ fetch_pixel_general (bits_image_t *image
423 } 560 }
424 else 561 else
425 { 562 {
426 pixel_a = image->common.alpha_map->fetch_pixel_32 ( 563 pixel_a = image->common.alpha_map->fetch_pixel_32 (
427 image->common.alpha_map, x, y); 564 image->common.alpha_map, x, y);
428 565
429 pixel_a = ALPHA_8 (pixel_a); 566 pixel_a = ALPHA_8 (pixel_a);
430 } 567 }
431 568
432 pixel &= 0x00ffffff; 569 pixel &= 0x00ffffff;
433 pixel |= (pixel_a << 24); 570 pixel |= (pixel_a << 24);
434 } 571 }
435 572
436 return pixel; 573 *ret = pixel;
 574}
 575
 576static force_inline void
 577fetch_pixel_general_float (bits_image_t *image,
 578 int x, int y, pixman_bool_t check_bounds,
 579 void *out)
 580{
 581 argb_t *ret = out;
 582
 583 if (check_bounds &&
 584 (x < 0 || x >= image->width || y < 0 || y >= image->height))
 585 {
 586 ret->a = ret->r = ret->g = ret->b = 0;
 587 return;
 588 }
 589
 590 *ret = image->fetch_pixel_float (image, x, y);
 591
 592 if (image->common.alpha_map)
 593 {
 594 x -= image->common.alpha_origin_x;
 595 y -= image->common.alpha_origin_y;
 596
 597 if (x < 0 || x >= image->common.alpha_map->width ||
 598 y < 0 || y >= image->common.alpha_map->height)
 599 {
 600 ret->a = 0.f;
 601 }
 602 else
 603 {
 604 argb_t alpha;
 605
 606 alpha = image->common.alpha_map->fetch_pixel_float (
 607 image->common.alpha_map, x, y);
 608
 609 ret->a = alpha.a;
 610 }
 611 }
437} 612}
438 613
439static uint32_t * 614static uint32_t *
440bits_image_fetch_general (pixman_iter_t *iter, 615__bits_image_fetch_general (pixman_iter_t *iter,
441 const uint32_t *mask) 616 pixman_bool_t wide,
 617 const uint32_t *mask)
442{ 618{
443 pixman_image_t *image = iter->image; 619 pixman_image_t *image = iter->image;
444 int offset = iter->x; 620 int offset = iter->x;
445 int line = iter->y++; 621 int line = iter->y++;
446 int width = iter->width; 622 int width = iter->width;
447 uint32_t * buffer = iter->buffer; 623 uint32_t * buffer = iter->buffer;
 624 get_pixel_t get_pixel =
 625 wide ? fetch_pixel_general_float : fetch_pixel_general_32;
448 626
449 pixman_fixed_t x, y, w; 627 pixman_fixed_t x, y, w;
450 pixman_fixed_t ux, uy, uw; 628 pixman_fixed_t ux, uy, uw;
451 pixman_vector_t v; 629 pixman_vector_t v;
452 int i; 630 int i;
453 631
454 /* reference point is the center of the pixel */ 632 /* reference point is the center of the pixel */
455 v.vector[0] = pixman_int_to_fixed (offset) + pixman_fixed_1 / 2; 633 v.vector[0] = pixman_int_to_fixed (offset) + pixman_fixed_1 / 2;
456 v.vector[1] = pixman_int_to_fixed (line) + pixman_fixed_1 / 2; 634 v.vector[1] = pixman_int_to_fixed (line) + pixman_fixed_1 / 2;
457 v.vector[2] = pixman_fixed_1; 635 v.vector[2] = pixman_fixed_1;
458 636
459 if (image->common.transform) 637 if (image->common.transform)
460 { 638 {
@@ -483,36 +661,51 @@ bits_image_fetch_general (pixman_iter_t  @@ -483,36 +661,51 @@ bits_image_fetch_general (pixman_iter_t
483 if (!mask || mask[i]) 661 if (!mask || mask[i])
484 { 662 {
485 if (w != 0) 663 if (w != 0)
486 { 664 {
487 x0 = ((pixman_fixed_48_16_t)x << 16) / w; 665 x0 = ((pixman_fixed_48_16_t)x << 16) / w;
488 y0 = ((pixman_fixed_48_16_t)y << 16) / w; 666 y0 = ((pixman_fixed_48_16_t)y << 16) / w;
489 } 667 }
490 else 668 else
491 { 669 {
492 x0 = 0; 670 x0 = 0;
493 y0 = 0; 671 y0 = 0;
494 } 672 }
495 673
496 buffer[i] = bits_image_fetch_pixel_filtered ( 674 bits_image_fetch_pixel_filtered (
497 &image->bits, x0, y0, fetch_pixel_general); 675 &image->bits, wide, x0, y0, get_pixel, buffer);
498 } 676 }
499 677
500 x += ux; 678 x += ux;
501 y += uy; 679 y += uy;
502 w += uw; 680 w += uw;
 681 buffer += wide ? 4 : 1;
503 } 682 }
504 683
505 return buffer; 684 return iter->buffer;
 685}
 686
 687static uint32_t *
 688bits_image_fetch_general_32 (pixman_iter_t *iter,
 689 const uint32_t *mask)
 690{
 691 return __bits_image_fetch_general(iter, FALSE, mask);
 692}
 693
 694static uint32_t *
 695bits_image_fetch_general_float (pixman_iter_t *iter,
 696 const uint32_t *mask)
 697{
 698 return __bits_image_fetch_general(iter, TRUE, mask);
506} 699}
507 700
508static void 701static void
509replicate_pixel_32 (bits_image_t * bits, 702replicate_pixel_32 (bits_image_t * bits,
510 int x, 703 int x,
511 int y, 704 int y,
512 int width, 705 int width,
513 uint32_t * buffer) 706 uint32_t * buffer)
514{ 707{
515 uint32_t color; 708 uint32_t color;
516 uint32_t *end; 709 uint32_t *end;
517 710
518 color = bits->fetch_pixel_32 (bits, x, y); 711 color = bits->fetch_pixel_32 (bits, x, y);
@@ -693,35 +886,35 @@ static const fetcher_info_t fetcher_info @@ -693,35 +886,35 @@ static const fetcher_info_t fetcher_info
693 { PIXMAN_any, 886 { PIXMAN_any,
694 (FAST_PATH_NO_ALPHA_MAP | 887 (FAST_PATH_NO_ALPHA_MAP |
695 FAST_PATH_ID_TRANSFORM | 888 FAST_PATH_ID_TRANSFORM |
696 FAST_PATH_NO_CONVOLUTION_FILTER | 889 FAST_PATH_NO_CONVOLUTION_FILTER |
697 FAST_PATH_NO_PAD_REPEAT | 890 FAST_PATH_NO_PAD_REPEAT |
698 FAST_PATH_NO_REFLECT_REPEAT), 891 FAST_PATH_NO_REFLECT_REPEAT),
699 bits_image_fetch_untransformed_32, 892 bits_image_fetch_untransformed_32,
700 bits_image_fetch_untransformed_float 893 bits_image_fetch_untransformed_float
701 }, 894 },
702 895
703 /* Affine, no alpha */ 896 /* Affine, no alpha */
704 { PIXMAN_any, 897 { PIXMAN_any,
705 (FAST_PATH_NO_ALPHA_MAP | FAST_PATH_HAS_TRANSFORM | FAST_PATH_AFFINE_TRANSFORM), 898 (FAST_PATH_NO_ALPHA_MAP | FAST_PATH_HAS_TRANSFORM | FAST_PATH_AFFINE_TRANSFORM),
706 bits_image_fetch_affine_no_alpha, 899 bits_image_fetch_affine_no_alpha_32,
707 _pixman_image_get_scanline_generic_float 900 bits_image_fetch_affine_no_alpha_float,
708 }, 901 },
709 902
710 /* General */ 903 /* General */
711 { PIXMAN_any, 904 { PIXMAN_any,
712 0, 905 0,
713 bits_image_fetch_general, 906 bits_image_fetch_general_32,
714 _pixman_image_get_scanline_generic_float 907 bits_image_fetch_general_float,
715 }, 908 },
716 909
717 { PIXMAN_null }, 910 { PIXMAN_null },
718}; 911};
719 912
720static void 913static void
721bits_image_property_changed (pixman_image_t *image) 914bits_image_property_changed (pixman_image_t *image)
722{ 915{
723 _pixman_bits_image_setup_accessors (&image->bits); 916 _pixman_bits_image_setup_accessors (&image->bits);
724} 917}
725 918
726void 919void
727_pixman_bits_image_src_iter_init (pixman_image_t *image, pixman_iter_t *iter) 920_pixman_bits_image_src_iter_init (pixman_image_t *image, pixman_iter_t *iter)
@@ -731,27 +924,26 @@ _pixman_bits_image_src_iter_init (pixman @@ -731,27 +924,26 @@ _pixman_bits_image_src_iter_init (pixman
731 const fetcher_info_t *info; 924 const fetcher_info_t *info;
732 925
733 for (info = fetcher_info; info->format != PIXMAN_null; ++info) 926 for (info = fetcher_info; info->format != PIXMAN_null; ++info)
734 { 927 {
735 if ((info->format == format || info->format == PIXMAN_any) && 928 if ((info->format == format || info->format == PIXMAN_any) &&
736 (info->flags & flags) == info->flags) 929 (info->flags & flags) == info->flags)
737 { 930 {
738 if (iter->iter_flags & ITER_NARROW) 931 if (iter->iter_flags & ITER_NARROW)
739 { 932 {
740 iter->get_scanline = info->get_scanline_32; 933 iter->get_scanline = info->get_scanline_32;
741 } 934 }
742 else 935 else
743 { 936 {
744 iter->data = info->get_scanline_32; 
745 iter->get_scanline = info->get_scanline_float; 937 iter->get_scanline = info->get_scanline_float;
746 } 938 }
747 return; 939 return;
748 } 940 }
749 } 941 }
750 942
751 /* Just in case we somehow didn't find a scanline function */ 943 /* Just in case we somehow didn't find a scanline function */
752 iter->get_scanline = _pixman_iter_get_scanline_noop; 944 iter->get_scanline = _pixman_iter_get_scanline_noop;
753} 945}
754 946
755static uint32_t * 947static uint32_t *
756dest_get_scanline_narrow (pixman_iter_t *iter, const uint32_t *mask) 948dest_get_scanline_narrow (pixman_iter_t *iter, const uint32_t *mask)
757{ 949{

cvs diff -r1.4 -r1.5 xsrc/external/mit/pixman/dist/pixman/pixman-inlines.h (expand / switch to unified diff)

--- xsrc/external/mit/pixman/dist/pixman/pixman-inlines.h 2017/03/04 23:22:48 1.4
+++ xsrc/external/mit/pixman/dist/pixman/pixman-inlines.h 2019/03/04 08:36:42 1.5
@@ -212,26 +212,51 @@ bilinear_interpolation (uint32_t tl, uin @@ -212,26 +212,51 @@ bilinear_interpolation (uint32_t tl, uin
212 r |= f & 0x00ff0000; 212 r |= f & 0x00ff0000;
213 213
214 /* Alpha */ 214 /* Alpha */
215 f = (tl & 0x0000ff00) * distixiy + (tr & 0x0000ff00) * distxiy 215 f = (tl & 0x0000ff00) * distixiy + (tr & 0x0000ff00) * distxiy
216 + (bl & 0x0000ff00) * distixy + (br & 0x0000ff00) * distxy; 216 + (bl & 0x0000ff00) * distixy + (br & 0x0000ff00) * distxy;
217 r |= f & 0xff000000; 217 r |= f & 0xff000000;
218 218
219 return r; 219 return r;
220} 220}
221 221
222#endif 222#endif
223#endif // BILINEAR_INTERPOLATION_BITS <= 4 223#endif // BILINEAR_INTERPOLATION_BITS <= 4
224 224
 225static force_inline argb_t
 226bilinear_interpolation_float (argb_t tl, argb_t tr,
 227 argb_t bl, argb_t br,
 228 float distx, float disty)
 229{
 230 float distxy, distxiy, distixy, distixiy;
 231 argb_t r;
 232
 233 distxy = distx * disty;
 234 distxiy = distx - (1.f - distxy);
 235 distixy = (1.f - distx) * disty;
 236 distixiy = (1.f - distx) * (1.f - disty);
 237
 238 r.a = tl.a * distixiy + tr.a * distxiy +
 239 bl.a * distixy + br.a * distxy;
 240 r.r = tl.r * distixiy + tr.r * distxiy +
 241 bl.r * distixy + br.r * distxy;
 242 r.g = tl.g * distixiy + tr.g * distxiy +
 243 bl.g * distixy + br.g * distxy;
 244 r.b = tl.b * distixiy + tr.b * distxiy +
 245 bl.b * distixy + br.b * distxy;
 246
 247 return r;
 248}
 249
225/* 250/*
226 * For each scanline fetched from source image with PAD repeat: 251 * For each scanline fetched from source image with PAD repeat:
227 * - calculate how many pixels need to be padded on the left side 252 * - calculate how many pixels need to be padded on the left side
228 * - calculate how many pixels need to be padded on the right side 253 * - calculate how many pixels need to be padded on the right side
229 * - update width to only count pixels which are fetched from the image 254 * - update width to only count pixels which are fetched from the image
230 * All this information is returned via 'width', 'left_pad', 'right_pad' 255 * All this information is returned via 'width', 'left_pad', 'right_pad'
231 * arguments. The code is assuming that 'unit_x' is positive. 256 * arguments. The code is assuming that 'unit_x' is positive.
232 * 257 *
233 * Note: 64-bit math is used in order to avoid potential overflows, which 258 * Note: 64-bit math is used in order to avoid potential overflows, which
234 * is probably excessive in many cases. This particular function 259 * is probably excessive in many cases. This particular function
235 * may need its own correctness test and performance tuning. 260 * may need its own correctness test and performance tuning.
236 */ 261 */
237static force_inline void 262static force_inline void

cvs diff -r1.7 -r1.8 xsrc/external/mit/pixman/dist/pixman/pixman-private.h (expand / switch to unified diff)

--- xsrc/external/mit/pixman/dist/pixman/pixman-private.h 2018/12/30 08:59:39 1.7
+++ xsrc/external/mit/pixman/dist/pixman/pixman-private.h 2019/03/04 08:36:42 1.8
@@ -353,29 +353,58 @@ typedef struct @@ -353,29 +353,58 @@ typedef struct
353 353
354 pixman_bool_t need_reset; 354 pixman_bool_t need_reset;
355} pixman_gradient_walker_t; 355} pixman_gradient_walker_t;
356 356
357void 357void
358_pixman_gradient_walker_init (pixman_gradient_walker_t *walker, 358_pixman_gradient_walker_init (pixman_gradient_walker_t *walker,
359 gradient_t * gradient, 359 gradient_t * gradient,
360 pixman_repeat_t repeat); 360 pixman_repeat_t repeat);
361 361
362void 362void
363_pixman_gradient_walker_reset (pixman_gradient_walker_t *walker, 363_pixman_gradient_walker_reset (pixman_gradient_walker_t *walker,
364 pixman_fixed_48_16_t pos); 364 pixman_fixed_48_16_t pos);
365 365
366uint32_t 366typedef void (*pixman_gradient_walker_write_t) (
367_pixman_gradient_walker_pixel (pixman_gradient_walker_t *walker, 367 pixman_gradient_walker_t *walker,
368 pixman_fixed_48_16_t x); 368 pixman_fixed_48_16_t x,
 369 uint32_t *buffer);
 370
 371void
 372_pixman_gradient_walker_write_narrow(pixman_gradient_walker_t *walker,
 373 pixman_fixed_48_16_t x,
 374 uint32_t *buffer);
 375
 376void
 377_pixman_gradient_walker_write_wide(pixman_gradient_walker_t *walker,
 378 pixman_fixed_48_16_t x,
 379 uint32_t *buffer);
 380
 381typedef void (*pixman_gradient_walker_fill_t) (
 382 pixman_gradient_walker_t *walker,
 383 pixman_fixed_48_16_t x,
 384 uint32_t *buffer,
 385 uint32_t *end);
 386
 387void
 388_pixman_gradient_walker_fill_narrow(pixman_gradient_walker_t *walker,
 389 pixman_fixed_48_16_t x,
 390 uint32_t *buffer,
 391 uint32_t *end);
 392
 393void
 394_pixman_gradient_walker_fill_wide(pixman_gradient_walker_t *walker,
 395 pixman_fixed_48_16_t x,
 396 uint32_t *buffer,
 397 uint32_t *end);
369 398
370/* 399/*
371 * Edges 400 * Edges
372 */ 401 */
373 402
374#define MAX_ALPHA(n) ((1 << (n)) - 1) 403#define MAX_ALPHA(n) ((1 << (n)) - 1)
375#define N_Y_FRAC(n) ((n) == 1 ? 1 : (1 << ((n) / 2)) - 1) 404#define N_Y_FRAC(n) ((n) == 1 ? 1 : (1 << ((n) / 2)) - 1)
376#define N_X_FRAC(n) ((n) == 1 ? 1 : (1 << ((n) / 2)) + 1) 405#define N_X_FRAC(n) ((n) == 1 ? 1 : (1 << ((n) / 2)) + 1)
377 406
378#define STEP_Y_SMALL(n) (pixman_fixed_1 / N_Y_FRAC (n)) 407#define STEP_Y_SMALL(n) (pixman_fixed_1 / N_Y_FRAC (n))
379#define STEP_Y_BIG(n) (pixman_fixed_1 - (N_Y_FRAC (n) - 1) * STEP_Y_SMALL (n)) 408#define STEP_Y_BIG(n) (pixman_fixed_1 - (N_Y_FRAC (n) - 1) * STEP_Y_SMALL (n))
380 409
381#define Y_FRAC_FIRST(n) (STEP_Y_BIG (n) / 2) 410#define Y_FRAC_FIRST(n) (STEP_Y_BIG (n) / 2)

cvs diff -r1.21 -r1.22 xsrc/external/mit/pixman/include/config.h (expand / switch to unified diff)

--- xsrc/external/mit/pixman/include/config.h 2018/12/30 08:59:39 1.21
+++ xsrc/external/mit/pixman/include/config.h 2019/03/04 08:36:42 1.22
@@ -82,39 +82,39 @@ @@ -82,39 +82,39 @@
82/* Define to the sub-directory where libtool stores uninstalled libraries. */ 82/* Define to the sub-directory where libtool stores uninstalled libraries. */
83#undef LT_OBJDIR 83#undef LT_OBJDIR
84 84
85/* Name of package */ 85/* Name of package */
86#define PACKAGE "pixman" 86#define PACKAGE "pixman"
87 87
88/* Define to the address where bug reports for this package should be sent. */ 88/* Define to the address where bug reports for this package should be sent. */
89#define PACKAGE_BUGREPORT ""pixman@lists.freedesktop.org"" 89#define PACKAGE_BUGREPORT ""pixman@lists.freedesktop.org""
90 90
91/* Define to the full name of this package. */ 91/* Define to the full name of this package. */
92#define PACKAGE_NAME "pixman" 92#define PACKAGE_NAME "pixman"
93 93
94/* Define to the full name and version of this package. */ 94/* Define to the full name and version of this package. */
95#define PACKAGE_STRING "pixman 0.34.0" 95#define PACKAGE_STRING "pixman 0.38.0"
96 96
97/* Define to the one symbol short name of this package. */ 97/* Define to the one symbol short name of this package. */
98#define PACKAGE_TARNAME "pixman" 98#define PACKAGE_TARNAME "pixman"
99 99
100/* Define to the home page for this package. */ 100/* Define to the home page for this package. */
101#undef PACKAGE_URL 101#undef PACKAGE_URL
102 102
103/* Define to the home page for this package. */ 103/* Define to the home page for this package. */
104#define PACKAGE_URL "" 104#define PACKAGE_URL ""
105 105
106/* Define to the version of this package. */ 106/* Define to the version of this package. */
107#define PACKAGE_VERSION "0.34.0" 107#define PACKAGE_VERSION "0.38.0"
108 108
109/* enable output that can be piped to gnuplot */ 109/* enable output that can be piped to gnuplot */
110/* #undef PIXMAN_GNUPLOT */ 110/* #undef PIXMAN_GNUPLOT */
111 111
112/* enable TIMER_BEGIN/TIMER_END macros */ 112/* enable TIMER_BEGIN/TIMER_END macros */
113/* #undef PIXMAN_TIMERS */ 113/* #undef PIXMAN_TIMERS */
114 114
115#if 0 115#if 0
116/* The size of `long', as computed by sizeof. */ 116/* The size of `long', as computed by sizeof. */
117#define SIZEOF_LONG 8 117#define SIZEOF_LONG 8
118#endif 118#endif
119 119
120/* Define to 1 if you have the ANSI C header files. */ 120/* Define to 1 if you have the ANSI C header files. */
@@ -150,27 +150,27 @@ @@ -150,27 +150,27 @@
150/* use SSE2 compiler intrinsics */ 150/* use SSE2 compiler intrinsics */
151/* #undef USE_SSE2 */ 151/* #undef USE_SSE2 */
152 152
153/* use SSSE3 compiler intrinsics */ 153/* use SSSE3 compiler intrinsics */
154/* #undef USE_SSSE3 */ 154/* #undef USE_SSSE3 */
155 155
156/* use VMX compiler intrinsics */ 156/* use VMX compiler intrinsics */
157/* #undef USE_VMX */ 157/* #undef USE_VMX */
158 158
159/* use x86 MMX compiler intrinsics */ 159/* use x86 MMX compiler intrinsics */
160/* #undef USE_X86_MMX */ 160/* #undef USE_X86_MMX */
161 161
162/* Version number of package */ 162/* Version number of package */
163#define VERSION "0.34.0" 163#define VERSION "0.38.0"
164 164
165/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most 165/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
166 significant byte first (like Motorola and SPARC, unlike Intel). */ 166 significant byte first (like Motorola and SPARC, unlike Intel). */
167#include <sys/endian.h> 167#include <sys/endian.h>
168#if _BYTE_ORDER == _BIG_ENDIAN 168#if _BYTE_ORDER == _BIG_ENDIAN
169#define WORDS_BIGENDIAN 1 169#define WORDS_BIGENDIAN 1
170#endif 170#endif
171 171
172/* Define to `__inline__' or `__inline' if that's what the C compiler 172/* Define to `__inline__' or `__inline' if that's what the C compiler
173 calls it, or to nothing if 'inline' is not supported under any name. */ 173 calls it, or to nothing if 'inline' is not supported under any name. */
174#ifndef __cplusplus 174#ifndef __cplusplus
175/* #undef inline */ 175/* #undef inline */
176#endif 176#endif