diff options
author | Matthew Hoops | 2011-05-18 18:23:37 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-05-18 18:23:37 -0400 |
commit | d4c92983920cfe3b25a22d91e12c750e591b917e (patch) | |
tree | c0b63318b9ba0e67528337cfaa21515def1c3962 /graphics/scaler | |
parent | 7e2edf16b3e2bf1d2b31999979a60802514df6cb (diff) | |
parent | cf107e24be28c7e6db65b5c7ffed120af4a7994b (diff) | |
download | scummvm-rg350-d4c92983920cfe3b25a22d91e12c750e591b917e.tar.gz scummvm-rg350-d4c92983920cfe3b25a22d91e12c750e591b917e.tar.bz2 scummvm-rg350-d4c92983920cfe3b25a22d91e12c750e591b917e.zip |
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'graphics/scaler')
-rw-r--r-- | graphics/scaler/2xsai.cpp | 3 | ||||
-rw-r--r-- | graphics/scaler/Normal2xARM.s | 3 | ||||
-rw-r--r-- | graphics/scaler/aspect.cpp | 8 | ||||
-rw-r--r-- | graphics/scaler/aspect.h | 3 | ||||
-rw-r--r-- | graphics/scaler/downscaler.cpp | 3 | ||||
-rw-r--r-- | graphics/scaler/downscaler.h | 3 | ||||
-rw-r--r-- | graphics/scaler/downscalerARM.s | 3 | ||||
-rw-r--r-- | graphics/scaler/hq2x.cpp | 3 | ||||
-rw-r--r-- | graphics/scaler/hq3x.cpp | 3 | ||||
-rw-r--r-- | graphics/scaler/intern.h | 13 | ||||
-rw-r--r-- | graphics/scaler/scale2xARM.s | 3 | ||||
-rw-r--r-- | graphics/scaler/thumbnail_intern.cpp | 3 |
12 files changed, 11 insertions, 40 deletions
diff --git a/graphics/scaler/2xsai.cpp b/graphics/scaler/2xsai.cpp index 43a5b2fd1d..2afdd9385d 100644 --- a/graphics/scaler/2xsai.cpp +++ b/graphics/scaler/2xsai.cpp @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #include "graphics/scaler/intern.h" diff --git a/graphics/scaler/Normal2xARM.s b/graphics/scaler/Normal2xARM.s index e75d917567..9afe3f34f0 100644 --- a/graphics/scaler/Normal2xARM.s +++ b/graphics/scaler/Normal2xARM.s @@ -18,9 +18,6 @@ @ along with this program@ if not, write to the Free Software @ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @ -@ $URL$ -@ $Id$ -@ @ @author Robin Watts (robin@wss.co.uk) .text diff --git a/graphics/scaler/aspect.cpp b/graphics/scaler/aspect.cpp index 85768fbced..64a1cd1534 100644 --- a/graphics/scaler/aspect.cpp +++ b/graphics/scaler/aspect.cpp @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #include "graphics/scaler/intern.h" @@ -79,10 +76,7 @@ static inline void interpolate5Line(uint16 *dst, const uint16 *srcA, const uint1 } } else { while (width--) { - // TODO: We really would like to use interpolate16_5_3, but that - // does not exist (yet), so we use this trick instead. - uint16 tmp = *srcA++; - *dst++ = interpolate16_5_2_1<ColorMask>(*srcB++, tmp, tmp); + *dst++ = interpolate16_5_3<ColorMask>(*srcB++, *srcA++); } } } diff --git a/graphics/scaler/aspect.h b/graphics/scaler/aspect.h index 850b8f0b85..bb354c79ac 100644 --- a/graphics/scaler/aspect.h +++ b/graphics/scaler/aspect.h @@ -17,9 +17,6 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ */ #ifndef GRAPHICS_SCALER_ASPECT_H diff --git a/graphics/scaler/downscaler.cpp b/graphics/scaler/downscaler.cpp index 3aad4168f1..fa17490475 100644 --- a/graphics/scaler/downscaler.cpp +++ b/graphics/scaler/downscaler.cpp @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #include "graphics/scaler/downscaler.h" #include "graphics/scaler/intern.h" diff --git a/graphics/scaler/downscaler.h b/graphics/scaler/downscaler.h index 158b187940..97e55dc3d5 100644 --- a/graphics/scaler/downscaler.h +++ b/graphics/scaler/downscaler.h @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #ifndef GRAPHICS_SCALER_DOWNSCALER_H diff --git a/graphics/scaler/downscalerARM.s b/graphics/scaler/downscalerARM.s index 3422e68762..e4662522aa 100644 --- a/graphics/scaler/downscalerARM.s +++ b/graphics/scaler/downscalerARM.s @@ -18,9 +18,6 @@ @ along with this program; if not, write to the Free Software @ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @ -@ $URL$ -@ $Id$ -@ @ @author Robin Watts (robin@wss.co.uk) .text diff --git a/graphics/scaler/hq2x.cpp b/graphics/scaler/hq2x.cpp index 02c63c8be5..246e8f62d7 100644 --- a/graphics/scaler/hq2x.cpp +++ b/graphics/scaler/hq2x.cpp @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #include "graphics/scaler/intern.h" diff --git a/graphics/scaler/hq3x.cpp b/graphics/scaler/hq3x.cpp index f588c2ad89..7f7867d5a6 100644 --- a/graphics/scaler/hq3x.cpp +++ b/graphics/scaler/hq3x.cpp @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #include "graphics/scaler/intern.h" diff --git a/graphics/scaler/intern.h b/graphics/scaler/intern.h index 4addd6d3bd..255cc1a511 100644 --- a/graphics/scaler/intern.h +++ b/graphics/scaler/intern.h @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #ifndef GRAPHICS_SCALER_INTERN_H @@ -77,6 +74,16 @@ static inline unsigned interpolate16_3_1(unsigned p1, unsigned p2) { } /** + * Interpolate two 16 bit pixels with weights 5 and 3 and 1, i.e., (5*p1+3*p2)/8. + */ +template<typename ColorMask> +static inline unsigned interpolate16_5_3(unsigned p1, unsigned p2) { + const unsigned lowbits = (((p1 & ColorMask::kLowBits) << 2) + (p1 & ColorMask::kLow3Bits) + + ((p2 & ColorMask::kLow2Bits) << 1) + (p2 & ColorMask::kLow3Bits)) & ColorMask::kLow3Bits; + return ((p1*5 + p2*3) - lowbits) >> 3; +} + +/** * Interpolate two 16 bit pixels with weights 7 and 1, i.e., (7*p1+p2)/8. */ template<typename ColorMask> diff --git a/graphics/scaler/scale2xARM.s b/graphics/scaler/scale2xARM.s index bf4b886bd7..563a22eeb1 100644 --- a/graphics/scaler/scale2xARM.s +++ b/graphics/scaler/scale2xARM.s @@ -18,9 +18,6 @@ @ along with this program@ if not, write to the Free Software @ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @ -@ $URL$ -@ $Id$ -@ @ @author Robin Watts (robin@wss.co.uk) .text diff --git a/graphics/scaler/thumbnail_intern.cpp b/graphics/scaler/thumbnail_intern.cpp index d78648c325..154763070a 100644 --- a/graphics/scaler/thumbnail_intern.cpp +++ b/graphics/scaler/thumbnail_intern.cpp @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #include "common/endian.h" |