From patchwork Tue Apr 2 01:35:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 47712 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:9f96:b0:1a3:b6bb:3029 with SMTP id mm22csp1083760pzb; Mon, 1 Apr 2024 18:36:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVIqhLw0R9ujcQ23VyNLehjVBfmnIaKFK0XHyLKLxvimGIK4P6xv//1m6vHx51DrqWTaRIeikKFr5P9HgdB+VCVPYAVhjASdwBTTg== X-Google-Smtp-Source: AGHT+IH0HKphbjTaWU1IhA5B3dhZtk+CkrG+syICP214RAjqXNNKTxQkcmS88Is1l3hEmCVISpnY X-Received: by 2002:a05:6402:268c:b0:56b:7f64:86f7 with SMTP id w12-20020a056402268c00b0056b7f6486f7mr10092772edd.3.1712021763828; Mon, 01 Apr 2024 18:36:03 -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 r24-20020a50aad8000000b0056be4885eb3si5025075edc.588.2024.04.01.18.36.03; Mon, 01 Apr 2024 18:36:03 -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=jX7yS62l; 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 6C01A68D01B; Tue, 2 Apr 2024 04:35:59 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05olkn2102.outbound.protection.outlook.com [40.92.90.102]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 37B4068CFFC for ; Tue, 2 Apr 2024 04:35:52 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cBQI9h6Wsr00BAlUY8QmpFmytMEQg7zRK29PmuHGnEETj0UJrZCfwL6NIU3tfduRWSM/pxf/iCU4B367BtN+rHJamH/J0AqpBOgnulKChyOBjoBx0nrQRzMNd8bfQc7LN71za3ogJLYUk5htYZC2SRQygqBUuNtoTmC8X+irW22+/NbP/XXgIQy7htk6Pn6TQp4iaBSpCX2yJ9US4W+EtbeFiZqAH3RY7q+ohE7UsbCoh718JpXZwkI1SGyU1bOkmcDIesSx7HVl/7T7c2DvaVSPzUYqQiTBhX1425U8ee0NNzG4G3fRsCPmnE6kgCOO8Ge0X2yC8YYd8LVKEgqnrw== 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=rOG/cGR0VgHhqqQd1kkjZ5JKeQEswLRWHpCoWhvBFMY=; b=HxjXQmnDcCgfuBY46uzvsjLl52GDNN5BTOisxs8yv4EgCg3EAP2J/VznqKJYDExgG+j7Yp3jFEF7eJq4NpHJaE+oXevyPJvQxH2eRRC9i+jlkJ2fxP/5FcoE5PEDveFzU2bw9jQXQjyFFQE1PeUcjHAWnJ6p/pYL4PByIDrAxR3DG4960HHZOJfl9Fl1k0asZDsNv8XMmLe20Gt20NgoKtLIRW6H0DTttkzjsxtR2Xa/4nsLHitWM4JEUwA6em25KKKnGI3em2Ak7opDO4akK6QdseDHFS+6jqIPtOQrjK5C+tkJgsaSU8twEynpv4wyE//yBKBZSdregexL85bhgA== 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=rOG/cGR0VgHhqqQd1kkjZ5JKeQEswLRWHpCoWhvBFMY=; b=jX7yS62lQ0E44dLEdg6anAPxLvxZABtACm8jfVI9eJCj3QCR83xSiEId8Z6gcmsCsCOnYTo31wUUPGky+c1raz7KCvtmIV4U8Ex7nTspJ8L7xKbjI6UvUAcgL2IOUF9n54RROCAKCvzcDBtifgfWl+mRzz4xsz+wdY9rUcbz1IXb5SlV9MZsQLwPPSNf9YwhjmJIRPV6ukiLusFrc49/yUtR6ra3kLOeHw10CoQJYPXv2a+Ec9yFQIBmZyQsqKLEV9oDaKvbUFN9UjcHolyn+JgoyrSdd87FEiYiS0+fhKuEpz1Mgm/GWVKk+yvwiF+I4+RF6vJYV90u9lS1DsovnA== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AS4P250MB0416.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:4c3::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Tue, 2 Apr 2024 01:35:48 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d%4]) with mapi id 15.20.7409.042; Tue, 2 Apr 2024 01:35:48 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 2 Apr 2024 03:35:33 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 X-TMN: [JlCr6+V4fucv1HK4aHHhszsgC+fDViGKe+dt87Zjqg4=] X-ClientProxiedBy: ZR2P278CA0082.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:65::11) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240402013539.1509586-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AS4P250MB0416:EE_ X-MS-Office365-Filtering-Correlation-Id: ffa35065-e109-441a-ab96-08dc52b5396c X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: elEhaxRl0CKPH0jQZ8Pss3DWt/R+nZDIgp7AnDbcW8LCb0EQsX8QSqTQbbkCmHGO90Vc9aOn/0Z1B6OAUgm1wHKZ6dSknnzjq+bA35x/uw9h/d2vziQTQz//H3C9xbpZca09msDL3wCLZA7V614mFHsCZW92gLjGVyvfA0Q+YNJOlBPRcg9I9FRI+bwtQnDDzj1EdtucvOOxHt97S5d2IZC6WY0bpvg50fwlF2rQXFqwRYQXALlCWHERpRpvtUtQ3ZLSmPeguqsH18fhOzfIUcK88Y6UiTpGsl3VaQY2GceEQ2y0FR0PyIxu1sffVbc+ROCnmPVP2icnNI4KJTdKcR0mTtGV3+r8JixhcmoXZ+bHSZivSTRiBfn3Y0Nvk6uowFl5UMdV27fFRewACMsYbGuMbWnQ3vYvFl53yEQ5D8ax/fitzi8c3FGLAyJh+FAOyAIQ457j9dWOLEk6U1q7l9GnR4jZ7cP0ASBDD7iGI0IzT6JDcWS3K/2FLKqnJ4qghlaT1v5V+vqgs7tfW+lSA5paxnApMRHJG+GXq0dgWQu4MyZdrDYGZ6w8nd2Bx/h9nv93Zo6qhTT/Z9l5nGe99HWjS/vfzArZ/IJt6AZD36yKw4S/ImEstII/LRIdGt9G X-MS-Exchange-AntiSpam-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HcJgkFF6jO/JushzpZzvjIDYmRFimHMTDI+GG1oA2U3fxdfkDUM9lO0/azJvuoJOOQhbTqbTEVbIohL25q2Z8tIslaKjrJLghJxvV5Xu0Wq/+FkU+YWbeEyNasqwFe1WLFvEGrX6TmFP+isEX6VO0LXwbJoTYdek+YeCytSktW94Rszd+6uo6aYKpE8yQzRdKyRhwhlcExkG5f5xQYLeB9kJSqLzgC+vPwRXKbLWjzpCrypOVOVJDZI1esmbmrDw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ffa35065-e109-441a-ab96-08dc52b5396c X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2024 01:35:48.7950 (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: AS4P250MB0416 Subject: [FFmpeg-devel] [PATCH 1/7] avcodec/wavpack: Fix leak and segfault on reallocation error 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: r12nQA4KG3UU av_realloc_f() frees the buffer it is given on allocation failure. But in this case, the buffer is an array of ownership pointers, causing leaks on error. Furthermore, the count of pointers is unchanged on error and the codec's close function uses it to free said ownership pointers, causing a NPD. This is a regression since 46412a8935e4632b2460988bfce4152c7dccce22. Fix this by switching to av_realloc_array(). Signed-off-by: Andreas Rheinhardt --- Actually, one only needs one WavpackFrameContext at a time, given that this decoder does not do proper slice threading. Alternatively, one could implement proper slice threading. libavcodec/wavpack.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 7e60a1456a..36bd4662e8 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -973,9 +973,11 @@ static inline int wv_unpack_mono(WavpackFrameContext *s, GetBitContext *gb, static av_cold int wv_alloc_frame_context(WavpackContext *c) { - c->fdec = av_realloc_f(c->fdec, c->fdec_num + 1, sizeof(*c->fdec)); - if (!c->fdec) + WavpackFrameContext **fdec = av_realloc_array(c->fdec, c->fdec_num + 1, sizeof(*c->fdec)); + + if (!fdec) return -1; + c->fdec = fdec; c->fdec[c->fdec_num] = av_mallocz(sizeof(**c->fdec)); if (!c->fdec[c->fdec_num]) From patchwork Tue Apr 2 01:35:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 47713 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:9f96:b0:1a3:b6bb:3029 with SMTP id mm22csp1083813pzb; Mon, 1 Apr 2024 18:36:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVDVj0uTeA0olYpGr9kMJIepCmx64DPtktYQRzjEBMyVYZb/MNIHus+yGmtTPgmBnWbESXdm941wj9QR/eo1B2DH5owt7j/1+tE3g== X-Google-Smtp-Source: AGHT+IEKWwGTnDCYKMBeoZYOdHvBdeJh8CjVcm9gGmjjuUTfr2TkQn3TsM+yVlKzaV5gFGucWOWn X-Received: by 2002:a50:f603:0:b0:56d:e947:dd52 with SMTP id c3-20020a50f603000000b0056de947dd52mr18905edn.26.1712021773289; Mon, 01 Apr 2024 18:36:13 -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 q10-20020a056402518a00b0056c2cd0ed51si5168205edd.420.2024.04.01.18.36.13; Mon, 01 Apr 2024 18:36:13 -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=Lr5VFDJC; 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 AE0CA68D056; Tue, 2 Apr 2024 04:36:04 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05olkn2102.outbound.protection.outlook.com [40.92.90.102]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4F2D268D00E for ; Tue, 2 Apr 2024 04:35:57 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gVnlRtrEvG563cpwm55DnpCgWKBzrM4yAxyRtlgT4TUuH4Epl3L2z0Q4a2NG5qmGK+fpKqT2/JBm5eeoC8stP67+nRR4mjIVzZJN5ED/Lp6hwNAupGaeLS6AjSbrGTbALRtPwz90awfVfZNEh9T/d6YZ4AFKH/7YoE4elGTseOklR2fJAYr6y3Jqpa2qMXibtsWs0Mb/E399IpiJt+URUDRzIxmHWjSN228Hcb2B5DtdGx/2LnIVzDkZBkfWZ+kRnzWOwft6oqQOQHAtTzY3q8bVpsz8WjNdT/hOqPbI1ErRKVlFWECq/WZ5S1zgoKEDQq/HAaNwkn7dNP8xS5yFHw== 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=PIwhs/jJAqlZrjljSe5UBAq+JpLOWWNkrweSe5v+o34=; b=TXnrwH7NQ4HY3ZVqNT4je9m3xHZjmcxIYVMEoWHozJYmbnXAD/N0rdBCfwoNjT0n57C6jyhKjziNS79k6WnZletgGGjJ64j+0Shbsf8pmJwChSkpD+rFJGa/rS2qN8vI+FfBM7pDhg0hUTmBHGtm7CjqIUHEk7s0envK1n6cdPlgr0WP8PHMz7WdWldRTOjbzy9UJQ5mFXKLMYw8Zw+y1seXanrhnko6x1TvheHU++65Khx3Pe3VIZQDbiQl+0nfaNG9aUkyJkKHDxDiRi+BKXTJ1N9VtEoesFCtii2fWL+zx43JU1/8QaGiZWZMTGxKhgB3AtaI2AiMkrNa+Z3sDg== 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=PIwhs/jJAqlZrjljSe5UBAq+JpLOWWNkrweSe5v+o34=; b=Lr5VFDJCIPrXlK4T8t3Ht9DNgAZsIJoWY5/OlD04nVA0UhLeBks7NMAy2KsOMBXLg26CVFh4FoGSOwNf9NxbtE/1NWXHnXALfeccoZ6AeHvdpmHFZKPdPF63+6ZTAw7PAGUj3cfolZCZXy/rSbgYywSiTK8fct5BCVcjS1+fIkd5zrEJmCJ0TKdrmFFmMRStUSxDst3HbYevyV/4mFGDzrMMdOKSKLxTkwFP9DbSTmETBQ12dBd4diXkXeJQm2YgsQiYHmD3ootpEDrk64qOnutpEknqKmz5BKYWEEipf1fax1gvw8RnpFHW+N/4O4fHwMBXG83DiwtNdL0TNVM9aw== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AS4P250MB0416.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:4c3::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Tue, 2 Apr 2024 01:35:52 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d%4]) with mapi id 15.20.7409.042; Tue, 2 Apr 2024 01:35:51 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 2 Apr 2024 03:35:34 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240402013539.1509586-1-andreas.rheinhardt@outlook.com> References: <20240402013539.1509586-1-andreas.rheinhardt@outlook.com> X-TMN: [Ir+iScoPFt0xu6M3aCZ/VMyTj31X9xdO1xyCU/EVSPw=] X-ClientProxiedBy: ZR2P278CA0082.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:65::11) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240402013539.1509586-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AS4P250MB0416:EE_ X-MS-Office365-Filtering-Correlation-Id: 541333b3-fded-4669-c156-08dc52b53ae6 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DhkYhIT85OThB9cVCRL+Hp+7UvOfHUeaZuVgiZ4AHlcz6Hfkqixc5hqKPxT26vSRYO/vO/Bea9BuIZ7ZwOWsb3oow+mKl3A1omp24aLQ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zmfjb9OBreizPdCrwqh/64iI6WPq9Sw0p+6cLT6chQmYqA72eKJtR1ho9DfuzTmqoFAjb/RvELDaIifoi7Z+usUjnzzPEoJvl7XclS3ByAsb8kujc1bfaeWcd2CabF3uaiaiOHEsW/xsnttKa5OHxwxOHzcpwAIgFBft9CKFDQcKsR2eirQf8RqTwQ0CVI+4aAz+5zaaWQDWhX95mp2OYbw/5JPz6YOEB0NKL/IHQqNLAgP1YkIFv+4xY7dBX1zuHBzFzOW2FTEjhQMVyx/EhchIvqxXixMj0n1U7+PjfykuLHiIPUtCZ9EwNFf3lYHCkhZMnDU08aWMbEHtNIMWyuMotWd7E5sRKmA/cYGR7XcHnq8TfO6lB3Yl9L8i9Ei2VtBYK+Hoxhv9YAnke+8QUxObFbuka7PRsEmkIE5A0mk+wlhaQlT4IwdIvh1O5mRy1jwCIOVeTqADSbRN9tsj+dF3On5iAX9SR126Xz5126zlqCDcpnRYyyz0BA9uBg9nyP5jYmcY0AzAFl0FagWthOwOMI4OGZ8dpoIKoYmpzcbMepuYLgmJch5I4FLcV0GiW/UfCzjKHRaZ7rEhNd1XlJjWliLiHIhZkCm4pUn6EuBCWX397q/rk8Y3wdblUDhU6w1FCVD2WwsAvBxw9Ac/sHxXP1c5PnNX2WUlSG13IjIq9V4EVgiOQtco69eJFKR0S7V48C3RlVo5ykkoLRhMOsmdXg0ztK/w7PCTniknsqD6ex/2/Sdi+ItxUvYB8iWv272Vns4hPuWjGl9EY7rKzkKKLlogWpjGOsQqvhYuaytxA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 541333b3-fded-4669-c156-08dc52b53ae6 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2024 01:35:51.2722 (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: AS4P250MB0416 Subject: [FFmpeg-devel] [PATCH 2/7] avcodec/dsd: Use double for LUTs 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: v36trz4YHxGT Needed to make DSD->PCM conversion bitexact across arches. Signed-off-by: Andreas Rheinhardt --- libavcodec/dsd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dsd.c b/libavcodec/dsd.c index e039302c99..ec63a706f6 100644 --- a/libavcodec/dsd.c +++ b/libavcodec/dsd.c @@ -68,7 +68,7 @@ static const double htaps[HTAPS] = { 3.423230509967409e-07, 1.244182214744588e-07, 3.130441005359396e-08 }; -static float ctables[CTABLES][256]; +static double ctables[CTABLES][256]; static av_cold void dsd_ctables_tableinit(void) { From patchwork Tue Apr 2 01:35:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 47714 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:9f96:b0:1a3:b6bb:3029 with SMTP id mm22csp1083837pzb; Mon, 1 Apr 2024 18:36:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWjXc+XWKwAChJomjYsCv4BUPTCz3zJNA7xAXgZTHAkBkUlPTCH8eanQP8uIiea272fMVHjJE2zCkyLJwAjinct2qxmtwg87M3mLQ== X-Google-Smtp-Source: AGHT+IGQn68xDAp/xqdn7sU4PQS2utRLckl65rcGD7eOhAVro5sN4Ze6HidFYJ+VY9qR4w3eUvKA X-Received: by 2002:a05:651c:1a2b:b0:2d5:acde:9065 with SMTP id by43-20020a05651c1a2b00b002d5acde9065mr123210ljb.34.1712021781440; Mon, 01 Apr 2024 18:36:21 -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 kn16-20020a170906aa5000b00a47474bb9a9si5145923ejb.673.2024.04.01.18.36.21; Mon, 01 Apr 2024 18:36:21 -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=Y0W19KZR; 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 C3C0768D076; Tue, 2 Apr 2024 04:36:09 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05olkn2102.outbound.protection.outlook.com [40.92.90.102]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 68A3C68D027 for ; Tue, 2 Apr 2024 04:36:02 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eON3crlQnRyTNXWXewBGepHtU/TAqqQ9ltvpT7WnNVJr2UE03cN/9cIailbM8URSwoU8BDtLY7X/Zw/KWhgzkhCGbFLSBasWfKHWXCd6WKFlKO/+VcTUifmmkOfPV3Phjk3vn6K2zvwP8Cp5K3zWn9/nNNs2vQwLtpxQXHqWfLV8ax3jfr7glyzJUP6vliSwc+PDij8nhSGkT5Vav8JhoHTl+yv3ty9K/qxqt2jqbrsRqkdl3v1M6OhRt9t2pZM1ckWBKkDK2Ai3+L+MYA2CsqL//2Gx1zA+JVae+h240rWxdkfoFhVtQhDQzbxyfe2MkbpCogM22uQ+geYzgd+Rfg== 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=olbaJubQ/FVwNT+/2poXk4VyCyPyCBH21CF9okX/9eI=; b=JkuhtLr7yWjWpSb7LToi1TKTsmB5CSYUh9bybU75WEff0FHFxS7RIMQfIUS6gdNUzHZI6gsx8MFiFpM+fpHq1tSPMsadQS6f3jM0OcuYC0bb1T6kON0KgHCFPRy3m/oViggBDPE/9OvHnH2IABQ2M0v3C17pdt1wgo+GYviPFOgdZklfL2IX1LNQnn4OH74l0qbB9RGMFwpQ+vB0D6KGmPTvCdyVKixGpei+6lnsRg1TwGfn+/sAeRkCp8+vmMh5lkU7MqPE65eVpXnT63QDjGSEyrEiueH/dunhf02XrSKS3UpPk70rHQQArxAPZhHso3wHCZXOWO9zpPkqOvXOLQ== 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=olbaJubQ/FVwNT+/2poXk4VyCyPyCBH21CF9okX/9eI=; b=Y0W19KZRcvOAwHO1NpP8R1PllJ1Q8E7B/nRjQ5beOcPGg98I2pJsRtB5P82Kv7zZCHq/Lt3yMoefpnobbD5Cdjbe68lKWeq7Nm5Xxmpou9h3xmwqn5LOgMXPawXx81eW3Y2nhsAqLIxsMStfZgGUnUNc7Yy9kMFSNWjhPdvH56mZzTtB7GC6O9zQww6jlKcupgG/v5Oy62Z7bZHIVAn4bxyo9XTcn8TptJNXwaSUXqcVu/onJtLlJWmwxnLEIo2nvD4K8ouMVap0bUMqrueEUnyIn7PeE+hCceB8NW1PRMdOsbPKXJFKKURoCF0PDKlgqg4d7MJnkcDOuBN3dXRR1g== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AS4P250MB0416.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:4c3::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Tue, 2 Apr 2024 01:35:52 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d%4]) with mapi id 15.20.7409.042; Tue, 2 Apr 2024 01:35:52 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 2 Apr 2024 03:35:35 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240402013539.1509586-1-andreas.rheinhardt@outlook.com> References: <20240402013539.1509586-1-andreas.rheinhardt@outlook.com> X-TMN: [8xz1Sx59357xn+d5KS4S1q0Ipj7KU25m2usTq6379gk=] X-ClientProxiedBy: ZR2P278CA0082.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:65::11) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240402013539.1509586-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AS4P250MB0416:EE_ X-MS-Office365-Filtering-Correlation-Id: 7078be15-b008-423d-4498-08dc52b53b86 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G4hMeGCbAw2rN/MsCLvX8Y4Tnm2p/gBPt+xf/vKcI/W0a5nLFUM8iJkxcQRpxbuQYxGxSvg0VgOFb8HKptmVx0Sz3wCd5KFcFo9VPbakIUpYz6fbBf6qAI2lrKhMs4Kt0qjAgf89gzzQFRbE1MuIBsvQ8u49YbvMjAKep84Szu/e3CR70cR7Yk1Rt9Q8uGPxh9CHWf4YoQMhjzvkdBW86bHxlxNOunLuKRktlyaGkjJ/z22j/aP97QzE+C5la6c8oaLUWxyD5gHkn2NahhUYXqxM79W/mrSkd6IvmYCKKYuSYYhADILz7B3TadsfilLBHb78AMxw20QkLRVa8IDxancTz18jIzE57SbUnuPcBlw1G1YoWp0w8UnnQMvBuxdHmiaqP0mxr+sTdX9pIsoCtGzHq2RsIsk69+Bv4TPFZwbaJYO40p0IndSbzFp96mF+mpYLbfuq1yh0OG3zCKU44Ye+wewIy+PrtVNsy5ntNPiBhZqdXP8w/oDH67Nzvypzd8dfKwze6liZQEuFgrKvulKbBmv2moq0rVqcGvqnO2IYT4KMhUS9Fj5ptJnTUTJIq6PjHGQDhaCgjeHZ0eJWbQEueUqHkQMUCfGaGWshoREi3zlvPw64yT15/L8Evywj X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mvZLhFRLgI3Ep1XJbTD+fI/fxwQ/YuVdw8e+QZ+pkMcRqXD3x3+09Y6RH5HEnZjHk0nb4lhrW6yl66Bw6nFYcPyeuOtFUZgYsz+Z/ERFwZs5rygbp4iZYUKLw4l/UmT7hbDmHuNBwQuWHPKKocXQfszOzfbBHESqV2fy6Tifg5mhxw7K6937/qMydWw0YDOCRXXP9mDWegNGpG9a0subI1DTW06ga3KfzC8GTOBFHi3joIW1vSV4bu45vSXkrL4rvRtui+03zdipjxx8QV/1cP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Tenant-Network-Message-Id: 7078be15-b008-423d-4498-08dc52b53b86 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2024 01:35:52.3088 (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: AS4P250MB0416 Subject: [FFmpeg-devel] [PATCH 3/7] fate/wavpack: Add test for DSD 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: uimigLkCkSyL Signed-off-by: Andreas Rheinhardt --- Tested on aarch64, alpha, arm, mips, ppc and riscv via qemu; of course also tested on x64 and x86. tests/fate/wavpack.mak | 3 +++ tests/ref/fate/wavpack-lossless-dsd | 1 + 2 files changed, 4 insertions(+) create mode 100644 tests/ref/fate/wavpack-lossless-dsd diff --git a/tests/fate/wavpack.mak b/tests/fate/wavpack.mak index c684d93f99..41e1b0afad 100644 --- a/tests/fate/wavpack.mak +++ b/tests/fate/wavpack.mak @@ -18,6 +18,9 @@ fate-wavpack-lossless-32bit: CMD = md5pipe -i $(TARGET_SAMPLES)/wavpack/lossless FATE_WAVPACK_F32 += fate-wavpack-lossless-float fate-wavpack-lossless-float: CMD = md5pipe -i $(TARGET_SAMPLES)/wavpack/lossless/32bit_float-partial.wv -f f32le -af aresample +FATE_WAVPACK_F32 += fate-wavpack-lossless-dsd +fate-wavpack-lossless-dsd: CMD = md5pipe -i $(TARGET_SAMPLES)/wavpack/lossless/dsd.wv -f f32le -af aresample + # lossy FATE_WAVPACK_S8 += fate-wavpack-lossy-8bit diff --git a/tests/ref/fate/wavpack-lossless-dsd b/tests/ref/fate/wavpack-lossless-dsd new file mode 100644 index 0000000000..eba76df518 --- /dev/null +++ b/tests/ref/fate/wavpack-lossless-dsd @@ -0,0 +1 @@ +0b33207f1ec7e47333878cb8420c21ce From patchwork Tue Apr 2 01:37:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 47718 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:9f96:b0:1a3:b6bb:3029 with SMTP id mm22csp1084288pzb; Mon, 1 Apr 2024 18:37:53 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWzp27udponSsSJsA0Sv6twVjAK/rAVp+V+ditcmEwG7gV7rTq0/NcRIxf2/Y8is2ovhYjZXGhQgvYai7gyJ9fQGu0c6l/RzdRnKQ== X-Google-Smtp-Source: AGHT+IEF16vTk1vUrOCwakGF5XyvjvZfwzlBphLCMTuQRiHiJdXVrjeKOzn8mkgF78lu47XY6ee4 X-Received: by 2002:a2e:80c9:0:b0:2d4:720f:6f46 with SMTP id r9-20020a2e80c9000000b002d4720f6f46mr5849267ljg.15.1712021872907; Mon, 01 Apr 2024 18:37:52 -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 fd5-20020a056402388500b005656776bf67si4914429edb.655.2024.04.01.18.37.52; Mon, 01 Apr 2024 18:37:52 -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=nHleam3S; 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 4F00A68D092; Tue, 2 Apr 2024 04:37:34 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04olkn2066.outbound.protection.outlook.com [40.92.75.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 45DCC68D083 for ; Tue, 2 Apr 2024 04:37:28 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B/zBh72E/ztS3ZHsHuwVfnPmJms7bqicctkd9vDkV8bCGehUJKzAkvczG7lceRPwXgyY8ti6NL+xdsGqOHYPHK90Hdv6DxQwQnfvvFqZwlO5SUQckgoibqpa19epIHsqBt8v6x8yqBhXdl8lEbPIwEELyvv7Otp6j2iIy7/qumO4bIhLSxRfqll4Zefj6G2l3Ds2iH6gIce3tceCwlxV6d05qMizOmcs2t7wGGdnZHVrmhEgIf8NDB5Gvt7V5BbGNDJ16c4m2UW9pPUGX4zaaRwkV32THSRiJAh+t1GHQvWB4JOZu4NnaJO7zT5y4s20uOCdYNhN8ACX++Kuo/3Zvg== 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=BbENm5wnbexCZbFGPkhvKtUke+kh1WuqqLpMfEyd7bk=; b=E3ZaMlcwPf7J0oU3e9/sElS6ITayyhR5P3t5uD5bseE9NCJymUum9xvBPqlMcGFKeDQgyBnxasx+BUVCFkPojf5E6zIO/OZnOLmoKqwaHeupQFOAGnEwu8o0l4NhkQAXtUwQ99gCLc66nyhBzAsD215+28VduUsVVs6NijaNeVNO1eLLFiBqujdJYGsaQkJgy9MVVphF5YhmB7hqk9cnN3+hb4truc4SjH7n0zy4qzpRovpra9cXgugossl6GY3YJstXOGq6ToZSlC+v14j+TLElNWCA5y0ibmbOCxSV+zRKWkcY4rWsoq47dQ4JaxzjzY3V+WZMvFlLUND7VO813Q== 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=BbENm5wnbexCZbFGPkhvKtUke+kh1WuqqLpMfEyd7bk=; b=nHleam3SP5yIcJyu7txIcOhZzIhFh+fqRdidSg/vTtbtahHgM6df0/cZZWbSByFyPEBsC3V/36I7tNpW6hJD/bFJX8zvkKCqUyERYppwud74b/oisKxW5M2l6puTErKHIZ/0okkIS+rv4oJobXc+/67Pt1Z6vyvveoFoLxXQZvm+MnePb0AIuJ0xVOSeVtP1Vl5zXLVyHLlHjuPwAS0Cz5yGeJJEiXK5mC29VgHnwwqfBeNqY4k1dTqPWRWq07wD6fCZ5GzuIq1h/kTdkPaC98DWjiAwNLAgHRGFWdD0DhV1xeoxzxB8XU1Vkv35VN8A/IUNVsKF+wnNqmgMcBXudw== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AS4P250MB0416.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:4c3::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Tue, 2 Apr 2024 01:37:20 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d%4]) with mapi id 15.20.7409.042; Tue, 2 Apr 2024 01:37:19 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 2 Apr 2024 03:37:05 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [/iaxq2hrlg/3irVSmdUCoU4+YJlDQqd9SEnK+5eWxyg=] X-ClientProxiedBy: FR0P281CA0191.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:ab::14) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240402013708.1510327-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AS4P250MB0416:EE_ X-MS-Office365-Filtering-Correlation-Id: dac48f77-bc58-4c95-0cad-08dc52b56fa1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nP9GEonRxcGJ8yPRZQ240mh+NL1imHdYMgNlVx8W5/w/c1ewTZ/UfRVUEm9vnt18k0fAvFFn93CHqyqRRiwQ66Yjl/u4GQssHM1iDx/sAA6ZoM8vEalBTNGJYX05FWr/xs5iNhy0fClEb8HaMwShi9lWxYXD8dsZTFYk8dmK/2EAPUeTVbHEzl9Y5GRtpuJjl4A1oCGGJzWWHYEzHee3GKHTwu2oNZGpHtYoDKAgCnMNe3SsRH1KuTlwWqtpyNeozP6GhdRPzL6G+Y3TTpt16Z9FbzxIn1yUD08i8/Qctoj5yrc4J3r/DERyYl4ftEW7z5nPiK+JqOW7xJNI3YOjrhAVpDQKNfkCck7fmkOhnPKcNYBUlGa0G6kAWuqA9kwbVLjAxvyNlRBS4vNUjmCN9eJ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LBwcan4YOe5TCOjAQpFImGjeUY+p0H3RbKPIJ4JLx+tNhaNmRngdphUSau1qZRvLho+iYA06XnDJBwwVg0IFnvLHYZWSGOV3xoYlFRrUzTjc+gcowK0gSmmDNnl54Tavp5WVSirp2rvzi8s9K3set/Z2Ryvb91l+guRO7L4zIcsOjcIm3jGyMTdNPRawm5x73npfTMjgZa1v8ceCf8pVhjI8b9EaVdG1AbXsZAOmsYvcTRuwGXzBiwZme/+bDJGwliC4K7uMYuaYbDTaDTyxL8OKSbIwyCm1OthF6MM8jF4F+hlUxFmDQodtLfwVqE5+EbBKd0JrNh/tOxruZRI5o/TbScR6b9lWhX7cpq4ceTrww8fJTD/zNiPKIQ0GsQn+Ctlz8P2wc3azikTHhUFF3Own81O6EB98eZuHnStJiAqTgwJc43RDKeyWec+b+6kIUKfrf3NDzlhGIRsjTUilrjcQB42cRHQgx0/MpNNJRpUxCtPZNTHdsBv3odnTs/GOkkDjYJZSHw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: dac48f77-bc58-4c95-0cad-08dc52b56fa1 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2024 01:37:19.7225 (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: AS4P250MB0416 Subject: [FFmpeg-devel] [PATCH 4/7] avcodec/wavpack: Only initialize DSD data when encountering DSD 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: 6bYC8uiVjljx Signed-off-by: Andreas Rheinhardt --- libavcodec/wavpack.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 36bd4662e8..c96c8e0583 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -1049,8 +1049,6 @@ static av_cold int wavpack_decode_init(AVCodecContext *avctx) if (!s->curr_frame.f || !s->prev_frame.f) return AVERROR(ENOMEM); - ff_init_dsd_data(); - return 0; } @@ -1529,6 +1527,7 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no, return ret; } ff_thread_release_ext_buffer(&wc->curr_frame); + ff_init_dsd_data(); } av_channel_layout_copy(&avctx->ch_layout, &new_ch_layout); avctx->sample_rate = new_samplerate; From patchwork Tue Apr 2 01:37:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 47719 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:9f96:b0:1a3:b6bb:3029 with SMTP id mm22csp1084333pzb; Mon, 1 Apr 2024 18:38:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVOPSLCaLrwYz7JfIZMvcmkVMPY0PDxTRzKbP/KUioP6XG4HVOdm52BA1UPME9RGfpD46OjHCtO8gqbMW7dQj55Cfo+e5muAscI3w== X-Google-Smtp-Source: AGHT+IGlVauZeeHo/IFibi+ldiunDw1uF86u7rw+5NQaRjCo8IPEHY9tNwG74ng+BErIySia16Ef X-Received: by 2002:a50:baeb:0:b0:56b:900b:a2e with SMTP id x98-20020a50baeb000000b0056b900b0a2emr7879518ede.32.1712021882180; Mon, 01 Apr 2024 18:38:02 -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 y94-20020a50bb67000000b0056c1a46a4afsi5082010ede.382.2024.04.01.18.38.01; Mon, 01 Apr 2024 18:38:02 -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=TqZDRHuG; 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 4F8EF68D0A6; Tue, 2 Apr 2024 04:37:35 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04olkn2066.outbound.protection.outlook.com [40.92.75.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8034068D083 for ; Tue, 2 Apr 2024 04:37:33 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M2II2a7a+U5kUVtY36TPXPrTXnxpi8Ai9RW2t6c8TeEIL1EWFiijqoQHsgrW3jrEhfrJj2ZCi3zxgCRUDDkF+C9BGNaEP4aGZoS5dXLtj9esY2c3pSyozgAr24R+amVcmYhruUflSQaCgP3nEiWAQ5q811jPo+KIjq0WmhvnvTL0N4SWQkh+K2kHF7LZ46Ku6kjg55GGS+sjhjw4h94MEn67z4gb+eIHz9mUQ+Bqr2tR2JpwagOdRja4qrUkRP/s9uzap4T83YBPTlex1gAuzkOvOZgy82dtWFtzzIRAehCeuMN2FZ6nQA6jb1Njh5mjhTjKpuXb7B6cG1a2LyjHyA== 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=XkubpCHEi6U+ySTHw/movg4hbqqNgunj+55eEUprYrc=; b=Y6l7cxe2FZqal0XP+wdrk+m3yQRDa8Ch/0I6NfIZ6YrJNFS31S3DE2KqYdQTY0jsA3nXmlr4sT+zXmdRDVHwiiiitoczJ9G2KRJODPZkWRTqGoKx5R2UBYVMneOdPaWgfhzZuU9ZRn9pEjqq/P0vQSZrNHJZdRu21Z1jlqH2NNUP7/q/Ngc9HpF/4sK3q04zqwTsPf56KP2P/2iZmt2J+SKBfVETYPT9EZW7voNkEytdYhuUXUc+ZxLpB+7pUaZenIHJDT2qv8D8y3IByOevx2Q22lHHbcZeZax2NLBMhwE/EsTd9dV6yPp0Usbhl/kduTjYp2Te411l9DDuzvHQ1Q== 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=XkubpCHEi6U+ySTHw/movg4hbqqNgunj+55eEUprYrc=; b=TqZDRHuGn4abNus9EvtEntRoI1V+cUd5NiLCmno4KuPxJYgnCH6NeEKzm97+WVe56ZxjA8olT3VHhOq0+kPMR+3qVG5K01bb+RBrwpt83C1uDlaZlB2rGADiKwakPyLbMHXQqLpgHij4R/djDw9EfOM3Asw89M3oluNLNePatzktHnGkIG8CAWmBVcxp5h9N3qCUmROxF7wpADCjFdGjvK5b/NDREONqyXEu/WPjmf8HrVWkXk7l1xueQ1K9dBSHnhOI/AdPf1j5ueUzYbBmnNUbJ8OnCggg2YMPDGF7P/ugCMYdBFI8bMv38qcxYzqGse3tMEM9AVzaAVckjxxz2g== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AS4P250MB0416.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:4c3::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Tue, 2 Apr 2024 01:37:21 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d%4]) with mapi id 15.20.7409.042; Tue, 2 Apr 2024 01:37:21 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 2 Apr 2024 03:37:06 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [tH0x8nFsfgdSONojViDmySA4ruxEfwHwGP7svnEeo68=] X-ClientProxiedBy: FR0P281CA0191.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:ab::14) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240402013708.1510327-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AS4P250MB0416:EE_ X-MS-Office365-Filtering-Correlation-Id: be90a6b3-7b21-4dce-567b-08dc52b57094 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: X8UIo6gYatWWbzScMe2qEa2zPGvle7rCgX997YB9qDdcoIfGcX1X3bzSz6gaoAvr2VEPkO1UwgvfJh/TTOxv16BPeNYvivrqwcolM0BXIKicgA75yotn5A/Ek+/fDI38hqZeBHZTurG1+t6Naa3t6Hw0jOe0JI8n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uLnuDXX0O9EaXyaMLEU49DiGgnzjt1NmTcaztRcxYE4DWtI9HNyEnDzBp+BdxpUojpLbr1D2r7AggQ7n1XFKxlh2e7c1sSIaFEYMKcszKcyLZ01WJGoYE1AtfllUwX0Lo4wxdtfqy/vAIQAA6GT4XYb1CzMT7BfBahtwNJamsgtNLB80uEBJHkKmpMk1CHi8SGm0X1Xzr+uB8ln9ffXkaqHx4thOn1QjP5cDlHpwUli7ruhNK4zwpuf95aJw5LVG2QtcNsBz6ilDD76pbdRn+cCPrlzOAeGHmO36/OZ7zeiDuOcmuoBkCDwd4dSdMJZzzZbjvlDaK7405/p+wfzV/e80PsWIYmshP6hnbpvNwf4l0ZOpqetRKdJ3bWIPHAYmwPehRXJCbOqkfRqPHI87OJT0dsc1y91irjJRksG+5ZxjRTJeaGiTVhrwcTPsxVQB554SoG01+0zN2Hcu+us1p3+mTBZXfAHuJzYFYMFeiAJkYUtBgqf+GQFooTE9gwMSEas4yukKb5r59dOZ465O0+J8xRQ/QRa8aTvqL0hR0fyWNnWB6BB1NsQDt4e6AWNxWK2fyyrX19eKKyhIj5MIUus3zLSEbNMsKKQlbeGEee4/976aj9wWs2ZhXeNH26a/yM6wZbHR5ClmK0fwydNzrfdPNkgsFUekqDKQ54tYIYvRPiUrrD/scQfPcLWFj9v9Zz9P0QaRnzEanVw69HuNDXoFqOaf+PP/hDRat9W8Huwd6kntzHyXcsG+6tyDnQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: be90a6b3-7b21-4dce-567b-08dc52b57094 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2024 01:37:21.3036 (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: AS4P250MB0416 Subject: [FFmpeg-devel] [PATCH 5/7] avcodec/dsddec: Fix decoding LSBF samples 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: 3JrIDs4YFuKY ff_dsd2pcm_translate() works internally by converting LSBF input to MSBF upon reading; its buffer is therefore always MSBF and should therefore be initialized with MSBF silence; but this is not true since e3d8963c3cb5b8cd31460dd9b3b9dba2a2343bf5 which this patch effectively reverts. Signed-off-by: Andreas Rheinhardt --- libavcodec/dsddec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dsddec.c b/libavcodec/dsddec.c index 22009c70ef..2bb2e73b75 100644 --- a/libavcodec/dsddec.c +++ b/libavcodec/dsddec.c @@ -56,7 +56,7 @@ static av_cold int decode_init(AVCodecContext *avctx) if (!s) return AVERROR(ENOMEM); - silence = avctx->codec_id == AV_CODEC_ID_DSD_LSBF || avctx->codec_id == AV_CODEC_ID_DSD_LSBF_PLANAR ? DSD_SILENCE_REVERSED : DSD_SILENCE; + silence = DSD_SILENCE; for (i = 0; i < avctx->ch_layout.nb_channels; i++) { s[i].pos = 0; memset(s[i].buf, silence, sizeof(s[i].buf)); From patchwork Tue Apr 2 01:37:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 47720 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:9f96:b0:1a3:b6bb:3029 with SMTP id mm22csp1084371pzb; Mon, 1 Apr 2024 18:38:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXSOzIozyK+aW4uvUYXSvUpam5r+rRdU2dhKSiSdNXDiIu8uu2F2g/0DAjYxQdiyI1Xhuew8MaTu7raafBXWhJPpwjXVCFFWb6Ujw== X-Google-Smtp-Source: AGHT+IHCJ5Nw/ftSd72DhIcM3zNX7URG6hT9H/3ATaqAzG1vREzYzTTF/PvFpuy8ZgVfzUJZalGT X-Received: by 2002:a17:907:86ac:b0:a4e:5fff:5e3f with SMTP id qa44-20020a17090786ac00b00a4e5fff5e3fmr3403255ejc.6.1712021890431; Mon, 01 Apr 2024 18:38:10 -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 hp20-20020a1709073e1400b00a4e5fe98c34si2116745ejc.315.2024.04.01.18.38.10; Mon, 01 Apr 2024 18:38:10 -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=bhns1DRQ; 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 5856768D0EE; Tue, 2 Apr 2024 04:37:36 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04olkn2066.outbound.protection.outlook.com [40.92.75.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 96DE868D092 for ; Tue, 2 Apr 2024 04:37:33 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N7VFCL5itI+I5B+OTAXeX4Ew1v3EwMUsi5pyH0jqpuT0D52jX5Sz82ATbgbE+lwy9yAJIcp835IeD4Dv11EFA3bWHrlF+sYme8W+gvFxnO0639+Sl4DtCw/tCxZxLyYrs5f1x/LpIy0tn3ecgvbJ2YdAROa/3e2ao195c5dzHfvPGHMca8Xsg1MDXpTCPSr+zyZdlrKxtPE1qNSWB6veoxj9nKsBpLoibzGNt19+ntOEELzEkOTyhkTEaGGktwyuVDKhPdF6CIPi82ZwQpOg8f06hL7cEGVrkKz2sXJO2odmTi2peF6DUvAH1f0LyYhRY8gWbsNZvXIP4oQnE+vNDw== 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=skmtGMrFfvpMMGlWgJd9EIf07xwDI2+6F3f02POnukY=; b=MXDSS9x4grFMt7AATzP+dRTISMhiDNEXFMVIR8COKxlmVOaqsldHyUyk9FjMy2Sa+p0ttCKdh8ygNTN0bvrRF58n81a2Mp8DqURXnR3lFDoD7ikrgKUf3YwA+9pTrDfZKd31xrW3oVQrlcpaEW7gGcxI00tgA8awnvkbheAHV+5hDligIAYqk+YbutQ6vrHLFXNPs8Ekow0AZ0x2qmksFGHYjNtQn8v6F2/j70aP2d/GVVwn445kDQFmTINfz6ahMe4B3dT4eh0TGmgWv/3bKXbNFn3f8BvQSeSNWQHFQtWcVK5yk9Jcapn7HSxLAuVfAEfbem3Il34YJdAbeJ+Uuw== 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=skmtGMrFfvpMMGlWgJd9EIf07xwDI2+6F3f02POnukY=; b=bhns1DRQmCX+qS6IUBQV3NyFOKIsERdeIiM1ozOwEaLlR0EPyL/yX64IHLN8zWg7/ODjaK9CIvQsIQqCt7urq6iLlC7SfvPkRd7H6zyfToZIx2CDJYvPANuLyiZxfIh8Vk7vEfDJqoEDgxYfoH8abRlgpg9loq9cjkzVVxODYDJq14TsDMqlT3HyzHw4bvXYX/+8PuHDDNjEAiJnge9D1yGU11G4sCW5s4ZDxddmoXn5EwlzudTvC0O+Pts1lCO1i7tju0LBEq+bjr4WE5Sml17Nv/l3htjwC8Ywzcx/TSLLbJICxuZYgSZLsCErkX9V9sIa9JZSqsnN03L9VUKd5w== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AS4P250MB0416.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:4c3::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Tue, 2 Apr 2024 01:37:22 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d%4]) with mapi id 15.20.7409.042; Tue, 2 Apr 2024 01:37:22 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 2 Apr 2024 03:37:07 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [7r0dnWt7Lu4LWXrh41TLquLR7pehUaMXATuDyvFvM+I=] X-ClientProxiedBy: FR0P281CA0191.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:ab::14) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240402013708.1510327-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AS4P250MB0416:EE_ X-MS-Office365-Filtering-Correlation-Id: 72d49391-266e-4ec5-4810-08dc52b57138 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cEAewtTImZgfVx9f1iwPVeNQpTB3UzQPSIGT+mIjdJe1PSIl8bfcfEBdkjYOo2h7CTbiljvBRluHVKeEGJwXxF9SMKvFAtp3Piilf1xOBE8IQ4G8I69bWHOj3mzkG4FKdH65WBSXd0rGtTV38Rn6nt+f1aeQUBNbs+vqIRez8RKU5kzHtJc4kc1c5/npsDnO2x3Kq0On1cNYuyLdBUdfkIo6+98k1DBvbu031Pn1XWTzsGbp53N/RJ1QrYsTjCTUhYzxzYVL7zFtnL/yfGeJK9RQkyWXKDn/DbPIWk5ZZQGzqgonWd7iQ5Hf0pnOor4FTEzoEWwkWkKfr9xumYJfRkDaWbyHEPC1rHanbXyYBqeWM3qpT331IVzgt4K5lGOTde+JSQG74cCzqVA+GzZxaK7XowwcsXSvCjHxdqDGC90BSPmCyEFCb+wpD5Gh1+MyfIYqZq2Ux8I9UARxYSzZvgn8aBl5lX4TcCwnGtHpx7wSmDNj25MrYabzOThkIAPg2YpLP/2JFFFhIPThH6sS0EdSAFmFZuTbWj5l9OIogxKZ1XXXleUYz+YJOTHtEGxu6sdBF8++pqtLqznXQz9/fvh5MHnsqO0a7JUqSCgg5BKfMOK9Cx4ro1/Xy/x+vM5q X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QS2EzNHpfFY//QqRxFNoY3oOpfnyBSIjdW3ZRTuVmi2FOS+oqynHlpJGz76rr5gVKkcqmEbBXH4dJQtVWo/O8Q6y4I8WDjAYJXhw0LZlx0YSm3vJxw5NFHGiylolPvQsIRZisvzJQkNC/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RUjrL/sbL/sVRBJrWGuJIRAGrELbl5e5QI5mXz6nEG6Q/tAUFMVGIs19VuT43qxXP4/2WZVM4xLwUANQ3Q== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 72d49391-266e-4ec5-4810-08dc52b57138 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2024 01:37:22.3313 (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: AS4P250MB0416 Subject: [FFmpeg-devel] [PATCH 6/7] avcodec/dsd: Hoist branch out of loop 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: fhNM5cCjdx4I This is possible by not converting from LSBF to MSBF; instead add LSBF LUTs. This approach necessitates reversing the initial values. Signed-off-by: Andreas Rheinhardt --- libavcodec/dsd.c | 12 ++++++++---- libavcodec/dsddec.c | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/libavcodec/dsd.c b/libavcodec/dsd.c index ec63a706f6..1093c5e2dd 100644 --- a/libavcodec/dsd.c +++ b/libavcodec/dsd.c @@ -68,7 +68,8 @@ static const double htaps[HTAPS] = { 3.423230509967409e-07, 1.244182214744588e-07, 3.130441005359396e-08 }; -static double ctables[CTABLES][256]; +static double ctables_lsbf[CTABLES][256]; +static double ctables_msbf[CTABLES][256]; static av_cold void dsd_ctables_tableinit(void) { @@ -81,8 +82,10 @@ static av_cold void dsd_ctables_tableinit(void) for (t = 0; t < CTABLES; ++t) acc[t] += sign * htaps[t * 8 + m]; } - for (t = 0; t < CTABLES; ++t) - ctables[CTABLES - 1 - t][e] = acc[t]; + for (t = 0; t < CTABLES; ++t) { + ctables_msbf[CTABLES - 1 - t][e] = acc[t]; + ctables_lsbf[CTABLES - 1 - t][ff_reverse[e]] = acc[t]; + } } } @@ -100,13 +103,14 @@ void ff_dsd2pcm_translate(DSDContext* s, size_t samples, int lsbf, unsigned pos, i; uint8_t* p; double sum; + const double (*const ctables)[256] = lsbf ? ctables_lsbf : ctables_msbf; pos = s->pos; memcpy(buf, s->buf, sizeof(buf)); while (samples-- > 0) { - buf[pos] = lsbf ? ff_reverse[*src] : *src; + buf[pos] = *src; src += src_stride; p = buf + ((pos - CTABLES) & FIFOMASK); diff --git a/libavcodec/dsddec.c b/libavcodec/dsddec.c index 2bb2e73b75..dd1ea83784 100644 --- a/libavcodec/dsddec.c +++ b/libavcodec/dsddec.c @@ -56,7 +56,8 @@ static av_cold int decode_init(AVCodecContext *avctx) if (!s) return AVERROR(ENOMEM); - silence = DSD_SILENCE; + silence = avctx->codec_id == AV_CODEC_ID_DSD_LSBF_PLANAR || + avctx->codec_id == AV_CODEC_ID_DSD_LSBF ? DSD_SILENCE_REVERSED : DSD_SILENCE; for (i = 0; i < avctx->ch_layout.nb_channels; i++) { s[i].pos = 0; memset(s[i].buf, silence, sizeof(s[i].buf)); From patchwork Tue Apr 2 01:37:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 47717 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:9f96:b0:1a3:b6bb:3029 with SMTP id mm22csp1084238pzb; Mon, 1 Apr 2024 18:37:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUAAY+o68xHCXlO/+BLfcrb7VMIAC20BOmtAjuzgKh4VzSTd4hPnFsoaT6JWJvQHCfMDWEimJ/4Stf2ctUDtprI61254OkUBl2tqg== X-Google-Smtp-Source: AGHT+IG6sHS/g80DUxenKYOScSlK8QnGl/KESx8fQmDBkkdQqsRvsga11uBcUYlpnjvyWeuDfaFy X-Received: by 2002:a5d:4b0f:0:b0:341:b8ae:4cba with SMTP id v15-20020a5d4b0f000000b00341b8ae4cbamr129049wrq.21.1712021863971; Mon, 01 Apr 2024 18:37:43 -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 ka18-20020a170907991200b00a474ecd7c80si5006902ejc.908.2024.04.01.18.37.43; Mon, 01 Apr 2024 18:37:43 -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=otYYS8NQ; 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 3A7FA68D097; Tue, 2 Apr 2024 04:37:32 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05olkn2035.outbound.protection.outlook.com [40.92.90.35]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AB98568D063 for ; Tue, 2 Apr 2024 04:37:25 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VZuIUsPff+yPa1fn4r/3so4JAr3AVaQhgBE9lA8Pvdit5SdL1Q+qqErYR7nPIk2EOMQl0E4xDBKG+YUX6l1bsp6Q2JmJRy0hYKGse1wFPRYwyT8i33ThkSiZcAsiWXE7quQjYUzPQJoypSwFHX0jZGD80nhSOHLFee6KFTu8uJg+liNZsiVQApbsFaG5bVr/TsARlc1EfLH5z5s/vBQwHCUwmfmB1+1JvmOXvmRCNOcx7gyHs7cRZ+KYMvIjkuvOlF3tzK7QA6vVIem3nvT/+mV6sHg1NpUY+QlHJ3yp4FNPEqKVqsScCtZNkHbLpam9eVAJYJYzAKaQHXfX+0I0BQ== 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=6+HAf0VJlT2UXLogBJjDKCVAUZefk3gPOJvobSbuDDc=; b=fRpk/ewue2Z3HFfkzBj+6uoXeMMwh9FcocbbwefXW8Z18rePwYWRacWr2NyVo5pJe19C2dA5zPF7MfkjwCFVYYFjzCcqR3B5uMs1FkrTn6xd32280LbVn7uJauIX3TEvBMZCG9fli0aNWrePosH8vKkwsktqk9/PUoJIC+zTjdrjFYQ9uqcDh8NUfUXAweW1357/SKf9yWUGadiZ21Xx8AG4Sj0kUttAjb/cFTKv4AuVXMNVjiIAsiC33MTYQdntRfds0k0pkhk7+PATg88yooxL/t/P4hCeYN6PvyqhaaU4/T+RUXTqlJvYQRC6XxEPPfFpUjrcbc/PdD/B0m+Uqg== 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=6+HAf0VJlT2UXLogBJjDKCVAUZefk3gPOJvobSbuDDc=; b=otYYS8NQmh1zsocF3Pqbpnlj6peSsK6s933idrd5wpiGpPKsYqoJT6SjvUdsDU4ZdxykGvGm8q36+Hv3ASavY8Hdpy99OpT07XYSEe/VhYiGnQKSqXC1GLRZC1StuNxCOzkSGG7HG29AD7oTlCmAc8Cav66oC6mKrg51TCbKlS9g62CdCoA6Dq5xsag/Iak9Is3v9l7AoaxSlbGdHVn6ugFCYZUNmMIa3IwirDgWIprYC+lSp8JUyK204gTzdaKrqX+sQQr3vaRM2xJ9y7kjM/tC/dJgd1343WK+GUtQWLq0nbBmraauS8LLimnLQyofT5w0UQX6qbGcMg6K8sBYtw== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by PRAP250MB0492.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:292::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Tue, 2 Apr 2024 01:37:24 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d%4]) with mapi id 15.20.7409.042; Tue, 2 Apr 2024 01:37:23 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 2 Apr 2024 03:37:08 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [KTwTCHLrAw5cNm8MTy0r9uLwf2Vc61/vVqkxoBM55HA=] X-ClientProxiedBy: FR0P281CA0191.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:ab::14) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240402013708.1510327-6-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|PRAP250MB0492:EE_ X-MS-Office365-Filtering-Correlation-Id: 5e4afdef-71f4-4837-74d8-08dc52b57203 X-MS-Exchange-SLBlob-MailProps: 9IecXKUgicAYce+YIvRqgtS7xmd4M1bmh5+R4hGZCZaZVeppYG0w5St8JWl4VKlInpJMr8+w0bSqvZUOj2+ad4p7vCl0KgPOIK6PSu92QwkToftjS749izBaiJp1WM5kHCaxhtTQ+kmZGLeeEqv+ioI+mmHDio20+GtFYU5obiG8HP8R/hlLTtWPiBq+c1L9RxVf9LzfoGCAw05O01rTZoI2rZ1QuoTV1yPHF6FbNkFDT0mHaTFNiGtJg23Tose/97bY0/tG2h1r2njAO5j1NfP7tzW5JnOwRtKnQRZ3IkhjvAhjC2USr2ZxeKdMvou+iVtiVUUpHgVszy4HM20p1lKsHH+iQ2gIEsRNXgSxAWehqn4mKL5FPln+ST5iJte4w+Qp+OdLzZKM3mm87ykbBJ/SDqxIWkLZDlfyUpjGiWbvIjiSk6eb+FPFB+HXWmTKdAV9rtX5AWG0+wW0JjSDANz38CVaj9RTSTJQAwh7drNLURwI7iMvG1eKsJfANpzgv4yJGlK+nkFYmbN0nbJ/KPG1FbwrbzWK0YuDJ2ASax/oclof7MC5LdGhxzT/OOIcP3edoOflvzX2dDtL+R0wdM8PWxMAPJbzW1ZSShYg27qMZk7PLqgfab+hrt4N3DqKvpAkq8NSTxpqntJlpRfDUrBkl9hWB4g58t2LlDnPaIkyTwb0eZJCQAHwXeA3/XcmQRknMDYFbPhk+j4swTfFhlwFKuGWAyMHgN70lU/l6Ch+CMB+PKF4yA== X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mC0zW0x3pdsto73FyTg6/MuFodbU78ftNBigXFBco/n4bRQ9+LBmPjlCmJGvLQJdQ/xpWz70kNRqbz6/9uZ9ItKcgpyILPS+T3R2sqdjtEO2SFj9iQ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x+vh/Enh1DJp8+bNstH3tWutPn/VRuwLCQL1aCpsE6vRe1VK8gICgbrrLEJW61qJBXHWtMIWCazKbHerZktXlJ9f3IpLN5TiItu6TlSZ7KlzuBEZfJvCzgOudVtlSy+G3XDHCYk7B+zYXh7yKfIQNm5uJXO9hSDKkIOdWgorZOwHrBb1aNiHKwK17YawX/E2ZVYdVU2cTkLcuDT1xn7ek3Pg4B3mJ91byW9eUigZsgjK0qPfE4xS4ILmzMRput1uZ4MpSYUWQdrrQgYJTYsJ7+PqeDawTSqdMZTzCibXB1yl92ZpftTNFnImcrGIW6W3FH8ZVv8ioFHPBqReHrFcfjRHJ/YXMSOwjipLHPnOO/7KImcyNTXzLxnht8rmAbw8YThTqOWxX7JyTESVzBbZdMDafoMj/1YJ+0Rri44vVV4TFeIsTJYDLgcOIGJq4VrC4yHMQaIo8s/bLjoQ81dZOdVeIcRVmPhENmHegC0D/vkacWR30/Hu2wcFitVxELgu+yee9d0755Dpnqy+YMTTS6ZtOJTcnkLFMvbBmLxFVI9V96UNhz6O03F3xn+5xAZjI5MF9GpqKi8yk1dwhB1N1kQ4iv4EZcYSF2Cxs3WBDMofXM4UetLj+HN7727gDRk7oXdgHbjUcQ2NIavnNSW9MsWxjCvZQddRcxmSuGk084QkQur2Dnro38OU+Vl/WeO58nDzGnPvdKwcybZUlMknLcR5ZMTJbDTgB9giYTotiliD7kkYHozhy0ILwRltDQHM3ybx3wigBFXc3MYid+2u1YDVdtmE9/1z9cQywZeojg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e4afdef-71f4-4837-74d8-08dc52b57203 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2024 01:37:23.7211 (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: PRAP250MB0492 Subject: [FFmpeg-devel] [PATCH 7/7] avcodec/wavpack: Remove always-false check 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: nkM3GUKYojDC Signed-off-by: Andreas Rheinhardt --- libavcodec/wavpack.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index c96c8e0583..73d69d66ff 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -1095,11 +1095,6 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no, } s = wc->fdec[block_no]; - if (!s) { - av_log(avctx, AV_LOG_ERROR, "Context for block %d is not present\n", - block_no); - return AVERROR_INVALIDDATA; - } memset(s->decorr, 0, MAX_TERMS * sizeof(Decorr)); memset(s->ch, 0, sizeof(s->ch));