From patchwork Fri Oct 21 18:56:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38870 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp925709pzb; Fri, 21 Oct 2022 11:56:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7onTk1t2vWnrldRGcWb07xXHA8fma5x5jTwsBFYo3ZuuZQ3MiD/3yKspCOtt9cNK2f105q X-Received: by 2002:a05:6402:5485:b0:459:147a:d902 with SMTP id fg5-20020a056402548500b00459147ad902mr19453987edb.263.1666378576016; Fri, 21 Oct 2022 11:56:16 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id n12-20020a05640205cc00b0045c29d74fcesi25655885edx.568.2022.10.21.11.56.15; Fri, 21 Oct 2022 11:56:16 -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; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=A6QL5DWN; arc=fail (body hash mismatch); 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DD70768BEB4; Fri, 21 Oct 2022 21:56:12 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-oln040092064013.outbound.protection.outlook.com [40.92.64.13]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1E72B68BE18 for ; Fri, 21 Oct 2022 21:56:06 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=es97TnuobNWfBkXPX6adXS31BlnnsSZiy0tcx8NttM4fkDf5rzRJimKa03070UnT0PPDM8dKs5g/kMBIwSLdtJp2TBRAUItO1ktXJf/xlYYJ2CCxe+5Qv3AAHSFk9fcfg0YYuSZxXGJo6gQv7Z4KYHWn1pHPtHtnSVWeFB97bhdYfxyTAnrQPXbxukizejYV7SFYkgt4Tm08UOYIPS/T+tGZRU93aCQeF7JlfNhwlPHQ7ct/CHqp8WuPF/NsFn4f7QCs0mOyjmlfNkSMI7xsxwgo1ow8FfzuwMWMdJi15n4MzFuK7ISYzys7FPvesVmZk72mUXu7lWDFSUzU2K5HwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KymSFr79h94dLXaYKoemlVIb8wa9TtAXl7rpMK2/kCg=; b=O3Io5bd8glqG7PfzJ1DfIpLjcTiNR9pY9VPq8U8Rk4KN8CRTQSU9gq2+I+LSK2ZHjHb8IrEHZ9y9krI+hlopAsbDXYLvdXZpm3+hufJRYcD14JwNJ1s9cmpWPPqf/0O9bHD+Q6/x5g0hF8W1HOiOgHDm17B5dA2tSHJ/1Y9npo502ACAE0/gg4b8O2DnPI5vuVXeI4j8WaO5vjFoljnnNde46bMofkEFD9Veje4bKkFXe4//N414Yw87yqedysdZd0US6GMpMr7EogpBMSQisZklmX/Wyzt2PkYD7+sopHOhHDr4E1TARZ9nL9qFcjBeO6vGwq0/LhScqhWjqzLMIg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KymSFr79h94dLXaYKoemlVIb8wa9TtAXl7rpMK2/kCg=; b=A6QL5DWNGiah308aFncG1QDwlPI05w/crnOLNF0AHt7DAgpkq/6RcGTtmytF51ZqAQJc/DpOYZJqYNNEkleoY/hnkE3mA4kC8LiPjWgRgOkYhYC+7aVS8Ysz3/Zpxj5ji6Kz0eA/igZMkDifmHUw0A0mE3lHDdhSmKY8vddo0SgKasAkWWzwi4Z16Bv7p0O69tM/DqaP6TOFdm0kV7mNrd3M6vuIv/V5uYHunqvi/I5wmuEWbMeKn3xKRbGzSVZmNTXAxg0p/AK1kHcLDPJQuK8m9ER1y7VkNripecHm8ZAySOWeByEXNrkRa83v6qr2jX4/ixyBkbYlql/nArUIew== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PRAP250MB0491.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:291::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Fri, 21 Oct 2022 18:56:04 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Fri, 21 Oct 2022 18:56:04 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 20:56:02 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [Io0qCgW76Nj5TDxW0wjuqsun0OzJ3VOtrEZBeY6QGKg=] X-ClientProxiedBy: FR0P281CA0058.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:49::19) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221021185608.3096100-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PRAP250MB0491:EE_ X-MS-Office365-Filtering-Correlation-Id: 27c9c9e5-78b9-4305-11cb-08dab395e753 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmoyh0/rGpTlCzjnzrUxdxR9AxA/obCFEpFjoECRPocvLygtWmjfJY03umvhtr3MbBdunRumPFU/N41UXtFdU/9z/fAdhZ+wUQDXM5iW6GdHwARThvDGDlSGPZM5xft1uN66H99patHgD2NduEPcCghqYbY2yZRoNey2zk+GubIS7T90wXiXHAH3lCAfgSlIncz9LaXpEOHgqn9BIBtIuIC0pXlnXCg7lDHgj+wq45KHLXxoaTY8V7EoBaf9lwB2njtaLZvOcmNm79UT6T2br8JtvqjGWfHUXaJGuD6XcRQB/UXMCF3kSFQ9JohgQyh+W6G0F6WIb/Dl3w+dOTU7DmaDqCX9BeXzkFpeQSinpqmg/hWmZlfW9zSWGrynkHmfaS41JyDXC9O0UtH7QOPpTCat65g0hmqC4pVGzQ/ttwlsrOxoWzYsMAFQR5nmmJXSeXA8hzAc5T2I4hKyUnuEqQ/netfbcq810YpKh+d3w+Ych8YwsiQ8/vgHeVJqA16wAAL1+N4JINdNvXnulam1CnT40XrzPQ1DTYfj4+MdQyGLwXxV0KurF9qbEML6CEbseecG2URxDAVN5beEBCYB7b4mgpTJ98zyciMEDuaXUF3sWarvF5UlpVZ8NVfrRJnb8qKOgNrA5Bb/bYdhliZlnlrT0htxcXbo2aOpjS+JNxzF5KqY2+o0P/f1N4vtYjelVllPfmnSeOPS5L78uMsAWaxEWTUT+QPWz715/QcsgZxa8Psglrsd/N1i8EDNu+xfWYA= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lR3VqdNNbi5uRY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cb-08dab395e753 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2022 18:56:04.1795 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PRAP250MB0491 Subject: [FFmpeg-devel] [PATCH 1/7] avcodec/snow_dwt: Fix left shifts of negative numbers 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 6jvCFtUtMQwo Affected the vsynth(1|2|_lena)-snow(|-hpel) tests. Signed-off-by: Andreas Rheinhardt --- libavcodec/snow_dwt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/snow_dwt.c b/libavcodec/snow_dwt.c index 18b315ef66..965f409002 100644 --- a/libavcodec/snow_dwt.c +++ b/libavcodec/snow_dwt.c @@ -778,10 +778,10 @@ static inline int w_c(struct MpegEncContext *v, const uint8_t *pix1, const uint8 for (i = 0; i < h; i++) { for (j = 0; j < w; j += 4) { - tmp[32 * i + j + 0] = (pix1[j + 0] - pix2[j + 0]) << 4; - tmp[32 * i + j + 1] = (pix1[j + 1] - pix2[j + 1]) << 4; - tmp[32 * i + j + 2] = (pix1[j + 2] - pix2[j + 2]) << 4; - tmp[32 * i + j + 3] = (pix1[j + 3] - pix2[j + 3]) << 4; + tmp[32 * i + j + 0] = (pix1[j + 0] - pix2[j + 0]) * (1 << 4); + tmp[32 * i + j + 1] = (pix1[j + 1] - pix2[j + 1]) * (1 << 4); + tmp[32 * i + j + 2] = (pix1[j + 2] - pix2[j + 2]) * (1 << 4); + tmp[32 * i + j + 3] = (pix1[j + 3] - pix2[j + 3]) * (1 << 4); } pix1 += line_size; pix2 += line_size;