aboutsummaryrefslogtreecommitdiff
path: root/system/pdp_imageproc_portable.c
diff options
context:
space:
mode:
authorTom Schouten <doelie@users.sourceforge.net>2003-02-28 09:48:54 +0000
committerTom Schouten <doelie@users.sourceforge.net>2003-02-28 09:48:54 +0000
commit8227dc75b8e236f7f9629d1bc49fae0addee3def (patch)
tree13f2aec426201ee87dd0cbda0860082315dfa1ae /system/pdp_imageproc_portable.c
parenta0aef64af84622e8d6d02c7714fb82178dea0286 (diff)
pdp config
svn path=/trunk/externals/pdp/; revision=440
Diffstat (limited to 'system/pdp_imageproc_portable.c')
-rw-r--r--system/pdp_imageproc_portable.c18
1 files changed, 18 insertions, 0 deletions
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 <math.h>
#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)
{