Message ID | AS8P250MB0744C1705DA735763E3923608F2D9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM |
---|---|
State | Accepted |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp927307pzb; Fri, 21 Oct 2022 12:01:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM78kdG3U5saTVec0BZFSDkH2QXOkslmGGW7fArLRkioddeq+/3jE6rOYtsdcvKroIBpWWuB X-Received: by 2002:a17:907:968d:b0:78e:1a4:131 with SMTP id hd13-20020a170907968d00b0078e01a40131mr16691592ejc.439.1666378861650; Fri, 21 Oct 2022 12:01:01 -0700 (PDT) Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ne37-20020a1709077ba500b0078def76da94si18027727ejc.437.2022.10.21.12.01.01; Fri, 21 Oct 2022 12:01:01 -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=YgsPJXd5; 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 16E3768BEE9; Fri, 21 Oct 2022 22:00:45 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074078.outbound.protection.outlook.com [40.92.74.78]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 48A5968B8C1 for <ffmpeg-devel@ffmpeg.org>; Fri, 21 Oct 2022 22:00:43 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PHW64zvo+lYUdjrDqTS9Br6b6ujLdH8RCZSSpQM7dq3WAWbCC3Bcpc5w0CODETVgolm3PLpW0T3tGVO8tV9L9gd+773nr4Lwq0b9oB172Us6QM9vAS3nFEpTkbVlyoHeuFLM7dr8ITgxytrrikG5tLrs3u9syKYjZuTWLlbGS9SLPq1T6nxWz0rb1vKdnRicNern6pw8HCdLJQOpsEgelifIVIP+HEhgxcKCNiZ9m1XW2jOkzaX4U24C7Nl62NpmdHqLg67bJWLHHdhkN3o91VJexACOW7LK6aavfGRGSRP5bnOUi8YgIYo+JRuix9XkyVNcq5r8yB4EABpVGYbwsA== 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=A3+dT0vFPNJJNPgIw9pDuQENr5VusOpsnNB/nKpFrog=; b=dS10f2j8OEXdaV2eoFM0evwSlQdfXBiYY3qsc29JMU0/EozyeSPofvsZm1pAwJgH6MyntW14ar3zQI5LLevjjuPktrlmvDYbxh7t+RxtGM5dHPgXuuPUFAtsdmM9Omp7WfEdxkfObdrnrEBTf4jvZSFhJxIaEvXhZGZMV5+7jOk5nHks1YfWi/HYsnmYoQc9xrJiOuA9X68wy6IolqRNFWlUc5bII6Z39fixQKF0xErJ1iQ+wzQ6KTJe7iamTyFz2sJIvbay9c45W3kcxYxjesVt9+dkIUw5Hn8CI4XbIYrlcikCKFdm6gJmuou1om7wntJlf8XEKmGc3VIiU0I3xg== 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=A3+dT0vFPNJJNPgIw9pDuQENr5VusOpsnNB/nKpFrog=; b=YgsPJXd5dJrqkQqx7EzSE/mfmEJpNqgGhlkp01anFFIIWAXV09bkQuAvAaGfcD0Tipc8eaqnxlZSI3/ZsxAcfDOUWwn5IVhekvJ2f073N9+bAZlfjipy0a1m78/JXmfu/yfLX+H11XliSusPdwj1Ko63NEToy1xy7OQmx/X3pHyp9ZIqOZkpZfEwl20/vLuyZGja00IjU6Eupg7maN3pqgEG7Q1Fn0Sn3JpPhJ0hHR7VS2gygTHWcc6tCzKSC2TcJrgv4/3/BItb77ttwyhoh5BFVroDmEjRadsvkJwD0vGHpjmWn4TqkdUticqw26YgcDgHLp38PvbLtdIAyQ9w/w== 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 19:00:29 +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 19:00:29 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 20:59:38 +0200 Message-ID: <AS8P250MB0744C1705DA735763E3923608F2D9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> X-Mailer: git-send-email 2.34.1 In-Reply-To: <AS8P250MB0744FE41BC5B8476814DEFFD8F2D9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> References: <AS8P250MB0744FE41BC5B8476814DEFFD8F2D9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> X-TMN: [SL+BosalTg+56nMWLReaNmtOviDgyeMrqFXRXYcjJVE=] X-ClientProxiedBy: FR0P281CA0047.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:48::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221021185939.3096155-5-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: fed237df-fa1a-4152-8fe8-08dab3968571 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmoyh0/rGpTlCzjnzrUxdxR9YgBmvEyerLZGkzowPvfoA2TIX0CqAsFJiXyHgILeExdehFqyK7O12r7AUxBBOYpaOlXNC9Sx40rJTFtWIyjexWvV0rynJgGAhxE5D8KQuysnAb8C9sSRctLpX6/U1gLzIWabNH8m+4wlKSpej6enSTj6YQSvOoM19LZOmmDIfdGYWdVO2E+ZpdsB2k0/In3FRvcFsup5v20SPbynnuJ+FenOZd49Djqg62qe0oiIdNwaSZoEEzySvjYfbHfX9LkmrA41ndDX9NHHAUN6N+1u9DoLg+DmQpHYZxtvpCAqLV5UxLBnAuYulWzgeHrA6x0fuMlomaBkuQvzMWqjgX14JTKODN0p5c5S63NlXmaPKdgAP1iMpwWSKHlyt4FG9fOBLq1jOEzXpdbLrHPUXK3u0YmjwlovNR/WjhxOSSJHvJsOhhRTpil5zev4BtePnmmR4wUt+/Vjp6yx1UpLvw0mWerHX8SIxZzQ1DstS8lWS4CA5qZf+/1GiunQdf9kwEgOGVAv745JRy8zIkcnWiMEXNC/FGdDJHJUS+NxUcQy33nWDN86QIBYfj22j8oAtap0DjklT8V4j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Ry0fU+B7/u4+0PTtDN4LNmfoKYakdoReUFtWvo7qQrEFPFuTjq2Qsv2HNHEaPm0cA9NyD8d5FruRAFZjt5ib9tBESp4TRZD5Ew1SPun3fzPGtppDrQzleiZ/uidZ8CsgzewLHJLFtxBGUHA8EH6Bu+cjn/c= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fed237df-fa1a-4152-8fe8-08dab3968571 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2022 19:00:29.3500 (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 6/7] avutil/integer: Fix undefined 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 <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> X-TUID: B9kq7zm3/GOM |
Series |
[FFmpeg-devel,1/7] avcodec/snow_dwt: Fix left shifts of negative numbers
|
expand
|
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
diff --git a/libavutil/integer.c b/libavutil/integer.c index b709c6d487..a692c3783c 100644 --- a/libavutil/integer.c +++ b/libavutil/integer.c @@ -103,7 +103,7 @@ AVInteger av_shr_i(AVInteger a, int s){ for(i=0; i<AV_INTEGER_SIZE; i++){ unsigned int index= i + (s>>4); unsigned int v=0; - if(index+1<AV_INTEGER_SIZE) v = a.v[index+1]<<16; + if (index + 1 < AV_INTEGER_SIZE) v = a.v[index + 1] * (1U << 16); if(index <AV_INTEGER_SIZE) v+= a.v[index ]; out.v[i]= v >> (s&15); } @@ -158,11 +158,9 @@ AVInteger av_int2i(int64_t a){ } int64_t av_i2int(AVInteger a){ - int i; - int64_t out=(int8_t)a.v[AV_INTEGER_SIZE-1]; + uint64_t out = 0; - for(i= AV_INTEGER_SIZE-2; i>=0; i--){ + for (int i = 3; i >= 0; i--) out = (out<<16) + a.v[i]; - } return out; }
Affected the integers FATE-test. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavutil/integer.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)