24 #include <fvutils/color/color_object_map.h>
25 #include <fvutils/colormap/colormap.h>
29 namespace firevision {
131 unsigned int lwidth =
width();
134 unsigned int pixel_per_step = iheight / lheight;
135 unsigned int lines_per_step = iwidth / lwidth;
137 unsigned char *yp = yuv422_planar_buffer;
138 unsigned char *up = YUV422_PLANAR_U_PLANE(yuv422_planar_buffer, iwidth * 2, iheight * 2);
139 unsigned char *vp = YUV422_PLANAR_V_PLANE(yuv422_planar_buffer, iwidth * 2, iheight * 2);
144 for (
unsigned int v = lwidth; v > 0; --v) {
145 unsigned int v_index = (v - 1) *
deepness() / lwidth;
146 for (
unsigned int u = 0; u < lheight; ++u) {
147 unsigned int u_index = u *
deepness() / lheight;
150 for (
unsigned int p = 0; p < pixel_per_step; ++p) {
158 unsigned int lines = (2 * (lines_per_step - 1)) + 1;
159 memcpy(yp, yp - ((
size_t)iwidth * 2), ((
size_t)iwidth * 2) * lines);
160 yp += (iwidth * 2) * lines;
161 memcpy(up, (up - iwidth), (
size_t)iwidth * lines);
162 memcpy(vp, (vp - iwidth), (
size_t)iwidth * lines);
163 up += iwidth * lines;
164 vp += iwidth * lines;