From patchwork Fri Oct 7 20:25:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38611 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:789c:b0:9c:c2cd:5584 with SMTP id bf28csp206077pzc; Fri, 7 Oct 2022 13:25:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7/RUYWAhIGf4QowK6qhkXLL965MEiDSq/X0TrwHFoYDBXgmMxNB7sxHXvdsx8Q4AvvqI4G X-Received: by 2002:a17:907:2c62:b0:77a:e3ce:5ef0 with SMTP id ib2-20020a1709072c6200b0077ae3ce5ef0mr5440280ejc.553.1665174355394; Fri, 07 Oct 2022 13:25:55 -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 gn3-20020a1709070d0300b00781c2fc93c1si3367210ejc.676.2022.10.07.13.25.55; Fri, 07 Oct 2022 13:25:55 -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=t1i0y76p; 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 8628768BB85; Fri, 7 Oct 2022 23:25:34 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-oln040092072055.outbound.protection.outlook.com [40.92.72.55]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B5F2568B64A for ; Fri, 7 Oct 2022 23:25:32 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P9qK53lpYqrgqHC1D1Cnhy4rkubzVGJn3DNO3/lKXp7zTEjNINVNcjiTAEVtg76sLL2PUMPfHC4trGK5cLwpGGkf1TCGQM/YitqdRGWWZ1RIKNXhxF56W2joI/Hr3SLlyZVcftvEeAvUBSMtc5Cq8IVzmVYBsvNqWCoZEVDsCloIEK88iq+WBAIZ213lVLfdvnYgqo4WGDjV/sqqFlLRfyiGxitEf6IDl/yz9Rk1M40cJCafy+Kw9Ndo2svRR92VRRO3n0VvLG2yn65+Ze79R9fnK55KxiJEGZLSJTlRaEYK5xo5d06OaSXy+9r6B+aQoWi0QSpmeDlYuR1k2moK1w== 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=oxNDJKGii8BqV6BhLCGeCWrauBWFWv7vRbdqAUwuLYI=; b=esiXc+2C1nJeTuI/AZeGKWp1uBM32lKDNAkqjqSts6sNyxI4+DzC4u0K1jMwXaLRy5/l6tEkUtmuI5UoESwTWy2Uz+9eyCiKuWoGrdPG4ANA9PqQ7/LBcUGtx3h7F+yL7nlX1elryqLpo3Z+lK/x41A39vGu8F/d8Fgb7lUmWBQyYI3h2dQxbUO4awtiAV4v8Gc+591iAwIfftebNVIG7kvORQjIDsl6qU89T+yBQZXtedjMANnWdjvnI3LYWZ8KF60RKVmnA3KZt745K6/QCjFMx/TrdnkedbNFiJ8X+hNkibMrnJi5qlRyAYJeopseKnAJBf02BghpXMQAMO4qGg== 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=oxNDJKGii8BqV6BhLCGeCWrauBWFWv7vRbdqAUwuLYI=; b=t1i0y76pdmbU7QjeWEzXJUrWD0Vrg130LdoNmxmu/SSHA1vefHMhzwQl4nO1MbKI9u92EYCPayTwUmNWpoIXf0UlhlK2TKLXnJ1sXixrMQMKjfKZv5lwL8QwFxk2uFv8HJAX+yHU+Q87+hPe++IlCIvDonc0Mi0Aw3Dc5fBj6BNGhRfNk32QP5rqvk8vrMT8R9SDYBc0p7KkgYHuJZy3RGruNAK3H0zISwx3rMnXtVuoTIaG1TLR0LOq1x2Dpl1CBuKU7T5NWIg1Nt/v1fKLJVHuPylAtbYcwGD0dMvM7LwgMKoqIKDcQp55wcTOcR6LDYTTO8t9dZ3HoJfGhtq5+g== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by DU2P250MB0285.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:27a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.15; Fri, 7 Oct 2022 20:25:24 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8%9]) with mapi id 15.20.5676.028; Fri, 7 Oct 2022 20:25:24 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 7 Oct 2022 22:25:05 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [Ch1hOP39KVl+Xubj6bFp7/j9FPTm5B/a4P1WIOXFisM=] X-ClientProxiedBy: ZR0P278CA0106.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::21) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221007202508.4188148-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|DU2P250MB0285:EE_ X-MS-Office365-Filtering-Correlation-Id: cdb75f8a-f991-4e6b-2e73-08daa8a2106c X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmpXYlgiiriwpqBJSiirmy7KcaN9BHV82kcYQI15DKWns1Uzu8oACZLzAg9166NpNABTG+AtYaq6EQxfP2NPvGwKgD9Aj3zCHDkWoZDHY5w5ekvKV9zOW81cTIw9IjTmde1gO6uAkib+J2o9JP+NY7l7HRVRG7fcSKvc2qzlDSc0PWraojGXrjPCHyW6sPNm0eCV1SDhmRhWbEeiXLrC1kn+qUQNU3oUjDKoxekMzMUse0NFK+LdO3v9Se4ejCp5/JKm/sdt7wMiKVDSyJGcoU0EJb5WMGQR7B+Nd+uCrnVWX152MVfIbWPlKqlL3dCY1rSGOOnwoYDJstSmu4/JAikmkJIuZ/C0vS5sjMj9x6nuP6mXNyRKzMYeHPEpx5zHeL2aa+cv5+nr4NHdLNye04o/g+yeIdSO6YSMQ3BiVTfDeDPwCjTGwB/IGssNRQcJAFSEYhujwZBtNn/74mT9q13XP9ZCW/kUzSr4SHXfrTwjVAmpKZzn+lXqX4tCvyl1YPQt1EEU3dtexpVGxa4U0dyv+RfxiM0F3ma01Uz5F5rtzaesDrAL2hsH85pF28zkW1yXTkZL4Ko4L7sHNvKlvyymFi5HqP0dh7U+wGsBToVdtmhMRoqmKQ/7LT9+AZEtL7gHqZnHM/ZpZQd8Fa8+bqjrJx82iZePdK4VPUZDkL1uJS9IhVfE9pT/xTkNXk4h8jSsLm4OW8tWJGT36EkUEGVmP0uc/kO1zh43idJnRL9Hq3J4dUlJ08wSj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ossTenant-Network-Message-Id: cdb75f8a-f991-4e6b-2e73-08daa8a2106c X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2022 20:25:24.2227 (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: DU2P250MB0285 Subject: [FFmpeg-devel] [PATCH 6/9] avcodec/opus_pvq: Don't build ppp_pvq_search_c when unused 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: K+E3vTJzKNoy Signed-off-by: Andreas Rheinhardt --- libavcodec/opus_pvq.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavcodec/opus_pvq.c b/libavcodec/opus_pvq.c index 79101847af..d08dcd7413 100644 --- a/libavcodec/opus_pvq.c +++ b/libavcodec/opus_pvq.c @@ -366,6 +366,7 @@ static inline float celt_decode_pulses(OpusRangeCoder *rc, int *y, uint32_t N, u return celt_cwrsi(N, K, idx, y); } +#if CONFIG_OPUS_ENCODER /* * Faster than libopus's search, operates entirely in the signed domain. * Slightly worse/better depending on N, K and the input vector. @@ -418,6 +419,7 @@ static float ppp_pvq_search_c(float *X, int *y, int K, int N) return (float)y_norm; } +#endif static uint32_t celt_alg_quant(OpusRangeCoder *rc, float *X, uint32_t N, uint32_t K, enum CeltSpread spread, uint32_t blocks, float gain, @@ -907,11 +909,13 @@ int av_cold ff_celt_pvq_init(CeltPVQ **pvq, int encode) if (!s) return AVERROR(ENOMEM); - s->pvq_search = ppp_pvq_search_c; s->quant_band = encode ? pvq_encode_band : pvq_decode_band; -#if CONFIG_OPUS_ENCODER && ARCH_X86 +#if CONFIG_OPUS_ENCODER + s->pvq_search = ppp_pvq_search_c; +#if ARCH_X86 ff_celt_pvq_init_x86(s); +#endif #endif *pvq = s;