From patchwork Sun Oct 30 23:56:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 39059 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8e01:b0:a3:a294:714c with SMTP id y1csp607370pzj; Sun, 30 Oct 2022 16:57:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7itK2XPkXAIlbIAoE0ilWp2Yr5iQKF9rUxPQLLBDv9fxbjrqvipbvJuvYhlEGog1Eya1ee X-Received: by 2002:aa7:c04f:0:b0:457:1b08:d056 with SMTP id k15-20020aa7c04f000000b004571b08d056mr11349364edo.146.1667174238596; Sun, 30 Oct 2022 16:57:18 -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 hz5-20020a1709072ce500b00783d969f318si6962594ejc.253.2022.10.30.16.57.18; Sun, 30 Oct 2022 16:57:18 -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=LhjbLTXD; 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 308E968BD85; Mon, 31 Oct 2022 01:56:53 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2043.outbound.protection.outlook.com [40.92.91.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 788DA68BD85 for ; Mon, 31 Oct 2022 01:56:49 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JGOGCk8T7GN3PX5eLwq6NoPeQpdQnXmpEvidCUzFk2HoySeJtTNxJbnY7LBcujGKwtALkJLfX1NMcYBDSJsZZreUNIABKgIdISeFdcd6oXrqkY3EuVywPxURpPoVbePgCpI9Q2d0orBJuFl0pCsZJiAYvLKwjNJqwb5wsUByxn4O4+8enhOJARmIcreInn52suTy/foP84ywdxlaH4L063nMwV6FX/VWkeExFCjcnhY1t+M8aELC00B4bdQ3cV9UbR00mGK89HPP/TSjJ3yLiLJyyjAYYJ5Q71zK+d1o0sNkYL5HjHw9l6MwedE/7GmHlF5KBnYIKb+pyVJDV81ecw== 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=gDQ55YJHd83J1duPKRYCrzroxp7/dR0nMBhH0JwKzyw=; b=ACn8R1viFoZQyU6wrnqd5/S3wJ95je8NXeTRK2GrGPW34Qtmy6UwBVRLJmV9kNgvULKV9B1OtLucMp0OYFNhuYj4SoPVc/vVNGcnbK/382kiuK8e6fnnIegEEFfgbXXwzvG05sDb4j4Z4OY8vo928/UqcevfIyooeR+rXN9xDJtey76kVBBGZ5XH9bSR3goX5WsMj0eVXBuUjY6nZWJIV2njnAqLa8YEDamXvJJ9o+W5bdTt/yBQiIEXE7MY64YjoBhiw3DF2oRJMz+9Ma/EQ+vbCniUkCuQtxJho7aMU4HJCRLcSs0k5B5c/GiXBcA0iCKfWTUl1kGL6tjvHh8wNA== 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=gDQ55YJHd83J1duPKRYCrzroxp7/dR0nMBhH0JwKzyw=; b=LhjbLTXDQXAmuUzUi+qFVKERXxM9zKINBpUdy5q7AM92SOXvUozPcZQzrVmw3YBNuiQDdMV4otnSnIHtmke1oVQgY3Nvo6jbZxbwydZ/XQeUAPDJX9NAgVwbBVYcUZlC7mMrIOBNIZlMQje0fE1pLRtcCMVbnRWpjyTwaENEc3B7m2tmu/3QGPxUvopbDhi0ikaUAcasvNZdglMaEO6e9H5biF+blzIo81wbyA1a8gR18QK8cSOn425rRF3xfiHP1CtKhCXMrmGyV2yjF/EERRThYquO915Sn0wUX/fxZp5ebETB3fC5p0jNmv986McO9l1MZP0qqo4Y8ysfw/mzUg== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by GV1P250MB0857.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:97::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.19; Sun, 30 Oct 2022 23:56:36 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::739a:8740:19c5:925c]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::739a:8740:19c5:925c%5]) with mapi id 15.20.5769.019; Sun, 30 Oct 2022 23:56:36 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 31 Oct 2022 00:56:19 +0100 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [2Q9qMHjF/Woi3115tkH++fIqnhmrrqc5aaZPHHRPLwY=] X-ClientProxiedBy: FR0P281CA0146.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:96::20) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221030235631.11750-6-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|GV1P250MB0857:EE_ X-MS-Office365-Filtering-Correlation-Id: 5dd2ea0e-d5c8-4623-d5ba-08dabad26115 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nN7ksDdJHhaFM91iprChLh3n9URP/yqxYVC2mDRcoZJbPdkUPCTcXtU+yYTGHI9Z8tx3glrT2VyRW4gc23jFhm664+LfXliz34nezhmX2+xLN6OB1RKWF2g10/b+Ac04tDLx+oHNEi9cmXMXp+7rwHdENUU+NCsVGu3iMgwxSclL49E04XVnD2tr3F/OkT/B8LpDh/CVkTK+agpz69oRMeYLUhssSEyWa18L8FsLPXVQ/nGusIuLDGlqj4BJaKK9QmdaLmCM3HL3Y71E++ik0rATL9lqhA8e4iEmrbywhKZdcqOgYZAzsiKZrG4khTQz3HIXdVBw0bsw6DuhGiIGuevKXM+mk+eeGHnFRs20Ks8itiXfDejf/nX+cu2nykYSuuFJTXvuP5vc0bfXBqDSHu6dnwyRPWPHoY5wzmvx4Ay0ET/4W1oXW/E8qkagFpdlGdfN9E/nLNYgBr94sgnBeXnktssdAk/4TbIOqmpw0mvb2y1Z9FdA9C3xocIcUusVf9hLb2uHgm8eL/K+SHZIzKt4+0JMXanIFlS4lI+/lYLJRfFpoAb0cfFoQoizd2xOekHybn/ryZvAP4AjeAPn9/7w/2OjLJbj1/4B4EKbZ1KzWR8yvuuWLPuFtqyTM+wIZBl41yMmLd3PJot/o4kBmxne5v64A9DcfvKEMsNSF07kI7Peb93MTvN42YtxmPtRgGhEKsWDiE01Ajdsou8VREYc4mwxMFNTiHD6Hv5oten6C8RqpgkJDgy8Yv3vNR7NrwEAWc7I5AqluTEcGekLPg X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message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-d5c8-4623-d5ba-08dabad26115 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2022 23:56:36.2628 (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: GV1P250MB0857 Subject: [FFmpeg-devel] [PATCH 07/19] avcodec/vc1: Move setting res_fasttx-IDCT functions to vc1dec.c 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: TaUuiJhuKyWU It allows to avoid compiling simple_idct.o for the VC-1 parser. Signed-off-by: Andreas Rheinhardt --- libavcodec/Makefile | 2 +- libavcodec/vc1.c | 11 ----------- libavcodec/vc1dec.c | 9 +++++++++ 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 72d2f92901..739bf757f9 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -1169,7 +1169,7 @@ OBJS-$(CONFIG_SBC_PARSER) += sbc_parser.o OBJS-$(CONFIG_SIPR_PARSER) += sipr_parser.o OBJS-$(CONFIG_TAK_PARSER) += tak_parser.o tak.o OBJS-$(CONFIG_VC1_PARSER) += vc1_parser.o vc1.o vc1data.o \ - simple_idct.o wmv2data.o + wmv2data.o OBJS-$(CONFIG_VP3_PARSER) += vp3_parser.o OBJS-$(CONFIG_VP8_PARSER) += vp8_parser.o OBJS-$(CONFIG_VP9_PARSER) += vp9_parser.o diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index f6468b54c7..6eb0d70a68 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -35,7 +35,6 @@ #include "vc1data.h" #include "wmv2data.h" #include "unary.h" -#include "simple_idct.h" /***********************************************************************/ /** @@ -314,16 +313,6 @@ int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitCo v->res_x8 = get_bits1(gb); //reserved v->multires = get_bits1(gb); v->res_fasttx = get_bits1(gb); - if (!v->res_fasttx) { - v->vc1dsp.vc1_inv_trans_8x8 = ff_simple_idct_int16_8bit; - v->vc1dsp.vc1_inv_trans_8x4 = ff_simple_idct84_add; - v->vc1dsp.vc1_inv_trans_4x8 = ff_simple_idct48_add; - v->vc1dsp.vc1_inv_trans_4x4 = ff_simple_idct44_add; - v->vc1dsp.vc1_inv_trans_8x8_dc = ff_simple_idct_add_int16_8bit; - v->vc1dsp.vc1_inv_trans_8x4_dc = ff_simple_idct84_add; - v->vc1dsp.vc1_inv_trans_4x8_dc = ff_simple_idct48_add; - v->vc1dsp.vc1_inv_trans_4x4_dc = ff_simple_idct44_add; - } v->fastuvmc = get_bits1(gb); //common if (!v->profile && !v->fastuvmc) { diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index fa6b5cfd3c..2cb39430f5 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -40,6 +40,7 @@ #include "msmpeg4data.h" #include "msmpeg4dec.h" #include "profiles.h" +#include "simple_idct.h" #include "vc1.h" #include "vc1data.h" #include "libavutil/avassert.h" @@ -562,6 +563,14 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx) memcpy(v->zz_8x8, ff_wmv1_scantable, 4*64); v->left_blk_sh = 3; v->top_blk_sh = 0; + v->vc1dsp.vc1_inv_trans_8x8 = ff_simple_idct_int16_8bit; + v->vc1dsp.vc1_inv_trans_8x4 = ff_simple_idct84_add; + v->vc1dsp.vc1_inv_trans_4x8 = ff_simple_idct48_add; + v->vc1dsp.vc1_inv_trans_4x4 = ff_simple_idct44_add; + v->vc1dsp.vc1_inv_trans_8x8_dc = ff_simple_idct_add_int16_8bit; + v->vc1dsp.vc1_inv_trans_8x4_dc = ff_simple_idct84_add; + v->vc1dsp.vc1_inv_trans_4x8_dc = ff_simple_idct48_add; + v->vc1dsp.vc1_inv_trans_4x4_dc = ff_simple_idct44_add; } if (avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || avctx->codec_id == AV_CODEC_ID_VC1IMAGE) {