diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-01-15 08:46:13 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-01-15 08:46:13 +0100 |
commit | 7fe60435bce6595a9c58a9bfd8244d74b5320e96 (patch) | |
tree | 1ac714a916e02fc90901ddac8bc2a3c6d051d28c /Source/DirectFB/src/gfx/generic/stretch_up_down_32.h | |
download | directfb-voodoo-7fe60435bce6595a9c58a9bfd8244d74b5320e96.tar.gz directfb-voodoo-7fe60435bce6595a9c58a9bfd8244d74b5320e96.tar.bz2 directfb-voodoo-7fe60435bce6595a9c58a9bfd8244d74b5320e96.zip |
Import DirectFB141_2k11R3_beta5
Diffstat (limited to 'Source/DirectFB/src/gfx/generic/stretch_up_down_32.h')
-rwxr-xr-x | Source/DirectFB/src/gfx/generic/stretch_up_down_32.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/Source/DirectFB/src/gfx/generic/stretch_up_down_32.h b/Source/DirectFB/src/gfx/generic/stretch_up_down_32.h new file mode 100755 index 0000000..3fca697 --- /dev/null +++ b/Source/DirectFB/src/gfx/generic/stretch_up_down_32.h @@ -0,0 +1,68 @@ +#define STRETCH_HVX_N_H "stretch_hvx_32.h" +#define uN u32 + +/**********************************************************************************************************************/ +/* Upscaling */ + +#define POINT_0 0 +#define LINE_0 0 +#define MINUS_1 1 +#define POINT_TO_RATIO(p,ps) ( ((p) & 0x3ffff) >> (18-SHIFT_L8) ) +#define LINE_TO_RATIO(l,ls) ( ((l) & 0x3ffff) >> (18-SHIFT_L8) ) + +#define POINT_L(p,ps) ( (((p)) >> 18) ) +#define POINT_R(p,ps) ( (((p)) >> 18) + 1 ) + +#define LINE_T(l,ls) ( (((l)) >> 18) ) +#define LINE_B(l,ls) ( (((l)) >> 18) + 1 ) + +#define UPDOWN 1 +#include "stretch_hvx_N.h" +#undef UPDOWN + +#undef POINT_0 +#undef LINE_0 +#undef MINUS_1 +#undef POINT_TO_RATIO +#undef LINE_TO_RATIO +#undef POINT_L +#undef POINT_R +#undef LINE_T +#undef LINE_B + +/**********************************************************************************************************************/ +/* Downscaling */ + +#define POINT_0 hfraq +#define LINE_0 vfraq +#define MINUS_1 0 +#define POINT_TO_RATIO(p,ps) ( (((((p)) & 0x3ffff) ? : 0x40000) << SHIFT_L8) / (ps) ) +#define LINE_TO_RATIO(l,ls) ( (((((l)) & 0x3ffff) ? : 0x40000) << SHIFT_L8) / (ls) ) + +#define POINT_L(p,ps) ( (((p)-1) >> 18) - 1 ) +#define POINT_R(p,ps) ( (((p)-1) >> 18) ) + +#define LINE_T(l,ls) ( (((l)-1) >> 18) - 1 ) +#define LINE_B(l,ls) ( (((l)-1) >> 18) ) + +#define UPDOWN 0 +#include "stretch_hvx_N.h" +#undef UPDOWN + +#undef POINT_0 +#undef LINE_0 +#undef MINUS_1 +#undef POINT_TO_RATIO +#undef LINE_TO_RATIO +#undef POINT_L +#undef POINT_R +#undef LINE_T +#undef LINE_B + +/**********************************************************************************************************************/ + +#undef STRETCH_HVX_N_H +#undef uN + +#include "stretch_up_down_table.h" + |