const int x2 = x1 + 1;\r
const int y2 = y1 + 1;\r
\r
- uchar3 src_reg = *(uchar3*)(src + y1 * src_step + 3 * x1);\r
- out.x += src_reg.x * (x2 - xcoo) * (y2 - ycoo);\r
- out.y += src_reg.y * (x2 - xcoo) * (y2 - ycoo);\r
- out.z += src_reg.z * (x2 - xcoo) * (y2 - ycoo);\r
-\r
- src_reg = *(uchar3*)(src + y1 * src_step + 3 * x2);\r
- \r
- out.x += src_reg.x * (xcoo - x1) * (y2 - ycoo);\r
- out.y += src_reg.y * (xcoo - x1) * (y2 - ycoo);\r
- out.z += src_reg.z * (xcoo - x1) * (y2 - ycoo);\r
-\r
- src_reg = *(uchar3*)(src + y2 * src_step + 3 * x1);\r
- \r
- out.x += src_reg.x * (x2 - xcoo) * (ycoo - y1);\r
- out.y += src_reg.y * (x2 - xcoo) * (ycoo - y1);\r
- out.z += src_reg.z * (x2 - xcoo) * (ycoo - y1);\r
-\r
- src_reg = *(uchar3*)(src + y2 * src_step + 3 * x2);\r
- \r
- out.x += src_reg.x * (xcoo - x1) * (ycoo - y1);\r
- out.y += src_reg.y * (xcoo - x1) * (ycoo - y1);\r
- out.z += src_reg.z * (xcoo - x1) * (ycoo - y1);\r
+ uchar src_reg = *(src + y1 * src_step + 3 * x1);\r
+ out.x += src_reg * (x2 - xcoo) * (y2 - ycoo);\r
+ src_reg = *(src + y1 * src_step + 3 * x1 + 1);\r
+ out.y += src_reg * (x2 - xcoo) * (y2 - ycoo);\r
+ src_reg = *(src + y1 * src_step + 3 * x1 + 2);\r
+ out.z += src_reg * (x2 - xcoo) * (y2 - ycoo);\r
+\r
+ src_reg = *(src + y1 * src_step + 3 * x2); \r
+ out.x += src_reg * (xcoo - x1) * (y2 - ycoo);\r
+ src_reg = *(src + y1 * src_step + 3 * x2 + 1); \r
+ out.y += src_reg * (xcoo - x1) * (y2 - ycoo);\r
+ src_reg = *(src + y1 * src_step + 3 * x2 + 2); \r
+ out.z += src_reg * (xcoo - x1) * (y2 - ycoo);\r
+\r
+ src_reg = *(src + y2 * src_step + 3 * x1); \r
+ out.x += src_reg * (x2 - xcoo) * (ycoo - y1);\r
+ src_reg = *(src + y2 * src_step + 3 * x1 + 1); \r
+ out.y += src_reg * (x2 - xcoo) * (ycoo - y1);\r
+ src_reg = *(src + y2 * src_step + 3 * x1 + 2); \r
+ out.z += src_reg * (x2 - xcoo) * (ycoo - y1);\r
+\r
+ src_reg = *(src + y2 * src_step + 3 * x2); \r
+ out.x += src_reg * (xcoo - x1) * (ycoo - y1);\r
+ src_reg = *(src + y2 * src_step + 3 * x2 + 1); \r
+ out.y += src_reg * (xcoo - x1) * (ycoo - y1);\r
+ src_reg = *(src + y2 * src_step + 3 * x2 + 2); \r
+ out.z += src_reg * (xcoo - x1) * (ycoo - y1);\r
}\r
\r
- *(uchar3*)(dst + y * dst_step + 3 * x) = out;\r
+ /**(uchar3*)(dst + y * dst_step + 3 * x) = out;*/\r
+ *(dst + y * dst_step + 3 * x) = out.x;\r
+ *(dst + y * dst_step + 3 * x + 1) = out.y;\r
+ *(dst + y * dst_step + 3 * x + 2) = out.z;\r
}\r
}\r
}\r