diff --git a/tests/checkasm/sw_rgb.c b/tests/checkasm/sw_rgb.c index a38e1d68f5..7a3049ddd1 100644 --- a/tests/checkasm/sw_rgb.c +++ b/tests/checkasm/sw_rgb.c @@ -38,8 +38,8 @@ } while (0) static const uint8_t width[] = {12, 16, 20, 32, 36, 128}; -static const struct {uint8_t w, h, s;} planes[] = { - {12,16,12}, {16,16,16}, {20,23,25}, {32,18,48}, {8,128,16}, {128,128,128} +static const struct {uint8_t w, h;} planes[] = { + {12,16}, {16,16}, {20,23}, {32,18}, {8,128}, {128,128} }; #define MAX_STRIDE 128 @@ -93,6 +93,9 @@ static void check_uyvy_to_422p(void) if (check_func(uyvytoyuv422, "uyvytoyuv422")) { for (i = 0; i < 6; i ++) { + int w = planes[i].w, h = planes[i].h; + int srcStride = 2 * w; + memset(dst_y_0, 0, MAX_STRIDE * MAX_HEIGHT); memset(dst_y_1, 0, MAX_STRIDE * MAX_HEIGHT); memset(dst_u_0, 0, (MAX_STRIDE/2) * MAX_HEIGHT); @@ -100,17 +103,17 @@ static void check_uyvy_to_422p(void) memset(dst_v_0, 0, (MAX_STRIDE/2) * MAX_HEIGHT); memset(dst_v_1, 0, (MAX_STRIDE/2) * MAX_HEIGHT); - call_ref(dst_y_0, dst_u_0, dst_v_0, src0, planes[i].w, planes[i].h, - MAX_STRIDE, MAX_STRIDE / 2, planes[i].s); - call_new(dst_y_1, dst_u_1, dst_v_1, src1, planes[i].w, planes[i].h, - MAX_STRIDE, MAX_STRIDE / 2, planes[i].s); + call_ref(dst_y_0, dst_u_0, dst_v_0, src0, w, h, + MAX_STRIDE, MAX_STRIDE / 2, srcStride); + call_new(dst_y_1, dst_u_1, dst_v_1, src1, w, h, + MAX_STRIDE, MAX_STRIDE / 2, srcStride); if (memcmp(dst_y_0, dst_y_1, MAX_STRIDE * MAX_HEIGHT) || memcmp(dst_u_0, dst_u_1, (MAX_STRIDE/2) * MAX_HEIGHT) || memcmp(dst_v_0, dst_v_1, (MAX_STRIDE/2) * MAX_HEIGHT)) fail(); } bench_new(dst_y_1, dst_u_1, dst_v_1, src1, planes[5].w, planes[5].h, - MAX_STRIDE, MAX_STRIDE / 2, planes[5].s); + MAX_STRIDE, MAX_STRIDE / 2, 2 * planes[5].w); } }