From 91f4ee5639ac8a8e65eec09caa99b094c7aed951 Mon Sep 17 00:00:00 2001 From: Abhinau Kumar Date: Mon, 20 Apr 2020 20:40:59 -0500 Subject: [PATCH] Fixed memory leak and calculation error in luminance term calculation --- tools/dump_fastssim.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/dump_fastssim.c b/tools/dump_fastssim.c index 9478c620..76ac07dd 100644 --- a/tools/dump_fastssim.c +++ b/tools/dump_fastssim.c @@ -121,10 +121,14 @@ static void fs_downsample_level(fs_ctx *_ctx,int _l){ int j; w=_ctx->level[_l].w; h=_ctx->level[_l].h; + w = (w >> 1) << 1; + h = (h >> 1) << 1; dst1=_ctx->level[_l].im1; dst2=_ctx->level[_l].im2; w2=_ctx->level[_l-1].w; h2=_ctx->level[_l-1].h; + w2 = (w2 >> 1) << 1; + h2 = (h2 >> 1) << 1; src1=_ctx->level[_l-1].im1; src2=_ctx->level[_l-1].im2; for(j=0;j