From patchwork Fri Aug 30 10:15:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 51243 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:4027:b0:48e:c0f8:d0de with SMTP id ky39csp311352vqb; Fri, 30 Aug 2024 03:50:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXA1Ba8M7n71Ul2v42kl/U5aUECB3IJp4cPJ5xQtg3nX5dXr19EONEVkx65lo7bHA4d3javedT195lBMkQFhpXl@gmail.com X-Google-Smtp-Source: AGHT+IEddStnOZscI/eEX7WLuDHTn5Pw4LOupwqCL6Fd4HR4GtMoEaCA4s2cg/0t5bE/g2Oa2rI3 X-Received: by 2002:a17:907:724a:b0:a86:a694:aaff with SMTP id a640c23a62f3a-a89a34b4e5fmr74888366b.1.1725015020496; Fri, 30 Aug 2024 03:50:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725015020; cv=none; d=google.com; s=arc-20240605; b=di0xL3nLc2vy3W86KpCCf20+sbzyg3REPcd8Bkm6phv7p+G+GGoB/5Z75rQ8kIZ7jR rs+2u8vx4o7UrJV3yeVZ+ix3xZqSe16IF17tajdk6qoBcxW+hNfxafvsitfo2z3jpP+1 HUwDiNM6ffNckcrjYVE1RKEwW+dPAxkJKGFh2UQKo6S19ehhsc9b/FjBWv2KrlXYNqu7 JieRkXyEYjVuaKFbdcgiilJuD1TuRTNrd9pcbeLSZfbzJAgWXa4HpCqSRqQwDTWXuPXv Y6EePFDhLoZ1w9wMgmoEP1jRQ+e1HeMA1Wx9JDl5ekmqCGZ7dt+QecMf9pmvGewXu1wm eLAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=XNa6Xk/KarEEBx8tdBe0VemUePamOhrpEXhR4ReqPZg=; fh=xmAeKtysnShNOmkhiJmYkS30uw4Fu2hvBJ7qlIwukxQ=; b=MJ7xH4f1f70Zo/072Md9Rvxq7zrnyYiRu9q2+nMvmPK4wzlQu2NhREjyPieFMWCiQC 0swKJibbPpbGzb7B6W3949eE7Ffh5YMdDBHhUT89BiMfn5OKkIQQGJmq8SO8ZJDYOKkn 2TvOeNk+OACi/7O7EFNVDIoPLBOgIQ77EyevxY+RSzEG6Rq6Y7nq5AIaQEx1nveKHbf+ DDPJmXNu07c5C6Tbin3VeeALoxnjdLT9XO/nfE7aC4+58c5ZQWGOr0HnN3QpOVPkn5Ih dCHsQD3wBya53VVSVO77ZtHYbsVXZRdUMZHTlLftX7hzqMf9TRbsodRkc+uuVneWdcP5 rqug==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b=r86xur0i; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a89891f2a56si272840166b.937.2024.08.30.03.50.20; Fri, 30 Aug 2024 03:50:20 -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=@haasn.xyz header.s=mail header.b=r86xur0i; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0A5C168DC94; Fri, 30 Aug 2024 13:24:34 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DDB6A68DBC8 for ; Fri, 30 Aug 2024 13:24:13 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1725013450; bh=O57xEMQl2B5Eudrzp66vJdKl3cE6THaL9q6/34U9q5A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r86xur0iMAXsPNgSqszeCWOOwuDy5mXdkJUMQL44ZWPFduiJH9pcbW0+rqKKHes0S K/PXlv6idJAlZlEOQliv3dXnib+/JcGyIaN2jrKlz0tCcjjUO0gD3k+vHUaNL/e0RY rma6TQ3fyrm0ZMHynm4Jw7AylCMrZWIlgdarEJqY= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 026D844607; Fri, 30 Aug 2024 12:24:09 +0200 (CEST) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Fri, 30 Aug 2024 12:15:32 +0200 Message-ID: <20240830102402.18149-10-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240830102402.18149-1-ffmpeg@haasn.xyz> References: <20240830102402.18149-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 09/17] avcodec/codec_internal: nuke init_static_data() 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: Niklas Haas Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: LqBOwSiCC82O From: Niklas Haas All hail get_supported_config() --- libavcodec/allcodecs.c | 7 +------ libavcodec/codec_internal.h | 8 -------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 60b1278830..66ea502cf4 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -910,13 +910,8 @@ static AVOnce av_codec_static_init = AV_ONCE_INIT; static void av_codec_init_static(void) { for (int i = 0; codec_list[i]; i++) { - const FFCodec *codec = codec_list[i]; - if (codec->init_static_data) { - codec->init_static_data((FFCodec*) codec); - continue; - } - /* Backward compatibility with deprecated public fields */ + const FFCodec *codec = codec_list[i]; if (!codec->get_supported_config) continue; diff --git a/libavcodec/codec_internal.h b/libavcodec/codec_internal.h index 84a4376753..8443c51d71 100644 --- a/libavcodec/codec_internal.h +++ b/libavcodec/codec_internal.h @@ -173,14 +173,6 @@ typedef struct FFCodec { */ const FFCodecDefault *defaults; - /** - * Initialize codec static data, called from av_codec_iterate(). - * - * This is not intended for time consuming operations as it is - * run for every codec regardless of that codec being used. - */ - void (*init_static_data)(struct FFCodec *codec); - int (*init)(struct AVCodecContext *); union {