[PATCH v5 22/23] modetest: Fix line stride in SMPTE YUV packet pattern generator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The line stride passed to the function is expressed in bytes, there's no
need to multiply it by 2.

Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
---
 tests/modetest/buffers.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/modetest/buffers.c b/tests/modetest/buffers.c
index 1ca3be5..1575bf6 100644
--- a/tests/modetest/buffers.c
+++ b/tests/modetest/buffers.c
@@ -337,13 +337,13 @@ fill_smpte_yuv_packed(const struct yuv_info *yuv, unsigned char *mem,
 	for (y = 0; y < height * 6 / 9; ++y) {
 		for (x = 0; x < width; ++x)
 			y_mem[2*x] = colors_top[x * 7 / width].y;
-		y_mem += stride * 2;
+		y_mem += stride;
 	}
 
 	for (; y < height * 7 / 9; ++y) {
 		for (x = 0; x < width; ++x)
 			y_mem[2*x] = colors_middle[x * 7 / width].y;
-		y_mem += stride * 2;
+		y_mem += stride;
 	}
 
 	for (; y < height; ++y) {
@@ -354,7 +354,7 @@ fill_smpte_yuv_packed(const struct yuv_info *yuv, unsigned char *mem,
 						   / (width / 7) + 4].y;
 		for (; x < width; ++x)
 			y_mem[2*x] = colors_bottom[7].y;
-		y_mem += stride * 2;
+		y_mem += stride;
 	}
 
 	/* Chroma */
@@ -363,7 +363,7 @@ fill_smpte_yuv_packed(const struct yuv_info *yuv, unsigned char *mem,
 			c_mem[2*x+u] = colors_top[x * 7 / width].u;
 			c_mem[2*x+v] = colors_top[x * 7 / width].v;
 		}
-		c_mem += stride * 2;
+		c_mem += stride;
 	}
 
 	for (; y < height * 7 / 9; ++y) {
@@ -371,7 +371,7 @@ fill_smpte_yuv_packed(const struct yuv_info *yuv, unsigned char *mem,
 			c_mem[2*x+u] = colors_middle[x * 7 / width].u;
 			c_mem[2*x+v] = colors_middle[x * 7 / width].v;
 		}
-		c_mem += stride * 2;
+		c_mem += stride;
 	}
 
 	for (; y < height; ++y) {
@@ -389,7 +389,7 @@ fill_smpte_yuv_packed(const struct yuv_info *yuv, unsigned char *mem,
 			c_mem[2*x+u] = colors_bottom[7].u;
 			c_mem[2*x+v] = colors_bottom[7].v;
 		}
-		c_mem += stride * 2;
+		c_mem += stride;
 	}
 }
 
-- 
1.8.1.5

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux