Macros | |
#define | SSDST(bits, num) (scale2x_uint##bits *)dst##num |
#define | SSSRC(bits, num) (const scale2x_uint##bits *)src##num |
#define | SCDST(i) (dst+(i)*dst_slice) |
#define | SCSRC(i) (src+(i)*src_slice) |
#define | SCMID(i) (mid[(i)]) |
Functions | |
static void | stage_scale2x (void *dst0, void *dst1, const void *src0, const void *src1, const void *src2, unsigned pixel, unsigned pixel_per_row) |
Apply the Scale2x effect on a group of rows. | |
static void | stage_scale2x3 (void *dst0, void *dst1, void *dst2, const void *src0, const void *src1, const void *src2, unsigned pixel, unsigned pixel_per_row) |
Apply the Scale2x3 effect on a group of rows. | |
static void | stage_scale2x4 (void *dst0, void *dst1, void *dst2, void *dst3, const void *src0, const void *src1, const void *src2, unsigned pixel, unsigned pixel_per_row) |
Apply the Scale2x4 effect on a group of rows. | |
static void | stage_scale3x (void *dst0, void *dst1, void *dst2, const void *src0, const void *src1, const void *src2, unsigned pixel, unsigned pixel_per_row) |
Apply the Scale3x effect on a group of rows. | |
static void | stage_scale4x (void *dst0, void *dst1, void *dst2, void *dst3, const void *src0, const void *src1, const void *src2, const void *src3, unsigned pixel, unsigned pixel_per_row) |
Apply the Scale4x effect on a group of rows. | |
static void | scale2x (void *void_dst, unsigned dst_slice, const void *void_src, unsigned src_slice, unsigned pixel, unsigned width, unsigned height) |
Apply the Scale2x effect on a bitmap. | |
static void | scale2x3 (void *void_dst, unsigned dst_slice, const void *void_src, unsigned src_slice, unsigned pixel, unsigned width, unsigned height) |
Apply the Scale2x3 effect on a bitmap. | |
static void | scale2x4 (void *void_dst, unsigned dst_slice, const void *void_src, unsigned src_slice, unsigned pixel, unsigned width, unsigned height) |
Apply the Scale2x4 effect on a bitmap. | |
static void | scale3x (void *void_dst, unsigned dst_slice, const void *void_src, unsigned src_slice, unsigned pixel, unsigned width, unsigned height) |
Apply the Scale3x effect on a bitmap. | |
static void | scale4x_buf (void *void_dst, unsigned dst_slice, void *void_mid, unsigned mid_slice, const void *void_src, unsigned src_slice, unsigned pixel, unsigned width, unsigned height) |
Apply the Scale4x effect on a bitmap. | |
static void | scale4x (void *void_dst, unsigned dst_slice, const void *void_src, unsigned src_slice, unsigned pixel, unsigned width, unsigned height) |
Apply the Scale4x effect on a bitmap. | |
int | scale_precondition (unsigned scale, unsigned pixel, unsigned width, unsigned height) |
Check if the scale implementation is applicable at the given arguments. | |
void | scale (unsigned scale, void *void_dst, unsigned dst_slice, const void *void_src, unsigned src_slice, unsigned pixel, unsigned width, unsigned height) |
Apply the Scale effect on a bitmap. |
#define SSDST | ( | bits, | |
num | |||
) | (scale2x_uint##bits *)dst##num |
#define SSSRC | ( | bits, | |
num | |||
) | (const scale2x_uint##bits *)src##num |
void scale | ( | unsigned | scale, |
void * | void_dst, | ||
unsigned | dst_slice, | ||
const void * | void_src, | ||
unsigned | src_slice, | ||
unsigned | pixel, | ||
unsigned | width, | ||
unsigned | height | ||
) |
Apply the Scale effect on a bitmap.
This function is simply a common interface for scale2x(), scale3x() and scale4x().
scale | Scale factor. 2, 203 (fox 2x3), 204 (for 2x4), 3 or 4. |
void_dst | Pointer at the first pixel of the destination bitmap. |
dst_slice | Size in bytes of a destination bitmap row. |
void_src | Pointer at the first pixel of the source bitmap. |
src_slice | Size in bytes of a source bitmap row. |
pixel | Bytes per pixel of the source and destination bitmap. |
width | Horizontal size in pixels of the source bitmap. |
height | Vertical size in pixels of the source bitmap. |
|
static |
Apply the Scale2x effect on a bitmap.
The destination bitmap is filled with the scaled version of the source bitmap. The source bitmap isn't modified. The destination bitmap must be manually allocated before calling the function, note that the resulting size is exactly 2x2 times the size of the source bitmap.
void_dst | Pointer at the first pixel of the destination bitmap. |
dst_slice | Size in bytes of a destination bitmap row. |
void_src | Pointer at the first pixel of the source bitmap. |
src_slice | Size in bytes of a source bitmap row. |
pixel | Bytes per pixel of the source and destination bitmap. |
width | Horizontal size in pixels of the source bitmap. |
height | Vertical size in pixels of the source bitmap. |
|
static |
Apply the Scale2x3 effect on a bitmap.
The destination bitmap is filled with the scaled version of the source bitmap. The source bitmap isn't modified. The destination bitmap must be manually allocated before calling the function, note that the resulting size is exactly 2x3 times the size of the source bitmap.
void_dst | Pointer at the first pixel of the destination bitmap. |
dst_slice | Size in bytes of a destination bitmap row. |
void_src | Pointer at the first pixel of the source bitmap. |
src_slice | Size in bytes of a source bitmap row. |
pixel | Bytes per pixel of the source and destination bitmap. |
width | Horizontal size in pixels of the source bitmap. |
height | Vertical size in pixels of the source bitmap. |
|
static |
Apply the Scale2x4 effect on a bitmap.
The destination bitmap is filled with the scaled version of the source bitmap. The source bitmap isn't modified. The destination bitmap must be manually allocated before calling the function, note that the resulting size is exactly 2x4 times the size of the source bitmap.
void_dst | Pointer at the first pixel of the destination bitmap. |
dst_slice | Size in bytes of a destination bitmap row. |
void_src | Pointer at the first pixel of the source bitmap. |
src_slice | Size in bytes of a source bitmap row. |
pixel | Bytes per pixel of the source and destination bitmap. |
width | Horizontal size in pixels of the source bitmap. |
height | Vertical size in pixels of the source bitmap. |
|
static |
Apply the Scale3x effect on a bitmap.
The destination bitmap is filled with the scaled version of the source bitmap. The source bitmap isn't modified. The destination bitmap must be manually allocated before calling the function, note that the resulting size is exactly 3x3 times the size of the source bitmap.
void_dst | Pointer at the first pixel of the destination bitmap. |
dst_slice | Size in bytes of a destination bitmap row. |
void_src | Pointer at the first pixel of the source bitmap. |
src_slice | Size in bytes of a source bitmap row. |
pixel | Bytes per pixel of the source and destination bitmap. |
width | Horizontal size in pixels of the source bitmap. |
height | Vertical size in pixels of the source bitmap. |
|
static |
Apply the Scale4x effect on a bitmap.
The destination bitmap is filled with the scaled version of the source bitmap. The source bitmap isn't modified. The destination bitmap must be manually allocated before calling the function, note that the resulting size is exactly 4x4 times the size of the source bitmap.
void_dst | Pointer at the first pixel of the destination bitmap. |
dst_slice | Size in bytes of a destination bitmap row. |
void_src | Pointer at the first pixel of the source bitmap. |
src_slice | Size in bytes of a source bitmap row. |
pixel | Bytes per pixel of the source and destination bitmap. |
width | Horizontal size in pixels of the source bitmap. |
height | Vertical size in pixels of the source bitmap. |
|
static |
Apply the Scale4x effect on a bitmap.
The destination bitmap is filled with the scaled version of the source bitmap. The source bitmap isn't modified. The destination bitmap must be manually allocated before calling the function, note that the resulting size is exactly 4x4 times the size of the source bitmap.
void_dst | Pointer at the first pixel of the destination bitmap. |
dst_slice | Size in bytes of a destination bitmap row. |
void_mid | Pointer at the first pixel of the buffer bitmap. |
mid_slice | Size in bytes of a buffer bitmap row. |
void_src | Pointer at the first pixel of the source bitmap. |
src_slice | Size in bytes of a source bitmap row. |
pixel | Bytes per pixel of the source and destination bitmap. |
width | Horizontal size in pixels of the source bitmap. |
height | Vertical size in pixels of the source bitmap. |
int scale_precondition | ( | unsigned | scale, |
unsigned | pixel, | ||
unsigned | width, | ||
unsigned | height | ||
) |
Check if the scale implementation is applicable at the given arguments.
scale | Scale factor. 2, 203 (fox 2x3), 204 (for 2x4), 3 or 4. |
pixel | Bytes per pixel of the source and destination bitmap. |
width | Horizontal size in pixels of the source bitmap. |
height | Vertical size in pixels of the source bitmap. |
|
inlinestatic |
Apply the Scale2x effect on a group of rows.
Used internally.
|
inlinestatic |
Apply the Scale2x3 effect on a group of rows.
Used internally.
|
inlinestatic |
Apply the Scale2x4 effect on a group of rows.
Used internally.
|
inlinestatic |
Apply the Scale3x effect on a group of rows.
Used internally.
|
inlinestatic |
Apply the Scale4x effect on a group of rows.
Used internally.