From patchwork Fri Aug 6 16:04:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29316 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6c0f:0:0:0:0:0 with SMTP id a15csp646955ioh; Fri, 6 Aug 2021 09:04:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEfp2KYCq4j7kRMm8klBe0m/5cCLXaJg6bTK+9D36pepwhUeL+12f5V3LBPda3E0ReRNsO X-Received: by 2002:a17:906:a3d8:: with SMTP id ca24mr10507772ejb.533.1628265870969; Fri, 06 Aug 2021 09:04:30 -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 jg38si10042013ejc.232.2021.08.06.09.04.30; Fri, 06 Aug 2021 09:04:30 -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=oA12ihz1; 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 418E068A214; Fri, 6 Aug 2021 19:04:26 +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-oln040092074082.outbound.protection.outlook.com [40.92.74.82]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 49743688051 for ; Fri, 6 Aug 2021 19:04:20 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EfV9T8OIR2P1ccGy/z3UKPGhYukeem5xqYINtH6pfU2Fxkusg0S0JXyjAcfS2hQzcKpWW2cybP7YZD6tSi3llXo/wAfCcXtXyvx+Wa2B4km30TyMTcChmPTDM4FnDIkm90yOet0HWoJU3DTsR9Nq1BvlL/QoHCVhlkSiBYLfxYZFYJWsBWT/Ctwa4u3RaXeVAbql7B4w+0Ws78WukESLK3uO8CRhwGHBpnbEcKZcoA4igmBkH9+sZK4kSXvIxZ6EqCJadTyy/kU4hfz3Q7sNU1vobiOpOjEKStjAWVNf2yAoC2id1qdhZx3qnOvO+KbYlgDJJxRKG8vJpCwP4xSZWA== 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-SenderADCheck; bh=pb/SwDX7OajbKpk9DEmJtIA7Dll5DwrqOltQuQMpolg=; b=SH6wxZmGgPLI3XjbrSX8tFWGUBMdM01uM1m7lrh0Lmm/QOPGunYMRenr/JBW9Ija/of8hddKWbv/U58VB6/12sWHxRFX0CfgsJwhsscPCmPzyRyQmrTXsvFwGI9rqWqH+wqUXDTUoY8f03XHfb9QIfKAfD0FFBw477Ts/ewxR50TZHGq60ndx6cosoVqLH9sCtIbhKnSrxO+1ZfC5b9bEk3KLBO6D3cwz47uZrY5om2ooDCuGoagCkYwLFC5WCeY0srs4bxaCmIsnSv4uH4pOCyvyJmNGsqP6z6OJK/++Alstbw0++p3Qz+nsNRLvSwX7932tRgyioPmALlC/JGO0w== 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=pb/SwDX7OajbKpk9DEmJtIA7Dll5DwrqOltQuQMpolg=; b=oA12ihz1Y4RJnJ16Ry8vGEH1IUSPwTKCxEQd+VaOrP1hHNw/nwNwXUtMKEvqrPE29/9w7BTq3esGXpdclTwoxUssaZShkpVVdJ2CHaEoMn6lU5p55W79p8grZAYiGWsZo0WB3V21Z+v6dX23GVIbIR3rsqkTmTwTFf+vyn9vP4UFYnyomsMRYhq9Q9Ymx2A6KECnYTejl80Q5/lXwUqs5rxPrDzo+R51wqFj+Yq7caNljrQS2kbrOimdk+FH6pPM+SPH08TZ9gzIcwnR5trQ8CJBgGuyhbTBOhn1bQXn8ZaGK66ZALX98zA//WXXsyQmUHFDmNeyIUqP1GFrtwdlQg== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM5PR03MB3012.eurprd03.prod.outlook.com (2603:10a6:206:1a::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.24; Fri, 6 Aug 2021 16:04:17 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::c9b2:14f8:d555:6f2d]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::c9b2:14f8:d555:6f2d%8]) with mapi id 15.20.4373.028; Fri, 6 Aug 2021 16:04:17 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 6 Aug 2021 18:04:08 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 X-TMN: [nPxJi6a8MPrECnW6v5qAfZbBaLl3/YSA] X-ClientProxiedBy: AM4PR05CA0030.eurprd05.prod.outlook.com (2603:10a6:205::43) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210806160410.2979438-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.95.102) by AM4PR05CA0030.eurprd05.prod.outlook.com (2603:10a6:205::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.15 via Frontend Transport; Fri, 6 Aug 2021 16:04:17 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4ca62974-7eef-4aab-5b94-08d958f3d80f X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiRJwrEf5z4sDxrYjVslUwKwN3Has5SBkOoWkwJAvtXa+fAL3yTPfpEjsXLS/8p22kyNldccb3sIkFkUDgY6dT9QnBLxzMZYfzZ3kervN97wGEC2DgTvKJ0c/U/K+wDs+E3lOuCRVk+XqrLsjfKzqf98qnqTqKTnLRnV6uK64qqrJIE2SNhnuSz5R5Za7Hdj8EHa+JvDjhSvWljKNyb0JJYaJlQLe3ttIxCua/UJRLTz1zeLWGTjqzL5VM7FudjiOt44e7Qe7ajK1/TCZ3aueg5spY5OfELEmyRzESh9gqSoPfwxJDH6QrYbRJ+HJkAT8yF7+clZ4N1aY+vxgC/pKHJEw+s+rDJ633eNmg1YrQ2KdIt/AAIYFUTF6eH0YMHDTpcPy3hb96c6XKHehuPKjiUUGp8sZHBTcGpvoV5WLgA5ZKZSbsyiGlPAThJ8U6BJF302H1ybPme4IrgPA2F+Ayttbo4Jyb1fmQgYrqqi3qmhhTa9xCHZOl5GYIpzdRazwI6H0VsuY6LX2nImNwDUUtJbl43lKeyEJkF2ZICx82IqLS0lcXU6D2FsE1yfWHPqCM5avX9wr1bSuUGigIRn14FD7vG81uMOL3Pk84DMkQoGiK9J5TNShpPt6TyahK87h9QPPGAQmGNPhbABy48H3p2bjESDUc7AZ7Z7tKkilWDpOrqDhjAYU0Nz1RQd0ZgxewE1ajgsIYzpxZCHehocwyhVv1VzjfFYzogGoInJLf1vINyTnFw7EPrvCnuNdqhyL4k= X-MS-TrafficTypeDiagnostic: AM5PR03MB3012: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: A3h79UN/cFdPCjl/U68WH7zMjQ9I46bh1CLYcymOPFLZVmaDgOOwxOFdvRLE0is8WdmkaCLxV8RTu+F6+2CTrj4WBP44DyhCie+rq7pqGLTm6Dvy/FiCSL09zAC1zSvJETNVqRQIhkTZl0JcesAh7FLZzVzgG5BUM0tLYCIjuxVdvNF747wz3SggzFM+ZG2F5vL+6sJZKiJ/MRJUOIxH0K24E/3CeA8uu5cJURHnGKDA820viNJNdMSLtCE/A3WtQeq13Cia7Ltd2Px9LssPmoopsTqy8o9W71ofKqgyIDAid/4uaUzKrVbBXMjUAWoRxaq82wkD2ftvqOW7VvMMtdLZdT9nqeuLhhJiF6ECOJexFHcg3RYA+1qGZAgQ5ZyexSkm2J6KsGa6bkAGRxlRFChfhL+BFMDMdvhzYmB5I6ib0fFavW8DwZCE/xXWrL5C X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0ZhbZxNWiS/mms0VtfWawYs3sxOXKOR85psnKaDWQrlOAy2S79tP4KEm7Y5o92lMbny3nA2Geb8YgspJ5wqnF1uBGMJcqim3cGQzQmF6aqzw7fu9j9xTg0OY7luRSPgNi4JbJejIAOivDzMzajHVrw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4ca62974-7eef-4aab-5b94-08d958f3d80f X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2021 16:04:17.8581 (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: AM5PR03MB3012 Subject: [FFmpeg-devel] [PATCH 1/3] avfilter/vf_vif: Fix mismatch in number of array elements 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: 8xh0+IOsVnEy The function definition used float *data_buf[14], although there are only 13 elements (and only 13 are used); the declaration used 13. Given that the type will be converted to float **data_buf anyway, this is not in violation of the C specs, but nevertheless a bug. GCC 11 has a new warning for this -Warray-parameter. Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_vif.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_vif.c b/libavfilter/vf_vif.c index a136d038fb..bb949649e4 100644 --- a/libavfilter/vf_vif.c +++ b/libavfilter/vf_vif.c @@ -38,6 +38,8 @@ #include "vif.h" #include "video.h" +#define NUM_DATA_BUFS 13 + typedef struct VIFContext { const AVClass *class; FFFrameSync fs; @@ -46,7 +48,7 @@ typedef struct VIFContext { int height; int nb_threads; float factor; - float *data_buf[13]; + float *data_buf[NUM_DATA_BUFS]; float **temp; float *ref_data; float *main_data; @@ -286,7 +288,7 @@ static int vif_filter1d(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) int ff_compute_vif2(AVFilterContext *ctx, const float *ref, const float *main, int w, int h, int ref_stride, int main_stride, float *score, - float *data_buf[14], float **temp, + float *data_buf[NUM_DATA_BUFS], float **temp, int gnb_threads) { ThreadData td; @@ -515,7 +517,7 @@ static int config_input_ref(AVFilterLink *inlink) s->vif_max[i] = -DBL_MAX; } - for (int i = 0; i < 13; i++) { + for (int i = 0; i < NUM_DATA_BUFS; i++) { if (!(s->data_buf[i] = av_calloc(s->width, s->height * sizeof(float)))) return AVERROR(ENOMEM); } @@ -608,7 +610,7 @@ static av_cold void uninit(AVFilterContext *ctx) i, s->vif_sum[i] / s->nb_frames, s->vif_min[i], s->vif_max[i]); } - for (int i = 0; i < 13; i++) + for (int i = 0; i < NUM_DATA_BUFS; i++) av_freep(&s->data_buf[i]); av_freep(&s->ref_data); From patchwork Fri Aug 6 16:05:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29314 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6c0f:0:0:0:0:0 with SMTP id a15csp649050ioh; Fri, 6 Aug 2021 09:06:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIPEc/NH0KYdFkDrwUMkDL2sJKM3JvBnQKw2jVih1hEMNqblNL2CPr9ipPhlZNHHfxhpzM X-Received: by 2002:a17:906:eb4c:: with SMTP id mc12mr10272090ejb.311.1628265990979; Fri, 06 Aug 2021 09:06:30 -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 gs32si9374782ejc.741.2021.08.06.09.06.30; Fri, 06 Aug 2021 09:06:30 -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=CBOqhYnn; 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 AB4FC68A2C0; Fri, 6 Aug 2021 19:06:27 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2045.outbound.protection.outlook.com [40.92.89.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DDF0D680157 for ; Fri, 6 Aug 2021 19:06:20 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZG1BHR0oc9jjluuEtzUfhtK6Ro8YLHmhYbYfWj6KkjqTzVUuL/YbUrl5l17676Y0Pb+E9QX8Liy/MaK7BkvkFuc/qFEldQYVGvCIB5I+aymPeiUpkN/ocX7qJxbxdh7GkAxDETEU8NQ+rGxsjO4X1euRJzBRBJkS1sYe0YK5QfUEOq9FlWzQ2D3uAYDFc4Owz+88ZR2JsoqAbPE5GHhdZpQzJbltRlwlRRVLloSTyGP6SPYgoa1s6pXhR8UaKebd/yd2wT1YKcKizxUkceoWdpQGVkXJkWsou2ayEz+IpX9JtObJG6w4wSXYRmrUR8iLv6t0RhgNvhH0RFjB8XmHrg== 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-SenderADCheck; bh=ey9StlDYfu7BgU0sx38hjnu3HnAY4hjduUIYlUO5DG4=; b=Q5g2qu4xkOD0xTOQT0MS6djA8jj68Q7PAiQWr35KbKjp0cgr/RjVAgMftQB6UK3O3AplG9Bgk/x6F+3HTKTzLB0POtoIbLng2TgNUpNmsqn+bwnsfHWhQUZLaRJBdIL/eXwFP0k3QjIbjC6DkmewWVH3E/aOj/uD/HX2FzVDDGPslgt9iKwhDVw6BHbhdc63KvXXmgcOvDcIJXfPU47DPzPZFrIQbaL9w35ozhfX0fjxU39CySN4ZknUu6KLRdENDbyPSEk430Wq0bKfVB0nv2RaJ8AjIWGfDCg03skQrFpdstorzjQv/S22ae03zzLtBdX4ivwAjToBuFh/xESFTw== 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=ey9StlDYfu7BgU0sx38hjnu3HnAY4hjduUIYlUO5DG4=; b=CBOqhYnnbYkl7qpEMTba4HAhC00BzB0NMTe1ir6aOIjexsAN4ltzIDohCSEJdQ8RZm4Ld+pp5pz0wGFMcWjTObXOIz5eTLCCyuOjlIURY955ue0cBkIwkVcjpRPAkgzmYPm2z5kvQrM+tW7FRCOdn2jfNV6mbYI/t7EDAGY6NXnJ64sy/s4bDwBtvzHQDZ5CDpn4OeXqdvZz0rEDZqIqBa+HwEroTU7WTePxhnnq1jNnhrQ95fFoGlS4wgWDAeLlYQstM1/H1W7kwHnOXIxJvGtWaqJfZFuQ+NarwGzRDloMrKdxuADWdjbnH6H2QUiUfAsjssa0R6ogJaJcfIYBzA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AS8PR03MB7094.eurprd03.prod.outlook.com (2603:10a6:20b:23d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.17; Fri, 6 Aug 2021 16:05:43 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::c9b2:14f8:d555:6f2d]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::c9b2:14f8:d555:6f2d%8]) with mapi id 15.20.4373.028; Fri, 6 Aug 2021 16:05:43 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 6 Aug 2021 18:05:34 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [4XGDdZloMuahH7Vq4rknnadyLQAlXzYK] X-ClientProxiedBy: FR0P281CA0077.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1e::16) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210806160535.2979672-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.95.102) by FR0P281CA0077.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.6 via Frontend Transport; Fri, 6 Aug 2021 16:05:42 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e1a2b8cf-f2f8-486d-634c-08d958f40acf X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNW/RTKLcra1Z6S3RYdFw2XmjFVYiMxkCKF86t3hQUGnlP1O1hk2kFeHQ0ZzH1+0dMkNvrSxA1WJnfCv0620AygEZpo0hn0yjnLJTd5gxUsSzetu7nXuGtoIMccmBQ56K4yi8KBV0d87RqMuvuvHWLvEKsyIjOzg784BimujdCO6QJd1XZSrwC0lTphUHQxjHBu3g2OOw+/Wpc7NT2BmVqhbvEQFyYwKXtKL6j68Ks8vRMlxdZfaDoSpLSmHv+69kJ4D4y5O0OqN4OEsErr2CR3JBOMwYRsNG8UJpWA9dK7GWuR/xs1pCZILjGMwYJgHIFp5rs27axxVwrd8Fex2GcEiJlVIxRVNSb/h5WtqoknZ7150C+4wOPsfPSUlHaRlZKz9Ds6PttbsIeVsMkke/IHpyoxjHTHhyS8EoDqxG/j9som23F1Kaa4bcZsUTAolvS+yknZ/shkLAlGE6aXT9iDSAq7NGpiYJpwA5YCzpJW96wjYc8e4biLqijoyyAZOwxx7qMjTBXR0y0OPDzqN99y76aIiMmHRJu99awInxY6VbwYTxrVqrW5KSheRTec3SIp9jp2l/6fOcm/U0rBSWuELTtIPLhR4djGLIjqg0aZ7YS4+HywbZ1kHZTnO5RBOF5e0eydItNY9mnq7R/czTbyaP+9Mia2J7akzGxgkBsVPXFG/kSCjUZ6m2Zpr7AXzpfIB+K48Ln46gQKwf+hhAe7EVLLAn3B1PW8= X-MS-TrafficTypeDiagnostic: AS8PR03MB7094: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PMZVndObRAzhSeD9XvpB8LbF+uDxIZDxjAyBCypqg8eIYsJezj1CU9x3JSYbVTyLQV8N+iPlnI7ijn9hgXRddQsDz4eIWX2J0snWaMidppqyOBZMsK2Ak0/LASPadga6LTkIci5rgaxZBIvBhKEgPiRIG6X5RVIxgDuGk2i6pFqw1cuFVb+dcY3tQFVXVaAr7lwXnxf8/nmskhq5NhwoajYpnKkScxH1YOvymTtDgC5QgHdRio+rQfzrn2UsLc4vvpk4sLCYFmc8HCvM2VRz2dfC7nnlWqKXli5L3EIH0AJkla8kQhO7UI1TM21/PzzdECI2wikmLSnCgO3TfObUjRLsHl3HQ50jQLZl5A9ZDjzyxNDYlwudFLYL6RZJ6irVo12u9HWwUA8hmXkJxeHF2jBiypPAlu1J/IGC0bAGFXZsyBOv2IUtZq4FeBkNiYYY X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Ts8RZVR+KVjPwgGJLW+Z0NfuMCijd5KHpZ3LURKnW0T8sV3S1RyZcg0QMXW9Szz6fdgrlHq+4MM2KRnD/FvFtH7aKaG7LdJs1rUzSUe9GvSMseB/ypI1YCETU9LYl3svxu94Lj53pfsfr4Ld3FL/vA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1a2b8cf-f2f8-486d-634c-08d958f40acf X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2021 16:05:43.1033 (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: AS8PR03MB7094 Subject: [FFmpeg-devel] [PATCH 2/3] avfilter/vf_vif: Make ff_compute_vif2 static 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: CzoGzX8tLTtK Only used here; the vif.h header can then be removed. Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_vif.c | 19 ++++++++----------- libavfilter/vif.h | 32 -------------------------------- 2 files changed, 8 insertions(+), 43 deletions(-) delete mode 100644 libavfilter/vif.h diff --git a/libavfilter/vf_vif.c b/libavfilter/vf_vif.c index bb949649e4..c21bd40f44 100644 --- a/libavfilter/vf_vif.c +++ b/libavfilter/vf_vif.c @@ -35,7 +35,6 @@ #include "drawutils.h" #include "formats.h" #include "internal.h" -#include "vif.h" #include "video.h" #define NUM_DATA_BUFS 13 @@ -285,11 +284,11 @@ static int vif_filter1d(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) return 0; } -int ff_compute_vif2(AVFilterContext *ctx, - const float *ref, const float *main, int w, int h, - int ref_stride, int main_stride, float *score, - float *data_buf[NUM_DATA_BUFS], float **temp, - int gnb_threads) +static int compute_vif2(AVFilterContext *ctx, + const float *ref, const float *main, int w, int h, + int ref_stride, int main_stride, float *score, + float *const data_buf[NUM_DATA_BUFS], float **temp, + int gnb_threads) { ThreadData td; float *ref_scale = data_buf[0]; @@ -450,11 +449,9 @@ static AVFrame *do_vif(AVFilterContext *ctx, AVFrame *main, const AVFrame *ref) offset_16bit(s, ref, main, s->width); } - ff_compute_vif2(ctx, - s->ref_data, s->main_data, s->width, - s->height, s->width, s->width, - score, s->data_buf, s->temp, - s->nb_threads); + compute_vif2(ctx, s->ref_data, s->main_data, + s->width, s->height, s->width, s->width, + score, s->data_buf, s->temp, s->nb_threads); set_meta(metadata, "lavfi.vif.scale.0", score[0]); set_meta(metadata, "lavfi.vif.scale.1", score[1]); diff --git a/libavfilter/vif.h b/libavfilter/vif.h deleted file mode 100644 index 5b0d86da00..0000000000 --- a/libavfilter/vif.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2017 Ronald S. Bultje - * Copyright (c) 2017 Ashish Pratap Singh - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVFILTER_VIF_H -#define AVFILTER_VIF_H - -#include "avfilter.h" - -int ff_compute_vif2(AVFilterContext *ctx, - const float *ref, const float *main, int w, int h, - int ref_stride, int main_stride, float *score, - float *data_buf[13], float **temp, int nb_threads); - -#endif /* AVFILTER_VIF_H */ From patchwork Fri Aug 6 16:05:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29315 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6c0f:0:0:0:0:0 with SMTP id a15csp649226ioh; Fri, 6 Aug 2021 09:06:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzn8iYy1laxr3sJQuA1ip6K6KzT9Z9Xq/CQVI3S6YiT08mKEY1Ma+FgrIRWgwN6zyZAHfAi X-Received: by 2002:a17:906:1d4e:: with SMTP id o14mr10413300ejh.233.1628266001688; Fri, 06 Aug 2021 09:06:41 -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 h1si8801583ede.149.2021.08.06.09.06.41; Fri, 06 Aug 2021 09:06:41 -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=ch+jlp+z; 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 C3DDF68A305; Fri, 6 Aug 2021 19:06:32 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2045.outbound.protection.outlook.com [40.92.89.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0D58C689E56 for ; Fri, 6 Aug 2021 19:06:26 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EnCGfOnnVaBTNJh7+rUyYXITd5RveoC0fFcdpwBYsP/UdwZX4GQu8MHNVVgQTpwtvPfXpYU14fLbTGc6hTMhX7DAfaHQFKHUFlomNmlzL7rls6xdYDrjnfA0JZ3U28bsv++thRwsvBsQFw73pO5MegTPQg1EDhvZY2Sdq2Gi4yyUoyRPH9qyVQVPLgqNY80AzzlvKfHeacT/bEgqdaWHcLiasMZNrWZu5xf3uwz0L/+/vGS0saFbOdyBSYagduhpAnz8o2BDzQRO1Ao3XjPI686iqXzjDRoLdVrL9hFPiXJn2WvtXW2/CM1Cv0y7VcV4TXB/idZc6+B09sz/ej4atw== 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-SenderADCheck; bh=SuufiCFJXPkUOjqxfN0pYF2sniwrSdBG/gZEKdFDhMQ=; b=dgWw+Mif1BVbzY7hRQZzsp8Ab0AzGlKCuYUiMvcdZGjYBpnRgqmNCOO+jAQhf3DYxigaA5Y1UCamQd+qaVKNG8aoRMQtgT29mYK9GepWN4TQRjMi0N/HqWLNh/quHHEO2/CDfb0g0EdzBeatazvDrGqYfIfoF8MMxjM9bGo0AJ+PIY7Rc8WMUjrdNekK3HMZXBsq4QNG3TEnS93z7CaTTncMazuH5M4Tz8CjhP+8Vz3BGvV3Ra21PXgFKurOpYPWDMfVx2ntVwo3Bu9/jtWqgDSUZ/973a7hwB88h8BagDmIUr7BuNqJuaG8D1FF3XQPwz4/L9k9pWlV3fVolH258w== 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=SuufiCFJXPkUOjqxfN0pYF2sniwrSdBG/gZEKdFDhMQ=; b=ch+jlp+z/RJ8XZfBYK4CBthkn07exy0gXDq0cHB5WWNEcyHafqKKkYc+rcBfQQjDOPP64L0BNwMPl/pBch40cR+LEDSrYwdyydSF3luhDql6N09yrV4sfAJIeuFcVMlwT5WLoHlgtaj08hyTv4tHrPZQp2+mvrWROqdlQ5JdW18XNeofOr9yjXOsdvQNQ2AVu9ZtbvV14Cff29JVfXh7e/H/D34LJZeQrhRog3s1hwV6WXhEkEbtl2LuNZBYhcnU+4zwA8M7KcEpIQi28aZjg6Qsbm7SeBu2SM1VYptlrXmvvtzzhBG2iNkAeE+xN7ELQnYDgkgYVlVbl1c9GuCO+Q== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AS8PR03MB7094.eurprd03.prod.outlook.com (2603:10a6:20b:23d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.17; Fri, 6 Aug 2021 16:06:19 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::c9b2:14f8:d555:6f2d]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::c9b2:14f8:d555:6f2d%8]) with mapi id 15.20.4373.028; Fri, 6 Aug 2021 16:06:19 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 6 Aug 2021 18:05:35 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [TS99q8j2drW29mwLK+U169nCKyVDmNVY] X-ClientProxiedBy: FR0P281CA0077.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1e::16) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210806160535.2979672-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.95.102) by FR0P281CA0077.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.6 via Frontend Transport; Fri, 6 Aug 2021 16:06:13 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2417bba0-5ef5-4971-9756-08d958f41d1f X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiT52goy4hjXHFeUxRfb+qjL47DlNRwudE4S4Y0arC93QfAjefyBMg0O69OiRb1Edd94RNNqsh5upLKnBBY5/Qzo6C0HlLxgA1jW6adx1oj7APomFA1HMQ/hteNQh3JIdngkd1A6TfzOZ8lXyiiyaF90JeiNjmIiPSvqRdMp8pL3hZLEtTR4wLaD896agIduA3/Fzg+zV0SiI9aY5/nLPTwxIS887ISXfWmMDAjZB3IHR5nfmH3oA038UviuGj3TzE4eDcF3kiwDpxGZHa4gQMgB6aD+yz0eB5fRyNjTxX1SSCwTJEb/LFqtq/nvPzlI4Uxq52j9SIkr3HTZJMG9SIvE6Lm8D+cUQBXIL3ZYkCWHozdFea1QpqnkmYn8zQPQNRhdtr8YjIO6m9Rh+qo29eCgEE/7uzrDX7Q1+WOif+S2tutf+kVMI2CsGhTpk2Pp8Lea1d3GeKZ6yLa1/uIB8O4YN1+sAOTWBs9nUZcecwTcmFqzcArGeEsgmSjxddynoGMk2Ymvi/eV68+0rYjYPuRszgDxewdXgh71sOTS7T5/5SaskDxRfrcED2Lg2XWthn1h2sX3XvW8735jUHH3EW/HtlG84ookdppfyXZKhBasNN4AimBBpv913dMdA7qIg1tXKfB5Fjy8KuGRFuB83vlOOBAvw17fS6VI/tpmfssTCJe0wcH4C4furIS/aZ5hhixQAxtzELeJFrtG/WQi/igS+EzJbaFD6PoU2yxj7BnYKQMbyjfMkgMqDe9RpGsRk/g= X-MS-TrafficTypeDiagnostic: AS8PR03MB7094: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KFjaZi4fCA3LsLum5TB6Sj25dMwsKCfKh8c8Vj8mLdO6+5nf5RLaI1LmiNqxizzgl4LsSnUwMymb1caPmxmPJVMcCW4ApaIyq7NHhMc867rW2W5y3SmHQUREtTNTMhiDYhTNtQqnBj8hjxE+pWQfFsEHgVslmWl+GVUxRDmOhi+RY/p7mBtePCX3Ye5gUFo9ci9IvBYf7N5fcLWdlRHGBR9PBp1TYLOMy/xFlHtBCdvXmVBJgWtSZYVkXTX9pNYEdZGz3Qx/WjBTs4QEoHPqk5r6rf7LrJEb9JlrCOKZIuMjwMRK7vYfNyurtrNEQZT6BNB2TpdoLYUu5PspAjNgi5wOATn82b7KrNOOPay0kYVRQ70/jaFhRaSt38cblKJqk8wvfeQ1M2HutUTesWVw9kq/z5gQ5rehDWkdnbdaRNJzoYyPxFe4XxXrPO4gLCel X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uadB2sWrZEtlV+KQoJHRLK6v2iMuoXtXUHryr4vg6HgKpxaG9r6XriBSX9hjkGX2uIfSi3M/LWNQFWGQpyOkuqV5J5olE2YGlhNtyu3V1wCJme6V4qBlEV6IIVVDrJMWY03ftj0kA+fE0WOjj0bgPg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2417bba0-5ef5-4971-9756-08d958f41d1f X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2021 16:06:13.5630 (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: AS8PR03MB7094 Subject: [FFmpeg-devel] [PATCH 3/3] avcodec/aacps: Fix length of array in function definition 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: rm7z3r/bipG8 hybrid2_re() has a parameter declared as "const INTFLOAT filter[8]", although the actual argument for said parameter only has seven elements; the code itself only uses seven elements, so change the parameter. Fixes a -Wstringop-overread warning with GCC 11. Signed-off-by: Andreas Rheinhardt --- libavcodec/aacps.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/aacps.c b/libavcodec/aacps.c index 6c7a33fea8..655e8fe5b4 100644 --- a/libavcodec/aacps.c +++ b/libavcodec/aacps.c @@ -51,7 +51,8 @@ static void ipdopd_reset(int8_t *ipd_hist, int8_t *opd_hist) /** Split one subband into 2 subsubbands with a symmetric real filter. * The filter must have its non-center even coefficients equal to zero. */ -static void hybrid2_re(INTFLOAT (*in)[2], INTFLOAT (*out)[32][2], const INTFLOAT filter[8], int len, int reverse) +static void hybrid2_re(INTFLOAT (*in)[2], INTFLOAT (*out)[32][2], + const INTFLOAT filter[7], int len, int reverse) { int i, j; for (i = 0; i < len; i++, in++) { From patchwork Fri Aug 6 16:17:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29317 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6c0f:0:0:0:0:0 with SMTP id a15csp658607ioh; Fri, 6 Aug 2021 09:17:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdJ05DtPAGyRWBXUCqGT9usivoc4fIPcmHp3iZypTEOC2SoFXarCRUFQSu2V9Y+l0xW9xW X-Received: by 2002:aa7:db93:: with SMTP id u19mr14006883edt.227.1628266665456; Fri, 06 Aug 2021 09:17:45 -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 o24si9641151edi.16.2021.08.06.09.17.44; Fri, 06 Aug 2021 09:17:45 -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=idPPElbs; 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 A5115688156; Fri, 6 Aug 2021 19:17:41 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-oln040092065061.outbound.protection.outlook.com [40.92.65.61]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A6A55688156 for ; Fri, 6 Aug 2021 19:17:34 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mr3qK+56G39pJRrKFEGOdPg6oUvOHg4v62f3VbdHGGemQTI5sOkDCYXXltUeD6aWctiaxmr8jCzxLNvZRkuAIFAO/KQlaoh8eDhcJH3c31CqXT3XgyZpxSxX089/mfKnhf0bzW3q+UGY6UbOqShbXNtNtdKLMFcnRpjglo/xNKHiCkQfjRWOJmB3aagnoPVrf3WNuxvSRaPBqWbBf9fh35718qGsg4OQIY3ceDo9Aa4to2krffO+hdJEthpPJwOLJqYdWhJvU5ChxdVNVVCE5gbKl1KKDlJRarBwzuABo6yLee082S5nkzDw7nPnGTRUcRWZV+kjBq66rz7Ijjl8EQ== 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-SenderADCheck; bh=TsieEEDHQiKVn5G2LcM+tk49c9vBFScSVn8J4ArKufw=; b=DcF1imZljVObhRJdXslE8v5G3V0PTBRNB17XlUhMDK5Bg7vjh6HBCNwxl86RpOrd5RChO+Sl2C143i/7IIYubsDgZteqMI7IMazyi5H1WcVpNUj59TwLI32zokVwOjN5SuiSCWxfhyorMdk6MugjPuXXlVthTgdCkT5rPEgXoOUfiqKYWBC08iNNf48z8vD77Fd13ZFh0v+n4swy7Cyco5b5xbY/fr0CDqrpNjzsqr1SSOLbZ5j1I3Fo2cT4B6yM6F0oNpI6/PwqePSGf7lwCnWamA0jm+VrNuIOsA+3ulLMeSLKFYDZ/bAkxogvTTlyOud3fJhuK0DtOrxHxk1cTw== 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=TsieEEDHQiKVn5G2LcM+tk49c9vBFScSVn8J4ArKufw=; b=idPPElbs08hB3BvrIiMYIEgztcaN0tgXLaFeonFDfNarfHG6gUF6jyamR88tV26QaFcy9eON6IYGtedG1NNN7VXlYKyVxO5Qs/aIYPBtlGUXMRW2m+CMecSlQX57S55yWyzyTipEIxfyPYrcuXyl5EVPNtwhXT3VBWIziy8cgR2rBakz0yrf3chJJzM2rLqnrKeQ4y/C6Jtc8QHKV0mXQUT57vYm6V03chwiTh9+iZDAmpUAQgVNoh0vAE0dSQv2IFED1zvtwdON+qx/B3ftMio1wk8c/c80qPZ3T2J7wBmj5tzdRh1tLNS3wlD14qPumaR36i8CetIlnOL6oj5vPw== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB4696.eurprd03.prod.outlook.com (2603:10a6:20b:d::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.21; Fri, 6 Aug 2021 16:17:33 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::c9b2:14f8:d555:6f2d]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::c9b2:14f8:d555:6f2d%8]) with mapi id 15.20.4373.028; Fri, 6 Aug 2021 16:17:33 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 6 Aug 2021 18:17:25 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [AwxGQTXDbW70fLiSmiFYNs7kUw0oU4J8] X-ClientProxiedBy: PR0P264CA0125.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1a::17) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210806161725.2999146-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.95.102) by PR0P264CA0125.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.15 via Frontend Transport; Fri, 6 Aug 2021 16:17:32 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ba039e49-3bf7-4c90-9942-08d958f5b23f X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNW/RTKLcra1Z6S3RYdFw2XmhYluMMLVFlCIwxQ/CHd04liikUInNxf6AiRb+ZZJ6+keq+NHLU0Fhrzp5V/SBg+jT/Nu2WkJ4yWy3bWHuPVSLcyHtV8Bta+QxT+H89m+gCIeHRzVp/6wlkPAPztiQUJb4CBBmR2EExX2Nc55d7cgndXT7H8Viq+fa8yB+ztT+BV2+q2bahoSicgCX0NfV8OB6LxQMqY4pjQjrX8KT08Jm68zJATUR6aXDU8g3wv3AejjKwWeHI6DJiGNQJvsjuesNOMfkbtiSEhol16TGgq1YXv+guWUrRlRnkIqmFLdEr/qRHNwAj9BaRLhUWCtw2s330mudMmYeg5KemlFGefQdbTXALjYG+cBOrCziD8xwiAtIdV1v3+PmrMM97EJhWziBaRadfkafKrJbyq+aSO9oWeobXx0AJZQNth4eWVP2/H+r+ffBHGTE8sF3oQuSU0VV1R9Vk+15SMCwJjtDyJj3Oegv2DlDrbt8ZQGdtQ5C79nb9jt55y2m1UCnkRZLyVcSAYhsnpkWCt0zXrJHYZz/mHrb53aXLP1l4nynzmOKZT41vnsEP/ekvp1JC0kXFohkEM5hsLU444QNAAQNsm3M4Wj0SqWkwlF9M5BpGcYYGQN9UF7Y9XXdzwQwbRalpnN4xnYoq2bcx6tLTTiBhXlSk468UfU7HoMh55nyt7lZH5spcBz7sbGqbbdT0jlScWnwaE7At3OjO8= X-MS-TrafficTypeDiagnostic: AM6PR03MB4696: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1wVsaSkxsQ/97o7PVq23qniGUsRPKyOs9ChVRP2wwPTmGIgFdCSYp0LtEU1nenKdwR5YPT47lHhmyaeOsRXqoqz+xUyDqKL02enhCky6C1n0y5zzP8Pbu5NwdyPzz/foXLVci5KzxK4fZo5SbNExS727nm7WmUS2jpPOCcJnAZXcA867wqYF9IFNBvYC8eRkEkI0x5FZEMe4azcVDf2jhA8PWf3Fa0DONT0Bbb+lX+kd9qZqr7vBJ6sB7x5y1jGoWdArVxPg8YyYgxbO7fHdAHt+O8immc8DKFVSFakEOfFoEq2pxzgy9LHnnqN0jku9X3TxiKxwE4mnRk62GaDHNdh0jNmB7nU65mLZq00h2T81gJXw8MOgzU7cEpMuvE6/zl9nQebL69jaL9BHqY2R6gkEOIXaRX6RTs3aNaMa9UzwE/oxkGw0CTbdaFZLb/ia X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vmABZa7cZqBdQPpvzEWNKwL1GwUa+GIFexw6CMr2IYUl0GrCv1t1DksvG/gi0C1hpxHqNhvLXMr77SBR74tg8G/56feGcHapvCTyb0NE9kpAFW++WQSvwykfDoyErB3I1Gagt1iSiUv6Q4UntF9c5w== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba039e49-3bf7-4c90-9942-08d958f5b23f X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2021 16:17:33.2879 (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: AM6PR03MB4696 Subject: [FFmpeg-devel] [PATCH 4/4] avcodec/acelp_vectors: Add missing brackets 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: GL4IG9Mbl1Dk Before 3793caa5e2d1d16ed45771574b2ffc932497cfcf the code was "if (...) do { ... } while (...);". After said commit this became "if (...) av_assert0(...); do { ... } while (...);", i.e. the loop is always executed. This commit changes the logic to what it was before said commit. Notice that the condition is always true in FATE, so no changes are necessary there. This fixes a -Wmisleading-indentation warning from GCC 11. Signed-off-by: Andreas Rheinhardt --- libavcodec/acelp_vectors.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/acelp_vectors.c b/libavcodec/acelp_vectors.c index 0d4de0e4c3..8adea683c1 100644 --- a/libavcodec/acelp_vectors.c +++ b/libavcodec/acelp_vectors.c @@ -229,13 +229,14 @@ void ff_set_fixed_vector(float *out, const AMRFixed *in, float scale, int size) int x = in->x[i], repeats = !((in->no_repeat_mask >> i) & 1); float y = in->y[i] * scale; - if (in->pitch_lag > 0) + if (in->pitch_lag > 0) { av_assert0(x < size); do { out[x] += y; y *= in->pitch_fac; x += in->pitch_lag; } while (x < size && repeats); + } } } From patchwork Fri Aug 6 18:39:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29319 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6c0f:0:0:0:0:0 with SMTP id a15csp767033ioh; Fri, 6 Aug 2021 11:45:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsLmTGHRXHwRCqHbZm4VSBb2FptQvxJc6MXMEdO1S7Uzdp5Z1ww1Lme9zPirlM74I6cpSw X-Received: by 2002:a17:907:9546:: with SMTP id ex6mr11091186ejc.441.1628275523120; Fri, 06 Aug 2021 11:45:23 -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 p7si10021244edq.323.2021.08.06.11.45.22; Fri, 06 Aug 2021 11:45:23 -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=QakszUAj; 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 6F28968081B; Fri, 6 Aug 2021 21:45:18 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-oln040092069052.outbound.protection.outlook.com [40.92.69.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A44D168081B for ; Fri, 6 Aug 2021 21:45:11 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HlINHK00KLwOdHea/v129nvQbqi6FmBR+Gmzb+oeM7HYKqocQrMUUV1XM64eq+o3Xok2JWeCiYlBhZX+rc/v2SiQV1cOBfjH6paiTs8Nv0f4fNr6bjCidTYD7S7Yj4nxx474llhLURPg/EFT4nthKzzZcsFFaimxfFVa+SgD8BXzvi2KOxUER76Heyd9ptp8CeJ/v9NsWkdVcOr2x2qHj98PxKuzbrDLplqhJahGDLbyDD1+r4XYljD2YMqrTxa+VzV/znJYV3dfWQcGmkwfkZVnZTQWlduAynRgEurJIRHyHYKkoQR1ihiNhzstqPSUSnQFBdaZZes1h+Kl5fXENg== 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-SenderADCheck; bh=CuUzVee5gxCWL4bLg7j6jKVoyqnYNlNQ6EGS4QrHJE8=; b=O639XYwQ0xlWHJN6BI7IqTVUtJUxNUfWWKg4zgRyoGAzWO85gBt5VC0Tdszc4ye1ruxHltwDKhl/h6PLIH5zGMPWsvfG8OGlvPWp6hm7DBD1Ws3Gky+ILowMdQ8dFf+5srOB2IpnOj0vwBsJNQA5sGUQw9cyw+3tuermhJGYNe5M0Lc2gI2YtQSJ/0WQILYlGOWlLGxF8ToUGAo40cbgyLRokzuDikC/77nXcXcVxdkTRi4RB6QmT0vL2UhiVNXrVVVASUIQV1vVkSj7+AYDW5s8iv+QZ8K4PzDkna+zP9HqpoydTuZ5Iy6XvH5Xy1sAsKsjhnlgLtgS/pPa26SwJw== 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=CuUzVee5gxCWL4bLg7j6jKVoyqnYNlNQ6EGS4QrHJE8=; b=QakszUAjeIhrMQmMFSgFnMGR6mov9bmAWb/j8x0Xg+P1a5f39gqJlM22K3y2W5qGdhWU2ivjbzJruuGKYjau9ZwauemIdTorZ0wjGcpIAXc73a2jYnnalBt0WGLNJ33wO2lphAAe2VNg13t8SLGx7MbihXwYVVMJoDkIm5NDadorppVJWQbN2LoAnATTqr22u7HeAPiN9ZxOVQvzRLKE8XnH771ZElqoHdQj451U4CIQ+PHcnEoeS35FiHX4GP5RNzP5hGjaar9Y2snp5Chq0YNXjeqcMb2tIu3G6qbaFgz6fKJUx/12zH/yLq0nqTUiv8WQtrIDj4Mm0Y1AsYn0Nw== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB4294.eurprd03.prod.outlook.com (2603:10a6:20b:4::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.15; Fri, 6 Aug 2021 18:45:09 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::c9b2:14f8:d555:6f2d]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::c9b2:14f8:d555:6f2d%8]) with mapi id 15.20.4373.028; Fri, 6 Aug 2021 18:45:09 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 6 Aug 2021 20:39:27 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [M5++eDnj466Ksy9nD+KTmekfVCLeVsqR] X-ClientProxiedBy: AM8P251CA0020.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:21b::25) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210806183927.3092619-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.95.102) by AM8P251CA0020.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:21b::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.15 via Frontend Transport; Fri, 6 Aug 2021 18:45:09 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3767b1e6-b3f9-4a85-55b3-08d9590a511b X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNW/RTKLcra1Z37wLCpJrZLyVNvKRlZrsHil4REVb6PguD/DF2cEjO59dSr0YYqJnrX3ZVgpyfjUkm8I5CGI8hPuoynik8eYNT71cTiVFqT5jvTBrzs/dPq8yDiHTeg8BoFrngMGYU+EIi1lhJtWZU03GDalslJeXK0fOBSQe6QUZtRISLEK37CyQsVL+A4Yz/w1oTS7ihz8iUC4itZQeQ7GSpL9A3qDrXMdq2mVA2klRsWpHfTYjv6IuOdo1QHuxtaYJ7CjHj+u4XSNVDzNxLoX4+gHrsl3csiMat6piI22+GhMmnchWkgLsP6xgvZ7FS6p5CAfCgNQxWgyLGrN8hBMkbr9T31PLlpsm3VbN9mP2sUHMlF7LQo4V1cr/bgWdAOTaqmVfKO9TmuPuUDayamlRg8TavWUqzCy7nV+rWJ9PEqdO0/lj7iaZhOFef8A0a9HBRwSYWOlu+VNYhnOroiC8rZZKN4Q5G2UTiUTuBw1vCiU2dUisva2ys2GFqj2atv1w9VZHSsRVgKoFUFlfsaeJ8Yp1U/8iEWtAW7fIUs66e2obgtvv9fA1EEslPK+zcil/FcB3YgdYoTtw3I76xlgrUK7DYcsmsVnFSqx4/hzoprPNlbaQa0DzZcI/w8lZpgrJRWKUhnaID1Grchw/U5fYrzMcIMYdpLB1X9B20z6sPw28++V5WUBPM8NxeTht76QISYJ5Y618ergEJYsiuvd+l9WKdQ5M5o= X-MS-TrafficTypeDiagnostic: AM6PR03MB4294: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: C3/LL0w1JsKB8ZC7cgME3R8HbKLkCgjoojY8i33kmQp96FtqWEIf+xhRqFyYFH9pJ9MvVzqfGUi/oCRIZn5oW9E19a5tMYSqRgK500eniUMBA4qhEg3D9I7c3N4KlHjiwF7ffGi82H2uM+qpSt7XtCHoZ//tWUEnCzmavBVRlegPCBxaYyUA4+dt/Mpvue7GdgbDjOE/wW08YxIZWT01kaaZUP+IxC78rSJ26xaapjpxrhiSisy1iNS60e9Yz00qWLCw9sX882JtsIDBuhyoO8mwQC7rEe3l1aSjXxSIcYJcNvT7VXa6IorQK1X6/d2NkGqncg800GLiPwFX4KS5ic7XTElOLGlovRqJnWIcCcALnLCKwi+/4Jav9ZETPP9/II4XNWqbR7gcFkYWauCnP+z/GlcVQ5ReoflTzaaQQJGne0Nh5A9/Es+Oic43xMBh X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RJJAW18wUEHYHloK4JUKON+dxcCiyK+Fer7drp55Yks+prkMnoMgfz0BKpijQyyumZ/tYeMzTPdjEjgqdl1bTFidTLjFRwCR5A+xonC/nD5vmjTZxQ9naKbf5g4rRO5ZW+5/EUNDascnAyqFTQ09Hw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3767b1e6-b3f9-4a85-55b3-08d9590a511b X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2021 18:45:09.7236 (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: AM6PR03MB4294 Subject: [FFmpeg-devel] [PATCH 5/5] avcodec/h264dsp, h264idct: Fix lengths of array parameters 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: Oih3awmOkx6s Fixes many -Warray-parameter warnings from GCC 11. Signed-off-by: Andreas Rheinhardt --- If someone has a good name for a macro for "5 * 8" in this context, I'll use it. libavcodec/aarch64/h264dsp_init_aarch64.c | 8 ++++---- libavcodec/arm/h264dsp_init_arm.c | 8 ++++---- libavcodec/h264dsp.h | 6 +++--- libavcodec/h264idct.h | 10 +++++----- libavcodec/h264idct_template.c | 15 ++++++++++++--- libavcodec/mips/h264dsp_mips.h | 12 ++++++------ libavcodec/mips/h264dsp_mmi.c | 7 ++++--- libavcodec/mips/h264idct_msa.c | 6 +++--- libavcodec/ppc/h264dsp.c | 6 +++--- libavcodec/x86/h264dsp_init.c | 4 ++-- 10 files changed, 46 insertions(+), 36 deletions(-) diff --git a/libavcodec/aarch64/h264dsp_init_aarch64.c b/libavcodec/aarch64/h264dsp_init_aarch64.c index d5baccf235..cbaf8d31eb 100644 --- a/libavcodec/aarch64/h264dsp_init_aarch64.c +++ b/libavcodec/aarch64/h264dsp_init_aarch64.c @@ -69,19 +69,19 @@ void ff_h264_idct_add_neon(uint8_t *dst, int16_t *block, int stride); void ff_h264_idct_dc_add_neon(uint8_t *dst, int16_t *block, int stride); void ff_h264_idct_add16_neon(uint8_t *dst, const int *block_offset, int16_t *block, int stride, - const uint8_t nnzc[6*8]); + const uint8_t nnzc[5 * 8]); void ff_h264_idct_add16intra_neon(uint8_t *dst, const int *block_offset, int16_t *block, int stride, - const uint8_t nnzc[6*8]); + const uint8_t nnzc[5 * 8]); void ff_h264_idct_add8_neon(uint8_t **dest, const int *block_offset, int16_t *block, int stride, - const uint8_t nnzc[6*8]); + const uint8_t nnzc[15 * 8]); void ff_h264_idct8_add_neon(uint8_t *dst, int16_t *block, int stride); void ff_h264_idct8_dc_add_neon(uint8_t *dst, int16_t *block, int stride); void ff_h264_idct8_add4_neon(uint8_t *dst, const int *block_offset, int16_t *block, int stride, - const uint8_t nnzc[6*8]); + const uint8_t nnzc[5 * 8]); av_cold void ff_h264dsp_init_aarch64(H264DSPContext *c, const int bit_depth, const int chroma_format_idc) diff --git a/libavcodec/arm/h264dsp_init_arm.c b/libavcodec/arm/h264dsp_init_arm.c index 54e1e38c93..13d499fda2 100644 --- a/libavcodec/arm/h264dsp_init_arm.c +++ b/libavcodec/arm/h264dsp_init_arm.c @@ -57,19 +57,19 @@ void ff_h264_idct_add_neon(uint8_t *dst, int16_t *block, int stride); void ff_h264_idct_dc_add_neon(uint8_t *dst, int16_t *block, int stride); void ff_h264_idct_add16_neon(uint8_t *dst, const int *block_offset, int16_t *block, int stride, - const uint8_t nnzc[6*8]); + const uint8_t nnzc[5 * 8]); void ff_h264_idct_add16intra_neon(uint8_t *dst, const int *block_offset, int16_t *block, int stride, - const uint8_t nnzc[6*8]); + const uint8_t nnzc[5 * 8]); void ff_h264_idct_add8_neon(uint8_t **dest, const int *block_offset, int16_t *block, int stride, - const uint8_t nnzc[6*8]); + const uint8_t nnzc[15 * 8]); void ff_h264_idct8_add_neon(uint8_t *dst, int16_t *block, int stride); void ff_h264_idct8_dc_add_neon(uint8_t *dst, int16_t *block, int stride); void ff_h264_idct8_add4_neon(uint8_t *dst, const int *block_offset, int16_t *block, int stride, - const uint8_t nnzc[6*8]); + const uint8_t nnzc[5 * 8]); static av_cold void h264dsp_init_neon(H264DSPContext *c, const int bit_depth, const int chroma_format_idc) diff --git a/libavcodec/h264dsp.h b/libavcodec/h264dsp.h index cbea3173c6..850d4471fd 100644 --- a/libavcodec/h264dsp.h +++ b/libavcodec/h264dsp.h @@ -89,16 +89,16 @@ typedef struct H264DSPContext { void (*h264_idct_add16)(uint8_t *dst /*align 16*/, const int *blockoffset, int16_t *block /*align 16*/, int stride, - const uint8_t nnzc[15 * 8]); + const uint8_t nnzc[5 * 8]); void (*h264_idct8_add4)(uint8_t *dst /*align 16*/, const int *blockoffset, int16_t *block /*align 16*/, int stride, - const uint8_t nnzc[15 * 8]); + const uint8_t nnzc[5 * 8]); void (*h264_idct_add8)(uint8_t **dst /*align 16*/, const int *blockoffset, int16_t *block /*align 16*/, int stride, const uint8_t nnzc[15 * 8]); void (*h264_idct_add16intra)(uint8_t *dst /*align 16*/, const int *blockoffset, int16_t *block /*align 16*/, - int stride, const uint8_t nnzc[15 * 8]); + int stride, const uint8_t nnzc[5 * 8]); void (*h264_luma_dc_dequant_idct)(int16_t *output, int16_t *input /*align 16*/, int qmul); void (*h264_chroma_dc_dequant_idct)(int16_t *block, int qmul); diff --git a/libavcodec/h264idct.h b/libavcodec/h264idct.h index 17e0051497..6f18df9e5f 100644 --- a/libavcodec/h264idct.h +++ b/libavcodec/h264idct.h @@ -26,11 +26,11 @@ void ff_h264_idct8_add_ ## depth ## _c(uint8_t *dst, int16_t *block, int stride) void ff_h264_idct_add_ ## depth ## _c(uint8_t *dst, int16_t *block, int stride);\ void ff_h264_idct8_dc_add_ ## depth ## _c(uint8_t *dst, int16_t *block, int stride);\ void ff_h264_idct_dc_add_ ## depth ## _c(uint8_t *dst, int16_t *block, int stride);\ -void ff_h264_idct_add16_ ## depth ## _c(uint8_t *dst, const int *blockoffset, int16_t *block, int stride, const uint8_t nnzc[6*8]);\ -void ff_h264_idct_add16intra_ ## depth ## _c(uint8_t *dst, const int *blockoffset, int16_t *block, int stride, const uint8_t nnzc[6*8]);\ -void ff_h264_idct8_add4_ ## depth ## _c(uint8_t *dst, const int *blockoffset, int16_t *block, int stride, const uint8_t nnzc[6*8]);\ -void ff_h264_idct_add8_422_ ## depth ## _c(uint8_t **dest, const int *blockoffset, int16_t *block, int stride, const uint8_t nnzc[6*8]);\ -void ff_h264_idct_add8_ ## depth ## _c(uint8_t **dest, const int *blockoffset, int16_t *block, int stride, const uint8_t nnzc[6*8]);\ +void ff_h264_idct_add16_ ## depth ## _c(uint8_t *dst, const int *blockoffset, int16_t *block, int stride, const uint8_t nnzc[5 * 8]);\ +void ff_h264_idct_add16intra_ ## depth ## _c(uint8_t *dst, const int *blockoffset, int16_t *block, int stride, const uint8_t nnzc[5 * 8]);\ +void ff_h264_idct8_add4_ ## depth ## _c(uint8_t *dst, const int *blockoffset, int16_t *block, int stride, const uint8_t nnzc[5 * 8]);\ +void ff_h264_idct_add8_422_ ## depth ## _c(uint8_t **dest, const int *blockoffset, int16_t *block, int stride, const uint8_t nnzc[15 * 8]);\ +void ff_h264_idct_add8_ ## depth ## _c(uint8_t **dest, const int *blockoffset, int16_t *block, int stride, const uint8_t nnzc[15 * 8]);\ void ff_h264_luma_dc_dequant_idct_ ## depth ## _c(int16_t *output, int16_t *input, int qmul);\ void ff_h264_chroma422_dc_dequant_idct_ ## depth ## _c(int16_t *block, int qmul);\ void ff_h264_chroma_dc_dequant_idct_ ## depth ## _c(int16_t *block, int qmul); diff --git a/libavcodec/h264idct_template.c b/libavcodec/h264idct_template.c index ce66ed3ab8..ec0b428c27 100644 --- a/libavcodec/h264idct_template.c +++ b/libavcodec/h264idct_template.c @@ -171,7 +171,10 @@ void FUNCC(ff_h264_idct8_dc_add)(uint8_t *_dst, int16_t *_block, int stride){ } } -void FUNCC(ff_h264_idct_add16)(uint8_t *dst, const int *block_offset, int16_t *block, int stride, const uint8_t nnzc[15*8]){ +void FUNCC(ff_h264_idct_add16)(uint8_t *dst, const int *block_offset, + int16_t *block, int stride, + const uint8_t nnzc[5 * 8]) +{ int i; for(i=0; i<16; i++){ int nnz = nnzc[ scan8[i] ]; @@ -182,7 +185,10 @@ void FUNCC(ff_h264_idct_add16)(uint8_t *dst, const int *block_offset, int16_t *b } } -void FUNCC(ff_h264_idct_add16intra)(uint8_t *dst, const int *block_offset, int16_t *block, int stride, const uint8_t nnzc[15*8]){ +void FUNCC(ff_h264_idct_add16intra)(uint8_t *dst, const int *block_offset, + int16_t *block, int stride, + const uint8_t nnzc[5 * 8]) +{ int i; for(i=0; i<16; i++){ if(nnzc[ scan8[i] ]) FUNCC(ff_h264_idct_add )(dst + block_offset[i], block + i*16*sizeof(pixel), stride); @@ -190,7 +196,10 @@ void FUNCC(ff_h264_idct_add16intra)(uint8_t *dst, const int *block_offset, int16 } } -void FUNCC(ff_h264_idct8_add4)(uint8_t *dst, const int *block_offset, int16_t *block, int stride, const uint8_t nnzc[15*8]){ +void FUNCC(ff_h264_idct8_add4)(uint8_t *dst, const int *block_offset, + int16_t *block, int stride, + const uint8_t nnzc[5 * 8]) +{ int i; for(i=0; i<16; i+=4){ int nnz = nnzc[ scan8[i] ]; diff --git a/libavcodec/mips/h264dsp_mips.h b/libavcodec/mips/h264dsp_mips.h index 5847ef36fe..93a201c66a 100644 --- a/libavcodec/mips/h264dsp_mips.h +++ b/libavcodec/mips/h264dsp_mips.h @@ -50,10 +50,10 @@ void ff_h264_deq_idct_luma_dc_msa(int16_t *dst, int16_t *src, int32_t de_q_val); void ff_h264_idct_add16_msa(uint8_t *dst, const int32_t *blk_offset, int16_t *block, int32_t stride, - const uint8_t nnzc[15 * 8]); + const uint8_t nnzc[5 * 8]); void ff_h264_idct_add16_intra_msa(uint8_t *dst, const int32_t *blk_offset, int16_t *block, int32_t dst_stride, - const uint8_t nnzc[15 * 8]); + const uint8_t nnzc[5 * 8]); void ff_h264_idct_add8_msa(uint8_t **dst, const int32_t *blk_offset, int16_t *block, int32_t dst_stride, const uint8_t nnzc[15 * 8]); @@ -65,7 +65,7 @@ void ff_h264_idct8_dc_addblk_msa(uint8_t *dst, int16_t *src, int32_t dst_stride); void ff_h264_idct8_add4_msa(uint8_t *dst, const int *blk_offset, int16_t *blk, int dst_stride, - const uint8_t nnzc[15 * 8]); + const uint8_t nnzc[5 * 8]); void ff_h264_h_lpf_luma_intra_msa(uint8_t *src, ptrdiff_t stride, int alpha, int beta); @@ -329,11 +329,11 @@ void ff_h264_idct8_add_8_mmi(uint8_t *dst, int16_t *block, int stride); void ff_h264_idct_dc_add_8_mmi(uint8_t *dst, int16_t *block, int stride); void ff_h264_idct8_dc_add_8_mmi(uint8_t *dst, int16_t *block, int stride); void ff_h264_idct_add16_8_mmi(uint8_t *dst, const int *block_offset, - int16_t *block, int stride, const uint8_t nnzc[15*8]); + int16_t *block, int stride, const uint8_t nnzc[5 * 8]); void ff_h264_idct_add16intra_8_mmi(uint8_t *dst, const int *block_offset, - int16_t *block, int stride, const uint8_t nnzc[15*8]); + int16_t *block, int stride, const uint8_t nnzc[5 * 8]); void ff_h264_idct8_add4_8_mmi(uint8_t *dst, const int *block_offset, - int16_t *block, int stride, const uint8_t nnzc[15*8]); + int16_t *block, int stride, const uint8_t nnzc[5 * 8]); void ff_h264_idct_add8_8_mmi(uint8_t **dest, const int *block_offset, int16_t *block, int stride, const uint8_t nnzc[15*8]); void ff_h264_idct_add8_422_8_mmi(uint8_t **dest, const int *block_offset, diff --git a/libavcodec/mips/h264dsp_mmi.c b/libavcodec/mips/h264dsp_mmi.c index b5ab07c863..dff3d331b1 100644 --- a/libavcodec/mips/h264dsp_mmi.c +++ b/libavcodec/mips/h264dsp_mmi.c @@ -766,7 +766,8 @@ void ff_h264_idct8_dc_add_8_mmi(uint8_t *dst, int16_t *block, int stride) } void ff_h264_idct_add16_8_mmi(uint8_t *dst, const int *block_offset, - int16_t *block, int stride, const uint8_t nnzc[15*8]) + int16_t *block, int stride, + const uint8_t nnzc[5 * 8]) { int i; for(i=0; i<16; i++){ @@ -783,7 +784,7 @@ void ff_h264_idct_add16_8_mmi(uint8_t *dst, const int *block_offset, } void ff_h264_idct_add16intra_8_mmi(uint8_t *dst, const int *block_offset, - int16_t *block, int stride, const uint8_t nnzc[15*8]) + int16_t *block, int stride, const uint8_t nnzc[5 * 8]) { int i; for(i=0; i<16; i++){ @@ -796,7 +797,7 @@ void ff_h264_idct_add16intra_8_mmi(uint8_t *dst, const int *block_offset, } void ff_h264_idct8_add4_8_mmi(uint8_t *dst, const int *block_offset, - int16_t *block, int stride, const uint8_t nnzc[15*8]) + int16_t *block, int stride, const uint8_t nnzc[5 * 8]) { int i; for(i=0; i<16; i+=4){ diff --git a/libavcodec/mips/h264idct_msa.c b/libavcodec/mips/h264idct_msa.c index fbf7795e27..1a20a3e30e 100644 --- a/libavcodec/mips/h264idct_msa.c +++ b/libavcodec/mips/h264idct_msa.c @@ -347,7 +347,7 @@ void ff_h264_idct8_dc_addblk_msa(uint8_t *dst, int16_t *src, void ff_h264_idct_add16_msa(uint8_t *dst, const int32_t *blk_offset, int16_t *block, int32_t dst_stride, - const uint8_t nzc[15 * 8]) + const uint8_t nzc[5 * 8]) { int32_t i; @@ -369,7 +369,7 @@ void ff_h264_idct_add16_msa(uint8_t *dst, void ff_h264_idct8_add4_msa(uint8_t *dst, const int32_t *blk_offset, int16_t *block, int32_t dst_stride, - const uint8_t nzc[15 * 8]) + const uint8_t nzc[5 * 8]) { int32_t cnt; @@ -448,7 +448,7 @@ void ff_h264_idct_add16_intra_msa(uint8_t *dst, const int32_t *blk_offset, int16_t *block, int32_t dst_stride, - const uint8_t nzc[15 * 8]) + const uint8_t nzc[5 * 8]) { int32_t i; diff --git a/libavcodec/ppc/h264dsp.c b/libavcodec/ppc/h264dsp.c index 779092fd76..c02733dda2 100644 --- a/libavcodec/ppc/h264dsp.c +++ b/libavcodec/ppc/h264dsp.c @@ -328,7 +328,7 @@ static void h264_idct8_dc_add_altivec(uint8_t *dst, int16_t *block, int stride) static void h264_idct_add16_altivec(uint8_t *dst, const int *block_offset, int16_t *block, int stride, - const uint8_t nnzc[15 * 8]) + const uint8_t nnzc[5 * 8]) { int i; for(i=0; i<16; i++){ @@ -342,7 +342,7 @@ static void h264_idct_add16_altivec(uint8_t *dst, const int *block_offset, static void h264_idct_add16intra_altivec(uint8_t *dst, const int *block_offset, int16_t *block, int stride, - const uint8_t nnzc[15 * 8]) + const uint8_t nnzc[5 * 8]) { int i; for(i=0; i<16; i++){ @@ -353,7 +353,7 @@ static void h264_idct_add16intra_altivec(uint8_t *dst, const int *block_offset, static void h264_idct8_add4_altivec(uint8_t *dst, const int *block_offset, int16_t *block, int stride, - const uint8_t nnzc[15 * 8]) + const uint8_t nnzc[5 * 8]) { int i; for(i=0; i<16; i+=4){ diff --git a/libavcodec/x86/h264dsp_init.c b/libavcodec/x86/h264dsp_init.c index 08eb7ead44..c9a96c7dca 100644 --- a/libavcodec/x86/h264dsp_init.c +++ b/libavcodec/x86/h264dsp_init.c @@ -52,7 +52,7 @@ IDCT_ADD_FUNC(8, 10, avx) #define IDCT_ADD_REP_FUNC(NUM, REP, DEPTH, OPT) \ void ff_h264_idct ## NUM ## _add ## REP ## _ ## DEPTH ## _ ## OPT \ (uint8_t *dst, const int *block_offset, \ - int16_t *block, int stride, const uint8_t nnzc[6 * 8]); + int16_t *block, int stride, const uint8_t nnzc[5 * 8]); IDCT_ADD_REP_FUNC(8, 4, 8, mmx) IDCT_ADD_REP_FUNC(8, 4, 8, mmxext) @@ -74,7 +74,7 @@ IDCT_ADD_REP_FUNC(, 16intra, 10, avx) #define IDCT_ADD_REP_FUNC2(NUM, REP, DEPTH, OPT) \ void ff_h264_idct ## NUM ## _add ## REP ## _ ## DEPTH ## _ ## OPT \ (uint8_t **dst, const int *block_offset, \ - int16_t *block, int stride, const uint8_t nnzc[6 * 8]); + int16_t *block, int stride, const uint8_t nnzc[15 * 8]); IDCT_ADD_REP_FUNC2(, 8, 8, mmx) IDCT_ADD_REP_FUNC2(, 8, 8, mmxext)