diff options
author | Tom Schouten <doelie@users.sourceforge.net> | 2003-02-28 09:48:54 +0000 |
---|---|---|
committer | Tom Schouten <doelie@users.sourceforge.net> | 2003-02-28 09:48:54 +0000 |
commit | 8227dc75b8e236f7f9629d1bc49fae0addee3def (patch) | |
tree | 13f2aec426201ee87dd0cbda0860082315dfa1ae /system/pdp_imageproc_mmx.c | |
parent | a0aef64af84622e8d6d02c7714fb82178dea0286 (diff) |
pdp config
svn path=/trunk/externals/pdp/; revision=440
Diffstat (limited to 'system/pdp_imageproc_mmx.c')
-rw-r--r-- | system/pdp_imageproc_mmx.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/system/pdp_imageproc_mmx.c b/system/pdp_imageproc_mmx.c index 4c347c6..fde790f 100644 --- a/system/pdp_imageproc_mmx.c +++ b/system/pdp_imageproc_mmx.c @@ -26,6 +26,36 @@ #include "pdp_imageproc.h" #include "m_pd.h" +/* round image dims to next multiple of 8 */ +u32 pdp_imageproc_legalwidth(int i) +{ + if (i>1024) return 1024; + if (i>0) return ((((i-1)>>3)+1)<<3); + return 8; + +} + +u32 pdp_imageproc_legalheight(int i) +{ + if (i>1024) return 1024; + if (i>0) return ((((i-1)>>3)+1)<<3); + return 8; +} +u32 pdp_imageproc_legalwidth_round_down(int i) +{ + if (i>1024) return 1024; + if (i>8) return ((i>>3)<<3); + return 8; + +} + +u32 pdp_imageproc_legalheight_round_down(int i) +{ + if (i>1024) return 1024; + if (i>8) return ((i>>3)<<3); + return 8; +} + // utility stuff inline static s16 float2fixed(float f) { |