This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, generate has been updated via f4f99af5bd7efbf8214eaf84a95dab162f763179 (commit) from 80e05d567a9526b7bfb21cd458572c364502e4a0 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/f4f99af5bd7efbf8214eaf84a95dab162f763...
commit f4f99af5bd7efbf8214eaf84a95dab162f763179 Author: Cyril Hrubis metan@ucw.cz Date: Sun Jul 17 14:41:01 2011 +0200
Fixed Filters to work with generated code.
diff --git a/include/core/GP_DefFnPerBpp.h b/include/core/GP_DefFnPerBpp.h index 6da6754..534a451 100644 --- a/include/core/GP_DefFnPerBpp.h +++ b/include/core/GP_DefFnPerBpp.h @@ -51,4 +51,25 @@ GP_DEF_FN_FOR_BPP(fname, MACRO_NAME, fdraw, 24BPP) GP_DEF_FN_FOR_BPP(fname, MACRO_NAME, fdraw, 32BPP) +/* + * Dtto for filters. + * + * Filter is functions that works on Context per pixel. + */ +#define GP_DEF_FFN_FOR_BPP(fname, MACRO_NAME, bpp) + MACRO_NAME(fname##_##bpp, GP_Context *, GP_Pixel, + GP_PutPixel_Raw_##bpp, GP_GetPixel_Raw_##bpp) + +#define GP_DEF_FFN_PER_BPP(fname, MACRO_NAME) + GP_DEF_FFN_FOR_BPP(fname, MACRO_NAME, 1BPP_LE) + GP_DEF_FFN_FOR_BPP(fname, MACRO_NAME, 1BPP_BE) + GP_DEF_FFN_FOR_BPP(fname, MACRO_NAME, 2BPP_LE) + GP_DEF_FFN_FOR_BPP(fname, MACRO_NAME, 2BPP_BE) + GP_DEF_FFN_FOR_BPP(fname, MACRO_NAME, 4BPP_LE) + GP_DEF_FFN_FOR_BPP(fname, MACRO_NAME, 4BPP_BE) + GP_DEF_FFN_FOR_BPP(fname, MACRO_NAME, 8BPP) + GP_DEF_FFN_FOR_BPP(fname, MACRO_NAME, 16BPP) + GP_DEF_FFN_FOR_BPP(fname, MACRO_NAME, 24BPP) + GP_DEF_FFN_FOR_BPP(fname, MACRO_NAME, 32BPP) + #endif /* GP_DEF_FN_PER_BPP_H */ diff --git a/libs/filters/GP_Rotate.c b/libs/filters/GP_Rotate.c index e73c106..adb0ce2 100644 --- a/libs/filters/GP_Rotate.c +++ b/libs/filters/GP_Rotate.c @@ -25,14 +25,14 @@
#include "core/GP_Core.h" #include "core/GP_FnPerBpp.h" +#include "core/GP_DefFnPerBpp.h"
#include "GP_Rotate.h"
-#include "algo/GP_MirrorV.algo.h" -#include "algo/GP_Rotate.algo.h" - #include <string.h>
+#include "algo/GP_MirrorV.algo.h" + GP_RetCode GP_MirrorH(GP_Context *context) { uint32_t bpr = context->bytes_per_row; @@ -56,63 +56,43 @@ GP_RetCode GP_MirrorH(GP_Context *context) return GP_ESUCCESS; }
-DEF_MIRRORV_FN(GP_MirrorV1bpp, GP_Context *, GP_Pixel, - GP_PUTPIXEL_1BPP, GP_GETPIXEL_1BPP) -DEF_MIRRORV_FN(GP_MirrorV2bpp, GP_Context *, GP_Pixel, - GP_PUTPIXEL_2BPP, GP_GETPIXEL_2BPP) -DEF_MIRRORV_FN(GP_MirrorV4bpp, GP_Context *, GP_Pixel, - GP_PUTPIXEL_4BPP, GP_GETPIXEL_4BPP) -DEF_MIRRORV_FN(GP_MirrorV8bpp, GP_Context *, GP_Pixel, - GP_PUTPIXEL_8BPP, GP_GETPIXEL_8BPP) -DEF_MIRRORV_FN(GP_MirrorV16bpp, GP_Context *, GP_Pixel, - GP_PUTPIXEL_16BPP, GP_GETPIXEL_16BPP) -DEF_MIRRORV_FN(GP_MirrorV24bpp, GP_Context *, GP_Pixel, - GP_PUTPIXEL_24BPP, GP_GETPIXEL_24BPP) -DEF_MIRRORV_FN(GP_MirrorV32bpp, GP_Context *, GP_Pixel, - GP_PUTPIXEL_32BPP, GP_GETPIXEL_32BPP) +/* Generate mirror functions per BPP */ +GP_DEF_FFN_PER_BPP(GP_MirrorV, DEF_MIRRORV_FN)
GP_RetCode GP_MirrorV(GP_Context *context) { if (context == NULL) return GP_ENULLPTR;
- GP_FN_PER_BPP(GP_MirrorV, context->bpp, context); + GP_FN_PER_BPP_CONTEXT(GP_MirrorV, context, context);
return GP_ESUCCESS; }
-DEF_ROTATECW_FN(GP_RotateCW1bpp, GP_Context *, GP_PUTPIXEL_1BPP, GP_GETPIXEL_1BPP) -DEF_ROTATECW_FN(GP_RotateCW2bpp, GP_Context *, GP_PUTPIXEL_2BPP, GP_GETPIXEL_2BPP) -DEF_ROTATECW_FN(GP_RotateCW4bpp, GP_Context *, GP_PUTPIXEL_4BPP, GP_GETPIXEL_4BPP) -DEF_ROTATECW_FN(GP_RotateCW8bpp, GP_Context *, GP_PUTPIXEL_8BPP, GP_GETPIXEL_8BPP) -DEF_ROTATECW_FN(GP_RotateCW16bpp, GP_Context *, GP_PUTPIXEL_16BPP, GP_GETPIXEL_16BPP) -DEF_ROTATECW_FN(GP_RotateCW24bpp, GP_Context *, GP_PUTPIXEL_24BPP, GP_GETPIXEL_24BPP) -DEF_ROTATECW_FN(GP_RotateCW32bpp, GP_Context *, GP_PUTPIXEL_32BPP, GP_GETPIXEL_32BPP) +#include "algo/GP_Rotate.algo.h" + +/* Generate Rotate functions per BPP */ +GP_DEF_FFN_PER_BPP(GP_RotateCW, DEF_ROTATECW_FN)
GP_RetCode GP_RotateCW(GP_Context *context) { if (context == NULL) return GP_ENULLPTR;
- GP_FN_RET_PER_BPP(GP_RotateCW, context->bpp, context); + GP_FN_RET_PER_BPP_CONTEXT(GP_RotateCW, context, context);
return GP_ENOIMPL; }
-DEF_ROTATECCW_FN(GP_RotateCCW1bpp, GP_Context *, GP_PUTPIXEL_1BPP, GP_GETPIXEL_1BPP) -DEF_ROTATECCW_FN(GP_RotateCCW2bpp, GP_Context *, GP_PUTPIXEL_2BPP, GP_GETPIXEL_2BPP) -DEF_ROTATECCW_FN(GP_RotateCCW4bpp, GP_Context *, GP_PUTPIXEL_4BPP, GP_GETPIXEL_4BPP) -DEF_ROTATECCW_FN(GP_RotateCCW8bpp, GP_Context *, GP_PUTPIXEL_8BPP, GP_GETPIXEL_8BPP) -DEF_ROTATECCW_FN(GP_RotateCCW16bpp, GP_Context *, GP_PUTPIXEL_16BPP, GP_GETPIXEL_16BPP) -DEF_ROTATECCW_FN(GP_RotateCCW24bpp, GP_Context *, GP_PUTPIXEL_24BPP, GP_GETPIXEL_24BPP) -DEF_ROTATECCW_FN(GP_RotateCCW32bpp, GP_Context *, GP_PUTPIXEL_32BPP, GP_GETPIXEL_32BPP) +/* Generate Rotate functions per BPP */ +GP_DEF_FFN_PER_BPP(GP_RotateCCW, DEF_ROTATECCW_FN)
GP_RetCode GP_RotateCCW(GP_Context *context) { if (context == NULL) return GP_ENULLPTR;
- GP_FN_RET_PER_BPP(GP_RotateCCW, context->bpp, context); + GP_FN_RET_PER_BPP_CONTEXT(GP_RotateCCW, context, context);
return GP_ENOIMPL; } diff --git a/libs/filters/algo/GP_Rotate.algo.h b/libs/filters/algo/GP_Rotate.algo.h index 2d5cf28..e6ea14d 100644 --- a/libs/filters/algo/GP_Rotate.algo.h +++ b/libs/filters/algo/GP_Rotate.algo.h @@ -27,7 +27,7 @@ #include "core/GP_Common.h" #include "core/GP_Context.h"
-#define DEF_ROTATECW_FN(FN_NAME, CONTEXT_T, PUTPIXEL, GETPIXEL) +#define DEF_ROTATECW_FN(FN_NAME, CONTEXT_T, PIXEL_T, PUTPIXEL, GETPIXEL) GP_RetCode FN_NAME(CONTEXT_T context) { uint32_t x, y; @@ -58,7 +58,7 @@ GP_RetCode FN_NAME(CONTEXT_T context) return GP_ESUCCESS; }
-#define DEF_ROTATECCW_FN(FN_NAME, CONTEXT_T, PUTPIXEL, GETPIXEL) +#define DEF_ROTATECCW_FN(FN_NAME, CONTEXT_T, PIXEL_T, PUTPIXEL, GETPIXEL) GP_RetCode FN_NAME(CONTEXT_T context) { uint32_t x, y; diff --git a/tests/Makefile b/tests/Makefile index 71029bb..83de916 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,3 +1,3 @@ TOPDIR=.. -SUBDIRS=loaders filters core SDL +SUBDIRS=filters core SDL #loaders include $(TOPDIR)/include.mk
-----------------------------------------------------------------------
Summary of changes: include/core/GP_DefFnPerBpp.h | 21 +++++++++++++++ libs/filters/GP_Rotate.c | 48 ++++++++++------------------------- libs/filters/algo/GP_Rotate.algo.h | 4 +- tests/Makefile | 2 +- 4 files changed, 38 insertions(+), 37 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.