From patchwork Fri Oct 21 20:11:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38877 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp955626pzb; Fri, 21 Oct 2022 13:12:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5lp82cMaSYjYwpS7RGQyx9wlZO1sOComwE8zI56Lfjrs+z+WwXNm03y7wN4aGenj8lXYkx X-Received: by 2002:a05:6402:46:b0:45c:bd68:6ab0 with SMTP id f6-20020a056402004600b0045cbd686ab0mr19137374edu.16.1666383133918; Fri, 21 Oct 2022 13:12:13 -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 w2-20020a05640234c200b00450bda7e3fdsi22843889edc.28.2022.10.21.13.12.13; Fri, 21 Oct 2022 13:12:13 -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=Ayny+OOV; 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 9480668BED1; Fri, 21 Oct 2022 23:12:09 +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-oln040092073041.outbound.protection.outlook.com [40.92.73.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1941A68BDFE for ; Fri, 21 Oct 2022 23:12:03 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eD9PhEHBMRT2uJaUOclvLyyG9+M67iupe51ProcSUnTcDhgiNunHrJjwTnimkbVtGgBbXVg60lRqS5DQ8oenZjin9HO6/Tu3JsINn45uynR9mJYMjcytiOYchOn7D7kmpGyhfHgHDjat0q8d9Nc3ek4UAnA6Gyisu4bMvP1V8JdZCwbr4o7fBDPzFX29iVXu+2pMxqGsBaeTmbP0zIZXWX4UatGg5ugI7B6hbBZ/XZPELpxQshZhxnp+ZuvVg1mK5aC2Y4K4nie9VT++YECrCpl39EkXBqRoswhxwtq8awakfM6wmr//+p3ft/17rsxturvKzungTWWPa1vwS62p+A== 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=P6AgQwQSbN6VemnfYws3NpoWe0reoL8syOJk+lVHpdX9XiEJBR7DkLJNbAuHLAltONwtxanflOc2c49aWbOqRfMYYjNp5/BC4BKHyg071JdeGzXTrCZB4qR36b+tJ76jWXRHVtvxaZwi9Nuh/WIPl1vzsOHRtzvtkZNfic2JFniuD1BLR6Z12aG8o8PAU4G/0OMNTQCmWCaFU0MWGfvD/kpl3C6XAoSqEdEDJPZL0/aG2Nbo4rlWNI4nbnLRKyRmhFQO0leaDEpGMS2LkOvBRawaqrHrW4UC56k+L7Y/4uc27CYNJo3vg45gPFg3MYOUQxOlQKOCpOeCfjqhw184Wg== 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=Ayny+OOVSv/3VeqF2AuNjFF8HtQVA/3jDSLa4CIjXD6vE7MlvdlznIMdo6ShkvcS9YU8YN8JyjPStiH5oXde77kNP4EjO6HsXolDHCTC/Mi007H29YhCdzYPzd3k9ImHgJHtVjVBDRrg5vI3PMh+sUEENpF/D6NHh4eh1NZRwG77CQ2aE5xDsz7UaYxQ7NKJp/E3JkrICw5dyThpF4NSMlLqiJPOYxoV+ixXqkbAfZ65kq1Oof7XFwIrgBwYDndl3smORD8n0WBVxaYP6DeMTd4F4s01eN+ETysQxi7pkWGXRITcZ2gGIodUCD3f8Sjl+/RFXAylgL5j0qxp4mTOAQ== 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:12:01 +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:12:01 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:11:42 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [VVafXDrntNAAYhi4V1LPH1bbESmI5i+YCSr1c0pwZlc=] X-ClientProxiedBy: AS9PR06CA0273.eurprd06.prod.outlook.com (2603:10a6:20b:45a::13) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221021201205.3565855-1-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: 2f3b9e70-b4e1-4b5c-dfab-08dab3a0836f X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmoyh0/rGpTlCzjnzrUxdxR9JN91lKN7o2v72BdTdayLvkMnuXMaSBGJ5su1ht9COVwheDfxiyu87dLtDRz1L17xlFlyscL80HaOMz6Z2hy7ZWtFf+Dhn7FGrIcQpUNkf+JRj2RTFE9RhbQzwQH7sb7Pfy0VNkGVV0vxAXUgiozAzbDs6n6zCE1JWM7Dq+97/ATCHVcI3DD+dDbc3hc23nZV6g4Oe6vdFH5c7zNC+EYORuJcG0F/2kYTs46uS1qs0CVT5S0MlwSUEDkx0wCStNvB+Dn4HexACvdT+FdlnX6NrJzer3mziKL6SjThNKjGbE2VllV/yJ+wvdUUMxdZXkoFMtleUivq/3keh1iAzGyhm91+FoBCMmeuNHO0yV/IFb7EViPTX2jhfb6GetC86SEJNbjqWIzcoQcXTmQ4Bp4nji/VCGyia0mBislyknLnLW++dqzbj24Mv07EBnZ2WYsoXQ9AJQwnAaSAlcU1ox+YbqrM0jpkPesFQxVmZ5zQRvXimVcN9361RRlURexrhNBBI4qHfrvxy162pl4AR0rur3Uscuk/kDXHZ3HoBjUldq/1MtfY3AbYxdgPqcd8I5zon8on8b1fWbzq0zd8LXrL5ZAhUNIfKC05iZ7rSbz4EWWZsu+xcEz734FbpF3nOdXPvZFXQsNuHZvnAhT2A+gYE5k9vXEwijMC/2454YjblyztO+g7vZKoCbf6R/fZjPu3hkuMNq1eiLE5zsAW4n9erukbmnCueZEs5CmPpWx2tJU= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6nPUi0MzPI6ynKy7N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dab3a0836f 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:12:00.9820 (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 01/24] 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: PyBqAxLjlhKG 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 Fri Oct 21 20:12: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: 38879 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp955950pzb; Fri, 21 Oct 2022 13:13:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5rvQHTHkc2MvFfl1NWsdIyCSdI1On9DjG1uvkCKiIBIvMCQjZb2ksuxzkD70HL93/WOddT X-Received: by 2002:a05:6402:42c6:b0:45c:fc58:bd0f with SMTP id i6-20020a05640242c600b0045cfc58bd0fmr19329210edc.19.1666383186033; Fri, 21 Oct 2022 13:13:06 -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 4-20020a508e04000000b0045a22a21abesi18374189edw.299.2022.10.21.13.13.05; Fri, 21 Oct 2022 13:13:06 -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=WnFDzjci; 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 AA67468BEE0; Fri, 21 Oct 2022 23:13:03 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-oln040092067050.outbound.protection.outlook.com [40.92.67.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0DC6668BEC8 for ; Fri, 21 Oct 2022 23:12:57 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WjYcbUIpJ0UGKbuost9fmC2lN2ckoSJAusUZzCtQzWIx13e61qEatg9L5jAwsX35x1R+4DeO05JTb5As0xL84XN5TLeG9XsFOGxlcId25tF6bTVHUie26vwYyGtNqxo9whBEzIIPYWyyIPDnAt7uiocz48y+9lN4MC4HSRoWOTlhoZkq1nbYu+RvFqHRnFBOfx1W8jNtx2mYkSY7ou6BOpK80QFTbrxKXK+4ubzIXiGjr75Z+Xi4+VYpmXAuBE+bBMyJUqkRtsz8ZLm10jgWwDK5aqwfkOzAh/pVhTRfQfheAU9ODFAHpj9WB3tqGoMjpgww8TYqvdUNsdvwc7U/Mw== 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=S++sZvkuKFB9FPJaxUjnW8LGySyPlia5HW3p0I03OyU9Vm+HIQlFSn/qK+fu43W5wZheso4BsxNTYJaHvm0sRZbMneUQ+kSiBWsse9u1QkRWngpaodv8xPXr64iI5xyTDUr+5SOKzircSNPqYN2gItOfGvvAn87Urz9lr9MzpxKiuwYaqED0JCPkIFUfzSVz89fwmIBl3Jvz2Yu4t3CYlBpLo38IkkbJ4CQThwJoulMGN7aNs0LcwydKSTRtinKvoZQn9HZ7hGtO5+devYl2+mqzPex+5ssORLa6QXOLZdiF/lkqY0ocbDxfIDUJNschFy4Lv+AptKKeUD8LuGJSgQ== 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=WnFDzjcijXmq7/mhx/RKCoVavNSCF4RcKX4xaHDVcwndeaJOSEzso+TQNFd3MWsxM3TWkBD3SEPiSSvYTMpfEr3rWxayni136d6Ez0VsMY+4b0BkkEm7h1wXMb5rfVSr8DYcw6MipMVOUbHFfQpVMu6v4evQRQ3gEPq7q5FnSJ5mdAy05fFek4GxHctcXlJU/moYutjLZxTaFf/OflMK9ZbuqjUbqjGG8vmQfNCEzY+kk3gmLbu8CSruOUflYZ70IXHUMPTlcUSAENKMvAiDXTjMSBFM5MoH6zCMlrx3Cp24nzaSYo0wW1ZdIOgjyUJ4Ar0Pa3elGjBoMqiQN7fOXA== 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:12: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; Fri, 21 Oct 2022 20:12:55 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:12:38 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [eQC1E6RvBcGSvri/7Mq49U3lHHtLTwCqCnbmMFR7wC4=] 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-1-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: cbfddea5-e97e-421e-9e93-08dab3a0a414 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nnHDnbJ910YUAai4EXr732TC01HJGeHn6AOz+Ixy9TzrxEGKWOiblZlM1qRIRsoMoycxD8929gCuwqrZYCEm4ZistJv7nOELg1qSycBZ1ekppAUxjbInJjmHtAYw4tYI4wBPF4z7XKwgfbCpqvta9+TfYxmeGcZhpH+feQUbtD9VxraA8IyzzsE6hR6R8TuPbR+qiQ2fCwHchTv+8IjHXpqW4sH4anP7DyxblGeBYSWs6pIbjD9kmmaADxmxdy/Jq/HLJOhzwNGei0lh0XLSC79Wq8w1i1QVgKDCH0LN/B5qyEe0PGY5aH1y7GKmgI3Igk++eL/1Ok8HrRAVsBF5EtyDq4ZTJ10+xZQVrMIGZ+pkdocxq+tPkJJS/VHWbkxkCR19ASca2yRruJ1RSAEgSd0RtnxlMVjNCVYvcrSpBLoH+ochtLAmLWLVg+bTc0DQS3iaP0E47aRwNYKVA27GGdzicruKWMMZxhyEYc4CKO2VGVSw8mbArQP80ILa42buXjstXfAhG5pVHSzZ/50sxOigQSPz4obmRav1AqIG3ZVnW/rqXXFl8MZWRk0HL/ZI2sZ97FKFEdMEZgnppPvVF161Gan55TaTSDZqa53LLQ44dFNsE8jr16Pu4DxNddpxBig9UYrK7Oh+NPMK4Q5UG+G1ckPR3uil/yOg6M9SQ50VTBYFvojhg3gw9i1WvljhzZfBsrVqEaoBU+hGJAu/Tt9SmuMpYy4Yuj7ihwXdf+o90IOWLXRkZ7DCz5Q/fKrsALQ2/TWRHilVYcKwgVRY2c X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Hwd6wb4iknIm8AVnID/D9t+XCEZ5d5Z2K1CFDfFn26pxfwyIBwK1QiWR6DDjopy6rT5pH5xkU1oWsY7L/rDr0fmlGIGRuqA0qchyFoNByl5/jkStIF4zzNDQ342OhZBVDyqm1cP86rVbzen+LDWg9wfqNNqOVIAj9B6BLdWsFwXwktiMHD00Lej2jQjZEGty1B5xhBrzR3BuCXz0GKYfxqQ0jvBm0uUkx7IBVobswD10o7199L+vCxzJaRpG4B3jo0KME7wgL2odANUbbySZJtAdamSaH9OIZuiM0iZP3eztZQLltZDIBmDHQz6l4pm+RVAxkCtnCrnrpeliTaXws+Z8NATmGqekExZ3FMgHXtAkubWmmM5w+SuG5rA8YYmWzfoQjUt3jA4DFIp4cjEBRJDpVcWe+zpl1AW1ZILsGNiZHAISOesJemqO45nuFRfVukc//QUWS8clXc06aQ9tUBgwdvq49VWRAcHgylkc3FDQh3owQWd4KxXjpI3YFnxEHK2/LkpKbvPY0nD8VuVoAbA19M5q/ho3p7ynZex7d385GEn3dvpQF1tdO0KysM27puW7Sf/bL3UngpeMW5dJ1y2g2Ihs1spIUEhPFh/FD/X+rZMsrg20PUpUxs4q6Fi7Lvttjo4CCMMZhnM3ZYO9Mb64DRFTn5cKQpduX76Ozj0c/KYNgntaVtkyXWgkkHS4 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uCxP51PxUoAPkK8Qv0NZqm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N3SvTq+aEo61KvZC1q5eL1pf2AcjhbQ04GSWRERm4uKqY4PzsKBtJfRRVruZ4260vOqx1rIZdXt40tPWaJLRm9krVytJNG0hwF20hs/3/ZnVKSXiZtlgBgK+u55470HsTpZtr7oCOFiCMd2BtyywnUWmRMOzgJw/2q8oF01kRUA6RMe2izibb1P99LvduxyG/uUeiUl9FzKb4Pt+G9W1CrS+et3NrXNsTeDaOB369hEVN3MIYPpjNGoXdffPhvrWmTBiMnRPn X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cbfddea5-e97e-421e-9e93-08dab3a0a414 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:12:55.7018 (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 02/24] 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: gnLF5okIaJFJ 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 Fri Oct 21 20:12: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: 38881 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp956027pzb; Fri, 21 Oct 2022 13:13:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6VEjABQ0m+mf9vly544LAZqy/i7PYeUvpv2s0ycn6UDdjupyjOYs6lGDJUuZQdLPLUEqXb X-Received: by 2002:a17:906:cc18:b0:78d:ee0f:ce02 with SMTP id ml24-20020a170906cc1800b0078dee0fce02mr17272165ejb.323.1666383194497; Fri, 21 Oct 2022 13:13:14 -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 p34-20020a056402502200b0045d45f0e69asi17858533eda.561.2022.10.21.13.13.13; Fri, 21 Oct 2022 13:13:14 -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=Glg8AjxT; 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 B2A3E68BEEC; Fri, 21 Oct 2022 23:13:08 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-oln040092067050.outbound.protection.outlook.com [40.92.67.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2B87968BEB7 for ; Fri, 21 Oct 2022 23:13:02 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WIsVibnnQhUVnVYv7MRDPi7QMb8Ft7VWu8CK2cJXd7ulhVSvvdRveEapRGLutlgCw0AdyiOp8Mbi04Klgcq41EwohOmXekGIg/IuxVEJNb8WZ93iCfXOnpFxtbINpRCbRmxOXhw1TeLjylNsIo1vezzkhpFMDjL87Wwtx2KZ0bDV6URALlhzuUfZ+WvnKuBXlT/J1xrPU6S55tSq2WGuNW9y+QzL0FaUp58X4j/APQLRNYUmQo+XBF6m8kWEkjtc4898IhRHhIwgCfCQS/NgOVeeSDW1d3RX66C18WGccoPzws9v34hMO6p8tl1p24QKr1WQZ7fkaLcAqCdRZSVT0Q== 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=Q17+zcRBxUWse4Pj4SGEFNH+jyh7gno77WfrlXeR/tA=; b=Co4ILDbJVyhwfn9rfRHU/HRu9MTlN8y1arQHA7YQQsf/IFJiH2/vnSjkP7v40T9re/99QVI3xfM1HXBKLwLf3ZgumC7qqltaJnRk3S6OLqNgmJdP3bGWWUHwMys0TS58X/CpDBoPU9lMx8hrePsnxw0O1LQHKsG2qZK9ZE/TdP00iuuyMDauHQlpgyDQp+NlQZ83EiiUfAxNXGl3mlpIJXkjuf6a7S0ZUXwu0uWZt1P7nJ2188SwDY/8Ng5/G7JNb+ycOPO5MGCpd9MHiuXvAUoogMpTN+h21umlY171gm51GJB3Pjk3RUkkoy9hJB2+LORoe1mFcgfMz0rPbSc07A== 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=Q17+zcRBxUWse4Pj4SGEFNH+jyh7gno77WfrlXeR/tA=; b=Glg8AjxTs/9k1ZgBom+VUHkgSrLIFlclHERMociCd0kiIOGjNbtMyJ1Jbhmi80uVT13HJBHjfHVDZNwKUNeutWDFkIPSPOA1ha3WbozFtFV8W762pRa5wvB83vmWrEDrVDfQoS0uW3o+qw/HFthcTsyEaGGceUCnbfOn25HypWSzRoGkbV2WpkfPVi6f+Z7iwml09toCx4VNh/XEaaHgHAcfC5GRjeAx36tLnu9D6dQu4LPoksEdoR8hGl+1I084JUtGxrzFj2Wy32DlQTTC+u+kcrnnTWpQLf1NMkbaQOvnxjxtmZLSD8ZTK2ktI4eFJVzgDTpmbGRj/+aPgXJMhA== 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:12: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; Fri, 21 Oct 2022 20:12:57 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:12:39 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [AxKD09OCj4J145fHpud62Ky5hzuLnLylWRQzOhXC7fc=] 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-2-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: 20a6f28f-7f3a-437a-dd85-08dab3a0a526 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nnHDnbJ910YUAai4EXr7328lY0xvIVIA+6BWPu/xNmd/HrlFihhonT1ZPgNnZQsLMsNFkmYflO/l8sLy6tcMH9wTBK11Xyvwfiphepc2ZnKEUb2/j8nc5O0IRJ4D9LUPhiPvblKCnna7FuYvlINQsD4nHGc4fZ1iVlCxCcINifguj8ZRW8d2368Iwqw8paBnFgM9IwDuGJUetihqwwuGeq5bIYm+h8QF9aLUNRVbRrXKiCuYwKjJppTrxkTIbgigwYppJyDs41cbpMHbnHEdYpwPwE8kybQ8V1FWJsLI5aCl415xqYrgIOe+Ox4t4fQ7xaGx9D3TT01CP6dZkheIraleUaFkeJsMpAZSIWBKzKsRrwgiWKokrQtiFcLINuDj1GgkWzSEhaJyV3sl20O1GqRksn8nQn2PbS2MeZ99euOixqj0joXSIuvr1FPPPVaiBHcDB2Zkg+Ks4xGc2X5V9LDyAtZq6LLQnIA6YyuL8G1zk5yO8r/91xJhl4TE3iJzM47SeJCyGkkzuBF5iCvLpmSMlMu1T2lLONcrzYrTrdnGa4adJOtcbTOCmVi6nzBA97PD6j5J661Rj3ARt1BrwqYrmawv4JgJtaiNJQezZLRrPfses3JER6Zst0JlsHeXE+B4bndOdwEkZVROju9ZDChkWiNWrBdNKpcMDwhXLOhdj1zgesCO1sD2NQLy6c3g03UZWRGgvBr/g6hWQBvHwPoY8EIXQtMTBUW8oI6LxsYVo6DnTfc+zUanfbZhyKXMVRp9AxLicziTDwhzQ2pCeD X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dgvz8ThZ0vbSGAinY0pZysich4aLY3DOKDBS9AO5Sch4BBLwwZIJozaw5D1RBViC1hnKtsb+qCEhkBm4uIENuNbmtE5SURpTjoaGgATpaI50lThsfYuFTWP9U1wK1xbTZJGfnsGYjRf0S7p91YoflvJQ1rkHtYqlUIOZonbYoqQrew/QGBsVW/MwQClj4Fvfm9qGISh+q5gwxepfwLxRKI0XoLIXRCndUHQbd0Nm32NDk3MgpTl+v9TSlGrDBHRHgUGcFyeBsnbOaj3YYOW6cVrNsxT7ktIi4S+6+xseOsE1kusNb4SMARjQNdpEDrYxxJXKX6PNhV5jm4o6e8PjPtUOKg9keQkNh+d/+ZVCmCloqlRMhZdx7AiWZLQSglYI02x9FvFfGKo7OL+R8ll/ek7o49Mlvoptc5JSf/G6XBrMZKVneiyFNR6hMLCL59Y3CWQ9P+EIOx90JmV8Re9vftPuXL6EHK/F1zl0IIaeaTZpAmB5gTSgjQK+DS6qb0hVqilpd4NYfqNo8F4+AjopvINPwoszgoi0YNMmvtFgxfJ03Lw/jW+v72qKgBjoOoPnnFhbBu77pEREzbJ4TKl2RK9H7l5dc8guPwZaXWMEOTog2huMyimvxodbdXzRHIpxezUr/jMYWaT7KAjgnS0UFYuAbeEh0OZn7wDdQY9IHvmHeOsevdTGwVCF7NPFx57N X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AE8p4K9MEGPmagh5aajKnsHxVj1cCi258zcjSMX4+lFaUIoy81AijQy/3z/dA+gM/YBk1Mi2HRYePOrjhkWnnkXYlsy+uvadSQ+k1wo03YDk1hfCGzGH6dhWDbJTLHg/qlq6Dzcyix1Xr0B8mAD3V2ZXDf8Clyt3aEmo8UmcEozbKjaBzZf9GaokvvdIdhpW+JHnQYVdsX9itlcxDKiVj4U4b/be7X9fBouHPdsSHMLMkB8tSE49uZHCaNhaFo6mTrZmZNT4BaTPBnj2ievaZ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exchange-CrossTenant-Network-Message-Id: 20a6f28f-7f3a-437a-dd85-08dab3a0a526 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:12:57.5147 (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 03/24] 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: vr9/4xnr0yDA 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. It also renames perm to scantable, because it is only the scantable as given by the spec without any further permutation performed by us. Signed-off-by: Andreas Rheinhardt --- configure | 2 +- libavcodec/eatgq.c | 21 ++++++++------------- 2 files changed, 9 insertions(+), 14 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..627615b4e8 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,15 +59,15 @@ 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 *scantable = ff_zigzag_direct; int i, j, value; block[0] = get_sbits(gb, 8) * s->qtable[0]; for (i = 1; i < 64;) { switch (show_bits(gb, 3)) { case 4: - block[perm[i++]] = 0; + block[scantable[i++]] = 0; case 0: - block[perm[i++]] = 0; + block[scantable[i++]] = 0; skip_bits(gb, 3); break; case 5: @@ -80,16 +75,16 @@ static void tgq_decode_block(TgqContext *s, int16_t block[64], GetBitContext *gb skip_bits(gb, 2); value = get_bits(gb, 6); for (j = 0; j < value; j++) - block[perm[i++]] = 0; + block[scantable[i++]] = 0; break; case 6: skip_bits(gb, 3); - block[perm[i]] = -s->qtable[perm[i]]; + block[scantable[i]] = -s->qtable[scantable[i]]; i++; break; case 2: skip_bits(gb, 3); - block[perm[i]] = s->qtable[perm[i]]; + block[scantable[i]] = s->qtable[scantable[i]]; i++; break; case 7: // 111b @@ -97,9 +92,9 @@ static void tgq_decode_block(TgqContext *s, int16_t block[64], GetBitContext *gb skip_bits(gb, 2); if (show_bits(gb, 6) == 0x3F) { skip_bits(gb, 6); - block[perm[i]] = get_sbits(gb, 8) * s->qtable[perm[i]]; + block[scantable[i]] = get_sbits(gb, 8) * s->qtable[scantable[i]]; } else { - block[perm[i]] = get_sbits(gb, 6) * s->qtable[perm[i]]; + block[scantable[i]] = get_sbits(gb, 6) * s->qtable[scantable[i]]; } i++; break; From patchwork Fri Oct 21 20:12:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38882 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp956102pzb; Fri, 21 Oct 2022 13:13:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6M77Ch3oqzK1qZEpGI9mBxueUszftb4zxyc2L+QPL6Uzy3/WNK3zDrImskWvvZED0WIWe5 X-Received: by 2002:a17:907:2bf8:b0:79d:e8e6:d575 with SMTP id gv56-20020a1709072bf800b0079de8e6d575mr2401390ejc.237.1666383213673; Fri, 21 Oct 2022 13:13:33 -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 q19-20020a056402519300b00450e1ffe3edsi22307529edd.382.2022.10.21.13.13.33; Fri, 21 Oct 2022 13:13:33 -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="GOi5/rfd"; 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 CC7FD68BEF9; Fri, 21 Oct 2022 23:13:30 +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 ECAF168BEE1 for ; Fri, 21 Oct 2022 23:13:23 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EZAr2jhXJJ6r1yfWt/YoylgNGrnX3+MKSBcbUW9u1Wk8kGyREns68is0PoWQu4UFPFe6ljxgdoTBJveJv3BMcBu7n34vzzKVm/y+8JT6qH4a/dyLQZ5w9/xyllPYXFYH+GNjNGmgKjo87/plpEdYiiTMB9K2EOnRDkQNBxJMD63EBvXh5I/BDuXWzhJMv7FBccO7jzYVev9EV/WW7Gr4CifUyhLHj9Udj2txv4VoCMpO8woguj4etHs6XrSh4jgNv7+lExoPFifh6aQLlGSxAM2GuQgzv5BS+lD0ls0T3s4g0h+z3gtgu6tymBAR0VHbY3MBH4wTHYq7CNmasH+6pw== 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=PkJlF8ggcZInEHSTuE+sX7KCOW0QxncLUtmO98hV3+PyOIzZBMRUrJh77amxdqVT76V6UpZSBA4bABSZj5qmFLpxjK5xUY+JiFOqjn+irQ0a9Z+PkwC9YmDAnOY9oKj+zr1VwAoGGkY0O1nTNV7Xj5NvLLuxHXeReXrQN+1nSlqPUlV4iNlW/VCw8YmTaOucrE+iynx8qLo65FZogHT41/Cdc5EHhWQYCtzriguAE1deY3mW7DCe3U+ONVPEIayHXhdk2rZCP/mXQoK4iFU5qzQbzz4Rtksy+8a0Di0H9TDel7Y7+rxQHbFkEoNRjg+EIGZlm+VZwzs1SeZoDLiPrg== 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=GOi5/rfdAfbLSQLQDoWuhNdRBygTgGFLJXVc3LzqsAxH/UAxEwQILlbRdBPn/jiDApL7R3pqTmzkUzEp9mzTQOQPfYL7aFT0XbR7DTpLeygrBTErmf7fHGB+wJib56YOpFU5laUgzrecZIw40RWQ+/55Vvj7Duj2nLDp7umHNRmjGkzyKbJklO6vTgIKwGlIftbSmIDDLYeL3ev39IJKpaAOSW9le6pN+YIJ92GBH5RGpm2hEl6sAnTYO35QhbGW0xHry+zmKk/QiL1+82MXq2Me8xFXOq6cb4+7Xqlgjlm2IqB8l/J9OifsUQaKcSZgAq+syBtdByEGTyTC9gQeJg== 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:22 +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:22 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:12:40 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [/ozi3bqSqzHRv9nqVBp+rjqfWdJLe0g6AOWlyzWYA2I=] 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-3-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: c5bc60f6-042e-43fc-61ab-08dab3a0b3f4 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nnHDnbJ910YUAai4EXr732TC01HJGeHn4kntSfnFNZlfhNFEc6Y5hr3VCepj3r+irxIjoahkJVETsy8D4TMwLONGR3+0QY+8w+jsKC6hCKf2LvFah4XjgSQmz9iLoFHXDb+s0bhwXggwuBa4UxbHG35L624i2DO3XfF+e5pi6Ql4beN+Y8SFXWXbOVnTiEf88IRGMpeJz4l87fbbVc+8bYvjIbRfj1A/KUSignxSBNWQLMftx8tCS//roG1m5ifjuR9wuOJWcoS+wt62OBq+7yryh73j0qGVtIXv4BCMMNWYUrGLZ48vXprhTgyhNNcisZ+5JOtL911xxIVytelVNavcklrGq0Im+LRaxb1Dto+jzr2sblKtYuTRLiB1EjC4NH5CdYmJIXCPAPOl7xNQ/aYc4B7nAPb/nzUE3pqIbBownahISE3Uwy6mRVxxfEVhHLYOkl18SJ24VvGGVhPWJi1wJoxtvrSKef0VGbsFyyCoZXh0MwUdyjW5Gtkl7hYwqgLYluAvh63xXoYW3LZPdFYWlOVjbyO16WGshBd5dOJxtyjQm6s18jdeYHyZmwHHubG+dTIvkNdTBRdGQVGSZv+cwYyk7jhwXDFQORu0nZK3ALwJSOFp0ASW83/4ilO8iedT5e7h3b5/y2vAMVIX5CFWifl0L7ua21Un0aVdauaDyRaR7IQlo5M8P/khE7jimfdtTF87JPGfFppW/jzwDicsfZDl/k6kCrKDa6BzXEi7E7Nj0jLGPAzELzdFl3ar/fKEFNq8nl3yVMYOUnZWa/ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nYZGTAFljQmzou386x6WvwHlGiDGAHvoa/mPB5Fj5XmBxdFtqNelhd5Bjby0ETsbbflNGG435cD8LCBgSKMEp2rEMmiFD5wN8BxxtNb04XXEd/XQ1C9KMdssIqYTo3uPmqrdfSkX+g+SgoyqZOngB8TR7t4neLBk1i9cZ0KxIDqfkUwbhBI6LruhXTnOPCIwKDZ9jHxBEv6o/XtxUDZVcYWuHaLt/8xmatjZd8nCGWdJ2nKVwKAjVlS/Ku0WU+SJpKv4pwgFuzR+XEVbDkD31GrTuvksAJf0Pj99YB9Niih/4ek5Lv85X51ekWL+aTV6ogSZizLg2VvuVB3/LCcciiryBiFyIJCFe7gZdzqjrv9+f3iORGTN+iJHqp3UHvhNewkxwSxNnylLA5CWE8uwRrG6hySfi5jztBhPNqIQsCdY6ONUPoNuCzIj3CyLhmiJGrmD5uK03WNp1Hl2p5583+sKdmAIFHJmvmIJnip7Xji6804zi07o3Y8DTbbkXDplzzDl5C0cmKHL8jHSe1cgUSsVmfQ86y7r8TWR1oL9ioFTi4fFEuM6OfKOKyHP/ZiyIsSqp7mSEN91KUffPvLzXcMPOoHcKWdIsIAV+Y1eOhqMoeTB27FH44WG47iIgghsF+OJMize6DOfJ5cd1ZHsYMci07cXTB6OcBlRscejLIm57crjmRnm+8wh6qLYetok X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wnNvmQ4ayh4DlmCWDmhJxXh9eXmoF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j4eqP3p17M5riQ9Q4DJiwCa1LMhOkOwKw00Ti9dUpNXsieA3j/VnAKzTZeErrCV90hXJeGxYiaQI7+noqM+XLwowBnd3rkJ/JSuY8cyWXn/y9cyAhX4QgD392Hvf0GYw2WcnrvGw6GOcj0CIY+AmpKVUn3kdMScjt+nvnFS4qEJRojgo/8QdKJIUuZDE/8UF1EXEjRxO/4+a39PxK8AvIRmYZ4jHrIl X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c5bc60f6-042e-43fc-61ab-08dab3a0b3f4 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:22.3341 (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 04/24] 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: pipHQuEXyG+u 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 Fri Oct 21 20:12:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38883 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp956142pzb; Fri, 21 Oct 2022 13:13:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7ZW3dQM/EGcjRN2m6EoMEjQdMNlIfzgItkroG0l8PSNCUBFRbQlIGeYn/sd8VdfqZ2zkPc X-Received: by 2002:a05:6402:401e:b0:45c:a1ce:94bf with SMTP id d30-20020a056402401e00b0045ca1ce94bfmr18743731eda.177.1666383222186; Fri, 21 Oct 2022 13:13: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 vx3-20020a170907a78300b0078d8dcccfa1si15945108ejc.396.2022.10.21.13.13.41; Fri, 21 Oct 2022 13:13: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=WykKGSiI; 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 B8FDC68BF08; Fri, 21 Oct 2022 23:13:31 +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 359DA68BEE1 for ; Fri, 21 Oct 2022 23:13:29 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=djrOWw4tdXPD6IJOManxnbIV56tL2GXDXiz+mrO/MJiqvsGcNGViyhne97bhgJGye2dreBQI1/MJtvoJLW/sfi4dEj0Tf/Uoyj3Kp1yvc8HkHinQWAtLcYq9rBnnt51KXguzv/4pp3sCSIN/0jFWStzzGEFB/aEGv5L3v3/vRKMNXxACYgAj8ckUrWEzXy6Adj0oPNZEbax63CvZ5yXKJX+sBwElN6zk+4iva3E+IbrY60XrEZrAIz3NX5uiFDHXn/LN97o/40a8/P6ojw7EY8WELRL7Kg3ZEHFonONy2XFUZSKHzFpNvEk5cG/SNoLB52Hew8Vb9jjVrbBDVJFqag== 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=j40k5WaimTpXCRx0+kyu0zxovOC6LEmvvGbIsF/C9m7BkZHLAnlIwqAikNlHYkk6znzKzb6elbPSfMEE/uDRoKa05qM8lJ7LjH6gdtYA0I/auIYiTSWzdNHjmK4n+hNUjBQWF1OfVOK0XqjbQ7oEBnm55vCva9UN+6WHh8bRBZ4QK8SyGFqFRQc3KdkK8c53XBdkouyHzMRap6mXHcw3+iXR2Jo6W2HiHHz3MqvlOswpokC67r7Hq0VLciS8BCRosW+9F3R7tBFCFswbhvEsxAFYc5wD02MWAYsgVfKPGar3TGkEg1V6ZDU+Tj679UfVHtcGU2+CpGw3ftwHkzIP3w== 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=WykKGSiIpyrxjoBWTHHmXHBEF+iy9nBv3jq5LY8+d07MYDV5XCdXNNbSgRXRy+hgSH8KGKqOWWBGJ7t5feTKa5ZcxKr4I4SNtkHaHNWScJ/LdKpJ1QBFlthN/z60Mjtdc0/lrczxdBaZzrP/+6zroEZ4NmKxpfriJBgE8xK6GI2QFdUp0PpmVye/w3dD+9Z+/gSyBN/h6pZGZ+WX0Od6HuTp5q9HzuSulLLgaixLVNHw1oVPxtwGpQBBmZ0dXK/Q0VEIXo2P/VWcM4desZkmbR935UoeQbNAah6PQkhGh6TFs/duYgy9HrwrMdRogsVA5bHWfSoQdmV3KGH9fCE/4w== 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: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; Fri, 21 Oct 2022 20:13:23 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:12:41 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [Z93PesJ4S/wVzUkm715b5/jvH9BEfkamLHzFjlwxkbc=] 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-4-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: 343faf45-9221-411a-a2bf-08dab3a0b4d4 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nnHDnbJ910YUAai4EXr732H20LTu1g8ExL9ioBvFdCJbfPtrsKSGibq1CJppmynYVq0v84RzwA+hDRPqb83mCRQek/M11dpwXwRBP2EcFVAkGKrKi1D01X1uAQwlAqm2ji8eNhw2TyzBSRIMUmToBhphLWSS2zn06C68qAdhxJTHdw4ZLozIVwJL13vPlkIuMq2rp0iLdXruGcIAEr56yICeDWgdx9xR8ZmMyWX+BLyx8O54h5dtXoQQrNkk9+hQd3N9c1ykXY14t15+JIV5m0Vo9jI0mMRqKg6YMl1CBelWuVRPOwz9NAEYAGJSeslN/Z0YP8HJYruQmB1JoqSjpwEL6twrTD65tLSG9J5A/E4FOQ6cunnlOWmHNWfoPGkrw7lPHqwZ6PL+8dwjhd8Rd1KfDDy4QXXlM3VZvpAH6MoQBH86bXdRBXlFoNkCVtURgZAfLZ7lYeyP1ezx8pdGGkkayLJyVHMkI8ake2hIM9eZ/ZbI2Ode0s1DQGbXm7wqgIrrp6xh4tN61vpuDEsfbpkjAEGHggHBXAwh2LlzNZjGPerJf3TwWtR7QwdsxJxREQoPi4IMEqvMJs8QdQXDXHVkIB+KXcsY9MKN1xx6vfX4SX9U1OIcz8khU2HS4WytD99pqN09pSSPU4iAgN54CSLKysR84YdC2Ncb3Hm5LA5g0xi64DldRzlXGw6l8Znlkh9Dr3tZGSMsU9s0SarkUiQoTlI8ShQZ6pz3X7UWK0cAjmyvDm9/8ptuB/qlptScUcW3Y1ro/Y6trMjYOMw5yG X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HGjcg/mgozevaV8yNj/tszOh26FhxMV7oa9OlSWMH+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hUtpq9JRx+HW51njgHfmVenPAqnR2hT/jzTnoB0R9PvphAJzqQFGOaCBWtaafeIOc8sTAr/3czidBqiRJPeyGlXFAAMgkK/jqldJ6Jh5vfv7oqRqAbzKyF/T2jydvCpwyPO2Vcl2FCMoKq8XiTUabEp1vrDY5R4Q3zUBRqhKbz7gDTV0ZM2Z24FuGscci+r/qraeT4+Iya23p1D1D2V76tislz9DENsa6Kw5HzpZxtfZf71uVNw6id7GhXNs4uAYAgpzyBFPtIeEyahl/AcMXwsz6mGyadH05VEHGvcXMfyX4t6y7MoY1P6hbeM4ae9xqOYuMPM/67WMZZHpQNUsy1rJrbfu4wYrVzgcVyfQHW3YxiQWiGTufmM43DehALZHTNJ2Muckw3IHp+g/F4WmTOHgONL0BrNXyIfFC9jFZxBPfIS358mU08VTb/IXBMYVoeFVBm35yQRv0MJygL2DcYKSXy24xrkBoCha9tm54XYGU2rjSSYXwnB7TwZxb1NV1SSkEmof24Dx5o2Rx1rSPK/ZXsvVSfHddJDZTq20isc4Ond7s0pJqT6771aljHkTbf+HqcLcH6yLOo5mkvjlEJuQSgScw+RC1VlmW4VX90zRDJuoq/Tfw2dmbs9tt7iKGv5GgFt/lP79o2F76M8wzUHC8z0FiCR8ZaQ6YOGNmWoK+pnXdFTljteFki9VxI1aYNUJeXDTmyAdUyIzIPd21AfuQifU33xmTOBACJqQ5Xb8feaV48EYhyMgTabgFeI2GQkU5fwKUHneu0vTjZxOgJsST4P1NcdzRrKkRgpV58Zmtkb98Fnrw7aZJyrPj7/1k68ztpgvpD1ckA0zzX4XVWlDDzqCTQCExnbrqjGFkoxmqtJS8RS44WvXfraO/WbwQ/TswLVM91i/LWHmnuzm8lpOo0oAcI74sr6AwdQdM3WgIiE/uAvpduGSH55k6gm5RP4isgNHcjHqW9vb14krra X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 343faf45-9221-411a-a2bf-08dab3a0b4d4 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:23.8038 (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 05/24] 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: 7S5FYUJ3oYY2 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 Fri Oct 21 20:12:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38884 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp956190pzb; Fri, 21 Oct 2022 13:13:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6DF7rTNyByalctY/ikWYM/WU8B1/SpKON1ovaS+Tyv/Dix39HxxGxhbFKiCY45MMDf9kvk X-Received: by 2002:a05:6402:34c7:b0:45c:c02c:e256 with SMTP id w7-20020a05640234c700b0045cc02ce256mr19683371edc.198.1666383231621; Fri, 21 Oct 2022 13:13:51 -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-20020a170907a40700b00779e6c93108si19589309ejc.598.2022.10.21.13.13.51; Fri, 21 Oct 2022 13:13:51 -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=T+58a7w0; 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 D132F68BEED; Fri, 21 Oct 2022 23:13:32 +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 873C468BEF0 for ; Fri, 21 Oct 2022 23:13:29 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lO4k4iFZTEdv88H0z4fBAHbP3mOUwbHks5sm5zVJ+Dntptbpctjm05YyRAS9RDv1duVuTSEvt7Dr4NGbX8gp4NemRNvh3iUhhq4fPo+gNVtvVZQ2qTP0ygouhPcUTX1vE4uqA1i5tC1ZdsfF7M+VqhDdYRDwf371lStpB+aVtOypzpSjTrCPnfO1SffHE4vWrjCjqte98hXeWSBGGP76S1GEOtpOL7y9awA6be1t7vKTUXpe3lNmYSAus+oUu5TRaJb47n5dE2Cw0uuY/mtsBO0D3uErLHVPONhlV7e69UKEyFjnmxjx85wkjGdB3ockuIyxV0ZNT1pfBJRbCVAACw== 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=KHtSusZys2esEUBsAVB+cKdlJLBN8JMdRULYemVOixk=; b=BTr15nZCPYq7Ksprl0F1URt6HD5LqSXTyuSCz8pL58yTHZkP5FBzNuIm+5LJ2TiGYp9Om/ToFCzn29DJ3OyyLRxFhOtEYA3+R/QD6QWBtJMBA/uCtQRFEPlDRA7uYhjM72oyzZgndbqVSa9unx/5zKNNrwx1KlcEuq33COvCThtBgFwot56cx97fzucuZOjWtBp3QSXX3xS2CLZPu+Ymh55zZRdzQWLe86nAl6ePKZGYfVDDeIrCEhWwyoBhl1eP7/V5RYGnr+WszVwdQuA5hfLdoNkmAxQWksk5Fq6bvPhZZP0wMZ5m2BlC5Zj+AS+pmmLV000KMEnyFQseOZ5Pkg== 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=KHtSusZys2esEUBsAVB+cKdlJLBN8JMdRULYemVOixk=; b=T+58a7w0UTs7g8TsFz1HtPF+g3Zqf29MxmsZtxYBMPPCN+fqYRmQeDn1a1HNW75RQxT2jByLj4ZMyYNdRGQ55LWbDc8XTgxl8Rb6ZYo0k7BT9kwNl40iT8CYYdDJUXpXkHj4+ckkQIts4tYcCesgnHww0Yt6KcN43NZWvg3QhVx3uwUZKBOK9561KSprMy8I595gfcYQBdyut7WV9VYULveLYYcColUY06qpXlL/Gw5X3Mhzz+OR61jIChsTi/5UZ1H4MKQscDdyp7iM2hr6EFHddkG3FUcEqMlYcxbxM0ZcSckQs8oRnyaO4MgAxhAoMZKyKuu2J/gTmTGPIS490Q== 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:24 +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:24 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:12:42 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [FhDOfX54mV+y01QdNZUc/wdDZO0uXDO5fS8+smrvhmM=] 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-5-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: 199265bb-994f-4067-31eb-08dab3a0b56d X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nnHDnbJ910YUAai4EXr732E2L2OUZl2zSlWAoFyLK48Cf5sqrnEmqllxlbsPbxXxYtksPQRcmf1AQGpjopRWmQnLjmq4UtV7EhRK5v/6Y7pPVxv/9m0/HLbaucGek7DK5Hal6JwWTvKquv7GFUeJG/cpdFA11PRlYO8bPnE2EN1/5xw9a7ZmCQvGqsJYrGuI1jpjWik/y1RAF7q+YtHrhXw7a+0ncFXIC3xRjRWjKQUHOs9Q8dOdFMrSAURuAlZfkClnobEyZ8piAgiLKsGhifD9FK05iJHYf67hQX6c87SG9ABll9JikBTvEnsObj6e2Euq298pzb4URRw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64jboRJ2URqZgkyo4UbivicUWF3aJNCa61cj6ft6HXyRUlqq3OAHZGdPX98/Gb4/Jg5/iCN9j2Np//wh1bhKK9rrNPh+4re3mT3FKV9uRiR61jFpJj3/qPolgICSwsLP8X8iSqG2fVZK49YDRNu/20XSJb1lBJs+Bni+CTpVJ6xkDoTHYfxYmnZ1dMO4rXGg0gVHzrRacV9rEcKWNuelRoiEuHoOmm8hkO6dTDtDsY5oRbBKepV5ZtadmqMfwsCsY8hJZlsXBz2b+EH2cUbZWUgIGUTSYCrJyGfZx+rlOQ3vHsDpx+DMVcGFjKMDTEug0U099FY3Exx/bUM+rO1/ur7BTsxc3pQYk+TAgPTVoAP/1b+w7gZjTyMnVCB40qf19ohbCXDWJPjwCZYlJ+fOp0euAiL+QJJyw1kWHP5XN4xpdnRmYRQi8pu1kO/SgWCt X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 199265bb-994f-4067-31eb-08dab3a0b56d 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:24.8516 (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 06/24] 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: 619St5kJ90xA Also rename the scantable variable to idct_permutation to better reflect what it actually is. Signed-off-by: Andreas Rheinhardt --- libavcodec/imm4.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/libavcodec/imm4.c b/libavcodec/imm4.c index e2aa20813a..ccec5dff43 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 *idct_permutation = s->idsp.idct_permutation; int i, last, len, factor2; for (i = !flag; i < 64; i++) { @@ -152,17 +151,17 @@ static int decode_block(AVCodecContext *avctx, GetBitContext *gb, i += len; if (i >= 64) break; - s->block[block][scantable[i]] = offset * (factor2 < 0 ? -1 : 1) + factor * factor2; + s->block[block][idct_permutation[i]] = offset * (factor2 < 0 ? -1 : 1) + factor * factor2; if (last) break; } if (s->hi == 2 && flag2 && block < 4) { if (flag) - s->block[block][scantable[0]] *= 2; - s->block[block][scantable[1]] *= 2; - s->block[block][scantable[8]] *= 2; - s->block[block][scantable[16]] *= 2; + s->block[block][idct_permutation[0]] *= 2; + s->block[block][idct_permutation[1]] *= 2; + s->block[block][idct_permutation[8]] *= 2; + s->block[block][idct_permutation[16]] *= 2; } return 0; @@ -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 *idct_permutation = s->idsp.idct_permutation; int ret, i; memset(s->block, 0, sizeof(s->block)); @@ -185,7 +184,7 @@ static int decode_blocks(AVCodecContext *avctx, GetBitContext *gb, x = 128; x *= 8; - s->block[i][scantable[0]] = x; + s->block[i][idct_permutation[0]] = x; } if (cbp & (1 << (5 - i))) { @@ -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 Fri Oct 21 20:12:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38885 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp956245pzb; Fri, 21 Oct 2022 13:14:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7vnRHeYKZk2i9YVIyedB8hCTDjI3ltnqRM2fLu/t82pXm89ngJEjZGQjb7vTWS4CQhX/oU X-Received: by 2002:a05:6402:4029:b0:45b:d50c:b9b0 with SMTP id d41-20020a056402402900b0045bd50cb9b0mr18953151eda.126.1666383240392; Fri, 21 Oct 2022 13:14:00 -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 sb14-20020a1709076d8e00b007820aa60dc3si22106054ejc.74.2022.10.21.13.14.00; Fri, 21 Oct 2022 13:14:00 -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=NnHFOjMO; 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 02AF068BEF6; Fri, 21 Oct 2022 23:13:34 +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 C156B68BEF3 for ; Fri, 21 Oct 2022 23:13:29 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dtzukvlyOWRV2nA1nxcgDFH8CwGEejVp2j+j7H7MvNza+CMc8Lm4kCFXVegVDY6i45JxYgg/1qbxOX937bFTJPSHprEQyQBxqlJyEinaiSBmPsaytz9j5ekuc6zOaUfmCNn3mi5LM+JylNr2IY6JNBB2NopMClgjd8CVgUoI5oxmAuD3B8XR2SAh6pHx5ym1yGCGHUp+Q2GxYZdQu6uBBowkJY3uGO6kRieuvRaIc4peOGNCQ1kgmAdVCP5a8vp9CVSS9FIhfC5nQaUD+xwlSy6Orvs53mWvTXYCQ6jB8tsaVN2RJhLvLBCoPuxOMgQRpb0cgy/OWUcNXTF2fR9pAA== 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=LS273GeTEgCjJaQd60H0uZw4T8XpWgjOYmWsT5vVogKwjcxCpT97HLS6hf6zD+1l9Z3bFS0xXwZOopiwU1NgxiCrVaL6st6F3Op6qclCKgdTYRFPc4O22J7PsE27oUEiFUNsGc8dIW2ZDohLokjqghudhmtRdh+9ta3ZVOAZocmvHom55ciz2iJyTPdT0uluK259nPtIYdAo3CjOY0tE2J0JvNFj5oWSpYCdPvPsf0MhXOaZKzIkR5gGOxwJoIOm9zU+sZzpipYf9SvUKjRg6VaxQM2cbFhkj8L+RRG0E4TFNVqsLbur8pqzhqxptWME/0nSd92ZROmn7BhXEVgiGg== 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=NnHFOjMO3Zh5CzDE15YalssOWMgfmhCbqRqIlARU8iN1IoYFEpH5PuQlT9L68mB6LvOzZc1jYiZEvD/hVnCnkQoG1VfNu3gXWz1vXZgiD9qdNf8Ma7oUH6eH5aXYsg0XkFfMHr73mWdaTrcterz2rIv92muE4my+ZToSte1MJoLSI8waYAxbDdVsdxSna+wR16eB0be6vHLOwtxwhpywMKzwYpWU7hxXe9+Cb42suUonEm7h5wK1agtftGtdO8ik2z+u78gJVLggnn0HbXgxZKtCp/DeP9UNL/HgPT1y+rsMpQeGltcQdBhvdakEvXmeWtrJXzkiOC3d6ARu8ENLuQ== 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:26 +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:26 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:12:43 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [q9XTVopjfRyKycQAKzJ4wK1XQxx5N6DoM2cE82ZnLqw=] 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-6-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: 6ccf492d-ef34-45f2-8b4c-08dab3a0b622 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmoyh0/rGpTlCzjnzrUxdxR9DBJpPCTeV+VnQxlJfxwv0yrA5LlZseRii1/Mcc/dMjFrEwILnuQGs0M5jmY1kh4LshGP4E9EIJD00un1zE/X2StHLihbOiSPv1XD65SNy/evEWmlfZNh0VhX/G5odPbtMgVz3NaeMRwBrEtJVIQ8FTbp9381ecuLmWYUL9mS+jobCXxIh02UIlksK1A7cXwbXnDVoUhbnc7NQrz4PqVcYtVAs6+kNTGXTIQf8o1p0mEyX+nnvCFskXKHw7NdDDQ8Z06+LaJ5ONOTqAlJEGYqhp9N0JRPiV1XW78mkgjVehGGKcbCCJN26zi7219I2zssIOsoadPD2G16tXWwrJDFvsr8ejl2jHfsjqpD3ngafjg6/+4wGqiAitmbGZ02eMotlCGzDEoNq91Zrm67ATkaHXB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zc1qR6tpspxqUHn8eSsKjbiJ+YYCrTWVVozze/+aFZFvDA+iBfKx7mFJYzqO1UNoiD5PUkQI0D3VxQzjFcz20Ntrn9ZRaA+d3rRqsA6UEK0Nv0cXmlA4oK4P7z17PR5pAE4Mmojz4TjfwCNr/RNlMnWAy7c7QGCYqpsuhzMHtyKSIdwUw7sZD/dMvNNvfUuGPAswiRFvsCm3dMOa4SomFfwnOAv7Yu6iFUFyWew9lEBhhVUe34w3aHLrWNM/Ec8HER+YovmUT9X8Qua/M0qdh2v3ARW6tHlskGoThLKJBH+6ALVIF3V95McVztRb0rZjLR4r/IoHHleYGsAES7 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6ccf492d-ef34-45f2-8b4c-08dab3a0b622 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:26.0076 (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 07/24] 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: 9gLJwaKLvjQ4 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 Fri Oct 21 20:12:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38886 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp956320pzb; Fri, 21 Oct 2022 13:14:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6vHKkmmEIZLnhBek5RY0oVS4wfr2r3PNTlwvGcl1FBUjN+rGao2DZ6qXN/JhjgEL3LCmE3 X-Received: by 2002:a17:907:7245:b0:78d:ec9c:e743 with SMTP id ds5-20020a170907724500b0078dec9ce743mr17408376ejc.466.1666383253401; Fri, 21 Oct 2022 13:14:13 -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 g12-20020a1709065d0c00b007707ab4be23si22394678ejt.560.2022.10.21.13.14.10; Fri, 21 Oct 2022 13:14:13 -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=MYE+3siB; 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 1129A68BF13; Fri, 21 Oct 2022 23:13:35 +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 198C768BEF3 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=efkyTg4f3fqbyxC5KWr8YjDQZ+oIym0isaSGH0sQ0QOdI7cXHwFQcXpXwTYYONoTC34m+OnQ4Uc7MKozsVMvNU8hgeNHkNIKzrvBUGkOAa6rdjnacf+VVxEztuxa7UiyKjzDbP++MCvf/KKtwXDSgia5sWDPwgkoPZ+tQZI6tKH7XAEVnqs6m5AK/Jje0wNhhXTNeFkXwOizTwSeFM8TKv7znNuc6NTwcM1X6GFvJbxoLFPxK/IrX3QZTnhMCH6wNwLa0lA97FCzEPF/YXKDrcTt/p1BZjXUbLH5k5Cv8tLAfErZrMLrkoTsGM3PKwb44F0PIT60aUqTH4K3/tFNoQ== 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=D87HpbzrVclG4nPHaJtV1J3JEXB7yuPNF3NkZ9Km2wk=; b=oGc1uDvgz8fXe1Cl7TZFZTP7n196DVCwhB6d0h298s83Vm8SOJhHyoqGZ5zaN5MQBV+i0k5aB/UPu8D9hvu+3mTS3N2NkKuKwaBQ86k3E8KcY4g3sRsxWN92hP69Qxx/yMrkPXx0zOgrUqhY45TpiglKCytLv6+OJ/g21AbyiRnJgdz6BDkNhHa9wCY03G996iclyWBTtIP9dr67Ik+6I890SS408Pc/Yc+Ofw5GcMIgeoZCLq51W7310zcSe34BYg3YYDN7tzD/aV6iWz0UiomjvmSVpMsyEeFKj/0yz7SXX4eqaCT/GCpHjjLhpwwYs4jhbjnx6YyteASI7x5Kvg== 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=D87HpbzrVclG4nPHaJtV1J3JEXB7yuPNF3NkZ9Km2wk=; b=MYE+3siBldm5+NGZhD49pTaxWJI/ZwuyA+fdG0LdeodcMwk2qnKZ+OPfPSJ5tcoMbApevF764DlO5EHb2mY2V4k3LjPZziMpHYfVHem2kNpLWQC5GP0NdEi5W/e7vMsBZwoaqbESlq5iwzkNcBucBSyeaUOz0ALDN7pMze438+kyI4YHWCBtaiOiM0jZpIQzMP/aztIKxfHUYaQRaaVfh4rlpKCHIIy6tEfeLPLVwJXYjTBQX8neLdvSUqh8Y1MGtkrZapQLzIvpVVa0vN6H7XMcZJRSYpjwgowB+q/23vdepnvymX7Cr0JT+WMx/FoZYk4y9sEo70XwTLHZod0POg== 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:27 +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:27 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:12:44 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [YvNpH9cjSSFPChMAt0cCEXBd5O7LJskTLSbLje9cL/c=] 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-7-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: 2c2f4ef4-ff0d-4746-8ed7-08dab3a0b6b8 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nnHDnbJ910YUAai4EXr732ZAE5assxEuU/fNPiASwg/xx3F3RNhA47Oa6sSG29r+1Rju1bJax69uSJaVn9VxcOHR9LnsLrnmGax+//1Fqh/evwwj2uAhPiGuGLke4tkipY7ws+QawDiH+Vo0qJUYoqajeD83Y9cF/cfqwVwvppZHaR/rltaua77NG2nuq+QkIt3HyR8NHZeLJAc6rWlu42zeXZO9r85RGv8zQLFj6OVE+nGhTy6fayFL/Id76jpOFsR5LKvHLuzmLX171oM3LGVGfgVF5EReA4Kea8KcdelT/z0gz2XDfti5xAwXPILZhpqT8PWs8S+2r47CFIiYbZtt8IyCCzO6wAIt/6/zlS17+E5ffxporERphIUZS1lDzrGQn1bLfv38tqFZwsmqLXycOTiRYzwEttIJVcTfvqsbtiY05FKn/2plmM0TJru0mm3uOmT54Dwuoi0gWlwBjegfM49s+XWQSiuAnCacpvV00d+PP3IAHCjW4RN2FWP/NCL4pY1wFkCUVSdcCyH+tn1+BNkr9L/+JC18UeWeSF08RvMjf/MOIoCAyI5J4RPz8UO9PZBrT8oMCeqsCr8Z7lV43PxY1rY3QJbIN+/36B3zeKsaqIlhmi7TCAmGPRR7WgrzzPWwFOj/fsiK7ivfqQHOGEENK0++PEBSE3j6ug2W8qSPSeAh6t+3Z0PducOUydnLDyOC8vJOQVhgtKwTkE0qhm3N/Vr+wlIHwnyyIPoTENIXT+P91tNPhKxUh/7AVLrcluxycvZMqsemmQ0uNH X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LEEgazYz1ldpIpIn+1SL8LD50ws70PeLaFMkrHfiVPhn3pgYCgjMrG8fGI5+4XrUvzeLU881MLwwp6yvwUNFpOw7lU5F4g1B4qC8co4iF0eCxeZw6LHQBaOTUhkr2httLGNLMEooY83c4bD08M4/jIBBvzQKmrluhvQdWH1boeakb2WUdv4F243eER5NX+xmOCW3Xp/WHxpf87U77ASiM951Mvq1kJvROPpfp5aexAeAxLJw/2xhD83+dtRZo/Bd3U9wku08U0isXd0uefp/5ptDHT4MrjtDXVLHeAoJeX5wBMRyBOqUxxiWtZOV/uPI84MOclgunYXdrsRFsSJmoHwfcbXS0V13oyful3zsZV2gyjVygEQqwpdSVdibPv4Cf51LwWPlyr92G/fZQJzOP7oFIZEfyUSZCuxF4lFxhDlaHP2ES0e09kFae28tITy88hl4PXGF/1oKItUjlg5AWQxyW6qUseIB+f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TFXLirrFJ0yBgONoZe5uPjQrgflYtInuXnQV2xkinyw+JKFAHbLOhSJalodacbNs18YMsudYNTFNXoPEYohWB4Rc3PhUAUeKPclQBYioyowrU18NFSO+NIdDzrCnN+EawAJozU5DRRDkE2s/WOuqlkhkgcabdvK3tKoLotWZ65OlgokXwbnDV1Ec7asJ0fNWpMBsLqwi12tUpiYVS/eJJxqKpnmojBwrifwWB1tu9S3Q7iFxL3ne5bo8etLuoccd3X9l6U/bFyqWt7+uIswshnBl+KWIQGcu/daZFV+GnafzlW/SzrnnZWQOTg8HR0WNWobfMeppe+L0JB6uCLtUW0pbZbG1g1OKq+44JFUjPg3pp+sN/WgR1l4t8MSI0m3WwSzmDeeWBQZTzaf6lBuUsssAn4yn+WpQs1K7gABugeuYS83m1kzTmcBCyHyiyBc1w7pDwqowS+jNWzkXPSdybVnDQN75PQ7aY9/npws2bZ/Nsswxy2wdlPpWnDlOq6N4PVKnldavt+wJ1JCr5vb9p5VYhG83EWM6XPZRYAb1 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2c2f4ef4-ff0d-4746-8ed7-08dab3a0b6b8 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:27.0690 (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 08/24] 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: dzvEWvS2gL94 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..374e4f4ef2 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 permutated_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->permutated_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->permutated_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->permutated_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->permutated_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->permutated_scantable, ff_zigzag_direct, + s->idsp.idct_permutation); s->prev_frame = av_frame_alloc(); if (!s->prev_frame) From patchwork Fri Oct 21 20:12:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38887 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp956351pzb; Fri, 21 Oct 2022 13:14:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4p6b3p2fzoy+NQau32aj++oOTfsg/BiVYA9Xi8kf2UOMp2ZCJ7mhJVWVDeYzYN6YQ4V1N3 X-Received: by 2002:a05:6402:1906:b0:45d:db20:7709 with SMTP id e6-20020a056402190600b0045ddb207709mr18605304edz.406.1666383261136; Fri, 21 Oct 2022 13:14: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 tx7-20020a1709078e8700b00783b75ec298si18274340ejc.395.2022.10.21.13.14.20; Fri, 21 Oct 2022 13:14: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=ZL0DXdIK; 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 BCD6668BF1A; Fri, 21 Oct 2022 23:13:36 +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 45D6E68BEF5 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=B9YrPyFTqN+utnUy5ODCMabHK90cbIFIDv1rsVSRAdjvvTDAbeIiFazUYmSD0GY96jxbBlM89wwcxbtvEyErxZkTMe7vTGy4vdMcPo81FGbG/fbaP23OXu0Fjdjs1jnzCE89PCRI2hJljyKE8X6+dGj0oNTzqowbn6tfYRLBLgKs3XACkkQHth7MMpF2LoN3rsT2VpPZPUaI32QERFNIbwZopuTkk4fnJpdxl3gpVxaTB6UHC1JqxhwhRo8qyvZSEhF3OGVX/L6MrZv57kj3if/3h2GREArGpOxT2Vm7fJxjdPufUcBxpq4Da1/ZkRxsoeyJ+GZI8jOtuhxNpXIC/Q== 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=qy3lJdh2s0CyQKsBGaA59LAcVm1qp4wHHAzklLb9O/0=; b=EUsxL0tC0h34AngS46pCzP1Z6HHaHcM6ngEDXPePs/n877DGl92puhDRdGjZwjoRCQQK82BZMb2eLsEPhoRzj/AFAyk/9Oy/qv1HgKWfUBtUnL50r8J6mTtO1C7ElxiqRQgoaL4cfD4IRuyac3ubpa4C+pUulhOld0Y3RQJ3B9jsMZC2/O+WMy/7lGB0p5KCwEisCbFmuxFEvHbsaQBPzxaoirj6ET5U4y4FgTd7kSviwJRfVMJTaNHJL5WgKbmiHx134U0pcfdwYxd/O5iVWEjwVzWoxNNgkPzX3VpoDtTctfkhTmoFYOVqX5+iK10QlobWJ0r0tgmWgxdfYqjhmw== 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=qy3lJdh2s0CyQKsBGaA59LAcVm1qp4wHHAzklLb9O/0=; b=ZL0DXdIKgxpkGkvQ3z/lixQ2Otl4oYsCogc1QbR7Zsx9w43UwbFYcthk+YTym/HXHYpKIcncgwhqZPGwEbwOGzaGhAPSMHXWpuRMGyb3sblEi3TtwssZm+/8d0RdkCt3c8y3i1twOfLQqsSNsmmOT7uthy5U5COhtkyNRfPHcCwLlXJJ+MelPnRPwFOY/3pWZH1IKlxd0D0eICm9l9H+a4/OQTB6IRzmcy9floXU5R3PlEllxMT/xfmDjY8ezMjYv7YMG/575Od6G/zFg+2iPFMUJJiKDldRanVKG8QJUv27gUCHPBoXaS3UYgGOyNODuc+a4TZjPsUFFPzYlB8dgw== 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:28 +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:28 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:12:45 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [zefGmh+4EuOelJC2GasrxaIiUw6VuMc06nGnkiU/J58=] 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-8-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: 7a198ebb-bc7d-42b3-7c28-08dab3a0b791 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nnHDnbJ910YUAai4EXr73266XZnnKr8kwpin7mcA6O2/VkN2m7QS5aKsVLGsU+wDQmQPgiyVPA2rC1+Zeks5s6ak806AfUXaTTcMdEuuiQ7YrPtFT2l+qjDwTJZbl4OYrCxvav/trcWH0VdmHCsLCMhTQWAnavbRJxqNLFFmXCqd32iz43crgI6xqkVbPKCU+yuz4GgQV8JtrXW0F4s3gbebFwFyGew64cKFfVI0NSe/JP5Zs+F4sqdRRAF21mKPg/e6fyDvQAQKR1u2GFpHOuPKpjTxNkXSDXlC8PitZv9eNlC/y34R0BSy+yb5zRS15mwRdLFXV2lMHETefXgeBmDp5d1eDW0vNq26U7bXasHvvr/u6bexENHdpqCl1xXjQZF3NyCH8sK/POTgtVsmrvFlQiUhw7SA/e/B+tkHT6+61wqeOBUrp17ZI4vh4StLf4wm2nADdNVWZxqOI3UmzOGZ4oK+dzWZ0hpFBQ7G2fiNkGcl1kxOH1JM4S0If4853dWRTIQTZ8D9WhC7Ia99O+nMv48uuRZO/tQSSeMJC8VAMUIScWrfveXKtJgSLEZlVvIQ/FpURjxZN5da0sixf+cOGMBYAZiKdJVDslITit2uqh9AlRG7e2ryUCB6nG+cM/qu9FX8u1/aPiUVnZxZ2cDeUXZkFZLb85c2y6TtMh19mslDygmJ+TKHDWGnD2yJrWfCosXqv3aEf5XAcp2eqSy2GfN3H65qtfQ4qlUu3X1C8O9hR88qOPds1eJ8Sbok8ELwN2XbMXkQorR+CxvHWB X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0u/sXq+vZ9+UGttRe51xT+q99fBHRMKIEED593WPirbSp9OaZcxzICqOudmuCKTojKBXyjhQ7u82WPgg9wZCIdoofLXXfTAxEFxyeJMHbf2qgWhqo0L/3krE4K/71m2ANPzazkuidw5+Z2wk7rnPCDVzMDh/VhhlPVMoxCeynhO8dhgnaan5s7LTMo2gsX0wjqxU5OF5z1HBLG1vyQ6LxsnErxZ3yK4l4WbDOHXKOJFrvtFOuxM6C0g2kXOtdsYi0hLhRIYept16NzuIoDwxaifj5JMqlRF/0JUnVkh5Nf5utYSN3rxnffx0B3lbgSRSi15mZGdn0PDEYoHj957YAtdNnqRK31ZLWAYddG2B3WUV6c3DuqApp9b2JyIyo6KW9wVT8syxTg3RbEFJ0M9cnDe6ENB8hn3Kz6YbeoB8aq2lb1dVQyzJLUo0lgAUL3DPR9C54ujpA2ZyEN5QeX2ci7QU/H4ggN5Tazj2h7d51Z8PAuvySP0uslYAd+GXHqtpsjeF9GJmm9sisXqB3ei4UFyySef/dFEeRqQKzKA1hHhGzFLqKNNh8q4YPlN0o+04Jb0mxRvmDETKyaG52IJPbbJRvHDka2Rhxl9bDcfVPabKvUQ84R8+ylqSbun9HHoU5u9NyyQPbFgtKwNX9PIvJ2/xdKIceX8eYLRamU9/lt4azV+7dcrFkN06waVNu29V X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YaY0mZNfVOhjwOl7G6PxkbuH5aN/oGDTOrBw0OINAdoFiD7OINB3w+4mabqtY7qG2gY+cl6T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iRJVEPnfy59QqRvAKCmI+AwmofqYe6q/JYeQkJ4JJRDSbpyKfel7z86yNzEhJBwLq73+ZGrx+JAomg8uynz3O3WXF7tMQYiPDrw27o/bGaHrMQXbSt9UbSRJV5APCrnBN0Ck/wpn6Y4r9Q+ZekuFA10M8dm+E9K5NaYvuispwJWLo67Mm6r1 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7a198ebb-bc7d-42b3-7c28-08dab3a0b791 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:28.3968 (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 09/24] 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: yqrA0R9gpNd2 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..699aab9f8f 100644 --- a/libavcodec/asvdec.c +++ b/libavcodec/asvdec.c @@ -58,7 +58,7 @@ typedef struct ASVDecContext { BlockDSPContext bdsp; IDCTDSPContext idsp; - ScanTable scantable; + uint8_t permutated_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->permutated_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->permutated_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->permutated_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->permutated_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->permutated_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->permutated_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->permutated_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->permutated_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->permutated_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->permutated_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->permutated_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->permutated_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 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-Microsoft-Antispam-Message-Info: O2aiUqF9+UM1pjsGyaMIixd360Jz31wXxs2Gk603riS/9B+LL56onfy94Z/5v5RP7x6OrFTS8EzcS/EaBQAeYH8Fmk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D.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) From patchwork Fri Oct 21 20:12:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38889 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp956467pzb; Fri, 21 Oct 2022 13:14:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4ODXTIRq80FV0CzZ/UXd8X6d7cKS6AF7Z2ppC5rPWoe4lPIq/LvMWqJrsv0G1XQZxoLUlV X-Received: by 2002:a17:907:1c17:b0:78d:df89:26c6 with SMTP id nc23-20020a1709071c1700b0078ddf8926c6mr18010132ejc.20.1666383280278; Fri, 21 Oct 2022 13:14:40 -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 p26-20020a170906a01a00b0078db89b2566si18695826ejy.699.2022.10.21.13.14.39; Fri, 21 Oct 2022 13:14:40 -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=jzVafIdH; 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 D455568BF2A; Fri, 21 Oct 2022 23:13:46 +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-oln040092073083.outbound.protection.outlook.com [40.92.73.83]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 778B368BF1C for ; Fri, 21 Oct 2022 23:13:45 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lweESvHdmUWTShLN/bcFjYTGEipm19R/azXiAdtJEG79bEYTKtHtv3vEGWOYWbX5GKq98oDmBvN5H7yKzJsQkb2MNAUUZqtFMgjLLli0kAvI8BOTwIiR3eeefv7eB2b/q1Hcs6aUK6CvPEdzoQ0Sg4F7ehahrfeNxCeCrwtyLlpK6PIuiNekHgZiMde2N6pt8fsy0qkLbwyXsR/ZH79IFHutFq7DMzeDv21RRlxAZUnMEmCzSbCgXY1LhUPhu+lFG9IufwwxcKrXfSyby+XUQIUZ/BHSBJkCwhOvTAQOuVlco1Jk9Fyb98q7j1riZHh/e4JAIX+t1yZhXAr7QFCACg== 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=EKHchI4hKKgjPSa+76+QU2ROABi77J3J3dfTNDYzS+g=; b=ee3oz+WwhNpicm0bP8VjRW5J+3H7LbRJXJc2kSEFUvtzEWLzlZ5CKgHdGr+jU9N0ZLzTXmpBFJby/KTS60W3boZRwLNRTbDQcbaEb5WC+xj8ECwP3lNW69oZyUu8FxU1gq74LVxA/MGCY7bwRYrcKxTW2GtInEUue4IrYn4n+DITiZQdszOHUgRqehbDu3W7HRKYWg+biDhOug94oFJTZIunMXbxINZ4Sh/rC6IISyka7gEBJD1GNBEnCXDsXyX/1MFSRv/BwDoeLB5HTZhtrif9LcWu8Y1NZsIZV11JQOh911G24cF3nI7dn6UVP6ECfgejG2Jx3UN80qKuOSG8yg== 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=EKHchI4hKKgjPSa+76+QU2ROABi77J3J3dfTNDYzS+g=; b=jzVafIdHO5QGeXq5LnEJPfpb9ihWikVJRCrDrO6vqQ2GGFVnAB35YxZlhHFw3SknLldu3GdnLdW/FA+5O3WR+HQvzNpr5TgBEWoycAQn6fwjqFJmP39byEOdIsuM40GGkMrvZjQ1XIgZJKlOVTpfUJQlI4V3wUqIdpAuP6HXmPU20FYWx9Y/YplT2w2sqsc68gRrpqQ4jFJtt+FWLyDX4DKFXoXRALsFcMRsVl94lH15Aoec8K2VKPmQ/nQ5Io0n1gj+d4STdJ+0BwXKXT/NDYmdNIh4p6PTYF1sf51aKzkwK3aaWAs+XEEiekT9Jv+mZa43kogplqSKYBnnjES0jw== 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:44 +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:43 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:12:47 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [if8Aouub3rKKkq/u4EMXNyQ0hhDEAToESMS+yoxhqdc=] 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-10-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: ed36f6be-6f86-4fe4-f2ac-08dab3a0c0d1 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nnHDnbJ910YUAai4EXr732GLpF7LsTwCxs8MSDKgVGq+Lw9YwnT4iNPj2/Iw+b/OuGDDPYDJHM4/HmGQoAHvsbWixSxR8+6r4/h1/D7lI8KHrexNrJR9OAU2cPhYvRj+/sv3fY60RqQYYl1hbqdkFdf8RHMJ6TFzxw/idy0r7pTWWd0HtgKlx/yRVA1Y2Wjb/cMENVG8hPH3Yuu8DXozAdbmDwCBwQ8wYJ/r3Rb1OhegVLMifAMAOgN9ApfbE0fwWsk9JEJQpL3x6EcuBUjIyBqDt76qB2e8u2kK34ctX37QCD7sGdDliJP7I/6didGswkWDxJmlcYFXPIepn6X7l9ZNdfT92c1YXJaqgL0Cj9C80W6yMYshQw4ShgFgqhg7oKBv/uYi184ar4E6+yGfwsnjrPToazUzU8ViS5fXX3q/c1ZbhJeYPUdRAiQLZf8OFQHpTEcCSjjMN2C+gFvqkfB+Gat0+5wHc6p70prh9OUmp72DFwQAmXvlfIDODc2rDnoeNJWd26Gv5c6jqqD2Upj31OxDuo0c/lZ0HOydpbLvwjVQ5RvB98rfcdkdTh+6sz0/DMY1lrr0Njg8/tWfkdl36CMom1BhUWqXo8v88MvkbkGSLqRNJrKhl1fmFhe3/KT3uJJdHqxtpO2Ez6pmBNkvNS6cpICvWokdDy8ZK9XrXvX2ULmI1u9Lo7MOD5G/hzaMszKhL5EO965J+HR+/FPMmmvoX2+tt1qVFkEC7aEsYNfpAxQiCja+Hhmy/aSuTIjwnTu5E2qxBEATvPvw1u X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qKnWqkCc45D1kHoRVQ5lu8FKFZ1L33X89jYZQAgUDztVqwvqHS3lulhHaxi5oLLCKV2K1S8t+ZysKaEOg1Xgr5nQaX2nIuGxNdKvcM/EjxSsGyivR9buj6pV5fqFJRPVpqiyNGqslXTYKCtWBxj6OPG8wCets9zjCsvmajGpbnlh1CNpUMk7FOZnidpmS699ARjnXYA++qPCwAvuWVnVw3/RP2KfMZ7jg0qQOPidqz9QBScol+eKtFiIDd1YYD9o8K1uFbGQQ4OYnmQFI9AySq33fO/zuOB/Sx1yCiWqFsewKj75EMqAcwblng37b8pLefo1H/pOh1PRRs031PlZEo6RqGSiHkaI022WR3c+dj15yrANWYxa9MNTjSEBGN88goNPRj/57jR2sv23t0AVPjYPAqhRx0WuSqWU22QxOOC8Z2ZBOxpYwz+s8339opmQ98VCvyyU5TbqNpsoOgda5FjFHek1YwghNtMmBKGrdg2eeSxRvlb8p4OG/xoHMBfs63vx9KNwUnLvL07d3N301h28frJ68f4eTSqGjUsNjFlUgzQXwO36h6oNDlhDOh0Zaovg0M87US5O7kLNLWa08TrjxVJJdje6KYiA0VNx7oYjowXJ/NvpmoYKza+60Ht0AX1WLzb8zlxOVbec0Kj3Jet7SHmVM9qai+pPVmAUFoPK+9VGNXy5YFN0vsLAYlUP X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: V68EMDixW9ZujHwm1r1wMg4JCEux5pmxNvrvqhXOeEoS6sVuRsCZ8dVoG8/Tin7nJ/Oxzx5ui2oOi44P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oMzAd5gBGGVXSvdYreSvy/Cdoj7BFSsGN+JxoXqJoULBe2epgc5ItFKRxvgz3VdCynHDv/91Tp3Cgc+KflMgxX+zQTi/ACkNrcA+QzaoKbKjMH1Imu4z81DlIaAi1pMpGkWOgXfnFy5fMPzDQaG6EdpOGwBRb88bYYLAJ48/mwzRcT6F1x9ka1 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ed36f6be-6f86-4fe4-f2ac-08dab3a0c0d1 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:43.9500 (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 11/24] 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: eMLBfDBebPlQ 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..fdd577f7fb 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->permutated_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..244c322b35 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 permutated_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..b1fa9a981d 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->permutated_scantable; /* inverse scan and dequantization */ while (--coeff_num >= 0) { From patchwork Fri Oct 21 20:12:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38878 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp956525pzb; Fri, 21 Oct 2022 13:14:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4DTWn/O0U/DzzqGgOEIzRstA578WwhP6gtaKCX5H7VYnQ7QS89rSetpoS++yN52GzY+P5p X-Received: by 2002:a05:6402:847:b0:45b:d50c:b9aa with SMTP id b7-20020a056402084700b0045bd50cb9aamr18841628edz.289.1666383289475; Fri, 21 Oct 2022 13:14:49 -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 dm10-20020a170907948a00b0078de8d119d8si6989819ejc.853.2022.10.21.13.14.49; Fri, 21 Oct 2022 13:14:49 -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=m3lfgjdy; 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 0D1F468BF27; Fri, 21 Oct 2022 23:13:48 +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-oln040092073083.outbound.protection.outlook.com [40.92.73.83]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A6A2D68BF24 for ; Fri, 21 Oct 2022 23:13:45 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cSeZazcCOWskzeovpholQL3CoBhOO2Hroa30CQBPwOvEzjZk6Y2KK2RGjcHxqyTxbHaJu0fOGGaH/pwbWsIm0MqTKLNSqvn72KSistitAUS14dHdLrKMuOkX+cLdbdgI44cFaEWJT8W+DRV7MTPPmt91aPCY30skuV/DDTHVeEdkcSSHxn/l64+gU0so1rhuox5gxTz+pMv2QvZTDt1AhjxUBmg0BYlPMcEn8z5P03mer6T3ZdmDiKXtMJJ8uNe4SoBNZF6cE8OcjmQGzGqeQqf5FPhuEhReuD+Vkk5wHzw2yCspnA4IDdsR6YjUTOjrqOwm7wAcyEMaT0FbSnin+A== 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=bpFTuP3G2zlppZ8HYfm8+FTHUAzy1owmdHW1uKoTScU=; b=mjw7c/sb9fbXSGoAZPqm/FLOtCHsklX4dK/+Naw0wkD8v5GEWXof20CtrtKqsugqPmrUh6s+Koww7dnbsA7wgQO1eRPpB3jF/szmzdG21sVMa2q+mNFP1hJ2wNBV3+E2Px2rr42AEmzggT9KDdTAZBoiH5PxDeiNNaZX6ADoLZbKvef6Y1DfrglidE0fT8JtjcnJ1tvTaopwxBjkuhFHfmnPzubqao2NhQgpHzsIhh/742r4hnNI+Nk734RMaoIYxXRlWdDbs58qxaO4dVuohgCxsC6KbNT0/n0WwFLavQV4+cxWPi7bLn+49PIgpHUbQm7mKd5uq/wY5p95i7f6yw== 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=bpFTuP3G2zlppZ8HYfm8+FTHUAzy1owmdHW1uKoTScU=; b=m3lfgjdyK3GF7UA8955G2L3/c7aztRJt4k2hax6x8JnuFHul0sbEHKkNgK+NRKn8hlTMx+SjQ1SSPzdVVmrqH3QKUdzzL/KAkJadP1Y3Wt33JLzWZZMBJaJ4en4rsAQwY5LmmNYuPM2eo6eKm+GnILQYEYr9xVyXdZOBk8YtLipPY2DAwr1Rm7qs/rfCaUNO99EhsUmapMIjn+/mhy4GAxB4bDKrDufpftCj8GTR4V3WrEOPhIn81Ct5PtjZs/SowOaZAGwpSq1qXrL74GrKhjfajX/TMnRShyzDea3m6NaZk0wWV2BthLXJ65ZNvVZmU+iFeND2c1GdvD7BDQEpvQ== 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: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; Fri, 21 Oct 2022 20:13:45 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:12:48 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [sYvjs+fgnLCt71NmvASS3OT4GUJVgUGfwjQmd4iiGQI=] 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-11-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: 6fe791cb-f70d-4b85-c2d5-08dab3a0c17d X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nnHDnbJ910YUAai4EXr732ZAE5assxEuU/fNPiASwg/53vo4oZPGaCrlN1k7tw3NY99lCZV4lhK81T1vMP6jfCVco/tPL7xpukgGJ1iHzg/qkLmsSA84teaRz7YXOJWN3BMTLvHSXtUwKPRMix1yxgeMhGNq38bCFGi1u3xBdXesUxNeVfJvg5A4v6BYPaNrkuiZIOk7wHzcrz8G6DMmfH9+Heo3HsEv4joSpLfFg50R5bGUBt+8M16xrLiKevL9BQVdhAesnJccG7QlC/WRutUuN5xrtC5GkNms77pbmEaJwYn3uXZ0a80q2dXhXKe6IPaiPOHouos1X/r9qim+V3gIChAhv26tv10yQHnAL1udtzyz1mCpHQlY41Boq7S0x+h3pzyh60QIEKaoW0v7x5HZiJwQSctuttK54vsEW4ozXg8Vq+ue3QYP8fWwioMF1bC1JqvZePeM4+41vnWl6BkrSikdl8VU4lHo75H33L7y/FWhKgjljTRVFJ2PW18aMIa0a2BjpyQA94EmyrD6ADQK6ELg7ZzenbfFGi1XI73LDqbCffflGLMjQoRNaT4uJJ8XAmkSBK8fs9dFrvVP1TEfJnXl/m4dZzTmcBrDApNKnVKJ2Qb6j1+yvPx08J0WKJRxb6EAJYY8Gy8CaGVV003iPgJ+lbJufiuTfkt2Ea6WWV9dyljX+DNFTbEmCY1ZjTAwkejyMLvJV+5+A1q35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vziAoPzAwNsDYBGUtPcj+ARp6ZkHBDRLOzjCESMC/0Q2ud2RdD5pinOFGG X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6fe791cb-f70d-4b85-c2d5-08dab3a0c17d 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:45.0448 (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 12/24] 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: RdbYDUgE4qlV 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..1973ed0741 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 permutated_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->permutated_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->permutated_scantable[pos]] = val; } } return 0; From patchwork Fri Oct 21 20:12:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38890 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp956583pzb; Fri, 21 Oct 2022 13:14:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM64ADQ/UKqWt+jGfWnKl6FgD8WBsJp1rLYlUoPoNDa0zT8jdtWNaDE3baZT2deT9hUhvVP9 X-Received: by 2002:a05:6402:448c:b0:457:52eb:b57e with SMTP id er12-20020a056402448c00b0045752ebb57emr19385833edb.178.1666383298634; Fri, 21 Oct 2022 13:14:58 -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 sa19-20020a1709076d1300b0078dcdbe650fsi19185361ejc.443.2022.10.21.13.14.58; Fri, 21 Oct 2022 13:14:58 -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="PKneTOX/"; 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 E6BED68BF39; Fri, 21 Oct 2022 23:13:48 +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-oln040092073025.outbound.protection.outlook.com [40.92.73.25]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0517C68BF10 for ; Fri, 21 Oct 2022 23:13:47 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=et4P4nZ4kZVynJKstRNefrQa3GnO426CyGDkhHDow31D0EZ8M+6WOJ/Cg1NrymtmNDHjnFwhb2XK+m9lYk3yBst8sLm8+kLZLCFhh6KLmgL7CRvnQh3zZt3PbX5CltbgnlPburol51OHe7vVVIaSlMT2xtACRMWsjdOcdcQ3UKElbrHekAmWY1sEryyqGGbwc1iAR3EgAiE7+gpUUjGyR/hH3PMul1gEHyk3A5ELE2vwe0WVUEGS/ks0LgLAkn6e7DD2H4Mg4/WVnyqNlxHNviAF3Ab7xddrKHX/TqYdqCTm3/A5fhF0LmXUbkWbMu1zlVdzpzo6NxhUXPmnKtzOuA== 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=mM3H2+iwj897ugM4kMiqVnvwQNkqb367zBPFI4P5YDg=; b=IPjTcVGN4r7GG0QOBF4h2fe8/k4I8lICcPzqiprYVzjb8TKTN6WWirI45tmfaWCltz4C45h89zbk+tLVn7uB+LVwJe8WhpNOtAYnK84rHa+OznDsJHDeKMYbMsgwrAWDTR9ccnDE58L/0z1vof0swrHLhAIPR/VWbX0PVbJkxL+VBkNRQeW3MSkkxGAl10cYs8KMdi1T2loO0iyWE4A/TgNHWGsea4dGNn62lqp+czbcj06j+b8xJupGmadvHd31kH9HmivOMDt9tXOJTPd5yV4XqlaA0fqzYKMNQC38Nwkhy/cvCGDIxJyjFfku7gJXGJ/tgbVuB+0CU/1F+IvWcA== 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=mM3H2+iwj897ugM4kMiqVnvwQNkqb367zBPFI4P5YDg=; b=PKneTOX/zU7XXHQLKkIuYZjwusMmTtZ9OFXpP6BOXh0x8PvGgKVr1E1HbPsyveiX5TtJV5wA759tL8lqNwSJti7kO6Zkqho6z98ZI+NZVkxY/nXGPJzTqmrxs+gpu7SwzSF5pSGKoMsnQWAJmjmmS9sEpcSCoeJgAm8NHjKzrddQvdMnqr2bzNJeWUAfx9CwyhmHvIUPn/tWnT/RF7SHqiVQ6BrNPNPVov62oWStyzGcMSzcB7pW2vW9fCZ2p2XrHSFHiS7b4qfS8X1BUhfL6z1P6HkXRL40H8IWxBBfKawYOvY9edGEhmsglcL+egl0/0939Zw1xs5JB88mqo8W1w== 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:46 +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:46 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:12:49 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [pcqfdE1XrEue3BZEAhWaeMfguozQN9HKhhOd3kbVYNo=] 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-12-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: 8bc7bdf0-a7f7-47c1-aca4-08dab3a0c256 X-MS-Exchange-SLBlob-MailProps: EgT5Wr3QDKxlwt21SJ65rVaESusrU4PPVFiBlO/HSF9D+FtWZgRg5RVeRhWc5ZRNDLJULB1bocGAiU+Cln10JY5YpJ7Wz1pIdTSNGOoA8iKCPOl7yh+244vNB/DJcWHY2NORG27dorKIeIeDfsOu68fPAznrMMTe/4yPLq1iOEXUOi4vs9mFIFBwS8ECm1lu50iqq668pQGmKRV7tlHv4DW2uZWx57W+E4T0MQmkEJv9dsEpPB80egi+yPf0QnImF58DlI33mK862kU2eKRH9XNDm6at2T8d89k9qLFS9BCUFJsQqC8vzTJ1IXNHMpCjLbTQAG8+mdfzfG3UX6noKDVsr1bW2KiZdoZl9suZH9fSVn2T48/WtsXzOB12Q8e+vuBei+9ZLkMZm7sE5t2xT+OrQ4Rr8Ym2FBcA/+zbzoWulRTAdysbijKFUV4K4bsfoJp1W43CQ+Qpo7AjiNbNqJTbsbbS7bkUFQSGVhNTe/bYhtsWWxVexaLn87icRvxYj/rjJbVgqo75NrAEG+YIcUsueNAQMS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cmSY2LHa1Wbk0UazN6m4t4rDhNhiTSfKlgmzp90007HdjednqJVUiNYtLt44V34rnjEffo1fs3N+6buzaCsli+o6sd6M04Ulh0dvH+Jppy1awxHRpt4rO3QLxg3ye7kadd6L4XMPra5KUU+8cclacwjC0gS3+JFx6JN4BOt0qC1dA09tG8Lm+YzJZ9zwm7Ci9kfTZ0pHu5FmyFc0p/ X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8bc7bdf0-a7f7-47c1-aca4-08dab3a0c256 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:46.4664 (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 13/24] 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: +zAO3wEsnb4N 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 1973ed0741..761fd22fc3 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->permutated_scantable[pos]] = val; } } From patchwork Fri Oct 21 20:12:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38891 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp956810pzb; Fri, 21 Oct 2022 13:15:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6uGb9yFngtdFGuiVsjvV5YnF6C4z2eCkRuR6l3NQprM9mIGK8N91lqHuBZyCVwfPhk6cH8 X-Received: by 2002:a17:906:dac8:b0:741:545b:796a with SMTP id xi8-20020a170906dac800b00741545b796amr16733042ejb.240.1666383307484; Fri, 21 Oct 2022 13:15: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 i21-20020a1709061cd500b007825bd02a6asi16883067ejh.54.2022.10.21.13.15.06; Fri, 21 Oct 2022 13:15: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=DPCFH0N6; 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 B179768BF3F; Fri, 21 Oct 2022 23:13:49 +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 E5BF368BF09 for ; Fri, 21 Oct 2022 23:13:48 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JuQGvfGcUlqbijof3GWreLs46dkVn8m19Of5GYsysdA3LzYkSxRmhWjCMogSJNVmXr19jgK+vW+ivyJmBTmCdsv+78tWloebnzr3grNv5tDAK5P+yqL6tauFzWPtILBq7zVG6RjgEXybZkAfI6DZgCawDaZyYc30pJsXzk7pCXHGkZG8dG3/kaYq+zt/iNyKx3HQ5Q6WQq4X7QMeVdWOPjTl7wRABec8XRtH2bItW867lfmyT3Uyke4p04p9YUQIqTDe+wDHMidGVLnHmKAhB9oHIE4r0eVfu4LvUHmdobQWUzL47HJ6As1kD9inWrgXYwqSKoznLAAESipVJ4a0qA== 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=pIt/FRcJW4VLVnxb0QHy9Gjkg/sLegdn/s6khRfzdS8=; b=eqTQgx2ow/rfcVrr1Ay2T56v8KKvFPwTku+V23bz4nlsxOTYkx676UAT8BNoypcCYUWnPvvIC1h47CUYe1o3obBWoBA53+zxkmzYVsS3r7rzcu1uQ2d6G9Q+zDLi9cPiikbCLAdj/bEDNtVYoQoKtXPUpjSZhGhvDJ7iC4GBsWDd39sfN+ppiS44ouuX0UJdIUfK6Ual+uCDHXNOiqKndA+tDotZ/5HuEBdW2pB3TRmCTolLINSLEnwVKXWYmy4SESGfK8Se31b3QgxhxFdMiQPSWVC15O3mr97vT/HNi6LcDohZb5bHYFJsuvfvf/nVy2osSWwjMgytcnOa3vgtNA== 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=pIt/FRcJW4VLVnxb0QHy9Gjkg/sLegdn/s6khRfzdS8=; b=DPCFH0N6l3D/05S8hja/pjdvvpYldz76tTbcTTULbYH8QxUprTnOKIebqAEczzhN9PGCLMQVpXZ4vUFZFHUwYB+3n+A1bZr3pFdtcDYm4GrENBZUqIB4D1VXOp3YBctTIeZotSDPsFeamr6mnoDXCXFhCMUHVExzg9BlXiPioej/gLWAHPOD7QOGGmt5cdcESkVO55PNDpPXL9yHmqnz/+omfkSPFDOQayIqfabnxYR22GFGJE8aKBr+UAhSzgEmUkKn8VZzjNppWolj86yBo9EjSxMU2pztpqhTr/HlJ8+Chpc/ZDN8y4vsZVQC61bt8PbLbR2gqO+qblSLa31T0A== 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: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; Fri, 21 Oct 2022 20:13:47 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:12:50 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [BvJUY2V979RwmUxY1RzdOFC2lTsF6xAvlWEOph926VE=] 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-13-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: dbef9e3b-fd0f-4d6b-b41a-08dab3a0c323 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nnHDnbJ910YUAai4EXr732ZAE5assxEuU/fNPiASwg/xVRDiE7pyyTJUwDRP4t2ZGBW0KkKHbMss7MNmdCDPKdHYkhKuHlc2jrfi8aM5hngqKUJim2OavMd18BLFmuRNs2lMsVIlhiac6dlLeO1+cNmP7t9fZSIodGjPTvEXO8aAIRqhEeLtWneU+T832ZLVPA14c0Hs1HZ8WZ7O0igUQ6cR6EGLLfWthJ61V+CSggkDNogAT1m1S90E0rwltoX4rBrZL/4YJ1OFN5xVDGiALWN0ncm3/ViTmzfcUZAw/RB0NJHkh2Db3NDKGbVpUmKCjHUkXCyvyUlW8T7Tmc8H7MLndXMIYRD0BvpqweEotjxX6AFxEAw3EXZxhXVWh8po7oU014Sg0PBcYGn323ish2MMoSKyn9yHAwJ3VmEjrRTy2jcb2mBMEeZOUhblzbcSp0u/VExsryrC49MtIY+nnOP2n7jjgLfuQ7V2NCOTf50LFcUgkvjsp8cXzUe8J1CDuD5jLCuhZdxUTEJnPPtmY1Sn4UpJiUjRGc5b/dQADQsl1g3BvrWd/kTAQo2XPxrGG4yr+1Z/lfN5lNpGcox0o+7w6z6p6JDRdLTASoOP35raeCGZSaP+pbeQEs5guMRHajKRtezCoq98zzwDSePX1fi4p5wqsWCLlerrfmBASiUY46Qkk6x9K9Lvb38qTcOp91NIKcrNE+nh9C+z/zcc4hSeV8YwVKuiNhHOpEKB+rpTIih/mzqQ8iIexI1Hq6KafuqcV95Edrp0wVLi7v+j+Y X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jUQyQcFYtBTEOIf8KKKGCnlRPi4uLiNnwKgdO3b8fuW9kyqLdjWCfM35t0v4fZTsqfghxnR9gfW//RfpcmCS8CfrXOCihGaGa/la9D56BFP0DB5KE6A3LzL31Hf5cLpNZrcfxJQ+7NcplZfk2/+grahFf54pOF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NbD/NYqNzZ54D7EFWPTgtMlxX3XfA9wi7WsA6XfK+oFtno53fXqPieXZpVLvumu1sUEQXmCo3kjhDrwpwYGCts+uc+MIrzczZvXwTYGhuqJ8Y7sWHpmcRIIWAYgrMMpx92Ru2FRQzA2UmwWQfFdQbx2zDGlnbPkjvc1nvj1Ws3cbNXltGWesJEeeaGRHbvvPD0QK86gqlWPPZpuY0ZWHiiB66++i7NlGhLl42T8sf+nKNfawjpVoqYKRjx13YrM38lgmIMCaozXNQ9HGveEydU3qf/crr3jGmc3eiMLFY9G1GBCf+gk2pWLv1cC4srJpPft8tKThTcMPI2y7d+omJ7iMI2b376IiGCPE03p/oNIeHormtbO4EP9JSSUxAPjUZnYrpBZG/zhdzSIqpcjGw9Cz/0W4h+LStHUL4x01vo2d/pcDFLDJJuHFwQqJcztrHag7uZlQFWJJfkvFd+OThEX0GtuXhy6BFfZMhQvIoO4VCHB286SHjCdaEk5r+tQVPHx18S8fxpdfajLqsNYLUWRJxgn4OAz43QYSHe8qM1WlEvDlK2XwcQVF5Xyz8xxuBkK38Vskgkwp5ZLzKILLFKqWleXGcI2F8urHdKUZStFCaEaNi4pTuj3HGiHDaZb+YDCG2h5gaAPdMRCRjhxmgAAmO3VL0BIsKWc8BKFqQN8x+5+9I/SwdA9QTJ3miComir83pOzrrnUryNs+CW5d0SrnzGFxmXSUsMcqhWfXizoNagSc6AA1SZDniclMkTsQ73raDMGnXIJIrzaN7MduJwadUXobIAKJ99/K4W8uv/aajZoLzHlttugwbN6E9YBZUwZQz4S65OrlwcSqlJsJxUOQ58j5fchGJ+vW/x X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: dbef9e3b-fd0f-4d6b-b41a-08dab3a0c323 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:47.8102 (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 14/24] 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: /ekIDyXMtbBS 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..d6668338fb 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->permutated_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->permutated_scantable[0], ff_wmv1_scantable[0], + w->idct_permutation); + ff_permute_scantable(w->permutated_scantable[1], ff_wmv1_scantable[2], + w->idct_permutation); + ff_permute_scantable(w->permutated_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..8e22361f1f 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 permutated_scantable[3][64]; WMV2DSPContext wdsp; uint8_t idct_permutation[64]; AVCodecContext *avctx; From patchwork Fri Oct 21 20:12:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38892 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp957046pzb; Fri, 21 Oct 2022 13:15:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6BL7GQOuhOP6a7xVaQTbhAYSztU2a4w94K577kA9J1wf4Xi5MyFu0xliKo8i7L29bog1+K X-Received: by 2002:a17:906:eec7:b0:733:189f:b07a with SMTP id wu7-20020a170906eec700b00733189fb07amr17307695ejb.230.1666383316019; Fri, 21 Oct 2022 13:15:16 -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 hv19-20020a17090760d300b0078d83fb6672si22456361ejc.118.2022.10.21.13.15.15; Fri, 21 Oct 2022 13:15:16 -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=uCmG4boR; 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 BF6DA68BEEA; Fri, 21 Oct 2022 23:13:58 +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 5EAEC68BF31 for ; Fri, 21 Oct 2022 23:13:51 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KI2wD+EDdJ5Ub06ryuXfEaxU+HjUaQSky7THYlm+l4dTAF2AbmnLAZpwsfvbibSbhlnaSNR8e1tfvdITCYE+3lPgYc+MK8e9rkFDSmCNOXJWjTxrOMUaEqhQRq3b7u2bI5Q/e/cfUZkWgKPo4qFfg8/xlhZdRp/JfYjxrsYUDEMFsMd+Lt00MkKq5/YEzyLznnBBin8LDbEDfcexy/jz/7kpMkDMmEe9v3cs3sSyVGuyDkTaecnZTSl7k540TgvukkC//LUkk5VF/kIWRk8MfF6vkZThRDuH7jTd/IP/My7M6Wxk+LGF0yecXIeyiU1Z6y6iO25s8AIAjJGgQ6GYwg== 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=zOJ7yqF7CfGsSBqKZU3BCoMOQdVqAP56aPdxw4x4xr8=; b=CwE67reWEAMWy29fzrZAogPjSTJbvUS3GVnUDlcKB9P/GNuP4ukTKl4baM4avA9MltqN/g54/BzfsPdncHO3eUlayEEwU0FrG9HQnDFZUKJBHtvtShzYGCKxbuIpC99Vaw3UV2gwG4AcjQCxDxMIW6eaTb6nuJk9WVY63fsQTPqIGS49T1Rpaq9829lHD4xLKg+Y7ZEBO4FU8jKQlPp700ogLCrqk6IISHlMgpj6aTL6SUzhQ94K1XdLbXnqMCSGaxwVgffihI9N2EAkXfJA0C/wilHqrsqBpTW9AkaVEETJE9nDidSDjmFJV3DRs2AmdoxPvwIL6iB3iPynn+XI0w== 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=zOJ7yqF7CfGsSBqKZU3BCoMOQdVqAP56aPdxw4x4xr8=; b=uCmG4boRCV78KMCz8vFEt0vImUwRWePBHEI+7vBbW2fGGYaMULi+wXEqIMTWgLf9yWbhXlhYY+kESmWsUq8VL27Hf6QvCLROa/vn05jtzyULsKlUDUXsY44YbAObm88ODc9PyqDjG2raPL3gLehoZ7QVmdDHg3XSie0eXVrLU8EYwbQxe9YevE2hlVZPu/ZOgq4e+EnSyl9pVDenMbtKKAKPp8y4biue7Xi6Ay0xbPV9q6U701ksB8M/wVdvCuNf6nrRkH5QtP/XljXI23rZoUbLx6IFUZcM3wIyiKvf/bd5RXgdGMoRoMy5/If0OCYPnuA5jnwt3oCUHJs1niuP8w== 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:49 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:12:51 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [02W/FtVUXpJK2l0hZaUxTmS0VRqbaJqSVTpgPChcwww=] 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-14-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: 2f7d9cd7-4291-46c6-e4a0-08dab3a0c446 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nnHDnbJ910YUAai4EXr732ZAE5assxEuU/fNPiASwg/53vo4oZPGaCrlN1k7tw3NY99lCZV4lhK81T1vMP6jfCVco/tPL7xpukgGJ1iHzg/qkLmsSA84teaRz7YXOJWN075G/4MQmEluxf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tTqpCeqReJ4ULuNOkO5Y/Aa8BhUw4zhcju9GOqnrCj6DKo5haxWFWELWCq6XeVmXb/JMWgKJ7rWKnB5yXn6raOAM1MheguQQmjiLA5lp2MQW6CNsvZG7QEvDeUPcDeJ2EHhy76LC7TunqFv6QYShOOBdmhNzasYG2PF/F+OMmJd45wyhtGyvNmrcknFtNVgNjxpJiss9+5BY6YA68+vV+YT8MNi9444UNkn4czOyzrKZS25uj2ZSqfVDJzPAAAoifO5EQR7e6YCD+bUqS9d6KRF1eJ/YUM3Eda+hfb3B9hIvXjQj5RA2vfhGy/NTxlm20EsItoKNCstXV1lut/loUutt/ulck7qeRWGg/UO9byj5Ig5T+mguqqFeEGJ9TdkV6qbI5Zeg10BjulN9K6E6lnuTQYKRdeCgBvBTxkJtqxPF8Uq1p/9UnRUWwtWOrL4jWAqb1OlritShJuZdUvth+JRTYsocBK2FcK4e1XtsqryU+f5/JV6bpLFNrU0pxvkXlL8k0ur5Hg1xmZttRvrpobxLaHJCM7ExvYvMGEDV6rr7TE3AmS/54yYiNs7WoYCHiO9AY2pWue5X96Gk2ja2bDaAfTgAYziGDTrXobTDyoSWaK X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2f7d9cd7-4291-46c6-e4a0-08dab3a0c446 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:49.7184 (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 15/24] 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: ZhT3khmSV3Qq 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..a1f85aa0cf 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 permutated_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->permutated_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->permutated_scantable, ff_zigzag_direct, + a->idsp.idct_permutation); avctx->pix_fmt = AV_PIX_FMT_YUVJ420P; avctx->color_range = AVCOL_RANGE_JPEG; 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: TgH43jVTeDTNRr79RNWHk4YiXTmPoAfFLFx4VA6xZgtQPYXVm81NdZWlRDnGM14simHem1VxizFYCjHEK1IHBK9eBnkBKXjJNIdSS1uPgezprSrdPVxL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Lnqab/aWjQkf2hxWNiCvonvUEvAgzwWqL5KPNT/migFVc4/1VoCs9tujE+zkq6qyPMb2Qkg6l3n3oX9slWi9tQkCQU7Tq6GG+GHlOkokjbOObS/v86qCKzJZzwLLFIdhq8F1ofRtGrNizpQQlKSwR5/l6RqIAuplAKyf38QGAuth+CIaROkrUWyT4AHbcRPk+fdVmnPsHyGmqO8Gtr0Mvwvyzy8nMdVbrKAGLVclknluCqThIEwBZ8ZTJCohae47YK1FK9TcV8d2zRL651GrQ8md1AoPxeUgYL3MfwEnYXeU611apOIHKL/4KKXTD7VFMdgWxz35Nt2poQYrWhaLFJQ+eV+E/0zf3nJrI+yj0adRYMadQw/FSXWdTrBwB8/eZQPdwxs52xpVKYJ1DGglxvobV2u6cIVgSvblMakQewgdHWzMdNxSztvAOkl359Qj4tmILIJIfzWTmzb5BFb+ZLqU7/xSiFEXhRG3x8o0R7mKdclkNNMoC1M18ppj8V1wQmoBR7r1cSuad2vRdBu7qaFF1gVqr2kD5ulPaYOIjkoeq16Y/cbuGGrI1mcEDTkrgZ7TEaziJUr2nRdPjV6rdsV2XGw7W5pJq2dewuFAnyaLZXr3Dx8Ab9R3Tgzix8m8AjWUyXGPR0waEEotPj881iNThXoWaD7vzbCj2CHc0R5OKA2NA8o1W6A93dNOTxIogyMWyI1TFcIngXWuESzOu056SsejcMSEuoqHOII20yp/5jbhjCrnPmOtTlRFfxQTgzuKP3wUtJHgA40UtkbJYWVkRT2dzfazYqyEndtQfhtVSGu9P1ZRW63bOROeuT4M1gwbYJC2Jc+GBwScd4OvVEhy1DD6PUafjd9UKfNJJ5s39zyGlp4cqUOCGHOax8MHvQr X-OriginatorOrg: outlook.com 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; From patchwork Fri Oct 21 20:12:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38894 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp957165pzb; Fri, 21 Oct 2022 13:15:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7McqW1+V9yUxeaQTui/7OW3bERWObmfUB9PGWkLWHQzJpInTrxwHfGqVY7fFzWsNstfQTi X-Received: by 2002:a17:907:980e:b0:78d:b6d5:661e with SMTP id ji14-20020a170907980e00b0078db6d5661emr17241398ejc.46.1666383333787; Fri, 21 Oct 2022 13:15:33 -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 gn28-20020a1709070d1c00b0078db6b965c7si21890397ejc.782.2022.10.21.13.15.33; Fri, 21 Oct 2022 13:15:33 -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=D9t+e85G; 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 849D868BF52; Fri, 21 Oct 2022 23:14:00 +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 B49A968BF3B 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=OMWtFUm87GqOqcZv6PRQyOxwzcrkgSRgwfXlJjmUk3S4UmvYrVStni0Ew1jn30EiPVu0M6WBX9/iWTAbGDg2VjA1FcOtuCVsEE79kX860mUP8x19uFpIUqIK6e1Z6xeOihnSWvKG27XwTI+6Jjq+Db2WECh8Ip/LX/3BmIorvWqvvIYSZGSZY6P49x9O+wfbk0CwmnZanm8m639IeiZqdYL6CrM5V46cO/ib5Qy+lxJTyd725fnCIWnBJ73xE2LxNYNx2K3FDbuGQ9RAtjXRXp86yJ1M83kjGI8IR9a1EE7E6isWbLqmr2WBoLlUlhMqbq5xMVj60hmI1Voo5eeV7w== 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=0Deyd8wsaIFhFVknxOn9UCpeDILkkCkYUz17I0Hp6bo=; b=VjU5rjzS/T1L/10r/BRzWIOBqwLKaDLE4dKd6KZCA75o/pLtVya/4R2in3GDehksDIUz0KkT5Fe67ZTY9LBxLw/gm9SkdYXB0Q/NPOyfzdm7EkmCwyS02d6oaU7jv7HH1EDqB9y3oxvgWLGhYFQXAQ3iaBeoHlN10k0NsN8E4cGlN/koCnnbIsFWcEIhFwG6OVbfcuRy8sus7tpWC21Dv2A/+ikHv4C4/RApRQcjnLTocrdBIlDjcLoBxKjWTwQfC7usrnQiZmcwwojC9ESbSOBmX4sTpxGTNFFtdlhiuHG/JWafIR2amxDzygaZVz8V0J9sPWIL39nV1HbPyRIimw== 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=0Deyd8wsaIFhFVknxOn9UCpeDILkkCkYUz17I0Hp6bo=; b=D9t+e85GbtHRheHJ1t8X/2HOSGKBaEBZ0Q1htH2K/wya/tYzrnG8wEsuKg79+xz6OE1cOAfKll/YfAuscmb4O1z+hd8gkE634wFlTxWfVMQLzEpJR2tPNGoMPVJ4NPCuAEziM4BFs8qNi9ReswNnlvIeKw1zT86iARN410SkyPZJR1kQUZqZlmo5LHxQHueirG9EU/6hbtd0CWwXcDfqmbHm+EsW/T7EKCrYEpTFX5DaDepUb4gxc3oaAoM+ylguLsrGLd3b1DI1N2sGL9+57zGqXUvTqko2qNZZMR0Dyvq1D5s++V2qfuqgOT8s3pkQcdpxoiRzPdhZrLm02RkIAw== 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:51 +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:51 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:12:53 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [kNdHOQJNS5wlwenAh2BAmbgQqondMfGaSqHr+yrMllM=] 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-16-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: d7d407c1-0113-42a7-de3d-08dab3a0c54f X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nnHDnbJ910YUAai4EXr73266XZnnKr8kwpin7mcA6O29w20ZknCt0ETmtnLGY7nn8LblMO67plIA+sf9YVNhtlFl2Mu3pPVbQsPP2p1Kzzgzlg2le9VC3pWuzgEKFF1vVrzlH8JdL9TD1ItQ/9XM5S1efc+1DCiAgHmt4OU7upgRCt/i7rl+QjdgUuTlvJwHN5I33Ajg9Mg79Z5UwWwSPhcxOxr3MJd5dHkiChrCIc8pLxwFTls0cdFdOfYuXZQ/CNuuUwqCgt/5/qKWwXyiKL0ynol/ohzeGKdtrEz+orAO9oWFQpH7l42ZU/uyeK/clpyuzQXKkFpPJVRL03BTQ2gUwXv+WVa8UZ8SqcsQ+sVvxjqas4vJLPROzjg2pBDo68Huwi45SsmzRAaWGcBnrydiOUwe5+n94EaT+Uy3XOW7VP3OzlLFhKodbpLhdsX7AXhae4XcRGzRWzuMsRxpZT98wrSWjD2+MseJa9Fbch9Ndus7EY+rrxoCd0OO/e2JRkK/AspopOEOW1ve2MT9FCDkwi3Z2LYwhyZ6E2P1kw+Po9g5cD+Exmv7z2tV6518WkjShz1Uc/O0DCtsI9BBb33V8EU9R4csXOO6HXuq3LLj57id85V6i8v09+p8pNumnvnW4kAfVoHJ2ZhC4dK0LssvA1SGDEifNo0vvZeEW9n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ZzGdS6Ftz+AhlwkozGX7vgqODeYwAKMR+rcD3OX3x5ZBUdu+t181MZ0rAOxAzSMIrw0BDfwOIMbBFWYyKNZXUqP6n4YyL/M1U1hbCiIZJ6Mbd0bm9 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d7d407c1-0113-42a7-de3d-08dab3a0c54f 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:51.4549 (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 17/24] 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: SMg6CRaRZkej 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..9b7465abe7 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->permutated_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->permutated_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->permutated_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->permutated_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->permutated_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->permutated_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->permutated_scantable[i]; if (block[j]) REFINE_BIT(j) } diff --git a/libavcodec/mjpegdec.h b/libavcodec/mjpegdec.h index 648dd714e1..2cb218902c 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 permutated_scantable[64]; BlockDSPContext bdsp; HpelDSPContext hdsp; IDCTDSPContext idsp; From patchwork Fri Oct 21 20:12:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38880 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp957212pzb; Fri, 21 Oct 2022 13:15:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Nu0JTDMGJnQ+kaPlj7FbNkBT2rVPooG/Qy6az1OhaHM7At4dKHnGqFPLQJe0YX1lp6lqm X-Received: by 2002:a17:907:d0f:b0:78d:a335:8368 with SMTP id gn15-20020a1709070d0f00b0078da3358368mr17298598ejc.260.1666383343748; Fri, 21 Oct 2022 13:15: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 y12-20020a056402270c00b0045d636ca148si18703159edd.575.2022.10.21.13.15.43; Fri, 21 Oct 2022 13:15: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=ZwO6IxEm; 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 7A42368BF5D; Fri, 21 Oct 2022 23:14:01 +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 D585F68BF34 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=l8AaErtYRLugFqJvhq7KAgXksWMkRdbCtN8MhyPpkK9GGf/ORp74npEH1mVOPekXqim5joJYcrXHXQPsYsVhX/3cbABfyuntYnAlGwUdgsq9JKxBeaBd4hIaJXvfNrJ2hkDkL6cRXxS+gb/bQqSA7G24Q3ndN0RUpiPEj+9lEI7c15jyNKlaJMkHr4T0/PszxSJDyF8IfxCeL2Z2Vhsnyue63d6m7+6SjOAx5PPLZRsWroGWAEIPAhFuMKehRiF29D3k5S8tirc0ibzEhBGQS9sE0/OoEQScEGeX/utXQksT/6nsoTJkY3NfpSaA48ioc1aYQ5sl3JwUN6eYFBOt7w== 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=Sgq/p0wO4UIKqkoG/QmC6Rj2iXvChr0IIaodaabWmb4=; b=bjpnWRRDjqQEia2/jdxxA25k59ErtWUZg5JfPiS5PmH4G8lc0o9scbUnWSEuIJjGubiHaNrS/kHQsL3vBpauI5Tc11HC5ExOLCOC9+fo/EQJWw1hOXxNlUsQJEuheF2imqFmebgt4IZ+Vvjtl6MfMkx31pRG863HIbfGeFTD9cXQv+ptrNkcHKkyjEZYkU5uxkXNdh+gumVlvBs4pz4Lo+c/r6RHen95Dya6ASMnGNMHH0UEIFSY1S1EvNaUJEcl+ChE6PQseacxzTijPQEaWNOWtxgpKYS/yg6ChyhQAWYj7ZsN+NGyq4UFvWhRyC3DfvXncL6G6WQ2QQn/SCNL7w== 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=Sgq/p0wO4UIKqkoG/QmC6Rj2iXvChr0IIaodaabWmb4=; b=ZwO6IxEmeeGPqb+fMSImMjJn68rWdlSC9HQC0uB00/O+TxJyk1dcqHlU+01u5yo02Jy/hd1Ei1WrYXnEAxzvZyLALrnMPR01PYKW4wJvjAfGDtIK+fNZYmnzX71HSsE2Vo0bAQkCHrocimhJ055FodFwRD84NKoKg1iiGNGVVx9aRPZadad9o0UiCV2o6V60Jy59FVqHBNvxJQ6thmYdpZtJCIlepoVGrIPLpaUFRomuggQ3jpwHyWccA3LO8e6taxs2pnfHvqdYzQCB3qwHKcW2OQvpkYf/WMCO9k/UksvfAaHDuF1TqfYMzUiyQYYAq0m9AGvPega2FMoReyTc2w== 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:52 +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:52 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:12:54 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [ewr/3T1uWCeHQR8XqdvZKaxOWAImiJZyat6jVHI/yvU=] 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-17-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: d87b582d-ce2a-4f60-a23c-08dab3a0c5d2 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nnHDnbJ910YUAai4EXr732/G7pBWez+QOLvKojabzYMzxpx/7DUf8jBRFyc+hV0GYYD9nlfJ2x5qQxicnoPbn2Yv4ZNAQFcw6610a8jSDPzC1vkmrXhdnlxj0HtqNMAi7ngHtZMK0DhiJdc3pNx9dWk+nEZ8XM8nUmrwuEmhlIYw2CyaW4iy6KBrr7Gr1KcSsRyjCIkYnQ6vXlUc1vfJ454ex6iaFAUqN3HEASu9LgWZJtl/Am6Rwv78Vs8tv1+3sooOSBE4cV/rsgdi/0qbvPnRagpsd6FYmUoJM9BFDuABAJn30NPs79gQa9shNUHy++alWNBpWA7OP4PKI26flTJMB58hA/jydlpsnnTvsmhiHl0AmA3FFk7lg0dkTNwy6ONbdILu2RbbW1JuydG+BPw5gls0kl8NCDJp+Gv5/fMb6bgU9CfqOddkCyFCWZa3usQQv8RZJqrj16/iGwx+A6KoJGAubqkmXgHdSWyOI5F5CiLvl4tle3cXkK8NUE1wXT5VF8goFo905kKAeLsSByMcI1Q3Da/O8saIKDp3xKHPn/GE3l/hRljDZ5Lw3XIw58jeGXZj2hytS4RWVdf7K2ZoEuIlqxA0cKXJgGulZv5FHrNIJNXV4C7P8YZXz9+uLuLdv8vkosmV1a7EkPylTzV7f2iJhDQhydkHU1su8sCNMe2nAXoLfZ4QSdNBwsz9/VpN8GOZUXvaaVDoMrF/f6ZfNNc06/NlRCQj8WquteG/fD80cRv5dR9GNl06vm/Phkwp+fnMbS9TQ98w6+Hu20 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WVWdgw3H5anR8iFJ8I8e8vIFbrjPd6xgp2R9GIJGWMrM/sbRzGsxszJ1/Hlf1IfZ3xuZWlltB2QlH3/q97los9A7/lq/FIHOYi++DMpnfTLiLlHw/46rgDS940Vp6Vdnw/nUGUVe13Jj5PH2vG7ygInK3lPO2S2tcQXDplXUGOAMDZ1sE2yJswDEH61KXtEncJTT4ILu3vcNn1cDbKbf8Lided9hxLftCu3R4VNUu76cll/F4jvQYPTMOTO/2rZHyS+2XHR7gWLCuf037T0ywMcW0w8cMgTnApbIOcXkC7aKcE4MY9Tvx897FCgoEG4VN10+82AmWFKGi9wEWm8DSazqU6jZi9w1wqXQHAbuhXrHZKcTpxbq67Phobt8hTcohER5Kp2axUFVCDw0vl5Kxd7iB01DcBcI5GN/EjwINyUwiq4ligeHJ5clIzdVgJvU51lD26DEjEyyRvO7lh9Y+C27KpqKHKxjBerxl+c8SraeOkL5qKsbSofUjeuUEO1j4jLTZVHrBm2guD82Qbmt29AHGKrVcGYt1ZL8/C/FbTDFIR1eqb/0F5T6XES6hN0lueBpdSq/mvWn/dik4crt1VoXU6LRBq8wZ3thD66MZTBgpvdk7UUTM8h0lW3riO786BNKRdmF7FBBnsnen1SahztlpPQytegiQb2atcVeu2ZdJt/1DKb9SBxogPGCWQs6 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: KB0wv4sPDj/Mja0WJ2fGOeUy6N+2h65UwVcmfSOV+mT73fiF0n07quSaXi0CMRUDvTSb+tvscFP7A+CQe9UvCZYo8xSOhOODxTlKwrxUcs3vsh8ylfEeE4qs9zspkLvPzrvVdEmnUEHxVW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zANeIQpl62Lx6kBCQoibexmyvqCptHaQFI5CSVF7aAuTfXQjq/LY5UuHgp7VrV1j0Mf0Zsy2Ko8bjnheLcLUzi8YRXRSaeHpkQdBURyk00xBL1XO6NLlyao3Pwm X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d87b582d-ce2a-4f60-a23c-08dab3a0c5d2 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:52.3119 (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 18/24] 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: +vhkHKVCdfmd Namely ScanTable.permutated. Signed-off-by: Andreas Rheinhardt --- libavcodec/mjpegenc.c | 2 +- libavcodec/mjpegenc_common.c | 10 +++++----- libavcodec/mjpegenc_common.h | 4 ++-- 3 files changed, 8 insertions(+), 8 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..6dfc4469a5 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_matrix_permutation[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_matrix_permutation[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_matrix_permutation[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_matrix_permutation[64], int pred, uint16_t luma_intra_matrix[64], uint16_t chroma_intra_matrix[64], int use_slices) @@ -298,7 +298,7 @@ void ff_mjpeg_encode_picture_header(AVCodecContext *avctx, PutBitContext *pb, chroma_matrix = !lossless && !!memcmp(luma_intra_matrix, chroma_intra_matrix, sizeof(luma_intra_matrix[0]) * 64); - jpeg_table_header(avctx, pb, m, intra_scantable, + jpeg_table_header(avctx, pb, m, intra_matrix_permutation, luma_intra_matrix, chroma_intra_matrix, hsample, use_slices, chroma_matrix); diff --git a/libavcodec/mjpegenc_common.h b/libavcodec/mjpegenc_common.h index 5b13faae23..e9f0ea44a0 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,8 @@ 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_matrix_permutation[64], + int pred, uint16_t luma_intra_matrix[64], uint16_t chroma_intra_matrix[64], int use_slices); From patchwork Fri Oct 21 20:12:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38895 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp957268pzb; Fri, 21 Oct 2022 13:15:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7wF/DdjtmpeUXh4tF02l+vppmsseoVHzN/wRn15y6JroUBNDSjGUPaWlZTtL6eem9w5oBa X-Received: by 2002:a05:6402:2201:b0:44f:443e:2a78 with SMTP id cq1-20020a056402220100b0044f443e2a78mr18802673edb.76.1666383353604; Fri, 21 Oct 2022 13:15: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 z11-20020a056402274b00b0044711ea363esi24130238edd.21.2022.10.21.13.15.52; Fri, 21 Oct 2022 13:15: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=DlaBCiDI; 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 AA97B68BF31; Fri, 21 Oct 2022 23:14:03 +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-oln040092075017.outbound.protection.outlook.com [40.92.75.17]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 69E8C68BF5C for ; Fri, 21 Oct 2022 23:14:01 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q+v6BE9GeObHnJ31KJdkWLpbTjta8mhTVR+YB9vv2RC6j7nnbeSTtSf1U+HQtOjMrFYPhwihMpJYhT4DZNkoUP6eDoL9B9D+H5K+SXQADLYC1sK3Mt3v6CzhXsR7ngc0LBOk7SAGFIAVMt7Y9SKHQh1b6img/iyKxSVcz/K4Y0Zk2XyJsaY7DPqFqW3mmDHTzK2Jca/xuZquhDYIz92x7hhU6ssz/zDp27aEVtar1qBkBitcTqVKfhSK0dBXvCAEWZDPE0DpZKZvsy/QPkiLvh0aq/VcOwLGy8u0KoDeopPXJcXmZ1pGAlkK9NGmvQRMWZA8IiwelTC2MFrlhI3Buw== 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=EKuuWKSva3wmwNJiwb5PrNgG7h5AR4dZpf1Y46c9T4A=; b=QyEUqrEyYkZ0oJV0Tc2lxKHpB4Xx5r08smUynJjlhqSag6mxap3EOQJovQQoxC36bni12cD8nTaI5NxDg9ZuCs3wBHkYobc2w7pPYe2YClxMm+QK9aKFNBrA06s+wON1glwRkTrT4pw5KNYwqCyb7GvFNkTiEeqpDil1qvojuZhPuwcRX5xnQFIzxuMfaZd/EcdNjneZ6SPSKSBHxFAkOPUGaSFfxTZjMjhmxVfBz9rcmlWDsNXNg12om5C+KrS0pP7KjolX01vxR+rreMoaX6U+rIQ2g+KN+05yhfmXmu9Z8z3ekxj9aOnIugrJMlq5uWiepjIQP5Q56X4g15werA== 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=EKuuWKSva3wmwNJiwb5PrNgG7h5AR4dZpf1Y46c9T4A=; b=DlaBCiDIeqT6ricnWrAZVakJnEPR3ImabFQ8rvWZM40Kh6cL7afOkLnwXbzFMiMhNW0rAu0HAebqQ2HjYoIFQZeQPLydTs+c9uTUcTrD70wFmKYcZZZLsY/Az1gu/LZvmEYNE4e47Xe6ia0fJy1mtSKOnAS4QfEi1XJst+ygAp8iLQNnqVQU0Kyu+UWVWf4BEOE4O52jfMagnfCHmFvvXtU7Vi1atVtj1Xv2l4cOpztMNbr8j+HfD0g235sd84UW7Cz8dhHx9zeBsCOYgCcKtDNQDAC4cK2qhDXv3nbwsl12cQsNb3A89MaCnH/zXk5UD2OZXsj6YENh9YOxiVA1lQ== 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:14:00 +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:14:00 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:12:55 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [PJsXphVDhuY63aqRC6eHLNl2lHMCMIBLDPa7Zd3xPQk=] 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-18-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: 184cf3a8-e839-4693-d28b-08dab3a0ca7e X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nnHDnbJ910YUAai4EXr732EzZpUJCnm79g6UlNFoHedSFs9tYlKOr/BfK6ZsGdwCoNnVtZ8gwyhdivQ9DQGjNihWlR1GzAkNXYOvYBvnKEuIfk8ZndxR4ataYPEgvcF3esiscwbVtQE/NjfHXD5TjbyPkMOxsMGnfhC4ZI9l/ESg7fgx+p0uZDKTaf+TaG5vpD5gKfoPK09zk+UnpaOG7W0nT6Q4iMh/j8HW4mUBSrabr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vIH7fsz/LVO02iJwpRzvz+ktu5nu8/N2g5ndJRZg2bc/ck4FF1HniJ/zN2nsgVNSG7lZJLbEmfI/LuSL7/5c8elX/1/lze88ypD6dKc8vXpsVtRbGhWrlkcFOaSNPGiHq2T+Asd7wAjiPni/34dmYQERfU7WFabc8FC+x1Mp6cY6hs4MjCnECHuZs0+jVoGNRYkCXCdj9M6lu/jfUUxorYP/6sdJm34uMqMbL1nOTU/ZzpZstRwnJG5mnxDJtfKSqGrDeaPE4CoG3lvqgkh4HJen9guI1DWskOrMVbb3Fvc0dbmSQJS3Rpma9jnhI1P89X4gx3i/fLr44r5vCdsLnx+9wNjFcYjvvCBfiALFSVcXAHpjqZ+1j3wgPdm6ZevlPebjezYdJ6JDmjMFiEhO0/lslkqJQ5i1uduITjeBC03hi/ElW1eHSflNiz4ScliE8MxfsOP8OnLbkLt+r6rZs7YZHg4vEg6d4E/v/gOr7mJEG2hLj5Vdwz8U/6tT+GKB7I+0gLVmjK X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 184cf3a8-e839-4693-d28b-08dab3a0ca7e 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:14:00.1512 (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 19/24] avcodec/speedhqdec: 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: XH7gYNexOvml Namely ScanTable.permutated. Signed-off-by: Andreas Rheinhardt --- libavcodec/speedhqdec.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/speedhqdec.c b/libavcodec/speedhqdec.c index acca437bd5..5378b987dc 100644 --- a/libavcodec/speedhqdec.c +++ b/libavcodec/speedhqdec.c @@ -53,7 +53,7 @@ typedef struct SHQContext { BlockDSPContext bdsp; IDCTDSPContext idsp; - ScanTable intra_scantable; + uint8_t permutated_intra_scantable[64]; int quant_matrix[64]; enum { SHQ_SUBSAMPLING_420, SHQ_SUBSAMPLING_422, SHQ_SUBSAMPLING_444 } subsampling; @@ -137,7 +137,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->permutated_intra_scantable; LOCAL_ALIGNED_32(int16_t, block, [64]); int dc_offset; @@ -581,7 +581,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->permutated_intra_scantable, ff_zigzag_direct, + s->idsp.idct_permutation); switch (avctx->codec_tag) { case MKTAG('S', 'H', 'Q', '0'): From patchwork Fri Oct 21 20:12:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38896 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp957308pzb; Fri, 21 Oct 2022 13:16:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5G+gdSbSTZGURiK3Lwa6VmlamgKyKZZlSnta6M0HFpz8FF3jUrlKBD4GDHZc9HtUlQi/+S X-Received: by 2002:a17:906:cc56:b0:78d:98c3:8714 with SMTP id mm22-20020a170906cc5600b0078d98c38714mr17707815ejb.445.1666383361655; Fri, 21 Oct 2022 13:16:01 -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 gs7-20020a1709072d0700b0078c5f3569aesi25213828ejc.69.2022.10.21.13.16.01; Fri, 21 Oct 2022 13:16:01 -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=jve60LIo; 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 A2F4568BF6A; Fri, 21 Oct 2022 23:14:04 +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-oln040092075084.outbound.protection.outlook.com [40.92.75.84]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6EDC368BF60 for ; Fri, 21 Oct 2022 23:14:02 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MmQhpnKL9sFFUA9AAScx/U8vIN2ByMP0eqItrgJ2I3eV9Be0UvZ9Phwz/Oq/TGHdOxDKUDJHQiIfuejCvI/yxW+RjzOXVDedndG2XgOvvP07iBti34FqCJxKeAUWQ+VRjx62vXFd3CcdCYfZCXrK9ykocnjS9uBL2TIcMrojQrRapi+AoTdDKTBixsFVV+usvXBbreF4Fs97YucAw5e9Zua41J+hersQ3MbddROwnSOlBO4hceQbUT/euTFNGqGoCae+hkVrZ4Nk0Gy/wtnQo7kQLqhF1Z381lvo+AfwRcoFhLrsxtbo9nrLG8lyY+O89Ce/RcWY0h1vWFLzJe3KDA== 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=a6qbI3nmKvx3cmHExBJE95yOAYuqhPsojXY3MhPJlJTot/puDGnpMePhQ8L/jDl2n/NqnlKAXJxiQ4b4fLDwXwr6RHzDHTEjZegSLtKeDFHrSc1H9BIxz9hCSJZiv1qu4JxutTujfywE8TkeHvNdequxrZqajdZaJKHJk3rB7WotLE9kVlGo7czFgZTSgaZMRcGZSo7ptLchrXLCdEyQabAGGhBWEvkRh+IK32EdSmQp4FlKKf0A0WXYCj91N3oyuLJ9L9aT411IE1P1mANIzS600w1grsQA3Ugt0GmQJUbC4oVyq54EHmbUk6T9xVeIx0a+hvbk33iZSAadagGJ8Q== 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=jve60LIoNwbcH/yWIYBtrv+xNLqyg1tMUHJLk6/ZaG2sK109R/WmzBm2nRjS2k1OR4kfw40hwmj+DUWIVqX6UazaN0BArZWdyp7E+L4uGU5sKgKaBRgXagMSD0+5eQs+CXM8cZ65sgwJ0cyuWXh36tGocKk7mrdMfZu1RWe85v/L6qZ1+KkNA6/7BdPWmourPt/VlmjfCwOaFpT5y+IP1VsYjEixrP3bPmTgQTmvosA3DqPWg4qelPBR+5c1wJn7YZ5zau+4lu7ZGVPAQ5wEK+nt+zjDjzr3qGo/5Ozv2uHU7K9uC/kmtRWswjx9dlk6K7ZVyyA93KTWVfIWEogV/w== 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:14:01 +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:14:01 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:12:56 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [rkNUN98vCbZMBKi+gQ1W4LBeNxXN8MPXwXRmDE3I0ao=] 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-19-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: f4421b74-761d-41d2-5294-08dab3a0cb1c X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nnHDnbJ910YUAai4EXr7321FNakGoo0KWuupXDloS8P0F3bEm7ACZ7LBOterq6BWGRi80UbvIqnTWQK/f6JO93Binoy8MzafcxxDQYonnmSMTsC92p8ELj4/apbEf0xw7k4WqDXWwJWpKsfuimEc4dMRHnx8DhJWqMVGzSr7M/Sgst9koPyRCY+Whx88b7k5qSH3g+0vDhpwudq1Na9PRR4Omf58W15cDYA4SbxRJNj2hHc+rwkuMBByKH4B76dS82YIzQJl9Oimm3LM8PisS/1QCLm+DQsy0Qc1hrl8PfoQCLUAv6deI996BWcILJnOT6CQONOxyga335RGPqgKxhYgLmwOPBC6CaQkPxU0OPAYLqxRliEyNb/1HUzK4w1lbeEKRkS0n1ex+slI0p4gKTGTjhLyoa77S0YXA05ETM5UxCn5AASelfmGlBSbN233S65UCrFU7i0BtFILvxD1rGHMBT6smdL1UaCSUE97V2lgcWqr+DErm3d+LFc3vr32dn8G/4i36YO9Q9BGNgL+UEcFvwyCBVH4s+utubJz3+0zjngl0j2a7zfzWTBC635dNaXbb1QHOCak+kEHoNPmOUJCvDLcuXbriaEqHoxPKwCHIpZ8M3YmLtXvsr0OshvnYWr9/0b9pZbnVhDY1YLCY+tgkPii5Kp8pdvO9Xp3nPBGt4+iZoS4vzbMXo38lp8gfaW1q+UbCQYcwefQd4TMmkriC06veCwW0gMdRk/8KdbEeSbx2Z/1tkhs40dPLNgws3OxIU/HuALmiPlR/sbVQw X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: s/tsUY1tXVUw7+YaZPKSYPoxu4CAuPUnrYclDdzxDp9H0WJX/iGF+iRFcfiJ1KTkr8LJLSV5cJr759AZo+LZAiHUZVcKB7biBHV7cjSNI1RLnlZZ59rthdzSY6UdueCQEQqQFZTqHhiVFmxpK4J53SXjg25zpWG82QP0LLnSy3I3OyF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Z6JLuITxPLHyKgUPFhMQIIZw9JFcQVMbhvISxyTiGJS6FyQUbHwfvWAZIqiY/v+jDp2ftd/H7ewTKOx2tqjiZs81uNB7cfqsGZa3wAjaaz0rppd0Ylkr8bm4z9RY+6SDSKEnOlqDtHfn3DJbIz79EV7xR3UBWKjJIyylfS9sCafoxJNd3VOz+4WGTlGN86mfTARy9qofWFvdKwDUJh6Svb7rEpat7RDtp7SLvXpflZQR2ssedLsVqo1Nzmi2SoGa9cXYgwFZjxsGbcvJ33o/7BlXZtApLBmxRVS1ImgmRI0j23V5m3LAJKOZZzYOMlSwjg9O7khvJoQVRdjcSO4VaBcJjikdYAmgg2/n6Q/zd+n+R7NrYJrBC1rNp3zYTHSBWQCxnYcGZFW9yl4okeu22unWrEDkhBIhtz7EVigaUB79gdTMat+0gdqG2hL5fIsAWMB1V1FJnmkUK1D9J6o1wzjXzrRF64MSGdfL1fGMDiOce7VfLAnR7b2P5Qc3E76EfJQRWneB1A+F+54Iv1cTvlo42XNgVNmhIFnaZYyI3YmpuqNlVo00CX3bTk1+/R664CyC86PEtIbP7XdKJGQfy+jrZNdEkxnn5rgCtIOAhzWLjVmUYwNMqiBClGD1OWB47mvMYX3YEM0wasPaSXb5Ij4DwOrevNZRGgkg4kizQPTzZHyXFHku/eIHqS0IJoLckcw29PwpVLi7ha0O40gxFcdKTp+THcLAGwQwb+CX3yglzpJSx/Qdc/+2Yp86WPuRssQ0PVmcS1sHyvNyr7BFIJKWbKMEC5E8vpR1L7HwPsgujHIthVKEhGzYbWEoxHn/9IY9ugzn+PmR/LoCLyxGbZlkP6p+vGi X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f4421b74-761d-41d2-5294-08dab3a0cb1c 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:14:01.1834 (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 20/24] 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: aFVZ2LCXgj2Q 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 Fri Oct 21 20:12:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38897 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp957381pzb; Fri, 21 Oct 2022 13:16:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7cakw9GUSEpbhLZ8UfqUbHzsbEPxJp6wgm+0fFS6GQ4o6a6ZPPG6fF4UYh1Scr5IMUS9wB X-Received: by 2002:a17:907:74a:b0:77e:9455:b4e3 with SMTP id xc10-20020a170907074a00b0077e9455b4e3mr17355149ejb.471.1666383370815; Fri, 21 Oct 2022 13:16: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 m22-20020aa7c2d6000000b0044e9fd71b82si17591703edp.280.2022.10.21.13.16.10; Fri, 21 Oct 2022 13:16: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=UnzmOXY0; 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 8510368BF72; Fri, 21 Oct 2022 23:14:05 +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-oln040092075046.outbound.protection.outlook.com [40.92.75.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 270F168BF66 for ; Fri, 21 Oct 2022 23:14:03 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OBshE167FwHLRNmtPbCd/O1aWFEGSS7lHsLRbq30/bI6gRvJYe1aeWoMAOo+Ip3H97p0iDp2ZDV1EXb1yydf8fE/j8t99trPqP1v/aSDLGpgLsRCAMM9L/EcGbqD0sYr61F7yng+pHtvw9wUTIi/dtk0+PDgWkL0M8JwpL6IAHp1W0KA7KMfY7nTiB1PXLizqVRfriZhrDSm5LXfqlf6Ie2/zUMnFOU5hm2COKLnX8rU81Dq3pwlXOtAs199MBD5FDh06ZFU/MCXEkJmC8cPCVcT652kWdmAkNlbsZ+fceNGes6ld8NgmDH0QH+OIafUXgZqF7fYj2ZU/1rVJrG3hA== 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=IVGhhscjArJC/J+wr4UK5Rliyk6CC0oCxDZ7Qx4hdaCKhZdGQcnVEX9gt1YwhNbdyZT9i8CFpCv0oqOLk6aRw0odoUsC1JolBbF620hhGTX16q5eUAZnExuZS/rf1erU8W4ueJfM91VFGSJM7nWLakyij44XHJLHZ/PMEz0tBy8fgrLpKwC8PkAqcvfM4QqFLYMRgfY5FA2ZsbdWRCr0a2jqWiJd6Rwt9sEclFWL8mi4dqzxkjlgEhpkMvQdwD00S2Ab+zMUYAwZIRUttYhP4cuHQjhXETb7sKTWS9vL55CJ9ZTP1RJgN+3Ef58ggkfVirk0u5IOX/0FJPDfm1iOVg== 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=UnzmOXY0TsgSQTL5B5osLRbjtBKjkN5N4G7X0RnKhp2BuJJTeofo77fFsRQ8+f+PSc1pVy4WZGNF4Gt8KnRsS1za40S8lCCLN16LVAxM0GkmDAO8W3kQH1l4Z9hneOfQojt0Q6O8DJsPKzbZJi4TsrDvTHDZfVvXBc9rTD/OTXVcJUsH6xu2fFhWrUfOMrBBwnczpZs9kYqHxMvys3LDHN44508jR+qGyhiEmwRkqgdKTFg/b884Dtc/I3rpGJVzhT/+Z+RabuvWVHu22QZJdFj0SK7JJhrF8Pc02SwEi7PpIaTzCZur/W6EB43JtgjDLpUSfsaPBVIlxCsWzuAaaA== 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:14:02 +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:14:02 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:12:57 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [hYAia+KKM7zGeliIN7UnR+SCRk3UmEqIJI/NZFABWlo=] 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-20-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: e7d6b0f9-f28c-4dcf-4744-08dab3a0cc0f X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nnHDnbJ910YUAai4EXr732/mE/r6RuYOe4Icg7j0LjLrFBDegm5wkzyvzmEI8meDbqRdqvArZx043xgPMgovqMCUdTGpcVnzU4l+QqQyekdJbmWA2vf3dp3uWmKwYbUdysbh/NYlDyIrV/XvWnttRm9SfaadTI2Yw/3JGOFpZFxJLefZp12zQ8C+OvRBICigxXthPnn0gXs0WjO+woFYFwWVUZ8QFHMtUj8l39pkB/to/OSDY/JSu3gqbvq3EVNbfRb+5jp89v9YnutkG/kclxPuaJX4z74ccR8CInWv7BdKBCUJgA7ghyrs9f8l3pR+1hoowlYdEZlSsFSjIDKkJeHkDUSCTPKK8TM9Mx9JaA4SJx9zJXkYOWKY6zGvLed/mumP08cS5Xs7r6/Ub0G/sPK88gdUr/k4KlLPJxR7o34OFvUih/BMkHm0ZbDT42m6SdrlXDagUIjKtGZ2TGCeuZHNDHcj4P4muTDwtPXBweDEaoDvZ22NmX6n7KIlwI9VpbbeSgSBaIBYIbtmhSQYno17B8OJ1rQ4ftY+Denir8220rDh0fD++CYiWLNtOOsfSIv6JGBwoGifpdly2ZcqhOMU8Rl3LBWeMefxcQk+zhmS51uWFK3BJKZB4IEIuqO4gkKaJdBSwfio1Uj4dzhM8jbr59TxR0HoXjNzuRnPO+xOn0326ltZAlM2w0Nx+MzD03zBMfyuWqOag6U/7JbcoKY4tmcbel7FI21drB1l7C9swtMMFTAGyFGWAeBC0iSuMOEbvz5jmD2cKcjy3gg1oT X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YvE/tLLwmaN4yFcSBwKSBNutcw9oVPntKUWbOnk9aMtgwiJoy0ALXU9cotSEazTjnm6UiXQEdfHae/GbOQTI6jiCeTLFB6cU8XaMqt9pexi1aUJt2QWSOOEUeKlUNn8jc0iEgQaLl6QWXzRD38+DI0VblAYsc0Dk3daY0TSbSaq3QPWZ3m/3o1tQ+a/7J531u21wmNFMk4CFBMqMJKdct112CbDeYAfjdSckXKrzlh473Hc46/xZLnou9+NJj8lqzm7r1qhtWfe4TuM4zlXruAF+5KdXtex3ormHyvU5d1tFcJg6lpdxRMazqs6arGjH+JEKk4JlDRbPgf6CBYUlPe36+aLtk+icEFPjTBU1M3i/K2MCbv4SKG007AfHqUgSpnxWh3smLJLs6xEgs9lMkXIzVQT81oYYsMq4RfvbDaYB739/IZjPfgtimR+qEuP5lYvFUmZCykLhH0JDK9xxibdVVC4SNCKNiR4MaCT9fUbsRcNnUIgMgXby2fFodsAnerQp9N3QW/sw2nDWZxveMhXju59yPCr6ntmcQu9RDfXY6UJDXpMSNkgi3QhA3rQfjdp/gy2nsokvwm4Hv4u9on1JoOACGd+f49nt6HFqwJXC/8p4l4OzOTRxb3r+TJ5trScjaWUvvYg8mtJYxN6RggaAlr/7DC3/UxdpiLoh/wcNKDVm8ZA4Osr/FDdlKU5D X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: OQyWQim8hMIQT8vygsY3EztG1uoIjUkcEPQ2u1HdVwU4Lx0NJkdj0lsvtYjI9ISkBMfxgIV1hFcr8bjO1ClZ6bnUKavak0YQQ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26kyW9X7NS3o0gyUy3NqAZAlHCqmm6lCq41Hi7GT2NDTOvePQPgrp56UYb5SSvRbdULlic/WqRYMcBk4KR0eAEZ1z+7EDMwBVnVk9DueoEdSk7Jp72ktzwrZyg6Ze2XkqPqZ63Wq/B5UTe06zxNSp9JOMgFY2tWYPD06RcX5S X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e7d6b0f9-f28c-4dcf-4744-08dab3a0cc0f 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:14:02.7913 (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 21/24] 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: b5AGyPuVRLs6 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 Fri Oct 21 20:12:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38898 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp957441pzb; Fri, 21 Oct 2022 13:16:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6IVWcdRSMSm3EM4Ia0iMXajX0UTjhiw2DSO95kZq8JIdNjROushNan+mBkcil0ytUABbEW X-Received: by 2002:a17:907:2c4b:b0:78d:8621:c113 with SMTP id hf11-20020a1709072c4b00b0078d8621c113mr16297542ejc.364.1666383379563; Fri, 21 Oct 2022 13:16:19 -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 cb17-20020a0564020b7100b00459c448d32csi17726628edb.446.2022.10.21.13.16.19; Fri, 21 Oct 2022 13:16:19 -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=rg78C2ml; 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 4E71668BF78; Fri, 21 Oct 2022 23:14:06 +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-oln040092075076.outbound.protection.outlook.com [40.92.75.76]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2CF0868BF6E for ; Fri, 21 Oct 2022 23:14:04 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WjRl9feUU/EHoTCWpVf54ZfFVRmOXKGPQjQdpd5Ec+ZpumP+IETYY454cXEfItrVfLueYFiZo/gtOVIxknSwDSSslod0zgXMhSZ+6AwJQomUNZyI60VdBxbsnnBGMnC+SqCFJHfR+WLJ7kom30hVwAE/jyeqIg0o8uAvakJNbURspBdhsCEAGh5v9V3qv+kcz12fDQCe/IJFhiMp0mlKdy2hT1p3EN7F88ASwIjILbJe9xEb6NKijFYO/ljW4KnVdw6cXH2e3qJNSoe2mggNuh2wDlMb8zZUi4nTO26lEuPrEQ1Q/BR2jvq3XQrBXVedRnow4BT4shMTEEl/qWCtjg== 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=UZqbbdbsWdPam8KniwhKTGJZY1LDDxPZOo5o4cdLNQg=; b=eb9sFQm0KgFDe9RJQ28IyGROz3AkvwWjGwFKIbGzUPadkMeZNCGpZhq05LBD7+oMc1INUwjfcYAgTilwK/nV1yZ4A+zQFZ3f5VMbdg6ac3JatMiroMx9wln/tyN4noyoUdX99vUqNWlP46oYcottiCdtctB8Mw1NqDWHddoz2nOQ1I2BseQtUNpL3lUhQwS1ib+JBNUbTugc83rKwJvicSXMMNuDT0IQ0GwShr0s3B8+UgtXrCxDWP7BwoD3SZgn6LaXnl8vIs7lx2zlHErl+djByKyECuGsE0ZX/gWc+tQaFdojuqNHsKQnl9UxcOc+p7T9PMLAWRexg20mzb/ldA== 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=UZqbbdbsWdPam8KniwhKTGJZY1LDDxPZOo5o4cdLNQg=; b=rg78C2ml3bSbhOlQhqXHmxetziE42HfePfIy8aJR6d22blhLOrpYv4p21nX85L9kY3iWXzud/e/VEM2l35Woz4JEajqWYE/9V18/bD6k+7PmOGzHm/WNXsN/HGAs3nzm3tmvFBVCyqVDPH5fUJWLEhOXwkpqEf1/rI2u0z1aDf5Isax9MUv6oy9Vl2SjkX4hlBSU4CDwGtBSBuGU3dRKB6aAZ7CyOz7KrCDBWSN512bBotLIVrGMLEh1C+D2gb//xwh8FnnH84JyWMZhWxtvRLzrR2Ocw11dsef93hgAzx2MVJh37Y2L75e37uouLfNU1eoO0kBu+0cXEJP2O9Rccw== 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:14: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; Fri, 21 Oct 2022 20:14:03 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:12:58 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [uzsz1vRKZpwQifWd173KUgEVrloqRaOvBOK/flQwZ/4=] 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-21-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: ecf467e6-3e16-44c4-f816-08dab3a0ccb3 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nnHDnbJ910YUAai4EXr732ZJgNvhYrZs6mhBXlK7TrmTt/rnHQh1ZIvi8BxuwR+xNLsOnp3bofjwIYg/uxbGbr9HIvKZatH/oq7xt+4Kc4fSAhbQ7tiypdOGC+pzvQVeqdXSVbkntlEwQOM2i1mbD9/Vyuy/KiVnfsgcHO1Fa3bXayvZPTahFiIAqUL4kLhweGE5C1Unzq3MLUhRHzBDR92vFTpAGNqURmgCC1/eFgJaU55ZMQEV0fEVQZUxoIni+51WePOek5Q+VH6P1M8BHybRQcXTpiGkhMA0WsXc1mih1SOTTrONBki54mXXvMIE8SfWe1iaEHyAZ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oIp0d7+GGnYaXRP7+DxMZUgiJAaPZDXRyI1Ft6f3jkEavCJEfwAWI9Y82LAZBmVyU4gf+DUPOAvA3RXADb8wF3ISwgXUvI9PEpIo5bXLtorpVL/zNlZp47KD42jqroKA5/Crp96CHDS7kJqVUH2tFB1khBg9jzfvqezigoPkwb3LvnuPppmkyj+vr7skvKlf3BFy5jNGlWiiIilOZLOELqrux/YTgk/eiyy0aKRzNVaRoCU4NlhkAFtLeZQtpk/41AIDiivzvMjqkFpXf28elEADKEJeWjSxsFtpG9+zghxVK3dOQ3/TnHEN30xuddIP2PWh42gnrEMn3Tv0aQF/4VKIB4trvjnRQIPDdycCPXhazFAijXp0+IBlpj7x2Yw6uUyJ9EWP3yYNm9udJGyjERUM00eGaIiPX9EdeaKgaS1sljcxW4wZCF2eHE6 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ecf467e6-3e16-44c4-f816-08dab3a0ccb3 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:14:03.8549 (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 22/24] avcodec/eatgq: Move transient GetByteContext from context to stack 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: MCJ2XLbjbP4U Signed-off-by: Andreas Rheinhardt --- libavcodec/eatgq.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/libavcodec/eatgq.c b/libavcodec/eatgq.c index 627615b4e8..89e9f20880 100644 --- a/libavcodec/eatgq.c +++ b/libavcodec/eatgq.c @@ -45,7 +45,6 @@ typedef struct TgqContext { int width, height; int qtable[64]; DECLARE_ALIGNED(16, int16_t, block)[6][64]; - GetByteContext gb; } TgqContext; static av_cold int tgq_decode_init(AVCodecContext *avctx) @@ -147,34 +146,35 @@ static void tgq_idct_put_mb_dconly(TgqContext *s, AVFrame *frame, } } -static int tgq_decode_mb(TgqContext *s, AVFrame *frame, int mb_y, int mb_x) +static int tgq_decode_mb(TgqContext *s, GetByteContext *gbyte, + AVFrame *frame, int mb_y, int mb_x) { int mode; int i; int8_t dc[6]; - mode = bytestream2_get_byte(&s->gb); + mode = bytestream2_get_byte(gbyte); if (mode > 12) { GetBitContext gb; - int ret = init_get_bits8(&gb, s->gb.buffer, FFMIN(bytestream2_get_bytes_left(&s->gb), mode)); + int ret = init_get_bits8(&gb, gbyte->buffer, FFMIN(bytestream2_get_bytes_left(gbyte), mode)); if (ret < 0) return ret; for (i = 0; i < 6; i++) tgq_decode_block(s, s->block[i], &gb); tgq_idct_put_mb(s, s->block, frame, mb_x, mb_y); - bytestream2_skip(&s->gb, mode); + bytestream2_skip(gbyte, mode); } else { if (mode == 3) { - memset(dc, bytestream2_get_byte(&s->gb), 4); - dc[4] = bytestream2_get_byte(&s->gb); - dc[5] = bytestream2_get_byte(&s->gb); + memset(dc, bytestream2_get_byte(gbyte), 4); + dc[4] = bytestream2_get_byte(gbyte); + dc[5] = bytestream2_get_byte(gbyte); } else if (mode == 6) { - bytestream2_get_buffer(&s->gb, dc, 6); + bytestream2_get_buffer(gbyte, dc, 6); } else if (mode == 12) { for (i = 0; i < 6; i++) { - dc[i] = bytestream2_get_byte(&s->gb); - bytestream2_skip(&s->gb, 1); + dc[i] = bytestream2_get_byte(gbyte); + bytestream2_skip(gbyte, 1); } } else { av_log(s->avctx, AV_LOG_ERROR, "unsupported mb mode %i\n", mode); @@ -202,6 +202,7 @@ static int tgq_decode_frame(AVCodecContext *avctx, AVFrame *frame, const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; TgqContext *s = avctx->priv_data; + GetByteContext gbyte; int x, y, ret; int big_endian; @@ -210,21 +211,21 @@ static int tgq_decode_frame(AVCodecContext *avctx, AVFrame *frame, return AVERROR_INVALIDDATA; } big_endian = AV_RL32(&buf[4]) > 0x000FFFFF; - bytestream2_init(&s->gb, buf + 8, buf_size - 8); + bytestream2_init(&gbyte, buf + 8, buf_size - 8); if (big_endian) { - s->width = bytestream2_get_be16u(&s->gb); - s->height = bytestream2_get_be16u(&s->gb); + s->width = bytestream2_get_be16u(&gbyte); + s->height = bytestream2_get_be16u(&gbyte); } else { - s->width = bytestream2_get_le16u(&s->gb); - s->height = bytestream2_get_le16u(&s->gb); + s->width = bytestream2_get_le16u(&gbyte); + s->height = bytestream2_get_le16u(&gbyte); } ret = ff_set_dimensions(s->avctx, s->width, s->height); if (ret < 0) return ret; - tgq_calculate_qtable(s, bytestream2_get_byteu(&s->gb)); - bytestream2_skip(&s->gb, 3); + tgq_calculate_qtable(s, bytestream2_get_byteu(&gbyte)); + bytestream2_skipu(&gbyte, 3); if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; @@ -233,7 +234,7 @@ static int tgq_decode_frame(AVCodecContext *avctx, AVFrame *frame, for (y = 0; y < FFALIGN(avctx->height, 16) >> 4; y++) for (x = 0; x < FFALIGN(avctx->width, 16) >> 4; x++) - if (tgq_decode_mb(s, frame, y, x) < 0) + if (tgq_decode_mb(s, &gbyte, frame, y, x) < 0) return AVERROR_INVALIDDATA; *got_frame = 1; From patchwork Fri Oct 21 20:12:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38899 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp957505pzb; Fri, 21 Oct 2022 13:16:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7vSddeuFCBauPAfj3Ybt7ApZeJ+YV7aeqapC9JpDltHu5JO5XxXuMQC4P0dD5xPkNhIS4B X-Received: by 2002:a05:6402:249f:b0:453:eb1b:1f8b with SMTP id q31-20020a056402249f00b00453eb1b1f8bmr18566124eda.235.1666383388540; Fri, 21 Oct 2022 13:16: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 o8-20020a170906774800b0078da99ecbdbsi17676874ejn.673.2022.10.21.13.16.28; Fri, 21 Oct 2022 13:16: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=GI84ZpU4; 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 B103568BF7B; Fri, 21 Oct 2022 23:14:09 +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-oln040092075097.outbound.protection.outlook.com [40.92.75.97]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4A2F768BF77 for ; Fri, 21 Oct 2022 23:14:06 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U7dVwXovaHkEhLX8Az8Wb6ejLS64tC1QAxP3td2QGTolF5+vdMzFrVixo9B/xPGiNhAeqOBDQajv35i78O6xY1j2IihX+TeYWQRIPlFv1rgAdAWfS3L4HPGHVtU1nZCc2dRBCphxZXCD1PHy0iig/5SyBKhBxNwQSu2o+019zTc1UgPOvP+NH+5R/O8VTWMvgmYtzeztpwVjMdW9frVBniiIDH7krnzNchfgjNo0BymkU8xEPNg153WE1ZWrDM5SiXRFHSD9mPdx8Q8sBSSDW1pmVAf/KAe0Xmg7faUm6eiy1IxXcXqWbczzTWL81lUBUDrK510j84dKNuiquJ5muw== 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=hyuoQVbggGp+wf/hgsy2sizM2K5lu8tOyA+RClAyCFhV/ji/g9RN1cz+G7Ig1ElKis54eYavIbOr/pP1GilUfd6xTwsZ1QMcFOeWFuh+zgY3OAPXbFMfVNl2gCdwsveAOeU8+7LJZi83WgJ77ktSiJcgOn/0rqnhL2xq0gUpO/ym94eIIhJ2BFUnCn4GOxZcP/mwlZT/I/201Mp80MfhEIOEPcVwoGjFE9L44KIGOBozPfWiGVNNg6Fn5Oi8lDXHRjUQkiE6FLFMgS8rcRL6AXjbdH7iSuS2citXwq9ean5gUzK+y+IekqLsoazICSTPdUjO0fcvi+BMLOIaZHqFxw== 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=GI84ZpU49ha4YVNL3m+oEuQj185DqU0P0byDFtCQCsoZ//7TAf5+bUpazfoTWVvpdjGOvdgaNdFT9l7U+Tcc55YIVv/EuQHup9v4Xmy9hJuVCKPedg68ZqhTGSpDMkarPkQOi18hD7Nx3H9h/b2uoGTaYRtt5FIAltfmETUwJK1n6PQsEihi2LOJFGKPe/ta1LNW+jGvtVbxIfdMlnsTIEeoq9Q1rackweg0SvPDSSmIqxZm2g1Jt0Ez6J1AH7jmfSjXJJmMKNKUDR/7ZvpUwnDA1DGdySoNrGTQF3+2DioHXKU+2qNgqHyYIP9SGeBpSTD4byTpqBmnoCEHjNFXXQ== 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:14: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; Fri, 21 Oct 2022 20:14:05 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:12:59 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [PpdAIN2K4Qs2HQ3umDX7lRJ9yNHLGr7y4Us4DQ1HriY=] 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-22-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: d69a3d32-90a1-4723-f604-08dab3a0cd61 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmoyh0/rGpTlCzjnzrUxdxR9vnaoVnV3FvfZi5C12lNbLp2fDToOHE2SfZ0W3mMoMxD4+3weSzYXnRPdDXfvp2sQV9APn2rzJmQY4Hff3zUGthW9U5JfaceF/2xqDHx/fWLFXrzpSt6dvBhRJaUDIToF+RADYl41EiRxPf1OwaJzfbcR43KH2mKxOEFsXn7iwrBd7YB4b2cpQD/ILeU1IzidyCe7tQM5jLUb5D0NbdBdBA3BkRCkAhOF1j60aNj8Ydm2oMIIBf0c3JLt/AOMxSs89L3eNOxx0wsc6sJrL713GA2xh24uTTVI/wk4ZmkkHrtROJLkH4kfbLuoY7RaioeBDtBKQoRnYgtnf37OmcxC2cSAbcCGlQjHOfNkzf5XICaULPel2DnZWRQu5OExDKOOKh1waiIJfYfHa8diflX6Dw1utnZjOYKuCGWPAYFEhSpUdK42d91O2YNMbCt7mkEAqDJi2TOsVw7j6mcUpr2F3ZYqWwm8SHp9d5y2j2ZE9jPvnxnHuGCSwh49P/LzT9aYJK5CszBT8subm2ImWS81yHJfg4manyZpgM8bIaKAWBWx2pfUEaKhhCHCeveey8gdXqYWsZuQo930UuJECxlJ+9PRXdQAEnPDt+SKBl32XCxA7SoeGdIlGLSWeF12mz0GC3cYCXlTAUquKDbOIrBDwtUSFDrhxDrVFb73hOSGQgV5hZmrVYjSY1MTCqYpsHZTLUD4t7pKGwXkEJGARC0RGcM2T8WJEFcypqo6sEpo2Nw= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PJqUNYRrbVDzasaz2tJmakk8Iw/AYarEuMhfMgxCt9+FlJlbsvstun68KNQd/sJGlVaQVre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249DKkhXj3hEiBDjZ9nA6rXKxm6HpeKPbnbDOhhhgGOVzCeM6MvajktQQNtXRHlahhaLZ33VkTfM7dSoGR5ArOhmvA74h66jW16/i2pzy1Rw4hGK43zEY00Qv8EVzerZWQk5nqpPMOlCqjQHJ0XY3vSkyvAfyY038vrHHbGkld8LWH4x3ARyTZxId0ZlmX606BPYmn/9rJDfUcUqnVxISBnY57NDUynLz0y6jvVaHpe9ATFTTu6n617a8VhwGukPEwGH9zo4cqrIGMN6EqTWM3ZWFvEhIglueUR8o8ygpeXCXqCnAQdyNMtiRRZ0I+HQBmZASJ970T9zA9ZmmSKJGxN5tGzzLVyndp7b4beiaUtFcj3VKxOpQaPgLdQnxf9L60vEteILcS/I2bFr3C4DNj21185JNuDuN0gcmMS2kBoZNXv3oCqxR4zPrwv0A/JEjmtiaFRAjmgF5xQ4pjAt11yMHfz/ouqmNYbqAKgX+01++vuKwlhghHzECoijgjnN2iTW9I0QBb9c3slDbU2t7sFfQ3MG+xd9Rf8voCYOz3VgIgolSZjj6EnZr3RnrYqmvYSzJ6UjVV+AlL316dhm3n+pcBsDEU5zsyJRZoDlNuu1u1fSmaRhjbzM3tsDH9Rag+vPUMiqhmlCiBLqs7LUQ0Rw6Rrlu5WhKIFSEesLeVPvpcZUIyw4bV4KGlBXjkItkJgyWqyDGW1fuNoGqy041xsM52u4SkkWQq2fbh3VgItk65jHG6/BQSuS72YlBo1iIbFNPaU+CwTkjVHnIIOoLk7Oo406+8aicmTJAka4438BQwmDh0D08/72tPG/6Fr4EQWeEX22lKJmjgPJKDFoMEHZ0PyFmqFHB/IvkvetEd1C8CtuDUgJYNzXoZrVZP7PjV4vwWvrvnmZSTI2ojD/0UfthtgyTaGDDzoJr0AIDzCRBpO1u7odD+oeQSZq/AFR0GiiO X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d69a3d32-90a1-4723-f604-08dab3a0cd61 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:14:04.9965 (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 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: WU0EjhtAMZHt 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 Fri Oct 21 20:13:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38900 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp957609pzb; Fri, 21 Oct 2022 13:16:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6jiRCOCZaD1BEsSCPumh+fo6DwDzeW1mCyJUNJ3w3G3uDPA/NQBsu//aw1K5+kYSTnBbLJ X-Received: by 2002:a17:907:761b:b0:78d:4990:3f3e with SMTP id jx27-20020a170907761b00b0078d49903f3emr16792377ejc.228.1666383397417; Fri, 21 Oct 2022 13:16: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 d8-20020a50ea88000000b0045ad02bb8fbsi18238808edo.290.2022.10.21.13.16.36; Fri, 21 Oct 2022 13:16: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=DRy8lKNc; 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 AB50368BF80; Fri, 21 Oct 2022 23:14:11 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02olkn2027.outbound.protection.outlook.com [40.92.50.27]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E07E768BF57 for ; Fri, 21 Oct 2022 23:14:07 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m5edB5CWaz8L5d3yuECf3d4QRqafGjITR2jjhrzxWgHqgtn4NKk27bAg6HvYIIxjameOX5o2O4KndfWb7RmLPM/Ino6zBI9/dQOHcrT9A+olRq4V97E61I9G38u0gc4wHM1XXccBqqJG2cWmL134Hcx1ormyFJMumVnoqOOeBUTBNNxulS9Qg2nPbvvjGoAsv0m2ZQbqpGK3xA2UNESRXfMhzwYJGL4gyktFWWIL84JBw7vGwx8/bOZp9zOvVxo3slXW7Gur+A1X0U/HWR4QYKe5src3+TBsu8pOWeFIqaNLV++eVXZ2d165e45LZd239XVtfza5W73a4AoPjI10Ug== 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=s8tDgYSTREMfvzgn8do4jmdRJ8JYeHaDrZBLbTD1aZU=; b=Ax/6XtLCiv2CWOE+7OuWAKL46UqAq/UA1ZGnZavuP1XEtMovioSDMXHl8EaOoDJuTBUippXfxOHT+DVlqIfKmHVL+dcvN77/NyXfOvFrMfd55HElfnQ8R/lV6zfeks4n2YpiIzvy4U0vFvE2QlQ/ZBG4ggSlZpQ4hbBh3BJCff7GJiUygqE+zNpCGYA2crmlph11ZS9zc7FGqZakUtCfDDfSOGw7Wpfk9WBp4SGDg1Y1JbwnGiZneLSF5GMk6gsqY1VfN7pBdBjbc8MuSIxN7IQ01VwwZu7Pi1AJGnL8KcaGjEYUsZpwELliQva+NRwJDAFQc5CuqXzK6IqDjS8FIA== 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=s8tDgYSTREMfvzgn8do4jmdRJ8JYeHaDrZBLbTD1aZU=; b=DRy8lKNcbNOfYS+sr+Qi94puppZ9XGbSrsgMR5cRhhZo3VVX/Hna43ixXre6ITff4iZZMuxJKvB8Pkn3WAXhGDGgovA6Vp3No2s4qh/IPH+p2L2GgFlc0N/TyIfE2CK4SPs1hqZgTMv/qc6uprfWOE4PdYkVZEa/01v9lT5oKYFyzvw1jxW1BK2lTGqxk5B2n0S4yHpNQuH0E+c0qD1pBxdgDy+XPH0E89SHUE2HRXw1sRh7o7f5VoS69Xe5CzFt3r7w2pljO1IsgC/sTC/dHusEfQxKNyJzYIUucIjdfsh7kwsrQ+fOjmtOEgE2ntXCKxBHA3DJCLaZAW+BSZPJhg== 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:14:06 +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:14:06 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 22:13:00 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [N7TLgILRRqYZkRO+xVd+yot3GpRGZb4csIc7xxGQIDY=] 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-23-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: 62176ebe-5795-4008-8ac2-08dab3a0ce12 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nnHDnbJ910YUAai4EXr732Wb0a09SbiM5hXY/DS4xK26rdh/xvz4Dsid4Xqrq7wEXmIZrjh0X/rElxTg9OW0X+KoVBLTBgjgtDH5c5E3gvJsndL78Gu8ythANqnZzNoA0VN9/XIfIuggu+G4jLk/Y26j2kWq5yzhFjNLd11aTkDiqpencXONxHISjLIhgId446hTZzPkCAd9IlAtLRnmw+gyGKsGyUoVJW41Suu2W9PnuvjC0Qsv+hmmzD44djIJ3GZpGLBdqQkLgC1vyNum4Uf2sBNXC8OvttlXKi6sXY8LSBFWnFJ8zdnFjTehSI98D31sVyEiTnJeKou3nq9B1aOeGXPymyiPmm3rGD6Vn38bxX8H656VnUa+IXVlSl4u+/W5NN2WZdMU0ZDMjfvD2wc/YCj6hf8WT5NyVLqAVk24sDlZU9N/vAHU9RdU11eJ35uI2HdUuAL02XpqnoPUyjC8nDD61k0rhGNbSMbxCqw4fSGaza2/GAzrl2Caj/EHEQoEyqABqytGuEF6Ai4dKNw1OaLPL9Qzc+3dFECS3IULeO7iony4Etpa7rn9GQX278L8xW+/0bPenThdHnzNHulCqTXpgp+gDA7GEPNowiAPz/5jfYxMWOqas96MTq0P7feWy9/CTEeeP8XPeoiqvlJhvGq1tmdLtOEuKXINYGxKSMnUB0OuQDOPLDZRfzc5h6ORzRp65RGhQIDauOly75wnLvhyYBpz/03Z0n/l7HxRbDLdMZFzU7CsQqJ2fv7YDj+1hPeJ8Ugum98FIydoz1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CAJvFFWrnRlyniB9XuoQa5cMFH21gk1AYuZ9stJ6dF/B+3x11p/X+y5t5Hvelw582Mb9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vXdLl4ZO5goe97GBjq4KAZToYrDtLyVW9tmYjhsP1M9ty1ReL+4HnPqbNKgkTKUuL0/9nEbymH0c6i1CUlByOiPz3PHMFzmPbO6CnTJ6C4K/QEWH5d6XC4H/BmNb90V1RDJOX1bocyztvzbM2n5+5COARgJclm8heb+mvdSccbi+vlZKeIvSJdVgug14S0FIFhX3F29foJB6qgCofM9cB/I+A/IbjLXEx6iZV7d5nK5Sm3ddDX5ot52OOfjduOC9KZ2eNNxA30ZwGf3G+f/Bo4DsPwP8PJQ4bdf39CplMGL5E3q/CQF0/DDums8sJZ+sr9SACMgrNOpB/ODzqZNHCtryh6SzLIWZTnsNO09bZ8n8dQWQ66yvSdlgYrBe/XdDROAGJ71aQWIvtTe7/wFNSZCrY+zA9jvICFFRt8snWXs5nK5ubnbDGechByOG4+Vp6Kn1e3ly8oyMauyQAcfqEuVJnE38C+ZZ9moYXtqIePbAap34bm5YML4ycP9mcK+j39oIYs83rkOZy4r772DbPqH8NVDZh9F67GBNxbhg5goc1CawyQEWrEua4bB8wyj5hxmMVXfgaIpnUQ3exqJ9RmCR/KTWYfSQYM1ivABJdFDkaao9SU76FC6e3RL1PFG5OeG3MKetVaVv5XTJU8sfNbkBeEmlldfeyqc2MHSN1A6C+DOATw/BVhzDwUb33to/F1gLDGiuu544fz+jImY6T0wxu6OG1YQ0CIReF/nq7Tiyz2UPnvoZwKsQxZysENGfRoi2BShUOPeRH5GXE3EXnpR/jdyPj5xZ5x6iqKLTLdkbQW59+mgnW+tkzckypcA947704pgfnr4KaNxKn4rLubFFC7GHKe5jjChTzJs4+ARea7jPJqzCQua2W64AM92lGdRTdLCBUIx8QM51I4+3ajAPTGbXVbLDIn3sAMq4Kjz7sLPDYpSGgLMVGqJNuHbMQeUQ8ss8UGYkwtsrvpsJu X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 62176ebe-5795-4008-8ac2-08dab3a0ce12 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:14:06.1681 (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 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: S14a+jG/9snX 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..2164cd7346 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->permutated_intra_v_scantable; /* left */ else - scan_table = s->intra_h_scantable.permutated; /* top */ + scan_table = s->permutated_intra_h_scantable; /* top */ } } else if (s->mb_intra) { /* DC coef */ diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index c4f268c534..4ab558b46f 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->permutated_intra_v_scantable; /* left */ else - scan_table = s->intra_h_scantable.permutated; /* top */ + scan_table = s->permutated_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->permutated_intra_h_scantable, ff_alternate_vertical_scan, + s->idsp.idct_permutation); + ff_permute_scantable(s->permutated_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->permutated_intra_h_scantable, ff_alternate_horizontal_scan, + s->idsp.idct_permutation); + ff_permute_scantable(s->permutated_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->permutated_intra_h_scantable, ff_alternate_vertical_scan, + s->idsp.idct_permutation); + ff_permute_scantable(s->permutated_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->permutated_intra_h_scantable, ff_alternate_horizontal_scan, + s->idsp.idct_permutation); + ff_permute_scantable(s->permutated_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..77f960a262 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->permutated_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->permutated_intra_v_scantable; } for (i = 63; i > 0; i--) // FIXME optimize diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 4326f7f9a5..c436dc8001 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->permutated_intra_h_scantable, ff_alternate_horizontal_scan, + s->idsp.idct_permutation); + ff_permute_scantable(s->permutated_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..ccec0dd75f 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 permutated_intra_h_scantable[64]; + uint8_t permutated_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..3f5dc23130 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->permutated_intra_h_scantable, ff_wmv1_scantable[2], + s->idsp.idct_permutation); + ff_permute_scantable(s->permutated_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..8e12e1aab2 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->permutated_intra_v_scantable; /* left */ else - scan_table = s->intra_h_scantable.permutated; /* top */ + scan_table = s->permutated_intra_h_scantable; /* top */ } else { scan_table = s->intra_scantable.permutated; } diff --git a/libavcodec/wmv2.c b/libavcodec/wmv2.c index 07a5d14f90..543784c813 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->permutated_intra_h_scantable, ff_wmv1_scantable[2], + s->idsp.idct_permutation); + ff_permute_scantable(s->permutated_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;