From patchwork Mon May 31 07:55:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 28004 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp2656552iof; Mon, 31 May 2021 00:56:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw95mMYI/b7ZfjOC4nzxpjzwM0fec/nzaUSI4r/PlNDUdpZjcN91PismFCYHqhBw8goXlY5 X-Received: by 2002:aa7:c0c4:: with SMTP id j4mr23945667edp.168.1622447806190; Mon, 31 May 2021 00:56:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622447806; cv=none; d=google.com; s=arc-20160816; b=y+ksGkTC+VyJNrtQFnTjVw1UxLOXCmD8wUqUEHES3XP70LDyRdmG6aUJbBiG6QBFOM 0iUhGaJr334cQNGOO6WWQnKtEIEzMVtytVU6VEIAXaKR/1osBo94xXshQQOopl77ccSP WzO0f1VETa0uwpYP+Z5Ztcgye4Qs3VT5Ln5mJaqfU3gZl/9kSOJpza/02ixR2x4JHfKa IQJWlIuP+7wP1/qVFSaKzPgXmZoKwwpUPCgJ01UrYKkZ16uiCxnujMfHljifE2z5QxM9 0TyCiJuXky67Ss8BnOWrkqXif1rcUvIFHEbxGwe/65OcT/U69gBp6jy1YZ/y348NmtR+ zhLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=CM6ytZH3Dnd+BCUSZUT5k9sKHqtjC6+S9rnmiZZXyBY=; b=kZSes2AaNBpuFU8zOe/buBnW8Vhpqa8RbfOAa7fcvvYSk5+8iXWVTd7c9iSWAS4805 DyqMAiZV+Ybhzkh9ZViFJJJ8ucb3JEMn64heq/JHTMlV9VPIqmg6l7uoguPA/SIiEjy6 TxDkAgV+rzlaaPdNENCT8Bmh/aFj492F3xvNGWcDuHN18szG0hF6/meRDMA7gPov+MgG 6Vs9ucIauVV4zTn5bD+ncv4ggBBSCXvOVfwcIww9cmUy6w3feO6HzYVn6/dvu/5j0fS1 PJGi1FkqewcMs1jZOAQ6GlHKXg29VnCAexS/zSW8Dx2ENFPrSVSa2eoCKHP4WHQO1u5/ dB9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id gn42si3400287ejc.155.2021.05.31.00.56.45; Mon, 31 May 2021 00:56:46 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D36766881A8; Mon, 31 May 2021 10:55:36 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EA47C687FF1 for ; Mon, 31 May 2021 10:55:28 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 7134B24069A for ; Mon, 31 May 2021 09:55:25 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 1B6ZYG3qQsTw for ; Mon, 31 May 2021 09:55:25 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 251C5240476 for ; Mon, 31 May 2021 09:55:22 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id F1C153A142D; Mon, 31 May 2021 09:55:20 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 31 May 2021 09:55:00 +0200 Message-Id: <20210531075515.19544-9-anton@khirnov.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210531075515.19544-1-anton@khirnov.net> References: <20210531075515.19544-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 09/24] sws: initialize {src, dst}Stride2 consistently with {src, dst}2 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: OwUxH2i77saR --- libswscale/swscale.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 7dbe0f59c5..1cf89e4684 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -883,11 +883,6 @@ int attribute_align_arg sws_scale(struct SwsContext *c, return AVERROR(EINVAL); } - for (i=0; i<4; i++) { - srcStride2[i] = srcStride[i]; - dstStride2[i] = dstStride[i]; - } - if ((srcSliceY & (macro_height-1)) || ((srcSliceH& (macro_height-1)) && srcSliceY + srcSliceH != c->srcH) || srcSliceY + srcSliceH > c->srcH) { @@ -901,8 +896,10 @@ int attribute_align_arg sws_scale(struct SwsContext *c, if (c->cascaded_context[0] && srcSliceY == 0 && srcSliceH == c->cascaded_context[0]->srcH) return scale_cascaded(c, srcSlice, srcStride, srcSliceY, srcSliceH, dst, dstStride); - memcpy(src2, srcSlice, sizeof(src2)); - memcpy(dst2, dst, sizeof(dst2)); + memcpy(src2, srcSlice, sizeof(src2)); + memcpy(dst2, dst, sizeof(dst2)); + memcpy(srcStride2, srcStride, sizeof(srcStride2)); + memcpy(dstStride2, dstStride, sizeof(dstStride2)); // do not mess up sliceDir if we have a "trailing" 0-size slice if (srcSliceH == 0)