提交 ba5e7f82 编写于 作者: I Izumi Tsutsui 提交者: Blue Swirl

vnc: use bswapNN() rather than bswap_NN()

bswap_NN() variants are not always available in CONFIG_MACHINE_BSWAP_H case
and bswapNN() are public APIs in "bswap.h".
Signed-off-by: NIzumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 49e3fcc2
...@@ -209,7 +209,7 @@ tight_detect_smooth_image24(VncState *vs, int w, int h) ...@@ -209,7 +209,7 @@ tight_detect_smooth_image24(VncState *vs, int w, int h)
d < w - x - VNC_TIGHT_DETECT_SUBROW_WIDTH; d++) { \ d < w - x - VNC_TIGHT_DETECT_SUBROW_WIDTH; d++) { \
pix = ((uint##bpp##_t *)buf)[(y+d)*w+x+d]; \ pix = ((uint##bpp##_t *)buf)[(y+d)*w+x+d]; \
if (endian) { \ if (endian) { \
pix = bswap_##bpp(pix); \ pix = bswap##bpp(pix); \
} \ } \
for (c = 0; c < 3; c++) { \ for (c = 0; c < 3; c++) { \
left[c] = (int)(pix >> shift[c] & max[c]); \ left[c] = (int)(pix >> shift[c] & max[c]); \
...@@ -218,7 +218,7 @@ tight_detect_smooth_image24(VncState *vs, int w, int h) ...@@ -218,7 +218,7 @@ tight_detect_smooth_image24(VncState *vs, int w, int h)
dx++) { \ dx++) { \
pix = ((uint##bpp##_t *)buf)[(y+d)*w+x+d+dx]; \ pix = ((uint##bpp##_t *)buf)[(y+d)*w+x+d+dx]; \
if (endian) { \ if (endian) { \
pix = bswap_##bpp(pix); \ pix = bswap##bpp(pix); \
} \ } \
sum = 0; \ sum = 0; \
for (c = 0; c < 3; c++) { \ for (c = 0; c < 3; c++) { \
...@@ -608,7 +608,7 @@ tight_filter_gradient24(VncState *vs, uint8_t *buf, int w, int h) ...@@ -608,7 +608,7 @@ tight_filter_gradient24(VncState *vs, uint8_t *buf, int w, int h)
for (x = 0; x < w; x++) { \ for (x = 0; x < w; x++) { \
pix = *buf; \ pix = *buf; \
if (endian) { \ if (endian) { \
pix = bswap_##bpp(pix); \ pix = bswap##bpp(pix); \
} \ } \
diff = 0; \ diff = 0; \
for (c = 0; c < 3; c++) { \ for (c = 0; c < 3; c++) { \
...@@ -628,7 +628,7 @@ tight_filter_gradient24(VncState *vs, uint8_t *buf, int w, int h) ...@@ -628,7 +628,7 @@ tight_filter_gradient24(VncState *vs, uint8_t *buf, int w, int h)
<< shift[c]; \ << shift[c]; \
} \ } \
if (endian) { \ if (endian) { \
diff = bswap_##bpp(diff); \ diff = bswap##bpp(diff); \
} \ } \
*buf++ = diff; \ *buf++ = diff; \
} \ } \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册