diff options
author | Bertrand Augereau | 2006-12-02 15:02:15 +0000 |
---|---|---|
committer | Bertrand Augereau | 2006-12-02 15:02:15 +0000 |
commit | 21f49b5229dad018b9d1f593fc34311e665e70a9 (patch) | |
tree | 3526a367c28756851436164bd22a6faedac82345 | |
parent | 36396a4aa6db0b7868df3308eab73752f24f1f0f (diff) | |
download | scummvm-rg350-21f49b5229dad018b9d1f593fc34311e665e70a9.tar.gz scummvm-rg350-21f49b5229dad018b9d1f593fc34311e665e70a9.tar.bz2 scummvm-rg350-21f49b5229dad018b9d1f593fc34311e665e70a9.zip |
NDS : Micro-optimizations for the software blitter
svn-id: r24802
-rw-r--r-- | backends/platform/ds/arm9/source/blitters.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/backends/platform/ds/arm9/source/blitters.cpp b/backends/platform/ds/arm9/source/blitters.cpp index 100b9d6e93..62fe4d6294 100644 --- a/backends/platform/ds/arm9/source/blitters.cpp +++ b/backends/platform/ds/arm9/source/blitters.cpp @@ -144,27 +144,27 @@ static inline void RescaleBlock_5x1555_To_4x1555( u16 s0, u16 s1, u16 s2, u16 s3 u32 bs3 = s3 & 0x1F; u32 bs4 = s4 & 0x1F; - u32 gs0 = (s0 >> 5) & 0x1F; + u32 gs0_4 = (s0 >> 3) & 0x7C; u32 gs1 = (s1 >> 5) & 0x1F; u32 gs2 = (s2 >> 5) & 0x1F; u32 gs3 = (s3 >> 5) & 0x1F; - u32 gs4 = (s4 >> 5) & 0x1F; + u32 gs4_4 = (s4 >> 3) & 0x7C; - u32 rs0 = (s0 >> 10) & 0x1F; + u32 rs0_4 = (s0 >> 8) & 0x7C; u32 rs1 = (s1 >> 10) & 0x1F; u32 rs2 = (s2 >> 10) & 0x1F; u32 rs3 = (s3 >> 10) & 0x1F; - u32 rs4 = (s4 >> 10) & 0x1F; + u32 rs4_4 = (s4 >> 8) & 0x7C; - u32 rd0 = 4*rs0 + rs1; + u32 rd0 = rs0_4 + rs1; u32 rd1 = 2*rs1 + rs1 + 2*rs2; u32 rd2 = 2*rs2 + 2*rs3 + rs3; - u32 rd3 = rs3 + 4*rs4; + u32 rd3 = rs3 + rs4_4; - u32 gd0 = 4*gs0 + gs1; + u32 gd0 = gs0_4 + gs1; u32 gd1 = 2*gs1 + gs1 + 2*gs2; u32 gd2 = 2*gs2 + 2*gs3 + gs3; - u32 gd3 = gs3 + 4*gs4; + u32 gd3 = gs3 + gs4_4; u32 bd0 = 4*bs0 + bs1; u32 bd1 = 2*bs1 + bs1 + 2*bs2; |