qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] vnc: use bswapNN() rather than bswap_NN()
@ 2010-08-08  9:54 Izumi Tsutsui
  2010-09-04 10:12 ` Blue Swirl
  0 siblings, 1 reply; 2+ messages in thread
From: Izumi Tsutsui @ 2010-08-08  9:54 UTC (permalink / raw)
  To: qemu-devel; +Cc: Izumi Tsutsui

bswap_NN() variants are not always available in CONFIG_MACHINE_BSWAP_H case
and bswapNN() are public APIs in "bswap.h".

Signed-off-by: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
---
 ui/vnc-enc-tight.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c
index c4c9c3b..d229d22 100644
--- a/ui/vnc-enc-tight.c
+++ b/ui/vnc-enc-tight.c
@@ -209,7 +209,7 @@ tight_detect_smooth_image24(VncState *vs, int w, int h)
                      d < w - x - VNC_TIGHT_DETECT_SUBROW_WIDTH; d++) {  \
                 pix = ((uint##bpp##_t *)buf)[(y+d)*w+x+d];              \
                 if (endian) {                                           \
-                    pix = bswap_##bpp(pix);                             \
+                    pix = bswap##bpp(pix);                              \
                 }                                                       \
                 for (c = 0; c < 3; c++) {                               \
                     left[c] = (int)(pix >> shift[c] & max[c]);          \
@@ -218,7 +218,7 @@ tight_detect_smooth_image24(VncState *vs, int w, int h)
                      dx++) {                                            \
                     pix = ((uint##bpp##_t *)buf)[(y+d)*w+x+d+dx];       \
                     if (endian) {                                       \
-                        pix = bswap_##bpp(pix);                         \
+                        pix = bswap##bpp(pix);                          \
                     }                                                   \
                     sum = 0;                                            \
                     for (c = 0; c < 3; c++) {                           \
@@ -608,7 +608,7 @@ tight_filter_gradient24(VncState *vs, uint8_t *buf, int w, int h)
             for (x = 0; x < w; x++) {                                   \
                 pix = *buf;                                             \
                 if (endian) {                                           \
-                    pix = bswap_##bpp(pix);                             \
+                    pix = bswap##bpp(pix);                              \
                 }                                                       \
                 diff = 0;                                               \
                 for (c = 0; c < 3; c++) {                               \
@@ -628,7 +628,7 @@ tight_filter_gradient24(VncState *vs, uint8_t *buf, int w, int h)
                         << shift[c];                                    \
                 }                                                       \
                 if (endian) {                                           \
-                    diff = bswap_##bpp(diff);                           \
+                    diff = bswap##bpp(diff);                            \
                 }                                                       \
                 *buf++ = diff;                                          \
             }                                                           \
-- 
1.7.0.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] vnc: use bswapNN() rather than bswap_NN()
  2010-08-08  9:54 [Qemu-devel] [PATCH] vnc: use bswapNN() rather than bswap_NN() Izumi Tsutsui
@ 2010-09-04 10:12 ` Blue Swirl
  0 siblings, 0 replies; 2+ messages in thread
From: Blue Swirl @ 2010-09-04 10:12 UTC (permalink / raw)
  To: Izumi Tsutsui; +Cc: qemu-devel

Thanks, applied.

On Sun, Aug 8, 2010 at 9:54 AM, Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> wrote:
> bswap_NN() variants are not always available in CONFIG_MACHINE_BSWAP_H case
> and bswapNN() are public APIs in "bswap.h".
>
> Signed-off-by: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
> ---
>  ui/vnc-enc-tight.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c
> index c4c9c3b..d229d22 100644
> --- a/ui/vnc-enc-tight.c
> +++ b/ui/vnc-enc-tight.c
> @@ -209,7 +209,7 @@ tight_detect_smooth_image24(VncState *vs, int w, int h)
>                      d < w - x - VNC_TIGHT_DETECT_SUBROW_WIDTH; d++) {  \
>                 pix = ((uint##bpp##_t *)buf)[(y+d)*w+x+d];              \
>                 if (endian) {                                           \
> -                    pix = bswap_##bpp(pix);                             \
> +                    pix = bswap##bpp(pix);                              \
>                 }                                                       \
>                 for (c = 0; c < 3; c++) {                               \
>                     left[c] = (int)(pix >> shift[c] & max[c]);          \
> @@ -218,7 +218,7 @@ tight_detect_smooth_image24(VncState *vs, int w, int h)
>                      dx++) {                                            \
>                     pix = ((uint##bpp##_t *)buf)[(y+d)*w+x+d+dx];       \
>                     if (endian) {                                       \
> -                        pix = bswap_##bpp(pix);                         \
> +                        pix = bswap##bpp(pix);                          \
>                     }                                                   \
>                     sum = 0;                                            \
>                     for (c = 0; c < 3; c++) {                           \
> @@ -608,7 +608,7 @@ tight_filter_gradient24(VncState *vs, uint8_t *buf, int w, int h)
>             for (x = 0; x < w; x++) {                                   \
>                 pix = *buf;                                             \
>                 if (endian) {                                           \
> -                    pix = bswap_##bpp(pix);                             \
> +                    pix = bswap##bpp(pix);                              \
>                 }                                                       \
>                 diff = 0;                                               \
>                 for (c = 0; c < 3; c++) {                               \
> @@ -628,7 +628,7 @@ tight_filter_gradient24(VncState *vs, uint8_t *buf, int w, int h)
>                         << shift[c];                                    \
>                 }                                                       \
>                 if (endian) {                                           \
> -                    diff = bswap_##bpp(diff);                           \
> +                    diff = bswap##bpp(diff);                            \
>                 }                                                       \
>                 *buf++ = diff;                                          \
>             }                                                           \
> --
> 1.7.0.5
>
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-04 10:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-08  9:54 [Qemu-devel] [PATCH] vnc: use bswapNN() rather than bswap_NN() Izumi Tsutsui
2010-09-04 10:12 ` Blue Swirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).