$NetBSD: patch-src_video_scalers_LineScalers.hh,v 1.1 2013/09/20 23:04:59 joerg Exp $ --- src/video/scalers/LineScalers.hh.orig 2013-09-20 13:46:48.000000000 +0000 +++ src/video/scalers/LineScalers.hh @@ -402,7 +402,7 @@ extern "C" template static inline void scale_1onN( - const Pixel* __restrict in, Pixel* __restrict out, unsigned long width) + const Pixel* in, Pixel* out, unsigned long width) { unsigned i = 0, j = 0; for (/* */; i < (width - (N - 1)); i += N, j += 1) { @@ -437,7 +437,7 @@ void Scale_1on6::operator()(const template void Scale_1on2::operator()( - const Pixel* __restrict in, Pixel* __restrict out, unsigned long width) __restrict + const Pixel* in, Pixel* out, unsigned long width) { unsigned long width2 = 0; @@ -674,7 +674,7 @@ void Scale_1on2::opera template void Scale_1on1::operator()( - const Pixel* __restrict in, Pixel* __restrict out, unsigned long width) __restrict + const Pixel* in, Pixel* out, unsigned long width) { unsigned long nBytes = width * sizeof(Pixel); unsigned long nBytes2 = 0; @@ -826,7 +826,7 @@ Scale_2on1::Scale_2on1(PixelOpera template void Scale_2on1::operator()( - const Pixel* __restrict in, Pixel* __restrict out, unsigned long width) __restrict + const Pixel* in, Pixel* out, unsigned long width) { unsigned long width2 = 0; @@ -1084,7 +1084,7 @@ Scale_6on1::Scale_6on1(PixelOpera template void Scale_6on1::operator()( - const Pixel* __restrict in, Pixel* __restrict out, unsigned long width) __restrict + const Pixel* in, Pixel* out, unsigned long width) { for (unsigned i = 0; i < width; ++i) { out[i] = pixelOps.template blend6<1, 1, 1, 1, 1, 1>(&in[6 * i]); @@ -1100,7 +1100,7 @@ Scale_4on1::Scale_4on1(PixelOpera template void Scale_4on1::operator()( - const Pixel* __restrict in, Pixel* __restrict out, unsigned long width) __restrict + const Pixel* in, Pixel* out, unsigned long width) { for (unsigned i = 0; i < width; ++i) { out[i] = pixelOps.template blend4<1, 1, 1, 1>(&in[4 * i]); @@ -1116,7 +1116,7 @@ Scale_3on1::Scale_3on1(PixelOpera template void Scale_3on1::operator()( - const Pixel* __restrict in, Pixel* __restrict out, unsigned long width) __restrict + const Pixel* in, Pixel* out, unsigned long width) { for (unsigned i = 0; i < width; ++i) { out[i] = pixelOps.template blend3<1, 1, 1>(&in[3 * i]); @@ -1132,7 +1132,7 @@ Scale_3on2::Scale_3on2(PixelOpera template void Scale_3on2::operator()( - const Pixel* __restrict in, Pixel* __restrict out, unsigned long width) __restrict + const Pixel* in, Pixel* out, unsigned long width) { unsigned i = 0, j = 0; for (/* */; i < (width - 1); i += 2, j += 3) { @@ -1151,7 +1151,7 @@ Scale_3on4::Scale_3on4(PixelOpera template void Scale_3on4::operator()( - const Pixel* __restrict in, Pixel* __restrict out, unsigned long width) __restrict + const Pixel* in, Pixel* out, unsigned long width) { unsigned i = 0, j = 0; for (/* */; i < (width - 3); i += 4, j += 3) { @@ -1174,7 +1174,7 @@ Scale_3on8::Scale_3on8(PixelOpera template void Scale_3on8::operator()( - const Pixel* __restrict in, Pixel* __restrict out, unsigned long width) __restrict + const Pixel* in, Pixel* out, unsigned long width) { unsigned i = 0, j = 0; for (/* */; i < (width - 7); i += 8, j += 3) { @@ -1201,7 +1201,7 @@ Scale_2on3::Scale_2on3(PixelOpera template void Scale_2on3::operator()( - const Pixel* __restrict in, Pixel* __restrict out, unsigned long width) __restrict + const Pixel* in, Pixel* out, unsigned long width) { unsigned i = 0, j = 0; for (/* */; i < (width - 2); i += 3, j += 2) { @@ -1222,7 +1222,7 @@ Scale_4on3::Scale_4on3(PixelOpera template void Scale_4on3::operator()( - const Pixel* __restrict in, Pixel* __restrict out, unsigned long width) __restrict + const Pixel* in, Pixel* out, unsigned long width) { unsigned i = 0, j = 0; for (/* */; i < (width - 2); i += 3, j += 4) { @@ -1243,7 +1243,7 @@ Scale_8on3::Scale_8on3(PixelOpera template void Scale_8on3::operator()( - const Pixel* __restrict in, Pixel* __restrict out, unsigned long width) __restrict + const Pixel* in, Pixel* out, unsigned long width) { unsigned i = 0, j = 0; for (/* */; i < (width - 2); i += 3, j += 8) { @@ -1264,7 +1264,7 @@ Scale_2on9::Scale_2on9(PixelOpera template void Scale_2on9::operator()( - const Pixel* __restrict in, Pixel* __restrict out, unsigned long width) __restrict + const Pixel* in, Pixel* out, unsigned long width) { unsigned i = 0, j = 0; for (/* */; i < (width - 8); i += 9, j += 2) { @@ -1297,7 +1297,7 @@ Scale_4on9::Scale_4on9(PixelOpera template void Scale_4on9::operator()( - const Pixel* __restrict in, Pixel* __restrict out, unsigned long width) __restrict + const Pixel* in, Pixel* out, unsigned long width) { unsigned i = 0, j = 0; for (/* */; i < (width - 8); i += 9, j += 4) { @@ -1330,7 +1330,7 @@ Scale_8on9::Scale_8on9(PixelOpera template void Scale_8on9::operator()( - const Pixel* __restrict in, Pixel* __restrict out, unsigned long width) __restrict + const Pixel* in, Pixel* out, unsigned long width) { unsigned i = 0, j = 0; for (/* */; i < width; i += 9, j += 8) { @@ -1363,7 +1363,7 @@ Scale_4on5::Scale_4on5(PixelOpera template void Scale_4on5::operator()( - const Pixel* __restrict in, Pixel* __restrict out, unsigned long width) __restrict + const Pixel* in, Pixel* out, unsigned long width) { assert((width % 5) == 0); for (unsigned i = 0, j = 0; i < width; i += 5, j += 4) { @@ -1384,7 +1384,7 @@ Scale_7on8::Scale_7on8(PixelOpera template void Scale_7on8::operator()( - const Pixel* __restrict in, Pixel* __restrict out, unsigned long width) __restrict + const Pixel* in, Pixel* out, unsigned long width) { assert((width % 8) == 0); for (unsigned i = 0, j = 0; i < width; i += 8, j += 7) { @@ -1408,7 +1408,7 @@ Scale_17on20::Scale_17on20(PixelO template void Scale_17on20::operator()( - const Pixel* __restrict in, Pixel* __restrict out, unsigned long width) __restrict + const Pixel* in, Pixel* out, unsigned long width) { assert((width % 20) == 0); for (unsigned i = 0, j = 0; i < width; i += 20, j += 17) { @@ -1444,7 +1444,7 @@ Scale_9on10::Scale_9on10(PixelOpe template void Scale_9on10::operator()( - const Pixel* __restrict in, Pixel* __restrict out, unsigned long width) __restrict + const Pixel* in, Pixel* out, unsigned long width) { assert((width % 10) == 0); for (unsigned i = 0, j = 0; i < width; i += 10, j += 9) { @@ -1470,8 +1470,8 @@ BlendLines::BlendLines(Pi template void BlendLines::operator()( - const Pixel* __restrict in1, const Pixel* __restrict in2, - Pixel* __restrict out, unsigned width) __restrict + const Pixel* in1, const Pixel* in2, + Pixel* out, unsigned width) { // TODO MMX/SSE optimizations // pure C++ version @@ -1513,8 +1513,8 @@ AlphaBlendLines::AlphaBlendLines( template void AlphaBlendLines::operator()( - const Pixel* __restrict in1, const Pixel* __restrict in2, - Pixel* __restrict out, unsigned width) __restrict + const Pixel* in1, const Pixel* in2, + Pixel* out, unsigned width) { for (unsigned i = 0; i < width; ++i) { out[i] = pixelOps.alphaBlend(in1[i], in2[i]); @@ -1523,8 +1523,8 @@ void AlphaBlendLines::operator()( template void AlphaBlendLines::operator()( - Pixel in1, const Pixel* __restrict in2, - Pixel* __restrict out, unsigned width) __restrict + Pixel in1, const Pixel* in2, + Pixel* out, unsigned width) { // ATM this routine is only called when 'in1' is not fully opaque nor // fully transparent. This cannot happen in 16bpp modes.