"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libvips/include/vips/region.h" between
vips-8.10.6.tar.gz and vips-8.11.0.tar.gz

About: VIPS is a free image processing system (see also the GUI nip2).

region.h  (vips-8.10.6):region.h  (vips-8.11.0)
skipping to change at line 168 skipping to change at line 168
/* Use this to count pixels passing through key points. Handy for spotting bad /* Use this to count pixels passing through key points. Handy for spotting bad
* overcomputation. * overcomputation.
*/ */
#ifdef DEBUG_LEAK #ifdef DEBUG_LEAK
#define VIPS_COUNT_PIXELS( R, N ) vips__region_count_pixels( R, N ) #define VIPS_COUNT_PIXELS( R, N ) vips__region_count_pixels( R, N )
#else /*!DEBUG_LEAK*/ #else /*!DEBUG_LEAK*/
#define VIPS_COUNT_PIXELS( R, N ) #define VIPS_COUNT_PIXELS( R, N )
#endif /*DEBUG_LEAK*/ #endif /*DEBUG_LEAK*/
/* Macros on VipsRegion.
* VIPS_REGION_LSKIP() add to move down line
* VIPS_REGION_N_ELEMENTS() number of elements across region
* VIPS_REGION_SIZEOF_LINE() sizeof width of region
* VIPS_REGION_ADDR() address of pixel in region
*/
#define VIPS_REGION_LSKIP( R ) \ #define VIPS_REGION_LSKIP( R ) \
((size_t)((R)->bpl)) ((size_t)((R)->bpl))
#define VIPS_REGION_N_ELEMENTS( R ) \ #define VIPS_REGION_N_ELEMENTS( R ) \
((size_t)((R)->valid.width * (R)->im->Bands)) ((size_t)((R)->valid.width * (R)->im->Bands))
#define VIPS_REGION_SIZEOF_ELEMENT( R ) \
(VIPS_IMAGE_SIZEOF_ELEMENT( (R)->im ))
#define VIPS_REGION_SIZEOF_PEL( R ) \
(VIPS_IMAGE_SIZEOF_PEL( (R)->im ))
#define VIPS_REGION_SIZEOF_LINE( R ) \ #define VIPS_REGION_SIZEOF_LINE( R ) \
((size_t)((R)->valid.width * VIPS_IMAGE_SIZEOF_PEL( (R)->im) )) ((size_t)((R)->valid.width * VIPS_REGION_SIZEOF_PEL( R )))
/* If DEBUG is defined, add bounds checking. /* If DEBUG is defined, add bounds checking.
*/ */
#ifdef DEBUG #ifdef DEBUG
#define VIPS_REGION_ADDR( R, X, Y ) \ #define VIPS_REGION_ADDR( R, X, Y ) \
( (vips_rect_includespoint( &(R)->valid, (X), (Y) ))? \ ( (vips_rect_includespoint( &(R)->valid, (X), (Y) ))? \
((R)->data + ((Y) - (R)->valid.top) * VIPS_REGION_LSKIP(R) + \ ((R)->data + ((Y) - (R)->valid.top) * VIPS_REGION_LSKIP(R) + \
((X) - (R)->valid.left) * VIPS_IMAGE_SIZEOF_PEL((R)->im)): \ ((X) - (R)->valid.left) * VIPS_REGION_SIZEOF_PEL( R )): \
(fprintf( stderr, \ (fprintf( stderr, \
"VIPS_REGION_ADDR: point out of bounds, " \ "VIPS_REGION_ADDR: point out of bounds, " \
"file \"%s\", line %d\n" \ "file \"%s\", line %d\n" \
"(point x=%d, y=%d\n" \ "(point x=%d, y=%d\n" \
" should have been within VipsRect left=%d, top=%d, " \ " should have been within VipsRect left=%d, top=%d, " \
"width=%d, height=%d)\n", \ "width=%d, height=%d)\n", \
__FILE__, __LINE__, \ __FILE__, __LINE__, \
(X), (Y), \ (X), (Y), \
(R)->valid.left, \ (R)->valid.left, \
(R)->valid.top, \ (R)->valid.top, \
(R)->valid.width, \ (R)->valid.width, \
(R)->valid.height ), abort(), (VipsPel *) NULL) \ (R)->valid.height ), abort(), (VipsPel *) NULL) \
) )
#else /*DEBUG*/ #else /*DEBUG*/
#define VIPS_REGION_ADDR( R, X, Y ) \ #define VIPS_REGION_ADDR( R, X, Y ) \
((R)->data + \ ((R)->data + \
((Y)-(R)->valid.top) * VIPS_REGION_LSKIP( R ) + \ ((Y)-(R)->valid.top) * VIPS_REGION_LSKIP( R ) + \
((X)-(R)->valid.left) * VIPS_IMAGE_SIZEOF_PEL( (R)->im )) ((X)-(R)->valid.left) * VIPS_REGION_SIZEOF_PEL( R ))
#endif /*DEBUG*/ #endif /*DEBUG*/
#define VIPS_REGION_ADDR_TOPLEFT( R ) ((R)->data) #define VIPS_REGION_ADDR_TOPLEFT( R ) ((R)->data)
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /*__cplusplus*/ #endif /*__cplusplus*/
#endif /*VIPS_REGION_H*/ #endif /*VIPS_REGION_H*/
 End of changes. 5 change blocks. 
9 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)