| Liboil Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
void oil_compare_u8 (uint32_t *d_1,const uint8_t *s1,const uint8_t *s2,int n); void oil_copy_u8 (uint8_t *dest,const uint8_t *src,int n); void oil_permute_f32 (float *dest,int dstr,const float *src1,int sstr1,const int32_t *src2,int sstr2,int n); void oil_permute_f64 (double *dest,int dstr,const double *src1,int sstr1,const int32_t *src2,int sstr2,int n); void oil_permute_s16 (int16_t *dest,int dstr,const int16_t *src1,int sstr1,const int32_t *src2,int sstr2,int n); void oil_permute_s32 (int32_t *dest,int dstr,const int32_t *src1,int sstr1,const int32_t *src2,int sstr2,int n); void oil_permute_s8 (int8_t *dest,int dstr,const int8_t *src1,int sstr1,const int32_t *src2,int sstr2,int n); void oil_permute_u16 (uint16_t *dest,int dstr,const uint16_t *src1,int sstr1,const int32_t *src2,int sstr2,int n); void oil_permute_u32 (uint32_t *dest,int dstr,const uint32_t *src1,int sstr1,const int32_t *src2,int sstr2,int n); void oil_permute_u8 (uint8_t *dest,int dstr,const uint8_t *src1,int sstr1,const int32_t *src2,int sstr2,int n); void oil_splat_u32 (uint32_t *dest,int dstr,const uint32_t *s1_1,int n); void oil_splat_u8 (uint8_t *dest,int dstr,const uint8_t *s1_1,int n); void oil_swab_u16 (uint16_t *d_n,const uint16_t *s_n,int n); void oil_swab_u32 (uint32_t *d_n,const uint32_t *s_n,int n); void oil_tablelookup_u8 (uint8_t *d,int ds,const uint8_t *s1,int ss1,const uint8_t *s2_256,int ss2,int n); void oil_testzero_u8 (uint32_t *d_1,const uint8_t *s,int n); void oil_trans8x8_f64 (double *d_8x8,int ds,const double *s_8x8,int ss); void oil_trans8x8_u16 (uint16_t *d_8x8,int ds,const uint16_t *s_8x8,int ss); void oil_trans8x8_u32 (uint32_t *d_8x8,int ds,const uint32_t *s_8x8,int ss); void oil_trans8x8_u8 (uint8_t *d_8x8,int ds,const uint8_t *s_8x8,int ss); void oil_unzigzag8x8_s16 (int16_t *d_8x8,int ds,const int16_t *s_8x8,int ss); void oil_zigzag8x8_s16 (int16_t *d_8x8,int ds,const int16_t *s_8x8,int ss); void oil_splat_u32_ns (uint32_t *dest,const uint32_t *s1_1,int n); void oil_splat_u8_ns (uint8_t *dest,const uint8_t *s1_1,int n); #define oil_trans8x8_s16 (dest, dstr, src, sstr) #define oil_memcpy (dest, src, n_bytes)
void oil_compare_u8 (uint32_t *d_1,const uint8_t *s1,const uint8_t *s2,int n);
Compares two arrays. The index of the first two elements that are
unequal is written into dest. If all elements are equal, n is
written into dest.
|
destination array |
|
source array |
|
source array |
|
number of elements |
void oil_copy_u8 (uint8_t *dest,const uint8_t *src,int n);
Copies from source to destination.
|
destination array |
|
source array |
|
number of elements |
void oil_permute_f32 (float *dest,int dstr,const float *src1,int sstr1,const int32_t *src2,int sstr2,int n);
Copies elements in src1 to dest, permuting them by src2. That is,
dest[i] is set to src1[src2[i]]. Values in src2 must be
non-negative and less than n.
void oil_permute_f64 (double *dest,int dstr,const double *src1,int sstr1,const int32_t *src2,int sstr2,int n);
Copies elements in src1 to dest, permuting them by src2. That is,
dest[i] is set to src1[src2[i]]. Values in src2 must be
non-negative and less than n.
void oil_permute_s16 (int16_t *dest,int dstr,const int16_t *src1,int sstr1,const int32_t *src2,int sstr2,int n);
Copies elements in src1 to dest, permuting them by src2. That is,
dest[i] is set to src1[src2[i]]. Values in src2 must be
non-negative and less than n.
void oil_permute_s32 (int32_t *dest,int dstr,const int32_t *src1,int sstr1,const int32_t *src2,int sstr2,int n);
Copies elements in src1 to dest, permuting them by src2. That is,
dest[i] is set to src1[src2[i]]. Values in src2 must be
non-negative and less than n.
void oil_permute_s8 (int8_t *dest,int dstr,const int8_t *src1,int sstr1,const int32_t *src2,int sstr2,int n);
Copies elements in src1 to dest, permuting them by src2. That is,
dest[i] is set to src1[src2[i]]. Values in src2 must be
non-negative and less than n.
void oil_permute_u16 (uint16_t *dest,int dstr,const uint16_t *src1,int sstr1,const int32_t *src2,int sstr2,int n);
Copies elements in src1 to dest, permuting them by src2. That is,
dest[i] is set to src1[src2[i]]. Values in src2 must be
non-negative and less than n.
void oil_permute_u32 (uint32_t *dest,int dstr,const uint32_t *src1,int sstr1,const int32_t *src2,int sstr2,int n);
Copies elements in src1 to dest, permuting them by src2. That is,
dest[i] is set to src1[src2[i]]. Values in src2 must be
non-negative and less than n.
void oil_permute_u8 (uint8_t *dest,int dstr,const uint8_t *src1,int sstr1,const int32_t *src2,int sstr2,int n);
Copies elements in src1 to dest, permuting them by src2. That is,
dest[i] is set to src1[src2[i]]. Values in src2 must be
non-negative and less than n.
void oil_splat_u32 (uint32_t *dest,int dstr,const uint32_t *s1_1,int n);
Copies the constant source value s1_1 to each element in dest.
void oil_splat_u8 (uint8_t *dest,int dstr,const uint8_t *s1_1,int n);
Copies the constant source value s1_1 to each element in dest.
void oil_swab_u16 (uint16_t *d_n,const uint16_t *s_n,int n);
Swaps the endianness of values in the source array and places the
results in the destination array. The arguments s_n and d_n may
be equal.
|
n: |
void oil_swab_u32 (uint32_t *d_n,const uint32_t *s_n,int n);
Swaps the endianness of values in the source array and places the
results in the destination array. The arguments s_n and d_n may
be equal.
|
n: |
void oil_tablelookup_u8 (uint8_t *d,int ds,const uint8_t *s1,int ss1,const uint8_t *s2_256,int ss2,int n);
Looks up each element in s1 using the lookup table in s2_256,
and places the table value in d.
void oil_testzero_u8 (uint32_t *d_1,const uint8_t *s,int n);
Tests each element in the source array for equality with 0. The
index of the first zero element is written into dest. If all
elements are non-zero, n is written into dest.
This function is roughly equivalent to strnlen(). One notable
difference is that implementations of this function may legally
read past the zero byte.
|
destination array |
|
source array |
|
number of elements |
void oil_trans8x8_f64 (double *d_8x8,int ds,const double *s_8x8,int ss);
Performs a matrix transpose the 8x8 block represented by s_8x8
and places the
result in d_8x8.
void oil_trans8x8_u16 (uint16_t *d_8x8,int ds,const uint16_t *s_8x8,int ss);
Performs a matrix transpose the 8x8 block represented by s_8x8
and places the
result in d_8x8. Note that this function can also be used for
any type of this size.
void oil_trans8x8_u32 (uint32_t *d_8x8,int ds,const uint32_t *s_8x8,int ss);
Performs a matrix transpose the 8x8 block represented by s_8x8
and places the
result in d_8x8. Note that this function can also be used for
any type of this size.
void oil_trans8x8_u8 (uint8_t *d_8x8,int ds,const uint8_t *s_8x8,int ss);
Performs a matrix transpose the 8x8 block represented by s_8x8
and places the
result in d_8x8. Note that this function can also be used for
any type of this size.
void oil_unzigzag8x8_s16 (int16_t *d_8x8,int ds,const int16_t *s_8x8,int ss);
Reorders an 8x8 block to reverse the zig-zag reordering of
oil_zigzag8x8_s16.
void oil_zigzag8x8_s16 (int16_t *d_8x8,int ds,const int16_t *s_8x8,int ss);
Reorders an 8x8 block using a zig-zag pattern. The zig-zag pattern is described in the JPEG specification.
FIXME: describe zigzag pattern
void oil_splat_u32_ns (uint32_t *dest,const uint32_t *s1_1,int n);
Copies the constant source value s1_1 to each element in dest.
void oil_splat_u8_ns (uint8_t *dest,const uint8_t *s1_1,int n);
Copies the constant source value s1_1 to each element in dest.
#define oil_memcpy(dest,src,n_bytes)
Macro that uses oil_copy_u8() to provide an implementation of
memcpy(). Note that oil_copy_u8() is optimized for short copies,
and may be very slow for large copies compared to alternatives,
including the system memcpy().