Message ID | 1590913114-11434-1-git-send-email-mypopydev@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [FFmpeg-devel,v2,1/3] checkasm: sw_rgb: Fix mixed declaration and code | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
On Sun, May 31, 2020 at 04:18:32PM +0800, Jun Zhao wrote: > From: Jun Zhao <barryjzhao@tencent.com> > > Fix mixed declaration and code. > > Signed-off-by: Jun Zhao <barryjzhao@tencent.com> > --- > tests/checkasm/sw_rgb.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) LGTM thx
diff --git a/tests/checkasm/sw_rgb.c b/tests/checkasm/sw_rgb.c index 1e8ea15..e5aad20 100644 --- a/tests/checkasm/sw_rgb.c +++ b/tests/checkasm/sw_rgb.c @@ -137,12 +137,13 @@ static void check_interleave_bytes(void) int w = i > 0 ? i : (1 + (rnd() % (MAX_STRIDE-2))); int h = 1 + (rnd() % (MAX_HEIGHT-2)); - memset(dst0, 0, 2 * MAX_STRIDE * MAX_HEIGHT); - memset(dst1, 0, 2 * MAX_STRIDE * MAX_HEIGHT); - int src0_offset = 0, src0_stride = MAX_STRIDE; int src1_offset = 0, src1_stride = MAX_STRIDE; int dst_offset = 0, dst_stride = 2 * MAX_STRIDE; + + memset(dst0, 0, 2 * MAX_STRIDE * MAX_HEIGHT); + memset(dst1, 0, 2 * MAX_STRIDE * MAX_HEIGHT); + // Try different combinations of negative strides if (i & 1) { src0_offset = (h-1)*src0_stride;