~ubuntu-branches/ubuntu/trusty/vips/trusty-proposed

« back to all changes in this revision

Viewing changes to libvips/arithmetic/unaryconst.c

  • Committer: Package Import Robot
  • Author(s): Jay Berkenbilt
  • Date: 2014-03-29 12:29:29 UTC
  • mfrom: (1.1.21) (30.1.16 sid)
  • Revision ID: package-import@ubuntu.com-20140329122929-fvxnaann32ex0gzk
Tags: 7.38.5-2
Enable dh-autoreconf. (Closes: #742872)

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
/* Cast a vector of double to a vector of TYPE, clipping to a range.
53
53
 */
54
54
#define CAST_CLIP( TYPE, N, X ) { \
55
 
        TYPE *tq = (TYPE *) q; \
 
55
        TYPE * restrict tq = (TYPE *) q; \
56
56
        \
57
57
        for( i = 0; i < m; i++ ) { \
58
58
                double v = p[VIPS_MIN( n - 1, i )]; \
64
64
/* Cast a vector of double to a vector of TYPE.
65
65
 */
66
66
#define CAST( TYPE ) { \
67
 
        TYPE *tq = (TYPE *) q; \
 
67
        TYPE * restrict tq = (TYPE *) q; \
68
68
        \
69
69
        for( i = 0; i < m; i++ ) \
70
70
                tq[i] = (TYPE) p[VIPS_MIN( n - 1, i )]; \
73
73
/* Cast a vector of double to a complex vector of TYPE.
74
74
 */
75
75
#define CASTC( TYPE ) { \
76
 
        TYPE *tq = (TYPE *) q; \
 
76
        TYPE * restrict tq = (TYPE *) q; \
77
77
        \
78
78
        for( i = 0; i < m; i++ ) { \
79
79
                tq[0] = (TYPE) p[VIPS_MIN( n - 1, i )]; \
86
86
/* Cast a n-band vector of double to a m-band vector in another format.
87
87
 */
88
88
static VipsPel *
89
 
make_pixel( VipsObject *obj, int m, VipsBandFmt fmt, int n, double *p )
 
89
make_pixel( VipsObject *obj, 
 
90
        int m, VipsBandFmt fmt, int n, double * restrict p )
90
91
{
91
92
        VipsPel *q;
92
93
        int i;