Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

bitmap_remap(9) [centos man page]

BITMAP_REMAP(9) 					  Basic Kernel Library Functions					   BITMAP_REMAP(9)

NAME
bitmap_remap - Apply map defined by a pair of bitmaps to another bitmap SYNOPSIS
void bitmap_remap(unsigned long * dst, const unsigned long * src, const unsigned long * old, const unsigned long * new, int bits); ARGUMENTS
dst remapped result src subset to be remapped old defines domain of map new defines range of map bits number of bits in each of these bitmaps DESCRIPTION
Let old and new define a mapping of bit positions, such that whatever position is held by the n-th set bit in old is mapped to the n-th set bit in new. In the more general case, allowing for the possibility that the weight 'w' of new is less than the weight of old, map the position of the n-th set bit in old to the position of the m-th set bit in new, where m == n % w. If either of the old and new bitmaps are empty, or if src and dst point to the same location, then this routine copies src to dst. The positions of unset bits in old are mapped to themselves (the identify map). Apply the above specified mapping to src, placing the result in dst, clearing any bits previously set in dst. For example, lets say that old has bits 4 through 7 set, and new has bits 12 through 15 set. This defines the mapping of bit position 4 to 12, 5 to 13, 6 to 14 and 7 to 15, and of all other bit positions unchanged. So if say src comes into this routine with bits 1, 5 and 7 set, then dst should leave with bits 1, 13 and 15 set. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 BITMAP_REMAP(9)

Check Out this Related Man Page

mlib_ImageDivAlpha(3MLIB)				    mediaLib Library Functions					 mlib_ImageDivAlpha(3MLIB)

NAME
mlib_ImageDivAlpha - alpha channel division SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> mlib_status mlib_ImageDivAlpha(mlib_image *dst, const mlib_image *src, mlib_s32 cmask); DESCRIPTION
The mlib_ImageDivAlpha() function divides color channels by the alpha channel on a pixel-by-pixel basis. For the MLIB_BYTE image, it uses the following equation: dst[x][y][c] = src[x][y][c] / (src[x][y][a] * 2**(-8)) For the MLIB_SHORT image, it uses the following equation: dst[x][y][c] = src[x][y][c] / (src[x][y][a] * 2**(-15)) For the MLIB_USHORT image, it uses the following equation: dst[x][y][c] = src[x][y][c] / (src[x][y][a] * 2**(-16)) For the MLIB_INT image, it uses the following equation: dst[x][y][c] = src[x][y][c] / (src[x][y][a] * 2**(-31)) where c and a are the indices for the color channels and the alpha channel, respectively, so c != a. In the case of src[x][y][a] = 0, dst[x][y][c] = 0 if src[x][y][c] = 0 dst[x][y][c] = DATA_TYPE_MAX if src[x][y][c] > 0 dst[x][y][c] = DATA_TYPE_MIN if src[x][y][c] < 0 where DATA_TYPE is MLIB_U8, MLIB_S16, MLIB_U16, or MLIB_S32 for an image of type MLIB_BYTE, MLIB_SHORT, MLIB_USHORT, or MLIB_INT, respec- tively. PARAMETERS
The function takes the following arguments: dst Pointer to destination image. src Pointer to source image. cmask Channel mask to indicate the alpha channel. Each bit of the mask represents a channel in the image. The channel correspond- ing to the 1 bit of cmask is the alpha channel. RETURN VALUES
The function returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
mlib_ImageDivAlpha_Inp(3MLIB), mlib_ImageDivAlpha_Fp(3MLIB), mlib_ImageDivAlpha_Fp_Inp(3MLIB), attributes(5) SunOS 5.10 10 Nov 2004 mlib_ImageDivAlpha(3MLIB)
Man Page