From patchwork Fri Oct 21 20:12:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38888 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp956418pzb; Fri, 21 Oct 2022 13:14:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7AoirKJEBw2YRl1XPNm9W9bdrwxwueDO0STy3fjjT4PLs0BzeGMySQtiyhoYAgKZa6uRK4 X-Received: by 2002:a05:6402:5190:b0:45c:fca7:e07b with SMTP id q16-20020a056402519000b0045cfca7e07bmr19162705edd.327.1666383270680; Fri, 21 Oct 2022 13:14: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 hv12-20020a17090760cc00b00780e89ce0b0si21766764ejc.600.2022.10.21.13.14.30; Fri, 21 Oct 2022 13:14: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="ZebgM/0x"; 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 CB80668BF20; Fri, 21 Oct 2022 23:13:37 +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-oln040092073097.outbound.protection.outlook.com [40.92.73.97]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7269068BEF9 for ; Fri, 21 Oct 2022 23:13:30 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Knkj3bzUQP9FgIuK1vj8mvLUMHEqXQLm1tmr5zouzJFAsH/XDBMgfiWUedMs/vFbM+Pq8vbMxmEAgGgxhyBLjd3Zduc3sxc3uLcmnkt8uxykWbBpha1KHlgdPf2hOVTd9rmDN6MptFeCgoBoE13hwzkfD6qPUbVNqLiizzvu6XNXXAVrVen2r62N2v+suHkJJaLthfja/2u5Gvz+0kMfI1scbE6NhNplZ18zCVNJUuIo/rmX2ckgfzdRUStQmS9l9X7Sacl8pY5GjOFj/uaaKwF0nse2tcWfCrue19aKk9iSnhedyhmJ34679PfqLKFKaKKkZVGb4YOL0cg/9TLyZg== 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=t9tLdOSowXBGDhlir4LELUM/n4/WrfABHy/M7QIySeg=; b=ik86/J6Qje5UhDYAvGz6tAtbLtxP8/BvJiqwBY7mwXZ+IC6zHs59pz8sRreOtV78SNm1yQO3I6GI4Wr+TtwKa/PytVCp68AhSyGN3PUYLP9cbeL0JKYenTJro1u2yzdOGJJTeHue4UDqz8il4pFYqsRVyvd85jhQfSWZtyh5ygLcQuD1tfXTmuYAqAoaRy3w5+tML9b08TXDD1hlqcN2339T0IzExCIlcB4AyfzRCLaB2F4wkRgXg+YtmZAGkOCiu46ptKsx39hi1ebyW8z0ZBleUE+/e9o9eFlWT6ji2jCvX+m2rMlzcLBMKdv7bp8cdScN+4isQtNfxzJPRJz1PA== 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=t9tLdOSowXBGDhlir4LELUM/n4/WrfABHy/M7QIySeg=; b=ZebgM/0x2+CbeBOkAPPS1fMr90z00TNuS6Ce6l56Ja/GfiFLNPEGx54L5gyBye+4fiRZfVW3/FqWr0gC7t4FI3HEmxWPPJmHr1mEimrP8rF0cV+8CBRzxCrPQGxPs+DXMQeNJBbPTW/LhzYlFS84pIOtToiSrPNJZIAcpaQdBTyKN4oyK17eWwck7GOZZ94NVlmITOBO+yHPFdCGc885GsjzsgM0e3w2GnbxGbozs2/DmoEaZ6giblvssHm82RurBcLPOADUf3nD2o5nEUJVpFZbRwgChSS0ZnELjmPSkvoQ6A/e7h5It8DK37RXpJAxaAsAUQzemD2SwyWdU8n+yw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU0P250MB0818.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:3e2::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Fri, 21 Oct 2022 20:13:29 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Fri, 21 Oct 2022 20:13:29 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:12:46 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [BEjSEjd3Lz3VhYSlqJ5wvCwx6wP5ag8npgh/+QqDLb0=] X-ClientProxiedBy: AM5PR0101CA0027.eurprd01.prod.exchangelabs.com (2603:10a6:206:16::40) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221021201300.3565913-9-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU0P250MB0818:EE_ X-MS-Office365-Filtering-Correlation-Id: c2cdf875-ebdd-438a-23f0-08dab3a0b85a X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nnHDnbJ910YUAai4EXr732ZAE5assxEuU/fNPiASwg/6A67mCko+V7XoH+vDtjttFkTta8Y/ENHNppUY+piKQX2OaDb1NZ1dbV9wD7c8ZfX3ThhYeYJgaEVqIp9J+dUnGcQwTh8xkTeUIx6bvu2kunw4usbsTl9MRpxXISJ033DGbJqW1lQPxWVLvUEJ3kDDMNVrmL9g9JtGyxurfPQpCfd9K+I+UCN+8fgY98VQock86pstpq/dzdMCtrdFAs51UPr0hFdNchYq6+EY5J3Hfu06dxMkyGpmyfJyAL7k/tLibGggN5UcaEcMUh5fXIAaOFFmpKEEmpwC7HGjWZFX4YWp4fqdhLatJU/k/gFL44Y2MSUUC9KM7QC2AjSDPgc83RCWwHnrBMHT05m0B4lrNBzi+GbDDJmBO66wlOqaiaoRL43ZqkZ+xtYKcAxflh3lwmD0iZwsOICcE18mC6BiFfqBS4rb/R4pGcZCvjKz0C9Yu71No/wAxw3b0OWd8L46X/p2hwYRKAN2QmSGBq2WQWNqUz8EZ6b7/a95Kg2Twh6ImohTJYehuKt2n5mXnACiDir5cyxvWFR1JpLTDas+iCDx4qUCLjw3pyq7XkGUgAAhWVJl31eM7bsH8sH5JqF4nGp3rxVowoEfhIlKUocUtIwOwyeLMM4XaLvs7nqJDioBwj/K/tsDwchenPJoMrcmMtk/GPbo58IrxFb0Cu8L9CC1omfR03IOduAuo/9T29mYxInoW3LbXKI5jlJTV4qBLzRDHfnb6j4exTD6VI8F5c X-Microsoft-Antispam: BCL:0; X-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outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c2cdf875-ebdd-438a-23f0-08dab3a0b85a X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2022 20:13:29.7119 (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: DU0P250MB0818 Subject: [FFmpeg-devel] [PATCH v2 10/24] 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: Jz3KRBtgvOml 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..7cc4f94c7f 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 permutated_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->permutated_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->permutated_scantable[i]; level *= scale[i]; level += scale[i] >> 1; if (level_bias < 32 || weight_matrix[i] != level_bias)