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+ujV6JYGsN5PGlM8e8XYP41jypR4NbMtizvFPcPlWUWL9InpSdzRI0ch9oc6ANkvMqlFzFZFNc5eib3nfplmXpV4wFadyFr0vf4kyLA7VAQmpSI3MT9h0W80IM6SIBmoQqpIUqPGwwS+Ca3F7nBRMc334DMECaNDOjrJeSkhehJe51OLBP2MMdxOuGNOSKmkLTo2xAv2WarUvHV0ccmxnoWVnbPRjzkkxXEs7Mw8Fh6R+aAjlrio7qgpLz1clUCqU+bmzDkiX9dBL4NqvU5xVDjVOU5vxN/J179+pJ1qWqlYa/tLCEKf8ay29vHTkIX95nRwFohh4y+hCgGG73w31LfqJQuCWd0f3xUe0VUhJR/mKWnoeCqR6VnWVJFLTBKjvCqVpRNMGyj5K1YWXqmRidZy6AXvzYOryxtSXsHqf71Pqz75O+b/lt8uQ/GAOl++eenEW2jLA2eQwcnthbm3lmFzThZqK7qdtTFI01sFAPWsQQDJ0W1hEtrgVv1JKlhabb/3XiFBb6iw05OfDZTbPMrKSYtomQcVn+8BbE48iI6W5FUy5Gb2GYNN24YUzT2yYfEWgpbWE71yU9DZetlh+SFQlHzqqmEnv02qQ4gwkhr+3ge9Vx4yi6imhuFuyJhgUqf4sA0zQa1s3tnwdjZqEl3Tf5QaeTX3raS20h4AnyVORjDygAsviryGpt/mDPb+b0beHx63pnIrgi33qt9KTLOl X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: d73u/vkbAwkG0fJiQsa6p2a6VKeDAUgAmCRSMMMwjYsftMxdvGZMH+wicG/uQSS9/KkqNTQrDFlMCtGFnJwiSO2aKnaSdjrugblO3B3B474bTrT58mgjAYbhzuELo9fJh3UgrgZeNF1TqDHVLdBe03q3ufThLDps2XH11efWYj8PHhQMTgRTFn+Ov1kDvg+n2MfJzM3yo2MRyfpqLKIfJ+19wJobugN0XyTmUbahlHEFZf8ZIUybeTegiWfeyaYF+6AyfooS4UPKqVgoOQyaH298akf9aC2HEG8nhQqVOLe2VD8C1vhaA/CxAA3RTHcSMYTSzKbaN29lIK9gwgdDACahqW7jHVb/6Zatjn69mes1aDJTLXyTBfLtzsJMjsRCIRITOH/dUGr/BTpVFlHbb4eq/B3hY+XAO3LPZXCe4b3ZlSJGYPeqw3HThKglbCDCJIipz3q/8Kb48es/fhZBBwo/pAP8GJfWgk5qXCVL48ml+OtuFECq5+iZCYFZwJuOjkr/D8+Qhy+LRLfB6bW2OQsccatiWSM0K3xNwlIkS4ntKy63c7VzD2H6rk1OArj8hcw1lKpRYctXln+7Mf4AM09I0R4nZbkYLV9dMPW5CIHR0X3X0V3PpRxtYaqm7QS0dsTJQqTmj3uCB60SNHGfhsehiwFQPRW1jjZ/sP9g0v1R/5YT0H2hBgBUTIwL3WTH X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: w3kQBNFef2BSAggsSPL3YgJCppFML2kNdDAz4sxSaSgrFtkZKrYdrIeLNJROI3JBNg5Y/L7Rl2Gk/yTv7aWrX12yR5yuLXc+gnsgjLrbov50kw+7T47VbVv71ixNDYY0Q2IyXl+CiQsnOSHh/yUs6oMzAuNIO1gC18yONQgj+r35Z9RhIoip//QNTY4MCAcocvUFi1W5qglrJ7crcoZCjsYttDY8fZsJ1aoqnNd04Zvk3f3of23GuMUuoIpmHROhRIDg1cSDLL/pMzXeV8CUut96mE+GVebbCane+Y/Valka31t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-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)