From patchwork Fri Oct 21 20:12:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38893 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp957111pzb; Fri, 21 Oct 2022 13:15:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4cdSf+NPOAjSfuUK9fw+dTuJecJC9DdgnaV+vr9JA2WPUCHk6E2MEw24BoW5qp+9yqeXiT X-Received: by 2002:a17:906:cc0d:b0:78e:2c06:8e70 with SMTP id ml13-20020a170906cc0d00b0078e2c068e70mr16603853ejb.732.1666383324988; Fri, 21 Oct 2022 13:15:24 -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 sa22-20020a1709076d1600b0078b96068bc0si22908323ejc.79.2022.10.21.13.15.24; Fri, 21 Oct 2022 13:15:24 -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=gchAEq+C; 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 AB62F68BF4B; Fri, 21 Oct 2022 23:13:59 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-oln040092075058.outbound.protection.outlook.com [40.92.75.58]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 90E7668BF31 for ; Fri, 21 Oct 2022 23:13:56 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CMVwf5NzSPYPIYVlSZE2dRx07rtVSFf1tfbuFXzEiswdexrqH0LS0Rit3gIsWsG2xOSzW5cLf8ILNaZ+xLJg5apkuBdTeOyR9EJBBSybEX4jx5G3RcKV+kg8QchWVfEJgv/BUQROxJqnmP65r3EGUbgGlr/zCUrquS+rJNYeUpmOQ1kmLJMdIjp69dQXB7H+UW+uVZzPpWstnakltuYxC66pp2wxlUt+4+EuX6MNTR6KxWi1SDMUCERv3eD5WfVxOdIloCw7vFeFG/5ysAE50Ixpwnm57ZK/IQXu2yB6kaHMl5esKLr9AQoY6O2tBiCmI0Ey/3bCKVMMuNeDzQpFhg== 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=dYPziUoTYOd2ER7p9ppJ2N1XJBNJeqeTVhVPR5LIc7I=; b=NO06Qzn8gjMheDv18ruzumxf/dYOfC3tyvxiDyOFQBQ5JpBqVgfEpjTgdL3RUCM/z7WOSW6s5jN4/Kc+dgyHYwA59Oa0B13aV4pJJq1kuYp7y3ZPIQiq+MY/6asy7/4sAr7ZtI4uccAXtMTGXoh1kMHsEH4YdVeosb3HR8fjzqWnZpTtKnxwOYSNkPGUZcqN6JRvKnPOXJQrmZI66GrYa/OkUF+Vz1YtNGs/1ygV6oehos411EQobgc7HUjgrlbuX2w1ztF8o3LiGHQ+t0VUT9SzITZ8GUSxAtstg5yCx6q3kC+JmKkhf445RYhYvrwOah3CYcuPpugdVNDHxZ1TZw== 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=dYPziUoTYOd2ER7p9ppJ2N1XJBNJeqeTVhVPR5LIc7I=; b=gchAEq+CWYy3EGxMOZrjnHuJBiLKkIEGslTrNISpE9pBSZwcyEvaOiEn4vAd7NDBC9FskbO7vgXRGrDcryH9pATk0+wla1phEGzTtsJIWkAVqVtGDg2FGhrDvOV52CkSoHfCxImycHzY3i8c4x80QuTRlecaeW58bLDaSNwdwDSp8i1NNYtT+IoyYoAjEWPVPfTjXedK2mhBb2p0meQ682CTM/TW0ZVATxjd3M3w44vP0xCBAW0t7OhzmZ5bNiIWaSxRE8gNWYyYN4gRwn1TRiwk0XBOOtALz6Erb2pNKMn+m8YPNW5lMN868ljjuvkjv9wPXNN+7yrvjZmlfolY3g== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DB4P250MB1007.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:3f1::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Fri, 21 Oct 2022 20:13: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; Fri, 21 Oct 2022 20:13:50 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:12:52 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [Tkk7Pu+AYb0Kq0UhLcqdL6A2xy3VTM4xVZiOO++rhYY=] 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-15-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DB4P250MB1007:EE_ X-MS-Office365-Filtering-Correlation-Id: 9ee85c3f-14c6-4c61-f5c4-08dab3a0c4ce X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nnHDnbJ910YUAai4EXr732ZAE5assxEuU/fNPiASwg/6g3kJZppMEa5yglhbmq6yH6I3Wpe3buNAAUwKg/IUfClXm2KuNIdfnai69qIOMc7CaD+oaMDeCe5R9DMw8cHOedy1MofSDfsGh1n0itaT2SDxYa7IzWBw/YoOLu39Ys+vX0m0G9yLdkzNlsNdKPGE4YnI1rR+syMwz3khYmeX9NdtcOeIoWAIfvxBd4bHwjzqZ4crpYsCBfR35g01f0kbfco+w6NYa6dIxBpQQ+pBj9vYCHV4b4MyNc0vh/O1tQF309My5w3oxTfD5l3xjv/wVxYgVmPSs722jzW/CVPZpbLybT5/W7eKRmI1YM1rQnfQ4qd+K/ZuNd98lDwFAAHVzf4d4CDV+ATppSX1JYPDDwBtv2aGncCfFYrYRxRl9SJ+SoUYL/9UHUwz9/Shadth+bKOhWfYy4owHyQ0xcm2RxC8MHcxS/cKqKxaxfjACFLnUlw63zyobmlMe3U+rEz9QcLyx9RXozSyV/j1eF/XgRhzOpMJ/p9XvG6FBXam6POoofoL2qxXBFV+6GyClK5RcrsqAv1PO3Y82RQvT5mA/B7gwWdWTSfaZ5NnsxdfMpBU9PRfyMNwoxXpog2YiXFybtwK29odyWvu8QuYnTL4qP3yEq18RJ7vxFGfM9IBKVW7FpVkBpIxDGGCxOLxqa4YENK3eFAs77xUMiVmrJJJtM7Aj1J0z2h0spkNAkepQR6Y+auzYn0UjukA2+xvG9vlQkth5D2Qn1kN3B+vMYQSEu X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TgH43jVTeDTNRr79RNWHk4YiXTmPoAfFLFx4VA6xZgtQPYXVm81NdZWlRDnGM14simHem1VxizFYCjHEK1IHBK9eBnkBKXjJNIdSS1uPgezprSrdPVxLIEN3rhPQ8Yv1veu6qkjBueAcWc4UtLh8mEoZsTlmm7gCfywu5k0sRnJ7rrMu9bivj9y7LwQ+eg/aOYzBRFYrS13C7EQ2nRDDfHa5KsOD6u/cvrnZGyWcnbYatE6xJX/lZwppCogsqsJnRZhyRLrYyDT7TMvrw7aCH0DHCxR5g8MfxFlEbkPWofG5pUilaZhwnKXxs+almlUfFBRF+cJAHc0AsKAldhhfWgOihgfPg0r+skSFh3wboaw24lNMFHEeDM3EgPQXlN2naTz077bMuOLUZVV8/H9U9/9PVJrYiVW8tK4avgQsVj4gwyyN/78+nK+fJgIJJmzs2fdzUSdbjS78XXYswY1O+q6r0SyzlM+IFVGYwZ9A1Fu93zHz0RGlleNwWgvmNR/Mf4EBgfwQRpGbdcUtPJwcah16OriB6aGQo5a91QexNc/1WJ4tOgNj8Bo/HwNjDSbEgcAVGIX3JIgnjtXgw17WOdfwq28V5Fja3Kzg1v8XN1kQD811sse0VGz/nLJ7A/FNr2lqSsLzbKN5e9MQuCQqwAImJG1f1hz6yt2tjzIzjEzxQfidHiuon04m4T52w+yY X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QkTavcofekXUB5raIbnplrncNIsbfqSC16uHNH2cN1ASae0IyBRRd+nndikC9l6eYMphdWE/Uh6VvBBVqiXLhILsS6fxi6CMfP87oOKuNoUtvkVRvACCDtB3h+E6mSjCwH5gu/8d4AKgVik592jvi84aGIKDM6mtIq29btt9OjJCalsMbrn5P1o71ql2Hli07FMxrmO6eMe/n1NpQT+j3OmLkUWefgPPAZsh6ELpt8TH4kg08siH5Uj1f8eu7lzJvzvkQttNCPa8U6xt3G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X-MS-Exchange-CrossTenant-Network-Message-Id: 9ee85c3f-14c6-4c61-f5c4-08dab3a0c4ce 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:50.7038 (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: DB4P250MB1007 Subject: [FFmpeg-devel] [PATCH v2 16/24] 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: lfpLh46OMeNA 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..891471b30e 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 permutated_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->permutated_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->permutated_scantable[pos]] = coeff; } return 0;