summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Oliver Stöneberg <firewave@users.noreply.github.com>2014-05-06 12:30:15 +0000
committer Oliver Stöneberg <firewave@users.noreply.github.com>2014-05-06 12:30:15 +0000
commit6631d4296c07aa469b4d2976a6e968209293fee0 (patch)
tree4aec3bfea5c4ed0b47699fff34c1c7e9e227e6e6 /src
parent8abad0f849edf762a883ce9f35fac3611c474c76 (diff)
avoid even more unnecessary rgb_t<->UINT32 conversions (nw)
Diffstat (limited to 'src')
-rw-r--r--src/emu/rendersw.inc10
-rw-r--r--src/emu/video/rgbsse.h8
2 files changed, 9 insertions, 9 deletions
diff --git a/src/emu/rendersw.inc b/src/emu/rendersw.inc
index 0452b933e97..ebfc57608ef 100644
--- a/src/emu/rendersw.inc
+++ b/src/emu/rendersw.inc
@@ -39,9 +39,9 @@ private:
static inline _PixelType dest_rgb_to_pixel(UINT32 r, UINT32 g, UINT32 b) { return dest_assemble_rgb(r >> _SrcShiftR, g >> _SrcShiftG, b >> _SrcShiftB); }
// source 32-bit pixels are in MAME standardized format
- static inline UINT32 source32_r(rgb_t pixel) { return (pixel >> (16 + _SrcShiftR)) & (0xff >> _SrcShiftR); }
- static inline UINT32 source32_g(rgb_t pixel) { return (pixel >> ( 8 + _SrcShiftG)) & (0xff >> _SrcShiftG); }
- static inline UINT32 source32_b(rgb_t pixel) { return (pixel >> ( 0 + _SrcShiftB)) & (0xff >> _SrcShiftB); }
+ static inline UINT32 source32_r(UINT32 pixel) { return (pixel >> (16 + _SrcShiftR)) & (0xff >> _SrcShiftR); }
+ static inline UINT32 source32_g(UINT32 pixel) { return (pixel >> ( 8 + _SrcShiftG)) & (0xff >> _SrcShiftG); }
+ static inline UINT32 source32_b(UINT32 pixel) { return (pixel >> ( 0 + _SrcShiftB)) & (0xff >> _SrcShiftB); }
// destination pixel masks are based on the template parameters as well
static inline UINT32 dest_r(_PixelType pixel) { return (pixel >> _DstShiftR) & (0xff >> _SrcShiftR); }
@@ -49,7 +49,7 @@ private:
static inline UINT32 dest_b(_PixelType pixel) { return (pixel >> _DstShiftB) & (0xff >> _SrcShiftB); }
// generic conversion with special optimization for destinations in the standard format
- static inline _PixelType source32_to_dest(rgb_t pixel)
+ static inline _PixelType source32_to_dest(UINT32 pixel)
{
if (_SrcShiftR == 0 && _SrcShiftG == 0 && _SrcShiftB == 0 && _DstShiftR == 16 && _DstShiftG == 8 && _DstShiftB == 0)
return pixel;
@@ -329,7 +329,7 @@ private:
// draw_aa_pixel - draw an antialiased pixel
//-------------------------------------------------
- static inline void draw_aa_pixel(_PixelType *dstdata, UINT32 pitch, int x, int y, rgb_t col)
+ static inline void draw_aa_pixel(_PixelType *dstdata, UINT32 pitch, int x, int y, UINT32 col)
{
_PixelType *dest = dstdata + y * pitch + x;
UINT32 dpix = _NoDestRead ? 0 : *dest;
diff --git a/src/emu/video/rgbsse.h b/src/emu/video/rgbsse.h
index dcbaa76d609..caf61179ec2 100644
--- a/src/emu/video/rgbsse.h
+++ b/src/emu/video/rgbsse.h
@@ -330,7 +330,7 @@ INLINE void rgbaint_scale_channel_and_clamp(rgbaint *color, const rgbint *colors
four pixel values
-------------------------------------------------*/
-INLINE rgb_t rgb_bilinear_filter(rgb_t rgb00, rgb_t rgb01, rgb_t rgb10, rgb_t rgb11, UINT8 u, UINT8 v)
+INLINE UINT32 rgb_bilinear_filter(UINT32 rgb00, UINT32 rgb01, UINT32 rgb10, UINT32 rgb11, UINT8 u, UINT8 v)
{
__m128i color00 = _mm_cvtsi32_si128(rgb00);
__m128i color01 = _mm_cvtsi32_si128(rgb01);
@@ -360,7 +360,7 @@ INLINE rgb_t rgb_bilinear_filter(rgb_t rgb00, rgb_t rgb01, rgb_t rgb10, rgb_t rg
four pixel values
-------------------------------------------------*/
-INLINE rgb_t rgba_bilinear_filter(rgb_t rgb00, rgb_t rgb01, rgb_t rgb10, rgb_t rgb11, UINT8 u, UINT8 v)
+INLINE UINT32 rgba_bilinear_filter(UINT32 rgb00, UINT32 rgb01, UINT32 rgb10, UINT32 rgb11, UINT8 u, UINT8 v)
{
return rgb_bilinear_filter(rgb00, rgb01, rgb10, rgb11, u, v);
}
@@ -371,7 +371,7 @@ INLINE rgb_t rgba_bilinear_filter(rgb_t rgb00, rgb_t rgb01, rgb_t rgb10, rgb_t r
four pixel values
-------------------------------------------------*/
-INLINE void rgbint_bilinear_filter(rgbint *color, rgb_t rgb00, rgb_t rgb01, rgb_t rgb10, rgb_t rgb11, UINT8 u, UINT8 v)
+INLINE void rgbint_bilinear_filter(rgbint *color, UINT32 rgb00, UINT32 rgb01, UINT32 rgb10, UINT32 rgb11, UINT8 u, UINT8 v)
{
__m128i color00 = _mm_cvtsi32_si128(rgb00);
__m128i color01 = _mm_cvtsi32_si128(rgb01);
@@ -399,7 +399,7 @@ INLINE void rgbint_bilinear_filter(rgbint *color, rgb_t rgb00, rgb_t rgb01, rgb_
four pixel values
-------------------------------------------------*/
-INLINE void rgbaint_bilinear_filter(rgbaint *color, rgb_t rgb00, rgb_t rgb01, rgb_t rgb10, rgb_t rgb11, UINT8 u, UINT8 v)
+INLINE void rgbaint_bilinear_filter(rgbaint *color, UINT32 rgb00, UINT32 rgb01, UINT32 rgb10, UINT32 rgb11, UINT8 u, UINT8 v)
{
rgbint_bilinear_filter(color, rgb00, rgb01, rgb10, rgb11, u, v);
}