From 8227dc75b8e236f7f9629d1bc49fae0addee3def Mon Sep 17 00:00:00 2001 From: Tom Schouten Date: Fri, 28 Feb 2003 09:48:54 +0000 Subject: pdp config svn path=/trunk/externals/pdp/; revision=440 --- system/pdp_imageproc_portable.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'system/pdp_imageproc_portable.c') diff --git a/system/pdp_imageproc_portable.c b/system/pdp_imageproc_portable.c index 6feddd3..86b91b8 100644 --- a/system/pdp_imageproc_portable.c +++ b/system/pdp_imageproc_portable.c @@ -24,6 +24,24 @@ #include #include "pdp_imageproc.h" +/* all image dims are legal */ +u32 pdp_imageproc_legalwidth(int i) +{ + if (i>1024) return 1024; + if (i>0) return i; + return 1; +} + +u32 pdp_imageproc_legalheight(int i) +{ + if (i>1024) return 1024; + if (i>0) return i; + return 1; +} +u32 pdp_imageproc_legalwidth_round_down(int i) {return pdp_imageproc_legalwidth(i);} +u32 pdp_imageproc_legalheight_round_down(int i) {return pdp_imageproc_legalheight(i);} + + // utility stuff inline static s32 float2fixed(float f) { -- cgit v1.2.1