From patchwork Thu Oct 20 08:31:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38835 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp40349pzb; Thu, 20 Oct 2022 01:31:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7zuW0b5guGzBymQdx6c/IdVV7Joc3yrUttefyPKFbMCTT7i/XOwEo1hCIRVY4AT46UQJch X-Received: by 2002:a17:907:6e18:b0:78d:b374:8989 with SMTP id sd24-20020a1709076e1800b0078db3748989mr9953348ejc.552.1666254703728; Thu, 20 Oct 2022 01:31: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 oz42-20020a1709077daa00b0077ed84da316si17732931ejc.217.2022.10.20.01.31.31; Thu, 20 Oct 2022 01:31: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=RB0YVFQ1; 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 93C7A68BE11; Thu, 20 Oct 2022 11:31:28 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02olkn2032.outbound.protection.outlook.com [40.92.49.32]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6983F68BC1B for ; Thu, 20 Oct 2022 11:31:22 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JVmmrG0QlfjhXW1TM6n6Z1QW982ywr+CxUxRw+1p0xEiMpluCkjn3jMpXn5c3BZ5QnenKW8d6/weGwimC2meNux8z2xJWx+M2/x/TJojXqwK6Of45T1uGB0iQ4CkrFbtHmyxMjcie72TQwA7hopud58ZjHFNPMLT+0x0stY452Kge0RAd6t3VjkAP32sXoI4NpCrm6vv8kLP+ara0eR6x0GY5+K+2lC/Vaq1JNRxdxQHVP29X7Y2o9MGA3cq+hGjEWuODzZjmtCm4Kpu2/6dvxEfTlYUQqQCypWmKjJVA9qobgdZPKKxMi7gFtCSWFlHiP21Egt4d9FzNmxZ5cPMag== 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=GWKgSwKojpvyac1oZgljOxfbV3pdSiPgD5iQGd263e8=; b=KHDaaNOBTDQD2jSFDusj+W2XhJqxHI4XY5JQKJfeu+v6cCdXNNQ7jVOs4fi0c4nmTm5V1Pijzb+eXYPL0FY0AYgP+1+VSWsTa5+K+Jg2S3hc0H5kzGEsgOrOdWo/50LJRLer+aS3CzfUZrl8LwBqimlWnQaIKe3wKjkXXEAMxpVGdzLI4SE5tdNzob0ZETIXjSkhG7E+0vzmYnyM6hueTkfCbxkynsVfyTDLRjy3eqZolz22WvhXwSLr4/LBo7lXftLVXMuF+4DHvTrbdkqZbLu69IK8KhqleQQqTBLQvCVQatv8eE7nDFZ994F1Prp9rHhXs3Iaeuf22dfCDlfmBQ== 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=GWKgSwKojpvyac1oZgljOxfbV3pdSiPgD5iQGd263e8=; b=RB0YVFQ1AIoVpEUtlPCl3PpRRzDdhUGNpgWnXiSni9NvI3tKt0mdiOooeKUR8Ky+f9KL0YjK7fXxvc+ZZrC20Ae5W0/WnVW5OOvpcIbpDC3O7FTloddM6PGWJkHRVDdN+GaJB5EsnL9Om9h2SvdiE45rL+YRvWl250Mb38WmPm/JWhaF18uLlhsjc36i7OVub3qaeNGsSPJio1hTlgQDGMuK5aUDxMz/4b/oGVP4Null7UOdkJD2EdNOVTLB5iE+lBTrDaNeGLGIWSb/CHwhsCt+dr2KqwpB4WNG7yATwnHzT0q9IJlp3v0parFTTPFZl9J6BwW1ME5FpBq4GjUv+Q== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by AS8P250MB0186.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:379::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.29; Thu, 20 Oct 2022 08:31:20 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 08:31:20 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 10:31:03 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [PzZT+mNCWS070ykWWAKhlWWwAXP5JtC3c2FhM1DzLgI=] X-ClientProxiedBy: AS8P251CA0030.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:2f2::19) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020083124.2378427-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|AS8P250MB0186:EE_ X-MS-Office365-Filtering-Correlation-Id: 3492c2ae-02db-4efd-3189-08dab2757724 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmqqpqVHbY8r+ej275oS7ZbBAKoL9BXq9EBu/3h5ff/OEUBw4Wv5qD3UGjEv1oZb/oQESFD3PXj5LZkaW/xtSNY6cbWSMHj5Z/1VV7VmxYWxDcRriXwRNalNYTC5CWEcTpZtd/Eyeco4aRQT47H3LC73zcGsjVRj+yPh8/u3s7KXFkYlE0hVTjJUAL5t5cpa8EeCMAaQSRNqy6y6D6zpVKbxD5k4hjjYTLqjusY/Fg2TS6y2k0e30DuUTyzcE3/44EKi1oRiBtPI/t7Jt9ZZlGvJOeNVa/w9TmapoNU9sBvZ1HmjIrxNZB/vSda1AHGDfdVy1Qj3wulgCy9Sf0mvjp5YnfsBlgecIK7L0eGrfb1Ic65JGZGo4z2FsUHA3Qoomgd/2Zvga7zWjbT//iFqcgIk/WhayRiuMMA6N+ZVrzakUKSIK3bf9OPt8BG25D8yf3nYJ4P/9Uvtic2Ud0MAVm6lRogWVmrW3Qiff4t5RjsBdnOhgEdDlTX8Zob7qJmC+33vl42SPtJlkabB4oIf/iquJiLAhwm0jx+CIpxxTXfD3GRl4cg23N0dFjU9xZQ5r8qkcvrtt0prdWpJFVgYGcyxJXGP/oamfMWF8LpXMNdNJU6qozz6hbrTwK8LbFDxLFSSTtbI6FjCg9YZ0umXOqSO/wWgGG0TnGlGLn8rkeWM4UdNYDzu28CneJey9d1MOSQ9ElXwYIw49N/HpYRz9LLaDg4DRY8vOa+gSveyXpfREURG5xaTzfzc6eQ7l0h+6pQ= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MAQIaCEjYRDcOvDUWW18MGygUprm7GPu2yiVepRThuWPPBfx1qL3mapcbGUXUuynGSV0eMsyS/QSGBm/QFtr0gJMkwwj5q49yQIso+v4aJVkyozXV+DSwzAn42DUnfRK0k0ERjYaHixopSXCrkXvRfGhPTJ/EGR6V8mMaFxR4mMvBswR1V+MiUmoqyczUgkgz/VWKvG5Roiyi8kSnmge7PmehI3JChx57aEUx7+ddS2bRF9MxXBWmj76Z+pChqS02voPVywmpgHEZ8Lm/Z3vj58sBC8MSxzWsfw6TTTsEkQSRpQQOJESe7wrHknJu+h6IeLIyE8m5y+0iyV6ilX1IMIM4NkEm038g6G9eRUlyPbfcac1K74Ujzugi7xeURB0HZKfj1w7K8kUyfGB7CDiPLjNqmTDrO2qfkGidzOXX/fPlvBEdFYw1dWYY700uZ6OVdp3v5+A2WO7B/XtQGLmiTd1swnL/Etgh2eKNn/BJwuEYVS4uCbywYqzniMmc1BBN4m6lftdRBB7EF3nTUJ+4jT+DKwNFDHI7e2po96k/OQZgX/xwb2XqfwuBCSmNzVXvhO584BQGU7B9a8p423R2CZcYlq3j58DLwJgZGxS4l8RJCQR4I0g7psLqBGWSR1FMNntl7aOEWE4LjWmtKcbfSHcqwZQZpDc3v8OZQm9WrciPODZmqB0QTH6oxibk1Sw X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: tk/ZyWmZ7e+VWXYmFTLM0JATZCHeA+01nKxi/QDYgbdZXA2upqF97zjEu4oGEdqPcG3r8GcYa9VdclXXjfb8lv4it1wgab5iHZz8OREYuWFrlz0UnFHy4iIt30ziMIVo04swuOorGcY934/Nkvy/7oWQkYnsZImGLXPcWpFVk3dH9X426b72mdrMuLm1BKKYtiPuYls/yc1ErDSDx0q5qKo0/cvljojqBP46AXZGt/OI6K0DuulIC4QoKPVOd9CDS1avj57y/8zgLPqn6xrItKmaJGyh5BRlQAqxVBygVIfdVsJp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c2ae-02db-4efd-3189-08dab2757724 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 08:31:20.8155 (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: AS8P250MB0186 Subject: [FFmpeg-devel] [PATCH 01/22] configure: Add idctdsp dependency to codecs that need it 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: 6zxavve3GnP9 Currently masked by faan. Signed-off-by: Andreas Rheinhardt --- configure | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 431fa5bf7a..bb61e9a0b8 100755 --- a/configure +++ b/configure @@ -2773,6 +2773,7 @@ ac3_fixed_encoder_select="ac3dsp audiodsp mdct me_cmp" acelp_kelvin_decoder_select="audiodsp" adpcm_g722_decoder_select="g722dsp" adpcm_g722_encoder_select="g722dsp" +agm_decoder_select="idctdsp" aic_decoder_select="golomb idctdsp" alac_encoder_select="lpc" als_decoder_select="bswapdsp mpeg4audio" @@ -2820,7 +2821,7 @@ dxv_decoder_select="lzf texturedsp" eac3_decoder_select="ac3_decoder" eac3_encoder_select="ac3_encoder" eamad_decoder_select="aandcttables blockdsp bswapdsp idctdsp" -eatgq_decoder_select="aandcttables" +eatgq_decoder_select="aandcttables idctdsp" eatqi_decoder_select="aandcttables blockdsp bswapdsp idctdsp" exr_decoder_deps="zlib" exr_encoder_deps="zlib" @@ -2859,7 +2860,7 @@ huffyuv_encoder_select="bswapdsp huffman huffyuvencdsp llvidencdsp" hymt_decoder_select="huffyuv_decoder" iac_decoder_select="imc_decoder" imc_decoder_select="bswapdsp fft mdct sinewin" -imm4_decoder_select="bswapdsp" +imm4_decoder_select="bswapdsp idctdsp" imm5_decoder_select="h264_decoder hevc_decoder" indeo3_decoder_select="hpeldsp" indeo4_decoder_select="ividsp" From patchwork Thu Oct 20 08:45:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38836 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp45315pzb; Thu, 20 Oct 2022 01:45:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM718moDyIMxgm5Dv06cFeAw+x4lGcNNwERvwmnr+DqLHnkQiaZG4PrVZyu6HNCLV72niDp+ X-Received: by 2002:a17:907:2cf5:b0:78d:5d7a:9cde with SMTP id hz21-20020a1709072cf500b0078d5d7a9cdemr10312301ejc.17.1666255553430; Thu, 20 Oct 2022 01:45:53 -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 l15-20020a170906794f00b0078d2a84f2f8si18409016ejo.645.2022.10.20.01.45.49; Thu, 20 Oct 2022 01:45:53 -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=tfP1VL28; 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 BC86068BE0E; Thu, 20 Oct 2022 11:45:46 +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-vi1eur05olkn2076.outbound.protection.outlook.com [40.92.90.76]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 090F068BC9D for ; Thu, 20 Oct 2022 11:45:39 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IaR1MP/YefmHYD3awwZRx5OJgaPeaNDMp7/X4nS/Ci2tnlFyIw3CqeWHbyPgX4bRMmi31WSAeYqsNmywdY5VN2/aofgj+haIvagvbk8GHqANgvnw5PmJhUM6VQeTXIqTDaz9/j0LvFegu84nzuVqGFx0q7EDZQveUjhY3iqLw/OnI5NbWL2VKbY2NaQffjtvR0MIMGz7hPAQA7QKAw4p+xU03jdZdG0sHnTJ9We+mBmpdfHBZuW0F94hoxvk696OLsrzmPVlwPPtzvGc9cbDhUOZRVU0JGuuUieWuworEQ0l0fhtDGivJYTxQpVERlF+6udKRtn10c9pbuR5dqc4Dg== 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=nVd+L9zY6vTgKMNIwwWTgANfgI+BWaZITBh7PAGnZGg=; b=Pp0/VO1cJsufVOpy9Kt+9sgJ0tqfEB+AQVWFECWQcGiK1LtbhtNgd2bjhxDmNG539xjDZ4znScFabJrzMv8bYJRLEjtRJOf4uGNSAdFw4HvTfY7wujztkG42sPpJb2JhbVFCNGNJ4J8gO8RyYns3+9edHzHV1pC1RYYHA6DBwzxtEJ97sdOmgiFZl1UjIcw2dLl6oUrB9/aTLpKAueGebDoeYppnpnJNbAyO9oCOBaRU6fXwSGLG8J6rbAnG889EgdIAgXJLWQZAaMQufzdH/3Wly1476tJ17N/q8ds7VvvdBwh/gpY7jzLROUTlzanPEo5symwaZ9Evl+DvyyjOtA== 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=nVd+L9zY6vTgKMNIwwWTgANfgI+BWaZITBh7PAGnZGg=; b=tfP1VL28qdZT8E64ubLZogmMawX2md0QANPhdGwPreh/4/s5Au8TeZnpdq8b7I5s8+VeMKr07O7nPVLxzjyjMoE/5BdEA8ckUY+HnnRs615vrHwcpn2hrDko/v8jW8AWw0WSxRH8F8ZfkYlhSwMJH+t44SjpazNFH5YqkeOYPZmwie2X2UBS4/TSKidtYcO730Acu09oFME+6r7uDmpmbOfQTcIn5lxc2TjOb0OgUB2fyBGFTa1FR16VQFa0Kg/OHMG8iZefA6kBgDQAnF/tRX4jkNcJqrcEUHDwjiCcPPbX0nEQqglwPZHjXb9Ls20IM3EEVV6TWIKWZ6p9w4q4gA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by GV1P250MB0810.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:9d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Thu, 20 Oct 2022 08:45:38 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 08:45:38 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 10:45:20 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [AMfAHPUnIv0spt/E8NasqJqljB4IFdNGxj64vbMmYtE=] X-ClientProxiedBy: AS9PR06CA0774.eurprd06.prod.outlook.com (2603:10a6:20b:484::29) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020084540.2378553-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|GV1P250MB0810:EE_ X-MS-Office365-Filtering-Correlation-Id: 04109347-c8a9-4078-8999-08dab2777629 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3kEq9VXjGDAyurdVkDmkI7qSY4DrOWVzAF5MuM+TGyc2zpL6r3y8psnrCx3wzlxP1hdSJ7HpArUtPmgG7t7hKB8JvCCXhEy+Xeq7c5MYXyRmIZW3O2jE3Tb7w/eZJobhrvG+tunOdGAWB7CRvcQ8g7L1inh88eKvme5EGG2nefsPWu0r4/CnTY3fgxqL1OmI2r+xvuQHjO//nHTRCP+bAoA16EgSfksGZ6/S6kzlueEvC95Hs1RL4KpC9ru0pOoJZueDaSuYk24lFr7fJSSzgckKiaJQKcMK/CVMnf7Kwuetcz+v4EjOHKUe3ufMx6xd6axnVUGcZNEGXMyP9wMp+tpC5+vXDj6aDOIG0QTWZalB3TuME24X4GFCrje90WaoVF+hJUbynEZVL0k5OOH6SxejAmbsRDslMWuoM+amM48KGyXbALz1mQZoaJHxlAAFALsruIWJtqVdNwpNBe05pciOtMM9wW7idTPpMpgyMomHGsV7Wq1HIPDYh0afzyMH+obvCIu1aoBFWBYifnS1ncWYtpE3r5Ot/snMMLJDkTYNpd29Jw+Rh5C+QyP69aqmedTnBrOdNXMhWsPCiHRlJZb6RsJ8v67flVFhv4B+IiNQ0UyzzrMYpRx8VP09sgtpyd5ETq9RvBWcbyyX4+LCZvcGr+fjkgveIqCT5cfl/Ck0IxJnCPkUZ3k81EN4aOS/tq2HTFVEhT1eYAvDck8suhgziM2rE6sR8DsXVfTehrX7VKXDePJKdK+mBozKVROU2EdTcCNubcOQPtaJyaxJFqi X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sP4PLs3/ol7QoHrixknNdK5TvuZZ53ToihhP5G8nir2KYVmzF4T3GTuzYVABIJOI34dIKmLv6N6+8amN2H8srTDgOS9YQZFLBGQQY7QbYIXn7UvA0rFWxSkOCv6nqwmrJqU4mpIs6j8fo3kORZya3C/qfTVxTHYWt83uR25+v9Qpw9y29Js6HW2KWIImddFB8ktLRRjW2/B0vHjaRA1Tns9FXJgJgvUx3Lv52sQqNe0oEwQNprToVHL3iZ2xCKmYTjE5WDADBewiQZWHTIWH1ZCGhtBp+758aoIsuPCEG+kyzjiFa78Z8Y3RoKWRdFWPKKS4hJ5O0GrOigehx6n1C1xroYn7sopb3gEyYw1Orqsj+sAZXNEjSpyYdMgzmVFItobcIhX3YoO7QcXnLcex/8ueYWSvWfuexzMe/ENDkf9pV/cwWbx2oso+uPswQ4ed1bxJRYgZ/ilIeHd+5II/fdGevN7mBekIenF57uqMma0jADhYqK3SMtGEG8H9exi3VL9MEm3p0BKkocDhazDcsh9zpGLQKq0sg/Ys2MSGR/CisCMeCE5iCuFFH+mNm3y6VJ64kzFlT6Gx49gRf0TzsO/iMVJpiGqWgBR7l95KqN0/Kkx2XTxxYCjYFg7M4NPRyU5CD/ltEXbEUMr1oK7Wz94dCRnVzeuiuoGKWg1YCqLib/zv/bqj320rvFbX2dom X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +0gPXJAenr2rmrCnBi9r4+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rPXR7JGLQHzbwzRXNJGvM/tVAD1s6AIxgC9bNC4fyyYTH4IaOvGUZSq+2M1r6CDAhonuHq6gjCt1KsnjQ47IVxszwMD360s7iFF+fptesDj93efXqVwEPM3MSiu/V1pHdU789G6k/++YnFVJlzV/ICEL8ohK6lMuuL+kEYG8jnoYZ0AkGSZbOsuPn4JHt1AsCbnHu1hes3O7m5wRRuLbGFrzhKt3AHHchTf5yZ X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 04109347-c8a9-4078-8999-08dab2777629 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 08:45:38.2132 (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: GV1P250MB0810 Subject: [FFmpeg-devel] [PATCH 02/22] avcodec/eamad: Don't use IDCTDSP-API unnecessarily 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: UiQyLkH2XpRH The eamad decoder uses a custom IDCT and actually does not use the IDCTDSP API at all. Somehow it was nevertheless used to simply apply the identity permutation on ff_zigzag_direct. This commit stops doing so. Signed-off-by: Andreas Rheinhardt --- configure | 2 +- libavcodec/eamad.c | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/configure b/configure index bb61e9a0b8..16b2084945 100755 --- a/configure +++ b/configure @@ -2820,7 +2820,7 @@ dxa_decoder_deps="zlib" dxv_decoder_select="lzf texturedsp" eac3_decoder_select="ac3_decoder" eac3_encoder_select="ac3_encoder" -eamad_decoder_select="aandcttables blockdsp bswapdsp idctdsp" +eamad_decoder_select="aandcttables blockdsp bswapdsp" eatgq_decoder_select="aandcttables idctdsp" eatqi_decoder_select="aandcttables blockdsp bswapdsp idctdsp" exr_decoder_deps="zlib" diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c index 2a5aac912d..de8f488f65 100644 --- a/libavcodec/eamad.c +++ b/libavcodec/eamad.c @@ -39,7 +39,6 @@ #include "get_bits.h" #include "aandcttab.h" #include "eaidct.h" -#include "idctdsp.h" #include "mpeg12data.h" #include "mpeg12vlc.h" @@ -52,13 +51,11 @@ typedef struct MadContext { AVCodecContext *avctx; BlockDSPContext bdsp; BswapDSPContext bbdsp; - IDCTDSPContext idsp; AVFrame *last_frame; GetBitContext gb; void *bitstream_buf; unsigned int bitstream_buf_size; DECLARE_ALIGNED(32, int16_t, block)[64]; - ScanTable scantable; uint16_t quant_matrix[64]; int mb_x; int mb_y; @@ -71,9 +68,6 @@ static av_cold int decode_init(AVCodecContext *avctx) avctx->pix_fmt = AV_PIX_FMT_YUV420P; ff_blockdsp_init(&s->bdsp); ff_bswapdsp_init(&s->bbdsp); - ff_idctdsp_init(&s->idsp, avctx); - ff_init_scantable_permutation(s->idsp.idct_permutation, FF_IDCT_PERM_NONE); - ff_init_scantable(s->idsp.idct_permutation, &s->scantable, ff_zigzag_direct); ff_mpeg12_init_vlcs(); s->last_frame = av_frame_alloc(); @@ -135,7 +129,7 @@ static inline int decode_block_intra(MadContext *s, int16_t * block) { int level, i, j, run; RLTable *rl = &ff_rl_mpeg1; - const uint8_t *scantable = s->scantable.permutated; + const uint8_t *scantable = ff_zigzag_direct; int16_t *quant_matrix = s->quant_matrix; block[0] = (128 + get_sbits(&s->gb, 8)) * quant_matrix[0]; From patchwork Thu Oct 20 08:45:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38837 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp45349pzb; Thu, 20 Oct 2022 01:45:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4nau7zb5I3b+M5ar0nw7U3tIrlk/QT0GlWfsEOAzqeEDeT3naWnoelatzQZLdpoj6+yU3K X-Received: by 2002:a17:907:918e:b0:78d:b87e:7051 with SMTP id bp14-20020a170907918e00b0078db87e7051mr10196739ejb.227.1666255559406; Thu, 20 Oct 2022 01:45:59 -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 nb21-20020a1709071c9500b0078049ab4bbasi17567418ejc.526.2022.10.20.01.45.58; Thu, 20 Oct 2022 01:45:59 -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=cmVF9wNB; 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 E906B68BD7D; Thu, 20 Oct 2022 11:45:55 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-oln040092073032.outbound.protection.outlook.com [40.92.73.32]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7144A68BE13 for ; Thu, 20 Oct 2022 11:45:49 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MLjRm/7cZLFNGFkHRpb0bQFDrS4Q6hzXcXZJe4fNdYMICz53Hq8Ny/wlp8rYQ4M2FcMWPAl/XKspllzVZbv/RGE4AQFv6CukQGc1fC/neTlFpCWkQR1+A92m5i3BlaaSUWuBugcMeGQlSaYInRN8p3Co3A9yc8Ktsw1TjVHvpNTaukp9QYKyTRTkutKVL30UKpljOMJnEv243C7MfeXwPH+J35PiB7Mrd/k599tIrsZbyMkAToHkqoIqFqNUe1RGsRPom1TbSW1hYuA2ZsnLJ8lnLZWXT6Zg7H5qcf2ajof0nLzu62IXtHXR3clgtm7h47HQOxIiMJ90SljU4HDPZQ== 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=W9rvtmXoGRAygpq+2fCKcfBnl3iV578Kzj4Ne9qswOE=; b=bXU0ShOij8r2DCsrV7WAVch4RdSE+ybKEleIDSNUXIbwad2NXftRMsiGfbpFuyFDH9508NsqKXzfA2Km4tfb5pvPoiFByYZuCgrdlAcutZGuI1Zm6FHVHUunuV/3uK9J902LT7YV4pEf1DQsszwP+m4RcxJ+41RVh2wXbhpwdt3FNv+BLQPxQXUyVxO/6gXN3zCUyZDR2HA98uvwEOjANrUGGHwG993Wt4ANNOKovVbS7i9wpAfNF3FZSIU4jGAaiG7q0brTxSZRknMqVRNmHjrlYoUMtEskOJaJOnHplsxDlxnU/lO5jRV/2uYupAjJwVszydIseTagX2kVvQWlPg== 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=W9rvtmXoGRAygpq+2fCKcfBnl3iV578Kzj4Ne9qswOE=; b=cmVF9wNBMiRwk3KUUd3O/OBjQaFvQ+75lGEVzlcujcCXbjNiBtIMr/pCRJh/BISyARSBabNpVvnkRelj+oKgFFPizWYeE/P8ubgBpZfTLHDD0s9Sl+UXeqUS1dmSE5aQHR1Cup0n1E0zWGHKnuI/AtLAZi59fV3NLiAQQW9wc23NtfKUUpdSs8d1XAD9FanTAGUQ/XcNPlfTXjkDv2xCRM0fNKynjCSG2OcOu3HIVjrTvRN7RCU6i9Vgi47/gGBw8iNwHdHzWg6PGvz4GgTs1WKPU8M7F+pp7DlGJ2T0HHP8FFvLNGE6CM+ZMq78yi0xFMUeMDPv616+ScKsUnt6pw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by GV1P250MB0810.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:9d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Thu, 20 Oct 2022 08:45:47 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 08:45:47 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 10:45:21 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [7ll3CsDFOJDBQxCvYljkSYFm17av+Kj1jF/MWWiKzgA=] X-ClientProxiedBy: AS9PR06CA0774.eurprd06.prod.outlook.com (2603:10a6:20b:484::29) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020084540.2378553-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|GV1P250MB0810:EE_ X-MS-Office365-Filtering-Correlation-Id: 7bf88fc4-efce-47f6-73f8-08dab2777bd3 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3kEq9VXjGDAyurdVkDmkI7qSY4DrOWVzAF5MuM+TGyc2zpL6r3y8psnrCx3wzlxP1hdSJ7HpArUtB2aoDueVkTLVaqRPyAtIeFEXQSAVphAGF0kB1LgvT/B+fJGnf8OspFOuQUBfLpl2iMi5g4Ap9yKC93Og5EoWQYr//j4FHkKstzIoad7Q3AkIQAD+Vtvj8ndXX5xJg0sm+uBB3w8pmbdsa0uZPSSXkl8FI90UuJnXO2ZnUUstqItVUhuR4Usiz75t1Inmx1x+neH7nrX3PgCzWdwjJTQZmhe4/ElA7rdaeOTMguF+FDg6GTNigdnrReyxMQjREYJm3nv0eAXkRfg9XYStODaXTrnsRFAAwwmk7I1o0ZPTlz/XR1BbY+mH226vlvGTS4Rcc2aG7f6bYQzyTBKY5AFTrHYrg2hVOq6VU7Y/0w67NC5Rhddl3v+iRUAQwJ4uE4tniqCu0uo3Z649p0sDqEKYPrMRJ69QctLwP7lWJGyfw9doh6G0XZQasI9lIMTw2zZ7ZV2PMZQegs+tTlrQsE9N05m9UryeQA/U6OFPkkv2hTOBNbwCSYcwUvtbb3i5+aMU5PvEC7o7IVdIivnbeApKFvC1FWMF3uQDMs8xl41wIDcKhsKeX5fRYCLtZrQWrqw2C5AixIv+mQ+4ZOe0k/ci358ANuRY7tBFf4MNKyFDJDNamVXxvJHnkTFisFxzHUXNm99/3krQQRfJUN384PNWnma0BlzngXxdm5xET/k4J8r1tshOu3xAk7KmssoR3qsYIubY7KSRz6b X-Microsoft-Antispam: BCL:0; X-Microsoft-Ant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id: 7bf88fc4-efce-47f6-73f8-08dab2777bd3 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 08:45:47.6528 (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: GV1P250MB0810 Subject: [FFmpeg-devel] [PATCH 03/22] avcodec/eatgq: Don't use IDCTDSP-API unnecessarily 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: sgFBXqbpbVOe The eatgq decoder uses a custom IDCT and actually does not use the IDCTDSP API at all. Somehow it was nevertheless used to simply apply the identity permutation on ff_zigzag_direct. This commit stops doing so. Signed-off-by: Andreas Rheinhardt --- configure | 2 +- libavcodec/eatgq.c | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/configure b/configure index 16b2084945..84d7be8bfe 100755 --- a/configure +++ b/configure @@ -2821,7 +2821,7 @@ dxv_decoder_select="lzf texturedsp" eac3_decoder_select="ac3_decoder" eac3_encoder_select="ac3_encoder" eamad_decoder_select="aandcttables blockdsp bswapdsp" -eatgq_decoder_select="aandcttables idctdsp" +eatgq_decoder_select="aandcttables" eatqi_decoder_select="aandcttables blockdsp bswapdsp idctdsp" exr_decoder_deps="zlib" exr_encoder_deps="zlib" diff --git a/libavcodec/eatgq.c b/libavcodec/eatgq.c index a6c3e72f85..e8d66418b9 100644 --- a/libavcodec/eatgq.c +++ b/libavcodec/eatgq.c @@ -39,12 +39,10 @@ #include "decode.h" #include "eaidct.h" #include "get_bits.h" -#include "idctdsp.h" typedef struct TgqContext { AVCodecContext *avctx; int width, height; - ScanTable scantable; int qtable[64]; DECLARE_ALIGNED(16, int16_t, block)[6][64]; GetByteContext gb; @@ -53,10 +51,7 @@ typedef struct TgqContext { static av_cold int tgq_decode_init(AVCodecContext *avctx) { TgqContext *s = avctx->priv_data; - uint8_t idct_permutation[64]; s->avctx = avctx; - ff_init_scantable_permutation(idct_permutation, FF_IDCT_PERM_NONE); - ff_init_scantable(idct_permutation, &s->scantable, ff_zigzag_direct); avctx->framerate = (AVRational){ 15, 1 }; avctx->pix_fmt = AV_PIX_FMT_YUV420P; return 0; @@ -64,7 +59,7 @@ static av_cold int tgq_decode_init(AVCodecContext *avctx) static void tgq_decode_block(TgqContext *s, int16_t block[64], GetBitContext *gb) { - uint8_t *perm = s->scantable.permutated; + const uint8_t *perm = ff_zigzag_direct; int i, j, value; block[0] = get_sbits(gb, 8) * s->qtable[0]; for (i = 1; i < 64;) { From patchwork Thu Oct 20 08:45:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38838 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp45411pzb; Thu, 20 Oct 2022 01:46:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5eVTHprzO3lnIWSWWHIKbdgZ8EuGxLHy9b8Idwfzz9KABrqNciEy4m2MzsER9Co7Ui/8wi X-Received: by 2002:a17:907:2e01:b0:78d:f24b:7330 with SMTP id ig1-20020a1709072e0100b0078df24b7330mr9922044ejc.604.1666255570308; Thu, 20 Oct 2022 01:46: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 dz20-20020a0564021d5400b0043dc00e0740si18059300edb.373.2022.10.20.01.46.09; Thu, 20 Oct 2022 01:46: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=RrRysQKM; 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 1710868BE2B; Thu, 20 Oct 2022 11:46:07 +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-db8eur05olkn2028.outbound.protection.outlook.com [40.92.89.28]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0827968BE2A for ; Thu, 20 Oct 2022 11:46:00 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fYXlhd57IeGQBshuBlI3qZhrWtxZR5j6GSWrTqxN0g0DrFYF0CkKlV3caGNOUxeksPtHMPy/mzCWWGatEh/JV+Jd8xsOCBEMLhRNXn5WcM4aPxgffUjknf4+VHj4JzRJYCFm6SHWEVXVXekOCU8ML1AdpS5fzEL/1UPCX/Ioe4qkoctuPDwdS1YRzqge90luHD7mN9YKg9iKHaZKo4JitdeKGDRKpGBmSwOg0nn9bNhSEyYSjgvnSjT+wBakKNkmbmjMY/R/rhq1XPKRo2NQahWu57sRA0GKjY8Utk+3slA75jHaZ/rECFcGWvWCwSfAm8+JgkEOu5ByfYbBJbQBfQ== 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=2ptdIwTfwh2v2TS+ekTz9QIMcCvKt9avDHXGxDJPrRA=; b=eW8uf6VUdYEMhCpC5sfLMFKsIh0N7Q5uvMzMaHX6CzkRhud9mvP23jAUvuPIVQGg+HNj0BnmxLVRAxElyXu2cj9k6x4zEf4E9/ZthTn1VlddhfVAyWZCFWZbjaA5Bai/8VzTKW/3mtUNVBszV9DxRtf27O9cL6DZglPGJNY43ewMNPS95LPS+WMsZ3aIWbAQXTzQSk6yjoZ2D36DQnXkezSgptioT8cglIiAi3z92RQP8Vu5ql79U+tnS2EG0jqi7C/JIWPiO97eVcPsOC9bC61BoV8/xjzvQJ7UuQvxZdy0cj7m7iDhOYsnkOK+O0szgUJiMLiE1txc0EejZx+O1w== 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=2ptdIwTfwh2v2TS+ekTz9QIMcCvKt9avDHXGxDJPrRA=; b=RrRysQKMGLRLec39tptbJchXvUtFq7ggN7v9FC747Y55yANuUjvf6HJqZDDkteNHFDXqhAZUaFH79qx3Xv/i2BlbQ9pNNAY0dm9HY0sANTpGPp5aPQR1zX9edH5VNmDeRztfDlHXJNsNZRx10XP+7Y/VaNc6i59tjwg3CU4pjGk7OudA2hub/MC/z/HukWsU37Sjtu2pPBChdcHXyM5GAvgzHhg80X4m+Ej61oAm+gztfBCn9XRMKqCydiZhux3/rNyojkMidMwSKH5cd+s3tlAmOalouyC74hl/7B0IrIcF8EugG0wY1s5k1Zv0UEgu2li/kBrugQ6jl/E3oUHJrg== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by GV2P250MB0825.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:aa::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Thu, 20 Oct 2022 08:45:58 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 08:45:57 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 10:45:22 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [sgB5dlOZHjiXkKpE+RBvBiimv2tSZll8Qog3RSgAve4=] X-ClientProxiedBy: AS9PR06CA0774.eurprd06.prod.outlook.com (2603:10a6:20b:484::29) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020084540.2378553-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|GV2P250MB0825:EE_ X-MS-Office365-Filtering-Correlation-Id: 6a0a8c03-b060-41e9-6ab4-08dab27781df X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3kEq9VXjGDAyurdVkDmkI7qSY4DrOWVzAF5MuM+TGyc2zpL6r3y8psnrCx3wzlxP1hdSJ7HpArUtB2aoDueVkTLVaqRPyAtIeFEXQSAVphAGF0kB1LgvT/B+fJGnf8OspHt14h2+lhiUWMsn3Qu3178JCOlRmBzGrFGJJmDafx8oN2YOfKJtO9t1SU+Yq1Z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ejdnDp1unfSEa0zg53/tsnZnhCpvOwWoOZJXHVW5mfFIW6yRItUPCCyDUCNbnvACd6SWpR7szXdlhGBlH/hTBzJEH0WWNsDGJZQSmumxpkubCuNe6J0lFgnM9ruW6mfpCGpA5JjQRGmPPYCRWNUKGH/Y0KHdZwIsNo4RLVAWhHDgtidi39HWE/Ny4x3oMZqCEbqyMJiSJT9SO4/IX09ntDV4FgrBQspuEGsRPEx89FZTDXMsjG8GyKBWZROxFGzy6uGJig2Sa+yt7Q3yqNEbyN2iue29brzpxGhWdzvwqp0sq+1F/hhMNjMS1x2mbCAE3Hf8tgK+1KrH4NzR6z9uzSOfvmgnpxrdJqH3XTqBc853utp7YVDmo2HYiVXw+e6hpcPgNyvGoMQ8r8svMK7+H66D8YSyE1bA3X5vVJr9tFHg+zXpA3m/OrABwZNHFxxXtwXPt3UuMLI+nEPA1QoaVPIOFAjlOsxULlnYhYJQmKcHZu/3NVdpWZCjW6zV0uuRi2yGld/+iMIdAwxWiFgayfO8l88jDsGXIw554xe0cj/VT7IXf8xlc2pbplMB6eKYSuIuWcwA50+/ecy X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a0a8c03-b060-41e9-6ab4-08dab27781df X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 08:45:57.8132 (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: GV2P250MB0825 Subject: [FFmpeg-devel] [PATCH 04/22] avcodec/eatqi: Don't use IDCTDSP-API unnecessarily 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: iWJgBRS1GKje The eatqi decoder uses a custom IDCT and actually does not use the IDCTDSP API at all. Somehow it was nevertheless used to simply apply the identity permutation on ff_zigzag_direct. This commit stops doing so. Signed-off-by: Andreas Rheinhardt --- configure | 2 +- libavcodec/eatqi.c | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 84d7be8bfe..baaf61271f 100755 --- a/configure +++ b/configure @@ -2822,7 +2822,7 @@ eac3_decoder_select="ac3_decoder" eac3_encoder_select="ac3_encoder" eamad_decoder_select="aandcttables blockdsp bswapdsp" eatgq_decoder_select="aandcttables" -eatqi_decoder_select="aandcttables blockdsp bswapdsp idctdsp" +eatqi_decoder_select="aandcttables blockdsp bswapdsp" exr_decoder_deps="zlib" exr_encoder_deps="zlib" ffv1_decoder_select="rangecoder" diff --git a/libavcodec/eatqi.c b/libavcodec/eatqi.c index 324e6f1ced..e4f12b3db2 100644 --- a/libavcodec/eatqi.c +++ b/libavcodec/eatqi.c @@ -36,7 +36,6 @@ #include "get_bits.h" #include "aandcttab.h" #include "eaidct.h" -#include "idctdsp.h" #include "mpeg12data.h" #include "mpeg12dec.h" @@ -45,8 +44,6 @@ typedef struct TqiContext { GetBitContext gb; BlockDSPContext bdsp; BswapDSPContext bsdsp; - IDCTDSPContext idsp; - ScanTable intra_scantable; void *bitstream_buf; unsigned int bitstream_buf_size; @@ -64,9 +61,6 @@ static av_cold int tqi_decode_init(AVCodecContext *avctx) ff_blockdsp_init(&t->bdsp); ff_bswapdsp_init(&t->bsdsp); - ff_idctdsp_init(&t->idsp, avctx); - ff_init_scantable_permutation(t->idsp.idct_permutation, FF_IDCT_PERM_NONE); - ff_init_scantable(t->idsp.idct_permutation, &t->intra_scantable, ff_zigzag_direct); avctx->framerate = (AVRational){ 15, 1 }; avctx->pix_fmt = AV_PIX_FMT_YUV420P; @@ -82,7 +76,7 @@ static int tqi_decode_mb(TqiContext *t, int16_t (*block)[64]) for (n = 0; n < 6; n++) { int ret = ff_mpeg1_decode_block_intra(&t->gb, t->intra_matrix, - t->intra_scantable.permutated, + ff_zigzag_direct, t->last_dc, block[n], n, 1); if (ret < 0) { av_log(t->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", From patchwork Thu Oct 20 08:45:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38840 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp45523pzb; Thu, 20 Oct 2022 01:46:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4LvEeyFxoNX++gqWWx8SJRo7YMdHnQyz/YX9n+s8UTe9VCdFyBejSvl2thztbiQz31vE3W X-Received: by 2002:a17:906:ced1:b0:78d:4448:e96f with SMTP id si17-20020a170906ced100b0078d4448e96fmr9622234ejb.490.1666255589627; Thu, 20 Oct 2022 01:46:29 -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 xg14-20020a170907320e00b007781bc042a2si18071689ejb.646.2022.10.20.01.46.18; Thu, 20 Oct 2022 01:46:29 -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=LUpm4ofk; 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 6D1AF68BE3D; Thu, 20 Oct 2022 11:46:12 +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-db8eur05olkn2028.outbound.protection.outlook.com [40.92.89.28]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 37F5868BE3A for ; Thu, 20 Oct 2022 11:46:05 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EMIYULMXblp7+Rg3AZRWAK8ThVmrp1YyyhypOiRjbtbfKfCQ9ex4N+oMYxrjMz996xpxxpmOwfdH4fm0JKtD6JBq2YIdQVjr0HdfsQn8RarroiGZD3T/nA6diuFjByOcbU3gahh2cTz06yxPS8sDAPRjAPy9lvivnab3hlQ2OwDGjB0RULpDrBUKO5brCPaq0Le/80IHlYnhF6m4g7gWURvZajV8ZMBisUO5tfTOni3jIxqDN3enqgQ0SDad7ofScuVo0iciUcrJ1A3P1rWJot0O4OTu6ifqdg9Y912NrYZcdO+SbsfVqGyMYHW+rpHq7HpYU44nfDfcXs4twXXdJQ== 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=JayIKDJBanXpdGenQMG+7CwNf1ddbaevrwVkAM6mCcw=; b=TfuCc8ZJ+w+jOcxemPM8v0knBpug+by6RJhm2QQl+q97FcQQA4V+iXU+fyIW4RaaEMbePj6MeztdeQkgXdfJEirflULLdvtWZXxpvec2mw6K+ebAZ2glLkMFRhblTU34evqktM673SbtD+Gw063LyPOF+QeQ19ZUPHM2sn8+TQMEpz6Xt542zWXnvH8BntJh2I5re8f9Qq5HFmoDNIkgBYLOIzVJoJ4wn28VlsbaGvu34/bnuN+XO/w9MocP3ozkqrLttrG/x1HhceEHTKG5+nhjiHUckZrDetKSFliibusTadJMjFe3Xz/l8InXX7Pryx4qGQ8VphqkyDHgrIRMPQ== 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=JayIKDJBanXpdGenQMG+7CwNf1ddbaevrwVkAM6mCcw=; b=LUpm4ofk6HO4VolNjs/zbTj2KMXGm1si2FtVfW0h9I7gB82VEcP6vLAnmvhFu6pImHEumozN+NjxdqhC0ThZSZeluftOgmUgQyyGBFox6HXyXHiyeu4D3FsiYjxaXJ/lW7bGp8f9S4Zk6BkU+5cOvbs3oLHf0FvurJBAswsdyVPClwXVAL8avWQ899ncT1KUo1oPzZ5+UInu4L6nkZ8HF9twLYR+/cn/BXeVrUNf0hef6GCM5phSa0cWfgkbViaZS1iyESLLc2mdCT9MyWl8Ih8T/RQRcS/CVILaTxcTCkmh9/mKDNVv3LMU78sOoOruPN/HVEGsGldKx0B5QepFnA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by GV2P250MB0825.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:aa::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Thu, 20 Oct 2022 08:46:03 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 08:46:03 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 10:45:23 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [LKb/6m99FMhn39rmoVB2ywMFQg+vcimkCPckiJDI85Q=] X-ClientProxiedBy: AS9PR06CA0774.eurprd06.prod.outlook.com (2603:10a6:20b:484::29) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020084540.2378553-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|GV2P250MB0825:EE_ X-MS-Office365-Filtering-Correlation-Id: 98bcbd65-3b79-40b8-c8d6-08dab2778537 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3kEq9VXjGDAyurdVkDmkI7qyhyVlMClwSvXwgbqgkgnNJazCWcHOsy2U8pFF4tMusgTvLXRNhuWT5xmi0c/1pNuATKmt5rtPX6oqnCKz4uUr83rDx81ZIXC9H2pA6SPUnTKVYPHVRwNT9wJeY8/OI9NB27juHYb40muOLrJgTfXj7GJDXELA7X/ywkhV1VESq4GFaxCgqZqMczBUWzbAgArsQgI/G/poPA5cUuvyG3JzSi4y5xzOk8FS2dhJOpS9oOUvpEFxdxAKo9rQHTjU34CnCUJ98aa/WVhP8sM5waJsnKmGcaOCObCaRgMz34J31a3nSR3sfRsIVkPe+MXfYVLFcdB8aRAfY9DWhhBNvFFRKwXjzxGrDi5BxKj0ISkSVjJp+PDMDh3DFtWsU3AuAaoME04yQwfKX6kkRb1HchV+gaYxwo87+kL5Px291bxrKClNfUU8ATfjZVJe9hW4h5TXT5LdF823KVKyH8xl4GB067rV3OvCioHhp4eDo4vnjThSvV4ME70d2PVyyseZwd+3Lp9vB0Z7L3kdXUbeR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i5nrrq9P7yN1hQWQd9Rj+l7y9w0lALJXvYqlYbX+tzlSbQJG4GFq08CFBDX3rooVBczpCoU5/xX2cfUMMSu3dFI7qti50z3MifljqvVtVKFsDrbP6aFYrjmhyHuDCMOF4ZNJI5QhQzNfkLiHfpo3/J7bnvqC24UIymYCJGFpZ7l030pQjdtl1q9vdOtnImglOaFh20WDiV6qRIa5GnuoyJ9yeX+wdLkLBlct2mn9J9DzkxlMg5kDtbIc6IfBPoylYzp1Jhhw X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 98bcbd65-3b79-40b8-c8d6-08dab2778537 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 08:46:03.3942 (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: GV2P250MB0825 Subject: [FFmpeg-devel] [PATCH 05/22] avcodec/aic: Remove useless ScanTable 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: 6nRlaXfzUWoo Signed-off-by: Andreas Rheinhardt --- libavcodec/aic.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/libavcodec/aic.c b/libavcodec/aic.c index 49d08f0556..7ba1c02fdd 100644 --- a/libavcodec/aic.c +++ b/libavcodec/aic.c @@ -143,7 +143,6 @@ typedef struct AICContext { AVCodecContext *avctx; AVFrame *frame; IDCTDSPContext idsp; - ScanTable scantable; int num_x_slices; int slice_width; @@ -348,10 +347,10 @@ static int aic_decode_slice(AICContext *ctx, int mb_x, int mb_y, for (mb = 0; mb < slice_width; mb++) { for (blk = 0; blk < 4; blk++) { if (!ctx->interlaced) - recombine_block(ctx->block, ctx->scantable.permutated, + recombine_block(ctx->block, ctx->idsp.idct_permutation, &base_y, &ext_y); else - recombine_block_il(ctx->block, ctx->scantable.permutated, + recombine_block_il(ctx->block, ctx->idsp.idct_permutation, &base_y, &ext_y, blk); unquant_block(ctx->block, ctx->quant, ctx->quant_matrix); ctx->idsp.idct(ctx->block); @@ -368,7 +367,7 @@ static int aic_decode_slice(AICContext *ctx, int mb_x, int mb_y, Y += 16; for (blk = 0; blk < 2; blk++) { - recombine_block(ctx->block, ctx->scantable.permutated, + recombine_block(ctx->block, ctx->idsp.idct_permutation, &base_c, &ext_c); unquant_block(ctx->block, ctx->quant, ctx->quant_matrix); ctx->idsp.idct(ctx->block); @@ -444,7 +443,6 @@ static av_cold int aic_decode_init(AVCodecContext *avctx) { AICContext *ctx = avctx->priv_data; int i; - uint8_t scan[64]; ctx->avctx = avctx; @@ -452,9 +450,6 @@ static av_cold int aic_decode_init(AVCodecContext *avctx) ff_idctdsp_init(&ctx->idsp, avctx); - for (i = 0; i < 64; i++) - scan[i] = i; - ff_init_scantable(ctx->idsp.idct_permutation, &ctx->scantable, scan); for (i = 0; i < 64; i++) ctx->quant_matrix[ctx->idsp.idct_permutation[i]] = aic_quant_matrix[i]; From patchwork Thu Oct 20 08:45:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38839 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp45515pzb; Thu, 20 Oct 2022 01:46:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Ly9VZ8OuSFIvPgNMaVo++q7EZKx06NtYKBKBI9kjpyTrGM5Qe67jDOxhReqUiIx2KrHMf X-Received: by 2002:a17:906:7944:b0:73c:838:ac3d with SMTP id l4-20020a170906794400b0073c0838ac3dmr10101796ejo.242.1666255588469; Thu, 20 Oct 2022 01:46:28 -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 v1-20020a056402348100b0045483f0426csi17447702edc.10.2022.10.20.01.46.28; Thu, 20 Oct 2022 01:46:28 -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="P/sVH0jy"; 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 A9D3C68BE48; Thu, 20 Oct 2022 11:46:18 +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-db8eur05olkn2047.outbound.protection.outlook.com [40.92.89.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BB02C68BE41 for ; Thu, 20 Oct 2022 11:46:11 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gLBiUpaWeJmkG5kyJI1BEP+JyRrD0YgcVEMb7nMvYzKuWDi/9GlGAfcxMkReyjcSU2oSf+UtkKgJw9hLzEkPrWPQ+GMmeNMAPOM9Rxe/CMSILFIZpLfGTOLI0GTuQFbmW1pec1mVv4F2tg9zimCoL7XvDy3DQuPAuFGcEIq9fiPLoSlnQPpsqN6CSVKmzf7BfmMfzUegEEdLvt7i1EDx/DJPI7Sti7LvpbRYYnkPBM4wf+H5MPRO97OpWYm+tvio+IPbIa+hUZBxuj4fL0T+Gwxa1LwsWQsJNM0N98vgPRWm9YR9ZTxQogM2QH4LsKbP8I7ltnb6jXBVnyTegWk+gQ== 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=EMz47SV63A45LQMeVnNXBwHyGUsJSSUDwy7Hh3s4wKA=; b=hMHHgb2zsCJeBy7t6UDRxzvhWvvxnGgEpFVr1t5YOogwEr5x9h8a2n6npcmoxK9iqbcfHZXfXtZSskgdYeFA0VyaPMRCKJFw48Ly2+LXTwyF/wD9vIQ7tjCjSUyf0bPrxoiSarf5R/YHfg77O+ZRrTSzSjA4VR0CKqrdD1Lpmqd6yUnuV7bkh6i6b1cQ5BnHHPb7GeDL0rEov3RocQZptCckgcDbiVKY1T85GhFlcZuGY/tc++l+050RsZ4NGOa+UXyufRZV038EGEIuSroFwUxtriZoAzhbZzIJinrloHY6/KjBtcUPwHEU9J7g8ETrx9CwnR4EmJJT42cCZ2lOQQ== 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=EMz47SV63A45LQMeVnNXBwHyGUsJSSUDwy7Hh3s4wKA=; b=P/sVH0jyf8J5krGY90NfUhhwvIzf0oLkvBd0Z//s6QGbdhZD47nqD+nTcIma+WSqDo1s+DRp1V8UmkZJIIULY1tYJZz1Ih0q+oBQ8ND/RUpE5eRACctGCz0eii62vv+1fMrBeHfsC+Phb6a7wknKK43oncFo8rCtP9RD5F8Yhxfl0ZblCkF2bYzt6CpDKlUeZlajHmB/QkQnB8+kT39/Kax54wadghgUI1LbIAlfzc5rkceb3uxBcOONqLgZn5zJX1x6iFxDMh0cY7/CENwv/9lwmdNlK0zy8hZCHclSrI+qk/8hyPC/ES9Y1z53gu6Ka2/RXWXtFYP+Hnh0cK/PJw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by GV2P250MB0825.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:aa::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Thu, 20 Oct 2022 08:46:10 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 08:46:10 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 10:45:24 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [iycB60yD9UY1QBRQuMIsr/cEg7NgQDYj2ht13QEAWd0=] X-ClientProxiedBy: AS9PR06CA0774.eurprd06.prod.outlook.com (2603:10a6:20b:484::29) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020084540.2378553-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|GV2P250MB0825:EE_ X-MS-Office365-Filtering-Correlation-Id: 560821f8-962d-41c1-a7f2-08dab2778966 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3kEq9VXjGDAyurdVkDmkI7qyhyVlMClwSvXwgbqgkgnNEKUGBEmY3VoraywaZPSh8T4YzZWe+G3/1zXtkPti9G3S+mXUEfFtoXC9m14sHGI72NxQ4gYaeD9OMz3TbfJFb45YTcxRdraBK05n03ttnqcHacj4uzwgKdj54Jz/wKB5/xWk6kOgnCYDfaUpq0+ohzdjGlTfEa2nM8oZVIJ0rKm8HK8tRiZylKFZj9qoUxK+gLtOar3CYsOnqZvMyqnqtDDL9rXxyzE/uHjU1GS9bz2rMQTTlZXEsjbzbtAqsKJWJSKVFBi61iy9t4y8+99WFPAgZgRZVK5ieRTF6afQXySB2MVYCpOvJWHh6O2hMlvSA4/qqld9eYkob5CMgsrMORHcyjQT+QZqSZZUqN9Vbxlig4kGcPdwa9H3/xZyIUX8YY4psppcfEgDcYmS6K9soLXOOlkylfBHeG2lRK+zix7DyYeul5Ya35HVxMyrQNaJ+E91smWAzwXTih+Qk6KhGRyvn77W9KrwIE5Kab0gbvXdn1k4hf/JghL9zCD48poPYFM/IlNhP+OiVhhodMWoxbHNjPfjIf9dk0WftPPXWC30GcODhrInylbaYsu/cIUoXOyterbOpxG6Vg1hnFyZBU2pMFg9eG5uOoUVXzWb51p7wh7TV3u4US3DMK6MQWufh9SGiPxjMu4bQ8N8x5lDOKiSUZz+Gi8TsNgk7+PQBsdGlsJdLxP7QsqaSN0Ydh7VsUM6GqIFfXEWMPl8zLtOI+IOruqx90asH4B1GiPER/E X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TWqdkgr4Yq+CoMp8T03pHmYNvZOVx7uxuuu1UH/r8Uaaa+McbE6sDudkb5iCBh/2SRmhHD8N5pt6p+r3vL7kanzm6qAWY1kzs7UzJi+yEeg5ih2paH0QKz354v6LciqXfY8P//q46qAXlP9xzLuhtVDRBo+4rwpLnCRfgfRKWX9ByS8pQXYIboQam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CteY8v8W4wErQ0zwod1Off78w58sgWklDkD3Nv+X9sxBb80RDxI5uFEDBC8C0JiDN+vRjTGgZCJouYbCCPIN++Mij2KHQH9ozVL23cc6CgQZFJGjdC1RgLw4neWrfN3I98jpKqqKona4lFqt6Tficai+7VA4O0YmL0EdqXdtadzI/+HN3+j13ID9LZt/iilP9r9zxdEBGWUWqKMvJ9WXiHIXSakZ/Mltg2xSsp3nFPYezJvoThQe/65Z7L8AiITc6ZZpbZhodZ3/ESNeDq4Nz60qb67Njd/gtIWBldTnyO81KgOtrYrbKntf8xDO8bFuOeBKg59w2Ksy2KLfS5J5cU78WdbtpVSxMK7XtP1kTmQ5y+Gq1A0mpqh84WYyArpUSGijaRP7Putqetc97WKhbjWNW49M6n7Nw8Jlc7vr9QC92qrpGfUty7Bn7O58L2RhY5Lhc/x/L1LuAEiIWK12CuF3+mStLYE2CWVFPmlKtlOKvPL4Biqd+JftS3/A8FjoQQxMt64/MtkkYCxECC9t3TqEiwpfiKa/22FY0zURNQdSP5f+ccle0NXWhv2Wk01Kr+8/y5tCfZuRCX4Y+SJk2Z5Ywyyx1hLfuX5Kk0onJaCnHnl03qAEiophab7hS30FK8FpObettB+GKMGtWPf5nyojqCKYSJomPIW4LEJk/rs54qLBVsuQrEJ2m8mcWc4tdtE+IDS3aMJH+m+Ra2qIDGhWzXL4yHg79AAEhv0u6fRVi1Zb2XVFjdHEUQy/MszyGg7jx+EataqszkA4ez5+7/dMhLQgUSlghZiwMC6/mg+l/aG+ia/fecGjj78BIvuATTBCELR1nOrgyt X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 560821f8-962d-41c1-a7f2-08dab2778966 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 08:46:10.4279 (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: GV2P250MB0825 Subject: [FFmpeg-devel] [PATCH 06/22] avcodec/imm4: Remove useless ScanTable 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: 6XdL2zDNQMuz Signed-off-by: Andreas Rheinhardt --- libavcodec/imm4.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/libavcodec/imm4.c b/libavcodec/imm4.c index e2aa20813a..f342e6d313 100644 --- a/libavcodec/imm4.c +++ b/libavcodec/imm4.c @@ -51,9 +51,8 @@ typedef struct IMM4Context { unsigned lo; unsigned hi; - ScanTable intra_scantable; - DECLARE_ALIGNED(32, int16_t, block)[6][64]; IDCTDSPContext idsp; + DECLARE_ALIGNED(32, int16_t, block)[6][64]; } IMM4Context; static const uint8_t intra_cb[] = { @@ -129,7 +128,7 @@ static int decode_block(AVCodecContext *avctx, GetBitContext *gb, int block, int factor, int flag, int offset, int flag2) { IMM4Context *s = avctx->priv_data; - const uint8_t *scantable = s->intra_scantable.permutated; + const uint8_t *scantable = s->idsp.idct_permutation; int i, last, len, factor2; for (i = !flag; i < 64; i++) { @@ -172,7 +171,7 @@ static int decode_blocks(AVCodecContext *avctx, GetBitContext *gb, unsigned cbp, int flag, int offset, unsigned flag2) { IMM4Context *s = avctx->priv_data; - const uint8_t *scantable = s->intra_scantable.permutated; + const uint8_t *scantable = s->idsp.idct_permutation; int ret, i; memset(s->block, 0, sizeof(s->block)); @@ -495,14 +494,9 @@ static av_cold int decode_init(AVCodecContext *avctx) { static AVOnce init_static_once = AV_ONCE_INIT; IMM4Context *s = avctx->priv_data; - uint8_t table[64]; - - for (int i = 0; i < 64; i++) - table[i] = i; ff_bswapdsp_init(&s->bdsp); ff_idctdsp_init(&s->idsp, avctx); - ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable, table); s->prev_frame = av_frame_alloc(); if (!s->prev_frame) From patchwork Thu Oct 20 08:45:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38841 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp45582pzb; Thu, 20 Oct 2022 01:46:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4O+Tl3Cn9GJ9ona7ahILH8+HMZndYQPXO4GMkFQDOu8x5B8g6DZh4CW4j1JbGu+5pEK+Tr X-Received: by 2002:a17:907:3e01:b0:730:a690:a211 with SMTP id hp1-20020a1709073e0100b00730a690a211mr9999732ejc.596.1666255597318; Thu, 20 Oct 2022 01:46:37 -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 sg7-20020a170907a40700b00779e6c93108si14497423ejc.598.2022.10.20.01.46.36; Thu, 20 Oct 2022 01:46:37 -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=NyaA0GKk; 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 ABBD468BE53; Thu, 20 Oct 2022 11:46:20 +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-db8eur05olkn2087.outbound.protection.outlook.com [40.92.89.87]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7FE0168BE4C for ; Thu, 20 Oct 2022 11:46:19 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UkCQOa3UH2f8QMp7Eop8fWoSK+6xQRtNC7wJw7Ny50HIcFbJ/JMJ7POqJex5X8HgREn9q+DroFOII7sK5QbuLvSJ0KjCf7hBXLR9gsySyFShCdylVo5r2yZGKoFLd/XSlq5lSu4UYMMXp7skipMQz4Hpkt6mZ+eaRosMEQHLXBBTMDElw027+vtEhD7Kf6iGMXnWg/RqfAfsSmtpYWi7aBrX++Lm64LVNZACDATALgLmRrw380LAT26Q4I6Cv3V7kiEkixZSGQYLFvk8YHPyO+pu3eBxXQEJPwKvTm/N4di1ngmQ0y0nHLuYZnF2lnTH1u+emCvssefi0bV7BU5eZA== 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=BHc6WjFdEkhxuvBaRYLhaIdFsQVvzk09ajc5Tk32I8g=; b=gHE6PCrboEL8WIUvJ/Mz6imgYlALT3HQiSRbOy14a9YuGmV/nNAIZdfnBr3jyQMrwA/lEB1QbqaTGJZnQh+C4ffjEVqHs4e7SLo/QueQhsZ4DSwDKB7yysqdbFFvMjXAvEogYfiJ4UKt1Vmb/q9wpEg8ZlTmiI2gAeFXXS5DOude6FOpcEpPvQxLZtxQa/nX6KcKSe38oWgUtsHhVgkwCfWl0eVjQF5IdsUSjeJlmWqTL/hA6l+RfU1Fp7cg72YJg+/JYn95CdWJqm7T+XRyn0jMvRlFXEOLl1vKANw8c+8KdqQnIfYERNgDjxxNONfb3dJ4iOeYFfLRNnQFyBa7sg== 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=BHc6WjFdEkhxuvBaRYLhaIdFsQVvzk09ajc5Tk32I8g=; b=NyaA0GKkaUftDvQZ9tOcxrrA1FGJbmRNOFcI24FG7JWSw0kXts8Mul7N6OSaXDZLGpzhqC+TN4TiFw0sV1YBfclQuj3JAQscT6CAXPENyyxTHgWMS+MLnhD/AY96jmnV4mlJ29uhAjR4TSliyL1e1LC0rcqRSLUu7yTHfasaUOO1E20MIt88KMKJEA6EDvD7t7a3gsd/SFGHjNVxoFFssPUqBK+5737Lp7rFeP61oT2WYVShfAuVWjZ1T7Nhiu3IE5twn0cpBtDsprWzTAU7TVXQu4+6ma7Q/fmYfw7XE1mD7Rb2M0Ul/UubCp52snpRPXwB5enHmQAEICm91KJbMg== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by GV2P250MB0825.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:aa::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Thu, 20 Oct 2022 08:46:18 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 08:46:18 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 10:45:25 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [vnOFwa0w5CmSlCBzlHK1p1j5nu+XvSs+bweGS7SXyf8=] X-ClientProxiedBy: AS9PR06CA0774.eurprd06.prod.outlook.com (2603:10a6:20b:484::29) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020084540.2378553-6-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|GV2P250MB0825:EE_ X-MS-Office365-Filtering-Correlation-Id: 35de4a7f-bf6d-4438-ba4e-08dab2778ded X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmqqpqVHbY8r+ej275oS7ZbB+mgC+dFhHfizoDaXPrD3CHJtoLiVVQC1OYTROJ/S3LAVteMssGQzJYsBBR5qV46FtkC7jhf9eVY1j1C630MpsnPBmtxN8OzzMU+kycFdMA3ti00X9qDAs4YPvfQs7ZaYdZPx2tvyCcKUh6d6pvPh61QlrCty6RFwTPfQvW0A/SXkIJeTWnP1X/7zkERxlF+UOnJmMFJCPUqkXAB4hXB3m83uKdRy46Um8kN/uzhxM3eTK/A46sl69uGlWghe0LwP0fqu1J69oPCxcS8P1Vgj4WW+RhV60Cf6W+jFcpRuAQGZi7++3fKRA0zy3BEKoJoc5RtRUJdhYSzhHheNeXh51kiqd1TvhLdMqlqW5YZvs5OO4zq2ppLjOA/iQk3LrN0JGRp9hDaZsl8u1ajl0FW1UTmGGqRTYHvhbsBqHdVIzEBcmxkbFm8F/khcTycc6+tRYveGOARIii/mLs0KSmuRv4w549Lxt6pN3PRlO3MssjS/mJpBTs0f/X/jBZ3jIa3PeNDR04l8sgqO/hbW0WsHfJkCaE3yRwu7CY8CXyjCFFWS4rcGwY30RGQHGINQ1YwdGFAXe8WETi1VV+YLH5/ezY9isDiQzrBQcgUXrzWiMK/a4z2K0zZNawUsVkAkupQaDFoxMQNpNADeVeNHp4h+V8fGoTibbZsInbjEsSxuOmuQbp94AHhFGgqM/KLcjXnogo+eTxOgBSzZohrJv7UJ6Igy4YoNWX8+HjD1H7MFkT0= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NFS41ZlbjGSoxVolqxb10WRpy/2G7hUENB0afSWTpBULNC/LL05ppXxlEfJC7JFnjyvLO9Lwb1hVQA3NLRi+H34StfzFOe7Hl1c3llDkmwDjGwDwnZzau8HuDqbVOk8xfgAU+tPtuqLB9l9UMivDhJpQmhqDMBnWNYSVQ3P6voT4r8Bh8/LM2nsuVltj7/oF0/cqpx+P1vYO3Lvf+LRA8ZDmoVRt3boRPZ/fQTWdctf/l9/Vtd2uQNLjnz1wJATm4EJn6WrDxaCfdlDSVm9THfeXGwfEzdQSHvnL99PzEjOUAD7xpyc4kBBNTU2EFiemp0VnbGIsFNE1/CnJz6M3NR7V344jecWcJUkIqMCNJWlcCon+FZu9zHHLCmwq11oGKByF5yYYTv+9xG/vZ4ooiY2iinO8bviFyi264wdR/hxLpaoWmpLsVroxrPxBS6ZjRZf4nq4nOIEZKMdAE2tXmSc99soS0PRaEF3L8oCpeS90NJ3w2IUP8Gn7DkVf8iboYshNamazMaQXwYa47lXqmob1BFNstj9ohmlYhbR9IleMwJ6sD44X7wR7O8WHWFJEp9N2dxIYhvhjSyZ2BXZiyUroSSJItr0dnOarTrymE2m8J7Zso8N8/a2btNLGWrBzjeVXIFZqpZyRTeVAp4X7FhKXsGPwPJwCn0msIpaZ24ONM/grcpIzy7zq+Gvg0k30 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ySGPoffL3ZH/z25dPP00XGBjflX3jCdWOleELFCvU4PAuCDcZKN6IcW/wIIVlxke1kT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9sF1SoyiVgb0MsL/xYDfm+7ZDiG+9tWeHWETsXz+BWoY88jU9G5tqnTdIaErkrRCXN2sWQPhiGKCvTV+VZeE3YP1O5EUkqBoTMybxQ+55EqYNouKPr0d5xMc7sTLaJ+XH9saIfhtKgtmk1GzmmhdRUalV3951oKBbYTzxawViNQWSqPGy4 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 35de4a7f-bf6d-4438-ba4e-08dab2778ded X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 08:46:18.0095 (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: GV2P250MB0825 Subject: [FFmpeg-devel] [PATCH 07/22] avcodec/idctdsp: Add function to apply permutation to array 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: +ugMPW78nHwk It is the part of ff_init_scantable() that is used by all users of said function. Signed-off-by: Andreas Rheinhardt --- libavcodec/idctdsp.c | 9 +++++++++ libavcodec/idctdsp.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/libavcodec/idctdsp.c b/libavcodec/idctdsp.c index 4ee9c3aa74..50156930ed 100644 --- a/libavcodec/idctdsp.c +++ b/libavcodec/idctdsp.c @@ -27,6 +27,15 @@ #include "simple_idct.h" #include "xvididct.h" +av_cold void ff_permute_scantable(uint8_t dst[64], const uint8_t src[64], + const uint8_t permutation[64]) +{ + for (int i = 0; i < 64; i++) { + int j = src[i]; + dst[i] = permutation[j]; + } +} + av_cold void ff_init_scantable(const uint8_t *permutation, ScanTable *st, const uint8_t *src_scantable) { diff --git a/libavcodec/idctdsp.h b/libavcodec/idctdsp.h index 2bd9820f72..b286bc231c 100644 --- a/libavcodec/idctdsp.h +++ b/libavcodec/idctdsp.h @@ -43,6 +43,8 @@ enum idct_permutation_type { FF_IDCT_PERM_SSE2, }; +void ff_permute_scantable(uint8_t dst[64], const uint8_t src[64], + const uint8_t permutation[64]); void ff_init_scantable(const uint8_t *permutation, ScanTable *st, const uint8_t *src_scantable); void ff_init_scantable_permutation(uint8_t *idct_permutation, From patchwork Thu Oct 20 08:45:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38842 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp45715pzb; Thu, 20 Oct 2022 01:46:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7QL4eifjCWVY5F1YxsTCuEMg4P6XtITY87AX0W/H0OwfuUdSW358E+uRecnDYP3aAWGm+J X-Received: by 2002:a17:907:86a9:b0:78d:f741:7fa0 with SMTP id qa41-20020a17090786a900b0078df7417fa0mr9918983ejc.734.1666255616506; Thu, 20 Oct 2022 01:46:56 -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 o13-20020a170906974d00b0078e0fd161dasi19598554ejy.87.2022.10.20.01.46.46; Thu, 20 Oct 2022 01:46:56 -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=hyNdVJg3; 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 A218868BE5A; Thu, 20 Oct 2022 11:46:23 +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-db8eur05olkn2093.outbound.protection.outlook.com [40.92.89.93]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E881868BE55 for ; Thu, 20 Oct 2022 11:46:21 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mic9xkL+Wl5DZcMG9QNvbta+FhfnYolyv5d4NVRh6Yt7o9Z6pvVqww2wAmZ+HsSbTg5f7XIdRtRecAVHV09cu6S1h662QtkF05E48m32CyGVetwXdo4YppDJc3QCjNLX8xHj+/cxjXc3kDrwSQEvAcWskWKPft2fVfjtFaOzkOWt2xKq92W6nELiGFZB4jWcDHHKLbzdgA1f0UF3U7dfKALMAAO8ZLb4xEFZZTznb5BthiEQS9JRA+n3Y5aopnijsSYwhkXaqfQ59C8XtxXBItsvxIGRXY7sRx8BYpa+9pR1S9jT++BJj3xSV2gCOfqrfStpceCfdQxSVTGcHehnrA== 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=LfidUgtkHfsMBKOpzlAPtGwLRREqTAsmYDckTBpI7+I=; b=dZoPe/wASvij/fEkhkef9sNGshSm93lYChI1nmxqIaYdgscZIrDIe4zhtwSpRcz17BdtAXqyKCA+5nM/noLk8c9s6PlvG9eLyyp9m/MER3Z/Hj/sBlabLDw0KNFZuoemn9zAv4PYKHzPYs+hldE73r4oKQp8m+Czh2aXBVeaU9OAm7tSfqQvb2ROnRw4CSlyRALBQfpiq31RGohvheoO33LQZrSt3BoAWKk0nTe5vha4Fol8lQ5p0KY+wGkKYRG2LIQk9QABCvFJQs+4shNTrSd2bQGbQfDVlpE/gsYXf90V0BeqRknSyMA1luYjSDmsghoXchpIrBm5ip/ObMwV5w== 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=LfidUgtkHfsMBKOpzlAPtGwLRREqTAsmYDckTBpI7+I=; b=hyNdVJg35b4PJOMXkKkkXfvf/vzaaKpc0XcfiszcYEzI9PtYFB/Tvnb/hN7yAOJo20MPZ0HSVYtMj7xWKR9YYeVZ08XP/Y4vxaDscGIYy/zE7rrzK7iQqu3aIyyNgWkJjjE8XBu3Lt4AYK6NrTnamu4ItZmCbw2o11WzkriLWWx6cteRq8EmwyhwN5rH1EUgIX/Rfw+L63AOoNxh88TNzNQEvQWjNAhxDdeY3wfvKwMOaUkTOXe9w6+FWXs5aMyVGFsrBAyVDignsWW2QMA6ZQ41QCTdS2PISliffq+vNMAcpWkHwfjQuibkrEjrBxI+DSpzrLJyXh2D4WzWiAUxbg== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by GV2P250MB0825.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:aa::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Thu, 20 Oct 2022 08:46:20 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 08:46:20 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 10:45:26 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [cgfohdehcw1eKBPJWqdmr/+dT3n5t8lBIow61BqgqTo=] X-ClientProxiedBy: AS9PR06CA0774.eurprd06.prod.outlook.com (2603:10a6:20b:484::29) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020084540.2378553-7-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|GV2P250MB0825:EE_ X-MS-Office365-Filtering-Correlation-Id: e90246e8-7997-4226-0ad8-08dab2778f38 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmqqpqVHbY8r+ej275oS7ZbBLrPa6y1P5ufYOil/jnPEFab6VH+dI0pqmHwBBQteFszLind5MDXMfMQIBVxhMSq/6hYonukqLsXoKE16jxM3FKp8joMa9cAGUakxPbw0k6848xQC71pc3XW5DJgeymBJgYyc7EeViRkYIh2fHvAGRNy918PHnLZUSGxFhlI1Hrdpaelv9kqWSHvqP/TzFFSnWNIKpYfkV+cN0xcg2G9YkNG5P1IINXviudzatZQIrVR/fpQfs9tcGIxhJKa6THzc4fMm9cat5IWW8jIvTw+m8Ntzbfc5E7so17uG3w2qjokZ0qplFYtcUfjHXLwDMubbNT7h20Nq2zyoqDAFYBur/oBP5hel545dFo0EczfLhpPFhlFcSPjwWfwgZhPS9pLVfLgU2d9XVBB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8/BYosTAiI13CapWk74uHKZs0rOECN/j9AwYusuAbarEAzOxud2OEXM+TLQMB2HXSfbAfsTWvxMph48zvzh/Z6ti0zrGJ2TS8nudHeHC3wnNH0d7UdTuTwQ42rJWeteWeST8BjQTkKru2hjqWirgiYJnBzU6HyH0+zDz+S3YUiMmPpigKZa+ikX0vvHijPMNfBWUnRszIHFufZPEt8sw/nTM4U1SVua7zw531VJGwR1Kx1OfswDmRU6tseZSa3l7nhgCrV/bXA64ObhUeoQTA8Bs3cvgSm0oRVI/AEASdMy+GzvFwmsgNKPTLBTHTUkqbNqyYZyl1hzx46B9X8OdUtYTLBxU X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e90246e8-7997-4226-0ad8-08dab2778f38 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 08:46:20.1746 (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: GV2P250MB0825 Subject: [FFmpeg-devel] [PATCH 08/22] avcodec/agm: Only keep what is used from ScanTable 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: QVP/76w2Vpsx Namely ScanTable.permutated. Signed-off-by: Andreas Rheinhardt --- libavcodec/agm.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/libavcodec/agm.c b/libavcodec/agm.c index 017aa0e1fa..c365ed7e9a 100644 --- a/libavcodec/agm.c +++ b/libavcodec/agm.c @@ -88,7 +88,7 @@ typedef struct AGMContext { int luma_quant_matrix[64]; int chroma_quant_matrix[64]; - ScanTable scantable; + uint8_t scantable[64]; DECLARE_ALIGNED(32, int16_t, block)[64]; int16_t *wblocks; @@ -195,7 +195,7 @@ static int read_code(GetBitContext *gb, int *oskip, int *level, int *map, int mo static int decode_intra_blocks(AGMContext *s, GetBitContext *gb, const int *quant_matrix, int *skip, int *dc_level) { - const uint8_t *scantable = s->scantable.permutated; + const uint8_t *scantable = s->scantable; int level, ret, map = 0; memset(s->wblocks, 0, s->wblocks_size); @@ -237,7 +237,7 @@ static int decode_inter_blocks(AGMContext *s, GetBitContext *gb, const int *quant_matrix, int *skip, int *map) { - const uint8_t *scantable = s->scantable.permutated; + const uint8_t *scantable = s->scantable; int level, ret; memset(s->wblocks, 0, s->wblocks_size); @@ -272,7 +272,7 @@ static int decode_inter_blocks(AGMContext *s, GetBitContext *gb, static int decode_intra_block(AGMContext *s, GetBitContext *gb, const int *quant_matrix, int *skip, int *dc_level) { - const uint8_t *scantable = s->scantable.permutated; + const uint8_t *scantable = s->scantable; const int offset = s->plus ? 0 : 1024; int16_t *block = s->block; int level, ret, map = 0; @@ -362,7 +362,7 @@ static int decode_inter_block(AGMContext *s, GetBitContext *gb, const int *quant_matrix, int *skip, int *map) { - const uint8_t *scantable = s->scantable.permutated; + const uint8_t *scantable = s->scantable; int16_t *block = s->block; int level, ret; @@ -1249,7 +1249,8 @@ static av_cold int decode_init(AVCodecContext *avctx) avctx->idct_algo = FF_IDCT_SIMPLE; ff_idctdsp_init(&s->idsp, avctx); - ff_init_scantable(s->idsp.idct_permutation, &s->scantable, ff_zigzag_direct); + ff_permute_scantable(s->scantable, ff_zigzag_direct, + s->idsp.idct_permutation); s->prev_frame = av_frame_alloc(); if (!s->prev_frame) From patchwork Thu Oct 20 08:45:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38843 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp45721pzb; Thu, 20 Oct 2022 01:46:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Q9brL//MagUvZt0x1dexusju8ut32ANYasY6xVRywefbNvOvojOfye8LPuPMAl5EkmDmi X-Received: by 2002:a05:6402:1e88:b0:45d:88f:4b99 with SMTP id f8-20020a0564021e8800b0045d088f4b99mr11425602edf.236.1666255617059; Thu, 20 Oct 2022 01:46:57 -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 dv1-20020a170906b80100b0073c14b6560bsi14702284ejb.177.2022.10.20.01.46.55; Thu, 20 Oct 2022 01:46:57 -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=XycwSgrV; 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 A7EAB68BE65; Thu, 20 Oct 2022 11:46:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2054.outbound.protection.outlook.com [40.92.91.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 22F3568BE5E for ; Thu, 20 Oct 2022 11:46:24 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C0qqL2aBz+quiR9yk98JJkrBLGeScF9O+l5Q9cwoHUenYAIQAZnF7UTADkBa0hog1Z+DLTcOBb4IF4i+tzM/fAcs6TI9BhvAgwRTyp06UrYLMzwXNnF0KYADzlAsGw2T5grbeMcyGaD0st5BjCzeTr0ywDShC1PS9QzN2LExLQBvkpCVLZNkTWiwDSS6n5354krd/lDKuVkwZ1ZYIyUHF+/FDgDkRPlpsKeXFhFKxENzZTQZh/VLpJnzBwzA4/g+713Unhv8SNx1j6dlLxOLk2/QCtvpoIqJk1MGEBDoBUPcVMJWBbYXw/kKvuet3DhFU5xNlprkJE++XT6gzTcH4g== 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=qtQACNsZTTcAVMe0AvVqs7E6HkXItMS4Otzv+4DvOzc=; b=nSULebi0eFI4bBCIS1/Mu6iwFa4X57+LQcn2WXel/kPtg2nUgGVyDEcNWybqmcauSwUZFIE5WmgOeBCs6BZVku4YJ1y53DAA/XKxch+765WuRD/UM2cb422scJxPCzDd7o00tW1nBizB+ibwbjKElyyGUKCl3g7Jx2rH5Zu6hTIWBSvSzKScGCcOsiiG5oee7VImNJeGFfwBG9sHxnry5y0kI55DYs18I75KttRj2azxBkLvlUckKIAQa6GWogPjIcbJdUt/0WzDkTsTddmeRMlaWNz/TgEVV1C+pmVSAQw2HrUOmIzEJdXGsrMnOWbX//el/d79bqOezrj7kM6jog== 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=qtQACNsZTTcAVMe0AvVqs7E6HkXItMS4Otzv+4DvOzc=; b=XycwSgrVX2GBrV7V9zWhlA02Xyuh5H/IVm/oZmAx9PxdZcG4Q87pJ+EuIyn2dDYblNP4PkJ5tdDzlmnOd1znnJn51aJRQp5TtiuHol4Kep4tShuLw8VCI1i8pYlbSm1BGPYTU7tF4OknVLfVVS2bYEP423h+GovsWAIhZ4UBBXguzsir5VQEu+CvtJPYBfv9Yehshxbtu+R/AJAGz1xMfEKPImJrdKj5ezg+mvDsLTUiv5oR4WKS0VZZeivHzUpoOMBS1zxB2duetU+6DYWhS2h91kMr8dIWYTEXUg+sOks7h79o1XO4L3gRksqMLBwDcaWIQOw1s8cLZzUw51JuPQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by GV2P250MB0825.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:aa::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Thu, 20 Oct 2022 08:46:23 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 08:46:23 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 10:45:27 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [IL3EslAdK6pa/rf/LOjiFBxkS3K5JIuYFUpC4CR6oYE=] X-ClientProxiedBy: AS9PR06CA0774.eurprd06.prod.outlook.com (2603:10a6:20b:484::29) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020084540.2378553-8-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|GV2P250MB0825:EE_ X-MS-Office365-Filtering-Correlation-Id: 1a317467-f675-41e8-768c-08dab27790d9 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3kEq9VXjGDAyurdVkDmkI7qLvFLG/OGubRIPlBfPX/MmnLZtAgyHwLFhjj9bGp772qtkPj6tyi3lvxIbfH5lJHQLTePyin2CqIco7ygCIjgU6QNeeIYRlfGWtuXZOn47CfYLtVFWHpQAR1U0zKv80k4GrYyoAWJx53k4I8VxpOqQLH8+T3glZvwjyPa1QdyVVTleCYBpuLhXD5eUyrVPVO//HEuwmDktcedXuw+7ajuLlXGzzNxf8aQuJNeMfZ75i8gMnzFWVkiMd6MrxTHYbDbg1c56Lb2Hpv2hTx5QDgpioZYDGvKYhm4lHmkwJ+HoFbsFu4uAoMIq2Td6GOuRt1GOWazTNxpQiBnY/LuD1HXvHFe+PxiXFwZrZM8agljYLrVDH03CnUy0Gt0zRWiaJps+JUZs4sfkL3ValEU+09gEFqMdGpgpWbDOxSkzrnXnXJxqPw2ZpWywKkgZk0G7yhuhpeNCkvPSCQe/pzqwrjGmgPwZUQW6yjCTlzVHNqy1KU2DROXsRQyq7UqKRnWYDpCQAzUfjAnuxDiZ/AGzNlgIvuFD2LJ/4TeP5AMEsry21Jk8w6FpxCCJ0HBWrxgVwNPYZRFCHJUEtqP853gTUpWvQWqdtISGdE8rKKad3j38bL81l/oxEtmnkx3fD+Ssp4VlsrtIARq+TbmaWhkgGZMfLPanv3/zuD6U8hiclGRuolO2op8PgzZL1hBY0Y3g+7bd9qff237W/Nsv2V2OBsLq8fuHM4FeziCuQs8u3ypz+ROwYOnqDOzDwQ5BIB84GHg X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mKQv/97UcMjyj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790d9 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 08:46:22.9882 (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: GV2P250MB0825 Subject: [FFmpeg-devel] [PATCH 09/22] avcodec/asvdec: Only keep what is used from ScanTable 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: NVTaZ78X5NNR Namely ScanTable.permutated. Signed-off-by: Andreas Rheinhardt --- libavcodec/asvdec.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/libavcodec/asvdec.c b/libavcodec/asvdec.c index be89544732..11cf105d08 100644 --- a/libavcodec/asvdec.c +++ b/libavcodec/asvdec.c @@ -58,7 +58,7 @@ typedef struct ASVDecContext { BlockDSPContext bdsp; IDCTDSPContext idsp; - ScanTable scantable; + uint8_t scantable[64]; DECLARE_ALIGNED(32, int16_t, block)[6][64]; uint16_t intra_matrix[64]; uint8_t *bitstream_buffer; @@ -141,13 +141,13 @@ static inline int asv1_decode_block(ASVDecContext *a, int16_t block[64]) } if (ccp & 8) - block[a->scantable.permutated[4 * i + 0]] = (asv1_get_level(&a->gb) * a->intra_matrix[4 * i + 0]) >> 4; + block[a->scantable[4 * i + 0]] = (asv1_get_level(&a->gb) * a->intra_matrix[4 * i + 0]) >> 4; if (ccp & 4) - block[a->scantable.permutated[4 * i + 1]] = (asv1_get_level(&a->gb) * a->intra_matrix[4 * i + 1]) >> 4; + block[a->scantable[4 * i + 1]] = (asv1_get_level(&a->gb) * a->intra_matrix[4 * i + 1]) >> 4; if (ccp & 2) - block[a->scantable.permutated[4 * i + 2]] = (asv1_get_level(&a->gb) * a->intra_matrix[4 * i + 2]) >> 4; + block[a->scantable[4 * i + 2]] = (asv1_get_level(&a->gb) * a->intra_matrix[4 * i + 2]) >> 4; if (ccp & 1) - block[a->scantable.permutated[4 * i + 3]] = (asv1_get_level(&a->gb) * a->intra_matrix[4 * i + 3]) >> 4; + block[a->scantable[4 * i + 3]] = (asv1_get_level(&a->gb) * a->intra_matrix[4 * i + 3]) >> 4; } } @@ -165,11 +165,11 @@ static inline int asv2_decode_block(ASVDecContext *a, int16_t block[64]) ccp = asv2_get_vlc2(&a->gb, dc_ccp_vlc.table, DC_CCP_VLC_BITS); if (ccp) { if (ccp & 4) - block[a->scantable.permutated[1]] = (asv2_get_level(&a->gb) * a->intra_matrix[1]) >> 4; + block[a->scantable[1]] = (asv2_get_level(&a->gb) * a->intra_matrix[1]) >> 4; if (ccp & 2) - block[a->scantable.permutated[2]] = (asv2_get_level(&a->gb) * a->intra_matrix[2]) >> 4; + block[a->scantable[2]] = (asv2_get_level(&a->gb) * a->intra_matrix[2]) >> 4; if (ccp & 1) - block[a->scantable.permutated[3]] = (asv2_get_level(&a->gb) * a->intra_matrix[3]) >> 4; + block[a->scantable[3]] = (asv2_get_level(&a->gb) * a->intra_matrix[3]) >> 4; } for (i = 1; i < count + 1; i++) { @@ -177,13 +177,13 @@ static inline int asv2_decode_block(ASVDecContext *a, int16_t block[64]) if (ccp) { if (ccp & 8) - block[a->scantable.permutated[4 * i + 0]] = (asv2_get_level(&a->gb) * a->intra_matrix[4 * i + 0]) >> 4; + block[a->scantable[4 * i + 0]] = (asv2_get_level(&a->gb) * a->intra_matrix[4 * i + 0]) >> 4; if (ccp & 4) - block[a->scantable.permutated[4 * i + 1]] = (asv2_get_level(&a->gb) * a->intra_matrix[4 * i + 1]) >> 4; + block[a->scantable[4 * i + 1]] = (asv2_get_level(&a->gb) * a->intra_matrix[4 * i + 1]) >> 4; if (ccp & 2) - block[a->scantable.permutated[4 * i + 2]] = (asv2_get_level(&a->gb) * a->intra_matrix[4 * i + 2]) >> 4; + block[a->scantable[4 * i + 2]] = (asv2_get_level(&a->gb) * a->intra_matrix[4 * i + 2]) >> 4; if (ccp & 1) - block[a->scantable.permutated[4 * i + 3]] = (asv2_get_level(&a->gb) * a->intra_matrix[4 * i + 3]) >> 4; + block[a->scantable[4 * i + 3]] = (asv2_get_level(&a->gb) * a->intra_matrix[4 * i + 3]) >> 4; } } @@ -311,7 +311,8 @@ static av_cold int decode_init(AVCodecContext *avctx) ff_asv_common_init(avctx); ff_blockdsp_init(&a->bdsp); ff_idctdsp_init(&a->idsp, avctx); - ff_init_scantable(a->idsp.idct_permutation, &a->scantable, ff_asv_scantab); + ff_permute_scantable(a->scantable, ff_asv_scantab, + a->idsp.idct_permutation); avctx->pix_fmt = AV_PIX_FMT_YUV420P; if (avctx->extradata_size < 1 || (inv_qscale = avctx->extradata[0]) == 0) { From patchwork Thu Oct 20 08:45:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38844 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp45781pzb; Thu, 20 Oct 2022 01:47:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5+wHH9tS5NqLSioQE8x92L0z9StlgzDXnNa5QrmZ/tt64OvX0p/mPQa785YGIlI8ih4giA X-Received: by 2002:a05:6402:1d4e:b0:45c:b459:25cb with SMTP id dz14-20020a0564021d4e00b0045cb45925cbmr11310396edb.170.1666255625117; Thu, 20 Oct 2022 01:47:05 -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 ds1-20020a170907724100b0078e11a20640si15628075ejc.2.2022.10.20.01.47.04; Thu, 20 Oct 2022 01:47:05 -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=V1bDcxCv; 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 B9E9868BE6F; Thu, 20 Oct 2022 11:46:33 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2101.outbound.protection.outlook.com [40.92.91.101]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4FA6A68BE68 for ; Thu, 20 Oct 2022 11:46:26 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YJ6fHfldLkv3qILi89d0rvZxLcELKcvG3vWVWSbOhjas3dRHk69wsTbOuMZw7TnmqEbKK6iiojGuLU5Ttvo04uA+JOQj+W4oUnLJjQ7lGBopjGCR7Y5seOTCc31a6WQqP1t3OEjNkpvjnNwVZqcK7Iq9d5JWRTojD46c3SSbKeAYDogmFofmtsYZIOl6eGmdbnT07WaRLgB/TnURNAYjlbZW2wF47O+ylQbyVfyIMTTFIkUw96Qc7oEj/nKfsnGXNXaLBoZcVoaqWA8s64cjnmCAN0DsAKtKJ5xsYOygjm3df0QRHAztGXsrs8X9GMwNUzGKiEzBm7U8tVDXOwgSPQ== 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=A95TVxSitLKuOYqTpdxBDsS3FKw3Eq4HUdCaPKvZcVI=; b=m07BLvDKAUkLpACn0lorNFRItTeU7gh73nfheEimfDhFuXMRKVjXBmAK6W7LojpVjce8Qf1EZVax0qqVgJKwjeieeygOP7WBS4qZ85SNYItg4v9CXTXTxJCwNQUdasape0fNe2BM7Bl07ceWJwEvAfkFkQAMpy0XKXHXzjo8YFdDLlv20/qUBkSItf2LblCAgTr065cRwf+6O5GHoofbb8ATUbB00hW9GtwYkPkW9Tw7qhaac+0FD6hw7GThnurwhbaH3UDiljsO7F7t7lDyOleFjyC/vB0P27+9832nJHeYoxN228qgLmoq5GnD9EMLYAjLiqhYHYmPFx3S6Yyryw== 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=A95TVxSitLKuOYqTpdxBDsS3FKw3Eq4HUdCaPKvZcVI=; b=V1bDcxCvtHxWZdCepS6jWZPZ9YkhkRitMgCIo3Lqb4/VnS7MvTXjwptw0lKWZNZXhQBbTAQPwjgr6yaZ/bcRdh/rwuSiVVfqS1QldgPHfBABiZgregw563Floz0DiiH/CEy2Bsa0nbhJhV0Q+dPHTOAVWuv1oWqZW99TbrRWwqxHDboDKjqfhqx7FBWCEjVxwZPW24mzmx0M7rZsVZm+0VEAwFh34Xw8ZLVupjIYRUh/pMZ88GRdBGEwaqBTdB9E7vYdeZbFX+0FLF8OSl7j7XkZIEzoKZYqDrsw4rtFq9Uqj4nBq9dxOzvpyylChIjbx9k3DKyD8nTddK6F9uDyVw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by GV2P250MB0825.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:aa::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Thu, 20 Oct 2022 08:46:25 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 08:46:24 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 10:45:28 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [mft+UlFDM3IkJrwprNUXDxYX20TEz4W6dygmRDQ/NQI=] X-ClientProxiedBy: AS9PR06CA0774.eurprd06.prod.outlook.com (2603:10a6:20b:484::29) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020084540.2378553-9-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|GV2P250MB0825:EE_ X-MS-Office365-Filtering-Correlation-Id: 40246523-9891-4ef1-c950-08dab277920a X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3kEq9VXjGDAyurdVkDmkI7q7DWNiKYGeXDbQ/GFOChYu42Gkz9qi7h3nsxh0sCE+ujV6JYGsN5PGlM8e8XYP41jypR4NbMtizvFPcPlWUWL9InpSdzRI0ch9oc6ANkvMqlFzFZFNc5eib3nfplmX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hQnVKL8zKr+1ctWmcQOQ23K4vrBRlEMAonCRg+Dqfq5YGuCsI7RzRds5Ovp6JGXCUioECAtsU+XiuT6NOUDMC6g54k1MZcwaQrv50WzxoZnN8iEIRKGGoYcymM5n0AXB1Q6YXS14j/O6duSjoHdONO+DKak1id2Na/jV9TVQKkKVjxB5btDr0VTQABImWG6I+b5nTQxYXQ/lfRd2in7g+tjOY8ByxhXhg2KIW6KF4xTToEG3rOw9NZkjIm50FJOQvhhU5+U10TPblhVkQWP+Kw5zODwJL183z4wV3X9tKA6GF3dqcfEEDxMLAsl+Pc3+JXIe7c2JAYiKYtQ8pUi25Mbu5fU0MNS5N7bRsha6WlaoUIaAqWibBKUQ5LMuERpW1m684R+8QewmgY1gdLbiZ28ZLWwtNQU02jVG165gtb4tpzIuCFuva+Y1CB6ebOD+rxNsbTZII9ISHIXWvKFZZEbzgd1zqjSk4pI1KvwJGBrzpHdQQKmo8zDZ28PwjZERXN3dey16IRegHZ5aqbSBJVGf+jHHWkGeBzFWeCftsPnCCD4SJpYeosX6XtQpm4cwr8+4w2nQeTYYqMBJQYzWMaaXsTfasC29zqJ+nB5qISBTSBw X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 40246523-9891-4ef1-c950-08dab277920a X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 08:46:24.9577 (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: GV2P250MB0825 Subject: [FFmpeg-devel] [PATCH 10/22] avcodec/dnxhddec: Only keep what is used from ScanTable 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: daiV3fsbL96F Namely ScanTable.permutated. Signed-off-by: Andreas Rheinhardt --- libavcodec/dnxhddec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c index a44f95f044..ce738f3991 100644 --- a/libavcodec/dnxhddec.c +++ b/libavcodec/dnxhddec.c @@ -65,7 +65,7 @@ typedef struct DNXHDContext { int cur_field; ///< current interlaced field VLC ac_vlc, dc_vlc, run_vlc; IDCTDSPContext idsp; - ScanTable scantable; + uint8_t scantable[64]; const CIDEntry *cid_table; int bit_depth; // 8, 10, 12 or 0 if not initialized at all. int is_444; @@ -275,8 +275,8 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, if (ctx->bit_depth != old_bit_depth) { ff_blockdsp_init(&ctx->bdsp); ff_idctdsp_init(&ctx->idsp, ctx->avctx); - ff_init_scantable(ctx->idsp.idct_permutation, &ctx->scantable, - ff_zigzag_direct); + ff_permute_scantable(ctx->scantable, ff_zigzag_direct, + ctx->idsp.idct_permutation); } // make sure profile size constraints are respected @@ -436,7 +436,7 @@ static av_always_inline int dnxhd_decode_dct_block(const DNXHDContext *ctx, break; } - j = ctx->scantable.permutated[i]; + j = ctx->scantable[i]; level *= scale[i]; level += scale[i] >> 1; if (level_bias < 32 || weight_matrix[i] != level_bias) From patchwork Thu Oct 20 08:45:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38845 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp45911pzb; Thu, 20 Oct 2022 01:47:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7FnQWCv72vCskJZRTS4PpwYekjrnkoak13T7nJhDIGvxZP311O7fBagw+5TkjGzljcN2P/ X-Received: by 2002:a05:6402:3806:b0:450:bad8:8cd5 with SMTP id es6-20020a056402380600b00450bad88cd5mr11544734edb.305.1666255641275; Thu, 20 Oct 2022 01:47: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 a19-20020a50e713000000b00458d23f9fd5si15452219edn.242.2022.10.20.01.47.13; Thu, 20 Oct 2022 01:47: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=bftWBYED; 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 D62DF68BE09; Thu, 20 Oct 2022 11:46:39 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2108.outbound.protection.outlook.com [40.92.91.108]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D2EEB68BE09 for ; Thu, 20 Oct 2022 11:46:38 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QRLeSxT89CH0Z/O958OseP321iSg8jv8Q15BB/W/sfQBOFSZTKccutlLkVmaa1oyYDrkNTFmTLbrYkR55QQXTaYIcxY0sT06IQ/Iay+uMq9dpFVfSXlpr362E3sRNzFQ5zHFgKjZbUGVuK6AkbM4SmwaABZ2YuWxwFfnuj9xAUxBfKNxXXLHFYTWnM9GvPGhpftSywwEIOeoNp4mN4JuvYXwU2bKVLCiwWGEvxsaJrtvCwL7LVU4rbn4F5e/T3YiQlX4g6xKZfmpZoft6TXHlwZs0Wv9ZrwMrxALQUqR7jC5PGHSuyiUxeMD4X3SWKWkclhmqR0K1XMgHm/LrG3SHw== 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=ny/FAQjDXFpLYeP4XLeboDrN39DBqzBc9Qbvil464Sg=; b=neUni3GNPtpOF9jYQgQNVQXP7+/QgerpT3ow/oZXRswEGBB+BRUEuIDBz8bjJ2XuYmBx7mv7df8y3PlpZh/RyIQKdFd0ZxwpBmyEK3BAMs8TqG6EbCf/R8ztTKnoUtOIfhptOt89G/WkUGBNV9Ksfm3FoO54SKydQxlUOtDkCr+rPyqTzyUvzkauB7if+GmnCm0EYH1AY2M0+3ZTY0ax1SeJvG5WERVrBENGQoQ6UzPGABO1fSNHobyok1PHdUFDh1y1BYeMO9AycCNSi2sYtwGNuQKwO/lzz06GLoqK451OxiKBi4cAGg/QX0gbLMHVbO5y9VWtSIRcoHZDTwxeOw== 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=ny/FAQjDXFpLYeP4XLeboDrN39DBqzBc9Qbvil464Sg=; b=bftWBYEDLevafySym880q6qf9eDg+U0lgv2mV1VdLQLJcCOut5/oJzUTBkA+gIRmWlZaGiKZd9sW//6H3dw63N1+HFxPdbatN0ll5wnLMix+hiV8pb2exJMX+lUI6/ZyC9df08FqAC6+KFbygFZKqNP1hy8a406yRzrcm+rpjfuBm8X0XoChIT2UJ7KvG/RwDt2FK2RjO59C2Lwg/cJXjWpT1IRxe7qgdiAd/uK+FLbLf+xanq4eOJxiH0b5VmnxXKvXFWXNDettymNjBL7NyJEf6dPfAJhP3mz+nYdYjeI3DUeg3Fn5F0u2tqSN6oaLXOFnvPeBarCleNtPvAEHqA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by GV2P250MB0825.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:aa::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Thu, 20 Oct 2022 08:46:37 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 08:46:36 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 10:45:29 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [yNzhvhTL6jTnLml0xEPsxlQE20cP/qdngxqYgOSQy4s=] X-ClientProxiedBy: AS9PR06CA0774.eurprd06.prod.outlook.com (2603:10a6:20b:484::29) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020084540.2378553-10-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|GV2P250MB0825:EE_ X-MS-Office365-Filtering-Correlation-Id: 1a5c5def-f9ab-4f7e-3470-08dab2779932 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3kEq9VXjGDAyurdVkDmkI7qdHGHEp8DOZCOfXoYhzbe/eBxPBp3TfYbp41QF+Rmaadsa0W4v+rVvhFQ0JINa6lCUIHOKQyoSdjk2Ew6tEBSLvBVzABFiBVeHCkZ5Ri6aEepdhHTsI81zFAWSyrdQRsazjXWqs/cGs0ynEPyH9tEF04q1FD/6tP7zRxmtkxVA8Aj0JP3IANS0Ia44M2f4UvtgFDEjCOApLjPMPCT25W9QSqaMIXorz5chaZ//eTtJg1/8IILzOxxItDInfkcqIEIdBAzbiwb+VKb4scgzpAOpqW18/oiMbhlCMkbzDEbbRtFZfVcNYJvI1EHU7TIBH8WT61UgUIXhoRytugpLUzFo5lBEU7z/LqmlWKHXNVRCw/D7kitEYoZ4VjY7YwLxpiOf9s8sJcVVRNNRToIKzc01LhUbPRQ8zLDCTXyLZctjVeChhNnGTrfyWvMMCmACycx4P6XyFajZbACFQ+wBpW0G5grFKH2m+ZNs82TqBzaBjbKLxV6WVmG2FHVklpsoMutYJ+BvnBmwW1X7QhhdWhA6Gyj5/Q6NdEhqECSHCTPA+DXA+1akgDyOvhgmzGU/XV69SUckYK57VzAdmIfMHnPltFIcToPmRjw0YNRKNwHFSQfamEBwmRpiQCfYp4euX8IKTky5zXLV07gsBwgT0o9voUi1YE94hGWa6klAs+2kojZ49tuyPQucPxM9+DEGqiIXkiEdf5XgQT+oiUGQPUS/umkzPIFRNLoIppMY2Ftoi/Y1IW337G6tihPyCWejHka X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IShaLY2DGi0jrKn1TFhjJz6wsFhTdbmf1ER1BTKef5cVTmIefb49PtI+NaLpGXGb1zWRKXWifftjl2dP09EvEvLdAI7teq3hKktDK2rz2eVjjVO/EMT3A65LRKntaLFs1UpDoFU9abViAssnQ1dT1uKc91+q6W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dvdI2alYlb7dEfIzmghGDxJ/Np1pVNNmgycgPFZaucw1WjEne1AJZ3oqzTDvSezj4f8TWj+fyJxjU6e5ISPVwp7z6uqDLyp0nmm81ofL0EXG8oloUb2gQnzjhXOqST0HZbG0ZWnn8fHqn+bytUmHeNVkf70DNxZu35+4uDCgEcYmANVt8sm14x5sLTwAGjZliibLANGFpWpo/Nnf7dXZV6e+2eSz9Lfphu/4PILzZNDCddPacm6rO5KT6pn0ClJ3xXa/k9DFoJ14fKvTYvsc0efbuFzYNBtA6f6yg5JZcIHEku6QRnwIO1i3Art3qEuv7T2N+B8b4lPgTqmExFAo1+m6snDql+YbGvybh2+h3ZDS93gpigsXPuGWqKleQNcZFO3Wc+tx19LpKGGX64HNgDxILgtYlaOqHwkvUtsN2Fz5our/l6fvV2LUpgGKkfde3L3y4H2Wo+mxH90mclIl0LKCJrKlpE0j/uOcQtj1PQZ6LKjxEsGJ99bHVwWm0LDPVnYTHtSrh95BM3eZzryljPpC/6/mUdPBCRehc06CmJmhTDr1bcnzjXzJr7hC9vTwluX0sPFQbWPcTsC22Dmxkaihuk5PLrRbV7my4JLouv/NDJp4WXsoB3yl/tW2RI6fm6z2zDEnQnl1Gc5yWMJtMOUWgQwCRJpPl8SWGFkVEJzqEiL27ALRVAtnekUQ8mcH/OTppuFM0rvzizYnKLQmPeSQOq6u6ONHDy0m5LsAvdCiNWaaYnj1+Er7wGWNU5ElIUc1WADRAky7Al+0dFqAPh/QFw8v/WxGgT6NcwR3jNwDyu7ULJdct2F4BljVQJTY5XeFH6DAsu/q0TzlNol6yPfKiLr0oR3bSqr X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1a5c5def-f9ab-4f7e-3470-08dab2779932 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 08:46:36.9134 (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: GV2P250MB0825 Subject: [FFmpeg-devel] [PATCH 11/22] avcodec/cavs: Only keep what is needed from IDCTDSP-API 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: W5tWFcKJklgu Namely ScanTable.permutated. The rest of the IDCTDSP-API is unused as cavs has its own idct. Signed-off-by: Andreas Rheinhardt --- libavcodec/cavs.c | 7 +++---- libavcodec/cavs.h | 9 ++++++--- libavcodec/cavsdec.c | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/libavcodec/cavs.c b/libavcodec/cavs.c index 6d54e8eae5..9658e691d7 100644 --- a/libavcodec/cavs.c +++ b/libavcodec/cavs.c @@ -792,15 +792,14 @@ int ff_cavs_init_top_lines(AVSContext *h) av_cold int ff_cavs_init(AVCodecContext *avctx) { AVSContext *h = avctx->priv_data; + uint8_t permutation[64]; ff_blockdsp_init(&h->bdsp); ff_h264chroma_init(&h->h264chroma, 8); - ff_idctdsp_init(&h->idsp, avctx); ff_videodsp_init(&h->vdsp, 8); ff_cavsdsp_init(&h->cdsp); - ff_init_scantable_permutation(h->idsp.idct_permutation, - h->cdsp.idct_perm); - ff_init_scantable(h->idsp.idct_permutation, &h->scantable, ff_zigzag_direct); + ff_init_scantable_permutation(permutation, h->cdsp.idct_perm); + ff_permute_scantable(h->scantable, ff_zigzag_direct, permutation); h->avctx = avctx; avctx->pix_fmt = AV_PIX_FMT_YUV420P; diff --git a/libavcodec/cavs.h b/libavcodec/cavs.h index cbc163fb4d..0852096b66 100644 --- a/libavcodec/cavs.h +++ b/libavcodec/cavs.h @@ -22,12 +22,16 @@ #ifndef AVCODEC_CAVS_H #define AVCODEC_CAVS_H +#include +#include + +#include "libavutil/frame.h" #include "libavutil/mem_internal.h" +#include "avcodec.h" #include "cavsdsp.h" #include "blockdsp.h" #include "h264chroma.h" -#include "idctdsp.h" #include "get_bits.h" #include "videodsp.h" @@ -166,7 +170,6 @@ typedef struct AVSContext { AVCodecContext *avctx; BlockDSPContext bdsp; H264ChromaContext h264chroma; - IDCTDSPContext idsp; VideoDSPContext vdsp; CAVSDSPContext cdsp; GetBitContext gb; @@ -220,7 +223,7 @@ typedef struct AVSContext { int qp_fixed; int pic_qp_fixed; int cbp; - ScanTable scantable; + uint8_t scantable[64]; /** intra prediction is done with un-deblocked samples they are saved here before deblocking the MB */ diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c index 3e8be65968..11197455e6 100644 --- a/libavcodec/cavsdec.c +++ b/libavcodec/cavsdec.c @@ -521,7 +521,7 @@ static inline int dequant(AVSContext *h, int16_t *level_buf, uint8_t *run_buf, { int round = 1 << (shift - 1); int pos = -1; - const uint8_t *scantab = h->scantable.permutated; + const uint8_t *scantab = h->scantable; /* inverse scan and dequantization */ while (--coeff_num >= 0) { From patchwork Thu Oct 20 08:45:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38846 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp45919pzb; Thu, 20 Oct 2022 01:47:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5WPsr1LdkWBzOnRsbP6wrypVUIy8TMDJPjHRRhetg2erl/lBxDxHCtLYpDrtFYikB0mDEp X-Received: by 2002:a17:907:3f07:b0:797:4463:e1e with SMTP id hq7-20020a1709073f0700b0079744630e1emr2406072ejc.139.1666255641965; Thu, 20 Oct 2022 01:47: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 ga8-20020a1709070c0800b0077a5733ac08si6919434ejc.601.2022.10.20.01.47.21; Thu, 20 Oct 2022 01:47: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=PI1NOluL; 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 CC83468BE80; Thu, 20 Oct 2022 11:46:41 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2107.outbound.protection.outlook.com [40.92.91.107]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E569E68BE77 for ; Thu, 20 Oct 2022 11:46:39 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dns7mzPw3VO/8H9x88v2qwXfY5HGTD1IvhC+3GpujT3OWHApMuJrsbXLF+t+uJVYsJeWzHQl912weietjhrwBORr9Lvc9WXPN8AG7RQ9yV1G2HJQj0SQSsYfulzaWYeqW9BwOBUMDeL6D+D54FEFc15c55IUWuCX3YHBmZkz7aNUNMSEWGJRacA/BIb3cX5R2GqJsFQwJMvR1nEr+w1leDne9SL0BDI3W+BjVL8unuqPSB+QduZI53ZVKU8gdjvRMzTcvkcOh0bgnTJ+JWBrH6XR7kEqx5DjeYLyY9pkT/kZt3Axcsb2EmjxeKA2cSylp4GJHoR/MlLZE2j1vEBDfQ== 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=HlVwK9J1MAjfuMbKBsRqa9/rOm8Nu9j1g8BdRQTk5hE=; b=XgEjUiukAqBbSYWRcA6sxUsJi9T0W0RLWf0HkgngA1Lb4YGonKv/N1hEp2LmrY8NVOESR/qeeACs4jCYCUiECHLu5hKepy37RSYhy29penhdL/pM1ZDmTtAbkBa6K/A1l2JKN74WOuvbwAhlNXT+W3YXI+7HwCiryzfopCpU/7JaRl+kOf+uAekKT3JHjGgpKfIuHmfsk7bp0Opps2qZzXnARZBo4knhvbZSgQUXMp7nYEISLY8h8Gld+BBuyLMlSKo+vzz/vJyNWQUNh7tmb0tBfFyOxefHSbcSa1IOSzjDKHCmOx32a1dUsLlNDsB3Rm7snFPs9XpQhWW1yQtBQg== 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=HlVwK9J1MAjfuMbKBsRqa9/rOm8Nu9j1g8BdRQTk5hE=; b=PI1NOluLUrz1rnuWDzIkiZiQjCXDdwTvU8hgrrSYvUg+MJktLJHpAPT7+JWRpO+B7hEQbT07QPWm47JjKMlFTUtc3qsxKrjvTXRfXCIAQnxRA4YxB9svkHU+083Tzudv6rUkndftyg4iI47YhywW/dBKQPGeiEYFys/fK9g6h+fH1S6wqc8+gFUp8GjOSR+LFMgGcOhWqcyJEqNCDIxRNKg3DZe2g7FC+CpC30NDd376a2KniN1QJusbRh6UUAolTFqceinkio9uQpdnAkbB4Z/5hVYgAKTMhrKd0hRtHF9Sni+NZSog7Y03MZKEG0Pgf3wXRnioPIlFwwW8M2saog== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by GV2P250MB0825.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:aa::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Thu, 20 Oct 2022 08:46:38 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 08:46:38 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 10:45:30 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [5QUH5ye7yRuD1oTt22K+D2fb2jrCHQrYnoXFFCA8qqI=] X-ClientProxiedBy: AS9PR06CA0774.eurprd06.prod.outlook.com (2603:10a6:20b:484::29) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020084540.2378553-11-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|GV2P250MB0825:EE_ X-MS-Office365-Filtering-Correlation-Id: d3acbe17-6fc7-4803-0951-08dab2779a15 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3kEq9VXjGDAyurdVkDmkI7q7DWNiKYGeXDbQ/GFOChYu2towxpXWphyZDSZc17dP7J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36kzr2HKvYR8MeX+GzjCIYV1Lw89pW+XYQRiX4kKsycNZ5F74dcV8V3Km80hHOy6G2sZtmt1jIf3v5Inv7o1on5WouEbSOunbqxqkHALvkNGf364UzIHCkwWBAYTSxPzE77w/NmCOfUlrVfoeG74gDq6GxoxiAwxmExZQr/vrqe0RxySQFnuYPEmZnqiyf1ZbQIdxTiHTi6bLFEIrygKJP5wysIr7EbweVUEZoOLAP/Qp09y5ayjL06nvC5GZHLd6/bu/eGdwfUiyoi9ZlWODI3GdaJEpWDtebHn1obj4C+o6e5ZyFlGrmbesLuPn2OM6J+Lo9dIyTaoZ1LXcvkcjVBWV/A2mElzeCVKz94njhfpRvOuNjrtamn4SY7Civ+aplo56FSUIbcD7aCYJDoA5aNpW3ZZXue2vEI4b1AW0geh+ezjswQND1KL9zQltkcsyHAoEY0iWBjkppMRZw64GMTqw1fiamC90lGjtRfmE3wuNp9ZduY4FzA1suCDCnqpE+5Z6SzfOkFzQjrgIv4zcym1UDHauBfZ/RFQPnrxgMYbr+1/kyzVTn34hS/WCpVqVzkd4s8jT+q6KnRpzuvHNf6lbCptaIbRlKHHcw7jLBWRM1/jY4QvuxpnvlSy52wofx/T1mINbmjX2BuaqgWme5w2AWuBUjtiucc5MlUD1XaTYoqdapE9SU2M6JltMZH8rbKVOLeBXrdEnbbu36rsw12 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d3acbe17-6fc7-4803-0951-08dab2779a15 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 08:46:38.3987 (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: GV2P250MB0825 Subject: [FFmpeg-devel] [PATCH 12/22] avcodec/g2meet: Only keep what is used from ScanTable 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: l4zjyh4Fs2lE Namely ScanTable.permutated. Signed-off-by: Andreas Rheinhardt --- libavcodec/g2meet.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c index 4367af3dc0..7c1f8325c4 100644 --- a/libavcodec/g2meet.c +++ b/libavcodec/g2meet.c @@ -120,7 +120,7 @@ typedef struct ePICContext { typedef struct JPGContext { BlockDSPContext bdsp; IDCTDSPContext idsp; - ScanTable scantable; + uint8_t scantable[64]; VLC dc_vlc[2], ac_vlc[2]; int prev_dc[3]; @@ -182,8 +182,8 @@ static av_cold int jpg_init(AVCodecContext *avctx, JPGContext *c) ff_blockdsp_init(&c->bdsp); ff_idctdsp_init(&c->idsp, avctx); - ff_init_scantable(c->idsp.idct_permutation, &c->scantable, - ff_zigzag_direct); + ff_permute_scantable(c->scantable, ff_zigzag_direct, + c->idsp.idct_permutation); return 0; } @@ -251,7 +251,7 @@ static int jpg_decode_block(JPGContext *c, GetBitContext *gb, val = get_xbits(gb, nbits); val *= qmat[ff_zigzag_direct[pos]]; - block[c->scantable.permutated[pos]] = val; + block[c->scantable[pos]] = val; } } return 0; From patchwork Thu Oct 20 08:45:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38847 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp45955pzb; Thu, 20 Oct 2022 01:47:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6zJAWzBv5KZxAQhLfmfZiApjlcGLvl6PagWp/e21SfurCVofPZPH6jCWKmo9RoPNPR98OB X-Received: by 2002:a17:907:6e0e:b0:78e:1385:c06 with SMTP id sd14-20020a1709076e0e00b0078e13850c06mr10297652ejc.485.1666255650334; Thu, 20 Oct 2022 01:47: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 ht15-20020a170907608f00b00781599eb7dbsi17103017ejc.573.2022.10.20.01.47.29; Thu, 20 Oct 2022 01:47: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=rYKPyYzG; 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 51DE468BE82; Thu, 20 Oct 2022 11:46:44 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2088.outbound.protection.outlook.com [40.92.91.88]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 43FD668BE82 for ; Thu, 20 Oct 2022 11:46:41 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HlkHYVzOQv2YZu5q1uK6A6jfQlSax4MP/5WuG+BZ8OUZVgK5JWG5VDXKuXOTV+jr42zo6nYxUF5k0H+oFD056ez1s7hC/jbx1YaU9RvKXIBA9dljGK84U+Oz5ej4s4XwPXL5Pm17v++vBOMeVPue+tFSyB+COqoUhgxAp7zovW+JflxSNPskde1qTaoKm6YJogYodTERDf8Gh7YW4L4GvZGrE9qYCq/qVU0vH9dlApH0sYAzQ1RmquqtOapw6L2KB58t+UUodEMLgpcQisLwL1HU1qZ4/oQH0xU2qaiRzXEdWnWgfiuH8ZHf7XhvVD+eK/kOl/zyP3wI2v8a/ofK6Q== 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=k0RMbnYFRHFnaZqqhg/GedqjRdexvc6Ox3BvCbCL82I=; b=PEC6l08/T1Y3oEw8Jpaxlja+P1+E9/dlomxgw9dTGqzoear9mPfaQWyHMPWwT/PUCA5QJ+jMwISgQAz8WhKkCq2G5fOJqQ+CoQitCq8DOrDRSOHCae5nO8NlGWX0G1ZoJ9+pjaQQypG3Mnokfl3C92vF0p7BKlW/pJxnLngAR0g2Gz+/Lh3yP4V+Iz/AsKrHNrDnRNWoIBCJTQs+MA1mPU3b2muu24dpkDayw64D5RBIwONetP7eS8zYSx/f9PXVcOhIAyEtJA2V8rGRVbAa39K/1YOlJY1nsljhRxWFD23HuJTO7y4Ru9UyU80YgpkwXl+6O2bhrFBaY9dQ6BuvZA== 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=k0RMbnYFRHFnaZqqhg/GedqjRdexvc6Ox3BvCbCL82I=; b=rYKPyYzGGVFtGB8MP2tAIP/2W+8u6ReR06vMLDNoKDuKIhSWrPHtl1kxyTQWRfIB5/VNjtEHuE+FrrxREgUOeiqhX05qq+kBnHOwVn+BwMbyzrSzlj+tgsmTw+KxMW4qkM9VEaiqhZ4LBjcwnMLUlp/tTnAwBd78/ikKeNVElm9K8by9FNtOAtXuPiM50bVQzI8q53N5drENSFg4wN4EhbUvxXMZ6CeeoOnD3skw9RLsbowPyO9OuBjL8luQBoDE25k5OAeKuCs411/MPhAN9+cy1ja3JX4Wuu/jayiN8ycVdCw3qt8+kTEJp7Q1Fl9PmwrfDHz6kG41LfTFZLDsuQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by GV2P250MB0825.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:aa::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Thu, 20 Oct 2022 08:46:40 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 08:46:40 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 10:45:31 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [7eVjc+pdTDQ3zseAgKV6WkiIFDvGJo+/GwYDh4AtfZQ=] X-ClientProxiedBy: AS9PR06CA0774.eurprd06.prod.outlook.com (2603:10a6:20b:484::29) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020084540.2378553-12-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|GV2P250MB0825:EE_ X-MS-Office365-Filtering-Correlation-Id: f1381e00-3d64-49b9-d393-08dab2779b75 X-MS-Exchange-SLBlob-MailProps: EgT5Wr3QDKyDv2LNnQUxpADcJjPAOPhz3KWX2n/gpBxHfUZndz0iLoqTsJje2pL0dEhi7wyBa1GFWumM8Pr0WIU6D9bKbJEJxZEQW/kEwGFWnsvBUYZFY6cAnE5/vL9WqJJ593GKfwwAuMdia65Hft4ZPbbi7DjrrEQ11qysPJqrXMDf7w8Hs0dB0h2mU+bTPHhAzNA/djRLmgwbvEw6H+pqQxg+nmABYI2EYQldQyTttXLdNB0+p6Ui/NV0HOV0oLZmhjbc002ZznUQxQZJ2m0YsrhA388nARVLzW7CGjUkrhWyvlb5ebvCYZ1AG3IOPH+NIiw0IeiXaAIWLqQ5YmN6l/y3bCubG92HZzXb/DutMjIJ14TiPKEGxRqjnHkniDdiIGLT1qGKFcLkf4ZcByCf4V9bwMwVjMts+DCmPOfE+O11jxVjZaUTEXh5kFeHoSov4iHG+LO3NnpG0MzobyKlokE6+TJJo0ehqs1e4Yc2Dbs2xVJpWh5D3pYblY/GqXwiuzXkdnQVYRidumQF3C8jYiV6WXWcgflIsrPxZvryA44573OgCcUD4zPL10wAbpqW+s/XhxI5O34x/tokt15wB0FvDRAfdZRhbXUWAjBJDm3f4ZFNJ60V5ylUGmlCj3Pn4ircuQxDYbC0JPK8OwOvxzLM0QvkYcQz2hTMOryEQSPs+fq+BM4nQ7iwXCBkCVL5ghxcXXu2zV8A4jIwl7XFqsxKhvjv9SeoTify+CA= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rbQk9bSS7baovPvbRh0ccclQlqN8ndcFUAT4rjcvMpK2h5PLB8puyaM3fui6I+z7yQ4ZysnyatrDwNgPIPEYVT0EpD7EBSA4YIQur5e17JrA1IoLf4C2cjeC6GJL1zIo/DFeI21zfJAHyzXuXHLISrxqyHVy9pX9E7X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0YOJHH1rbv9bP0DjXOvsEQbyPuvjxG1R2143kxsRGDUyF2Har27bW+uZdPu0Qr23qOFfnx+T8V8pItxHDZLfH74ZHz1UapTZSBPiHzgLehl4JEwaQ7otDIwbc2p2CfPBZye4l0nLcbS4W4BbTWboVB4QIkkGoK2WLNkqrg6QwlqmEW0v3zOWz5yfmYTi5NyfMTLAoM7wWc6zJGQ9kLsNuTsTtiCFAclcg+TL0L9PaLF2DOHhUj/PzQHqjZ/hJphMzySWsQZv8/DdpM+Vx+B9Reg8GvcOQpDhYDgoQgUq/WdnVPRfGztlHXkTmXWLfH/JYpzxgYCWofbJ9BX7FFKk95ODsGeLTUxONyLt0tQHP0Qv1VmbRnxFDyUANUwGr4pvZWoDFZNo1Brk0wT7jeNWvL5vJhMLe35r6TJu++QidpqEHa8GRbY3PYNuAR3d1iziZXKR+r8YOal8K0oXGhecT5OWSso1DeX8NvPQBLju1j3t2CKLNTAMP23v9Cl/OrqNcuWYMKN4fZv6VD3w4HCcN8csUA/DT2PX2aSTTT0Fe1xpM8t3YzW/eiRqW5DMuM1+QVxmtiyxa5ps57apOKHrxKqvWYTWZS7hZKWHMcD5meSqmeayJE4nZ+yzbXjPXM7uGxOa3WIz95RV4h5P25ChOtPIxSqBfVoVn8rkB3yR3saq1/y7c2MfRzHu+OA4o12V9AagjKjbmTV9VCgjw+b2QnbDWIKAg73kbgA6NHpyb/JMpR+wHA0rhWMhOVscJKpIKX09To1gSUYQAf19hzSdWgit4qcl/krhhPT89qf/D6HcoQzWFX3f4JrsnR/yIO1gCwaKKzuyRi3Wsb6Xn X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f1381e00-3d64-49b9-d393-08dab2779b75 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 08:46:40.7107 (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: GV2P250MB0825 Subject: [FFmpeg-devel] [PATCH 13/22] avcodec/g2meet: Pre-permute quantization tables 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: vm+Zx12r8Wtv Allows to avoid a permutation lateron. Signed-off-by: Andreas Rheinhardt --- libavcodec/g2meet.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c index 7c1f8325c4..db427322cd 100644 --- a/libavcodec/g2meet.c +++ b/libavcodec/g2meet.c @@ -59,22 +59,23 @@ enum Compression { COMPR_KEMPF_J_B, }; +/* These tables are already permuted according to ff_zigzag_direct */ static const uint8_t luma_quant[64] = { - 8, 6, 5, 8, 12, 20, 26, 31, - 6, 6, 7, 10, 13, 29, 30, 28, - 7, 7, 8, 12, 20, 29, 35, 28, - 7, 9, 11, 15, 26, 44, 40, 31, - 9, 11, 19, 28, 34, 55, 52, 39, - 12, 18, 28, 32, 41, 52, 57, 46, - 25, 32, 39, 44, 52, 61, 60, 51, - 36, 46, 48, 49, 56, 50, 52, 50 + 8, 6, 6, 7, 6, 5, 8, 7, + 7, 7, 9, 9, 8, 10, 12, 20, + 13, 12, 11, 11, 12, 25, 18, 19, + 15, 20, 29, 26, 31, 30, 29, 26, + 28, 28, 32, 36, 46, 39, 32, 34, + 44, 35, 28, 28, 40, 55, 41, 44, + 48, 49, 52, 52, 52, 31, 39, 57, + 61, 56, 50, 60, 46, 51, 52, 50, }; static const uint8_t chroma_quant[64] = { - 9, 9, 12, 24, 50, 50, 50, 50, - 9, 11, 13, 33, 50, 50, 50, 50, - 12, 13, 28, 50, 50, 50, 50, 50, - 24, 33, 50, 50, 50, 50, 50, 50, + 9, 9, 9, 12, 11, 12, 24, 13, + 13, 24, 50, 33, 28, 33, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, @@ -250,7 +251,7 @@ static int jpg_decode_block(JPGContext *c, GetBitContext *gb, int nbits = val; val = get_xbits(gb, nbits); - val *= qmat[ff_zigzag_direct[pos]]; + val *= qmat[pos]; block[c->scantable[pos]] = val; } } From patchwork Thu Oct 20 08:45:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38848 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp46014pzb; Thu, 20 Oct 2022 01:47:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ryEJj6V0p6PVKh1kWBkSkQVSEbdIdmq6C4QN9CEic6ccpfINf1zObBB2GW0E/DOsSkBAK X-Received: by 2002:a05:6402:524a:b0:45c:e2c6:6ef7 with SMTP id t10-20020a056402524a00b0045ce2c66ef7mr11576207edd.421.1666255662612; Thu, 20 Oct 2022 01:47:42 -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 z22-20020a05640235d600b00458d43beac7si19962828edc.41.2022.10.20.01.47.38; Thu, 20 Oct 2022 01:47:42 -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=SEmFioSY; 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 5A58E68BE91; Thu, 20 Oct 2022 11:46:51 +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-db8eur05olkn2037.outbound.protection.outlook.com [40.92.89.37]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0CB5C68BE89 for ; Thu, 20 Oct 2022 11:46:49 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M5+PuKmALErtx+15stsOB/GuK37CkBLrcc0K9KwCoGdjveBvDYxD/BRP0KtReE7sFnskZNDXBhmFVUQJZAPETvZLZqiWhJ5tgD3Ycz2RJxEsFMIxQBHhhFuXOOkUogRgYqPMyyY/fH7x8hvP+Gnp8G5MtTg0WIQlBzs18sZ04tSEzq/ladq115LkS6UyybfRSgxCrNXUfma9bKP90muDxi2ELAvKJFtGdGTvYc7REnGP1gwzIqzNOB8NHWHEJhOlEFbsjLX8+LTHR2jKi+HzDvzhnV48cpJzWSAbybTZ7cM4hjlW1TDJINr4Pfp86Hr+ieooUjl/md+fepudUuyH6Q== 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=dU4vKqT6BLvgKM4uzKtdk53ZjoH38nwmlKXR80PUFuw=; b=S0WdqpVxRoRTlfxTl6kYj0x1qRMaym7SbAOgbUnGXhnRkr8Ir6BCbSBai0Q2fZRRNk/JzxhO2bMzYyBCx6VoqHVySms4JI+/Dr0BevUwgA96/Dg4m9oZ/cePxa08ypN10KwICzGOb/n2u8nn3lnYvUBLwOiT/fuac7crq7rSBMvs9OSDoFuwe8njexf6wsX5NwQtnTZH8pb1iFEUY29ptrnCCzsdmLh1YG87myDhjRIPLgnWLKVjBI/VB1NWiKhFaIBYZN5MmXcfoeS7R/E1nUsYfuzCmCoasEHOhprbenAxchydfJ2GdtDDEaHMdNIIO+vS+leIRbpTmI+zcmtfrA== 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=dU4vKqT6BLvgKM4uzKtdk53ZjoH38nwmlKXR80PUFuw=; b=SEmFioSYMKmFDHSvFAWim60ttuRh+eT6s2qDwznP0rGMVi1qp4qvyWUwmvms8YCcJVkNj4QAsCgh6Wmk+IAmpCIigpqEFDqXz0y1HdL0Sr1zDW5oM4xRiw46eCrzhLNxsyh39bhaPQimpVdv1xUp5TV11HkzzhE55GfS6ENUbykgHN1vbUjHqjcpzX9J57upTXPbckPjI3VgBSGne67Cys9bA0l6nEZkMGLdiMmxkt5Jx4uaGF527qybuXuydCzdYgeYHBcvH/c10UuWwIBOGjX2qrkYlNLi2+duw7ZVZJghfZhFeWrg3gsWKP8IFhNrSuD/c9U2+NS8fbX9wb8nNw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by GV2P250MB0825.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:aa::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Thu, 20 Oct 2022 08:46:48 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 08:46:48 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 10:45:32 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [UhoVZZoMXa6ox/ugDBmZEIxsOsaBwB30Jw4GclCFmAY=] X-ClientProxiedBy: AS9PR06CA0774.eurprd06.prod.outlook.com (2603:10a6:20b:484::29) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020084540.2378553-13-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|GV2P250MB0825:EE_ X-MS-Office365-Filtering-Correlation-Id: 3b9e65ec-b437-4a30-b2d7-08dab277a019 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3kEq9VXjGDAyurdVkDmkI7q7DWNiKYGeXDbQ/GFOChYuw3xkLmi8HB8fYNUIh+j6x90axFXXDfBsH6vyf3CVg88jgR7bvWFdiYKJaAeOUpZ3uR7EqTWyf3uh5jAbobgXkR4zIWAANU+xFVE0Es+NwwAXpwwVM3SObE9Kh1hla1HqI6IvkaEjoopq6G+Po0Xw6KLkjYQfypqtsYzAtGHHbf8F0Np13u2mb76ji2VCiFqNN0IEFGF4LTXDZPvfiMwYn+vSO2bZOHJtNoCrgBwfTWCaspLuJ4ghVsJaKSkekbcqTZHNnC2xMchxRnG7ViUH3KaY0p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W8F+NH4L93Rwpgt6sUEg7BlGf76waSrGTIUscsscXbdJdMDfqHnipnw3GqjQjiau4bqCnfkREt7glJqeKldN+Dur+p4J/bpsRvhC2QEiPgzRcKgSC6MMExXvpAqGl1tF+J+Qd0IKn4+VRQ1GYCDBQnC7toeqBn1QFbxORJwWYgEuCcTpATVJz9QlcRd716eNJmTpfJ5jMJxFQBbym2fOcPGE31mp50YLo1DSgARZFjFVh7BeLFeieUKr1GFbKmHDCUJG8DOZz3Wz7fJLWyl0HAtYibgjEL5kF0vEpL39evpT8mZ/NJXn3UQgPe2ShiDucKUXRZ6RWq6iYIXRiR/L4qRAw6bc4iK4N7ln/DDg5bplrcN8KySSDf8Q8/4snL/HqZil5VnMcossnLHxiK0AgnRZNQGUMu9MZdQjseKfXeASJJZmsS6SsqRTuzm5bBmgqcAEmPqizc9HTjVjIM+tY/Dq+1GG0q X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3b9e65ec-b437-4a30-b2d7-08dab277a019 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 08:46:48.4956 (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: GV2P250MB0825 Subject: [FFmpeg-devel] [PATCH 14/22] avcodec/intrax8: Only keep what is used from ScanTable 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: mMT8t7wzamTA Namely ScanTable.permutated. Signed-off-by: Andreas Rheinhardt --- libavcodec/intrax8.c | 15 ++++++++------- libavcodec/intrax8.h | 3 +-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c index f88baf8daf..e8e48ac1bd 100644 --- a/libavcodec/intrax8.c +++ b/libavcodec/intrax8.c @@ -25,6 +25,7 @@ #include "libavutil/thread.h" #include "avcodec.h" #include "get_bits.h" +#include "idctdsp.h" #include "msmpeg4data.h" #include "intrax8huf.h" #include "intrax8.h" @@ -576,7 +577,7 @@ static int x8_decode_intra_mb(IntraX8Context *const w, const int chroma) x8_select_ac_table(w, ac_mode); /* scantable_selector[12] = { 0, 2, 0, 1, 1, 1, 0, 2, 2, 0, 1, 2 }; <- * -> 10'01' 00'10' 10'00' 01'01' 01'00' 10'00 => 0x928548 */ - scantable = w->scantable[(0x928548 >> (2 * w->orient)) & 3].permutated; + scantable = w->scantable[(0x928548 >> (2 * w->orient)) & 3]; pos = 0; do { n++; @@ -714,12 +715,12 @@ av_cold int ff_intrax8_common_init(AVCodecContext *avctx, ff_init_scantable_permutation(w->idct_permutation, w->wdsp.idct_perm); - ff_init_scantable(w->idct_permutation, &w->scantable[0], - ff_wmv1_scantable[0]); - ff_init_scantable(w->idct_permutation, &w->scantable[1], - ff_wmv1_scantable[2]); - ff_init_scantable(w->idct_permutation, &w->scantable[2], - ff_wmv1_scantable[3]); + ff_permute_scantable(w->scantable[0], ff_wmv1_scantable[0], + w->idct_permutation); + ff_permute_scantable(w->scantable[1], ff_wmv1_scantable[2], + w->idct_permutation); + ff_permute_scantable(w->scantable[2], ff_wmv1_scantable[3], + w->idct_permutation); ff_intrax8dsp_init(&w->dsp); ff_blockdsp_init(&w->bdsp); diff --git a/libavcodec/intrax8.h b/libavcodec/intrax8.h index 9ef2fc3dd3..217ef75e04 100644 --- a/libavcodec/intrax8.h +++ b/libavcodec/intrax8.h @@ -21,7 +21,6 @@ #include "blockdsp.h" #include "get_bits.h" -#include "idctdsp.h" #include "intrax8dsp.h" #include "wmv2dsp.h" #include "mpegpicture.h" @@ -35,7 +34,7 @@ typedef struct IntraX8Context { // set by ff_intrax8_common_init uint8_t *prediction_table; // 2 * (mb_w * 2) - ScanTable scantable[3]; + uint8_t scantable[3][64]; WMV2DSPContext wdsp; uint8_t idct_permutation[64]; AVCodecContext *avctx; From patchwork Thu Oct 20 08:45:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38849 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp46034pzb; Thu, 20 Oct 2022 01:47:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7No5LiciqtGWRARAqEl9GaY75nYK2rQ0Zgm4+tKarDuMbkAIUYGGK/WUpu/mDYOcNanTpA X-Received: by 2002:a17:907:d93:b0:78d:fe7a:f1fe with SMTP id go19-20020a1709070d9300b0078dfe7af1femr10372385ejc.721.1666255666673; Thu, 20 Oct 2022 01:47:46 -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 l6-20020a056402254600b0045d189ac612si17956560edb.402.2022.10.20.01.47.46; Thu, 20 Oct 2022 01:47:46 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=eeyIiTiC; 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 81AE468BE8C; Thu, 20 Oct 2022 11:46:53 +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-db8eur05olkn2093.outbound.protection.outlook.com [40.92.89.93]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 56CAD68BE90 for ; Thu, 20 Oct 2022 11:46:51 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BtufkyvruVQ5XMvrM2vReUwlSPFFnYASdxGtj4b0oIKMQ/nI7aPBcRxuZ/WMwuGNaOniWw1cp82kXv1TAbySJj2mJfBqTOL7qm3ULnUI7aD9b49AbytK5SL3CHrK+jZLvpugeuv4AkFUcXF3bPRfxK9ZWofuwfaznhWdHGerK4avklOcTO+Pz7rf3ckIffcBcRoBAGckKf20cnbGmJKkSGVefBmk0fBBLTAqpo1wAqN0uxkwxMYcsIa9S05M00a5Aj5xeDpjd+mXti22boTOaZ8HP7yCTXnBdvhEDJYLDc6iF+af0CmDn82m3OfjLeC8/AXFdQ5V4GSROaOZoRBxug== 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=rF44QRlK0ucf0qGHlen7EUhjx1IXTKGdQYCu0AWT6k4=; b=CfoIbtNiM/XAHXN3rJDg6FxmCw5yQBfZvXkfzem4vXSe+sRbHJGaTwIR6p0zANAbIDEDVTqXXsWnyvTy0GEgZNHzBdVGpgDY5VhbWASx76Jipr1oWYq7+RSSBAZxfPw0WnSve+BQra8iwAUWduWP/wdqVf6V67itJK04EoPcqrAaZis/1ptqeULQt2UUHomUkPSb5fiT88sE081aa7Y9YMLgV7qiQ15gE58Z4olmtwV9HH2ylDXLLBvr6JXCi3acuqStkjXHXFC09NSy5n9iqg8J9eURCDC688GGKGA7NdhO3NrhwpGW5GsmrXcjEo5Zxzork65ZSaq9C2mUu3LLTg== 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=rF44QRlK0ucf0qGHlen7EUhjx1IXTKGdQYCu0AWT6k4=; b=eeyIiTiCQxkQDR/bsII/VxH6Njr/uj7rKRCnf29LNYhqmF9NxqCDK84Lf/83BHgEeRcXG0sPw1MoqTnq1w1QSDvdw7PqEL50rcqYgKQ5i7bmZHLK/Kt2CBnCqAGSqvHkWCnTfnS7wiK4D6VcdY3m/Sxt/7hehzyPDCHigsSfPkK/lEMsXa/9lxjC8MOUXCOXSlQwc1SCjok9+bjmo+EBsfurXuNz5LmD5+ybJ6mr3T/NCdO3AN5fYAq4luMDETa3kWQ9MB7zB/YogqTVkl+ekDCf5aSegyQ+d4gmlZBL38os8GYpiOpt2qwzoTFacKgZFa+JFCaTH/vTTirDIJNKQA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by GV2P250MB0825.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:aa::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Thu, 20 Oct 2022 08:46:50 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 08:46:50 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 10:45:33 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [wIENIC+ea38SwW4wspf5ccR2jpysEccEKri5e4HSkqc=] X-ClientProxiedBy: AS9PR06CA0774.eurprd06.prod.outlook.com (2603:10a6:20b:484::29) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020084540.2378553-14-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|GV2P250MB0825:EE_ X-MS-Office365-Filtering-Correlation-Id: a1461d25-3f9a-4d50-f719-08dab277a111 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmqqpqVHbY8r+ej275oS7ZbBXkpbG90q71hrVuVhHNAIoYHH/X7UkrJldaiYYQ2+2yPKNzjud592gCjDv7WeXercpmu/nXH2dAr+XRzFsHAn9XquHrNcgHkmhj1UYlV90zt8jgqy/pMjhUsPdaMy6BQ/Bx4EtoYJdYqOV0rMLcPGSa5G410miwoyP94Ml/wk4ei2/fnNdTG7HElnJlGGwE0+11UmXod2iKIu2gEpueoHkr3UzexxPxNQnJR/Qeqs3YM9TLBjZVKgXTibQLxjJLykhZq60guR05062JSGtItaGIqZXTQ7dBBclP4/fDOfjLBfQNBz3fydNXiarZISVudisQCKLRGvZgFTMFpfNqhz4OTG0ywtvMO2Bs4ZuPiZOZJhsI8dKzWvsU5U7L0K2zj6muuUd/ziuH9nmmbLDagxIB3QvcSlJRcUlksB3D1WvBQrvwS6cayXofg+V8NGQZBeuIqMMw0/nQmpaCSiM2+P6zW7kG62EztEsTcntPTmH99Ow1mIUbkRlzGed8zhMBrf5CnJSgijq0ISQ+IEFk0vF/8KRmNJSvuXCTiDaPE0iNtuSFvc707k6okeNxVUrB0UuvQJIkzOyFir6SuStRRGONIj9EYixfd2s5MV1iLmFdiM3FprdkZrgLiNG45pbhE9td3iH7N33pyormW9LD8aDw/gXXpxzpw/mR4lc2OICtLQhMkyvfEjOlaKaQ9EhAKUK4KDn54418SAfyVF3uTMGgyrpB1474R8QuvFpjy1Doc= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pmEZqzss0eK5m+byYdJAMo7U14yqo2sq6ysU9dwgieVYG6MgdQgAK/+dihUF2qTPgUIM9U9TglHqKaYe8jUwT3bmT176bzLRBoKQkd3iNQxIMmiAw/weuj9u7O+N2U8qSl4Q2uo+Q+XlzWlErexF0mNUDXIxyDuJCnKoEkPgpcovCixI5N7cKY59i11J3qobecuENGL3RGc9u/+EaaweTQshlrjq0oLuMFSKrjKKnGo40K6MlwO+FlknJCwSE2g8ZanPHV6Kh+bb1tB/K1xMTmx3hXoj9CDKGVbhY0vBUtu+AITIWCxzuDz/Vet9sFKS5gSrwyPENwf7p1mNb+Zw+XXng9j4CVFefZoqR/wsaDce/ajgfSKcmfHQmR+dDxDYo8k9BvsBNVjowuP8ZzOQxMgRwZCONVNVBALPHcfRL5c7HvrY3PLa8fcHR1WpVedxSyZolZUsW7RjO/6a1SbrPjcVE6dsMFrBw6XKkqd0Uple2kSfDkq1rIr1509J8aAiw7U0l02Ynr9TQER3nFj1b/KhldDqz5fQ3L5vZgZUHMktu8KmNt0OiJ/lTerevpS5n1FBNenqK7aStFhbkNCA1vaty0haF2sJ3kuiavIpmwCoGT7VqnzU2HZSz5PJ6kR70Lf7KrG9PK77IBmU2+iTjIywfgOEGv7lx81u31eTjJTEcFuAAA4iMwl6yZX9ZdQy X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AtUjZ4QYsNe8aGECZQ76QDz068+aQKw/7uCf4xmQP1IMQzvuCGxJns5OkXIPKFF/BjwCX1ubal3iFFyF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lSboMUJDoEr/MlbJ3hE3S6CUPvGvBhSYGyE7sQ6gNlimc5glQ7FwfHtaCqMbD2kPonZORfHhuzXddSOquTFNN1HQZKflG4m6ZgtSR+wmmsRFpbllWF5PtlZhwLm6W/f0SvbmHIyGZdKv+vTB9PNDBGeNW1EgeKIqXUCP+IBKuUzJC9hrRKDxcsZq7D20aCgSkK X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a1461d25-3f9a-4d50-f719-08dab277a111 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 08:46:50.2035 (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: GV2P250MB0825 Subject: [FFmpeg-devel] [PATCH 15/22] avcodec/mdec: Only keep what is used from ScanTable 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: ugmdfiaPwdOM Namely ScanTable.permutated. Signed-off-by: Andreas Rheinhardt --- libavcodec/mdec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c index f27cf84122..f3f1387d59 100644 --- a/libavcodec/mdec.c +++ b/libavcodec/mdec.c @@ -44,7 +44,7 @@ typedef struct MDECContext { BswapDSPContext bbdsp; IDCTDSPContext idsp; GetBitContext gb; - ScanTable scantable; + uint8_t scantable[64]; int version; int qscale; int last_dc[3]; @@ -64,7 +64,7 @@ static inline int mdec_decode_block_intra(MDECContext *a, int16_t *block, int n) int level, diff, i, j, run; int component; RLTable *rl = &ff_rl_mpeg1; - uint8_t * const scantable = a->scantable.permutated; + const uint8_t * const scantable = a->scantable; const uint16_t *quant_matrix = a->quant_matrix; const int qscale = a->qscale; @@ -223,8 +223,8 @@ static av_cold int decode_init(AVCodecContext *avctx) ff_bswapdsp_init(&a->bbdsp); ff_idctdsp_init(&a->idsp, avctx); ff_mpeg12_init_vlcs(); - ff_init_scantable(a->idsp.idct_permutation, &a->scantable, - ff_zigzag_direct); + ff_permute_scantable(a->scantable, ff_zigzag_direct, + a->idsp.idct_permutation); avctx->pix_fmt = AV_PIX_FMT_YUVJ420P; avctx->color_range = AVCOL_RANGE_JPEG; From patchwork Thu Oct 20 08:45:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38850 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp46099pzb; Thu, 20 Oct 2022 01:47:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6BXuqXV7tlZkU5BAGSoFxttXqA1JSXrIC58gnSteeSISEbvu6CmGGTgRDSXWQc9wq4SVxO X-Received: by 2002:a17:907:7250:b0:791:9093:47f7 with SMTP id ds16-20020a170907725000b00791909347f7mr10047954ejc.278.1666255675396; Thu, 20 Oct 2022 01:47:55 -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 m4-20020a1709062b8400b0073155abc1b8si13705697ejg.154.2022.10.20.01.47.54; Thu, 20 Oct 2022 01:47:55 -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=OG4XPO3W; 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 7A74168BEA5; Thu, 20 Oct 2022 11:46:58 +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-db8eur05olkn2073.outbound.protection.outlook.com [40.92.89.73]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 76D0768BE95 for ; Thu, 20 Oct 2022 11:46:56 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eSE07WwYZv58zllb0UAm7rVj03LfQjWMVEKv/67KlJgYvTXbyZFOGQJdYEy84Nh9lUGcLEfxTCj+ScESHZ4Dx7vCYpBk7AcNZ6LpJvg7n17FhNZwru7SfL8V6027wFg+4nInB/OIxyLgPBckjpdIBnvVdOxEuGyHf3KxMrsd6tjFWZQUCHpfG6iGMNydaZ/I/rZ9U5647yG5VZo+YSn0RZd5ghRal96KQlaSImRtFUDRdwUYcuxMfQQxKKBV6B5+xXTiRULtpIyijzWGyVNftSPHmw+j55dbp8/ndtZdhsHCtCuykkyi00+UbC9IpG5nhiTFNnLK3jwGhidFC4X65g== 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=0azkugzIJX4qYf8vf0aXB7rD3ARzOIJCFmIEwLQGB6Y=; b=Wrr1nYuEQ9KWK5GK3bhGOu3vrdIHqt39+Ksv88C1ha/7FKB46pygLzRmvyUKL8mwQrYt2yGis9P8qBEWbwS4TGUDseWtVGGgx5InO1PVC9xadn9jUuwhN6m8cG2oo0HKIotLjQCuS15zluYxvaSL9gf0HCQoMyOXM8nCvQc8SX3cP2c2pM69dtpa0CKrCDtd2QeyqzHvKTe1Pe1I/IKho6yUM/dbuejYD8Hj3gcCq9ssrW9PFtInGENbZv0fkDKoIN2VFVZfQw2q+8xmB3t50nmtZ2BqKGpM4gMwVG2sRyhqS9tBuTmFZ0mUru/lQLljhvMM1qqxsIDDb42DoUHMDg== 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=0azkugzIJX4qYf8vf0aXB7rD3ARzOIJCFmIEwLQGB6Y=; b=OG4XPO3WZ6J394i4giD9l7uhaZioSd0WGobRWNuc8EsBQQwNbNtLSr/pdR26oysUN9kg5iUwtCpA5czL2/W6Cdzku2kBGLlWSMh7EwLCEyTKT1nDhmqheik1IPFtEcpwnSASGjxiuca5J/v9vpuIR9/PppJdA7+v3unQ0kOr8hx+kaWXSCUH49sCr0FvCRR4y6ZmWSN8CyUdHbh9IEkqVzaDdjb4kkWYVEeyxEEKk0AggO3PnqjNla4I7I1LN02IxfGnOYFUTQ4ApFohefHV+k0rqKZywInV9KrfZwy5Ys+6TpJcL8Ao7itOqHs6BUdTnhL+2RQ66kJ2PhJ3wroMYQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by GV2P250MB0825.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:aa::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Thu, 20 Oct 2022 08:46:55 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 08:46:55 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 10:45:34 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [/+6tPCmK91JsVbjnU670mpcv/i/1ASp1UK3d1kvSPUY=] X-ClientProxiedBy: AS9PR06CA0774.eurprd06.prod.outlook.com (2603:10a6:20b:484::29) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020084540.2378553-15-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|GV2P250MB0825:EE_ X-MS-Office365-Filtering-Correlation-Id: 1ba59634-9015-487b-9c61-08dab277a3fe X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3kEq9VXjGDAyurdVkDmkI7q7DWNiKYGeXDbQ/GFOChYu8uhpH8Y86WVeK3KpuKAR9piXCj2ApmLCex1lYqsrhwGUTVPdvziKnIHanlQRwCmawxfh9jIHpy1EqV/psrbxUrVGUTiCtWUS9kJGYgmnItXFs9z2rbUhTyU61Y0VZULw8wBpgLBreeD072k2D68RjKgxcptCdCFCzepunnoY8QhUnuK0ZL18RA/LU32PNSGP4pxrVWTbcSwsPZ+94zQUAbgtRK5WsAari/pEdyckSFwjEpGcMWpdl8iuwYOGJlM130IOXi7NvyxLGkiCk4xYWVmyHlvEv01vosMM3F/iwWIXZIT6p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hce2Ga8xw7fyvetOoFjwyyraCija2zpDU0eo3QbKHr/0faJ4fswkrr/ug1AzH0IqRb8L8miovy5yP7ykIJYssqbh2jSGFjxb/i6+pIftlfWIlrqF+8+ucn6WX55dZInpJ4ktv6lil8c+/8m/0VvREv1iMXDw+yPTSKKQ20pr/XD1UIaecNQiPJ8qlv9FFEDmpqsuXEre9SZ1fMXFKfwhXcSRUr8DUhNKL3yKGNZ048x4aPytKsClitk1PDp8hpYLd5qiehP8F1pwHYCuTHRSM+Po8S8N2i477duir0qONmu6M1aJtURUaRijTTF1dC38LPCXjkqGrhAM3lqRXZpFp8yJSph7dQ02DSiGr2cC6ma5bqht2mDNp5t4m/qFcdrvYbmKVhraTh66l/oFZkBDRuT6DE/zakkDf1tV6PY9Sdor1H X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1ba59634-9015-487b-9c61-08dab277a3fe X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 08:46:55.0436 (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: GV2P250MB0825 Subject: [FFmpeg-devel] [PATCH 16/22] avcodec/mimic: Only keep what is used from ScanTable 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: T3rulQjYvtN9 Namely ScanTable.permutated. Signed-off-by: Andreas Rheinhardt --- libavcodec/mimic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c index 74eaa7d043..153bd061f5 100644 --- a/libavcodec/mimic.c +++ b/libavcodec/mimic.c @@ -56,7 +56,7 @@ typedef struct MimicContext { DECLARE_ALIGNED(32, int16_t, dct_block)[64]; GetBitContext gb; - ScanTable scantable; + uint8_t scantable[64]; BlockDSPContext bdsp; BswapDSPContext bbdsp; HpelDSPContext hdsp; @@ -137,7 +137,7 @@ static av_cold int mimic_decode_init(AVCodecContext *avctx) ff_bswapdsp_init(&ctx->bbdsp); ff_hpeldsp_init(&ctx->hdsp, avctx->flags); ff_idctdsp_init(&ctx->idsp, avctx); - ff_init_scantable(ctx->idsp.idct_permutation, &ctx->scantable, col_zag); + ff_permute_scantable(ctx->scantable, col_zag, ctx->idsp.idct_permutation); for (i = 0; i < FF_ARRAY_ELEMS(ctx->frames); i++) { ctx->frames[i].f = av_frame_alloc(); @@ -250,7 +250,7 @@ static int vlc_decode_block(MimicContext *ctx, int num_coeffs, int qscale) else /* TODO Use >> 10 instead of / 1001 */ coeff = (coeff * qscale) / 1001; - block[ctx->scantable.permutated[pos]] = coeff; + block[ctx->scantable[pos]] = coeff; } return 0; From patchwork Thu Oct 20 08:45:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38851 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp46177pzb; Thu, 20 Oct 2022 01:48:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5uggnqE/IAF8infJtVkqsXEMe1uAOzMtWfIlEJk2ALpwBz+yh3H9zr5TIf+wcApta2o3Lp X-Received: by 2002:a17:907:2d09:b0:78d:4240:a45e with SMTP id gs9-20020a1709072d0900b0078d4240a45emr10101558ejc.350.1666255687433; Thu, 20 Oct 2022 01:48:07 -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 rp8-20020a170906d96800b007413f3cdd18si12851389ejb.238.2022.10.20.01.48.02; Thu, 20 Oct 2022 01:48:07 -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=Owl2nVzm; 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 6602C68BE96; Thu, 20 Oct 2022 11:47:00 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2052.outbound.protection.outlook.com [40.92.91.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 490E468BE96 for ; Thu, 20 Oct 2022 11:46:59 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VgEYjHQgz4qyhU9Td+adAoaoPVu1yo5R5kxDMfrQTwNXBmBS8SgoxxF00gkWGF30zs+GQc3W1Zwf85pzkZ5pRN5F/lh2bhg5+K+weaFV8Ztvur8QkxDlnLQV36kUHC7ZkoFjHTXHlYZofmhdnrrEHIPW45cKh8MvQPARCff1QvoQKSNZ4yTwobIGwTjay01Pqts0EZYgl7cDJgYfRG6y2SWmAfmNrTMZ5GvTLKqq83Q/d2M5V880t5e5gxrjoGXM0tFU7SAIhJ9fmK/bYpCDLC6/Eou2boD6VtgWqAKonYRm+Tg/Yh0M9ABcl/dPI1Rnlq1zl9FXR81Bfju3ywAh2g== 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=bZMRyi8IKlLlPZmS1oXJsatYwXkXSou8lxSU4NCHEWo=; b=kCyFYx61OQCyXjFYx6870XAwj/xBkt3aVzq2+FJtUHDLgPA3c/T+7UPTVgKaMEssIV9g3OwvGACeTVk8LP5BN7Qj5lmZ6luc4d7xHXcvpr+s8eOPnW2YlndKI+69Ybu0uFrtmw/LLNF9eNIOItnJ2p7UE6HiaqJhhtHbv8UMUVR98DpwdG6QWjl7NVG1cJvG6tkCzf1VF8yWHEpHkrfFIbu4K/FohNdPaBZMm4EWteD6n1Wg8R7ovgly3FWHkghfuGDAFdW++49zaQpicPVdnMmlRa623jcLjypbfkZbw05CF2VSlLM2ivWYj5tvi5HyxZ6XvYTNmwpG3LJjNYUjWg== 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=bZMRyi8IKlLlPZmS1oXJsatYwXkXSou8lxSU4NCHEWo=; b=Owl2nVzm5oIRFarK8zS82959Sie0JnvMBLzPwW+5j/PVEAit5R6a+VpfSKC8uQ1A3SQE7NiVJCC0sXR3iqi+KqIJRINF3rZz7HToF3clAV4i+VCkZUpzNAKF8wyzG4IgfztbhQFO7jKO2eCs+SavnCR+dzKVXGfInXj7XuvLQGO3V+Ujxhv/Gwxyh5ohjQWsXc0AYbl5UrYbtcxzV6RCWXsnXuOIJl8ZVjQ4Dl4sSm5aJ+be4T7ZnQu/E5lvo/JwQPtQSYtVT/creILsJfGM240XfwP2GFGvS31jHG3uHiAis5Y+3sQZDpMnDnXiNblWzlOCjRc8aFP7Q0dX8I3icw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by GV2P250MB0825.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:aa::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Thu, 20 Oct 2022 08:46:57 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 08:46:57 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 10:45:35 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [fsWvDDGcudxb6Kkw9VzZS5Vj60UxSMIWVoWddYTuUDE=] X-ClientProxiedBy: AS9PR06CA0774.eurprd06.prod.outlook.com (2603:10a6:20b:484::29) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020084540.2378553-16-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|GV2P250MB0825:EE_ X-MS-Office365-Filtering-Correlation-Id: b2bc1a58-9469-4b2a-2e82-08dab277a5a5 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmqqpqVHbY8r+ej275oS7ZbBKMNm3s84Zj1RBQbBmuWxCd7YX+WbFHQ9IQ3CEFoS9K8+Ljwl333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+abZBfr7lO6aOr9/ru8MBUhp9IaUCIc3WE2ydCCZfKQsu49uIptOTUeY//1Vx1azN7jBH5Nc5kvVIjO8VYlJOsxUxfqc5ngLpAS2tZAA59EIu65vh+4S0DVpiO7F3fPZQN9uLREWKDnq5OlE+TRxSqjKZiiGzgHNTsN8hWcxE+xh4z49idwhWRGk8iybnTcmypcPFscbl/7am73hdFyJZGusPKoBx75XnOD6P3jRvQox3Tfyffnr5So2eejVFg+hJ/1Y/aI4CCE2QYCY2+NTiTSOHzJy/lw1WRfzHh1UgKN8htatbTDE/mAsTCjYu4gWPXuFnTP+1EM32AaeOo00M64/OmvXgn622VV4fP0FOOAct/anOkvUjSIPypOWOUgkNbVmisg4Ajk5LOtO2wylxvtAItT6uGOFy1Lj49e/TMLBU6qYtQcS58Ux3AHSK8qOICgGpdCOoSFEwL9GUWXeSQgGqOmGVvNZwHiNObJswWJw+Jc486N3+GziSlXOMx7DXbzJtu6EUlCGzp63RFX46k9rzNyv7tJ8wl8rZimHFQw8+fIBBxLARrDdenbJ+tlKicgXZM2IogK8jzVB9fhkNd8/hdZ2XF5fpVcvzRFLt8FFvah/Wq4vTSA1DggtVgT4TXEuke6LwN4WkWftcnkpZmzrsp2kmOORD541c= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b2bc1a58-9469-4b2a-2e82-08dab277a5a5 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 08:46:57.8452 (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: GV2P250MB0825 Subject: [FFmpeg-devel] [PATCH 17/22] avcodec/mjpegdec: Only keep what is used from ScanTable 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: lD/k39l1B29e Namely ScanTable.permutated. Signed-off-by: Andreas Rheinhardt --- libavcodec/mjpegdec.c | 16 ++++++++-------- libavcodec/mjpegdec.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 3374ae71bd..d9df138ab5 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -115,8 +115,8 @@ static void init_idct(AVCodecContext *avctx) MJpegDecodeContext *s = avctx->priv_data; ff_idctdsp_init(&s->idsp, avctx); - ff_init_scantable(s->idsp.idct_permutation, &s->scantable, - ff_zigzag_direct); + ff_permute_scantable(s->scantable, ff_zigzag_direct, + s->idsp.idct_permutation); } av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx) @@ -846,7 +846,7 @@ static int decode_block(MJpegDecodeContext *s, int16_t *block, int component, av_log(s->avctx, AV_LOG_ERROR, "error count: %d\n", i); return AVERROR_INVALIDDATA; } - j = s->scantable.permutated[i]; + j = s->scantable[i]; block[j] = level * quant_matrix[i]; } } while (i < 63); @@ -909,14 +909,14 @@ static int decode_block_progressive(MJpegDecodeContext *s, int16_t *block, if (i >= se) { if (i == se) { - j = s->scantable.permutated[se]; + j = s->scantable[se]; block[j] = level * (quant_matrix[se] << Al); break; } av_log(s->avctx, AV_LOG_ERROR, "error count: %d\n", i); return AVERROR_INVALIDDATA; } - j = s->scantable.permutated[i]; + j = s->scantable[i]; block[j] = level * (quant_matrix[i] << Al); } else { if (run == 0xF) {// ZRL - skip 15 coefficients @@ -964,7 +964,7 @@ for (; ; i++) { \ } \ break; \ } \ - j = s->scantable.permutated[i]; \ + j = s->scantable[i]; \ if (block[j]) \ REFINE_BIT(j) \ else if (run-- == 0) \ @@ -994,7 +994,7 @@ static int decode_block_refinement(MJpegDecodeContext *s, int16_t *block, val = SHOW_UBITS(re, &s->gb, 1); LAST_SKIP_BITS(re, &s->gb, 1); ZERO_RUN; - j = s->scantable.permutated[i]; + j = s->scantable[i]; val--; block[j] = ((quant_matrix[i] << Al) ^ val) - val; if (i == se) { @@ -1026,7 +1026,7 @@ static int decode_block_refinement(MJpegDecodeContext *s, int16_t *block, } for (; i <= last; i++) { - j = s->scantable.permutated[i]; + j = s->scantable[i]; if (block[j]) REFINE_BIT(j) } diff --git a/libavcodec/mjpegdec.h b/libavcodec/mjpegdec.h index 648dd714e1..621f329f9f 100644 --- a/libavcodec/mjpegdec.h +++ b/libavcodec/mjpegdec.h @@ -118,7 +118,7 @@ typedef struct MJpegDecodeContext { uint64_t coefs_finished[MAX_COMPONENTS]; ///< bitmask of which coefs have been completely decoded (progressive mode) int palette_index; int force_pal8; - ScanTable scantable; + uint8_t scantable[64]; BlockDSPContext bdsp; HpelDSPContext hdsp; IDCTDSPContext idsp; From patchwork Thu Oct 20 08:45:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38852 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp46207pzb; Thu, 20 Oct 2022 01:48:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM57+f/t0E/xUkgvtJ86f/YQ+e/mMPg+AkE9nUXMaFt8beeDenX4hGiZkDUsUv14TNK+XYMP X-Received: by 2002:a17:907:3188:b0:741:4bf7:ec1a with SMTP id xe8-20020a170907318800b007414bf7ec1amr10307941ejb.448.1666255692260; Thu, 20 Oct 2022 01:48:12 -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 m10-20020a50cc0a000000b00458d94f1a45si14435471edi.413.2022.10.20.01.48.11; Thu, 20 Oct 2022 01:48:12 -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=W36iZLNl; 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 751F068BEB5; Thu, 20 Oct 2022 11:47:08 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2040.outbound.protection.outlook.com [40.92.91.40]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E597F68BE13 for ; Thu, 20 Oct 2022 11:47:06 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=merSqPfVq5eOClsotqh4JkdGvEoMXIlCNzt4TikVyrp9GOxndhubRLtSP9VJfDKmfA2Gi4x0AKgtIRGGqkS7JxdBAyAWCsxVYsmyjnTYLyROaxeNIeoSEQwxjr+GlWzrQZ7bZuOMmppHLS10POyoBXSTOUMEOC03pz2gPdeogoaXswUA5SNWXG6HD6csW2LlDHsjENmLVTvnNy9fGnbLcwBdU51t3BKynfEgUQK4wEV4Y0GBkXUNldIEYxKvtcUk8Av6HQHwuOJylfwhcFcKXjydm/k2l/s3FiDJWpvq8m5d/S/yXlSQWORp0EqfuQhXf/kElUUv4jgLER5scB+YIQ== 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=3ObfPsM0/oQfifIw1K0M8oPtAv9rfHi686e6v/DE9Go=; b=dhwxXyFAdCIFSW+WB4jRdQVDGIryHz2B1wSJz3EMXT0USNNY/64EwlTWhJelmc6k/xyQSGeDvsl9GANapO2OVkuz6rbqnIj5iWcZ0DyTKmrVnMmx3WAIw4qNu1E6jtFtwobZdyHGGqopdm95UJTgxDwWG7etsGNWDhChfIrkPzVDM8kOF7d55HYMMy849B8sR73JFiRAc+bGomFNX40SQLUZYJmD7pyoG7kU39R+mNRnxVi/nR2eRqWjGe7bVe1NkL2zCMZXflZcANoqRbaosXM7/9sJZ3yKrI5G5VnYzFJY3z5Um7MYaowjoxS9pMwD+U1agggjisQB70zlVlQCKQ== 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=3ObfPsM0/oQfifIw1K0M8oPtAv9rfHi686e6v/DE9Go=; b=W36iZLNlXdqLOnAFUt0xi4tkBHuqjwkOj6+O6hRLfZWMJ73PAneIQQ1+vJiOuxoSs3MJcctUg/10Xoi7YL3BAjhy3yrKfF288xin+WZJpLJPDJKEgCCYqlFEZ+h8mZvJ6cGGfc0DztPaS1zA7B1s+JJMW2WfOil+6I2dXF+Zb3ytSottzKABWVt3qo+bGqdMf4/2Bew4S2GOpKtL4/Mv/q6zfZnDMYu+2rnIhxnczwiDe9eXzjZmLD1c7ixgetmQvoaiB5ytM6nzzigaefNExjebqdmA6XnA7YdN1qWI16VJ80n9nxmAclRdClAR0VcA0V+fIvK9b/Pvi/9Yb+QKDQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by GV2P250MB0825.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:aa::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Thu, 20 Oct 2022 08:47:05 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 08:47:05 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 10:45:36 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [gIZ29ynX9vVMIcZ++hFruoMWpFt13+zCRx2SYQ1hV2M=] X-ClientProxiedBy: AS9PR06CA0774.eurprd06.prod.outlook.com (2603:10a6:20b:484::29) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020084540.2378553-17-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|GV2P250MB0825:EE_ X-MS-Office365-Filtering-Correlation-Id: 0bd52450-7b4e-4c05-7d25-08dab277aa44 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmqqpqVHbY8r+ej275oS7ZbBgCH91cB8Z1lQ31jsBtBvPITrtQuS+vjuvoHlwzPZq3dVzrbM5CAi1wTNC1CPXy6P1WYGJWg85noUcDbpg7ALqTptD8k06kFZD3CdJUNKsX041SFhHC6DotzRPX1tkOua19AvMH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Rg4oaJbDDqvCL5aG5X1a3eK7jii/xHbwgqHcJDuHwqDkyHtd/Ime6ml+UO0AWVIegPc3tBgSecBFqcNzEFYx6SZ4g1C7NFB+rZNa6JdXgp5JP3sRvV4+QrhI2ZPk9M8RNZN7mP+QxV647Vm3FGZOTt0CpEKUTB/v8ghNKcEsHpLLqJI74p+HqeKXeA1tymcOHuGG4ppqevnOyPqJFiM5z5t4n+oqfbgUzzYYVMe3w47w44WKLjhqjbT5DbT0mO8QeGD6mMspqgW0SGrHxGTD1FWe9YJpa8gIIjs7RQ7oOmBb/cwNDtfMNycpqz7tD/gmAzljT770uiMt6WKS6Tix8dTrxXlnfrZgs9bnRCjXEW8rPyigHQQ6a8+LneqY8EV788mfOsUWP2D03f3x5cD0vErnUjOLiaicCAw00mYYo2y3btdydJyhvfYP1e+U1wkb59Ut7TrRt9YBa9BDXah0gu4d2mo4k0rSTC3szOHxWa4ZiGA7HmpXbHezLsb0R9UDHe0tAU9mMmuq+gDMzMlysL2lmbIhHxaTG7QhI1yDCerOeZz8b1NvaICW2CHr6dfvHTso= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0bd52450-7b4e-4c05-7d25-08dab277aa44 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 08:47:05.5666 (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: GV2P250MB0825 Subject: [FFmpeg-devel] [PATCH 18/22] avcodec/mjpegenc_common: Only pass what is used from ScanTable 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: /GF4XwfM6qqk Namely ScanTable.permutated. Signed-off-by: Andreas Rheinhardt --- libavcodec/mjpegenc.c | 2 +- libavcodec/mjpegenc_common.c | 8 ++++---- libavcodec/mjpegenc_common.h | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index e56a466b36..eafe7130e2 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -81,7 +81,7 @@ static av_cold void init_uni_ac_vlc(const uint8_t huff_size_ac[256], static void mjpeg_encode_picture_header(MpegEncContext *s) { ff_mjpeg_encode_picture_header(s->avctx, &s->pb, s->picture->f, s->mjpeg_ctx, - &s->intra_scantable, 0, + s->intra_scantable.permutated, 0, s->intra_matrix, s->chroma_intra_matrix, s->slice_context_count > 1); diff --git a/libavcodec/mjpegenc_common.c b/libavcodec/mjpegenc_common.c index c37c964931..d1b0ee7e3d 100644 --- a/libavcodec/mjpegenc_common.c +++ b/libavcodec/mjpegenc_common.c @@ -58,7 +58,7 @@ static int put_huffman_table(PutBitContext *p, int table_class, int table_id, static void jpeg_table_header(AVCodecContext *avctx, PutBitContext *p, MJpegContext *m, - ScanTable *intra_scantable, + const uint8_t intra_scantable[64], uint16_t luma_intra_matrix[64], uint16_t chroma_intra_matrix[64], int hsample[3], int use_slices, int matrices_differ) @@ -76,7 +76,7 @@ static void jpeg_table_header(AVCodecContext *avctx, PutBitContext *p, put_bits(p, 4, 0); /* 8 bit precision */ put_bits(p, 4, 0); /* table 0 */ for (int i = 0; i < 64; i++) { - uint8_t j = intra_scantable->permutated[i]; + uint8_t j = intra_scantable[i]; put_bits(p, 8, luma_intra_matrix[j]); } @@ -84,7 +84,7 @@ static void jpeg_table_header(AVCodecContext *avctx, PutBitContext *p, put_bits(p, 4, 0); /* 8 bit precision */ put_bits(p, 4, 1); /* table 1 */ for(i=0;i<64;i++) { - j = intra_scantable->permutated[i]; + j = intra_scantable[i]; put_bits(p, 8, chroma_intra_matrix[j]); } } @@ -275,7 +275,7 @@ void ff_mjpeg_init_hvsample(AVCodecContext *avctx, int hsample[4], int vsample[4 void ff_mjpeg_encode_picture_header(AVCodecContext *avctx, PutBitContext *pb, const AVFrame *frame, struct MJpegContext *m, - ScanTable *intra_scantable, int pred, + const uint8_t intra_scantable[64], int pred, uint16_t luma_intra_matrix[64], uint16_t chroma_intra_matrix[64], int use_slices) diff --git a/libavcodec/mjpegenc_common.h b/libavcodec/mjpegenc_common.h index 5b13faae23..3501ce6bfb 100644 --- a/libavcodec/mjpegenc_common.h +++ b/libavcodec/mjpegenc_common.h @@ -24,7 +24,6 @@ #include #include "avcodec.h" -#include "idctdsp.h" #include "put_bits.h" struct MJpegContext; @@ -33,7 +32,7 @@ int ff_mjpeg_add_icc_profile_size(AVCodecContext *avctx, const AVFrame *frame, size_t *max_pkt_size); void ff_mjpeg_encode_picture_header(AVCodecContext *avctx, PutBitContext *pb, const AVFrame *frame, struct MJpegContext *m, - ScanTable *intra_scantable, int pred, + const uint8_t intra_scantable[64], int pred, uint16_t luma_intra_matrix[64], uint16_t chroma_intra_matrix[64], int use_slices); From patchwork Thu Oct 20 08:45:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38853 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp46255pzb; Thu, 20 Oct 2022 01:48:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5IaE0TFDiG2rTwRRq81GXD9EiuK4KuFTKzRX3r+Q78fWuG7Cg+FQwvQVjTGaqecCyQmtIp X-Received: by 2002:aa7:d357:0:b0:45b:dab5:9789 with SMTP id m23-20020aa7d357000000b0045bdab59789mr11501665edr.222.1666255700512; Thu, 20 Oct 2022 01:48:20 -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 y6-20020a50e606000000b004573c1ae3fasi14297609edm.285.2022.10.20.01.48.20; Thu, 20 Oct 2022 01:48:20 -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=B1Su4pnq; 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 6D34F68BEBE; Thu, 20 Oct 2022 11:47:10 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2070.outbound.protection.outlook.com [40.92.91.70]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F353B68BEA2 for ; Thu, 20 Oct 2022 11:47:08 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jL/ZsSYS+LNg0o5Jeg9bUbsOKrv5LwgXSINTEDyr42SIIA1FjXudv9lD0OOET21Joe8ZW7kNQHotsgYrOTgzJ4xaQ8jJeqAztlyS3XUP9LresbjQxiNabCMqrVMs+Q2Q2n5mmLjXAoW9aQI2lGI0N5oNFxAWy72vynjSd/jyYVQC5L23UWuKqKVWZ53vtfY3NoW9vcrRkViW7zLei0pNXyEvXYZ7u0S7+0OkhAnrnxtwLjF5inSAaWbDr+UZblcZ4h2fCcouiBbo0rLKO5OzwncmFcwQswaVWTYUv3fUbrXHx8ivQntX2j9+LaArz5Ew8w6DjOoPRAKmaklPBsrRUA== 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=LBRnfgjb2VIGiKPLcjMXcWPShU6GTDU2KppIb+htypU=; b=QdkPW4jwfttHYNmnMXnNiCLKuHq+HimvSSDU/lDG8j7s9RrbiVWYFY2R5vUTaJIBKFSWl4j2EoKuB0VChR2K+zl+7cOvfgSAwcKJg706UPFm4kxEiWIS1jVit77REJaSZxuTid+kMqX5g16Epa+cocV0h3r2EpbkZV32mP1fYiGVqHcHYsKPXTO0xQx8DRgpUb85vlTS88eQjRcuweb+EhyoHlApCcvH8K8njKiNry5B4QyNpZJHTm5jTPmtwOycnlSr8IGmHExim6UdjeRmcTWAbfTfDZEFt7AvqyThCzT9u6ukSksFSjMi39WKBg23lcazYVBCFG4XHYaKOkmh+g== 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=LBRnfgjb2VIGiKPLcjMXcWPShU6GTDU2KppIb+htypU=; b=B1Su4pnqt0Wm9dhVC7RMKHb86ToRzyfEfB8U+QHF/tlbCy+IpBAzWNSv5Y0qBDUPsIzXE6c0JMgqSv5pP+CJmL3e1vMkaOP0iMlRBjqxfO4OpyUnqBpEdoy4Ye2d/745h+rlFevgmjh3aQmLhoZbDQGbBxuyvDtaLFsgbeeYtHOiemY/QPnTEECp/Oqx6HNkmnXnW0mDbo44y6I5OO4/nIfi3ZtAS3ZkqeFBrQNsoVhQXRTKS3S15SmgfX9Ycq7fVUFSYj3Fl7Rdjb5WJMMxEufgazVQo/2mUBuc7GTgM2Unhmlv1gZfx8mv+WcDL3AjyGm0KbKYr1FK8m1RWpUTKQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by GV2P250MB0825.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:aa::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Thu, 20 Oct 2022 08:47:07 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 08:47:07 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 10:45:37 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [sqcf3xK8UDQFWqXeN8DtEw/10lnNW1VaJBxkW9S7mj0=] X-ClientProxiedBy: AS9PR06CA0774.eurprd06.prod.outlook.com (2603:10a6:20b:484::29) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020084540.2378553-18-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|GV2P250MB0825:EE_ X-MS-Office365-Filtering-Correlation-Id: dbc26880-9f18-4a7d-1d7c-08dab277ab3a X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmqqpqVHbY8r+ej275oS7ZbBXkpbG90q71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7PAKKDhaHzXdkroPrJaAfzTYyBfJKB/w1b4yrFx0h+bSjlaucYWXI8UP+pxvBjVK2vLa3awNjVLkkJceUf34gI37FIHsgLKcY2y0cNP7h8Gh5yIJw+tq00Bb+jI8FOoANQf6a/njtYFSgg5RIzanXLU/XTK54Wnj2jxHSb2tJ+TX7/IyF9vTzTehMwjfk1O+s7WUqRblHmLKRANM8xnCknQIOdjDwzCXg+JXMdYNDukU/pCcFrTbBY33d9igZqPof13KaB0BlcwxV99Gexssh0nbah5TnGjyOawHRu3cJlmEtWebziEN6PnkK+Gx7T5dY/qXghN+RNcB0AUrRE/WCkfbZhR69hamVg//Cq7BiJdqZUS9P6Tp593jTfMAYbE5Y5wlE4fb+y0558tZ0AY1lHQAGrRbn4Q2iJi/Dxt/GFM9AjhOz4MAW87qdYHhONRALDme72ujub5kSZMKNO6diNrqi5BvdF4m92yqSXGAYfWpvp4vecrTwYTc070QyKHylKgLY3CJJhoBv3kwE809GRcLlpeL4zK4Q/rciAZEyN/9UVmdsarn7XSduSH8bvpPJs05PnPTwm3l8YlxiNPExJUk/fcV25lLkRZag6WSIBrBpXwj6FeihGTjvutxuF7Cn/MuWncbL/vJA0IvGjMUp5OLqneHduuIEqVSrJwQcb0I1YVSbk5DAFWFAEeKohBP+sGsgCO4= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: dbc26880-9f18-4a7d-1d7c-08dab277ab3a X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 08:47:07.1786 (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: GV2P250MB0825 Subject: [FFmpeg-devel] [PATCH 19/22] avcodec/speedhq: Only keep what is used from ScanTable 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: Jf2uRXNv4sDX Namely ScanTable.permutated. Signed-off-by: Andreas Rheinhardt --- libavcodec/speedhq.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/speedhq.c b/libavcodec/speedhq.c index 6dbba02776..c9bb2e8418 100644 --- a/libavcodec/speedhq.c +++ b/libavcodec/speedhq.c @@ -54,7 +54,7 @@ typedef struct SHQContext { AVCodecContext *avctx; BlockDSPContext bdsp; IDCTDSPContext idsp; - ScanTable intra_scantable; + uint8_t intra_scantable[64]; int quant_matrix[64]; enum { SHQ_SUBSAMPLING_420, SHQ_SUBSAMPLING_422, SHQ_SUBSAMPLING_444 } subsampling; @@ -223,7 +223,7 @@ static inline int decode_alpha_block(const SHQContext *s, GetBitContext *gb, uin static inline int decode_dct_block(const SHQContext *s, GetBitContext *gb, int last_dc[4], int component, uint8_t *dest, int linesize) { const int *quant_matrix = s->quant_matrix; - const uint8_t *scantable = s->intra_scantable.permutated; + const uint8_t *scantable = s->intra_scantable; LOCAL_ALIGNED_32(int16_t, block, [64]); int dc_offset; @@ -667,7 +667,8 @@ static av_cold int speedhq_decode_init(AVCodecContext *avctx) ff_blockdsp_init(&s->bdsp); ff_idctdsp_init(&s->idsp, avctx); - ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable, ff_zigzag_direct); + ff_permute_scantable(s->intra_scantable, ff_zigzag_direct, + s->idsp.idct_permutation); switch (avctx->codec_tag) { case MKTAG('S', 'H', 'Q', '0'): From patchwork Thu Oct 20 08:45:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38854 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp46327pzb; Thu, 20 Oct 2022 01:48:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ioLJ5wNJ9UXurNBGItFyOvBIBuBRZpD4pbXOsb0UkLiY16XPUqQ4xgGGMKpmFXscngIly X-Received: by 2002:a17:907:dac:b0:78e:17a0:d1cb with SMTP id go44-20020a1709070dac00b0078e17a0d1cbmr10129022ejc.618.1666255712916; Thu, 20 Oct 2022 01:48:32 -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 o26-20020aa7c7da000000b00458ff6921e6si14710477eds.79.2022.10.20.01.48.29; Thu, 20 Oct 2022 01:48:32 -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=d7cqk9cQ; 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 C1F4468BE2E; Thu, 20 Oct 2022 11:47:15 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2030.outbound.protection.outlook.com [40.92.91.30]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 285E868BE2E for ; Thu, 20 Oct 2022 11:47:13 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T5Eof/+K87Cd1F/7mNCLiPmZFzo+silTSB8JXPrAaHHhoPc0oUYQbj23o5ni5HNWBJ6wMj/8kMAtHqDJLLEdpiQjJd9spg5pHDntRr9QtvxIfX+p9TTYf+tvLrFT3LuIWn4SZAdg51EOQguyYE6R/K1Vjjd3hM9+bRGN2xr+lE9T3bs/uIDcWYf89Lympg1FJUklsU57p+nwcs7aU2Pb8z9ZDEcsN8bty80PkGdD/kKeSQTeCvi5oz2wccSSN6UwbORS/FKE5Y/jWSXeYAk7/dBaggF44ZoqdqZe/z6+U8MRnCHccid6jiUVHxMCmkJjYs3Pr9jjbs4MZ8s7dpSKag== 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=M4gyE2st57cp4NiU6ChezSt0gXOz93NDTaipJznPRO0=; b=H4qXtCD7xk95GRCPCrd1Zgm5kjgeSVfffTCEjnuXa70++x0AzM80wI4KQqLY1U+HFfZZAZllAtxAH1h5NUQxjgO1AZlieRiJdJML6VFQjr5yeoco/B75CIHZ/Q5kIdk/j3KxeWAwRJICSgOwA+rdtcm52S3R8q9r7E4XrnffbodioZmLsI4z9hKY+Sy1DoRSvAv6S94KoQveNVRnBBvcnGtxYk3MEUYmqWtoQaCp7X2C++zSHfHemdz2K0edxy8nq/5Dvoh5NjjgpM5shHwXhTw55FN1Rv8BYVT9OriFPIHmrMK/bYaJ5g5/RTsC0VzWtwr3i9Oei+39i2941tWzlA== 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=M4gyE2st57cp4NiU6ChezSt0gXOz93NDTaipJznPRO0=; b=d7cqk9cQrKqr6En694jqvLzIL7gjOaJ4Q7TSTLU1/HxAystJQk1WO1AtME31y8JN9rDocvPq+40FeXannqElE5iz6DfuoYbZ7qAx19ye5BqATpJodEQhlVk8KqQpq/c2Cx86aeF70gTXivJITtZwp44Gye0yHKzs2mRgksME0q1Q4iiU3OHgzzWHECEhEzy/gGB22weSSqmLevci66lNftOhaQj5CwqqfT8dF3CfMxz05S5A7GHMjbIuOhDAE3gouBTRnsNMW5Oza4uB+Y+niRKJJ1mHJW5rc6/62WjNXx8VpQkibWro/taRI28PdCBwYnJ3W3lQXuQ1LQwVba2ySw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by GV2P250MB0825.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:aa::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Thu, 20 Oct 2022 08:47:12 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 08:47:12 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 10:45:38 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [DAPnvTL9SkyNJcjLY+HPW4BpgzPTiyAdFO3ht0vJPNc=] X-ClientProxiedBy: AS9PR06CA0774.eurprd06.prod.outlook.com (2603:10a6:20b:484::29) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020084540.2378553-19-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|GV2P250MB0825:EE_ X-MS-Office365-Filtering-Correlation-Id: 31395ca6-850b-4603-baf9-08dab277ae8f X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3kEq9VXjGDAyurdVkDmkI7qi6NEutkzyvcW3hJfK02tUunCBPu+D9fBV+wCAy3R29kpyvgoHokr5UB6qs7j87BWQP8QzqBqVE+7JT4iev6qzkzV20//B2LE+zbsp4Eg5LfZefje8u0XTgvwG1Fow6nZ6/dgcVD12ZBPz8qsw5+2rcm+vA8ujKtvWZQ2gJ2HH+AsdnX8RyCr51HDeG66no1n20UH2InI964qUCIatRSRD0Qa/GJtzlTBl2UZLBbqaBsLjBzB+HW2MKbha7UFDBJhLgL/EtO9vj9lwS1B3Y9xSFTeNYb/hV9UlyrcFG5NydMj+aH6WmgsYBJ3MxNTCNY08QOuojbV6A/DuR4IfuqP1l23KME1RP5m8DnRqHhTifvstT5uOleKri6VzEkC5GRusLe0M/h8rRjUPvVRVQR33KwaP1IVTT2LoFQuiipGNB6Khi0H+/GtHjkqaDKmQPLO7X9q7U7E4xAfCov2zXSR9ieGBh1NOVQd0A7Nvmfg1ASsFzJb4BV5Pbetl+Xl79eCWmvWNzVGo1bxXf5+ayuDwzgXkqecFFUdGnO9YVK147E5d09Spf3W5RLK3qcLzbtU+uwjJb8D90jaMCgpuYpzaz2gUf9NnpvSTdBdmasnx4i0TVH+atS9EVIPbZxq8Cq1egmcCJOO5wKt3JnQskVx3gz3uz3+elbT9oNR3rQdfCPA28gdsSWrpj20d+Lt4xS1FywfxK/AVu4NpXa8YDI0YUKhGOw3SDYn2dtiATlT3vQiYU13GkzEziefdQlDsHGY X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sRRv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-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 08:47:12.7572 (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: GV2P250MB0825 Subject: [FFmpeg-devel] [PATCH 20/22] avcodec/wmv2dec: Remove unnecessary ScanTables 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: FtFQKtvxlMqZ Only ScanTable.scantable is used for the abt_scantables. Signed-off-by: Andreas Rheinhardt --- libavcodec/wmv2dec.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c index f638b31cec..a70913134c 100644 --- a/libavcodec/wmv2dec.c +++ b/libavcodec/wmv2dec.c @@ -52,7 +52,6 @@ typedef struct WMV2DecContext { int per_mb_rl_bit; int skip_type; - ScanTable abt_scantable[2]; DECLARE_ALIGNED(32, int16_t, abt_block2)[6][64]; } WMV2DecContext; @@ -425,9 +424,7 @@ static inline int wmv2_decode_inter_block(WMV2DecContext *w, int16_t *block, w->abt_type_table[n] = w->abt_type; if (w->abt_type) { -// const uint8_t *scantable = w->abt_scantable[w->abt_type - 1].permutated; - const uint8_t *scantable = w->abt_scantable[w->abt_type - 1].scantable; -// const uint8_t *scantable = w->abt_type - 1 ? w->abt_scantable[1].permutated : w->abt_scantable[0].scantable; + const uint8_t *scantable = w->abt_type == 1 ? ff_wmv2_scantableA : ff_wmv2_scantableB; sub_cbp = sub_cbp_table[decode012(&s->gb)]; @@ -577,10 +574,6 @@ static av_cold int wmv2_decode_init(AVCodecContext *avctx) return ret; ff_wmv2_common_init(s); - ff_init_scantable(s->idsp.idct_permutation, &w->abt_scantable[0], - ff_wmv2_scantableA); - ff_init_scantable(s->idsp.idct_permutation, &w->abt_scantable[1], - ff_wmv2_scantableB); return ff_intrax8_common_init(avctx, &w->x8, w->s.block, w->s.block_last_index, From patchwork Thu Oct 20 08:45:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38855 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp46366pzb; Thu, 20 Oct 2022 01:48:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7pJ346VXuSCdb2DacJ1jJgAmzd6ndhy9omHeXYtcD5YJWJc2FdoDiJ1RQwLjyrcWa1aBHF X-Received: by 2002:a05:6402:1d86:b0:457:e84:f0e with SMTP id dk6-20020a0564021d8600b004570e840f0emr11113118edb.241.1666255719469; Thu, 20 Oct 2022 01:48:39 -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 ne7-20020a1709077b8700b00788a70eed08si16390229ejc.610.2022.10.20.01.48.39; Thu, 20 Oct 2022 01:48:39 -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=L0MjtZQN; 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 2DC8C68BECD; Thu, 20 Oct 2022 11:47:23 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03olkn2067.outbound.protection.outlook.com [40.92.58.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DF37F68BE3E for ; Thu, 20 Oct 2022 11:47:16 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gYafaAWV3KGx+TRQlyQcPznvtmc22DDyP6W8j8xswdabPOZkjKy+EONiUdjgDTTHzRXZAmK9gPGgCzcO4+nCK/pF5RjLM1SkUv206t155NAXLNYlNTX9XCIg/AxHKR29GMI5tG8kO8eAhv5jTkaKqZvX/7lrtAzkLrlIkbhx9I/3pxshHRKWup7VdXrI9lRHg8rAqUJjP/u/iMq6L8eju9oPhHVKQB3pi/t0JomeXsp/a4770v1+7EirT4+oeqrke+cvC/Jvnz6q3oxV/Rq3fZODOaCNSZSsBVvHrWKF5r1cMbEmOBPQtEWfG/yDZJJf6CcL0p6L8Cv1fChs4ajJwQ== 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=WeZLpdaJ4aUwkq2LWykSEkrxYZegq/sI9VcmoPYM750=; b=PUY5Mkpvu+noJkHKiMPl8cWH147pkYWWMRMI6/+CdXopE+EeFPK6uaYeRoJ5o5RVWuYq0rllDsBr/hv7bRZAgypD2UFcvL3jpFV3JXWy6skkt1coFoNQIWc//MoNRpy+Xydck0AM0hNJjI986UGyODcvTgLNmVEyozN5oE2EuZ3MOUudq7N6U9J+3o9Mxfsdej5KlWkVn/s/Vl4m8GEYSLC3bLerumHiK0+3jMx4aGjFS4GHzV3fdHSy4hUvhshAc1CXSTAtn5ehgq3I6CUNAzC/QyQcwYAEKvw1Wy6NnMl15A9RRYB/3YPHEfywT0F1+toFSdINuaFSAcAX2oX4Lg== 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=WeZLpdaJ4aUwkq2LWykSEkrxYZegq/sI9VcmoPYM750=; b=L0MjtZQNUKNENik81vCfURXiV2MqZ9ybaD/XelBk3LTh6fZcXzZnzkWZNvcjms/31R3nIwtvT3uHvVL8FO4znhTt/6N+I0DdFqnT590aOhd0ldXjEwjlmKYdMq4T8UkTAPnQtW74GbMOBBs3YeUDPwhavLQJ1m7kNBoHAkpEbXzvPKxfBDJF3aRrFeN53IttXzfiIvb7WoY5iaKmIkW2+Pu9X8bB5p1lSrEUPdt2So70Jci19okGS5lkM9SIuF36tigx1SK5W5b7ZTGst5NxVvtejZruB7bBl/Nyo+OIh6y1pJqX/6/GqSt/nCLTTY9hTozOqaZInPxZWRSFoBcs4A== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by AS8P250MB0393.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:37e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.29; Thu, 20 Oct 2022 08:47:15 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 08:47:15 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 10:45:39 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [uONl/sDDsuYFoiBSJn35xh7wP8wR+cOopV/lvpxpIxA=] X-ClientProxiedBy: AS9PR06CA0774.eurprd06.prod.outlook.com (2603:10a6:20b:484::29) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020084540.2378553-20-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|AS8P250MB0393:EE_ X-MS-Office365-Filtering-Correlation-Id: f994c64f-fb2e-420e-6df1-08dab277b019 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmqqpqVHbY8r+ej275oS7ZbB0BvQmlJ0dEycn5DlcywDtA6Y36LGPm0CnyIocATFP5xPsIB4fe5NrnUaoBZxX/DXQXmZlfFp4kVNQYOMIu8ZVIXQovVxYallnZS4MQY+TDPVWDFBdldt3e0IgddBi/raqMcVTFSxSlipIlvcV35k+t9ocO9Edcaqc1dT1l90QhKeawM8KT350W30jz47/dknED36DI1424lXIhF6gMgZZjlJKRNJlAazG2sbCoUVR0mBLVO8Qkzhr4zPDHXh8P/fK0FGRNDtdkTjbLza7WCK67v1QB39e2keVOF6VvREeQAZIT1vdHWBiyrhObd8J+ueggY1XiixVCX7bVrWZUuYnHS+CBdejW4aR7d4wH9z1czdbxmDoPl8l0JlDz85xlXkVelEGEmNTJalarXR7y9BaCRxiQLlUlvqfwcb1Z810uzYxR3HNW0x643NlpAB/hrTLukGiccqFaKgwtM9HVlhxYZIJQ0EYB2oijNVsv0ZH/pIbWN2uxGzSa7GyUE7Lp/nSK6BKqAEweq7H6yHrc4faNonKYilHy8ywOr5V00y8R3Pv6XkXi3Hf7grFSG+J3rgj+7KQfhqwy1kdj/n6OWyr67zwI4mL6GcvBrC8pSLJdg3FDpdXKY8Rg0sdcl/GpS1rvFJGKVRbc2sdHxITigA8nxVHGELbS1dl5Z9vjuLUsAlXUNo1yb9EdIyZRpFuFMFjHguGQz8Lcvuuhd3y4Sud2LDASgkvzayFm+IJ98PGLI= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DlpDFBAqfZB/jR6t+mk/FEoLUIcUiCGCjj1rcKbPNldT6QS564Nn7cmA7R00TnhEO7HWSK/m1padc9ysSkPKO2a3fT2y0/Zz8evXvzYlvzSMIhyJ+BiMAOVE9BckMQTyKPM6uEVcRdgxlY/hkaPxmRgDgyzLswzO9KaqtUIkvVmq+rrenJUn2oPkXMzYw0hDZgnFnKyDKgUxARJhLU8b/cwp+fO648vu9pxjtGUgDsaDSc5XCN+ltCrl+66TyatrtQh7HnINldHuXSFln2TaA9A/9QT1fBwiJzNDKm6FRopCTnGW3oNiVfDWvs9RGtCwWt5DMltj2jx/UqtvhEC+ofnQFf03Hxk/ADkombkHgTDuLADmWtHuQT7HpsEbC3i1pvx9r/bxKoS+ht6lvkHpEZygEx6XVFAugKulXZDNq1F4NQgI6a89izgOqAmZ0UfdlVEbJC+bPgyBCXLvEMfa9QFAPptI53lo5yCKCNe7YcqJfBe6+r/klC0zljavoifsT+0LZiYvJ4ePS1acOlniv4femd3fg94ez6XRdSxOui5K0L7UVWtrJq/5hTOTCaqAvnZWEZpapARi9NSxt1xvJrI3AU3hB1612UPb7sY6NKVzMMowh6FNpI4rD9nYaTD/SIGZY+GbHwPRe9NfgXEhXe6NXoHHKf9h4pxHwU4QvmyivSg0XXL+ioxppXiQAzex X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ct+ECmmIX9m35hYkh0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Bdrc6fkMJKNKPnCSbT4GMWgHTuohEl25desl9mLOXFrvZcTm1AvmqWKOsQv4OJrpfQ2sS/As9Ku6ljYaN7mt7vjYNUlQxdlmYNg7TaMncjvOoIBhxqcmgs1+KAxfhBXeSj4dmjAKQQ88xGc0BMqCr9hTBVtPdSTS5pP0ZfjX3XAo3CXHNabrquxK9Qakjt8e/X82JR+ivjHSsEDdc1HQAIoNFM9nbiAgSo0= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f994c64f-fb2e-420e-6df1-08dab277b019 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 08:47:15.3373 (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: AS8P250MB0393 Subject: [FFmpeg-devel] [PATCH 21/22] avcodec/idctdsp: Move ScanTable to mpegvideo 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: 390VbxjQnnFZ Only used there. Signed-off-by: Andreas Rheinhardt --- libavcodec/idctdsp.c | 21 --------------------- libavcodec/idctdsp.h | 11 ----------- libavcodec/mpegvideo.c | 21 +++++++++++++++++++++ libavcodec/mpegvideo.h | 11 +++++++++++ 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/libavcodec/idctdsp.c b/libavcodec/idctdsp.c index 50156930ed..7216afb094 100644 --- a/libavcodec/idctdsp.c +++ b/libavcodec/idctdsp.c @@ -36,27 +36,6 @@ av_cold void ff_permute_scantable(uint8_t dst[64], const uint8_t src[64], } } -av_cold void ff_init_scantable(const uint8_t *permutation, ScanTable *st, - const uint8_t *src_scantable) -{ - int i, end; - - st->scantable = src_scantable; - - for (i = 0; i < 64; i++) { - int j = src_scantable[i]; - st->permutated[i] = permutation[j]; - } - - end = -1; - for (i = 0; i < 64; i++) { - int j = st->permutated[i]; - if (j > end) - end = j; - st->raster_end[i] = end; - } -} - av_cold void ff_init_scantable_permutation(uint8_t *idct_permutation, enum idct_permutation_type perm_type) { diff --git a/libavcodec/idctdsp.h b/libavcodec/idctdsp.h index b286bc231c..7224463349 100644 --- a/libavcodec/idctdsp.h +++ b/libavcodec/idctdsp.h @@ -25,15 +25,6 @@ #include "avcodec.h" -/** - * Scantable. - */ -typedef struct ScanTable { - const uint8_t *scantable; - uint8_t permutated[64]; - uint8_t raster_end[64]; -} ScanTable; - enum idct_permutation_type { FF_IDCT_PERM_NONE, FF_IDCT_PERM_LIBMPEG2, @@ -45,8 +36,6 @@ enum idct_permutation_type { void ff_permute_scantable(uint8_t dst[64], const uint8_t src[64], const uint8_t permutation[64]); -void ff_init_scantable(const uint8_t *permutation, ScanTable *st, - const uint8_t *src_scantable); void ff_init_scantable_permutation(uint8_t *idct_permutation, enum idct_permutation_type perm_type); int ff_init_scantable_permutation_x86(uint8_t *idct_permutation, diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index fbe9884b4c..4326f7f9a5 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -320,6 +320,27 @@ static av_cold int dct_init(MpegEncContext *s) return 0; } +av_cold void ff_init_scantable(const uint8_t *permutation, ScanTable *st, + const uint8_t *src_scantable) +{ + int end; + + st->scantable = src_scantable; + + for (int i = 0; i < 64; i++) { + int j = src_scantable[i]; + st->permutated[i] = permutation[j]; + } + + end = -1; + for (int i = 0; i < 64; i++) { + int j = st->permutated[i]; + if (j > end) + end = j; + st->raster_end[i] = end; + } +} + av_cold void ff_mpv_idct_init(MpegEncContext *s) { if (s->codec_id == AV_CODEC_ID_MPEG4) diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 237adf2388..60d2ec751e 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -55,6 +55,15 @@ #define MAX_B_FRAMES 16 +/** + * Scantable. + */ +typedef struct ScanTable { + const uint8_t *scantable; + uint8_t permutated[64]; + uint8_t raster_end[64]; +} ScanTable; + /** * MpegEncContext. */ @@ -576,6 +585,8 @@ int ff_update_duplicate_context(MpegEncContext *dst, const MpegEncContext *src); void ff_set_qscale(MpegEncContext * s, int qscale); void ff_mpv_idct_init(MpegEncContext *s); +void ff_init_scantable(const uint8_t *permutation, ScanTable *st, + const uint8_t *src_scantable); void ff_init_block_index(MpegEncContext *s); void ff_mpv_motion(MpegEncContext *s, From patchwork Thu Oct 20 17:24:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38859 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp291148pzb; Thu, 20 Oct 2022 10:24:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ibyXk/YSzsBs4NgHUs2HLInugE/Ztp2RJLAuGWJKodPvXb6Odb+GI/TwrppSM4D4Qi5Yz X-Received: by 2002:a05:6402:51ca:b0:45d:539f:5cc with SMTP id r10-20020a05640251ca00b0045d539f05ccmr13242263edd.47.1666286685464; Thu, 20 Oct 2022 10:24: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 dn21-20020a05640222f500b0045d02c98c08si14647117edb.537.2022.10.20.10.24.43; Thu, 20 Oct 2022 10:24: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=maGAD6PE; 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 4A01568BDE1; Thu, 20 Oct 2022 20:24:40 +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-vi1eur05olkn2045.outbound.protection.outlook.com [40.92.90.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DF83868924F for ; Thu, 20 Oct 2022 20:24:33 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VZ0shZ6MyqeRajih+E/IlA7PjPIIhEyOyNQLBIyVXEEfdUiPzPfNV1axkRoBZdqOYxvcqAJsvSgG0F0b63mt0GLapHjObSYCpImqiPSRpUqtOoQM9GXfqKmu7EwvU9maP/5LQxMVqjx3F4CbxumSKB+Z0FJuFUWqceKPNbN9Vv27JiyJRxzOh0Cp3LxtUE5s1hXGYSHINVB5IGLl6ucuM+LKZnISi4ig4X+ZH3HFtiorOfffVCzUqGTEy8KsedEK5tJ+eZu0RPvVPsttbkhAtprG022M1dC/B5E5X7Q1qYcwoQiH6UiRiqe/B/VJfxdMGC8xUpukYWMsruSRMvYiYw== 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=BCj9HcLah5HR4ulL0vUaNT4Cs5u//OVo8u7sorIIMck=; b=oTLKPkShuoCCdFP0q2Oxv/PkVdbPkTKAA7x58J8TUGglBiTciGDeq2ilPuiZx8EmbHyJGZ8B0kl+HPTT3gVQsKruI289F0wI0Vl+JF6pP5WBAA18y8Yonw6g1jPNpfTf9FvmKfFkv74DSau1SlMzcEMEhKq9NzVrMO5Kv1RQm0WMOgeUyw8x4qybfUIMhUf8+pwQ/tfLGs5ryqF5xDT73A/bk7s/tnqBGhNl6DYUQPSSRQf28mYm0de9FL8iAg23Cx3Mw/NtFWyPo/+hq6Wv6Z/jz+uWye1Aa5xR7uOFbpTAXlWufS+R/r1XCKST9jmX2MSh0Hxhqwy0nZ6u4EiuIA== 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=BCj9HcLah5HR4ulL0vUaNT4Cs5u//OVo8u7sorIIMck=; b=maGAD6PEN8UPgAcdZx/6t5PSJ/5ZJgdT+NJvX4EamLcISQkUWZBzgce14WHv1m1rVtI1mC5wNABsTAapZ/2aOf9rPy7mGnzaFLZB5vx2vAoH3NT3tgfHwABSRXuTU7Dz1QHv826UmYnHXc5DGmewMmGVn9CqSddD5d9UPNxdq0ooaoghu6vWjkUKfQOWpI4TA0SJBKwicZzPljtpEyd/8Z9Vx1ib6D/N8r3EBAhp5ZLWhvrxy3rmz1MUkeouvZVNWRS/OCWUzLFgcxT6auHVMeYtQ9u0shl1d5qWg6sOdLOK0ChZ6UDkKwGIyCAcnbGruFFxO5cAptpjQmtlhXnKVQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by AS4P250MB0893.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:588::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Thu, 20 Oct 2022 17:24:32 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 17:24:32 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 19:24:35 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [xfnNoHBwYMRtFIPDLRxzAUxTxmPuIlv4rHSeK3gtNI0=] X-ClientProxiedBy: FR0P281CA0146.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:96::20) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020172436.2562731-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|AS4P250MB0893:EE_ X-MS-Office365-Filtering-Correlation-Id: 44571a7c-48d0-4bb9-0c7d-08dab2bff368 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmqqpqVHbY8r+S1RlsSwM0Y0ewp8bdrgUpE3GQyL0M/reRf0mV2JindTG18mfzlgLTreESz7CJQJbuYTAeK2EpciOYMz36Z3BV/36Jp337bSNNqSf1aIXTQRrkQi9YvRDLViTnL68vI5/HaGWs5Rg5Jpd1RCrcIu23opkWTy6OD2Zit16u30Ix8NZ+iWg3uh1mcUjnx2Db2EBWw9ryJChLQntihxfBXI7oBaa6LtdhPytz2pFOAU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cynyOJbesTz/J7n4sZoXmQilM+WDVuF2THe9qg+1y0A3+4PmChWNzu5LwlIMkFV7kLlbNbu+Vmc10H8fioML4qjiiFoyL5qpDxF2TgXYn6xM8CzNqL8am559QeWmwzS6CcQZw4pmYNhUGsnrpnGAG3rvLtA+/ywUpjSm8RwAHcl/rpCs1zCfih/3RlgDNfJaoqgnbB7D4l0bP2J8ZjYjeR8Zc8RZ11ypAH7uaPJRLuZ2l+hvzbf0yjYpuYZadn3JfUNKV/I440peNjh5ZXUlkIf9N7bbUhozfYbtDKZYaZaKfWPzWHuB4tV104G9KQD0+4RWW3OfEdbpv8pU/CDAEz8U8j7GiLsLeo/qN8k9WOryk6cyFZoJVKV/HLcnIgchEYtQxgZyasZ1XEfkOGjq04vLuOBHUnfoIhlXKkwClWv3mk+qxiRTqi0tFO08R2hBIpDGyhKxNC18ghpe6E7BeDN+zuDKFPe1YfCaQwNnBSpbh69YMtuxVCcWKSq4+b74oP3n4OeNLvsIs X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 44571a7c-48d0-4bb9-0c7d-08dab2bff368 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 17:24:32.1494 (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: AS4P250MB0893 Subject: [FFmpeg-devel] [PATCH 23/24] avcodec/mpegvideo: Move ASM-offset warning to its proper place 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: cYDXxDEHP36y Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 60d2ec751e..6adf724dac 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -77,13 +77,14 @@ typedef struct MpegEncContext { /* scantables */ ScanTable inter_scantable; ///< if inter == intra then intra should be used to reduce the cache usage - ScanTable intra_scantable; - ScanTable intra_h_scantable; - ScanTable intra_v_scantable; /* WARNING: changes above this line require updates to hardcoded * offsets used in ASM. */ + ScanTable intra_scantable; + ScanTable intra_h_scantable; + ScanTable intra_v_scantable; + struct AVCodecContext *avctx; /* The following pointer is intended for codecs sharing code * between decoder and encoder and in need of a common context to do so. */ From patchwork Thu Oct 20 17:24:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38860 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp291242pzb; Thu, 20 Oct 2022 10:24:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4eYaVoaDtF/pBfKRhCFsP4cBetC1Jh1BYnD/X8J4POqZR9Le0vaA8Ay/x709Y9CnR9lEx9 X-Received: by 2002:a17:907:6d03:b0:782:abba:936c with SMTP id sa3-20020a1709076d0300b00782abba936cmr11929588ejc.758.1666286697448; Thu, 20 Oct 2022 10:24:57 -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 g5-20020a50d5c5000000b00457f31c1a10si15494953edj.584.2022.10.20.10.24.56; Thu, 20 Oct 2022 10:24:57 -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=PTkpIHdV; 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 6190368BD67; Thu, 20 Oct 2022 20:24:53 +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-vi1eur05olkn2018.outbound.protection.outlook.com [40.92.90.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2DF0268BD67 for ; Thu, 20 Oct 2022 20:24:46 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M6uuz5IfWEDcqjoTajFwpn56CYpqm3yYveCkrf28o0+wGhRVOH64SEzg2kdsP5BID0bb65wbFq+oFQ3yfByEDcZTEg8TVx2FT/y4rr5EX5xLXHhCDKr8ajwZOuEuFyeWciMdmgW7IkF/RYDwPxRIrF2cO4/5YnkPx4Ci3E0b1ewYLHEjEFOzqE9MU75JfMqYWCcSBQNsyzU1RGG38r5ZeXNcKKm2nJM1/IaXIfbe/PKweq2S2SHA0bVYhE2FRHh+GHoEk/G9ceHga/W5ziffucXg4NmUuyZRRkuap8dsmBvGVSsLlR+9AGM44p5+x/JHuvVe5uO/D7LM3pcTDlevqQ== 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=decWP5J3aTxtaMc4A/qY6Urb2d1NnIEgaLzpzCVcE+w=; b=igdANwqb1QPuSFQUzr6tjeqKkpqiHzjMSBqSZ+4oz1jIxLDG5q6XJBmKE9lZeIwJV+GfkdOsPWevBCPLawne3DVyB6ahFuWC3PuvaCiZbqQ/aqnYle1gR84E6/ZpCwA6lnPO6X9pq561mpq8M2kSpkMEL8Vd2W+Jx8Ve92GQpDl94vkYZqwizVJZj2UBDWT9FCSZpGgn3Nuak/KmufjfuECFe05MLcK4Yo0gry34xpYkSpH0nxIW0QIQ/C7CUvPRbexuxY4DKzCYvy7H7zxb0jWWJvemUZsNOq34g6HUP3GiI0IhpmAnFanY63G6SnDqcKHwWIMRXxDBZwU6m2BvQA== 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=decWP5J3aTxtaMc4A/qY6Urb2d1NnIEgaLzpzCVcE+w=; b=PTkpIHdVwxNfssudOgh6YBEjAU3abtC5S5z96THdwnRWJstNDJXlf/Rq7J7wIUUUbeQXYg8Lmug52LSYLYhrgldwXFxnPwbHRDiO/6N28ApBX+gZQ8TfEGMpbzSl6wbTZReC8ekpELh/Alp+wbOn99CMmHGNXEt68hq3iS2nfvdQAC5z10hfqFh2GLP0aX/KQFhqpR6aIjr3njB+DbvbpTefcpF5SKnUQAX3qZbtnU2f+Bx91j6+PbHvqe2RlWcV3k49+Dek/TOrpBj2I9F6DYOvUUIqF+2a2HM/QDL7dR7PY+Th+oCbilWapsXGq2MDDpQApXlsntBmBz03zHKc3Q== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by AS4P250MB0893.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:588::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Thu, 20 Oct 2022 17:24:45 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Thu, 20 Oct 2022 17:24:44 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 19:24:36 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [EIzL+Og97tvn1HwM+tkwVpi/aspXAKay] X-ClientProxiedBy: FR0P281CA0146.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:96::20) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221020172436.2562731-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|AS4P250MB0893:EE_ X-MS-Office365-Filtering-Correlation-Id: 99cda896-130c-418a-d125-08dab2bffaf3 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3kEq9VXjGDAypV0hhYP5br03QWYT1bvE2KpRMqvOOU1DUgK5W8KMZSWrUsSJH3Spi1N64qcswkOFUcJqJnYPFnOtc+P9oxufEaJr31J12BElU0OM9W6FXNg91edNHb/t5Ass8E+4GZrI7uoiIQgHo3HTRaASYZ5dlyCTqsoO1382lu9CqddvO+43cpUNeU8iTIMw8Dzr1o1UIzou+CSE1iTWrtbJvt7o3l1y6NlWk+w3AFBtOCiTAk1F8XCYB8LOxUPy0UBCvLd5Nyf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SpEwlxjU30hAd0F0z36/qeOKZknFwmxZQYJTclrn9zqJH3ez+jNiMWBPow75xpaDoOIVN9L8HtxJEnKa40dtkrhRJ7CgZvOc9qDrOefzUWROz4DMDic7BFl+lOokEuSgE2fpLOT7cCsuGjEeHLoFJsJEpxeg9UM3e6tk2X1Ed9NFOdHRTNFuh8ru2pCSGrZkB2nx13jUMWhwvw7SGgCMhs9OmtaDPWjuL5sPSDP1wR6LDhuUv/1bq/G+KjLizvX5f+Dd/ntZL2l8VxGNhEHDAloHsHh4y+tqmX4wRz1zyj0favRkDyOY9muzSuXnU4MKoP/R9gNEQzxcBRBTmfjz9jD56WgtPEwlS59HFGpo12z0id7qnWB6viWUGr/8TzdGRiLURXZvT32UVTlbJpU6ZVzPOp0OpBcsmwnHewumg05upjAbHRyVCWKDqv2R1AWXIn0VbWqaqkt3b88LeBTpJOqjAvzMy2zA5dydlmM1GFtkQmPFtpHkaClTLzPejEs59 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99cda896-130c-418a-d125-08dab2bffaf3 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 17:24:44.8408 (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: AS4P250MB0893 Subject: [FFmpeg-devel] [PATCH 24/24] avcodec/mpegvideo: Don't use ScanTable where unnecessary 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: 2brFZIqpTEcV For the intra_[hv]_scantables, only ScanTable.permutated is used, so one only needs to keep that. Signed-off-by: Andreas Rheinhardt --- libavcodec/ituh263dec.c | 4 ++-- libavcodec/mpeg4videodec.c | 28 ++++++++++++++++++---------- libavcodec/mpeg4videoenc.c | 4 ++-- libavcodec/mpegvideo.c | 6 ++++-- libavcodec/mpegvideo.h | 4 ++-- libavcodec/msmpeg4.c | 6 ++++-- libavcodec/msmpeg4dec.c | 4 ++-- libavcodec/wmv2.c | 8 ++++---- 8 files changed, 38 insertions(+), 26 deletions(-) diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c index 200de8527e..2655d026cd 100644 --- a/libavcodec/ituh263dec.c +++ b/libavcodec/ituh263dec.c @@ -544,9 +544,9 @@ static int h263_decode_block(MpegEncContext * s, int16_t * block, i = 0; if (s->ac_pred) { if (s->h263_aic_dir) - scan_table = s->intra_v_scantable.permutated; /* left */ + scan_table = s->intra_v_scantable; /* left */ else - scan_table = s->intra_h_scantable.permutated; /* top */ + scan_table = s->intra_h_scantable; /* top */ } } else if (s->mb_intra) { /* DC coef */ diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index c4f268c534..6fbf4e4220 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -1327,9 +1327,9 @@ static inline int mpeg4_decode_block(Mpeg4DecContext *ctx, int16_t *block, } if (s->ac_pred) { if (dc_pred_dir == 0) - scan_table = s->intra_v_scantable.permutated; /* left */ + scan_table = s->intra_v_scantable; /* left */ else - scan_table = s->intra_h_scantable.permutated; /* top */ + scan_table = s->intra_h_scantable; /* top */ } else { scan_table = s->intra_scantable.permutated; } @@ -3258,13 +3258,17 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb, if (s->alternate_scan) { ff_init_scantable(s->idsp.idct_permutation, &s->inter_scantable, ff_alternate_vertical_scan); ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable, ff_alternate_vertical_scan); - ff_init_scantable(s->idsp.idct_permutation, &s->intra_h_scantable, ff_alternate_vertical_scan); - ff_init_scantable(s->idsp.idct_permutation, &s->intra_v_scantable, ff_alternate_vertical_scan); + ff_permute_scantable(s->intra_h_scantable, ff_alternate_vertical_scan, + s->idsp.idct_permutation); + ff_permute_scantable(s->intra_v_scantable, ff_alternate_vertical_scan, + s->idsp.idct_permutation); } else { ff_init_scantable(s->idsp.idct_permutation, &s->inter_scantable, ff_zigzag_direct); ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable, ff_zigzag_direct); - ff_init_scantable(s->idsp.idct_permutation, &s->intra_h_scantable, ff_alternate_horizontal_scan); - ff_init_scantable(s->idsp.idct_permutation, &s->intra_v_scantable, ff_alternate_vertical_scan); + ff_permute_scantable(s->intra_h_scantable, ff_alternate_horizontal_scan, + s->idsp.idct_permutation); + ff_permute_scantable(s->intra_v_scantable, ff_alternate_vertical_scan, + s->idsp.idct_permutation); } /* Skip at this point when only parsing since the remaining @@ -3432,13 +3436,17 @@ static int decode_studio_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb) if (s->alternate_scan) { ff_init_scantable(s->idsp.idct_permutation, &s->inter_scantable, ff_alternate_vertical_scan); ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable, ff_alternate_vertical_scan); - ff_init_scantable(s->idsp.idct_permutation, &s->intra_h_scantable, ff_alternate_vertical_scan); - ff_init_scantable(s->idsp.idct_permutation, &s->intra_v_scantable, ff_alternate_vertical_scan); + ff_permute_scantable(s->intra_h_scantable, ff_alternate_vertical_scan, + s->idsp.idct_permutation); + ff_permute_scantable(s->intra_v_scantable, ff_alternate_vertical_scan, + s->idsp.idct_permutation); } else { ff_init_scantable(s->idsp.idct_permutation, &s->inter_scantable, ff_zigzag_direct); ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable, ff_zigzag_direct); - ff_init_scantable(s->idsp.idct_permutation, &s->intra_h_scantable, ff_alternate_horizontal_scan); - ff_init_scantable(s->idsp.idct_permutation, &s->intra_v_scantable, ff_alternate_vertical_scan); + ff_permute_scantable(s->intra_h_scantable, ff_alternate_horizontal_scan, + s->idsp.idct_permutation); + ff_permute_scantable(s->intra_v_scantable, ff_alternate_vertical_scan, + s->idsp.idct_permutation); } mpeg4_load_default_matrices(s); diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c index 8e6e35b927..bf499a2206 100644 --- a/libavcodec/mpeg4videoenc.c +++ b/libavcodec/mpeg4videoenc.c @@ -175,7 +175,7 @@ static inline int decide_ac_pred(MpegEncContext *s, int16_t block[6][64], ac_val1[i + 8] = level; } } - st[n] = s->intra_h_scantable.permutated; + st[n] = s->intra_h_scantable; } else { const int xy = s->mb_x - 1 + s->mb_y * s->mb_stride; /* left prediction */ @@ -197,7 +197,7 @@ static inline int decide_ac_pred(MpegEncContext *s, int16_t block[6][64], ac_val1[i + 8] = block[n][s->idsp.idct_permutation[i]]; } } - st[n] = s->intra_v_scantable.permutated; + st[n] = s->intra_v_scantable; } for (i = 63; i > 0; i--) // FIXME optimize diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 4326f7f9a5..cdcf06fe85 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -357,8 +357,10 @@ av_cold void ff_mpv_idct_init(MpegEncContext *s) ff_init_scantable(s->idsp.idct_permutation, &s->inter_scantable, ff_zigzag_direct); ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable, ff_zigzag_direct); } - ff_init_scantable(s->idsp.idct_permutation, &s->intra_h_scantable, ff_alternate_horizontal_scan); - ff_init_scantable(s->idsp.idct_permutation, &s->intra_v_scantable, ff_alternate_vertical_scan); + ff_permute_scantable(s->intra_h_scantable, ff_alternate_horizontal_scan, + s->idsp.idct_permutation); + ff_permute_scantable(s->intra_v_scantable, ff_alternate_vertical_scan, + s->idsp.idct_permutation); } static int init_duplicate_context(MpegEncContext *s) diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 6adf724dac..7ba9af3923 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -82,8 +82,8 @@ typedef struct MpegEncContext { * offsets used in ASM. */ ScanTable intra_scantable; - ScanTable intra_h_scantable; - ScanTable intra_v_scantable; + uint8_t intra_h_scantable[64]; + uint8_t intra_v_scantable[64]; struct AVCodecContext *avctx; /* The following pointer is intended for codecs sharing code diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c index 455436e9c4..a0725c44fa 100644 --- a/libavcodec/msmpeg4.c +++ b/libavcodec/msmpeg4.c @@ -150,9 +150,11 @@ av_cold void ff_msmpeg4_common_init(MpegEncContext *s) if(s->msmpeg4_version>=4){ ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable, ff_wmv1_scantable[1]); - ff_init_scantable(s->idsp.idct_permutation, &s->intra_h_scantable, ff_wmv1_scantable[2]); - ff_init_scantable(s->idsp.idct_permutation, &s->intra_v_scantable, ff_wmv1_scantable[3]); ff_init_scantable(s->idsp.idct_permutation, &s->inter_scantable, ff_wmv1_scantable[0]); + ff_permute_scantable(s->intra_h_scantable, ff_wmv1_scantable[2], + s->idsp.idct_permutation); + ff_permute_scantable(s->intra_v_scantable, ff_wmv1_scantable[3], + s->idsp.idct_permutation); } //Note the default tables are set in common_init in mpegvideo.c diff --git a/libavcodec/msmpeg4dec.c b/libavcodec/msmpeg4dec.c index 05a7ed4db6..098fc55d2b 100644 --- a/libavcodec/msmpeg4dec.c +++ b/libavcodec/msmpeg4dec.c @@ -687,9 +687,9 @@ int ff_msmpeg4_decode_block(MpegEncContext * s, int16_t * block, } if (s->ac_pred) { if (dc_pred_dir == 0) - scan_table = s->intra_v_scantable.permutated; /* left */ + scan_table = s->intra_v_scantable; /* left */ else - scan_table = s->intra_h_scantable.permutated; /* top */ + scan_table = s->intra_h_scantable; /* top */ } else { scan_table = s->intra_scantable.permutated; } diff --git a/libavcodec/wmv2.c b/libavcodec/wmv2.c index 07a5d14f90..9772035b5b 100644 --- a/libavcodec/wmv2.c +++ b/libavcodec/wmv2.c @@ -36,12 +36,12 @@ av_cold void ff_wmv2_common_init(MpegEncContext *s) w->wdsp.idct_perm); ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable, ff_wmv1_scantable[1]); - ff_init_scantable(s->idsp.idct_permutation, &s->intra_h_scantable, - ff_wmv1_scantable[2]); - ff_init_scantable(s->idsp.idct_permutation, &s->intra_v_scantable, - ff_wmv1_scantable[3]); ff_init_scantable(s->idsp.idct_permutation, &s->inter_scantable, ff_wmv1_scantable[0]); + ff_permute_scantable(s->intra_h_scantable, ff_wmv1_scantable[2], + s->idsp.idct_permutation); + ff_permute_scantable(s->intra_v_scantable, ff_wmv1_scantable[3], + s->idsp.idct_permutation); s->idsp.idct_put = w->wdsp.idct_put; s->idsp.idct_add = w->wdsp.idct_add; s->idsp.idct = NULL;