Liboil Reference Manual | ||||
---|---|---|---|---|
Top | Description |
void oil_argb_paint_u8 (uint8_t *i_4xn, const uint8_t *s1_4, const uint8_t *s2_n, int n); void oil_ayuv2argb_u8 (uint8_t *d_4xn, const uint8_t *s_4xn, int n); void oil_ayuv2uyvy (uint32_t *d_n, const uint32_t *s_n, int n); void oil_ayuv2yuyv (uint32_t *d_n, const uint32_t *s_n, int n); void oil_ayuv2yvyu (uint32_t *d_n, const uint32_t *s_n, int n); void oil_composite_add_argb (uint32_t *i_n, const uint32_t *s1_n, int n); void oil_composite_add_argb_const_src (uint32_t *i_n, const uint32_t *s1_1, int n); void oil_composite_in_argb (uint32_t *d_n, const uint32_t *s1_n, const uint8_t *s2_n, int n); void oil_composite_in_argb_const_mask (uint32_t *d_n, const uint32_t *s1_n, const uint8_t *s2_1, int n); void oil_composite_in_argb_const_src (uint32_t *d_n, const uint32_t *s1_1, const uint8_t *s2_n, int n); void oil_composite_in_over_argb (uint32_t *i_n, const uint32_t *s1_n, const uint8_t *s2_n, int n); void oil_composite_in_over_argb_const_mask (uint32_t *i_n, const uint32_t *s1_n, const uint8_t *s2_1, int n); void oil_composite_in_over_argb_const_src (uint32_t *i_n, const uint32_t *s1_1, const uint8_t *s2_n, int n); void oil_composite_over_argb (uint32_t *i_n, const uint32_t *s1_n, int n); void oil_composite_over_argb_const_src (uint32_t *i_n, const uint32_t *s1_1, int n); void oil_merge_linear_argb (uint32_t *d_n, const uint32_t *s_n, const uint32_t *s2_n, const uint32_t *s3_1, int n); void oil_resample_linear_argb (uint32_t *d_n, const uint32_t *s_2xn, int n, uint32_t *i_2); void oil_resample_linear_u8 (uint8_t *d_n, const uint8_t *s_2xn, int n, uint32_t *i_2); void oil_rgb2bgr (uint8_t *d_3xn, const uint8_t *s_3xn, int n); void oil_rgb2rgba (uint8_t *d_4xn, const uint8_t *s_3xn, int n); void oil_yuv2rgbx_sub2_u8 (uint8_t *d_4xn, const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, int n); void oil_yuv2rgbx_sub4_u8 (uint8_t *d_4xn, const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, int n); void oil_yuv2rgbx_u8 (uint8_t *d_4xn, const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, int n); void oil_uyvy2ayuv (uint32_t *d_n, const uint32_t *s_n, int n); void oil_yuyv2ayuv (uint32_t *d_n, const uint32_t *s_n, int n); void oil_yvyu2ayuv (uint32_t *d_n, const uint32_t *s_n, int n);
Pixels are 4-element arrays of type uint8_t. The elements, in memory order, represent the alpha, red, green, and blue components respectively. The color components are premultiplied with the alpha component. Liboil functions represent pixels as the type uint32_t.
The compositing operators IN, OVER, and ADD are defined the same as cairo.
void oil_argb_paint_u8 (uint8_t *i_4xn, const uint8_t *s1_4, const uint8_t *s2_n, int n);
Composites source color onto in-place array according to the alpha array.
Deprecated.
|
array |
|
source color |
|
source alpha array |
|
number of elements |
void oil_ayuv2argb_u8 (uint8_t *d_4xn, const uint8_t *s_4xn, int n);
Converts AYUV pixels to ARGB pixels. AYUV pixels are in the JPEG colorspace. Note that this function doesn't follow normal liboil pixel conventions.
(This function should be replaced by one that handles other conversion factors.)
|
|
|
|
|
void oil_ayuv2uyvy (uint32_t *d_n, const uint32_t *s_n, int n);
Converts pixels in AYUV format to UYVY. Note that only approximately half of the destination array is written. Alpha values are ignored.
|
|
|
n: |
|
void oil_ayuv2yuyv (uint32_t *d_n, const uint32_t *s_n, int n);
Converts pixels in AYUV format to YUYV. Note that only approximately half of the destination array is written. Alpha values are ignored.
|
|
|
n: |
|
void oil_ayuv2yvyu (uint32_t *d_n, const uint32_t *s_n, int n);
Converts pixels in AYUV format to YVYU. Note that only approximately half of the destination array is written. Alpha values are ignored.
|
|
|
n: |
|
void oil_composite_add_argb (uint32_t *i_n, const uint32_t *s1_n, int n);
Performs the compositing operation DEST = SRC ADD DEST.
|
DEST |
|
SRC |
|
number of elements |
void oil_composite_add_argb_const_src (uint32_t *i_n, const uint32_t *s1_1, int n);
Performs the compositing operation DEST = SRC ADD DEST, for a constant SRC.
|
DEST |
|
SRC |
|
number of elements |
void oil_composite_in_argb (uint32_t *d_n, const uint32_t *s1_n, const uint8_t *s2_n, int n);
Performs the compositing operation DEST = SRC IN MASK.
|
DEST |
|
SRC |
|
MASK |
|
number of elements |
void oil_composite_in_argb_const_mask (uint32_t *d_n, const uint32_t *s1_n, const uint8_t *s2_1, int n);
Performs the compositing operation DEST = SRC IN MASK, for a constant MASK.
|
DEST |
|
SRC |
|
MASK |
|
number of elements |
void oil_composite_in_argb_const_src (uint32_t *d_n, const uint32_t *s1_1, const uint8_t *s2_n, int n);
Performs the compositing operation DEST = SRC IN MASK, for a constant SRC.
|
DEST |
|
SRC |
|
MASK |
|
number of elements |
void oil_composite_in_over_argb (uint32_t *i_n, const uint32_t *s1_n, const uint8_t *s2_n, int n);
Performs the compositing operation DEST = (SRC IN MASK) OVER DEST.
|
DEST |
|
SRC |
|
MASK |
|
number of elements |
void oil_composite_in_over_argb_const_mask (uint32_t *i_n, const uint32_t *s1_n, const uint8_t *s2_1, int n);
Performs the compositing operation DEST = (SRC IN MASK) OVER DEST, for a constant MASK.
|
DEST |
|
SRC |
|
MASK |
|
number of elements |
void oil_composite_in_over_argb_const_src (uint32_t *i_n, const uint32_t *s1_1, const uint8_t *s2_n, int n);
Performs the compositing operation DEST = (SRC IN MASK) OVER DEST, for a constant SRC.
|
DEST |
|
SRC |
|
MASK |
|
number of elements |
void oil_composite_over_argb (uint32_t *i_n, const uint32_t *s1_n, int n);
Performs the compositing operation DEST = SRC OVER DEST.
|
DEST |
|
SRC |
|
number of elements |
void oil_composite_over_argb_const_src (uint32_t *i_n, const uint32_t *s1_1, int n);
Performs the compositing operation DEST = SRC OVER DEST, for a constant SRC.
|
DEST |
|
SRC |
|
number of elements |
void oil_merge_linear_argb (uint32_t *d_n, const uint32_t *s_n, const uint32_t *s2_n, const uint32_t *s3_1, int n);
Linearly interpolate the s_n
and s2_n
arrays using the scale
factor in s3_1
. The value s3_1
must be in the range [0, 256]
A value of 0 indicates weights of 1.0 and 0.0 for
the s_n and s2_n arrays respectively. A value of 256 indicates
weights of 0.0 and 1.0 respectively.
This function is not intended for alpha blending; use one of the compositing functions instead.
|
|
|
|
|
|
|
|
|
void oil_resample_linear_argb (uint32_t *d_n, const uint32_t *s_2xn, int n, uint32_t *i_2);
Linearly resamples a row of pixels. FIXME.
|
|
|
|
|
|
|
void oil_resample_linear_u8 (uint8_t *d_n, const uint8_t *s_2xn, int n, uint32_t *i_2);
Linearly resamples a row of pixels. FIXME.
|
|
|
|
|
|
|
void oil_rgb2bgr (uint8_t *d_3xn, const uint8_t *s_3xn, int n);
Converts arrays of 24-bit RGB pixels from RGBRGBRGB ordering to BGRBGRBGR ordering (and vice-versa).
|
|
|
|
|
void oil_rgb2rgba (uint8_t *d_4xn, const uint8_t *s_3xn, int n);
Converts arrays of 24-bit RGB pixels in RGBRGBRGB memory order to 32-bit RGBA pixels in RGBARGBA order.
|
|
|
|
|
void oil_yuv2rgbx_sub2_u8 (uint8_t *d_4xn, const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, int n);
Converts YUV pixels to RGB pixels. Each YUV component is in a separate source array, and are combined and converted to RGB. The U and V arrays are subsampled by a factor of 2, so only half of each array is used.
This function should be replaced by one that makes sense.
|
|
|
Y component |
|
U component |
|
V component |
|
void oil_yuv2rgbx_sub4_u8 (uint8_t *d_4xn, const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, int n);
Converts YUV pixels to RGB pixels. Each YUV component is in a separate source array, and are combined and converted to RGB. The U and V arrays are subsampled by a factor of 4, so only a quarter of each array is used.
This function should be replaced by one that makes sense.
|
|
|
Y component |
|
U component |
|
V component |
|
void oil_yuv2rgbx_u8 (uint8_t *d_4xn, const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, int n);
Converts YUV pixels to RGB pixels. Each YUV component is in a separate source array, and are combined and converted to RGB.
This function should be replaced by one that makes sense.
|
|
|
Y component |
|
U component |
|
V component |
|
void oil_uyvy2ayuv (uint32_t *d_n, const uint32_t *s_n, int n);
Converts pixels in UYVY format to AYUV. Note that only approximately half of the source array is used. Alpha values are set to 255.
|
|
|
n: |
|
void oil_yuyv2ayuv (uint32_t *d_n, const uint32_t *s_n, int n);
Converts pixels in YUYV format to AYUV. Note that only approximately half of the source array is used. Alpha values are set to 255.
|
|
|
n: |
|