* [PATCH i-g-t] lib/igt_chamelium: Create pixman image with bytes per pixel, not bits
@ 2017-06-16 14:19 Paul Kocialkowski
2017-06-16 18:58 ` Lyude Paul
0 siblings, 1 reply; 2+ messages in thread
From: Paul Kocialkowski @ 2017-06-16 14:19 UTC (permalink / raw)
To: intel-gfx; +Cc: Lyude
The pixman_image_create_bits function expects bytes per pixels as fifth
argument, not bits per pixels.
This divides the PIXMAN_FORMAT_BPP macro's result by 8 to get it in
bytes per pixels instead of bits per pixels.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
---
lib/igt_chamelium.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
index 2315ce60..4a2af796 100644
--- a/lib/igt_chamelium.c
+++ b/lib/igt_chamelium.c
@@ -967,7 +967,7 @@ static pixman_image_t *convert_frame_format(pixman_image_t *src,
int w = pixman_image_get_width(src), h = pixman_image_get_height(src);
converted = pixman_image_create_bits(format, w, h, NULL,
- PIXMAN_FORMAT_BPP(format) * w);
+ PIXMAN_FORMAT_BPP(format) / 8 * w);
pixman_image_composite(PIXMAN_OP_ADD, src, NULL, converted,
0, 0, 0, 0, 0, 0, w, h);
--
2.13.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH i-g-t] lib/igt_chamelium: Create pixman image with bytes per pixel, not bits
2017-06-16 14:19 [PATCH i-g-t] lib/igt_chamelium: Create pixman image with bytes per pixel, not bits Paul Kocialkowski
@ 2017-06-16 18:58 ` Lyude Paul
0 siblings, 0 replies; 2+ messages in thread
From: Lyude Paul @ 2017-06-16 18:58 UTC (permalink / raw)
To: Paul Kocialkowski, intel-gfx
RB'd and pushed, thanks!
On Fri, 2017-06-16 at 17:19 +0300, Paul Kocialkowski wrote:
> The pixman_image_create_bits function expects bytes per pixels as
> fifth
> argument, not bits per pixels.
>
> This divides the PIXMAN_FORMAT_BPP macro's result by 8 to get it in
> bytes per pixels instead of bits per pixels.
>
> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
> ---
> lib/igt_chamelium.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
> index 2315ce60..4a2af796 100644
> --- a/lib/igt_chamelium.c
> +++ b/lib/igt_chamelium.c
> @@ -967,7 +967,7 @@ static pixman_image_t
> *convert_frame_format(pixman_image_t *src,
> int w = pixman_image_get_width(src), h =
> pixman_image_get_height(src);
>
> converted = pixman_image_create_bits(format, w, h, NULL,
> - PIXMAN_FORMAT_BPP(forma
> t) * w);
> + PIXMAN_FORMAT_BPP(forma
> t) / 8 * w);
> pixman_image_composite(PIXMAN_OP_ADD, src, NULL, converted,
> 0, 0, 0, 0, 0, 0, w, h);
>
--
Cheers,
Lyude
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-16 18:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-16 14:19 [PATCH i-g-t] lib/igt_chamelium: Create pixman image with bytes per pixel, not bits Paul Kocialkowski
2017-06-16 18:58 ` Lyude Paul
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.