From 7da1d644ff98078ad2a78d940ec991abff440b00 Mon Sep 17 00:00:00 2001 From: Tom Schouten Date: Wed, 5 Feb 2003 06:05:39 +0000 Subject: pdp 0.8.3 svn path=/trunk/externals/pdp/; revision=382 --- include/pdp.h | 19 +++++++++++++++++-- include/pdp_imageproc.h | 20 ++++++++++++++++++++ include/pdp_mmx.h | 13 +++++++++++++ include/pdp_resample.h | 4 +++- 4 files changed, 53 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/pdp.h b/include/pdp.h index 4cfd789..2695402 100644 --- a/include/pdp.h +++ b/include/pdp.h @@ -76,6 +76,20 @@ typedef struct #define PDP_IMAGE_RGBP 3 /* 48bpp: 16 bit planar RGB */ #define PDP_IMAGE_MCHP 4 /* generic 16bit multi channel planar */ +/* ascii data packet */ +typedef struct +{ + unsigned int encoding; /* image encoding (data format ) */ + unsigned int width; /* image width in pixels */ + unsigned int height; /* image height in pixels */ +} t_ascii; + + +/* image encodings */ +#define PDP_ASCII_BW 1 /* 8 bit per character black and white.*/ +#define PDP_ASCII_IBM 2 /* 16 bit per character colour (8 bit character, 8 bit colour, like good old text framebuffers.*/ +#define PDP_ASCII_RGB 3 /* 64 bit per character colour (8 bit character, 3x8 bit RGB */ + /* PDP_IMAGE_GREY = PDP_IMAGE_MCHP, channels = 1 PDP_IMAGE_RGBP = PDP_IMAGE_MCHP, channels = 3 @@ -95,12 +109,13 @@ typedef struct unsigned int type; /* datatype of this object */ unsigned int size; /* datasize including header */ unsigned int users; /* nb users of this object, readonly if > 1 */ - unsigned int __pad__; + unsigned int __pad__; /* pad to quad word size */ union { t_raw raw; /* raw subheader (for extensions unkown to pdp core system) */ t_image image; /* bitmap image */ //t_ca ca; /* cellular automaton state data */ + t_ascii ascii; /* ascii packet */ } info; } t_pdp; @@ -108,7 +123,7 @@ typedef struct /* pdp data packet types */ #define PDP_IMAGE 1 /* 16bit signed planar scanline encoded image packet */ //RESERVED: #define PDP_CA 2 /* 1bit toroidial shifted scanline encoded cellular automaton */ - +#define PDP_ASCII 3 /* ascii packet */ diff --git a/include/pdp_imageproc.h b/include/pdp_imageproc.h index 4921612..09825dc 100644 --- a/include/pdp_imageproc.h +++ b/include/pdp_imageproc.h @@ -141,10 +141,30 @@ void pdp_imageproc_bqt_process(void *x, s16 *image, s16 *state0, s16 *state1, u3 +// zoom object +void *pdp_imageproc_resample_affinemap_new(void); +void pdp_imageproc_resample_affinemap_delete(void *x); +void pdp_imageproc_resample_affinemap_setcenterx(void *x, float f); +void pdp_imageproc_resample_affinemap_setcentery(void *x, float f); +void pdp_imageproc_resample_affinemap_setzoomx(void *x, float f); +void pdp_imageproc_resample_affinemap_setzoomy(void *x, float f); +void pdp_imageproc_resample_affinemap_setangle(void *x, float f); +void pdp_imageproc_resample_affinemap_process(void *x, s16 *srcimage, s16 *dstimage, u32 width, u32 height); + + + +//chebyshev poly +void *pdp_imageproc_cheby_new(int order); +void pdp_imageproc_cheby_delete(void *x); +void pdp_imageproc_cheby_setcoef(void *x, u32 n, float f); +void pdp_imageproc_cheby_process(void *x, s16 *image, u32 width, u32 height, u32 iterations); + + /* #ifdef __cplusplus } #endif */ + #endif //PDP_IMAGEPROC_H diff --git a/include/pdp_mmx.h b/include/pdp_mmx.h index 8e70779..8181ff0 100644 --- a/include/pdp_mmx.h +++ b/include/pdp_mmx.h @@ -150,6 +150,19 @@ void pixel_crot2d_s16(short int *pixel_array, short int *row_encoded_vector_matrix); +/********************************** RESAMPLE OPERATIONS *******************************************/ + +// affine transformation (called linear map, but that's flou terminology) +void pixel_resample_linmap_s16(void *x); + + + +/********************************** POLYNOMIAL OPERATIONS *****************************************/ +// chebychev polynomial +void pixel_cheby_s16_3plus(short int *buf, int nb_8pixel_vectors, int orderplusone, short int *coefs); + + + #ifdef __cplusplus } #endif diff --git a/include/pdp_resample.h b/include/pdp_resample.h index 773c12c..cc77d04 100644 --- a/include/pdp_resample.h +++ b/include/pdp_resample.h @@ -28,15 +28,17 @@ void pdp_resample_scale_bilin(s16 *src_image, s16 *dst_image, s32 src_w, s32 src_h, s32 dst_w, s32 dst_h); void pdp_resample_scale_nn(s16 *src_image, s16 *dst_image, s32 src_w, s32 src_h, s32 dst_w, s32 dst_h); +/* USE pdp_imageproc_resample_affinemap void pdp_resample_zoom_tiled_bilin(s16 *src_image, s16 *dst_image, s32 w, s32 h, float zoom_x, float zoom_y, float center_x_relative, float center_y_relative); +*/ //void pdp_resample_zoom_tiled_nn(s16 *src_image, s16 *dst_image, s32 w, s32 h, float zoom_x, float zoom_y); /* core routines */ -s32 pdp_resample_bilin(s16 *image, s32 width, s32 height, s32 virt_x, s32 virt_y); +//s32 pdp_resample_bilin(s16 *image, s32 width, s32 height, s32 virt_x, s32 virt_y); #endif -- cgit v1.2.1