From patchwork Mon Apr 29 21:14:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 48393 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1509:b0:1a9:af23:56c1 with SMTP id nq9csp2271955pzb; Mon, 29 Apr 2024 14:18:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWVh3inGmRl8KLP/MJGxGLhJG9QixxmNldZ83K4Suh5O1aO2rk3eg0CjKss5t8qPdnFHyzM06lkcqUpKbDakoZ/OXoC2soqp611NQ== X-Google-Smtp-Source: AGHT+IGhU1bZ4QHI86qyI0QyPMAHASEmF4mkf+F0u/5Sh9+1cbKgf9v4rj3gDzAXCm++qOobv8tv X-Received: by 2002:a19:7405:0:b0:512:fe25:550b with SMTP id v5-20020a197405000000b00512fe25550bmr8239541lfe.47.1714425506482; Mon, 29 Apr 2024 14:18:26 -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 ka1-20020a170907990100b00a55b1be0e6esi10531697ejc.752.2024.04.29.14.18.26; Mon, 29 Apr 2024 14:18:26 -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=Dz7DvR92; 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 AD6AD68D5A2; Tue, 30 Apr 2024 00:16:19 +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-he1eur04olkn2054.outbound.protection.outlook.com [40.92.73.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8A5C568D59E for ; Tue, 30 Apr 2024 00:16:17 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kKvOgadSI+0oOYp9AkGD9hKi58oDcVQznfJqVQHpGFoJ3XDLdQEebdnHSF8b6yZPLps5Arq7ronaBeXGMLjqIk+k9VCHvOstjoYrK3Au9KXHrqaOdr3TfiDKM8htJyKLDLb+I8IN/tRdu8IYt92yFgw7+JCvCZ4qG+cHwd6OY3RlTtxV+P26hqfaTdC6HLrL/Sv9DdtEYKRfk+zz00ZxpdNfDVPvmV1XkbyyuFzK4lwgeugb2zSpLUA2N8xw9uM+zphA8nXNjQmn7n44wEXyptQoEQ96trUUlJtvI/0/hudIiPLx6l7KFEICbDXly66ftiuoDjtT1u6x6vJPB0rwwA== 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=LT6kmRUsOyo5twdNqt1n18dwG/MenfKUTs4y+6RwTnE=; b=Hd1QkNAzkFp8XqWgLicQwhRSKhJ2myVbCjwdDYT0NJXCMZrosaeJc1gQj1fuaLcA7ptMwHtY+zEim8zV3McFm6t+1gshwhNBtFcGGBdTcmHDbyiu75AOj/sWkGfCrn0NPUfeXGN1ToLUeKhLnqsSn3oA5xMPjwoXlbO9YGcyVsiCZVgtNLSXceWVEowR4J0WdySm0oM73WN1HnjTpK4YUVnvVXkyJQsg62Na/3BkRGbTnaw6aVzj/kA9cztaMzMeLENPrOv1m08xKD4vaUfOFcTu1Wh8Nt97hGEo9O2y5SGpEtsLcvCvHr34n59w/wTOmhCrSIbkpbOP8LobPSKc0A== 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=LT6kmRUsOyo5twdNqt1n18dwG/MenfKUTs4y+6RwTnE=; b=Dz7DvR92L93AIxrXkCIuLAa0V2BPgC0EQZUhqjQF8BKWrvu6pj43T2GsgAb5D3pWvqAvkN8qrVQCfKOVJto3FA/CN5Egti3yQpsGmedDZEGcywUTo1ODy/jwwGsInrugaB4dRTUAwWWSA46//vsVSeyaXnqdxhbaT1X0GeGVNbtpM1PUGp8mAb0FhSk4UIh/tL8Azsiog3hc4Eyg6W7iT3TBX176jiWLUTXHRbdoGXFELaDSbzXczT8IGzrm9hJElPSwdFkxb+CYkr8QuVesOr4EijVzPXk3YNYaYLJfS+nGI0sp9EWUjQovZj0Tnx4A8sDHvimi4PmKLaRMfKSgpQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by GVXP250MB1057.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:1b5::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34; Mon, 29 Apr 2024 21:16:15 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::1f29:8206:b8c3:45bb]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::1f29:8206:b8c3:45bb%3]) with mapi id 15.20.7519.031; Mon, 29 Apr 2024 21:16:15 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 29 Apr 2024 23:14:17 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [Zaa/sbU3gq6DTy9LolcRLnT6AeiLBHKd+gUVcQnNmLk=] X-ClientProxiedBy: ZR0P278CA0199.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:6a::21) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20240429211438.3274834-22-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|GVXP250MB1057:EE_ X-MS-Office365-Filtering-Correlation-Id: 5eca0164-b91c-4a95-025a-08dc68919ade X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|440099019|3412199016|1710799017; X-Microsoft-Antispam-Message-Info: wS2q3IlB/zROkkGbfox2MOhqgQ5nOndR9pZKrVCrszSdyp5avv7f0zgEI1v8hN3kjux+tbjKJ9RxnHRBC15QcjJMSb6W2Ocy4xBm9V7/0C+HsE6E0D0zpYqaSgT9KXstW/tVdEMMJjC90vQN0wxprU51oRZeWS8RIGfitNFUczKi3T8VRnWuxJTcDKiboccRB5ztKwSTGWMYR4Sell7f7fPc2uzdOHRfNwxsgfk4ABdr0GJ4avwfRWf+3MstnyEiservJKzrAiut3h2y7lDtJcyAQ0W7w5Gu7NSmF4JM8DVyb5UY0fFXDy/qzx+qXHRj4K/2Dal5aX07VFLs8tcvQwL0JJ6IKyYfC5XEWsUsA3feArEEnjN7fPvf9wdAXu2Mws4N7R8Ly3pzl3T2Px7K+JtEo3CuSk+5O8/7TzRSahf0nWQ3tOHMManpNUx8pyWnq81bXt5gjJs2hS/bwwZSyZ3laofzZMCffkYVN1lseeK27FajjsltSf+1SAsJpYZQKlBR0OCGg5bfTQrSNFp3LngxVMM6hmxJBnAlrQCp88X2Bra7EEbyEPIHSkXLp+9jTMju953nWvbfqnNE36MncV1Mj/PghjqsAB1pe8EdGhTyYjXmjqPcSlWY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evSK59Dkq5jGSdAQsjEAEtUPDxVsRVKVAwJUyC4gclhhTP5fXay2OF5vLXgD8/5qSNqS3UEvcEe43AMvXs/QSGYYWHX9lLHuW5yYysWLfmxdi1olxWmvU8GDhYTl0tzNcyMRuFKSzmjL3pdxHwZTX4gHOh+TFar1GzZydIUZlRv+PXoxzZ+6HRf9XE2Gi3J4kUY9bvtTtr6drrMHeu8WEXleHP8R+23+lRO8WgZGuxs6++mNWiwbmP5/ddpYXQ+bKqaM0LhV6o/wYeLoCUO80pj+J8xrw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5eca0164-b91c-4a95-025a-08dc68919ade X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2024 21:16:15.9286 (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: GVXP250MB1057 Subject: [FFmpeg-devel] [PATCH 36/57] avcodec/mpeg12dec: Don't initialize inter tables for IPU 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: TlHbcuEW01Qh IPU is intra-only. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg12dec.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index e3f2dd8af7..097e4ba19a 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -2751,13 +2751,8 @@ static int ipu_decode_frame(AVCodecContext *avctx, AVFrame *frame, m->intra_vlc_format = !!(s->flags & 0x20); m->alternate_scan = !!(s->flags & 0x10); - if (s->flags & 0x10) { - ff_init_scantable(m->idsp.idct_permutation, &m->inter_scantable, ff_alternate_vertical_scan); - ff_init_scantable(m->idsp.idct_permutation, &m->intra_scantable, ff_alternate_vertical_scan); - } else { - ff_init_scantable(m->idsp.idct_permutation, &m->inter_scantable, ff_zigzag_direct); - ff_init_scantable(m->idsp.idct_permutation, &m->intra_scantable, ff_zigzag_direct); - } + ff_init_scantable(m->idsp.idct_permutation, &m->intra_scantable, + s->flags & 0x10 ? ff_alternate_vertical_scan : ff_zigzag_direct); m->last_dc[0] = m->last_dc[1] = m->last_dc[2] = 1 << (7 + (s->flags & 3)); m->qscale = 1; @@ -2846,13 +2841,6 @@ static av_cold int ipu_decode_init(AVCodecContext *avctx) m->chroma_intra_matrix[j] = v; } - for (int i = 0; i < 64; i++) { - int j = m->idsp.idct_permutation[i]; - int v = ff_mpeg1_default_non_intra_matrix[i]; - m->inter_matrix[j] = v; - m->chroma_inter_matrix[j] = v; - } - return 0; }